3431
|
1 ## Copyright (C) 1996 Auburn University. All rights reserved. |
|
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. |
3431
|
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. |
3431
|
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/>. |
3431
|
18 |
|
19 ## -*- texinfo -*- |
3500
|
20 ## @deftypefn {Function File} {} dgram (@var{a}, @var{b}) |
5016
|
21 ## Return controllability gramian of discrete time system |
|
22 ## @iftex |
|
23 ## @tex |
|
24 ## $$ x_{k+1} = ax_k + bu_k $$ |
|
25 ## @end tex |
|
26 ## @end iftex |
|
27 ## @ifinfo |
3431
|
28 ## @example |
|
29 ## x(k+1) = a x(k) + b u(k) |
|
30 ## @end example |
5016
|
31 ## @end ifinfo |
|
32 ## |
3431
|
33 ## @strong{Inputs} |
|
34 ## @table @var |
|
35 ## @item a |
|
36 ## @var{n} by @var{n} matrix |
|
37 ## @item b |
|
38 ## @var{n} by @var{m} matrix |
|
39 ## @end table |
|
40 ## |
5016
|
41 ## @strong{Output} |
|
42 ## @table @var |
|
43 ## @item m |
|
44 ## @var{n} by @var{n} matrix, satisfies |
|
45 ## @iftex |
|
46 ## @tex |
|
47 ## $$ ama^T - m + bb^T = 0 $$ |
|
48 ## @end tex |
|
49 ## @end iftex |
|
50 ## @ifinfo |
3431
|
51 ## @example |
|
52 ## a m a' - m + b*b' = 0 |
|
53 ## @end example |
5016
|
54 ## @end ifinfo |
|
55 ## @end table |
3431
|
56 ## @end deftypefn |
|
57 |
|
58 ## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu> |
|
59 ## Created: July 1995 |
|
60 |
|
61 function m = dgram (a, b) |
|
62 |
|
63 ## let dlyap do the error checking... |
4462
|
64 |
|
65 m = dlyap (a, b*b'); |
3431
|
66 |
|
67 endfunction |