3432
|
1 ## Copyright (C) 1998 Kai P. Mueller |
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by the |
|
7 ## Free Software Foundation; either version 2, or (at your option) any |
|
8 ## later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but WITHOUT |
|
11 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 ## for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
|
17 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. |
|
18 |
|
19 ## -*- texinfo -*- |
5016
|
20 ## @deftypefn {Function File} {@var{W} =} wgt1o (@var{vl}, @var{vh}, @var{fc}) |
3432
|
21 ## State space description of a first order weighting function. |
|
22 ## |
5016
|
23 ## Weighting function are needed by the |
|
24 ## @iftex |
|
25 ## @tex |
|
26 ## $ { \cal H }_2 / { \cal H }_\infty $ |
|
27 ## @end tex |
|
28 ## @end iftex |
|
29 ## @ifinfo |
|
30 ## H-2/H-infinity |
|
31 ## @end ifinfo |
|
32 ## design procedure. |
|
33 ## These function are part of the augmented plant @var{P} |
|
34 ## (see @command{hinfdemo} for an application example). |
3432
|
35 ## |
5016
|
36 ## @strong{Inputs} |
|
37 ## @table @var |
|
38 ## @item vl |
|
39 ## Gain at low frequencies. |
|
40 ## @item vh |
|
41 ## Gain at high frequencies. |
|
42 ## @item fc |
|
43 ## Corner frequency (in Hz, @strong{not} in rad/sec) |
|
44 ## @end table |
3432
|
45 ## |
5016
|
46 ## @strong{Output} |
|
47 ## @table @var |
|
48 ## @item W |
|
49 ## Weighting function, given in form of a system data structure. |
|
50 ## @end table |
3432
|
51 ## @end deftypefn |
|
52 |
|
53 ## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de> |
|
54 ## Created: September 30, 1997 |
|
55 |
|
56 function wsys = wgt1o (vl, vh, fc) |
|
57 |
|
58 if (nargin != 3) |
|
59 usage("wsys = wgt1o(vl, vh, fc)"); |
|
60 endif |
|
61 |
|
62 if(nargout > 1) |
|
63 usage("wsys = wgt1o(vl, vh, fc)"); |
|
64 endif |
|
65 |
|
66 if (vl == vh) |
|
67 a = []; |
|
68 b = []; |
|
69 c = []; |
|
70 else |
|
71 a = [-2*pi*fc]; |
|
72 b = [-2*pi*fc]; |
|
73 c = [vh-vl]; |
|
74 endif |
|
75 d=[vh]; |
|
76 |
4771
|
77 wsys = ss(a,b,c,d); |
3432
|
78 endfunction |