7017
|
1 ## Copyright (C) 1998, 2000, 2004, 2005, 2006, 2007 Kai P. Mueller |
3432
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
7016
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
3432
|
9 ## |
7016
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
3432
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
3432
|
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. |
7001
|
33 ## These functions are part of the augmented plant @var{P} |
5016
|
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) |
6046
|
59 print_usage (); |
3432
|
60 endif |
|
61 |
|
62 if (vl == vh) |
|
63 a = []; |
|
64 b = []; |
|
65 c = []; |
|
66 else |
7131
|
67 a = -2*pi*fc; |
|
68 b = -2*pi*fc; |
|
69 c = vh-vl; |
3432
|
70 endif |
7131
|
71 d = vh; |
3432
|
72 |
7131
|
73 wsys = ss (a, b, c, d); |
|
74 |
3432
|
75 endfunction |