Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 62982
Collapse All | Expand All

(-)octave-2.1.58/doc/interpreter/arith.txi (-4 / +4 lines)
Lines 108-137 $\pi/180$ Link Here
108
@DOCSTRING(sin)
108
@DOCSTRING(sin)
109
@DOCSTRING(cos)
109
@DOCSTRING(cos)
110
@DOCSTRING(tan)
110
@DOCSTRING(tan)
111
@DOCSTRING(cot)
111
@DOCSTRING(sec)
112
@DOCSTRING(sec)
112
@DOCSTRING(csc)
113
@DOCSTRING(csc)
113
@DOCSTRING(cot)
114
114
115
@DOCSTRING(asin)
115
@DOCSTRING(asin)
116
@DOCSTRING(acos)
116
@DOCSTRING(acos)
117
@DOCSTRING(atan)
117
@DOCSTRING(atan)
118
@DOCSTRING(acot)
118
@DOCSTRING(asec)
119
@DOCSTRING(asec)
119
@DOCSTRING(acsc)
120
@DOCSTRING(acsc)
120
@DOCSTRING(acot)
121
121
122
@DOCSTRING(sinh)
122
@DOCSTRING(sinh)
123
@DOCSTRING(cosh)
123
@DOCSTRING(cosh)
124
@DOCSTRING(tanh)
124
@DOCSTRING(tanh)
125
@DOCSTRING(coth)
125
@DOCSTRING(sech)
126
@DOCSTRING(sech)
126
@DOCSTRING(csch)
127
@DOCSTRING(csch)
127
@DOCSTRING(coth)
128
128
129
@DOCSTRING(asinh)
129
@DOCSTRING(asinh)
130
@DOCSTRING(acosh)
130
@DOCSTRING(acosh)
131
@DOCSTRING(atanh)
131
@DOCSTRING(atanh)
132
@DOCSTRING(acoth)
132
@DOCSTRING(asech)
133
@DOCSTRING(asech)
133
@DOCSTRING(acsch)
134
@DOCSTRING(acsch)
134
@DOCSTRING(acoth)
135
135
136
Each of these functions expect a single argument.  For matrix arguments,
136
Each of these functions expect a single argument.  For matrix arguments,
137
they work on an element by element basis.  For example,
137
they work on an element by element basis.  For example,
(-)octave-2.1.58/doc/interpreter/control.txi (-13 / +13 lines)
Lines 5-11 Link Here
5
@node Control Theory
5
@node Control Theory
6
@chapter Control Theory
6
@chapter Control Theory
7
7
8
The Octave Control Systems Toolbox (OCST) was initially developed
8
The Octave Control Systems Toolbox (@acronym{OCST}) was initially developed
9
by Dr.@: A. Scottedward Hodel 
9
by Dr.@: A. Scottedward Hodel 
10
@email{a.s.hodel@@eng.auburn.edu} with the assistance
10
@email{a.s.hodel@@eng.auburn.edu} with the assistance
11
of his students
11
of his students
Lines 15-27 of his students Link Here
15
@item John E. Ingram @email{John.Ingram@@sea.siemans.com}, and 
15
@item John E. Ingram @email{John.Ingram@@sea.siemans.com}, and 
16
@item Kristi McGowan.  
16
@item Kristi McGowan.  
17
@end itemize
17
@end itemize
18
This development was supported in part by NASA's Marshall Space Flight 
18
This development was supported in part by @acronym{NASA}'s Marshall Space Flight 
19
Center as part of an in-house CACSD environment.  Additional important 
19
Center as part of an in-house @acronym{CACSD} environment.  Additional important 
20
contributions were made by Dr. Kai Mueller @email{mueller@@ifr.ing.tu-bs.de}
20
contributions were made by Dr. Kai Mueller @email{mueller@@ifr.ing.tu-bs.de}
21
and Jose Daniel Munoz Frias (@code{place.m}).
21
and Jose Daniel Munoz Frias (@code{place.m}).
22
22
23
An on-line menu-driven tutorial is available via @code{DEMOcontrol};
23
An on-line menu-driven tutorial is available via @code{DEMOcontrol};
24
beginning OCST users should start with this program. 
24
beginning @acronym{OCST} users should start with this program. 
25
25
26
@DOCSTRING(DEMOcontrol)
26
@DOCSTRING(DEMOcontrol)
27
27
Lines 48-74 beginning OCST users should start with t Link Here
48
* sysstructss::                 
48
* sysstructss::                 
49
@end menu
49
@end menu
50
50
51
The OCST stores all dynamic systems in
51
The @acronym{OCST} stores all dynamic systems in
52
a single data structure format that can represent continuous systems,
52
a single data structure format that can represent continuous systems,
53
discrete-systems, and mixed (hybrid) systems in state-space form, and
53
discrete-systems, and mixed (hybrid) systems in state-space form, and
54
can also represent purely continuous/discrete systems in either
54
can also represent purely continuous/discrete systems in either
55
transfer function or pole-zero form. In order to
55
transfer function or pole-zero form. In order to
56
provide more flexibility in treatment of discrete/hybrid systems, the
56
provide more flexibility in treatment of discrete/hybrid systems, the
57
OCST also keeps a record of which system outputs are sampled.
57
@acronym{OCST} also keeps a record of which system outputs are sampled.
58
58
59
Octave structures are accessed with a syntax much like that used
59
Octave structures are accessed with a syntax much like that used
60
by the C programming language.  For consistency in
60
by the C programming language.  For consistency in
61
use of the data structure used in the OCST, it is recommended that
61
use of the data structure used in the @acronym{OCST}, it is recommended that
62
the system structure access m-files be used (@pxref{sysinterface}).
62
the system structure access m-files be used (@pxref{sysinterface}).
63
Some elements of the data structure are absent depending on the internal
63
Some elements of the data structure are absent depending on the internal
64
system representation(s) used.  More than one system representation
64
system representation(s) used.  More than one system representation
65
can be used for SISO systems; the OCST m-files ensure that all representations
65
can be used for @acronym{SISO} systems; the @acronym{OCST} m-files ensure that all representations
66
used are consistent with one another.
66
used are consistent with one another.
67
67
68
@DOCSTRING(sysrepdemo)
68
@DOCSTRING(sysrepdemo)
69
69
70
@node sysstructvars
70
@node sysstructvars
71
@subsection Variables common to all OCST system formats
71
@subsection Variables common to all @acronym{OCST} system formats
72
72
73
The data structure elements (and variable types) common to all  system
73
The data structure elements (and variable types) common to all  system
74
representations are listed below; examples of the initialization
74
representations are listed below; examples of the initialization
Lines 176-182 names of system states (list of string Link Here
176
@node sysinterface
176
@node sysinterface
177
@section System Construction and Interface Functions
177
@section System Construction and Interface Functions
178
178
179
Construction and manipulations of the OCST system data structure
179
Construction and manipulations of the @acronym{OCST} system data structure
180
(@pxref{sysstruct}) requires attention to many details in order
180
(@pxref{sysstruct}) requires attention to many details in order
181
to ensure that data structure contents remain consistent.  Users
181
to ensure that data structure contents remain consistent.  Users
182
are strongly encouraged to use the system interface functions
182
are strongly encouraged to use the system interface functions
Lines 352-364 system data structures. Link Here
352
352
353
@DOCSTRING(zgshsr)
353
@DOCSTRING(zgshsr)
354
354
355
References:
355
@strong{References}
356
@table @strong
356
@table @strong
357
@item  ZGEP
357
@item  ZGEP
358
 Hodel, "Computation of Zeros with Balancing," 1992, Linear Algebra
358
 Hodel, @cite{Computation of Zeros with Balancing}, 1992, Linear Algebra
359
 and its Applications
359
 and its Applications
360
@item @strong{Generalized CG}
360
@item @strong{Generalized CG}
361
 Golub and Van Loan, "Matrix Computations, 2nd ed" 1989
361
 Golub and Van Loan, @cite{Matrix Computations, 2nd ed} 1989.
362
@end table
362
@end table
363
363
364
@node sysprop
364
@node sysprop
(-)octave-2.1.58/doc/interpreter/expr.txi (-69 / +3 lines)
Lines 67-141 a (1, :) Link Here
67
@noindent
67
@noindent
68
and select the first row of the matrix.
68
and select the first row of the matrix.
69
69
70
A special form of indexing may be used to select elements of a matrix or
70
@c FIXED -- sections on variable prefer_zero_one_indexing were removed
71
vector.  If the indices are vectors made up of only ones and zeros, the
72
result is a new matrix whose elements correspond to the elements of the
73
index vector that are equal to one.  For example,
74
71
75
@example
72
Indexing a scalar with a vector of ones can be used to create a
76
@group
77
a = [1, 2; 3, 4];
78
a ([1, 0], :)
79
@end group
80
@end example
81
82
@noindent
83
selects the first row of the matrix @code{a}.
84
85
This operation can be useful for selecting elements of a matrix based on
86
some condition, since the comparison operators return matrices of ones
87
and zeros.
88
89
This special zero-one form of indexing leads to a conflict with the
90
standard indexing operation.  For example, should the following
91
statements
92
93
@example
94
@group
95
a = [1, 2; 3, 4];
96
a ([1, 1], :)
97
@end group
98
@end example
99
100
@noindent
101
return the original matrix, or the matrix formed by selecting the first
102
row twice?  Although this conflict is not likely to arise very often in
103
practice, you may select the behavior you prefer by setting the built-in
104
variable @code{prefer_zero_one_indexing}.
105
106
@c XXX FIXME XXX -- this variable no longer exists!
107
108
@defvr {Built-in Variable} prefer_zero_one_indexing
109
If the value of @code{prefer_zero_one_indexing} is nonzero, Octave
110
will perform zero-one style indexing when there is a conflict with the
111
normal indexing rules.  @xref{Index Expressions}.  For example, given a
112
matrix
113
114
@example
115
a = [1, 2, 3, 4]
116
@end example
117
118
@noindent
119
with @code{prefer_zero_one_indexing} is set to nonzero, the
120
expression
121
122
@example
123
a ([1, 1, 1, 1])
124
@end example
125
126
@noindent
127
results in the matrix @code{[ 1, 2, 3, 4 ]}.  If the value of
128
@code{prefer_zero_one_indexing} set to 0, the result would be
129
the matrix @code{[ 1, 1, 1, 1 ]}.
130
131
In the first case, Octave is selecting each element corresponding to a
132
@samp{1} in the index vector.  In the second, Octave is selecting the
133
first element multiple times.
134
135
The default value for @code{prefer_zero_one_indexing} is 0.
136
@end defvr
137
138
Finally, indexing a scalar with a vector of ones can be used to create a
139
vector the same size as the index vector, with each element equal to
73
vector the same size as the index vector, with each element equal to
140
the value of the original scalar.  For example, the following statements
74
the value of the original scalar.  For example, the following statements
141
75
Lines 890-896 A (:, 1:2:5) = [] Link Here
890
@end example
824
@end example
891
825
892
@noindent
826
@noindent
893
deletes the first, third, and fifth columns.
827
deletes the first, second, and fifth columns.
894
828
895
An assignment is an expression, so it has a value.  Thus, @code{z = 1}
829
An assignment is an expression, so it has a value.  Thus, @code{z = 1}
896
as an expression has the value 1.  One consequence of this is that you
830
as an expression has the value 1.  One consequence of this is that you
(-)octave-2.1.58/doc/interpreter/func.txi (-4 / +2 lines)
Lines 375-381 does contain a nonzero element. Link Here
375
375
376
@defvr {Keyword} return
376
@defvr {Keyword} return
377
When Octave encounters the keyword @code{return} inside a function or
377
When Octave encounters the keyword @code{return} inside a function or
378
script, it returns control to be caller immediately.  At the top level,
378
script, it returns control to the caller immediately. At the top level,
379
the return statement is ignored.  A @code{return} statement is assumed
379
the return statement is ignored.  A @code{return} statement is assumed
380
at the end of every function definition.
380
at the end of every function definition.
381
@end defvr
381
@end defvr
Lines 667-674 The next statements Link Here
667
667
668
@example
668
@example
669
@group
669
@group
670
ColumnVector dx (3);
671
672
dx(0) = 77.27 * (x(1) - x(0)*x(1) + x(0)
670
dx(0) = 77.27 * (x(1) - x(0)*x(1) + x(0)
673
                 - 8.375e-06*pow (x(0), 2));
671
                 - 8.375e-06*pow (x(0), 2));
674
672
Lines 679-685 dx(2) = 0.161*(x(0) - x(2)); Link Here
679
@end example
677
@end example
680
678
681
@noindent
679
@noindent
682
define the right hand side of the differential equation.  Finally, we
680
define the right-hand side of the differential equation.  Finally, we
683
can return @code{dx}:
681
can return @code{dx}:
684
682
685
@example
683
@example
(-)octave-2.1.58/doc/interpreter/io.txi (-1 / +1 lines)
Lines 124-130 read from disk files in various formats. Link Here
124
written by the @code{save} command can be controlled using the built-in
124
written by the @code{save} command can be controlled using the built-in
125
variables @code{default_save_format} and @code{save_precision}.
125
variables @code{default_save_format} and @code{save_precision}.
126
126
127
Note that Octave can not yet save or load structure variables or any
127
Note that Octave cannot yet save or load structure variables or any
128
user-defined types.
128
user-defined types.
129
129
130
@DOCSTRING(save)
130
@DOCSTRING(save)
(-)octave-2.1.58/doc/interpreter/plot.txi (-1 / +1 lines)
Lines 44-50 The optional item @var{ranges} has the s Link Here
44
44
45
@noindent
45
@noindent
46
and may be used to specify the ranges for the axes of the plot,
46
and may be used to specify the ranges for the axes of the plot,
47
independent of the actual range of the data.  The range for the y axes
47
independent of the actual range of the data.  The range for the y axis
48
and any of the individual limits may be omitted.  A range @code{[:]}
48
and any of the individual limits may be omitted.  A range @code{[:]}
49
indicates that the default limits should be used.  This normally means
49
indicates that the default limits should be used.  This normally means
50
that a range just large enough to include all the data points will be
50
that a range just large enough to include all the data points will be
(-)octave-2.1.58/doc/interpreter/struct.txi (-1 / +4 lines)
Lines 103-109 a = Link Here
103
@{
103
@{
104
  b =
104
  b =
105
  @{
105
  @{
106
    c = <structure>
106
    c =
107
    @{
108
      d: 1x1 struct
109
    @}
107
  @}
110
  @}
108
@}
111
@}
109
@end group
112
@end group
(-)octave-2.1.58/scripts/control/base/analdemo.m (-12 / +12 lines)
Lines 32-38 function analdemo () Link Here
32
    k=0;
32
    k=0;
33
    while(k > 8 || k < 1)
33
    while(k > 8 || k < 1)
34
      k = menu("Octave State Space Analysis Demo", ...
34
      k = menu("Octave State Space Analysis Demo", ...
35
        "System grammians (gram, dgram)", ...
35
        "System gramians (gram, dgram)", ...
36
        "System zeros (tzero)", ...
36
        "System zeros (tzero)", ...
37
        "Continuous => Discrete and Discrete => Continuous conversions (c2d,d2c)", ...
37
        "Continuous => Discrete and Discrete => Continuous conversions (c2d,d2c)", ...
38
        "Algebraic Riccati Equation (are, dare)", ...
38
        "Algebraic Riccati Equation (are, dare)", ...
Lines 47-68 function analdemo () Link Here
47
      prompt
47
      prompt
48
48
49
      clc
49
      clc
50
      disp("System Grammians: (see Moore, IEEE T-AC, 1981) \n");
50
      disp("System Gramians: (see Moore, IEEE T-AC, 1981) \n");
51
      disp("Example #1, consider the discrete time state space system:\n");
51
      disp("Example #1, consider the discrete time state space system:\n");
52
      a=[1, 5, -8.4; 1.2, -3, 5; 1, 7, 9]
52
      a=[1, 5, -8.4; 1.2, -3, 5; 1, 7, 9]
53
      b=[1, 5; 2, 6; -4.4, 5]
53
      b=[1, 5; 2, 6; -4.4, 5]
54
      c=[1, -1.5, 2; 6, -9.8, 1]
54
      c=[1, -1.5, 2; 6, -9.8, 1]
55
      d=0
55
      d=0
56
      prompt
56
      prompt
57
      disp("\nThe discrete controllability grammian is computed as follows:");
57
      disp("\nThe discrete controllability gramian is computed as follows:");
58
      cmd = "grammian = dgram(a, b);";
58
      cmd = "gramian = dgram(a, b);";
59
      run_cmd;
59
      run_cmd;
60
      disp("Results:\n");
60
      disp("Results:\n");
61
      grammian = dgram(a,b)
61
      gramian = dgram(a,b)
62
      disp("Variable Description:\n");
62
      disp("Variable Description:\n");
63
      disp("grammian => discrete controllability grammian");
63
      disp("gramian => discrete controllability gramian");
64
      disp("a, b => a and b matrices of discrete time system\n");
64
      disp("a, b => a and b matrices of discrete time system\n");
65
      disp("A dual approach may be used to compute the observability grammian.");
65
      disp("A dual approach may be used to compute the observability gramian.");
66
      prompt
66
      prompt
67
      clc
67
      clc
68
68
Lines 76-90 function analdemo () Link Here
76
      c=[1, -1.1, 7; 3, -9.8, 2]
76
      c=[1, -1.1, 7; 3, -9.8, 2]
77
      d=0
77
      d=0
78
      prompt
78
      prompt
79
      disp("\nThe continuous controllability grammian is computed as follows:");
79
      disp("\nThe continuous controllability gramian is computed as follows:");
80
      cmd = "grammian = gram(a, b);";
80
      cmd = "gramian = gram(a, b);";
81
      run_cmd;
81
      run_cmd;
82
      disp("Results:\n");
82
      disp("Results:\n");
83
      grammian = gram(a,b)
83
      gramian = gram(a,b)
84
      disp("Variable Description:\n");
84
      disp("Variable Description:\n");
85
      disp("grammian => continuous controllability grammian");
85
      disp("gramian => continuous controllability gramian");
86
      disp("a, b => a and b matrices of continuous time system\n");
86
      disp("a, b => a and b matrices of continuous time system\n");
87
      disp("A dual approach may be used to compute the observability grammian.");
87
      disp("A dual approach may be used to compute the observability gramian.");
88
      prompt
88
      prompt
89
      clc
89
      clc
90
90
(-)octave-2.1.58/scripts/control/base/are.m (-11 / +14 lines)
Lines 17-28 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} are (@var{a}, @var{b}, @var{c}, @var{opt})
20
## @deftypefn {Function File} {@var{x} =} are (@var{a}, @var{b}, @var{c}, @var{opt})
21
## Solve the algebraic Riccati equation
21
## Solve the Algebraic Riccati Equation
22
## @iftex
22
## @iftex
23
## @tex
23
## @tex
24
## $$
24
## $$
25
## A^TX + XA - XBX + C = 0
25
## A^{ \rm T }\,X + X\,A - X\,B\,X + C = 0
26
## $$
26
## $$
27
## @end tex
27
## @end tex
28
## @end iftex
28
## @end iftex
Lines 37-59 Link Here
37
## for identically dimensioned square matrices
37
## for identically dimensioned square matrices
38
## @table @var
38
## @table @var
39
## @item a
39
## @item a
40
## @var{n}x@var{n} matrix.
40
## @var{n} by @var{n} matrix;
41
## @item b
41
## @item b
42
##   @var{n}x@var{n} matrix or @var{n}x@var{m} matrix; in the latter case
42
##   @var{n} by @var{n} matrix or @var{n} by @var{m} matrix; in the latter case
43
##   @var{b} is replaced by @math{b:=b*b'}.
43
##   @var{b} is replaced by @math{b:=b*b'};
44
## @item c
44
## @item c
45
##   @var{n}x@var{n} matrix or @var{p}x@var{m} matrix; in the latter case
45
##   @var{n} by @var{n} matrix or @var{p} by @var{m} matrix; in the latter case
46
##   @var{c} is replaced by @math{c:=c'*c}.
46
##   @var{c} is replaced by @math{c:=c'*c};
47
## @item opt
47
## @item opt
48
## (optional argument; default = @code{"B"}):
48
## (optional argument; default = @code{"B"}):
49
## String option passed to @code{balance} prior to ordered Schur decomposition.
49
## String option passed to @code{balance} prior to ordered Schur decomposition.
50
## @end table
50
## @end table
51
##
51
##
52
## @strong{Outputs}
52
## @strong{Output}
53
## @var{x}: solution of the ARE.
53
## @table @var
54
## @item x
55
## solution of the @acronym{ARE}.
56
## @end table
54
##
57
##
55
## @strong{Method}
58
## @strong{Method}
56
## Laub's Schur method (IEEE Transactions on
59
## Laub's Schur method (@acronym{IEEE} Transactions on
57
## Automatic Control, 1979) is applied to the appropriate Hamiltonian
60
## Automatic Control, 1979) is applied to the appropriate Hamiltonian
58
## matrix.
61
## matrix.
59
##
62
##
(-)octave-2.1.58/scripts/control/base/bddemo.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} bddemo (@var{inputs})
20
## @deftypefn {Function File} {} bddemo (@var{inputs})
21
## Octave Controls toolbox demo: Block Diagram Manipulations demo
21
## Octave Controls toolbox demo: Block Diagram Manipulations demo.
22
## @end deftypefn
22
## @end deftypefn
23
23
24
## Author: David Clem
24
## Author: David Clem
(-)octave-2.1.58/scripts/control/base/bode_bounds.m (-2 / +10 lines)
Lines 20-28 Link Here
20
## @deftypefn {Function File} {[@var{wmin}, @var{wmax}] =} bode_bounds (@var{zer}, @var{pol}, @var{dflg}, @var{tsam})
20
## @deftypefn {Function File} {[@var{wmin}, @var{wmax}] =} bode_bounds (@var{zer}, @var{pol}, @var{dflg}, @var{tsam})
21
## Get default range of frequencies based on cutoff frequencies of system
21
## Get default range of frequencies based on cutoff frequencies of system
22
## poles and zeros.
22
## poles and zeros.
23
## Frequency range is the interval [10^wmin,10^wmax]
23
## Frequency range is the interval
24
## @iftex
25
## @tex
26
## $ [ 10^{w_{min}},~10^{w_{max}} ] $
27
## @end tex
28
## @end iftex
29
## @ifinfo
30
## [10^@var{wmin}, 10^@var{wmax}]
31
## @end ifinfo
24
##
32
##
25
## Used internally in __freqresp__ (@code{bode}, @code{nyquist})
33
## Used internally in @command{__freqresp__} (@command{bode}, @command{nyquist})
26
## @end deftypefn
34
## @end deftypefn
27
35
28
function [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, tsam)
36
function [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, tsam)
(-)octave-2.1.58/scripts/control/base/bode.m (-2 / +2 lines)
Lines 39-45 Link Here
39
## @end itemize
39
## @end itemize
40
##
40
##
41
## @strong{Default} the default frequency range is selected as follows: (These
41
## @strong{Default} the default frequency range is selected as follows: (These
42
## steps are NOT performed if @var{w} is specified)
42
## steps are @strong{not} performed if @var{w} is specified)
43
## @enumerate
43
## @enumerate
44
## @item via routine __bodquist__, isolate all poles and zeros away from
44
## @item via routine __bodquist__, isolate all poles and zeros away from
45
## @var{w}=0 (@var{jw}=0 or @math{@code{exp}(jwT)}=1) and select the frequency
45
## @var{w}=0 (@var{jw}=0 or @math{@code{exp}(jwT)}=1) and select the frequency
Lines 91-97 Link Here
91
## Failure to include a concluding semicolon will yield some garbage
91
## Failure to include a concluding semicolon will yield some garbage
92
## being printed to the screen (@code{ans = []}).
92
## being printed to the screen (@code{ans = []}).
93
##
93
##
94
## @item If the requested plot is for an MIMO system, mag is set to
94
## @item If the requested plot is for an @acronym{MIMO} system, mag is set to
95
## @math{||G(jw)||} or @math{||G(@code{exp}(jwT))||}
95
## @math{||G(jw)||} or @math{||G(@code{exp}(jwT))||}
96
## and phase information is not computed.
96
## and phase information is not computed.
97
## @end enumerate
97
## @end enumerate
(-)octave-2.1.58/scripts/control/base/__bodquist__.m (-2 / +2 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{f}, @var{w}, @var{rsys}] =} __bodquist__ (@var{sys}, @var{w}, @var{out_idx}, @var{in_idx})
20
## @deftypefn {Function File} {[@var{f}, @var{w}, @var{rsys}] =} __bodquist__ (@var{sys}, @var{w}, @var{out_idx}, @var{in_idx})
21
## used internally by bode, nyquist; compute system frequency response.
21
## Used internally by @command{bode}, @command{nyquist}; compute system frequency response.
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## @table @var
24
## @table @var
Lines 45-51 Link Here
45
## @code{bode}, @code{nichols}, and @code{nyquist} share the same 
45
## @code{bode}, @code{nichols}, and @code{nyquist} share the same 
46
## introduction, so the common parts are
46
## introduction, so the common parts are
47
## in __bodquist__.  It contains the part that finds the number of arguments,
47
## in __bodquist__.  It contains the part that finds the number of arguments,
48
## determines whether or not the system is SISO, and computes the frequency
48
## determines whether or not the system is @acronym{SISO}, and computes the frequency
49
## response.  Only the way the response is plotted is different between the
49
## response.  Only the way the response is plotted is different between the
50
## these functions.
50
## these functions.
51
## @end deftypefn
51
## @end deftypefn
(-)octave-2.1.58/scripts/control/base/controldemo.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} controldemo ()
20
## @deftypefn {Function File} {} controldemo ()
21
## Controls toolbox demo.
21
## Control Systems Toolbox demo.
22
## @end deftypefn
22
## @end deftypefn
23
## @seealso{Demo programs: bddemo, frdemo, analdemo, moddmeo, rldemo}
23
## @seealso{Demo programs: bddemo, frdemo, analdemo, moddmeo, rldemo}
24
24
(-)octave-2.1.58/scripts/control/base/ctrb.m (-3 / +10 lines)
Lines 19-34 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} ctrb (@var{sys}, @var{b})
20
## @deftypefn {Function File} {} ctrb (@var{sys}, @var{b})
21
## @deftypefnx {Function File} {} ctrb (@var{a}, @var{b})
21
## @deftypefnx {Function File} {} ctrb (@var{a}, @var{b})
22
## Build controllability matrix
22
## Build controllability matrix:
23
## @iftex
24
## @tex
25
## $$ Q_s = [ ~ B ~ A\,B ~ A^2B ~ \ldots ~ A^{n-1}B ~ ] $$
26
## @end tex
27
## @end iftex
28
## @ifinfo
23
## @example
29
## @example
24
##              2       n-1
30
##              2       n-1
25
## Qs = [ B AB A B ... A   B ]
31
## Qs = [ B AB A B ... A   B ]
26
## @end example
32
## @end example
33
## @end ifinfo
27
##
34
##
28
## of a system data structure or the pair (@var{a}, @var{b}).
35
## of a system data structure or the pair (@var{a}, @var{b}).
29
##
36
##
30
## @code{ctrb} forms the controllability matrix.
37
## @command{ctrb} forms the controllability matrix.
31
## The numerical properties of @code{is_controllable}
38
## The numerical properties of @command{is_controllable}
32
## are much better for controllability tests.
39
## are much better for controllability tests.
33
## @end deftypefn
40
## @end deftypefn
34
41
(-)octave-2.1.58/scripts/control/base/damp.m (-1 / +1 lines)
Lines 19-25 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} damp (@var{p}, @var{tsam})
20
## @deftypefn {Function File} {} damp (@var{p}, @var{tsam})
21
## Displays eigenvalues, natural frequencies and damping ratios
21
## Displays eigenvalues, natural frequencies and damping ratios
22
## of the eigenvalues of a matrix @var{p} or the @math{A}-matrix of a
22
## of the eigenvalues of a matrix @var{p} or the @math{A} matrix of a
23
## system @var{p}, respectively.
23
## system @var{p}, respectively.
24
## If @var{p} is a system, @var{tsam} must not be specified.
24
## If @var{p} is a system, @var{tsam} must not be specified.
25
## If @var{p} is a matrix and @var{tsam} is specified, eigenvalues
25
## If @var{p} is a matrix and @var{tsam} is specified, eigenvalues
(-)octave-2.1.58/scripts/control/base/dare.m (-13 / +16 lines)
Lines 18-31 Link Here
18
## 02111-1307, USA.
18
## 02111-1307, USA.
19
19
20
## -*- texinfo -*-
20
## -*- texinfo -*-
21
## @deftypefn {Function File} {} dare (@var{a}, @var{b}, @var{q}, @var{r}, @var{opt})
21
## @deftypefn {Function File} {@var{x} =} dare (@var{a}, @var{b}, @var{q}, @var{r}, @var{opt})
22
##
22
##
23
## Return the solution, @var{x} of the discrete-time algebraic Riccati
23
## Return the solution, @var{x} of the discrete-time algebraic Riccati
24
## equation
24
## equation
25
## @iftex
25
## @iftex
26
## @tex
26
## @tex
27
## $$
27
## $$
28
## A^TXA - X + A^TXB (R + B^TXB)^{-1} B^TXA + Q = 0
28
## A^{ \rm T }XA - X + A^{ \rm T }XB \, (R + B^{ \rm T }XB)^{-1} B^{ \rm T }XA + Q = 0
29
## $$
29
## $$
30
## @end tex
30
## @end tex
31
## @end iftex
31
## @end iftex
Lines 39-71 Link Here
39
## @strong{Inputs}
39
## @strong{Inputs}
40
## @table @var
40
## @table @var
41
## @item a
41
## @item a
42
## @var{n} by @var{n}.
42
## @var{n} by @var{n} matrix;
43
##
43
##
44
## @item b
44
## @item b
45
## @var{n} by @var{m}.
45
## @var{n} by @var{m} matrix;
46
##
46
##
47
## @item q
47
## @item q
48
## @var{n} by @var{n}, symmetric positive semidefinite, or @var{p} by @var{n}.
48
## @var{n} by @var{n} matrix, symmetric positive semidefinite, or a @var{p} by @var{n} matrix,
49
## In the latter case @math{q:=q'*q} is used.
49
## In the latter case @math{q:=q'*q} is used;
50
##
50
##
51
## @item r
51
## @item r
52
## @var{m} by @var{m}, symmetric positive definite (invertible).
52
## @var{m} by @var{m}, symmetric positive definite (invertible);
53
##
53
##
54
## @item opt
54
## @item opt
55
## (optional argument; default = @code{"B"}):
55
## (optional argument; default = @code{"B"}):
56
## String option passed to @code{balance} prior to ordered @var{QZ} decomposition.
56
## String option passed to @code{balance} prior to ordered @var{QZ} decomposition.
57
## @end table
57
## @end table
58
##
58
##
59
## @strong{Outputs}
59
## @strong{Output}
60
## @var{x} solution of DARE.
60
## @table @var
61
## @item x
62
## solution of @acronym{DARE}.
63
## @end table
61
##
64
##
62
## @strong{Method}
65
## @strong{Method}
63
## Generalized eigenvalue approach (Van Dooren; SIAM J.
66
## Generalized eigenvalue approach (Van Dooren; @acronym{SIAM} J.
64
##  Sci. Stat. Comput., Vol 2) applied  to the appropriate symplectic pencil.
67
##  Sci. Stat. Comput., Vol 2) applied  to the appropriate symplectic pencil.
65
##
68
##
66
##  See also: Ran and Rodman, "Stable Hermitian Solutions of Discrete
69
##  See also: Ran and Rodman, @cite{Stable Hermitian Solutions of Discrete
67
##  Algebraic Riccati Equations," Mathematics of Control, Signals and
70
##  Algebraic Riccati Equations}, Mathematics of Control, Signals and
68
##  Systems, Vol 5, no 2 (1992)  pp 165-194.
71
##  Systems, Vol 5, no 2 (1992), pp 165--194.
69
##
72
##
70
## @end deftypefn
73
## @end deftypefn
71
## @seealso{balance and are}
74
## @seealso{balance and are}
(-)octave-2.1.58/scripts/control/base/dcgain.m (-1 / +1 lines)
Lines 21-27 Link Here
21
## Returns dc-gain matrix. If dc-gain is infinite
21
## Returns dc-gain matrix. If dc-gain is infinite
22
## an empty matrix is returned.
22
## an empty matrix is returned.
23
## The argument @var{tol} is an optional tolerance for the condition
23
## The argument @var{tol} is an optional tolerance for the condition
24
## number of the @math{A}-Matrix in @var{sys} (default @var{tol} = 1.0e-10)
24
## number of the @math{A} Matrix in @var{sys} (default @var{tol} = 1.0e-10)
25
## @end deftypefn
25
## @end deftypefn
26
26
27
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
27
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
(-)octave-2.1.58/scripts/control/base/DEMOcontrol.m (-3 / +3 lines)
Lines 19-25 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} DEMOcontrol
20
## @deftypefn {Function File} {} DEMOcontrol
21
## Octave Control Systems Toolbox demo/tutorial program.  The demo
21
## Octave Control Systems Toolbox demo/tutorial program.  The demo
22
## allows the user to select among several categories of OCST function:
22
## allows the user to select among several categories of @acronym{OCST} function:
23
## @example
23
## @example
24
## @group
24
## @group
25
## octave:1> DEMOcontrol
25
## octave:1> DEMOcontrol
Lines 36-42 Link Here
36
## @end group
36
## @end group
37
## @end example
37
## @end example
38
## Command examples are interactively run for users to observe the use
38
## Command examples are interactively run for users to observe the use
39
## of OCST functions.
39
## of @acronym{OCST} functions.
40
## @end deftypefn
40
## @end deftypefn
41
## @seealso{Demo Programs: bddemo.m, frdemo.m, analdemo.m,
41
## @seealso{Demo Programs: bddemo.m, frdemo.m, analdemo.m,
42
## moddmeo.m, rldemo.m}
42
## moddmeo.m, rldemo.m}
Lines 46-52 Link Here
46
46
47
function DEMOcontrol ()
47
function DEMOcontrol ()
48
48
49
  puts ("O C T A V E    C O N T R O L   S Y S T E M S   T O O L B O X")
49
  puts ("O C T A V E    C O N T R O L   S Y S T E M S   T O O L B O X");
50
50
51
  while (1)
51
  while (1)
52
52
(-)octave-2.1.58/scripts/control/base/dgram.m (-3 / +21 lines)
Lines 18-28 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} dgram (@var{a}, @var{b})
20
## @deftypefn {Function File} {} dgram (@var{a}, @var{b})
21
## Return controllability grammian of discrete time system
21
## Return controllability gramian of discrete time system
22
## @iftex
23
## @tex
24
## $$ x_{k+1} = a\,x_k + b\,u_k $$
25
## @end tex
26
## @end iftex
27
## @ifinfo
22
## @example
28
## @example
23
##   x(k+1) = a x(k) + b u(k)
29
##   x(k+1) = a x(k) + b u(k)
24
## @end example
30
## @end example
25
##
31
## @end ifinfo
32
## 
26
## @strong{Inputs}
33
## @strong{Inputs}
27
## @table @var
34
## @table @var
28
## @item a
35
## @item a
Lines 31-41 Link Here
31
## @var{n} by @var{m} matrix
38
## @var{n} by @var{m} matrix
32
## @end table
39
## @end table
33
##
40
##
34
## @strong{Outputs}
41
## @strong{Output}
42
## @table @var
43
## @item m 
44
## @var{n} by @var{n} matrix, satisfies
45
## @iftex
46
## @tex
47
## $$ a\,m\,a^{ \rm T } - m + b\,b^{ \rm T } = 0 $$
48
## @end tex
49
## @end iftex
50
## @ifinfo
35
## @var{m} (@var{n} by @var{n}) satisfies
51
## @var{m} (@var{n} by @var{n}) satisfies
36
## @example
52
## @example
37
##  a m a' - m + b*b' = 0
53
##  a m a' - m + b*b' = 0
38
## @end example
54
## @end example
55
## @end ifinfo
56
## @end table
39
## @end deftypefn
57
## @end deftypefn
40
58
41
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
59
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/base/dlqr.m (-2 / +2 lines)
Lines 37-43 Link Here
37
## @iftex
37
## @iftex
38
## @tex
38
## @tex
39
## $$
39
## $$
40
##  J = \sum x^T Q x + u^T R u
40
##  J = \sum x^{ \rm T } Q x + u^{ \rm T } R u
41
## $$
41
## $$
42
## @end tex
42
## @end tex
43
## @end iftex
43
## @end iftex
Lines 53-59 Link Here
53
## @iftex
53
## @iftex
54
## @tex
54
## @tex
55
## $$
55
## $$
56
##  J = \sum x^T Q x + u^T R u + 2 x^T Z u
56
##  J = \sum x^{ \rm T } Q x + u^{ \rm T } R u + 2 x^{ \rm T } Z u
57
## $$
57
## $$
58
## @end tex
58
## @end tex
59
## @end iftex
59
## @end iftex
(-)octave-2.1.58/scripts/control/base/dlyap.m (-5 / +31 lines)
Lines 23-47 Link Here
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## @table @var
24
## @table @var
25
##   @item a
25
##   @item a
26
##   @var{n} by @var{n} matrix
26
##   @var{n} by @var{n} matrix;
27
##   @item b
27
##   @item b
28
##   Matrix: @var{n} by @var{n}, @var{n} by @var{m}, or @var{p} by @var{n}.
28
##   Matrix: @var{n} by @var{n}, @var{n} by @var{m}, or @var{p} by @var{n}.
29
## @end table
29
## @end table
30
##
30
##
31
## @strong{Outputs}
31
## @strong{Output}
32
## @var{x}: matrix satisfying appropriate discrete time Lyapunov equation.
32
## @table @var
33
## @item x
34
## matrix satisfying appropriate discrete time Lyapunov equation.
35
## @end table
36
##
33
## Options:
37
## Options:
34
## @itemize @bullet
38
## @itemize @bullet
35
## @item @var{b} is square: solve @code{a x a' - x + b = 0}
39
## @item @var{b} is square: solve 
40
## @iftex
41
## @tex
42
## $$ a\,x\,a^{ \rm T } - x + b = 0 $$
43
## @end tex
44
## @end iftex
45
## @ifinfo
46
## @code{a x a' - x + b = 0}
47
## @end ifinfo
36
## @item @var{b} is not square: @var{x} satisfies either
48
## @item @var{b} is not square: @var{x} satisfies either
49
## @iftex
50
## @tex
51
## $$ a\,x\,a^{ \rm T } - x + b\,b^{ \rm T } = 0 $$
52
## @end tex
53
## @end iftex
54
## @ifinfo
37
## @example
55
## @example
38
## a x a' - x + b b' = 0
56
## a x a' - x + b b' = 0
39
## @end example
57
## @end example
58
## @end ifinfo
40
## @noindent
59
## @noindent
41
## or
60
## or
61
## @iftex
62
## @tex
63
## $$ a^{ \rm T }x\,a - x + b^{ \rm T }b = 0, $$
64
## @end tex
65
## @end iftex
66
## @ifinfo
42
## @example
67
## @example
43
## a' x a - x + b' b = 0,
68
## a' x a - x + b' b = 0,
44
## @end example
69
## @end example
70
## @end ifinfo
45
## @noindent
71
## @noindent
46
## whichever is appropriate.
72
## whichever is appropriate.
47
## @end itemize
73
## @end itemize
Lines 54-60 Link Here
54
##
80
##
55
## Column-by-column solution method as suggested in
81
## Column-by-column solution method as suggested in
56
## Hammarling, @cite{Numerical Solution of the Stable, Non-Negative
82
## Hammarling, @cite{Numerical Solution of the Stable, Non-Negative
57
## Definite Lyapunov Equation}, IMA Journal of Numerical Analysis, Volume
83
## Definite Lyapunov Equation}, @acronym{IMA} Journal of Numerical Analysis, Volume
58
## 2, pages 303--323 (1982).
84
## 2, pages 303--323 (1982).
59
## @end deftypefn
85
## @end deftypefn
60
86
(-)octave-2.1.58/scripts/control/base/dre.m (-15 / +21 lines)
Lines 17-23 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{tvals}, @var{plist}] =} dre (@var{sys}, @var{q}, @var{r}, @var{qf}, @var{t0}, @var{tf}, @var{ptol}, @var{maxits});
20
## @deftypefn {Function File} {[@var{tvals}, @var{plist}] =} dre (@var{sys}, @var{q}, @var{r}, @var{qf}, @var{t0}, @var{tf}, @var{ptol}, @var{maxits})
21
## Solve the differential Riccati equation
21
## Solve the differential Riccati equation
22
## @ifinfo
22
## @ifinfo
23
## @example
23
## @example
Lines 27-46 Link Here
27
## @end ifinfo
27
## @end ifinfo
28
## @iftex
28
## @iftex
29
## @tex
29
## @tex
30
## $$ -{dP \over dt} = A^T P+PA-PBR^{-1}B^T P+Q $$
30
## $$ -{dP \over dt} = A^{ \rm T } P+PA-PBR^{-1}B^{ \rm T } P+Q $$
31
## $$ P(t_f) = Qf $$
31
## $$ P(t_f) = Q_f $$
32
## @end tex
32
## @end tex
33
## @end iftex
33
## @end iftex
34
## for the LTI system sys.  Solution of standard LTI
34
## for the @acronym{LTI} system sys.  Solution of 
35
## state feedback optimization
35
## standard @acronym{LTI} state feedback optimization
36
## @ifinfo
36
## @ifinfo
37
## @example
37
## @example
38
##   min \int_@{t_0@}^@{t_f@} x' Q x + u' R u dt + x(t_f)' Qf x(t_f)
38
##   min int(t0, tf) ( x' Q x + u' R u ) dt + x(tf)' Qf x(tf)
39
## @end example
39
## @end example
40
## @end ifinfo
40
## @end ifinfo
41
## @iftex
41
## @iftex
42
## @tex
42
## @tex
43
## $$ \min \int_{t_0}^{t_f} x^T Q x + u^T R u dt + x(t_f)^T Qf x(t_f) $$
43
## $$ \min \int_{t_0}^{t_f} x^{ \rm T } Q x + u^{ \rm T } R u dt + x(t_f)^{ \rm T } Q_f x(t_f) $$
44
## @end tex
44
## @end tex
45
## @end iftex
45
## @end iftex
46
## optimal input is
46
## optimal input is
Lines 51-57 Link Here
51
## @end ifinfo
51
## @end ifinfo
52
## @iftex
52
## @iftex
53
## @tex
53
## @tex
54
## $$ u = - R^{-1} B^T P(t) x $$
54
## $$ u = - R^{-1} B^{ \rm T } P(t) x $$
55
## @end tex
55
## @end tex
56
## @end iftex
56
## @end iftex
57
## @strong{Inputs}
57
## @strong{Inputs}
Lines 77-91 Link Here
77
## @item tvals
77
## @item tvals
78
## time values at which @var{p}(@var{t}) is computed
78
## time values at which @var{p}(@var{t}) is computed
79
## @item plist
79
## @item plist
80
## list values of @var{p}(@var{t}); @var{plist} @{ @var{ii} @}
80
## list values of @var{p}(@var{t}); @var{plist} @{ @var{i} @}
81
## is @var{p}(@var{tvals}(@var{ii})).
81
## is @var{p}(@var{tvals}(@var{i}))
82
##
82
## @end table
83
## @item tvals
83
## @var{tvals} is selected so that:
84
## @iftex
85
## @tex
86
## $$ \Vert plist_{i} - plist_{i-1} \Vert < ptol $$
87
## @end tex
88
## @end iftex
89
## @ifinfo
84
## @example
90
## @example
85
## is selected so that || Plist@{ii@} - Plist@{ii-1@} || < Ptol
91
## || Plist@{i@} - Plist@{i-1@} || < Ptol
86
## for ii=2:length(tvals)
87
## @end example
92
## @end example
88
## @end table
93
## @end ifinfo
94
## for every @var{i} between 2 and length(@var{tvals}).
89
## @end deftypefn
95
## @end deftypefn
90
96
91
function [tvals, Plist] = dre (sys, Q, R, Qf, t0, tf, Ptol, maxits)
97
function [tvals, Plist] = dre (sys, Q, R, Qf, t0, tf, Ptol, maxits)
(-)octave-2.1.58/scripts/control/base/frdemo.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} frdemo ()
20
## @deftypefn {Function File} {} frdemo ()
21
## Octave Controls toolbox demo: Frequency Response demo
21
## Octave Control Toolbox demo: Frequency Response demo.
22
## @end deftypefn
22
## @end deftypefn
23
23
24
## Author: David Clem
24
## Author: David Clem
(-)octave-2.1.58/scripts/control/base/freqchkw.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} freqchkw (@var{w})
20
## @deftypefn {Function File} {} freqchkw (@var{w})
21
## Used by @code{__freqresp__} to check that input frequency vector @var{w}
21
## Used by @command{__freqresp__} to check that input frequency vector @var{w}
22
## is valid.
22
## is valid.
23
## Returns boolean value.
23
## Returns boolean value.
24
## @end deftypefn
24
## @end deftypefn
(-)octave-2.1.58/scripts/control/base/__freqresp__.m (-3 / +3 lines)
Lines 18-25 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} __freqresp__ (@var{sys}, @var{USEW}, @var{w})
20
## @deftypefn {Function File} {} __freqresp__ (@var{sys}, @var{USEW}, @var{w})
21
## Frequency response function - used internally by @code{bode}, @code{nyquist}.
21
## Frequency response function - used internally by @command{bode}, @command{nyquist}.
22
## minimal argument checking; "do not attempt to do this at home"
22
## minimal argument checking; ``do not attempt to do this at home''.
23
##
23
##
24
## @strong{Inputs}
24
## @strong{Inputs}
25
## @table @var
25
## @table @var
Lines 33-39 Link Here
33
## @strong{Outputs}
33
## @strong{Outputs}
34
## @table @var
34
## @table @var
35
## @item @var{out}
35
## @item @var{out}
36
## vector of finite @math{G(j*w)} entries (or @math{||G(j*w)||} for MIMO)
36
## vector of finite @math{G(j*w)} entries (or @math{||G(j*w)||} for @acronym{MIMO})
37
## @item w
37
## @item w
38
## vector of corresponding frequencies
38
## vector of corresponding frequencies
39
## @end table
39
## @end table
(-)octave-2.1.58/scripts/control/base/gram.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} gram (@var{a}, @var{b})
20
## @deftypefn {Function File} {} gram (@var{a}, @var{b})
21
## Return controllability grammian @var{m} of the continuous time system
21
## Return controllability gramian @var{m} of the continuous time system
22
## @math{dx/dt = a x + b u}.
22
## @math{dx/dt = a x + b u}.
23
##
23
##
24
## @var{m} satisfies @math{a m + m a' + b b' = 0}.
24
## @var{m} satisfies @math{a m + m a' + b b' = 0}.
(-)octave-2.1.58/scripts/control/base/impulse.m (-3 / +8 lines)
Lines 36-47 Link Here
36
## the number of data values.
36
## the number of data values.
37
##
37
##
38
## Both parameters @var{tstop} and @var{n} can be omitted and will be
38
## Both parameters @var{tstop} and @var{n} can be omitted and will be
39
## computed from the eigenvalues of the A-Matrix.
39
## computed from the eigenvalues of the A Matrix.
40
## @end table
40
## @end table
41
## @strong{Outputs}
41
## @strong{Outputs}
42
## @var{y}, @var{t}: impulse response
42
## @table @var
43
## @item y
44
## Values of the impulse response.
45
## @item t
46
## Times of the impulse response.
47
## @end table
43
## @end deftypefn
48
## @end deftypefn
44
## @seealso{step and __stepimp__}
49
## @seealso{step, __stepimp__}
45
50
46
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
51
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
47
## Created: October 2, 1997
52
## Created: October 2, 1997
(-)octave-2.1.58/scripts/control/base/lqg.m (-9 / +9 lines)
Lines 38-46 Link Here
38
## intensities of independent Gaussian noise processes (as above)
38
## intensities of independent Gaussian noise processes (as above)
39
## @item  q
39
## @item  q
40
## @itemx  r
40
## @itemx  r
41
## state, control weighting respectively.  Control ARE is
41
## state, control weighting respectively.  Control @acronym{ARE} is
42
## @item  in_idx
42
## @item  in_idx
43
## names or indices of controlled inputs (see @code{sysidx}, @code{cellidx})
43
## names or indices of controlled inputs (see @command{sysidx}, @command{cellidx})
44
##
44
##
45
## default: last dim(R) inputs are assumed to be controlled inputs, all
45
## default: last dim(R) inputs are assumed to be controlled inputs, all
46
## others are assumed to be noise inputs.
46
## others are assumed to be noise inputs.
Lines 48-64 Link Here
48
## @strong{Outputs}
48
## @strong{Outputs}
49
## @table @var
49
## @table @var
50
## @item    k
50
## @item    k
51
## system data structure format LQG optimal controller (Obtain A,B,C
51
## system data structure format @acronym{LQG} optimal controller (Obtain A, B, C
52
## matrices with @code{sys2ss}, @code{sys2tf}, or @code{sys2zp} as
52
## matrices with @command{sys2ss}, @command{sys2tf}, or @command{sys2zp} as
53
## appropriate)
53
## appropriate).
54
## @item    p1
54
## @item    p1
55
## Solution of control (state feedback) algebraic Riccati equation
55
## Solution of control (state feedback) algebraic Riccati equation.
56
## @item    q1
56
## @item    q1
57
## Solution of estimation algebraic Riccati equation
57
## Solution of estimation algebraic Riccati equation.
58
## @item    ee
58
## @item    ee
59
## estimator poles
59
## Estimator poles.
60
## @item    es
60
## @item    es
61
## controller poles
61
## Controller poles.
62
## @end table
62
## @end table
63
## @end deftypefn
63
## @end deftypefn
64
## @seealso{h2syn, lqe, and lqr}
64
## @seealso{h2syn, lqe, and lqr}
(-)octave-2.1.58/scripts/control/base/lqr.m (-4 / +4 lines)
Lines 39-45 Link Here
39
## @iftex
39
## @iftex
40
## @tex
40
## @tex
41
## $$
41
## $$
42
##  J = \int_0^\infty x^T Q x + u^T R u
42
##  J = \int_0^\infty x^{ \rm T } Q x + u^{ \rm T } R u
43
## $$
43
## $$
44
## @end tex
44
## @end tex
45
## @end iftex
45
## @end iftex
Lines 59-65 Link Here
59
## @iftex
59
## @iftex
60
## @tex
60
## @tex
61
## $$
61
## $$
62
##  J = \int_0^\infty x^T Q x + u^T R u + 2 x^T Z u
62
##  J = \int_0^\infty x^{ \rm T } Q x + u^{ \rm T } R u + 2 x^{ \rm T } Z u
63
## $$
63
## $$
64
## @end tex
64
## @end tex
65
## @end iftex
65
## @end iftex
Lines 107-114 Link Here
107
## @end table
107
## @end table
108
##
108
##
109
## @strong{Reference}
109
## @strong{Reference}
110
## Anderson and Moore, OPTIMAL CONTROL: LINEAR QUADRATIC METHODS,
110
## Anderson and Moore, @cite{Optimal control: linear quadratic methods},
111
## Prentice-Hall, 1990, pp. 56-58
111
## Prentice-Hall, 1990, pp. 56--58.
112
## @end deftypefn
112
## @end deftypefn
113
113
114
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
114
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/base/lsim.m (-13 / +11 lines)
Lines 17-37 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} lsim (@var{sys}, @var{u}, @var{t}, @var{x0})
20
## @deftypefn {Function File} {[@var{y}, @var{x}] =} lsim (@var{sys}, @var{u}, @var{t}, @var{x0})
21
## Produce output for a linear simulation of a system
21
## Produce output for a linear simulation of a system; produces 
22
## a plot for the output of the system, @var{sys}.
22
##
23
##
23
## Produces a plot for the output of the system, sys.
24
## @var{u} is an array that contains the system's inputs.  Each row in @var{u}
25
## corresponds to a different time step.  Each column in @var{u} corresponds to a
26
## different input.  @var{t} is an array that contains the time index of the
27
## system; @var{t} should be regularly spaced.  If initial conditions are required
28
## on the system, the @var{x0} vector should be added to the argument list.
24
##
29
##
25
## U is an array that contains the system's inputs.  Each row in u
30
## When the lsim function is invoked a plot is not displayed; 
26
## corresponds to a different time step.  Each column in u corresponds to a
31
## however, the data is returned in @var{y} (system output)
27
## different input.  T is an array that contains the time index of the
32
## and @var{x} (system states).
28
## system.  T should be regularly spaced.  If initial conditions are required
29
## on the system, the x0 vector should be added to the argument list.
30
##
31
## When the lsim function is invoked with output parameters:
32
## [y,x] = lsim(sys,u,t,[x0])
33
## a plot is not displayed, however, the data is returned in y = system output
34
## and x = system states.
35
## @end deftypefn
33
## @end deftypefn
36
34
37
## Author: David Clem
35
## Author: David Clem
(-)octave-2.1.58/scripts/control/base/ltifr.m (-6 / +17 lines)
Lines 17-25 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} ltifr (@var{a}, @var{b}, @var{w})
20
## @deftypefn {Function File} {@var{out} =} ltifr (@var{a}, @var{b}, @var{w})
21
## @deftypefnx {Function File} {} ltifr (@var{sys}, @var{w})
21
## @deftypefnx {Function File} {@var{out} =} ltifr (@var{sys}, @var{w})
22
## Linear time invariant frequency response of single input systems
22
## Linear time invariant frequency response of single-input systems.
23
##
23
## @strong{Inputs}
24
## @strong{Inputs}
24
## @table @var
25
## @table @var
25
## @item a
26
## @item a
Lines 30-41 Link Here
30
## @item w
31
## @item w
31
## vector of frequencies
32
## vector of frequencies
32
## @end table
33
## @end table
33
## @strong{Outputs}
34
## @strong{Output}
34
## @var{out}
35
## @table @var
36
## @item out
37
## frequency response, that is:
38
## @end table
39
## @iftex
40
## @tex
41
## $$ G(j\omega) = (j\omega\,I-A)^{-1}B $$
42
## @end tex
43
## @end iftex
44
## @ifinfo
35
## @example
45
## @example
36
##                            -1
46
##                            -1
37
##             G(s) = (jw I-A) B
47
##              G(s) = (jw I-A) B
38
## @end example
48
## @end example
49
## @end ifinfo
39
## for complex frequencies @math{s = jw}.
50
## for complex frequencies @math{s = jw}.
40
## @end deftypefn
51
## @end deftypefn
41
52
(-)octave-2.1.58/scripts/control/base/lyap.m (-5 / +5 lines)
Lines 21-27 Link Here
21
## @deftypefn {Function File} {} lyap (@var{a}, @var{b}, @var{c})
21
## @deftypefn {Function File} {} lyap (@var{a}, @var{b}, @var{c})
22
## @deftypefnx {Function File} {} lyap (@var{a}, @var{b})
22
## @deftypefnx {Function File} {} lyap (@var{a}, @var{b})
23
## Solve the Lyapunov (or Sylvester) equation via the Bartels-Stewart
23
## Solve the Lyapunov (or Sylvester) equation via the Bartels-Stewart
24
## algorithm (Communications of the ACM, 1972).
24
## algorithm (Communications of the @acronym{ACM}, 1972).
25
##
25
##
26
## If @var{a}, @var{b}, and @var{c} are specified, then @code{lyap} returns
26
## If @var{a}, @var{b}, and @var{c} are specified, then @code{lyap} returns
27
## the solution of the  Sylvester equation
27
## the solution of the  Sylvester equation
Lines 35-45 Link Here
35
##     a x + x b + c = 0
35
##     a x + x b + c = 0
36
## @end example
36
## @end example
37
## @end ifinfo
37
## @end ifinfo
38
## If only @code{(a, b)} are specified, then @code{lyap} returns the
38
## If only @code{(a, b)} are specified, then @command{lyap} returns the
39
## solution of the Lyapunov equation
39
## solution of the Lyapunov equation
40
## @iftex
40
## @iftex
41
## @tex
41
## @tex
42
##   $$ A^T X + X A + B = 0 $$
42
##   $$ A^{ \rm T } X + X A + B = 0 $$
43
## @end tex
43
## @end tex
44
## @end iftex
44
## @end iftex
45
## @ifinfo
45
## @ifinfo
Lines 50-56 Link Here
50
## If @var{b} is not square, then @code{lyap} returns the solution of either
50
## If @var{b} is not square, then @code{lyap} returns the solution of either
51
## @iftex
51
## @iftex
52
## @tex
52
## @tex
53
##   $$ A^T X + X A + B^T B = 0 $$
53
##   $$ A^{ \rm T } X + X A + B^{ \rm T } B = 0 $$
54
## @end tex
54
## @end tex
55
## @end iftex
55
## @end iftex
56
## @ifinfo
56
## @ifinfo
Lines 62-68 Link Here
62
## or
62
## or
63
## @iftex
63
## @iftex
64
## @tex
64
## @tex
65
##   $$ A X + X A^T + B B^T = 0 $$
65
##   $$ A X + X A^{ \rm T } + B B^{ \rm T } = 0 $$
66
## @end tex
66
## @end tex
67
## @end iftex
67
## @end iftex
68
## @ifinfo
68
## @ifinfo
(-)octave-2.1.58/scripts/control/base/nichols.m (-28 / +58 lines)
Lines 20-54 Link Here
20
## @deftypefn {Function File} {[@var{mag}, @var{phase}, @var{w}] =} nichols (@var{sys}, @var{w}, @var{outputs}, @var{inputs})
20
## @deftypefn {Function File} {[@var{mag}, @var{phase}, @var{w}] =} nichols (@var{sys}, @var{w}, @var{outputs}, @var{inputs})
21
## Produce Nichols plot of a system.
21
## Produce Nichols plot of a system.
22
##
22
##
23
## inputs:
23
## @strong{Inputs}
24
##   sys: system data structure (must be either purely continuous or discrete;
24
## @table @var
25
##       see is_digital)
25
## @item sys
26
##   w: frequency values for evaluation.
26
## System data structure (must be either purely continuous or discrete; 
27
##      if sys is continuous, then nichols evaluates G(jw)
27
## see @command{is_digital}).
28
##      if sys is discrete, then nichols evaluates G(exp(jwT)), where T=sys.tsam
28
## @item w
29
##         (the system sampling time)
29
## Frequency values for evaluation.
30
##      default: the default frequency range is selected as follows: (These
30
## @itemize
31
##        steps are NOT performed if w is specified)
31
## @item if sys is continuous, then nichols evaluates @math{G(jw)}.
32
##          (1) via routine __bodquist__, isolate all poles and zeros away from
32
## @item if sys is discrete, then nichols evaluates @math{G(exp(jwT))}, 
33
##              w=0 (jw=0 or exp(jwT)=1) and select the frequency
33
## where @var{T}=@var{sys}. @var{tsam} is the system sampling time.
34
##             range based on the breakpoint locations of the frequencies.
34
## @item the default frequency range is selected as follows (These
35
##          (2) if sys is discrete time, the frequency range is limited
35
##        steps are @strong{not} performed if @var{w} is specified):
36
##              to jwT in [0,2p*pi]
36
## @enumerate
37
##          (3) A "smoothing" routine is used to ensure that the plot phase does
37
## @item via routine @command{__bodquist__}, isolate all poles and zeros away from
38
##              not change excessively from point to point and that singular
38
## @var{w}=0 (@math{jw=0} or @math{exp(jwT)=1}) and select the frequency range 
39
##              points (e.g., crossovers from +/- 180) are accurately shown.
39
## based on the breakpoint locations of the frequencies.
40
##   outputs, inputs: the names or indices of the output(s) and input(s) 
40
## @item if sys is discrete time, the frequency range is limited to jwT in 
41
##     to be used in the frequency response; see sysprune.
41
## @iftex
42
## outputs:
42
## @tex
43
##    mag, phase: the magnitude and phase of the frequency response
43
## $ [0,~2p\,\pi] $.
44
##       G(jw) or G(exp(jwT)) at the selected frequency values.
44
## @end tex
45
##    w: the vector of frequency values used
45
## @end iftex
46
## If no output arguments are given, nichols plots the results to the screen.
46
## @ifinfo
47
## Descriptive labels are automatically placed.  See xlabel, ylable, title,
47
## [0,2p*pi].
48
## and replot.
48
## @end ifinfo
49
## @item A ``smoothing'' routine is used to ensure that the plot phase does
50
## not change excessively from point to point and that singular points 
51
## (e.g., crossovers from +/- 180) are accurately shown.
52
## @end enumerate
53
## @end itemize
54
## @item outputs
55
## @itemx inputs
56
## the names or indices of the output(s) and input(s) to be used in the 
57
## frequency response; see @command{sysprune}.
58
## @end table
59
## @strong{Outputs}
60
## @table @var
61
## @item mag
62
## @itemx phase
63
## The magnitude and phase of the frequency response @math{G(jw)} or 
64
## @math{G(exp(jwT))} at the selected frequency values.
65
## @item w
66
## The vector of frequency values used.
67
## @end table
68
## If no output arguments are given, @command{nichols} plots the results to the screen.
69
## Descriptive labels are automatically placed. See @command{xlabel}, 
70
## @command{ylabel}, @command{title}, and @command{replot}.
49
##
71
##
50
## Note: if the requested plot is for an MIMO system, mag is set to
72
## Note: if the requested plot is for an @acronym{MIMO} system, @var{mag} is set to
51
## ||G(jw)|| or ||G(exp(jwT))|| and phase information is not computed.
73
## @iftex
74
## @tex
75
## $ \Vert G(jw) \Vert $ or $ \Vert G( {\rm exp}(jwT) \Vert $
76
## @end tex
77
## @end iftex
78
## @ifinfo
79
## ||G(jw)|| or ||G(exp(jwT))||
80
## @end ifinfo
81
## and phase information is not computed.
52
## @end deftypefn
82
## @end deftypefn
53
83
54
function [mag, phase, w] = nichols (sys, w, outputs, inputs)
84
function [mag, phase, w] = nichols (sys, w, outputs, inputs)
(-)octave-2.1.58/scripts/control/base/nyquist.m (-17 / +22 lines)
Lines 23-44 Link Here
23
## plot is printed to the screen.
23
## plot is printed to the screen.
24
##
24
##
25
## Compute the frequency response of a system.
25
## Compute the frequency response of a system.
26
##
26
## @strong{Inputs} (pass as empty to get default values)
27
## @strong{Inputs} (pass as empty to get default values)
27
## @table @var
28
## @table @var
28
## @item sys
29
## @item sys
29
## system data structure (must be either purely continuous or discrete;
30
## system data structure (must be either purely continuous or discrete;
30
## see is_digital)
31
## see @code{is_digital})
31
## @item w
32
## @item w
32
## frequency values for evaluation.
33
## frequency values for evaluation.
33
## if sys is continuous, then bode evaluates @math{G(jw)}
34
## If sys is continuous, then bode evaluates @math{G(@var{jw})}; 
34
## if sys is discrete, then bode evaluates @math{G(exp(jwT))}, where
35
## if sys is discrete, then bode evaluates @math{G(exp(@var{jwT}))},
35
## @math{T} is the system sampling time.
36
## where @var{T} is the system sampling time.
36
## @item default
37
## @item default
37
## the default frequency range is selected as follows: (These
38
## the default frequency range is selected as follows: (These
38
## steps are NOT performed if @var{w} is specified)
39
## steps are @strong{not} performed if @var{w} is specified)
39
## @end table
40
## @enumerate
40
## @enumerate
41
## @item via routine __bodquist__, isolate all poles and zeros away from
41
## @item via routine @command{__bodquist__}, isolate all poles and zeros away from
42
## @var{w}=0 (@var{jw}=0 or @math{exp(@var{jwT})=1}) and select the frequency
42
## @var{w}=0 (@var{jw}=0 or @math{exp(@var{jwT})=1}) and select the frequency
43
## range based on the breakpoint locations of the frequencies.
43
## range based on the breakpoint locations of the frequencies.
44
## @item if @var{sys} is discrete time, the frequency range is limited
44
## @item if @var{sys} is discrete time, the frequency range is limited
Lines 47-63 Link Here
47
## [0,2p*pi]
47
## [0,2p*pi]
48
## @end ifinfo
48
## @end ifinfo
49
## @iftex
49
## @iftex
50
## $[0,2p*\pi]$
50
## @tex
51
## $ [ 0,2 \, p \pi ] $
52
## @end tex
51
## @end iftex
53
## @end iftex
52
## @item A "smoothing" routine is used to ensure that the plot phase does
54
## @item A ``smoothing'' routine is used to ensure that the plot phase does
53
## not change excessively from point to point and that singular
55
## not change excessively from point to point and that singular
54
## points (e.g., crossovers from +/- 180) are accurately shown.
56
## points (e.g., crossovers from +/- 180) are accurately shown.
55
## @end enumerate
57
## @end enumerate
56
## outputs, inputs: names or indices of the output(s) and input(s) to be 
57
## used in the frequency response; see sysprune.
58
##
59
## @strong{Inputs} (pass as empty to get default values)
60
## @table @var
61
## @item   atol
58
## @item   atol
62
## for interactive nyquist plots: atol is a change-in-slope tolerance
59
## for interactive nyquist plots: atol is a change-in-slope tolerance
63
## for the of asymptotes (default = 0; 1e-2 is a good choice).  This allows
60
## for the of asymptotes (default = 0; 1e-2 is a good choice).  This allows
Lines 70-76 Link Here
70
## @itemx   imagp
67
## @itemx   imagp
71
## the real and imaginary parts of the frequency response
68
## the real and imaginary parts of the frequency response
72
## @math{G(jw)} or @math{G(exp(jwT))} at the selected frequency values.
69
## @math{G(jw)} or @math{G(exp(jwT))} at the selected frequency values.
73
## @item    w
70
## @item w
74
## the vector of frequency values used
71
## the vector of frequency values used
75
## @end table
72
## @end table
76
##
73
##
Lines 79-87 Link Here
79
## interactively if they wish to zoom in (remove asymptotes)
76
## interactively if they wish to zoom in (remove asymptotes)
80
## Descriptive labels are automatically placed.
77
## Descriptive labels are automatically placed.
81
##
78
##
82
## Note: if the requested plot is for an MIMO system, a warning message is
79
## Note: if the requested plot is for an @acronym{MIMO} system, a warning message is
83
## presented; the returned information is of the magnitude
80
## presented; the returned information is of the magnitude
84
## ||G(jw)|| or ||G(exp(jwT))|| only; phase information is not computed.
81
## @iftex
82
## @tex
83
## $ \Vert G(jw) \Vert $ or $ \Vert G( {\rm exp}(jwT) \Vert $
84
## @end tex
85
## @end iftex
86
## @ifinfo
87
## ||G(jw)|| or ||G(exp(jwT))||
88
## @end ifinfo
89
## only; phase information is not computed.
85
## @end deftypefn
90
## @end deftypefn
86
91
87
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
92
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/base/obsv.m (-6 / +16 lines)
Lines 17-24 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
##@deftypefn {Function File} {} obsv (@var{sys}, @var{c})
20
## @deftypefn {Function File} {} obsv (@var{sys}, @var{c})
21
## Build observability matrix
21
## @deftypefnx {Function File} {} obsv (@var{a}, @var{c})
22
## Build observability matrix:
23
## @iftex
24
## @tex
25
## $$ Q_b = \left[ \matrix{  C       \cr
26
##                           C\,A    \cr
27
##                           C\,A^2  \cr
28
##                           \vdots  \cr
29
##                           C\,A^{n-1} } \right ] $$
30
## @end tex
31
## @end iftex
32
## @ifinfo
22
## @example
33
## @example
23
## @group
34
## @group
24
##      | C        |
35
##      | C        |
Lines 28-38 Link Here
28
##      | CA^(n-1) |
39
##      | CA^(n-1) |
29
## @end group
40
## @end group
30
## @end example
41
## @end example
31
## of a system data structure or the pair (A, C).
42
## @end ifinfo
43
## of a system data structure or the pair (@var{a}, @var{c}).
32
##
44
##
33
## Note: @code{obsv()} forms the observability matrix.
45
## The numerical properties of @command{is_observable}
34
##
35
## The numerical properties of is_observable()
36
## are much better for observability tests.
46
## are much better for observability tests.
37
## @end deftypefn
47
## @end deftypefn
38
48
(-)octave-2.1.58/scripts/control/base/place.m (-4 / +4 lines)
Lines 17-26 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} place (@var{sys}, @var{p})
20
## @deftypefn {Function File} {@var{K} =} place (@var{sys}, @var{p})
21
## Computes the matrix  K such that if the state
21
## Computes the matrix @var{K} such that if the state
22
## is feedback with gain K, then the eigenvalues  of the closed loop
22
## is feedback with gain @var{K}, then the eigenvalues  of the closed loop
23
## system (i.e. A-BK) are those specified in the vector @var{p}.
23
## system (i.e. @math{A-BK}) are those specified in the vector @var{p}.
24
##
24
##
25
## Version: Beta (May-1997): If you have any comments, please let me know.
25
## Version: Beta (May-1997): If you have any comments, please let me know.
26
## (see the file place.m for my address)
26
## (see the file place.m for my address)
(-)octave-2.1.58/scripts/control/base/pzmap.m (-5 / +13 lines)
Lines 17-31 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{zer}, @var{pol}]=} pzmap (@var{sys})
20
## @deftypefn {Function File} {[@var{zer}, @var{pol}] =} pzmap (@var{sys})
21
## Plots the zeros and poles of a system in the complex plane.
21
## Plots the zeros and poles of a system in the complex plane.
22
## @strong{Inputs}
22
##
23
## @var{sys} system data structure
23
## @strong{Input}
24
## @table @var
25
## @item sys
26
## System data structure.
27
## @end table
24
##
28
##
25
## @strong{Outputs}
29
## @strong{Outputs}
30
## @table @var
31
## @item pol
32
## @item zer
26
## if omitted, the poles and zeros are plotted on the screen.
33
## if omitted, the poles and zeros are plotted on the screen.
27
## otherwise, pol, zer are returned as the system poles and zeros.
34
## otherwise, @var{pol} and @var{zer} are returned as the 
28
## (see sys2zp for a preferable function call)
35
## system poles and zeros (see @command{sys2zp} for a preferable function call).
36
## @end table
29
## @end deftypefn
37
## @end deftypefn
30
38
31
function [zer, pol]=pzmap (sys)
39
function [zer, pol]=pzmap (sys)
(-)octave-2.1.58/scripts/control/base/rldemo.m (-3 / +3 lines)
Lines 17-25 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
##@deftypefn {Function File} {} rldemo (@var{inputs})
20
## @deftypefn {Function File} {} rldemo (@var{inputs})
21
##Octave Controls toolbox demo: Root Locus demo
21
## Octave Control toolbox demo: Root Locus demo.
22
##@end deftypefn
22
## @end deftypefn
23
23
24
## Author: David Clem
24
## Author: David Clem
25
## Created: August 15, 1994
25
## Created: August 15, 1994
(-)octave-2.1.58/scripts/control/base/rlocus.m (-12 / +27 lines)
Lines 17-41 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} rlocus (@var{inputs})
20
## @deftypefn {Function File} {[@var{rldata}, @var{k}] =} rlocus (@var{sys}[, @var{increment}, @var{min_k}, @var{max_k}])
21
## @format
22
## [rldata, k] = rlocus(sys[,increment,min_k,max_k])
23
## Displays root locus plot of the specified SISO system.
24
##
21
##
22
## Displays root locus plot of the specified @acronym{SISO} system.
23
## @example
24
## @group
25
##        -----   ---     --------
25
##        -----   ---     --------
26
##    --->| + |---|k|---->| SISO |----------->
26
##    --->| + |---|k|---->| SISO |----------->
27
##        -----   ---     --------        |
27
##        -----   ---     --------        |
28
##        - ^                             |
28
##        - ^                             |
29
##          |_____________________________|
29
##          |_____________________________|
30
## @end group
31
## @end example
30
##
32
##
31
## inputs: sys = system data structure
33
## @strong{Inputs}
32
## min_k, max_k,increment: minimum, maximum values of k and
34
## @table @var
33
## the increment used in computing gain values
35
## @item sys
34
## Outputs: plots the root locus to the screen.
36
## system data structure
35
## rldata: Data points plotted column 1: real values, column 2: imaginary
37
## @item min_k
36
## values)
38
## Minimum value of @var{k}
37
## k: gains for real axis break points.
39
## @item max_k
38
## @end format
40
## Maximum value of @var{k}
41
## @item increment
42
## The increment used in computing gain values
43
## @end table
44
##
45
## @strong{Outputs}
46
##
47
## Plots the root locus to the screen.
48
## @table @var 
49
## @item rldata
50
## Data points plotted: in column 1 real values, in column 2 the imaginary values.
51
## @item k
52
## Gains for real axis break points.
53
## @end table
39
## @end deftypefn
54
## @end deftypefn
40
55
41
## Author: David Clem
56
## Author: David Clem
(-)octave-2.1.58/scripts/control/base/__stepimp__.m (-6 / +6 lines)
Lines 20-34 Link Here
20
## @deftypefn {Function File} {[@var{y}, @var{t}] =} __stepimp__ (@var{sitype}, @var{sys} [, @var{inp}, @var{tstop}, @var{n}])
20
## @deftypefn {Function File} {[@var{y}, @var{t}] =} __stepimp__ (@var{sitype}, @var{sys} [, @var{inp}, @var{tstop}, @var{n}])
21
## Impulse or step response for a linear system.
21
## Impulse or step response for a linear system.
22
## The system can be discrete or multivariable (or both).
22
## The system can be discrete or multivariable (or both).
23
## This m-file contains the "common code" of step and impulse.
23
## This m-file contains the ``common code'' of step and impulse.
24
##
24
##
25
## Produces a plot or the response data for system sys.
25
## Produces a plot or the response data for system @var{sys}.
26
##
26
##
27
## Limited argument checking; "do not attempt to do this at home".
27
## Limited argument checking; ``do not attempt to do this at home''.
28
## Used internally in @code{impulse}, @code{step}. Use @code{step}
28
## Used internally in @command{impulse}, @command{step}. Use @command{step}
29
## or @code{impulse} instead.
29
## or @command{impulse} instead.
30
## @end deftypefn
30
## @end deftypefn
31
## @seealso{step and impulse}
31
## @seealso{step, impulse}
32
32
33
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
33
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
34
## Created: October 2, 1997
34
## Created: October 2, 1997
(-)octave-2.1.58/scripts/control/base/step.m (-3 / +8 lines)
Lines 36-47 Link Here
36
## the number of data values.
36
## the number of data values.
37
##
37
##
38
## Both parameters @var{tstop} and @var{n} can be omitted and will be
38
## Both parameters @var{tstop} and @var{n} can be omitted and will be
39
## computed from the eigenvalues of the A-Matrix.
39
## computed from the eigenvalues of the A Matrix.
40
## @end table
40
## @end table
41
## @strong{Outputs}
41
## @strong{Outputs}
42
## @var{y}, @var{t}: impulse response
42
## @table @var
43
## @item y
44
## Values of the step response.
45
## @item t
46
## Times of the step response.
47
## @end table
43
##
48
##
44
## When invoked with the output paramter y the plot is not displayed.
49
## When invoked with the output parameter @var{y} the plot is not displayed.
45
## @end deftypefn
50
## @end deftypefn
46
## @seealso{impulse and __stepimp__}
51
## @seealso{impulse and __stepimp__}
47
52
(-)octave-2.1.58/scripts/control/base/tzero2.m (-5 / +5 lines)
Lines 17-29 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} tzero2 (@var{a}, @var{b}, @var{c}, @var{d}, @var{bal})
20
## @deftypefn {Function File} {@var{zr} =} tzero2 (@var{a}, @var{b}, @var{c}, @var{d}, @var{bal})
21
## Compute the transmission zeros of a, b, c, d.
21
## Compute the transmission zeros of @var{a}, @var{b}, @var{c}, @var{d}.
22
##
22
##
23
## bal = balancing option (see balance); default is "B".
23
## @var{bal} = balancing option (see balance); default is @code{"B"}.
24
##
24
##
25
## Needs to incorporate @code{mvzero} algorithm to isolate finite zeros; use
25
## Needs to incorporate @command{mvzero} algorithm to isolate finite zeros; 
26
## @code{tzero} instead.
26
## use @command{tzero} instead.
27
## @end deftypefn
27
## @end deftypefn
28
28
29
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
29
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/base/tzero.m (-7 / +23 lines)
Lines 17-48 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} tzero (@var{a}, @var{b}, @var{c}, @var{d}, @var{opt})
20
## @deftypefn {Function File} {[@var{zer}, @var{gain}] =} tzero (@var{a}, @var{b}, @var{c}, @var{d}, @var{opt})
21
## @deftypefnx {Function File} {} tzero (@var{sys}, @var{opt})
21
## @deftypefnx {Function File} {[@var{zer}, @var{gain}] =} tzero (@var{sys}, @var{opt})
22
## Compute transmission zeros of a continuous
22
## Compute transmission zeros of a continuous system:
23
## @iftex
24
## @tex
25
## $$ \dot x = A\,x + B\,u $$
26
## $$ y = C\,x + D\,u $$
27
## @end tex
28
## @end iftex
29
## @ifinfo
23
## @example
30
## @example
24
## .
31
## .
25
## x = Ax + Bu
32
## x = Ax + Bu
26
## y = Cx + Du
33
## y = Cx + Du
27
## @end example
34
## @end example
28
## or discrete
35
## @end ifinfo
36
## or of a discrete one:
37
## @iftex
38
## @tex
39
## $$ x_{k+1} = A\,x_k + B\,u_k $$
40
## $$ y_k = C\,x_k + D\,u_k $$
41
## @end tex
42
## @end iftex
43
## @ifinfo
29
## @example
44
## @example
30
## x(k+1) = A x(k) + B u(k)
45
## x(k+1) = A x(k) + B u(k)
31
## y(k)   = C x(k) + D u(k)
46
## y(k)   = C x(k) + D u(k)
32
## @end example
47
## @end example
33
## system.
48
## @end ifinfo
49
## 
34
## @strong{Outputs}
50
## @strong{Outputs}
35
## @table @var
51
## @table @var
36
## @item zer
52
## @item zer
37
##  transmission zeros of the system
53
##  transmission zeros of the system
38
## @item gain
54
## @item gain
39
## leading coefficient (pole-zero form) of SISO transfer function
55
## leading coefficient (pole-zero form) of @acronym{SISO} transfer function
40
## returns gain=0 if system is multivariable
56
## returns gain=0 if system is multivariable
41
## @end table
57
## @end table
42
## @strong{References}
58
## @strong{References}
43
## @enumerate
59
## @enumerate
44
## @item Emami-Naeini and Van Dooren, Automatica, 1982.
60
## @item Emami-Naeini and Van Dooren, Automatica, 1982.
45
## @item Hodel, "Computation of Zeros with Balancing," 1992 Lin. Alg. Appl.
61
## @item Hodel, @cite{Computation of Zeros with Balancing}, 1992 Lin. Alg. Appl.
46
## @end enumerate
62
## @end enumerate
47
## @end deftypefn
63
## @end deftypefn
48
64
(-)octave-2.1.58/scripts/control/hinf/dgkfdemo.m (-1 / +10 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} dgkfdemo ()
20
## @deftypefn {Function File} {} dgkfdemo ()
21
## Octave Controls toolbox demo: H2/Hinfinity options demos
21
## Octave Controls toolbox demo: 
22
## @iftex
23
## @tex
24
## $ { \cal H }_2 $/$ { \cal H }_\infty $
25
## @end tex
26
## @end iftex
27
## @ifinfo
28
## H-2/H-infinity
29
## @end ifinfo
30
## options demos.
22
## @end deftypefn
31
## @end deftypefn
23
32
24
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
33
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/hinf/dhinfdemo.m (-6 / +34 lines)
Lines 18-45 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} dhinfdemo ()
20
## @deftypefn {Function File} {} dhinfdemo ()
21
## Demonstrate the functions available for designining a discrete
21
## Demonstrate the functions available to design a discrete
22
## H_infinity controller.  This is not a true discrete design. The
22
## @iftex
23
## @tex
24
## $ { \cal H }_\infty $
25
## @end tex
26
## @end iftex
27
## @ifinfo
28
## H-infinity
29
## @end ifinfo
30
## controller.  This is not a true discrete design. The
23
## design is carried out in continuous time while the effect of sampling
31
## design is carried out in continuous time while the effect of sampling
24
## is described by a bilinear transformation of the sampled system.
32
## is described by a bilinear transformation of the sampled system.
25
## This method works quite well if the sampling period is "small"
33
## This method works quite well if the sampling period is "small"
26
## compared to the plant time constants.
34
## compared to the plant time constants.
27
##
35
##
28
## Continuous plant:
36
## Continuous plant:
29
##
37
## @iftex
38
## @tex
39
## $$ G(s) = { 1 \over (s+2) (s+1) } $$
40
## @end tex
41
## @end iftex
42
## @ifinfo
30
## @example
43
## @example
44
## @group
31
##                   1
45
##                   1
32
##      G(s) = --------------
46
##      G(s) = --------------
33
##             (s + 2)(s + 1)
47
##             (s + 2)(s + 1)
48
## @end group
34
## @end example
49
## @end example
50
## @end ifinfo
35
##
51
##
36
## Discretised plant with ZOH (Sampling period = Ts = 1 second):
52
## Discretised plant with @acronym{ZOH} (Sampling period = @var{Ts} = 1 second):
37
##
53
## @iftex
54
## @tex
55
## $$ G(z) = { 0.39958\,z + 0.14700 \over (z - 0.36788) (z - 0.13533) } $$
56
## @end tex
57
## @end iftex
58
## @ifinfo
38
## @example
59
## @example
60
## @group
39
##                 0.39958z + 0.14700
61
##                 0.39958z + 0.14700
40
##      G(s) = --------------------------
62
##      G(z) = --------------------------
41
##             (z - 0.36788)(z - 0.13533)
63
##             (z - 0.36788)(z - 0.13533)
64
## @end group
65
## @end example
66
## @end ifinfo
42
##
67
##
68
## @example
69
## @group
43
##                               +----+
70
##                               +----+
44
##          -------------------->| W1 |---> v1
71
##          -------------------->| W1 |---> v1
45
##      z   |                    +----+
72
##      z   |                    +----+
Lines 52-57 Link Here
52
##          |    +---+       |
79
##          |    +---+       |
53
##          -----| K |<-------
80
##          -----| K |<-------
54
##               +---+
81
##               +---+
82
## @end group
55
## @end example
83
## @end example
56
##
84
##
57
## @noindent
85
## @noindent
(-)octave-2.1.58/scripts/control/hinf/h2norm.m (-5 / +22 lines)
Lines 17-28 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function Fil} {} h2norm (@var{sys})
20
## @deftypefn {Function File} {} h2norm (@var{sys})
21
## Computes the H2 norm of a system data structure (continuous time only)
21
## Computes the 
22
## @iftex
23
## @tex
24
## $ { \cal H }_2 $
25
## @end tex
26
## @end iftex
27
## @ifinfo
28
## H-2
29
## @end ifinfo
30
## norm of a system data structure (continuous time only).
22
##
31
##
23
## Reference:
32
## Reference:
24
## Doyle, Glover, Khargonekar, Francis, ``State Space Solutions to Standard
33
## Doyle, Glover, Khargonekar, Francis, @cite{State-Space Solutions to Standard} 
25
## H2 and Hinf Control Problems", IEEE TAC August 1989
34
## @iftex
35
## @tex
36
## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $
37
## @end tex
38
## @end iftex
39
## @ifinfo
40
## @cite{H-2 and H-infinity}
41
## @end ifinfo
42
## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989.
26
## @end deftypefn
43
## @end deftypefn
27
44
28
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
45
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
Lines 50-56 function h2gain = h2norm (sys) Link Here
50
      M = lyap (a,b*b');
67
      M = lyap (a,b*b');
51
    endif
68
    endif
52
    if( min(real(eig(M))) < 0)
69
    if( min(real(eig(M))) < 0)
53
      error("h2norm: grammian not >= 0 (lightly damped modes?)")
70
      error("h2norm: gramian not >= 0 (lightly damped modes?)")
54
    endif
71
    endif
55
72
56
    h2gain = sqrt(trace(d'*d + c*M*c'));
73
    h2gain = sqrt(trace(d'*d + c*M*c'));
(-)octave-2.1.58/scripts/control/hinf/h2syn.m (-11 / +27 lines)
Lines 17-44 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[K}, @var{gain}, @var{kc}, @var{kf}, @var{pc}, @var{pf}] = h2syn (@var{asys}, @var{nu}, @var{ny}, @var{tol})
20
## @deftypefn {Function File} {[@var{K}, @var{gain}, @var{kc}, @var{kf}, @var{pc}, @var{pf}] = } h2syn (@var{asys}, @var{nu}, @var{ny}, @var{tol})
21
## Design H2 optimal controller per procedure in
21
## Design 
22
## Doyle, Glover, Khargonekar, Francis, "State Space Solutions to Standard
22
## @iftex
23
## H2 and Hinf Control Problems", IEEE TAC August 1989
23
## @tex
24
## $ { \cal H }_2 $
25
## @end tex
26
## @end iftex
27
## @ifinfo
28
## H-2
29
## @end ifinfo
30
## optimal controller per procedure in 
31
## Doyle, Glover, Khargonekar, Francis, @cite{State-Space Solutions to Standard}
32
## @iftex
33
## @tex
34
## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $
35
## @end tex
36
## @end iftex
37
## @ifinfo
38
## @cite{H-2 and H-infinity}
39
## @end ifinfo
40
## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989.
24
##
41
##
25
## Discrete time control per Zhou, Doyle, and Glover, ROBUST AND OPTIMAL
42
## Discrete-time control per Zhou, Doyle, and Glover, @cite{Robust and optimal control}, Prentice-Hall, 1996.
26
## CONTROL, Prentice-Hall, 1996
27
##
43
##
28
## @strong{Inputs} input system is passed as either
44
## @strong{Inputs}
29
## @table @var
45
## @table @var
30
## @item asys
46
## @item asys
31
## system data structure (see ss, sys2ss)
47
## system data structure (see ss, sys2ss)
32
## @itemize @bullet
48
## @itemize @bullet
33
## @item controller is implemented for continuous time systems
49
## @item controller is implemented for continuous time systems
34
## @item controller is NOT implemented for discrete time systems
50
## @item controller is @strong{not} implemented for discrete time systems
35
## @end itemize
51
## @end itemize
36
## @item nu
52
## @item nu
37
## number of controlled inputs
53
## number of controlled inputs
38
## @item ny
54
## @item ny
39
## number of measured outputs
55
## number of measured outputs
40
## @item tol
56
## @item tol
41
## threshhold for 0.  Default: 200*eps
57
## threshold for 0.  Default: 200*@code{eps}
42
## @end table
58
## @end table
43
##
59
##
44
## @strong{Outputs}
60
## @strong{Outputs}
Lines 52-60 Link Here
52
## @item    kf
68
## @item    kf
53
## state estimator (packed)
69
## state estimator (packed)
54
## @item    pc
70
## @item    pc
55
## ARE solution matrix for regulator subproblem
71
## @acronym{ARE} solution matrix for regulator subproblem
56
## @item    pf
72
## @item    pf
57
## ARE solution matrix for filter subproblem
73
## @acronym{ARE} solution matrix for filter subproblem
58
## @end table
74
## @end table
59
## @end deftypefn
75
## @end deftypefn
60
76
(-)octave-2.1.58/scripts/control/hinf/hinf_ctr.m (-2 / +14 lines)
Lines 17-24 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} hinf_ctr (@var{dgs}, @var{f}, @var{h}, @var{z}, @var{g})
20
## @deftypefn {Function File} {@var{K} =} hinf_ctr (@var{dgs}, @var{f}, @var{h}, @var{z}, @var{g})
21
## Called by @code{hinfsyn} to compute the H_inf optimal controller.
21
## Called by @code{hinfsyn} to compute the 
22
## @iftex
23
## @tex
24
## $ { \cal H }_\infty $
25
## @end tex
26
## @end iftex
27
## @ifinfo
28
## H-infinity
29
## @end ifinfo
30
## optimal controller.
22
##
31
##
23
## @strong{Inputs}
32
## @strong{Inputs}
24
## @table @var
33
## @table @var
Lines 31-37 Link Here
31
## final gamma value
40
## final gamma value
32
## @end table
41
## @end table
33
## @strong{Outputs}
42
## @strong{Outputs}
43
## @table @var
44
## @item K
34
## controller (system data structure)
45
## controller (system data structure)
46
## @end table
35
##
47
##
36
## Do not attempt to use this at home; no argument checking performed.
48
## Do not attempt to use this at home; no argument checking performed.
37
## @end deftypefn
49
## @end deftypefn
(-)octave-2.1.58/scripts/control/hinf/hinfdemo.m (-37 / +134 lines)
Lines 19-46 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} hinfdemo ()
20
## @deftypefn {Function File} {} hinfdemo ()
21
##
21
##
22
## H_infinity design demos for continuous SISO and MIMO systems and a
22
## @iftex
23
## discrete system.  The SISO system is difficult to control because it
23
## @tex
24
## is non minimum phase and unstable.  The second design example
24
## $ { \cal H }_\infty $
25
## controls the "jet707" plant, the linearized state space model of a
25
## @end tex
26
## Boeing 707-321 aircraft at v=80m/s (M = 0.26, Ga0 = -3 deg, alpha0 =
26
## @end iftex
27
## 4 deg, kappa = 50 deg).  Inputs: (1) thrust and (2) elevator angle
27
## @ifinfo
28
## outputs: (1) airspeed and (2) pitch angle. The discrete system is a
28
## H-infinity
29
## @end ifinfo
30
## design demos for continuous @acronym{SISO} and @acronym{MIMO} systems and a
31
## discrete system.  The @acronym{SISO} system is difficult to control because
32
## it is non-minimum-phase and unstable. The second design example
33
## controls the @command{jet707} plant, the linearized state space model of a
34
## Boeing 707-321 aircraft at @var{v}=80 m/s 
35
## @iftex
36
## @tex
37
## ($M = 0.26$, $G_{a0} = -3^{\circ}$, ${\alpha}_0 = 4^{\circ}$, ${\kappa}= 50^{\circ}$).
38
## @end tex
39
## @end iftex
40
## @ifinfo
41
## (@var{M} = 0.26, @var{Ga0} = -3 deg, @var{alpha0} = 4 deg, @var{kappa} = 50 deg).
42
## @end ifinfo
43
## Inputs: (1) thrust and (2) elevator angle
44
## Outputs: (1) airspeed and (2) pitch angle. The discrete system is a
29
## stable and second order.
45
## stable and second order.
30
##
46
##
31
## @table @asis
47
## @table @asis
32
## @item SISO plant
48
## @item @acronym{SISO} plant:
33
## @display
49
##
50
## @iftex
51
## @tex
52
## $$ G(s) = { s-2 \over (s+2) (s-1) } $$
53
## @end tex
54
## @end iftex
55
## @ifinfo
56
## @example
34
## @group
57
## @group
35
##                 s - 2
58
##                 s - 2
36
##      G(s) = --------------
59
##      G(s) = --------------
37
##             (s + 2)(s - 1)
60
##             (s + 2)(s - 1)
61
## @end group
62
## @end example
63
## @end ifinfo
64
##
65
## @example
66
## @group
38
##
67
##
39
##                               +----+
68
##                               +----+
40
##          -------------------->| W1 |---> v1
69
##          -------------------->| W1 |---> v1
41
##      z   |                    +----+
70
##      z   |                    +----+
42
##      ----|-------------+                   || T   ||     => min.
71
##      ----|-------------+
43
##          |             |                       vz   infty
72
##          |             |
44
##          |    +---+    v   y  +----+
73
##          |    +---+    v   y  +----+
45
##        u *--->| G |--->O--*-->| W2 |---> v2
74
##        u *--->| G |--->O--*-->| W2 |---> v2
46
##          |    +---+       |   +----+
75
##          |    +---+       |   +----+
Lines 49-62 Link Here
49
##          -----| K |<-------
78
##          -----| K |<-------
50
##               +---+
79
##               +---+
51
## @end group
80
## @end group
52
## @end display
81
## @end example
53
## W1 und W2 are the robustness and performance weighting
82
## 
54
## functions
83
## @iftex
55
##
84
## @tex
56
## @item MIMO plant
85
## $$ { \rm min } \Vert T_{vz} \Vert _\infty $$
57
## The optimal controller minimizes the H_infinity norm of the
86
## @end tex
58
## augmented plant P (mixed-sensitivity problem):
87
## @end iftex
59
## @display
88
## @ifinfo
89
## @example
90
## min || T   ||
91
##         vz   infty
92
## @end example
93
## @end ifinfo
94
##
95
## @var{W1} und @var{W2} are the robustness and performance weighting
96
## functions.
97
##
98
## @item @acronym{MIMO} plant:
99
## The optimal controller minimizes the 
100
## @iftex
101
## @tex
102
## $ { \cal H }_\infty $
103
## @end tex
104
## @end iftex
105
## @ifinfo
106
## H-infinity
107
## @end ifinfo
108
## norm of the
109
## augmented plant @var{P} (mixed-sensitivity problem):
110
## @example
60
## @group
111
## @group
61
##      w
112
##      w
62
##       1 -----------+
113
##       1 -----------+
Lines 70-80 Link Here
70
##             |          +----+      |   +----+
121
##             |          +----+      |   +----+
71
##             |                      |
122
##             |                      |
72
##             ^                      v
123
##             ^                      v
73
##              u (from                 y (to K)
124
##             u                       y (to K)
74
##                controller
125
##          (from controller K)
75
##                K)
126
## @end group
76
##
127
## @end example
77
##
128
##
129
## @iftex
130
## @tex
131
## $$ \left [ \matrix{ z_1 \cr
132
##                     z_2 \cr
133
##                     y   } \right ] =  
134
##  P \left [ \matrix{ w_1 \cr
135
##                     w_2 \cr
136
##                     u   } \right ] $$
137
## @end tex
138
## @end iftex
139
## @ifinfo
140
## @example
141
## @group
78
##                   +    +           +    +
142
##                   +    +           +    +
79
##                   | z  |           | w  |
143
##                   | z  |           | w  |
80
##                   |  1 |           |  1 |
144
##                   |  1 |           |  1 |
Lines 83-119 Link Here
83
##                   | y  |           | u  |
147
##                   | y  |           | u  |
84
##                   +    +           +    +
148
##                   +    +           +    +
85
## @end group
149
## @end group
86
## @end display
150
## @end example
151
## @end ifinfo
87
##
152
##
88
## @item DISCRETE SYSTEM
153
## @item Discrete system:
89
## This is not a true discrete design. The design is carried out
154
## This is not a true discrete design. The design is carried out
90
## in continuous time while the effect of sampling is described by
155
## in continuous time while the effect of sampling is described by
91
## a bilinear transformation of the sampled system.
156
## a bilinear transformation of the sampled system.
92
## This method works quite well if the sampling period is "small"
157
## This method works quite well if the sampling period is ``small''
93
## compared to the plant time constants.
158
## compared to the plant time constants.
94
##
159
##
95
## @item The continuous plant
160
## @item The continuous plant:
96
## @display
161
## @iftex
162
## @tex
163
## $$ G(s) = { 1 \over (s+2)(s+1) } $$
164
## @end tex
165
## @end iftex
166
##
167
## @ifinfo
168
## @example
97
## @group
169
## @group
98
##                    1
170
##                    1
99
##      G (s) = --------------
171
##      G (s) = --------------
100
##       k      (s + 2)(s + 1)
172
##       k      (s + 2)(s + 1)
101
##
173
##
102
## @end group
174
## @end group
103
## @end display
175
## @end example
104
## is discretised with a ZOH (Sampling period = Ts = 1 second):
176
## @end ifinfo
105
## @display
177
##
178
## is discretised with a @acronym{ZOH} (Sampling period = @var{Ts} = 1 second):
179
## @iftex
180
## @tex
181
## $$ G(z) = { 0.199788\,z + 0.073498 \over (z - 0.36788) (z - 0.13534) } $$
182
## @end tex
183
## @end iftex
184
## @ifinfo
185
## @example
106
## @group
186
## @group
107
##
187
##
108
##                0.199788z + 0.073498
188
##                0.199788z + 0.073498
109
##      G(s) = --------------------------
189
##      G(z) = --------------------------
110
##             (z - 0.36788)(z - 0.13534)
190
##             (z - 0.36788)(z - 0.13534)
191
## @end group
192
## @end example
193
## @end ifinfo
194
##
195
## @example
196
## @group
111
##
197
##
112
##                               +----+
198
##                               +----+
113
##          -------------------->| W1 |---> v1
199
##          -------------------->| W1 |---> v1
114
##      z   |                    +----+
200
##      z   |                    +----+
115
##      ----|-------------+                   || T   ||     => min.
201
##      ----|-------------+
116
##          |             |                       vz   infty
202
##          |             |
117
##          |    +---+    v      +----+
203
##          |    +---+    v      +----+
118
##          *--->| G |--->O--*-->| W2 |---> v2
204
##          *--->| G |--->O--*-->| W2 |---> v2
119
##          |    +---+       |   +----+
205
##          |    +---+       |   +----+
Lines 122-130 Link Here
122
##          -----| K |<-------
208
##          -----| K |<-------
123
##               +---+
209
##               +---+
124
## @end group
210
## @end group
125
## @end display
211
## @end example
126
## W1 and W2 are the robustness and performancs weighting
212
## @iftex
127
## functions
213
## @tex
214
## $$ { \rm min } \Vert T_{vz} \Vert _\infty $$
215
## @end tex
216
## @end iftex
217
## @ifinfo
218
## @example
219
## min || T   ||
220
##         vz   infty
221
## @end example
222
## @end ifinfo
223
## @var{W1} and @var{W2} are the robustness and performance weighting
224
## functions.
128
## @end table
225
## @end table
129
## @end deftypefn
226
## @end deftypefn
130
227
(-)octave-2.1.58/scripts/control/hinf/hinfnorm.m (-12 / +61 lines)
Lines 18-31 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{g}, @var{gmin}, @var{gmax}] =} hinfnorm (@var{sys}, @var{tol}, @var{gmin}, @var{gmax}, @var{ptol})
20
## @deftypefn {Function File} {[@var{g}, @var{gmin}, @var{gmax}] =} hinfnorm (@var{sys}, @var{tol}, @var{gmin}, @var{gmax}, @var{ptol})
21
##  Computes the H infinity norm of a system data structure.
21
## Computes the 
22
## @iftex
23
## @tex
24
## $ { \cal H }_\infty $
25
## @end tex
26
## @end iftex
27
## @ifinfo
28
## H-infinity
29
## @end ifinfo
30
## norm of a system data structure.
22
##
31
##
23
## @strong{Inputs}
32
## @strong{Inputs}
24
## @table @var
33
## @table @var
25
## @item sys
34
## @item sys
26
## system data structure
35
## system data structure
27
## @item tol
36
## @item tol
28
## H infinity norm search tolerance (default: 0.001)
37
## @iftex
38
## @tex
39
## $ { \cal H }_\infty $
40
## @end tex
41
## @end iftex
42
## @ifinfo
43
## H-infinity
44
## @end ifinfo
45
## norm search tolerance (default: 0.001)
29
## @item gmin
46
## @item gmin
30
## minimum value for norm search (default: 1e-9)
47
## minimum value for norm search (default: 1e-9)
31
## @item gmax
48
## @item gmax
Lines 34-47 Link Here
34
## pole tolerance:
51
## pole tolerance:
35
## @itemize @bullet
52
## @itemize @bullet
36
## @item if sys is continuous, poles with
53
## @item if sys is continuous, poles with
37
## |real(pole)| < ptol*||H|| (H is appropriate Hamiltonian)
54
## @iftex
55
## @tex
56
## $ \vert {\rm real}(pole) \vert < ptol \Vert H \Vert $
57
## @end tex
58
## @end iftex
59
## @ifinfo
60
## @math{ |real(pole))| < ptol*||H|| }
61
## @end ifinfo
62
## (@var{H} is appropriate Hamiltonian)
38
## are considered to be on the imaginary axis.
63
## are considered to be on the imaginary axis.
39
##
64
##
40
## @item if sys is discrete, poles with
65
## @item if sys is discrete, poles with
41
## |abs(pole)-1| < ptol*||[s1,s2]|| (appropriate symplectic pencil)
66
## @iftex
42
## are considered to be on the unit circle
67
## @tex
68
## $ \vert { \rm pole } - 1 \vert < ptol \Vert [ s_1 ~ s_2 ] \Vert $
69
## @end tex
70
## @end iftex
71
## @ifinfo
72
## @math{|abs(pole)-1| < ptol*||[s1,s2]||}
73
## @end ifinfo
74
## (appropriate symplectic pencil)
75
## are considered to be on the unit circle.
43
##
76
##
44
## @item Default: 1e-9
77
## @item Default value: 1e-9
45
## @end itemize
78
## @end itemize
46
## @end table
79
## @end table
47
##
80
##
Lines 52-66 Link Here
52
## if the system is unstable.
85
## if the system is unstable.
53
## @item gmin
86
## @item gmin
54
## @itemx gmax
87
## @itemx gmax
55
## Actual system gain lies in the interval [@var{gmin}, @var{gmax}]
88
## Actual system gain lies in the interval [@var{gmin}, @var{gmax}].
56
## @end table
89
## @end table
57
##
90
##
58
## References:
91
## References:
59
## Doyle, Glover, Khargonekar, Francis, "State space solutions to standard
92
## Doyle, Glover, Khargonekar, Francis, @cite{State-space solutions to standard}
60
## H2 and Hinf control problems", IEEE TAC August 1989
93
## @iftex
61
## Iglesias and Glover, "State-Space approach to discrete-time Hinf control,"
94
## @tex
62
## Int. J. Control, vol 54, #5, 1991
95
## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $
63
## Zhou, Doyle, Glover, "Robust and Optimal Control," Prentice-Hall, 1996
96
## @end tex
97
## @end iftex
98
## @ifinfo
99
## @cite{H-2 and H-infinity}
100
## @end ifinfo
101
## @cite{control problems}, @acronym{IEEE} @acronym{TAC} August 1989;
102
## Iglesias and Glover, @cite{State-Space approach to discrete-time}
103
## @iftex
104
## @tex
105
## $ { \cal H }_\infty $
106
## @end tex
107
## @end iftex
108
## @ifinfo
109
## @cite{H-infinity}
110
## @end ifinfo
111
## @cite{control}, Int. J. Control, vol 54, no. 5, 1991;
112
## Zhou, Doyle, Glover, @cite{Robust and Optimal Control}, Prentice-Hall, 1996.
64
## @end deftypefn
113
## @end deftypefn
65
114
66
function [g, gmin, gmax] = hinfnorm (sys, tol, gmin, gmax, ptol)
115
function [g, gmin, gmax] = hinfnorm (sys, tol, gmin, gmax, ptol)
(-)octave-2.1.58/scripts/control/hinf/hinfsyn_chk.m (-6 / +34 lines)
Lines 20-32 Link Here
20
## @deftypefn {Function File} {[@var{retval}, @var{pc}, @var{pf}] =} hinfsyn_chk (@var{a}, @var{b1}, @var{b2}, @var{c1}, @var{c2}, @var{d12}, @var{d21}, @var{g}, @var{ptol})
20
## @deftypefn {Function File} {[@var{retval}, @var{pc}, @var{pf}] =} hinfsyn_chk (@var{a}, @var{b1}, @var{b2}, @var{c1}, @var{c2}, @var{d12}, @var{d21}, @var{g}, @var{ptol})
21
## Called by @code{hinfsyn} to see if gain @var{g} satisfies conditions in
21
## Called by @code{hinfsyn} to see if gain @var{g} satisfies conditions in
22
## Theorem 3 of
22
## Theorem 3 of
23
## Doyle, Glover, Khargonekar, Francis, "State Space Solutions to Standard
23
## Doyle, Glover, Khargonekar, Francis, @cite{State Space Solutions to Standard}
24
## H2 and Hinf Control Problems", IEEE TAC August 1989
24
## @iftex
25
## @tex
26
## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $
27
## @end tex
28
## @end iftex
29
## @ifinfo
30
## @cite{H-2 and H-infinity}
31
## @end ifinfo
32
## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989.
25
##
33
##
26
## @strong{Warning} Do not attempt to use this at home; no argument
34
## @strong{Warning:} do not attempt to use this at home; no argument
27
## checking performed.
35
## checking performed.
28
##
36
##
29
## @strong{Inputs} as returned by @code{is_dgkf}, except for:
37
## @strong{Inputs}
38
##
39
## As returned by @code{is_dgkf}, except for:
30
## @table @var
40
## @table @var
31
## @item g
41
## @item g
32
## candidate gain level
42
## candidate gain level
Lines 39-47 Link Here
39
## @item retval
49
## @item retval
40
##  1 if g exceeds optimal Hinf closed loop gain, else 0
50
##  1 if g exceeds optimal Hinf closed loop gain, else 0
41
## @item pc
51
## @item pc
42
##  solution of "regulator" H-inf ARE
52
## solution of ``regulator'' 
53
## @iftex
54
## @tex
55
## $ { \cal H }_\infty $
56
## @end tex
57
## @end iftex
58
## @ifinfo
59
## H-infinity
60
## @end ifinfo
61
## @acronym{ARE}
43
## @item pf
62
## @item pf
44
##  solution of "filter" H-inf ARE
63
## solution of ``filter''
64
## @iftex
65
## @tex
66
## $ { \cal H }_\infty $
67
## @end tex
68
## @end iftex
69
## @ifinfo
70
## H-infinity
71
## @end ifinfo
72
## @acronym{ARE}
45
## @end table
73
## @end table
46
## Do not attempt to use this at home; no argument checking performed.
74
## Do not attempt to use this at home; no argument checking performed.
47
## @end deftypefn
75
## @end deftypefn
(-)octave-2.1.58/scripts/control/hinf/hinfsyn.m (-22 / +67 lines)
Lines 22-77 Link Here
22
## @strong{Inputs} input system is passed as either
22
## @strong{Inputs} input system is passed as either
23
## @table @var
23
## @table @var
24
## @item asys
24
## @item asys
25
## system data structure (see ss, sys2ss)
25
## system data structure (see @command{ss}, @command{sys2ss})
26
## @itemize @bullet
26
## @itemize @bullet
27
## @item controller is implemented for continuous time systems
27
## @item controller is implemented for continuous time systems
28
## @item controller is NOT implemented for discrete time systems  (see
28
## @item controller is @strong{not} implemented for discrete time systems  (see
29
## bilinear transforms in @code{c2d}, @code{d2c})
29
## bilinear transforms in @command{c2d}, @command{d2c})
30
## @end itemize
30
## @end itemize
31
## @item nu
31
## @item nu
32
## number of controlled inputs
32
## number of controlled inputs
33
## @item ny
33
## @item ny
34
## number of measured outputs
34
## number of measured outputs
35
## @item gmin
35
## @item gmin
36
## initial lower bound on H-infinity optimal gain
36
## initial lower bound on 
37
## @iftex
38
## @tex
39
## $ { \cal H }_\infty $
40
## @end tex
41
## @end iftex
42
## @ifinfo
43
## H-infinity
44
## @end ifinfo
45
## optimal gain
37
## @item gmax
46
## @item gmax
38
## initial upper bound on H-infinity optimal gain
47
## initial upper bound on 
48
## @iftex
49
## @tex
50
## $ { \cal H }_\infty $
51
## @end tex
52
## @end iftex
53
## @ifinfo
54
## H-infinity
55
## @end ifinfo
56
## Optimal gain.
39
## @item gtol
57
## @item gtol
40
## gain threshhold.  Routine quits when gmax/gmin < 1+tol
58
## Gain threshold.  Routine quits when @var{gmax}/@var{gmin} < 1+tol.
41
## @item ptol
59
## @item ptol
42
## poles with abs(real(pole)) < ptol*||H|| (H is appropriate
60
## poles with @code{abs(real(pole))} 
61
## @iftex
62
## @tex
63
## $ < ptol \Vert H \Vert $
64
## @end tex
65
## @end iftex
66
## @ifinfo
67
## < ptol*||H|| 
68
## @end ifinfo
69
## (@var{H} is appropriate
43
## Hamiltonian) are considered to be on the imaginary axis.
70
## Hamiltonian) are considered to be on the imaginary axis.
44
## Default: 1e-9
71
## Default: 1e-9.
45
## @item tol
72
## @item tol
46
## threshhold for 0.  Default: 200*eps
73
## threshold for 0.  Default: 200*@code{eps}.
47
##
74
##
48
## @var{gmax}, @var{min}, @var{tol}, and @var{tol} must all be postive scalars.
75
## @var{gmax}, @var{min}, @var{tol}, and @var{tol} must all be postive scalars.
49
## @end table
76
## @end table
50
## @strong{Outputs}
77
## @strong{Outputs}
51
## @table @var
78
## @table @var
52
## @item k
79
## @item k
53
## system controller
80
## System controller.
54
## @item g
81
## @item g
55
## designed gain value
82
## Designed gain value.
56
## @item gw
83
## @item gw
57
## closed loop system
84
## Closed loop system.
58
## @item xinf
85
## @item xinf
59
## ARE solution matrix for regulator subproblem
86
## @acronym{ARE} solution matrix for regulator subproblem.
60
## @item yinf
87
## @item yinf
61
## ARE solution matrix for filter subproblem
88
## @acronym{ARE} solution matrix for filter subproblem.
62
## @end table
89
## @end table
63
##
90
##
91
## References:
64
## @enumerate
92
## @enumerate
65
## @item Doyle, Glover, Khargonekar, Francis, "State Space Solutions
93
## @item Doyle, Glover, Khargonekar, Francis, @cite{State-Space Solutions
66
## to Standard H2 and Hinf Control Problems," IEEE TAC August 1989
94
## to Standard}
95
## @iftex
96
## @tex
97
## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $
98
## @end tex
99
## @end iftex
100
## @ifinfo
101
## @cite{H-2 and H-infinity}
102
## @end ifinfo
103
## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989.
67
##
104
##
68
## @item Maciejowksi, J.M., "Multivariable feedback design,"
105
## @item Maciejowksi, J.M., @cite{Multivariable feedback design},
69
## Addison-Wesley, 1989, ISBN 0-201-18243-2
106
## Addison-Wesley, 1989, @acronym{ISBN} 0-201-18243-2.
70
##
107
##
71
## @item Keith Glover and John C. Doyle, "State-space formulae for all
108
## @item Keith Glover and John C. Doyle, @cite{State-space formulae for all
72
## stabilizing controllers that satisfy and h-infinity-norm bound
109
## stabilizing controllers that satisfy an}
73
## and relations to risk sensitivity,"
110
## @iftex
74
## Systems & Control Letters 11, Oct. 1988, pp 167-172.
111
## @tex
112
## $ { \cal H }_\infty $@cite{norm}
113
## @end tex
114
## @end iftex
115
## @ifinfo
116
## @cite{H-infinity-norm}
117
## @end ifinfo
118
## @cite{bound and relations to risk sensitivity},
119
## Systems & Control Letters 11, Oct. 1988, pp 167--172.
75
## @end enumerate
120
## @end enumerate
76
## @end deftypefn
121
## @end deftypefn
77
122
(-)octave-2.1.58/scripts/control/hinf/hinfsyn_ric.m (-2 / +2 lines)
Lines 20-27 Link Here
20
## @deftypefn {Function File} {[@var{xinf}, @var{x_ha_err}] =} hinfsyn_ric (@var{a}, @var{bb}, @var{c1}, @var{d1dot}, @var{r}, @var{ptol})
20
## @deftypefn {Function File} {[@var{xinf}, @var{x_ha_err}] =} hinfsyn_ric (@var{a}, @var{bb}, @var{c1}, @var{d1dot}, @var{r}, @var{ptol})
21
## Forms
21
## Forms
22
## @example
22
## @example
23
## xx = ([BB; -C1'*d1dot]/R) * [d1dot'*C1 BB'];
23
## xx = ([bb; -c1'*d1dot]/r) * [d1dot'*c1 bb'];
24
## Ha = [A 0*A; -C1'*C1 -A'] - xx;
24
## Ha = [a 0*a; -c1'*c1 - a'] - xx;
25
## @end example
25
## @end example
26
## and solves associated Riccati equation.
26
## and solves associated Riccati equation.
27
## The error code @var{x_ha_err} indicates one of the following
27
## The error code @var{x_ha_err} indicates one of the following
(-)octave-2.1.58/scripts/control/hinf/is_dgkf.m (-10 / +18 lines)
Lines 19-35 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{retval}, @var{dgkf_struct} ] =} is_dgkf (@var{asys}, @var{nu}, @var{ny}, @var{tol} )
20
## @deftypefn {Function File} {[@var{retval}, @var{dgkf_struct} ] =} is_dgkf (@var{asys}, @var{nu}, @var{ny}, @var{tol} )
21
## Determine whether a continuous time state space system meets
21
## Determine whether a continuous time state space system meets
22
## assumptions of DGKF algorithm.
22
## assumptions of @acronym{DGKF} algorithm.
23
## Partitions system into:
23
## Partitions system into:
24
## @example
24
## @example
25
## [dx/dt] = [A  | Bw  Bu  ][w]
25
## [dx/dt]   [A  | Bw  Bu  ][w]
26
## [ z   ]   [Cz | Dzw Dzu ][u]
26
## [ z   ] = [Cz | Dzw Dzu ][u]
27
## [ y   ]   [Cy | Dyw Dyu ]
27
## [ y   ]   [Cy | Dyw Dyu ]
28
## @end example
28
## @end example
29
## or similar discrete-time system.
29
## or similar discrete-time system.
30
## If necessary, orthogonal transformations @var{qw}, @var{qz} and nonsingular
30
## If necessary, orthogonal transformations @var{qw}, @var{qz} and nonsingular
31
## transformations @var{ru}, @var{ry} are applied to respective vectors
31
## transformations @var{ru}, @var{ry} are applied to respective vectors
32
## @var{w}, @var{z}, @var{u}, @var{y} in order to satisfy DGKF assumptions.
32
## @var{w}, @var{z}, @var{u}, @var{y} in order to satisfy @acronym{DGKF} assumptions.
33
## Loop shifting is used if @var{dyu} block is nonzero.
33
## Loop shifting is used if @var{dyu} block is nonzero.
34
##
34
##
35
## @strong{Inputs}
35
## @strong{Inputs}
Lines 41-54 Link Here
41
## @item        ny
41
## @item        ny
42
## number of measured outputs
42
## number of measured outputs
43
## @item        tol
43
## @item        tol
44
## threshhold for 0.  Default: 200@var{eps}
44
## threshold for 0; default: 200*@code{eps}.
45
## @end table
45
## @end table
46
## @strong{Outputs}
46
## @strong{Outputs}
47
## @table @var
47
## @table @var
48
## @item    retval
48
## @item    retval
49
## true(1) if system passes check, false(0) otherwise
49
## true(1) if system passes check, false(0) otherwise
50
## @item    dgkf_struct
50
## @item    dgkf_struct
51
## data structure of @code{is_dgkf} results.  Entries:
51
## data structure of @command{is_dgkf} results.  Entries:
52
## @table @var
52
## @table @var
53
## @item      nw
53
## @item      nw
54
## @itemx     nz
54
## @itemx     nz
Lines 84-98 Link Here
84
## @end table
84
## @end table
85
## @end table
85
## @end table
86
## @code{is_dgkf} exits with an error if the system is mixed
86
## @code{is_dgkf} exits with an error if the system is mixed
87
## discrete/continuous
87
## discrete/continuous.
88
##
88
##
89
## @strong{References}
89
## @strong{References}
90
## @table @strong
90
## @table @strong
91
## @item [1]
91
## @item [1]
92
## Doyle, Glover, Khargonekar, Francis, "State Space Solutions
92
## Doyle, Glover, Khargonekar, Francis, @cite{State Space Solutions to Standard}
93
## to Standard H2 and Hinf Control Problems," IEEE TAC August 1989
93
## @iftex
94
## @tex
95
## $ { \cal H }_2 $ @cite{and} $ { \cal H }_\infty $
96
## @end tex
97
## @end iftex
98
## @ifinfo
99
## @cite{H-2 and H-infinity}
100
## @end ifinfo
101
## @cite{Control Problems}, @acronym{IEEE} @acronym{TAC} August 1989.
94
## @item [2]
102
## @item [2]
95
## Maciejowksi, J.M.: "Multivariable feedback design,"
103
## Maciejowksi, J.M., @cite{Multivariable Feedback Design}, Addison-Wesley, 1989.
96
## @end table
104
## @end table
97
## @end deftypefn
105
## @end deftypefn
98
106
(-)octave-2.1.58/scripts/control/hinf/wgt1o.m (-8 / +27 lines)
Lines 17-34 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} wgt1o (@var{vl}, @var{vh}, @var{fc})
20
## @deftypefn {Function File} {@var{W} =} wgt1o (@var{vl}, @var{vh}, @var{fc})
21
## State space description of a first order weighting function.
21
## State space description of a first order weighting function.
22
##
22
##
23
## Weighting function are needed by the H2/H_infinity design procedure.
23
## Weighting function are needed by the 
24
## These function are part of thye augmented plant P (see hinfdemo
24
## @iftex
25
## for an applicattion example).
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).
26
##
35
##
27
## vl = Gain at low frequencies
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
28
##
45
##
29
## vh = Gain at high frequencies
46
## @strong{Output}
30
##
47
## @table @var
31
## fc = Corner frequency (in Hz, *not* in rad/sec)
48
## @item W
49
## Weighting function, given in form of a system data structure.
50
## @end table
32
## @end deftypefn
51
## @end deftypefn
33
52
34
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
53
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
(-)octave-2.1.58/scripts/control/obsolete/minfo.m (-11 / +18 lines)
Lines 16-33 Link Here
16
## along with Octave; see the file COPYING.  If not, write to the Free
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.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
##  function [systype, nout, nin, ncstates, ndstates] = minfo(inmat)
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{systype}, @var{nout}, @var{nin}, @var{ncstates}, @var{ndstates}] =} minfo (@var{inmat})
21
## Determines the type of system matrix.  @var{inmat} can be a varying, 
22
## a system, a constant, and an empty matrix.
20
##
23
##
21
## MINFO:  Determines the type of system matrix.  INMAT can be
24
## @strong{Outputs}
22
##         a varying(*), system, constant, and empty matrix.
25
## @table @var
23
##
26
## @item systype 
24
##    Returns:
27
## Can be one of: varying, system, constant, and empty.
25
##      systype can be one of:
28
## @item nout 
26
##            varying, system, constant, and empty
29
## The number of outputs of the system.
27
##      nout is the number of outputs of the system
30
## @item nin
28
##      nin is the number of inputs of the system
31
## The number of inputs of the system.
29
##      ncstates is the number of continuous states of the system
32
## @item ncstates
30
##       ndstates is the number of discrete states of the system
33
## The number of continuous states of the system.
34
## @item ndstates 
35
## The number of discrete states of the system.
36
## @end table
37
## @end deftypefn
31
38
32
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
39
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
33
## Created: July 29, 1994
40
## Created: July 29, 1994
(-)octave-2.1.58/scripts/control/obsolete/syschnames.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} syschnames (@var{sys}, @var{opt}, @var{list}, @var{names})
20
## @deftypefn {Function File} {} syschnames (@var{sys}, @var{opt}, @var{list}, @var{names})
21
## Superseded by @code{syssetsignals}
21
## Superseded by @command{syssetsignals}.
22
## @end deftypefn
22
## @end deftypefn
23
23
24
## Author: John Ingram <ingraje@eng.auburn.edu>
24
## Author: John Ingram <ingraje@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/buildssic.m (-30 / +59 lines)
Lines 20-39 Link Here
20
## @deftypefn {Function File} {} buildssic (@var{clst}, @var{ulst}, @var{olst}, @var{ilst}, @var{s1}, @var{s2}, @var{s3}, @var{s4}, @var{s5}, @var{s6}, @var{s7}, @var{s8})
20
## @deftypefn {Function File} {} buildssic (@var{clst}, @var{ulst}, @var{olst}, @var{ilst}, @var{s1}, @var{s2}, @var{s3}, @var{s4}, @var{s5}, @var{s6}, @var{s7}, @var{s8})
21
##
21
##
22
## Form an arbitrary complex (open or closed loop) system in
22
## Form an arbitrary complex (open or closed loop) system in
23
## state-space form from several systems. "@code{buildssic}" can
23
## state-space form from several systems. @command{buildssic} can
24
## easily (despite it's cryptic syntax) integrate transfer functions
24
## easily (despite its cryptic syntax) integrate transfer functions
25
## from a complex block diagram into a single system with one call.
25
## from a complex block diagram into a single system with one call.
26
## This function is especially useful for building open loop
26
## This function is especially useful for building open loop
27
## interconnections for H_infinity and H2 designs or for closing
27
## interconnections for 
28
## loops with these controllers.
28
## @iftex
29
## @tex
30
## $ { \cal H }_\infty $ and $ { \cal H }_2 $
31
## @end tex
32
## @end iftex
33
## @ifinfo
34
## H-infinity and H-2
35
## @end ifinfo
36
## designs or for closing loops with these controllers.
29
##
37
##
30
## Although this function is general purpose, the use of "@code{sysgroup}"
38
## Although this function is general purpose, the use of @command{sysgroup}
31
## "@code{sysmult}", "@code{sysconnect}" and the like is recommended for
39
## @command{sysmult}, @command{sysconnect} and the like is recommended for
32
## standard operations since they can handle mixed discrete and continuous
40
## standard operations since they can handle mixed discrete and continuous
33
## systems and also the names of inputs, outputs, and states.
41
## systems and also the names of inputs, outputs, and states.
34
##
42
##
35
## The parameters consist of 4 lists that describe the connections
43
## The parameters consist of 4 lists that describe the connections
36
## outputs and inputs and up to 8 systems s1-s8.
44
## outputs and inputs and up to 8 systems @var{s1}--@var{s8}.
37
## Format of the lists:
45
## Format of the lists:
38
## @table @var
46
## @table @var
39
## @item      clst
47
## @item      clst
Lines 42-68 Link Here
42
## equal to the sum of all inputs of s1-s8.
50
## equal to the sum of all inputs of s1-s8.
43
##
51
##
44
## Example:
52
## Example:
45
## @code{[1 2 -1; 2 1 0]} ==> new input 1 is old inpout 1
53
## @code{[1 2 -1; 2 1 0]} means that:  new input 1 is old input 1
46
## + output 2 - output 1, new input 2 is old input 2
54
## + output 2 - output 1, and new input 2 is old input 2
47
## + output 1. The order of rows is arbitrary.
55
## + output 1. The order of rows is arbitrary.
48
##
56
##
49
## @item     ulst
57
## @item ulst
50
## if not empty the old inputs in vector Ulst will
58
## if not empty the old inputs in vector @var{ulst} will
51
## be appended to the outputs. You need this if you
59
## be appended to the outputs. You need this if you
52
## want to "pull out" the input of a system. Elements
60
## want to ``pull out'' the input of a system. Elements
53
## are input numbers of s1-s8.
61
## are input numbers of @var{s1}--@var{s8}.
54
##
62
##
55
## @item     olst
63
## @item olst
56
## output list, specifiy the outputs of the resulting
64
## output list, specifiy the outputs of the resulting
57
## systems. Elements are output numbers of s1-s8.
65
## systems. Elements are output numbers of @var{s1}--@var{s8}.
58
## The numbers are alowed to be negative and may
66
## The numbers are allowed to be negative and may
59
## appear in any order. An empty matrix means
67
## appear in any order. An empty matrix means
60
## all outputs.
68
## all outputs.
61
##
69
##
62
## @item     ilst
70
## @item ilst
63
## input list, specifiy the inputs of the resulting
71
## input list, specifiy the inputs of the resulting
64
## systems. Elements are input numbers of s1-s8.
72
## systems. Elements are input numbers of @var{s1}--@var{s8}.
65
## The numbers are alowed to be negative and may
73
## The numbers are allowed to be negative and may
66
## appear in any order. An empty matrix means
74
## appear in any order. An empty matrix means
67
## all inputs.
75
## all inputs.
68
## @end table
76
## @end table
Lines 82-101 Link Here
82
## @end group
90
## @end group
83
## @end example
91
## @end example
84
##
92
##
85
## The closed loop system GW can be optained by
93
## The closed loop system @var{GW} can be optained by
86
## @example
94
## @example
87
## GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K);
95
## GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K);
88
## @end example
96
## @end example
89
## @table @var
97
## @table @var
90
## @item clst
98
## @item clst
91
## (1. row) connect input 1 (G) with output 2 (K).
99
## 1st row: connect input 1 (@var{G}) with output 2 (@var{K}).
92
## (2. row) connect input 2 (K) with neg. output 1 (G).
100
##
101
## 2nd row: connect input 2 (@var{K}) with negative output 1 (@var{G}).
93
## @item ulst
102
## @item ulst
94
## append input of (2) K to the number of outputs.
103
## Append input of 2 (@var{K}) to the number of outputs.
95
## @item olst
104
## @item olst
96
## Outputs are output of 1 (G), 2 (K) and appended output 3 (from Ulst).
105
## Outputs are output of 1 (@var{G}), 2 (@var{K}) and 
106
## appended output 3 (from @var{ulst}).
97
## @item ilst
107
## @item ilst
98
## the only input is 2 (K).
108
## The only input is 2 (@var{K}).
99
## @end table
109
## @end table
100
##
110
##
101
## Here is a real example:
111
## Here is a real example:
Lines 104-111 Link Here
104
##                          +----+
114
##                          +----+
105
##     -------------------->| W1 |---> v1
115
##     -------------------->| W1 |---> v1
106
## z   |                    +----+
116
## z   |                    +----+
107
## ----|-------------+                   || GW   ||     => min.
117
## ----|-------------+
108
##     |             |                        vz   infty
118
##     |             |
109
##     |    +---+    v      +----+
119
##     |    +---+    v      +----+
110
##     *--->| G |--->O--*-->| W2 |---> v2
120
##     *--->| G |--->O--*-->| W2 |---> v2
111
##     |    +---+       |   +----+
121
##     |    +---+       |   +----+
Lines 114-127 Link Here
114
##    u                  y
124
##    u                  y
115
## @end group
125
## @end group
116
## @end example
126
## @end example
127
## @iftex
128
## @tex
129
## $$ { \rm min } \Vert GW_{vz} \Vert _\infty $$  
130
## @end tex
131
## @end iftex
132
## @ifinfo
133
## @example
134
## min || GW   ||
135
##          vz   infty
136
## @end example
137
## @end ifinfo
117
##
138
##
118
## The closed loop system GW from [z; u]' to [v1; v2; y]' can be
139
## The closed loop system @var{GW} 
119
## obtained by (all SISO systems):
140
## @iftex
141
## @tex
142
## from $ [z,~u]^{ \rm T } $ to $ [v_1,~v_2,~y]^{ \rm T } $
143
## @end tex
144
## @end iftex
145
## @ifinfo
146
## from [z, u]' to [v1, v2, y]' 
147
## @end ifinfo
148
## can be obtained by (all @acronym{SISO} systems):
120
## @example
149
## @example
121
## GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5],
150
## GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5],
122
##                [3, 4], G, W1, W2, One);
151
##                [3, 4], G, W1, W2, One);
123
## @end example
152
## @end example
124
## where "One" is a unity gain (auxillary) function with order 0.
153
## where ``One'' is a unity gain (auxillary) function with order 0.
125
## (e.g. @code{One = ugain(1);})
154
## (e.g. @code{One = ugain(1);})
126
## @end deftypefn
155
## @end deftypefn
127
156
(-)octave-2.1.58/scripts/control/system/c2d.m (-21 / +45 lines)
Lines 20-25 Link Here
20
## @deftypefn {Function File} {} c2d (@var{sys}, @var{opt}, @var{t})
20
## @deftypefn {Function File} {} c2d (@var{sys}, @var{opt}, @var{t})
21
## @deftypefnx {Function File} {} c2d (@var{sys}, @var{t})
21
## @deftypefnx {Function File} {} c2d (@var{sys}, @var{t})
22
##
22
##
23
## Converts the system data structure describing:
24
## @iftex
25
## @tex
26
## $$ \dot x = A_c\,x + B_c\,u $$
27
## @end tex
28
## @end iftex
29
## @ifinfo
30
## @example
31
## .
32
## x = Ac x + Bc u
33
## @end example
34
## @end ifinfo
35
## into a discrete time equivalent model:
36
## @iftex
37
## @tex
38
## $$ x_{n+1} = A_d\,x_n + B_d\,u_n $$
39
## @end tex
40
## @end iftex
41
## @ifinfo
42
## @example
43
## x[n+1] = Ad x[n] + Bd u[n]
44
## @end example
45
## @end ifinfo
46
## via the matrix exponential or bilinear transform.
47
##
23
## @strong{Inputs}
48
## @strong{Inputs}
24
## @table @var
49
## @table @var
25
## @item sys
50
## @item sys
Lines 33-70 Link Here
33
## use the matrix exponential (default)
58
## use the matrix exponential (default)
34
## @item "bi"
59
## @item "bi"
35
## use the bilinear transformation
60
## use the bilinear transformation
36
## @end table
61
## @iftex
62
## @tex
63
## $$ s = { 2\,(z-1) \over T\,(z+1) } $$
64
## @end tex
65
## @end iftex
66
## @ifinfo
37
## @example
67
## @example
38
##     2(z-1)
68
##     2(z-1)
39
## s = -----
69
## s = -----
40
##     T(z+1)
70
##     T(z+1)
41
## @end example
71
## @end example
72
## @end ifinfo
42
## FIXME: This option exits with an error if @var{sys} is not purely
73
## FIXME: This option exits with an error if @var{sys} is not purely
43
## continuous. (The @code{ex} option can handle mixed systems.)
74
## continuous. (The @code{ex} option can handle mixed systems.)
44
## @item t
45
## sampling time; required if sys is purely continuous.
46
##
47
## If the 2nd argument is not a string, @code{c2d} assumes that
48
## the 2nd argument is @var{t} and performs appropriate argument checks.
49
## @item "matched"
75
## @item "matched"
50
## Use the matched pole/zero equivalent transformation (currently only
76
## Use the matched pole/zero equivalent transformation (currently only
51
## works for purely continuous SISO systems).
77
## works for purely continuous @acronym{SISO} systems).
78
## @end table
79
## @item t
80
## sampling time; required if @var{sys} is purely continuous.
81
## 
82
## @strong{Note:} if the second argument is not a string, @code{c2d()}
83
## assumes that the second argument is @var{t} and performs 
84
## appropriate argument checks.
52
## @end table
85
## @end table
53
##
86
##
54
## @strong{Outputs}
87
## @strong{Output}
55
## @var{dsys} discrete time equivalent via zero-order hold,
88
## @table @var
56
## sample each @var{t} sec.
89
## @item dsys 
57
##
90
## Discrete time equivalent via zero-order hold, sample each @var{t} sec.
58
## converts the system data structure describing
91
## @end table
59
## @example
60
## .
61
## x = Ac x + Bc u
62
## @end example
63
## into a discrete time equivalent model
64
## @example
65
## x[n+1] = Ad x[n] + Bd u[n]
66
## @end example
67
## via the matrix exponential or bilinear transform
68
##
92
##
69
## This function adds the suffix  @code{_d}
93
## This function adds the suffix  @code{_d}
70
## to the names of the new discrete states.
94
## to the names of the new discrete states.
(-)octave-2.1.58/scripts/control/system/d2c.m (-5 / +8 lines)
Lines 19-26 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} d2c (@var{sys}, @var{tol})
20
## @deftypefn {Function File} {} d2c (@var{sys}, @var{tol})
21
## @deftypefnx {Function File} {} d2c (@var{sys}, @var{opt})
21
## @deftypefnx {Function File} {} d2c (@var{sys}, @var{opt})
22
## Convert discrete (sub)system to a purely continuous system.  Sampling
22
## Convert a discrete (sub)system into a purely continuous one. 
23
## time used is @code{sysgettsam(@var{sys})}
23
## The sampling time used is @code{sysgettsam(@var{sys})}.
24
##
24
##
25
## @strong{Inputs}
25
## @strong{Inputs}
26
## @table @var
26
## @table @var
Lines 28-34 Link Here
28
## system data structure with discrete components
28
## system data structure with discrete components
29
## @item   tol
29
## @item   tol
30
## Scalar value.
30
## Scalar value.
31
## tolerance for convergence of default @code{"log"} option (see below)
31
## Tolerance for convergence of default @code{"log"} option (see below)
32
## @item   opt
32
## @item   opt
33
## conversion option.  Choose from:
33
## conversion option.  Choose from:
34
## @table @code
34
## @table @code
Lines 50-57 Link Here
50
## discrete
50
## discrete
51
## @end table
51
## @end table
52
## @end table
52
## @end table
53
## @strong{Outputs} @var{csys} continuous time system (same dimensions and
53
## @strong{Output}
54
## signal names as in @var{sys}).
54
## @table @var
55
## @item csys 
56
## continuous time system (same dimensions and signal names as in @var{sys}).
57
## @end table
55
## @end deftypefn
58
## @end deftypefn
56
59
57
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
60
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/fir2sys.m (-11 / +21 lines)
Lines 18-38 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} fir2sys (@var{num}, @var{tsam}, @var{inname}, @var{outname})
20
## @deftypefn {Function File} {} fir2sys (@var{num}, @var{tsam}, @var{inname}, @var{outname})
21
## construct a system data structure from FIR description
21
## construct a system data structure from @acronym{FIR} description
22
##
22
##
23
## @strong{Inputs:}
23
## @strong{Inputs}
24
## @table @var
24
## @table @var
25
## @item num
25
## @item num
26
## vector of coefficients @math{[c_0 c_1 ... c_n]}
26
## vector of coefficients 
27
## of the SISO FIR transfer function
28
## @ifinfo
27
## @ifinfo
29
##
28
## [c0, c1, ..., cn]
30
## C(z) = c0 + c1*z^@{-1@} + c2*z^@{-2@} + ... + znz^@{-n@}
29
## @end ifinfo
31
##
30
## @iftex
31
## @tex
32
## $ [c_0, ~ c_1, ~ \ldots, ~ c_n ]$
33
## @end tex
34
## @end iftex
35
## of the @acronym{SISO} @acronym{FIR} transfer function
36
## @ifinfo
37
## C(z) = c0 + c1*z^(-1) + c2*z^(-2) + ... + cn*z^(-n)
32
## @end ifinfo
38
## @end ifinfo
33
## @iftex
39
## @iftex
34
## @tex
40
## @tex
35
## $$C(z) = c0 + c1*z^{-1} + c2*z^{-2} + ... + znz^{-n}$$
41
## $$ C(z) = c_0 + c_1\,z^{-1} + c_2\,z^{-2} + \ldots + c_n\,z^{-n} $$
36
## @end tex
42
## @end tex
37
## @end iftex
43
## @end iftex
38
##
44
##
Lines 46-57 Link Here
46
## name of output signal; may be a string or a list with a single entry.
52
## name of output signal; may be a string or a list with a single entry.
47
## @end table
53
## @end table
48
##
54
##
49
## @strong{Outputs}
55
## @strong{Output}
50
## @var{sys} (system data structure)
56
## @table @var
57
## @item sys
58
## system data structure
59
## @end table
51
##
60
##
52
## @strong{Example}
61
## @strong{Example}
53
## @example
62
## @example
54
## octave:1> sys = fir2sys([1 -1 2 4],0.342,"A/D input","filter output");
63
## octave:1> sys = fir2sys([1 -1 2 4],0.342,\
64
## > "A/D input","filter output");
55
## octave:2> sysout(sys)
65
## octave:2> sysout(sys)
56
## Input(s)
66
## Input(s)
57
##         1: A/D input
67
##         1: A/D input
(-)octave-2.1.58/scripts/control/system/is_abcd.m (-2 / +2 lines)
Lines 17-27 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} is_abcd (@var{a}, @var{b}, @var{c}, @var{d})
20
## @deftypefn {Function File} {@var{retval} =} is_abcd (@var{a}, @var{b}, @var{c}, @var{d})
21
##  Returns @var{retval} = 1 if the dimensions of @var{a}, @var{b},
21
##  Returns @var{retval} = 1 if the dimensions of @var{a}, @var{b},
22
##  @var{c}, @var{d} are compatible, otherwise @var{retval} = 0 with an
22
##  @var{c}, @var{d} are compatible, otherwise @var{retval} = 0 with an
23
##  appropriate diagnostic message printed to the screen.  The matrices
23
##  appropriate diagnostic message printed to the screen.  The matrices
24
##  b, c, or d may be omitted.
24
##  @var{b}, @var{c}, or @var{d} may be omitted.
25
## @end deftypefn
25
## @end deftypefn
26
## @seealso{abcddim}
26
## @seealso{abcddim}
27
27
(-)octave-2.1.58/scripts/control/system/is_controllable.m (-2 / +2 lines)
Lines 38-45 Link Here
38
## Logical flag; returns true (1) if the system @var{sys} or the
38
## Logical flag; returns true (1) if the system @var{sys} or the
39
## pair (@var{a}, @var{b}) is controllable, whichever was passed as input
39
## pair (@var{a}, @var{b}) is controllable, whichever was passed as input
40
## arguments.
40
## arguments.
41
## @item U
41
## @item u
42
##  U is an orthogonal basis of the controllable subspace.
42
## @var{u} is an orthogonal basis of the controllable subspace.
43
## @end table
43
## @end table
44
##
44
##
45
## @strong{Method}
45
## @strong{Method}
(-)octave-2.1.58/scripts/control/system/is_detectable.m (-2 / +2 lines)
Lines 23-31 Link Here
23
##
23
##
24
## Returns 1 if the system @var{a} or the pair (@var{a}, @var{c}) is
24
## Returns 1 if the system @var{a} or the pair (@var{a}, @var{c}) is
25
## detectable, 0 if not, and -1 if the system has unobservable modes at the
25
## detectable, 0 if not, and -1 if the system has unobservable modes at the
26
## imaginary axis (unit circle for discrete-time systems)
26
## imaginary axis (unit circle for discrete-time systems).
27
##
27
##
28
## @strong{See} @code{is_stabilizable} for detailed description of
28
## @strong{See} @command{is_stabilizable} for detailed description of
29
## arguments and computational method.
29
## arguments and computational method.
30
##
30
##
31
##
31
##
(-)octave-2.1.58/scripts/control/system/is_digital.m (-13 / +22 lines)
Lines 17-35 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} is_digital (@var{sys})
20
## @deftypefn {Function File} {@var{digital} =} is_digital (@var{sys}, @var{eflg})
21
## Return nonzero if system is digital;
21
## Return nonzero if system is digital.
22
## inputs:
22
##
23
## sys: system data structure
23
## @strong{Inputs}
24
## eflg: 0 [default] exit with an error if system is mixed (continuous and
24
## @table @var
25
## discrete components)
25
## @item sys
26
##     : 1 print a warning if system is mixed (continuous and discrete)
26
## System data structure.
27
##     : 2 silent operation
27
## @item eflg
28
## outputs:
28
## When equal to 0 (default value), exits with an error if the system 
29
## DIGITAL:  0: system is purely continuous
29
## is mixed (continuous and discrete components); when equal to 1, print
30
##        :  1: system is purely discrete
30
## a warning if the system is mixed (continuous and discrete); when equal
31
##        : -1: system is mixed continuous and discrete
31
## to 2, operate silently.
32
## Exits with an error of sys is a mixed (continuous and discrete) system
32
## @end table
33
##
34
## @strong{Output}
35
## @table @var
36
## @item digital
37
## When equal to 0, the system is purely continuous; when equal to 1, the
38
## system is purely discrete; when equal to -1, the system is mixed continuous 
39
## and discrete.
40
## @end table
41
## Exits with an error if @var{sys} is a mixed (continuous and discrete) system.
33
## @end deftypefn
42
## @end deftypefn
34
43
35
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
44
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/is_observable.m (-2 / +2 lines)
Lines 21-32 Link Here
21
## @deftypefnx {Function File} {[@var{retval}, @var{u}] =} is_observable (@var{sys}, @var{tol})
21
## @deftypefnx {Function File} {[@var{retval}, @var{u}] =} is_observable (@var{sys}, @var{tol})
22
## Logical check for system observability.
22
## Logical check for system observability.
23
##
23
##
24
## Default: tol = 10*norm(a,'fro')*eps
24
## Default: tol = @code{tol = 10*norm(a,'fro')*eps}
25
##
25
##
26
## Returns 1 if the system @var{sys} or the pair (@var{a}, @var{c}) is
26
## Returns 1 if the system @var{sys} or the pair (@var{a}, @var{c}) is
27
## observable, 0 if not.
27
## observable, 0 if not.
28
##
28
##
29
## @strong{See} @code{is_controllable} for detailed description of arguments
29
## See @command{is_controllable} for detailed description of arguments
30
## and default values.
30
## and default values.
31
## @end deftypefn
31
## @end deftypefn
32
## @seealso{size, rows, columns, length, ismatrix, isscalar, and isvector}
32
## @seealso{size, rows, columns, length, ismatrix, isscalar, and isvector}
(-)octave-2.1.58/scripts/control/system/is_sample.m (-1 / +1 lines)
Lines 19-25 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} is_sample (@var{ts})
20
## @deftypefn {Function File} {} is_sample (@var{ts})
21
## Return true if @var{ts} is a valid sampling time
21
## Return true if @var{ts} is a valid sampling time
22
## (real,scalar, > 0)
22
## (real, scalar, > 0).
23
## @end deftypefn
23
## @end deftypefn
24
24
25
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
25
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/is_siso.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} is_siso (@var{sys})
20
## @deftypefn {Function File} {} is_siso (@var{sys})
21
## return nonzero if the system data structure
21
## Returns nonzero if the system data structure
22
## @var{sys} is single-input, single-output.
22
## @var{sys} is single-input, single-output.
23
## @end deftypefn
23
## @end deftypefn
24
24
(-)octave-2.1.58/scripts/control/system/is_stabilizable.m (-8 / +17 lines)
Lines 1-3 Link Here
1
## Copyright (C) 1998 Kai P. Mueller.
2
##
1
## This file is part of Octave.
3
## This file is part of Octave.
2
##
4
##
3
## Octave is free software; you can redistribute it and/or modify it
5
## Octave is free software; you can redistribute it and/or modify it
Lines 19-33 Link Here
19
## @deftypefnx {Function File} {@var{retval} =} is_stabilizable (@var{a}, @var{b}, @var{tol}, @var{dflg})
21
## @deftypefnx {Function File} {@var{retval} =} is_stabilizable (@var{a}, @var{b}, @var{tol}, @var{dflg})
20
## Logical check for system stabilizability (i.e., all unstable modes are controllable). 
22
## Logical check for system stabilizability (i.e., all unstable modes are controllable). 
21
## Returns 1 if the system is stabilizable, 0 if the the system is not stabilizable, -1 
23
## Returns 1 if the system is stabilizable, 0 if the the system is not stabilizable, -1 
22
## if the system has non stabilizable modes at the imaginary axis (unit circle for discrete-time
24
## if the system has non stabilizable modes at the imaginary axis (unit circle for 
23
## systems.
25
## discrete-time systems.
24
##
25
## Test for stabilizability is performed via Hautus Lemma. If @var{dflg}!=0 assume that 
26
## discrete-time matrices (a,b) are supplied.
27
##
26
##
28
27
## Test for stabilizability is performed via Hautus Lemma. If 
29
## See also: size, rows, columns, length, ismatrix, isscalar, isvector
28
## @iftex
30
##     is_observable, is_stabilizable, is_detectable
29
## @tex
30
## @var{dflg}$\neq$0
31
## @end tex
32
## @end iftex
33
## @ifinfo 
34
## @var{dflg}!=0
35
## @end ifinfo
36
## assume that discrete-time matrices (a,b) are supplied.
37
## @end deftypefn
38
## @seealso{size, rows, columns, length, ismatrix, isscalar, isvector
39
## is_observable, is_stabilizable, is_detectable}
31
40
32
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
41
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
33
## Created: August 1993
42
## Created: August 1993
(-)octave-2.1.58/scripts/control/system/is_stable.m (-3 / +3 lines)
Lines 25-39 Link Here
25
## @strong{Inputs}
25
## @strong{Inputs}
26
## @table @var
26
## @table @var
27
## @item  tol
27
## @item  tol
28
## is a roundoff paramter, set to 200*@var{eps} if omitted.
28
## is a roundoff parameter, set to 200*@code{eps} if omitted.
29
## @item dflg
29
## @item dflg
30
## Digital system flag (not required for system data structure):
30
## Digital system flag (not required for system data structure):
31
## @table @code
31
## @table @code
32
## @item @var{dflg} != 0
32
## @item @var{dflg} != 0
33
## stable if eig(a) in unit circle
33
## stable if eig(a) is in the unit circle
34
##
34
##
35
## @item @var{dflg} == 0
35
## @item @var{dflg} == 0
36
## stable if eig(a) in open LHP (default)
36
## stable if eig(a) is in the open LHP (default)
37
## @end table
37
## @end table
38
## @end table
38
## @end table
39
## @end deftypefn
39
## @end deftypefn
(-)octave-2.1.58/scripts/control/system/jet707.m (-6 / +17 lines)
Lines 17-28 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} jet707 ()
20
## @deftypefn {Function File} {@var{sys} =} jet707 ()
21
## Creates linearized state space model of a Boeing 707-321 aircraft
21
## Creates a linearized state-space model of a Boeing 707-321 aircraft
22
## at v=80m/s. (M = 0.26, Ga0 = -3 deg, alpha0 = 4 deg, kappa = 50 deg)
22
## at @var{v}=80 m/s 
23
## System inputs:   (1) thrust   and (2) elevator angle
23
## @iftex
24
## System outputs:  (1) airspeed and (2) pitch angle
24
## @tex
25
## Ref: R. Brockhaus: Flugregelung (Flight Control), Springer, 1994
25
## ($M = 0.26$, $G_{a0} = -3^{\circ}$, ${\alpha}_0 = 4^{\circ}$, ${\kappa}= 50^{\circ}$).
26
## @end tex
27
## @end iftex
28
## @ifinfo
29
## (@var{M} = 0.26, @var{Ga0} = -3 deg, @var{alpha0} = 4 deg, @var{kappa} = 50 deg).
30
## @end ifinfo
31
##
32
## System inputs: (1) thrust and (2) elevator angle.
33
##
34
## System outputs:  (1) airspeed and (2) pitch angle.
35
##
36
## @strong{Reference}: R. Brockhaus: @cite{Flugregelung} (Flight Control), Springer, 1994.
26
## @end deftypefn
37
## @end deftypefn
27
## @seealso{ord2}
38
## @seealso{ord2}
28
39
(-)octave-2.1.58/scripts/control/system/moddemo.m (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} moddemo (@var{inputs})
20
## @deftypefn {Function File} {} moddemo (@var{inputs})
21
## Octave Controls toolbox demo: Model Manipulations demo
21
## Octave Control toolbox demo: Model Manipulations demo.
22
## @end deftypefn
22
## @end deftypefn
23
23
24
## Author: David Clem
24
## Author: David Clem
(-)octave-2.1.58/scripts/control/system/ord2.m (-4 / +18 lines)
Lines 19-24 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} ord2 (@var{nfreq}, @var{damp}, @var{gain})
20
## @deftypefn {Function File} {} ord2 (@var{nfreq}, @var{damp}, @var{gain})
21
## Creates a continuous 2nd order system with parameters:
21
## Creates a continuous 2nd order system with parameters:
22
##
22
## @strong{Inputs}
23
## @strong{Inputs}
23
## @table @var
24
## @table @var
24
## @item nfreq
25
## @item nfreq
Lines 30-46 Link Here
30
## This is steady state value only for damp > 0.
31
## This is steady state value only for damp > 0.
31
## gain is assumed to be 1.0 if ommitted.
32
## gain is assumed to be 1.0 if ommitted.
32
## @end table
33
## @end table
33
## @strong{Outputs}
34
##
34
## @var{outsys}
35
## @strong{Output}
35
## system data structure has representation with @math{w = 2 * pi * nfreq}:
36
## @table @var
37
## @item outsys
38
## system data structure has representation with 
39
## @ifinfo
40
## @math{w = 2 * pi * nfreq}:
41
## @end ifinfo
42
## @iftex
43
## @tex
44
## $ w = 2 \, \pi \, f $:
45
## @end tex
46
## @end iftex
36
## @example
47
## @example
48
## @group
37
##     /                                        \
49
##     /                                        \
38
##     | / -2w*damp -w \  / w \                 |
50
##     | / -2w*damp -w \  / w \                 |
39
## G = | |             |, |   |, [ 0  gain ], 0 |
51
## G = | |             |, |   |, [ 0  gain ], 0 |
40
##     | \   w       0 /  \ 0 /                 |
52
##     | \   w       0 /  \ 0 /                 |
41
##     \                                        /
53
##     \                                        /
54
## @end group
42
## @end example
55
## @end example
43
## @strong{See also} @code{jet707} (MIMO example, Boeing 707-321
56
## @end table
57
## @strong{See also} @command{jet707} (@acronym{MIMO} example, Boeing 707-321
44
## aircraft model)
58
## aircraft model)
45
## @end deftypefn
59
## @end deftypefn
46
60
(-)octave-2.1.58/scripts/control/system/parallel.m (-4 / +8 lines)
Lines 17-34 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} parallel (@var{asys}, @var{bsys})
20
## @deftypefn {Function File} {@var{ksys} =} parallel (@var{asys}, @var{bsys})
21
## Forms the parallel connection of two systems.
21
## Forms the parallel connection of two systems.
22
##
22
##
23
##              ____________________
23
## @example
24
##              |      ________    |
24
## @group
25
##              --------------------
26
##              |      --------    |
25
##     u  ----->|----> | asys |--->|----> y1
27
##     u  ----->|----> | asys |--->|----> y1
26
##         |    |      --------    |
28
##         |    |      --------    |
27
##         |    |      ________    |
29
##         |    |      --------    |
28
##         |--->|----> | bsys |--->|----> y2
30
##         |--->|----> | bsys |--->|----> y2
29
##              |      --------    |
31
##              |      --------    |
30
##              --------------------
32
##              --------------------
31
##                   ksys
33
##                   ksys
34
## @end group
35
## @end example
32
## @end deftypefn
36
## @end deftypefn
33
37
34
## Author: David Clem
38
## Author: David Clem
(-)octave-2.1.58/scripts/control/system/ss2sys.m (-1 / +1 lines)
Lines 19-25 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} ss (@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{outlist})
20
## @deftypefn {Function File} {} ss (@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{outlist})
21
## Create system structure from state-space data.   May be continous,
21
## Create system structure from state-space data.   May be continous,
22
## discrete, or mixed (sampeled-data)
22
## discrete, or mixed (sampled data)
23
##
23
##
24
## @strong{Inputs}
24
## @strong{Inputs}
25
## @table @var
25
## @table @var
(-)octave-2.1.58/scripts/control/system/ss2tf.m (-7 / +23 lines)
Lines 17-39 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} ss2tf (@var{inputs})
20
## @deftypefn {Function File} {[@var{num}, @var{den}] =} ss2tf (@var{a}, @var{b}, @var{c}, @var{d})
21
## @format
22
## [num,den] = ss2tf(a,b,c,d)
23
## Conversion from tranfer function to state-space.
21
## Conversion from tranfer function to state-space.
24
## The state space system
22
## The state space system:
23
## @iftex
24
## @tex
25
## $$ \dot x = A\,x + B\,u $$
26
## $$ y = C\,x + D\,u $$
27
## @end tex
28
## @end iftex
29
## @ifinfo
30
## @example
25
##       .
31
##       .
26
##       x = Ax + Bu
32
##       x = Ax + Bu
27
##       y = Cx + Du
33
##       y = Cx + Du
34
## @end example
35
## @end ifinfo
28
##
36
##
29
## is converted to a transfer function
37
## is converted to a transfer function:
38
## @iftex
39
## @tex
40
## $$ G(s) = { { \rm num }(s) \over { \rm den }(s) } $$
41
## @end tex
42
## @end iftex
43
## @ifinfo
44
## @example
30
##
45
##
31
##                 num(s)
46
##                 num(s)
32
##           G(s)=-------
47
##           G(s)=-------
33
##                 den(s)
48
##                 den(s)
49
## @end example
50
## @end ifinfo
34
##
51
##
35
## used internally in system data structure format manipulations
52
## used internally in system data structure format manipulations.
36
## @end format
37
## @end deftypefn
53
## @end deftypefn
38
54
39
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
55
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/ss2zp.m (-8 / +4 lines)
Lines 17-31 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} ss2zp (@var{inputs})
20
## @deftypefn {Function File} {[@var{pol}, @var{zer}, @var{k}] =} ss2zp (@var{a}, @var{b}, @var{c}, @var{d})
21
## @format
21
## Converts a state space representation to a set of poles and zeros;
22
## Converts a state space representation to a set of poles and zeros.
22
## @var{k} is a gain associated with the zeros.
23
##
23
##
24
## [pol,zer,k] = ss2zp(a,b,c,d) returns the poles and zeros of the state space
24
## Used internally in system data structure format manipulations.
25
## system (a,b,c,d).  K is a gain associated with the zeros.
26
##
27
## used internally in system data structure format manipulations
28
## @end format
29
## @end deftypefn
25
## @end deftypefn
30
26
31
## Author: David Clem
27
## Author: David Clem
(-)octave-2.1.58/scripts/control/system/ss.m (-4 / +7 lines)
Lines 17-25 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} ss (@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{outlist})
20
## @deftypefn {Function File} {@var{outsys} =} ss (@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{outlist})
21
## Create system structure from state-space data.   May be continous,
21
## Create system structure from state-space data.   May be continous,
22
## discrete, or mixed (sampeled-data)
22
## discrete, or mixed (sampled data)
23
##
23
##
24
## @strong{Inputs}
24
## @strong{Inputs}
25
## @table @var
25
## @table @var
Lines 75-82 Link Here
75
## @code{sys2ss} returns a vector @var{yd} where
75
## @code{sys2ss} returns a vector @var{yd} where
76
## @var{yd}(@var{outlist}) = 1; all other entries of @var{yd} are 0.
76
## @var{yd}(@var{outlist}) = 1; all other entries of @var{yd} are 0.
77
##
77
##
78
## @strong{Outputs}
78
## @strong{Output}
79
## @var{outsys} = system data structure
79
## @table @var
80
## @item outsys
81
## system data structure
82
## @end table
80
##
83
##
81
## @strong{System partitioning}
84
## @strong{System partitioning}
82
##
85
##
(-)octave-2.1.58/scripts/control/system/starp.m (-9 / +9 lines)
Lines 18-27 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} starp (@var{P}, @var{K}, @var{ny}, @var{nu})
20
## @deftypefn {Function File} {} starp (@var{P}, @var{K}, @var{ny}, @var{nu})
21
## @format
22
##
21
##
23
## Redheffer star product or upper/lower LFT, respectively.
22
## Redheffer star product or upper/lower LFT, respectively.
24
##
23
## @example
24
## @group
25
##
25
##
26
##                +-------+
26
##                +-------+
27
##      --------->|       |--------->
27
##      --------->|       |--------->
Lines 37-50 Link Here
37
##                |   K   |
37
##                |   K   |
38
##      --------->|       |--------->
38
##      --------->|       |--------->
39
##                +-------+
39
##                +-------+
40
## @end group
41
## @end example
42
## If @var{ny} and @var{nu} ``consume'' all inputs and outputs of
43
## @var{K} then the result is a lower fractional transformation. 
44
## If @var{ny} and @var{nu} ``consume'' all inputs and outputs of 
45
## @var{P} then the result is an upper fractional transformation.
40
##
46
##
41
## If ny and nu "consume" all inputs and outputs of K then the result
47
## @var{ny} and/or @var{nu} may be negative (i.e. negative feedback).
42
## is a lower fractional transformation. If ny and nu "consume" all
43
## inputs and outputs of P then the result is an upper fractional
44
## transformation.
45
##
46
## ny and/or nu may be negative (= negative feedback)
47
## @end format
48
## @end deftypefn
48
## @end deftypefn
49
49
50
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
50
## Author: Kai P. Mueller <mueller@ifr.ing.tu-bs.de>
(-)octave-2.1.58/scripts/control/system/sys2fir.m (-1 / +1 lines)
Lines 19-25 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{c}, @var{tsam}, @var{input}, @var{output}] =} sys2fir (@var{sys})
20
## @deftypefn {Function File} {[@var{c}, @var{tsam}, @var{input}, @var{output}] =} sys2fir (@var{sys})
21
##
21
##
22
## Extract FIR data from system data structure; see fir2sys for
22
## Extract @acronym{FIR} data from system data structure; see @command{fir2sys} for
23
## parameter descriptions.
23
## parameter descriptions.
24
## @end deftypefn
24
## @end deftypefn
25
## @seealso{fir2sys}
25
## @seealso{fir2sys}
(-)octave-2.1.58/scripts/control/system/sys2ss.m (-11 / +14 lines)
Lines 20-27 Link Here
20
## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{yd}] =} sys2ss (@var{sys})
20
## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}, @var{tsam}, @var{n}, @var{nz}, @var{stname}, @var{inname}, @var{outname}, @var{yd}] =} sys2ss (@var{sys})
21
## Extract state space representation from system data structure.
21
## Extract state space representation from system data structure.
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Input}
24
## @var{sys} system data structure
24
## @table @var
25
## @item sys
26
## System data structure.
27
## @end table
25
##
28
##
26
## @strong{Outputs}
29
## @strong{Outputs}
27
## @table @var
30
## @table @var
Lines 29-57 Link Here
29
## @itemx b
32
## @itemx b
30
## @itemx c
33
## @itemx c
31
## @itemx d
34
## @itemx d
32
## state space matrices for sys
35
## State space matrices for @var{sys}.
33
##
36
##
34
## @item tsam
37
## @item tsam
35
## sampling time of sys (0 if continuous)
38
## Sampling time of @var{sys} (0 if continuous).
36
##
39
##
37
## @item n
40
## @item n
38
## @itemx nz
41
## @itemx nz
39
## number of continuous, discrete states (discrete states come
42
## Number of continuous, discrete states (discrete states come
40
## last in state vector @var{x})
43
## last in state vector @var{x}).
41
##
44
##
42
## @item stname
45
## @item stname
43
## @itemx inname
46
## @itemx inname
44
## @itemx outname
47
## @itemx outname
45
## signal names (lists of strings);  names of states,
48
## Signal names (lists of strings);  names of states,
46
## inputs, and outputs, respectively
49
## inputs, and outputs, respectively.
47
##
50
##
48
## @item yd
51
## @item yd
49
## binary vector; @var{yd}(@var{ii}) is 1 if output @var{y}(@var{ii})$
52
## Binary vector; @var{yd}(@var{ii}) is 1 if output @var{y}(@var{ii})
50
## is discrete (sampled); otherwise  @var{yd}(@var{ii}) 0.
53
## is discrete (sampled); otherwise  @var{yd}(@var{ii}) is 0.
51
##
54
##
52
## @end table
55
## @end table
53
## A warning massage is printed if the system is a mixed
56
## A warning massage is printed if the system is a mixed
54
## continuous and discrete system
57
## continuous and discrete system.
55
##
58
##
56
## @strong{Example}
59
## @strong{Example}
57
## @example
60
## @example
(-)octave-2.1.58/scripts/control/system/sys2tf.m (-2 / +2 lines)
Lines 18-26 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname}] =} sys2tf (@var{sys})
20
## @deftypefn {Function File} {[@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname}] =} sys2tf (@var{sys})
21
## Extract transfer function data from a system data structure
21
## Extract transfer function data from a system data structure.
22
##
22
##
23
## See tf for parameter descriptions.
23
## See @command{tf} for parameter descriptions.
24
##
24
##
25
## @strong{Example}
25
## @strong{Example}
26
## @example
26
## @example
(-)octave-2.1.58/scripts/control/system/sys2zp.m (-2 / +2 lines)
Lines 19-27 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
##@deftypefn {Function File} {[@var{zer}, @var{pol}, @var{k}, @var{tsam}, @var{inname}, @var{outname}] =} sys2zp (@var{sys})
20
##@deftypefn {Function File} {[@var{zer}, @var{pol}, @var{k}, @var{tsam}, @var{inname}, @var{outname}] =} sys2zp (@var{sys})
21
## Extract zero/pole/leading coefficient information from a system data
21
## Extract zero/pole/leading coefficient information from a system data
22
## structure
22
## structure.
23
##
23
##
24
## See zp for parameter descriptions.
24
## See @command{zp} for parameter descriptions.
25
##
25
##
26
## @strong{Example}
26
## @strong{Example}
27
## @example
27
## @example
(-)octave-2.1.58/scripts/control/system/sysappend.m (-10 / +14 lines)
Lines 17-28 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysappend (@var{sys}, @var{b}, @var{c}, @var{d}, @var{outname}, @var{inname}, @var{yd})
20
## @deftypefn {Function File} {@var{sys} =} sysappend (@var{syst}, @var{b}, @var{c}, @var{d}, @var{outname}, @var{inname}, @var{yd})
21
## appends new inputs and/or outputs to a system
21
## appends new inputs and/or outputs to a system
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## @table @var
24
## @table @var
25
## @item sys
25
## @item syst
26
## system data structure
26
## system data structure
27
##
27
##
28
## @item b
28
## @item b
Lines 45-58 Link Here
45
## @math{yd(ii)=1} indicates a discrete output.
45
## @math{yd(ii)=1} indicates a discrete output.
46
## @end table
46
## @end table
47
##
47
##
48
## @strong{Outputs} @var{sys}
48
## @strong{Outputs}
49
## @table @var
50
## @item sys
49
## @example
51
## @example
50
## @group
52
## @group
51
##    sys.b := [sys.b , b]
53
##    sys.b := [syst.b , b]
52
##    sys.c := [sys.c  ]
54
##    sys.c := [syst.c  ]
53
##             [ c     ]
55
##             [ c     ]
54
##    sys.d := [sys.d | D12 ]
56
##    sys.d := [syst.d | D12 ]
55
##             [D21   | D22 ]
57
##             [ D21   | D22 ]
56
## @end group
58
## @end group
57
## @end example
59
## @end example
58
## where @math{D12}, @math{D21}, and @math{D22} are the appropriate dimensioned
60
## where @math{D12}, @math{D21}, and @math{D22} are the appropriate dimensioned
Lines 63-75 Link Here
63
##      the new inputs and outputs are be assigned default names.
65
##      the new inputs and outputs are be assigned default names.
64
## @item @var{yd} is a binary vector of length rows(c) that indicates
66
## @item @var{yd} is a binary vector of length rows(c) that indicates
65
##      continuous/sampled outputs.  Default value for @var{yd} is:
67
##      continuous/sampled outputs.  Default value for @var{yd} is:
66
##
68
## @itemize @minus
67
## @item @var{sys} = continuous or mixed
69
## @item @var{sys} is continuous or mixed
68
## @var{yd} = @code{zeros(1,rows(c))}
70
## @var{yd} = @code{zeros(1,rows(c))}
69
##
71
##
70
## @item @var{sys} = discrete
72
## @item @var{sys} is discrete
71
## @var{yd} = @code{ones(1,rows(c))}
73
## @var{yd} = @code{ones(1,rows(c))}
72
## @end itemize
74
## @end itemize
75
## @end itemize
76
## @end table
73
## @end deftypefn
77
## @end deftypefn
74
78
75
## Author: John Ingram <ingraje@eng.auburn.edu>
79
## Author: John Ingram <ingraje@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/sysconnect.m (-9 / +13 lines)
Lines 17-61 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysconnect (@var{sys}, @var{out_idx}, @var{in_idx}, @var{order}, @var{tol})
20
## @deftypefn {Function File} {@var{clsys} =} sysconnect (@var{sys}, @var{out_idx}, @var{in_idx}, @var{order}, @var{tol})
21
## Close the loop from specified outputs to respective specified inputs
21
## Close the loop from specified outputs to respective specified inputs
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## @table @var
24
## @table @var
25
## @item   sys
25
## @item   sys
26
## system data structure
26
## System data structure.
27
## @item   out_idx
27
## @item   out_idx
28
## @itemx  in_idx
28
## @itemx  in_idx
29
## names or indices of signals to connect (see @code{sysidx}).
29
## Names or indices of signals to connect (see @code{sysidx}).
30
## The output specified by @math{out_idx(ii)} is connected to the input
30
## The output specified by @math{out_idx(ii)} is connected to the input
31
## specified by @math{in_idx(ii)}.
31
## specified by @math{in_idx(ii)}.
32
## @item   order
32
## @item   order
33
## logical flag (default = 0)
33
## logical flag (default = 0)
34
## @table @code
34
## @table @code
35
## @item        0
35
## @item        0
36
## leave inputs and outputs in their original order
36
## Leave inputs and outputs in their original order.
37
## @item        1
37
## @item        1
38
## permute inputs and outputs to the order shown in the diagram below
38
## Permute inputs and outputs to the order shown in the diagram below.
39
## @end table
39
## @end table
40
## @item     tol
40
## @item     tol
41
## tolerance for singularities in algebraic loops default: 200@var{eps}
41
## Tolerance for singularities in algebraic loops, default: 200@code{eps}.
42
## @end table
42
## @end table
43
##
43
##
44
## @strong{Outputs}
44
## @strong{Outputs}
45
## @var{sys}: resulting closed loop system.
45
## @table @var
46
## @item clsys
47
## Resulting closed loop system.
48
## @end table
46
##
49
##
47
## @strong{Method}
50
## @strong{Method}
51
##
48
## @code{sysconnect} internally permutes selected inputs, outputs as shown
52
## @code{sysconnect} internally permutes selected inputs, outputs as shown
49
## below, closes the loop, and then permutes inputs and outputs back to their
53
## below, closes the loop, and then permutes inputs and outputs back to their
50
## original order
54
## original order
51
## @example
55
## @example
52
## @group
56
## @group
53
##                  ____________________
57
##                  --------------------
54
##  u_1       ----->|                  |----> y_1
58
##  u_1       ----->|                  |----> y_1
55
##                  |        sys       |
59
##                  |        sys       |
56
##          old u_2 |                  |
60
##          old u_2 |                  |
57
## u_2* ---->(+)--->|                  |----->y_2
61
## u_2* ---->(+)--->|                  |----->y_2
58
## (in_idx)   ^     -------------------|    | (out_idx)
62
## (in_idx)   ^     --------------------    | (out_idx)
59
##            |                             |
63
##            |                             |
60
##            -------------------------------
64
##            -------------------------------
61
## @end group
65
## @end group
(-)octave-2.1.58/scripts/control/system/syscont.m (-2 / +5 lines)
Lines 20-27 Link Here
20
## @deftypefn {Function File} {[@var{csys}, @var{acd}, @var{ccd}] =} syscont (@var{sys})
20
## @deftypefn {Function File} {[@var{csys}, @var{acd}, @var{ccd}] =} syscont (@var{sys})
21
## Extract the purely continuous subsystem of an input system.
21
## Extract the purely continuous subsystem of an input system.
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Input}
24
## @var{sys} is a system data structure
24
## @table @var
25
## @item sys
26
## system data structure.
27
## @end table
25
##
28
##
26
## @strong{Outputs}
29
## @strong{Outputs}
27
## @table @var
30
## @table @var
(-)octave-2.1.58/scripts/control/system/sysdisc.m (-5 / +8 lines)
Lines 19-35 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{dsys}, @var{adc}, @var{cdc}] =} sysdisc (@var{sys})
20
## @deftypefn {Function File} {[@var{dsys}, @var{adc}, @var{cdc}] =} sysdisc (@var{sys})
21
##
21
##
22
## @strong{Inputs}
22
## @strong{Input}
23
## @var{sys} = system data structure
23
## @table @var
24
## @item sys
25
## System data structure.
26
## @end table
24
##
27
##
25
## @strong{Outputs}
28
## @strong{Outputs}
26
## @table @var
29
## @table @var
27
## @item dsys
30
## @item dsys
28
## purely discrete portion of sys (returned empty if there is
31
## Purely discrete portion of sys (returned empty if there is
29
## no purely discrete path from inputs to outputs)
32
## no purely discrete path from inputs to outputs).
30
## @item    adc
33
## @item    adc
31
## @itemx   cdc
34
## @itemx   cdc
32
## connections from continuous states to discrete states and discrete
35
## Connections from continuous states to discrete states and discrete.
33
## outputs, respectively.
36
## outputs, respectively.
34
## @end table
37
## @end table
35
## @end deftypefn
38
## @end deftypefn
(-)octave-2.1.58/scripts/control/system/sysdup.m (-8 / +11 lines)
Lines 17-23 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysdup (@var{asys}, @var{out_idx}, @var{in_idx})
20
## @deftypefn {Function File} {@var{retsys} =} sysdup (@var{asys}, @var{out_idx}, @var{in_idx})
21
## Duplicate specified input/output connections of a system
21
## Duplicate specified input/output connections of a system
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
Lines 30-52 Link Here
30
## duplicates are made of @code{y(out_idx(ii))} and @code{u(in_idx(ii))}.
30
## duplicates are made of @code{y(out_idx(ii))} and @code{u(in_idx(ii))}.
31
## @end table
31
## @end table
32
##
32
##
33
## @strong{Outputs}
33
## @strong{Output}
34
## @var{retsys}: resulting closed loop system:
34
## @table @var
35
## @item retsys
36
## Resulting closed loop system:
35
## duplicated i/o names are appended with a @code{"+"} suffix.
37
## duplicated i/o names are appended with a @code{"+"} suffix.
36
##
38
## @end table
37
##
39
##
38
## @strong{Method}
40
## @strong{Method}
41
##
39
## @code{sysdup} creates copies of selected inputs and outputs as
42
## @code{sysdup} creates copies of selected inputs and outputs as
40
## shown below.  u1/y1 is the set of original inputs/outputs, and
43
## shown below.  @var{u1}, @var{y1} is the set of original inputs/outputs, and
41
## u2,y2 is the set of duplicated inputs/outputs in the order specified
44
## @var{u2}, @var{y2} is the set of duplicated inputs/outputs in the order 
42
## in @var{in_idx}, @var{out_idx}, respectively
45
## specified in @var{in_idx}, @var{out_idx}, respectively
43
## @example
46
## @example
44
## @group
47
## @group
45
##           ____________________
48
##           ____________________
46
## u1  ----->|                  |----> y1
49
## u1  ----->|                  |----> y1
47
##           |       asys       |
50
##           |       asys       |
48
## u2 ------>|                  |----->y2
51
## u2 ------>|                  |----->y2
49
## (in_idx)  -------------------| (out_idx)
52
## (in_idx)  -------------------- (out_idx)
50
## @end group
53
## @end group
51
## @end example
54
## @end example
52
## @end deftypefn
55
## @end deftypefn
(-)octave-2.1.58/scripts/control/system/sysgetsignals.m (-13 / +17 lines)
Lines 58-85 Link Here
58
##
58
##
59
## @strong{Outputs}
59
## @strong{Outputs}
60
## @table @bullet
60
## @table @bullet
61
## @item If @var{sigid} is not specified
61
## @item If @var{sigid} is not specified:
62
## @table @var
62
## @table @var
63
## @item stname
63
## @item stname
64
## @itemx inname
64
## @itemx inname
65
## @itemx outname
65
## @itemx outname
66
## signal names (cell array of strings);  names of states,
66
## signal names (cell array of strings);  names of states,
67
## inputs, and outputs, respectively
67
## inputs, and outputs, respectively.
68
## @item yd
68
## @item yd
69
## binary vector; @var{yd}(@var{ii}) is nonzero if output @var{ii} is
69
## binary vector; @var{yd}(@var{ii}) is nonzero if output @var{ii} is
70
## discrete.
70
## discrete.
71
## @end table
71
## @end table
72
##
72
##
73
## @item If @var{sigid} is specified but @var{signum} is not specified, then
73
## @item If @var{sigid} is specified but @var{signum} is not specified:
74
## @table @code
74
## @table @code
75
## @item sigid="in"
75
## @item sigid="in"
76
## @var{siglist} is set to the cell array of input names
76
## @var{siglist} is set to the cell array of input names.
77
##
77
##
78
## @item sigid="out"
78
## @item sigid="out"
79
## @var{siglist} is set to the cell array of output names
79
## @var{siglist} is set to the cell array of output names.
80
##
80
##
81
## @item sigid="st"
81
## @item sigid="st"
82
## @var{siglist} is set to the cell array of state names
82
## @var{siglist} is set to the cell array of state names.
83
##
83
##
84
## stage signals
84
## stage signals
85
## @item sigid="yd"
85
## @item sigid="yd"
Lines 89-97 Link Here
89
##
89
##
90
## @end table
90
## @end table
91
##
91
##
92
## @item if the first three input arguments are specified, then @var{signame} is
92
## @item If the first three input arguments are specified:
93
## a cell array of the specified signal names (@var{sigid} is @code{"in"},
93
## @var{signame} is a cell array of the specified signal names (@var{sigid} is 
94
## @code{"out"}, or @code{"st"}), or else the logical flag
94
## @code{"in"}, @code{"out"}, or @code{"st"}), or else the logical flag
95
## indicating whether output(s) @var{signum} is(are) discrete (@var{sigval}=1)
95
## indicating whether output(s) @var{signum} is(are) discrete (@var{sigval}=1)
96
## or continuous (@var{sigval}=0).
96
## or continuous (@var{sigval}=0).
97
## @end table
97
## @end table
Lines 99-105 Link Here
99
## @strong{Examples} (From @code{sysrepdemo})
99
## @strong{Examples} (From @code{sysrepdemo})
100
## @example
100
## @example
101
## octave> sys=ss(rand(4),rand(4,2),rand(3,4));
101
## octave> sys=ss(rand(4),rand(4,2),rand(3,4));
102
## octave> [Ast,Ain,Aout,Ayd] = sysgetsignals(sys) i  # get all signal names
102
## octave># get all signal names
103
## octave> [Ast,Ain,Aout,Ayd] = sysgetsignals(sys)
103
## Ast =
104
## Ast =
104
## (
105
## (
105
##   [1] = x_1
106
##   [1] = x_1
Lines 121-138 Link Here
121
## Ayd =
122
## Ayd =
122
##
123
##
123
##   0  0  0
124
##   0  0  0
124
## octave> Ain = sysgetsignals(sys,"in")   # get only input signal names
125
## octave> # get only input signal names:
126
## octave> Ain = sysgetsignals(sys,"in")
125
## Ain =
127
## Ain =
126
## (
128
## (
127
##   [1] = u_1
129
##   [1] = u_1
128
##   [2] = u_2
130
##   [2] = u_2
129
## )
131
## )
130
## octave> Aout = sysgetsignals(sys,"out",2)   # get name of output 2 (in cell array)
132
## octave> # get name of output 2 (in cell array):
133
## octave> Aout = sysgetsignals(sys,"out",2)
131
## Aout =
134
## Aout =
132
## (
135
## (
133
##   [1] = y_2
136
##   [1] = y_2
134
## )
137
## )
135
## octave> Aout = sysgetsignals(sys,"out",2,1)  # get name of output 2 (as string)
138
## octave> # get name of output 2 (as string):
139
## octave> Aout = sysgetsignals(sys,"out",2,1)
136
## Aout = y_2
140
## Aout = y_2
137
## @end example
141
## @end example
138
## @end deftypefn
142
## @end deftypefn
(-)octave-2.1.58/scripts/control/system/sysgettype.m (-7 / +12 lines)
Lines 20-34 Link Here
20
## @deftypefn {Function File} {} sysgettype (@var{sys})
20
## @deftypefn {Function File} {} sysgettype (@var{sys})
21
## return the initial system type of the system
21
## return the initial system type of the system
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Input}
24
## @var{sys}: system data structure
24
## @table @var
25
## @item sys
26
## System data structure.
27
## @end table
25
##
28
##
26
## @strong{Outputs}
29
## @strong{Output}
27
## @var{systype}: string indicating how the structure was initially
30
## @table @var
28
## constructed:
31
## @item systype
29
## values: @code{"ss"}, @code{"zp"}, or @code{"tf"}
32
## String indicating how the structure was initially
33
## constructed. Values: @code{"ss"}, @code{"zp"}, or @code{"tf"}.
34
## @end table
30
##
35
##
31
## FIR initialized systems return @code{systype="tf"}.
36
## @acronym{FIR} initialized systems return @code{systype="tf"}.
32
## @end deftypefn
37
## @end deftypefn
33
38
34
function systype = sysgettype (sys)
39
function systype = sysgettype (sys)
(-)octave-2.1.58/scripts/control/system/sysgroup.m (-6 / +12 lines)
Lines 17-30 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysgroup (@var{asys}, @var{bsys})
20
## @deftypefn {Function File} {@var{sys} =} sysgroup (@var{asys}, @var{bsys})
21
## Combines two systems into a single system
21
## Combines two systems into a single system.
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## @var{asys}, @var{bsys}: system data structures
24
## @table @var
25
## @item asys
26
## @itemx bsys
27
## System data structures.
28
## @end table
25
##
29
##
26
## @strong{Outputs}
30
## @strong{Output}
31
## @table @var
32
## @item sys
27
## @math{sys = @r{block diag}(asys,bsys)}
33
## @math{sys = @r{block diag}(asys,bsys)}
34
## @end table
28
## @example
35
## @example
29
## @group
36
## @group
30
##          __________________
37
##          __________________
Lines 39-46 Link Here
39
## @end group
46
## @end group
40
## @end example
47
## @end example
41
## The function also rearranges the internal state-space realization of @var{sys}
48
## The function also rearranges the internal state-space realization of @var{sys}
42
## so that the
49
## so that the continuous states come first and the discrete states come last.
43
## continuous states come first and the discrete states come last.
44
## If there are duplicate names, the second name has a unique suffix appended
50
## If there are duplicate names, the second name has a unique suffix appended
45
## on to the end of the name.
51
## on to the end of the name.
46
## @end deftypefn
52
## @end deftypefn
(-)octave-2.1.58/scripts/control/system/sysmin.m (-14 / +26 lines)
Lines 18-37 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{retsys}, @var{nc}, @var{no}] =} sysmin (@var{sys}, @var{flg})
20
## @deftypefn {Function File} {[@var{retsys}, @var{nc}, @var{no}] =} sysmin (@var{sys}, @var{flg})
21
## return a minimal (or reduced order) system
21
## Returns a minimal (or reduced order) system
22
## inputs:
22
##
23
##   sys: system data structure
23
## @strong{Inputs}
24
##   flg: 0 [default] return minimal system; state names lost
24
## @table @var
25
##      : 1           return system with physical states removed that
25
## @item sys
26
##                    are either uncontrollable or unobservable
26
## System data structure
27
##                    (cannot reduce further without discarding physical
27
## @item flg
28
##                    meaning of states)
28
## When equal to 0 (default value), returns minimal system,
29
## outputs:
29
## in which state names are lost; when equal to 1, returns system 
30
##   retsys: returned system
30
## with physical states removed that are either uncontrollable or 
31
##   nc: number of controllable states in the returned system
31
## unobservable (cannot reduce further without discarding physical
32
##   no: number of observable states in the returned system
32
## meaning of states).
33
##   cflg: is_controllable(retsys)
33
## @end table
34
##   oflg: is_observable(retsys)
34
## @strong{Outputs}
35
## @table @var
36
## @item retsys
37
## Returned system.
38
## @item nc
39
## Number of controllable states in the returned system.
40
## @item no
41
## Number of observable states in the returned system.
42
## @item cflg
43
## @code{is_controllable(retsys)}.
44
## @item oflg
45
## @code{is_observable(retsys)}.
46
## @end table
35
## @end deftypefn
47
## @end deftypefn
36
48
37
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
49
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/sysmult.m (-5 / +5 lines)
Lines 17-34 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysmult (@var{asys}, @var{bsys})
20
## @deftypefn {Function File} {@var{sys} =} sysmult (@var{Asys}, @var{Bsys})
21
## Compute @math{sys = Asys*Bsys} (series connection):
21
## Compute @math{sys = Asys*Bsys} (series connection):
22
## @example
22
## @example
23
## @group
23
## @group
24
## u   ----------     ----------
24
## u   ----------     ----------
25
## --->|  bsys  |---->|  asys  |--->
25
## --->|  Bsys  |---->|  Asys  |--->
26
##     ----------     ----------
26
##     ----------     ----------
27
## @end group
27
## @end group
28
## @end example
28
## @end example
29
## A warning occurs if there is direct feed-through
29
## A warning occurs if there is direct feed-through from an input 
30
## from an input of Bsys or a continuous state of @var{bsys} through a
30
## or a continuous state of @var{Bsys}, through a discrete output 
31
## discrete output of Bsys to a continuous state or output in @var{asys}
31
## of @var{Bsys}, to a continuous state or output in @var{Asys}
32
## (system data structure does not recognize discrete inputs).
32
## (system data structure does not recognize discrete inputs).
33
## @end deftypefn
33
## @end deftypefn
34
34
(-)octave-2.1.58/scripts/control/system/sysprune.m (-5 / +7 lines)
Lines 17-23 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysprune (@var{asys}, @var{out_idx}, @var{in_idx})
20
## @deftypefn {Function File} {@var{retsys} =} sysprune (@var{asys}, @var{out_idx}, @var{in_idx})
21
## Extract specified inputs/outputs from a system
21
## Extract specified inputs/outputs from a system
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
Lines 26-34 Link Here
26
## system data structure
26
## system data structure
27
## @item out_idx
27
## @item out_idx
28
## @itemx in_idx
28
## @itemx in_idx
29
##
30
## Indices or signal names of the outputs and inputs to be kept in the returned
29
## Indices or signal names of the outputs and inputs to be kept in the returned
31
## system; remaining connections are "pruned" off.
30
## system; remaining connections are ``pruned'' off.
32
## May select as [] (empty matrix) to specify all outputs/inputs.
31
## May select as [] (empty matrix) to specify all outputs/inputs.
33
##
32
##
34
## @example
33
## @example
Lines 38-45 Link Here
38
##
37
##
39
## @end table
38
## @end table
40
##
39
##
41
## @strong{Outputs}
40
## @strong{Output}
42
## @var{retsys}: resulting system
41
## @table @var
42
## @item retsys
43
## Resulting system.
44
## @end table
43
## @example
45
## @example
44
## @group
46
## @group
45
##            ____________________
47
##            ____________________
(-)octave-2.1.58/scripts/control/system/sysreorder.m (-4 / +12 lines)
Lines 17-30 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysreorder (@var{vlen}, @var{list})
20
## @deftypefn {Function File} {@var{pv} =} sysreorder (@var{vlen}, @var{list})
21
##
21
##
22
## @strong{Inputs}
22
## @strong{Inputs}
23
## @var{vlen}=vector length, @var{list}= a subset of @code{[1:vlen]},
23
## @table @var
24
## @item vlen
25
## Vector length.
26
## @item list
27
## A subset of @code{[1:vlen]}.
28
## @end table
24
##
29
##
25
## @strong{Outputs}
30
## @strong{Output}
26
## @var{pv}: a permutation vector to order elements of @code{[1:vlen]} in
31
## @table @var
32
## @item pv
33
## A permutation vector to order elements of @code{[1:vlen]} in
27
## @code{list} to the end of a vector.
34
## @code{list} to the end of a vector.
35
## @end table
28
##
36
##
29
## Used internally by @code{sysconnect} to permute vector elements to their
37
## Used internally by @code{sysconnect} to permute vector elements to their
30
## desired locations.
38
## desired locations.
(-)octave-2.1.58/scripts/control/system/sysscale.m (-5 / +16 lines)
Lines 17-36 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sysscale (@var{sys}, @var{outscale}, @var{inscale}, @var{outname}, @var{inname})
20
## @deftypefn {Function File} {@var{retsys} =} sysscale (@var{sys}, @var{outscale}, @var{inscale}, @var{outname}, @var{inname})
21
## scale inputs/outputs of a system.
21
## scale inputs/outputs of a system.
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## sys: structured system
24
## @table @var
25
## outscale, inscale: constant matrices of appropriate dimension
25
## @item sys
26
## Structured system.
27
## @item outscale
28
## @itemx inscale
29
## Constant matrices of appropriate dimension.
30
## @item outname
31
## @itemx inname
32
## Lists of strings with the names of respectively outputs and inputs.
33
## @end table
26
##
34
##
27
## @strong{Outputs}
35
## @strong{Output}
28
## @var{sys}: resulting open loop system:
36
## @table @var
37
## @item retsys
38
## resulting open loop system:
29
## @example
39
## @example
30
##       -----------    -------    -----------
40
##       -----------    -------    -----------
31
## u --->| inscale |--->| sys |--->| outscale |---> y
41
## u --->| inscale |--->| sys |--->| outscale |---> y
32
##       -----------    -------    -----------
42
##       -----------    -------    -----------
33
## @end example
43
## @end example
44
## @end table
34
## If the input names and output names (each a list of strings)
45
## If the input names and output names (each a list of strings)
35
## are not given and the scaling matrices
46
## are not given and the scaling matrices
36
## are not square, then default names will be given to the inputs and/or
47
## are not square, then default names will be given to the inputs and/or
(-)octave-2.1.58/scripts/control/system/syssetsignals.m (-9 / +14 lines)
Lines 19-47 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} syssetsignals (@var{sys}, @var{opt}, @var{names}, @var{sig_idx})
20
## @deftypefn {Function File} {} syssetsignals (@var{sys}, @var{opt}, @var{names}, @var{sig_idx})
21
## change the names of selected inputs, outputs and states.
21
## change the names of selected inputs, outputs and states.
22
##
22
## @strong{Inputs}
23
## @strong{Inputs}
23
## @table @var
24
## @table @var
24
## @item sys
25
## @item sys
25
## system data structure
26
## System data structure.
26
##
27
##
27
## @item opt
28
## @item opt
28
## change default name (output)
29
## Change default name (output).
29
##
30
##
30
## @table @code
31
## @table @code
31
## @item "out"
32
## @item "out"
32
## change selected output names
33
## Change selected output names.
33
## @item "in"
34
## @item "in"
34
## change selected input names
35
## Change selected input names.
35
## @item "st"
36
## @item "st"
36
## change selected state names
37
## Change selected state names.
37
## @item "yd"
38
## @item "yd"
38
## change selected outputs from discrete to continuous or
39
## Change selected outputs from discrete to continuous or
39
## from continuous to discrete.
40
## from continuous to discrete.
40
## @end table
41
## @end table
41
##
42
##
42
## @item names
43
## @item names
43
## @table @code
44
## @table @code
44
## @item opt = "out", "in", or "st"
45
## @item opt = "out", "in", "st"
45
## string or string array containing desired signal names or values.
46
## string or string array containing desired signal names or values.
46
## @item opt = "yd"
47
## @item opt = "yd"
47
## To desired output continuous/discrete flag.
48
## To desired output continuous/discrete flag.
Lines 53-61 Link Here
53
##
54
##
54
## Default: replace entire cell array of names/entire yd vector.
55
## Default: replace entire cell array of names/entire yd vector.
55
## @end table
56
## @end table
57
##
56
## @strong{Outputs}
58
## @strong{Outputs}
57
## @var{retsys=sys} with appropriate signal names changed
59
## @table @var
58
## (or yd values, where appropriate)
60
## @item retsys
61
## @var{sys} with appropriate signal names changed
62
## (or @var{yd} values, where appropriate).
63
## @end table
59
##
64
##
60
## @strong{Example}
65
## @strong{Example}
61
## @example
66
## @example
(-)octave-2.1.58/scripts/control/system/syssub.m (-5 / +7 lines)
Lines 17-38 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} syssub (@var{gsys}, @var{hsys})
20
## @deftypefn {Function File} {@var{sys} =} syssub (@var{Gsys}, @var{Hsys})
21
## Return @math{sys = Gsys - Hsys}.
21
## Return @math{sys = Gsys - Hsys}.
22
##
22
##
23
## Method: @var{gsys} and @var{hsys} are connected in parallel
23
## @strong{Method}
24
##
25
## @var{Gsys} and @var{Hsys} are connected in parallel.
24
## The input vector is connected to both systems; the outputs are
26
## The input vector is connected to both systems; the outputs are
25
## subtracted.  Returned system names are those of @var{gsys}.
27
## subtracted.  Returned system names are those of @var{Gsys}.
26
## @example
28
## @example
27
## @group
29
## @group
28
##          +--------+
30
##          +--------+
29
##     +--->|  gsys  |---+
31
##     +--->|  Gsys  |---+
30
##     |    +--------+   |
32
##     |    +--------+   |
31
##     |                +|
33
##     |                +|
32
## u --+                (_)--> y
34
## u --+                (_)--> y
33
##     |                -|
35
##     |                -|
34
##     |    +--------+   |
36
##     |    +--------+   |
35
##     +--->|  hsys  |---+
37
##     +--->|  Hsys  |---+
36
##          +--------+
38
##          +--------+
37
## @end group
39
## @end group
38
## @end example
40
## @end example
(-)octave-2.1.58/scripts/control/system/sysupdate.m (-3 / +6 lines)
Lines 39-48 Link Here
39
## @end table
39
## @end table
40
##
40
##
41
## @strong{Outputs}
41
## @strong{Outputs}
42
## @var{retsys}: contains union of data in sys and requested data.
42
## @table @var
43
## If requested data in sys is already up to date then retsys=sys.
43
## @item retsys
44
## Contains union of data in sys and requested data.
45
## If requested data in @var{sys} is already up to date then @var{retsys}=@var{sys}.
46
## @end table
44
##
47
##
45
## Conversion to @code{tf} or @code{zp} exits with an error if the system is
48
## Conversion to @command{tf} or @command{zp} exits with an error if the system is
46
## mixed continuous/digital.
49
## mixed continuous/digital.
47
## @end deftypefn
50
## @end deftypefn
48
## @seealso{tf, ss, zp, sysout, sys2ss, sys2tf, and sys2zp}
51
## @seealso{tf, ss, zp, sysout, sys2ss, sys2tf, and sys2zp}
(-)octave-2.1.58/scripts/control/system/tf2ss.m (-15 / +27 lines)
Lines 17-45 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} tf2ss (@var{inputs})
20
## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}] =} tf2ss (@var{num}, @var{den})
21
## @format
22
## Conversion from tranfer function to state-space.
21
## Conversion from tranfer function to state-space.
23
## The state space system
22
## The state space system:
23
## @iftex
24
## @tex
25
## $$ \dot x = A\,x + B\,u $$
26
## $$ y = C\,x + D\,u $$
27
## @end tex
28
## @end iftex
29
## @ifinfo
30
## @example
24
##       .
31
##       .
25
##       x = Ax + Bu
32
##       x = Ax + Bu
26
##       y = Cx + Du
33
##       y = Cx + Du
27
##
34
## @end example
28
## is obtained from a transfer function
35
## @end ifinfo
29
##
36
## is obtained from a transfer function:
37
## @iftex
38
## @tex
39
## $$ G(s) = { { \rm num }(s) \over { \rm den }(s) } $$
40
## @end tex
41
## @end iftex
42
## @ifinfo
43
## @example
30
##                 num(s)
44
##                 num(s)
31
##           G(s)=-------
45
##           G(s)=-------
32
##                 den(s)
46
##                 den(s)
47
## @end example
48
## @end ifinfo
33
##
49
##
34
## via the function call [a,b,c,d] = tf2ss(num,den).
50
## The vector @var{den} must contain only one row, whereas the vector 
35
## The vector 'den' must contain only one row, whereas the vector 'num'
51
## @var{num} may contain as many rows as there are outputs @var{y} of 
36
## may contain as many rows as there are outputs of the system 'y'.
52
## the system. The state space system matrices obtained from this function 
37
## The state space system matrices obtained from this function will be
53
## will be in controllable canonical form as described in @cite{Modern Control 
38
## in controllable canonical form as described in "Modern Control Theory",
54
## Theory}, (Brogan, 1991).
39
## [Brogan, 1991].
40
##
41
##
42
## @end format
43
## @end deftypefn
55
## @end deftypefn
44
56
45
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
57
## Author: R. Bruce Tenison <btenison@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/tf2sys.m (-6 / +9 lines)
Lines 18-40 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} tf2sys (@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname})
20
## @deftypefn {Function File} {} tf2sys (@var{num}, @var{den}, @var{tsam}, @var{inname}, @var{outname})
21
## build system data structure from transfer function format data
21
## Build system data structure from transfer function format data.
22
##
22
##
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## @table @var
24
## @table @var
25
## @item  num
25
## @item  num
26
## @itemx den
26
## @itemx den
27
## coefficients of numerator/denominator polynomials
27
## Coefficients of numerator/denominator polynomials.
28
## @item tsam
28
## @item tsam
29
## sampling interval. default: 0 (continuous time)
29
## Sampling interval; default: 0 (continuous time).
30
## @item inname
30
## @item inname
31
## @itemx outname
31
## @itemx outname
32
## input/output signal names; may be a string or cell array with a single string
32
## Input/output signal names; may be a string or cell array with a single string
33
## entry.
33
## entry.
34
## @end table
34
## @end table
35
##
35
##
36
## @strong{Outputs}
36
## @strong{Output}
37
## @var{sys} = system data structure
37
## @table @var
38
## @item sys
39
## System data structure.
40
## @end table
38
##
41
##
39
## @strong{Example}
42
## @strong{Example}
40
## @example
43
## @example
(-)octave-2.1.58/scripts/control/system/tf2zp.m (-4 / +5 lines)
Lines 17-27 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} tf2zp (@var{inputs})
20
## @deftypefn {Function File} {[@var{zer}, @var{pol}, @var{k}] =} tf2zp (@var{num}, @var{den})
21
## Converts transfer functions to poles / zeros.
21
## Converts transfer functions to poles-and-zero representations.
22
##
22
##
23
## [zer,pol,k] = tf2zp(num,den) returns the zeros and poles of the SISO system
23
## Returns the zeros and poles of the @acronym{SISO} system defined 
24
## defined by num/den.  K is a gain associated with the system zeros.
24
## by @var{num}/@var{den}.
25
## @var{k} is a gain associated with the system zeros.
25
## @end deftypefn
26
## @end deftypefn
26
27
27
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
28
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/system/ugain.m (-2 / +2 lines)
Lines 20-27 Link Here
20
## @deftypefn {Function File} {} ugain (@var{n})
20
## @deftypefn {Function File} {} ugain (@var{n})
21
## Creates a system with unity gain, no states.
21
## Creates a system with unity gain, no states.
22
## This trivial system is sometimes needed to create arbitrary
22
## This trivial system is sometimes needed to create arbitrary
23
## complex systems from simple systems with buildssic.
23
## complex systems from simple systems with @command{buildssic}.
24
## Watch out if you are forming sampled systems since "ugain"
24
## Watch out if you are forming sampled systems since @command{ugain}
25
## does not contain a sampling period.
25
## does not contain a sampling period.
26
## @end deftypefn
26
## @end deftypefn
27
## @seealso{hinfdemo and jet707}
27
## @seealso{hinfdemo and jet707}
(-)octave-2.1.58/scripts/control/system/zp2ss.m (-16 / +25 lines)
Lines 19-49 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}] =} zp2ss (@var{zer}, @var{pol}, @var{k})
20
## @deftypefn {Function File} {[@var{a}, @var{b}, @var{c}, @var{d}] =} zp2ss (@var{zer}, @var{pol}, @var{k})
21
## Conversion from zero / pole to state space.
21
## Conversion from zero / pole to state space.
22
##
22
## @strong{Inputs}
23
## @strong{Inputs}
23
## @table @var
24
## @table @var
24
## @item zer
25
## @item zer
25
## @itemx pol
26
## @itemx pol
26
## vectors of (possibly) complex poles and zeros of a transfer
27
## Vectors of (possibly) complex poles and zeros of a transfer
27
## function.  Complex values must come in conjugate pairs
28
## function. Complex values must come in conjugate pairs
28
## (i.e., x+jy in zer means that x-jy is also in zer)
29
## (i.e., @math{x+jy} in @var{zer} means that @math{x-jy} is also in @var{zer}).
30
## The number of zeros must not exceed the number of poles.
29
## @item k
31
## @item k
30
## real scalar (leading coefficient)
32
## Real scalar (leading coefficient).
31
## @end table
33
## @end table
34
##
32
## @strong{Outputs}
35
## @strong{Outputs}
33
##  @var{a}, @var{b}, @var{c}, @var{d}
36
## @table @var
34
## The state space system
37
## @item @var{a}
38
## @itemx @var{b}
39
## @itemx @var{c}
40
## @itemx @var{d}
41
## The state space system, in the form:
42
## @iftex
43
## @tex
44
## $$ \dot x = A\,x + B\,u $$
45
## $$ y = C\,x + D\,u $$
46
## @end tex
47
## @end iftex
48
## @ifinfo
35
## @example
49
## @example
36
## .
50
##      .
37
## x = Ax + Bu
51
##      x = Ax + Bu
38
## y = Cx + Du
52
##      y = Cx + Du
39
## @end example
53
## @end example
40
## is obtained from a vector of zeros and a vector of poles via the
54
## @end ifinfo
41
## function call @code{[a,b,c,d] = zp2ss(zer,pol,k)}.
55
## @end table
42
## The vectors @samp{zer} and
43
## @samp{pol} may either be row or column vectors.  Each zero and pole that
44
## has an imaginary part must have a conjugate in the list.
45
## The number of zeros must not exceed the number of poles.
46
## @samp{k} is @code{zp}-form leading coefficient.
47
## @end deftypefn
56
## @end deftypefn
48
57
49
## Author: David Clem
58
## Author: David Clem
(-)octave-2.1.58/scripts/control/system/zp2sys.m (-7 / +10 lines)
Lines 23-42 Link Here
23
## @strong{Inputs}
23
## @strong{Inputs}
24
## @table @var
24
## @table @var
25
## @item   zer
25
## @item   zer
26
## vector of system zeros
26
## Vector of system zeros.
27
## @item   pol
27
## @item   pol
28
## vector of system poles
28
## Vector of system poles.
29
## @item   k
29
## @item   k
30
## scalar leading coefficient
30
## Scalar leading coefficient.
31
## @item   tsam
31
## @item   tsam
32
## sampling period. default: 0 (continuous system)
32
## Sampling period; default: 0 (continuous system).
33
## @item   inname
33
## @item   inname
34
## @itemx  outname
34
## @itemx  outname
35
## input/output signal names (lists of strings)
35
## Input/output signal names (lists of strings).
36
## @end table
36
## @end table
37
##
37
##
38
## @strong{Outputs}
38
## @strong{Output}
39
## sys: system data structure
39
## @table @var
40
## @item sys
41
## System data structure.
42
## @end table
40
##
43
##
41
## @strong{Example}
44
## @strong{Example}
42
## @example
45
## @example
(-)octave-2.1.58/scripts/control/system/zp2tf.m (-5 / +4 lines)
Lines 19-35 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {[@var{num}, @var{den}] =} zp2tf (@var{zer}, @var{pol}, @var{k})
20
## @deftypefn {Function File} {[@var{num}, @var{den}] =} zp2tf (@var{zer}, @var{pol}, @var{k})
21
## Converts zeros / poles to a transfer function.
21
## Converts zeros / poles to a transfer function.
22
##
22
## @strong{Inputs}
23
## @strong{Inputs}
23
## @table @var
24
## @table @var
24
## @item zer
25
## @item zer
25
## @itemx pol
26
## @itemx pol
26
## vectors of (possibly complex) poles and zeros of a transfer
27
## Vectors of (possibly complex) poles and zeros of a transfer
27
## function.  Complex values should appear in conjugate pairs
28
## function.  Complex values must appear in conjugate pairs.
28
## @item k
29
## @item k
29
## real scalar (leading coefficient)
30
## Real scalar (leading coefficient).
30
## @end table
31
## @end table
31
## @code{[num,den] = zp2tf(zer,pol,k)} forms the transfer function
32
## @code{num/den} from the vectors of poles and zeros.
33
## @end deftypefn
32
## @end deftypefn
34
33
35
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
34
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/util/axis2dlim.m (-7 / +14 lines)
Lines 18-32 Link Here
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn{Function File} {} axis2dlim (@var{axdata})
20
## @deftypefn{Function File} {} axis2dlim (@var{axdata})
21
## determine axis limits for 2-d data(column vectors); leaves a 10% margin
21
## Determine axis limits for 2-D data (column vectors); leaves a 10%
22
## around the plots.
22
## margin around the plots.
23
## puts in margins of +/- 0.1 if data is one dimensional (or a single point)
23
## Inserts margins of +/- 0.1 if data is one-dimensional 
24
## (or a single point).
24
##
25
##
25
## @strong{Inputs}
26
## @strong{Input}
26
## @var{axdata} nx2 matrix of data [x,y]
27
## @table @var
28
## @item axdata
29
## @var{n} by 2 matrix of data [@var{x}, @var{y}].
30
## @end table
27
##
31
##
28
## @strong{Outputs}
32
## @strong{Output}
29
## @var{axvec} vector of axis limits appropriate for call to axis() function
33
## @table @var
34
## @item axvec
35
## Vector of axis limits appropriate for call to @command{axis} function.
36
## @end table
30
## @end deftypefn
37
## @end deftypefn
31
38
32
function axvec = axis2dlim (axdata)
39
function axvec = axis2dlim (axdata)
(-)octave-2.1.58/scripts/control/util/prompt.m (-5 / +10 lines)
Lines 17-28 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} prompt (@var{inputs})
20
## @deftypefn {Function File} {} prompt (@var{str})
21
## @format
22
## function prompt([str])
23
## Prompt user to continue
21
## Prompt user to continue
24
## str: input string. Default value: "\n ---- Press a key to continue ---"
22
## 
25
## @end format
23
## @strong{Input}
24
## @table @var
25
## @item str
26
## Input string. Its default value is: 
27
## @example 
28
## \n ---- Press a key to  continue ---
29
## @end example
30
## @end table
26
## @end deftypefn
31
## @end deftypefn
27
32
28
## Author: David Clem
33
## Author: David Clem
(-)octave-2.1.58/scripts/control/util/sortcom.m (-13 / +27 lines)
Lines 17-36 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} sortcom (@var{inputs})
20
## @deftypefn {Function File} {[@var{yy}, @var{idx}] =} sortcom (@var{xx}[, @var{opt}])
21
## @format
21
## Sort a complex vector.
22
## [yy,idx] = sortcom(xx[,opt]): sort a complex vector
23
## xx: complex vector
24
## opt: sorting option:
25
##  "re": real part (default)
26
##  "mag": by magnitude
27
##  "im": by imaginary part
28
##
22
##
29
## if opt != "im" then complex conjugate pairs are grouped together,
23
## @strong{Inputs}
30
## a - jb followed by a + jb.
24
## @table @var
31
## yy: sorted values
25
## @item xx
32
## idx: permutation vector: yy = xx(idx)
26
## Complex vector
33
## @end format
27
## @item opt
28
## sorting option:
29
## @table @code
30
## @item "re"
31
## Real part (default);
32
## @item "mag"
33
## By magnitude;
34
## @item "im"
35
## By imaginary part.
36
## @end table
37
## if @var{opt} is not chosen as @code{"im"}, then complex conjugate pairs are grouped together,
38
## @math{a - jb} followed by @math{a + jb}.
39
## @end table
40
##
41
## @strong{Outputs}
42
## @table @var
43
## @item yy
44
## Sorted values
45
## @item idx
46
## Permutation vector: @code{yy = xx(idx)}
47
## @end table
34
## @end deftypefn
48
## @end deftypefn
35
49
36
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
50
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/control/util/zgfmul.m (-3 / +3 lines)
Lines 17-25 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} zgfmul (@var{a}, @var{b}, @var{c}, @var{d}, @var{x})
20
## @deftypefn {Function File} {@var{y} =} zgfmul (@var{a}, @var{b}, @var{c}, @var{d}, @var{x})
21
## Compute product of zgep incidence matrix @math{F} with vector @var{x}.
21
## Compute product of @var{zgep} incidence matrix @math{F} with vector @var{x}.
22
## Used by zgepbal (in zgscal) as part of generalized conjugate gradient
22
## Used by @command{zgepbal} (in @command{zgscal}) as part of generalized conjugate gradient
23
## iteration.
23
## iteration.
24
## @end deftypefn
24
## @end deftypefn
25
25
(-)octave-2.1.58/scripts/control/util/zginit.m (-3 / +3 lines)
Lines 17-26 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} zginit (@var{a}, @var{b}, @var{c}, @var{d})
20
## @deftypefn {Function File} {@var{zz} =} zginit (@var{a}, @var{b}, @var{c}, @var{d})
21
## Construct right hand side vector zz
21
## Construct right hand side vector @var{zz}
22
## for the zero-computation generalized eigenvalue problem
22
## for the zero-computation generalized eigenvalue problem
23
## balancing procedure.  Called by zgepbal.
23
## balancing procedure.  Called by @command{zgepbal}.
24
## @end deftypefn
24
## @end deftypefn
25
25
26
## References:
26
## References:
(-)octave-2.1.58/scripts/control/util/__zgpbal__.m (-6 / +7 lines)
Lines 19-36 Link Here
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} __zgpbal__ (@var{sys})
20
## @deftypefn {Function File} {} __zgpbal__ (@var{sys})
21
##
21
##
22
## used internally in @code{tzero}; minimal argument checking performed
22
## Used internally in @command{tzero}; minimal argument checking performed.
23
##
23
##
24
## implementation of zero computation generalized eigenvalue problem
24
## Implementation of zero computation generalized eigenvalue problem
25
## balancing method (Hodel and Tiller, Allerton Conference, 1991)
25
## balancing method (Hodel and Tiller, Allerton Conference, 1991)
26
## Based on Ward's balancing algorithm (SIAM J. Sci Stat. Comput., 1981)
26
## Based on Ward's balancing algorithm (@acronym{SIAM} J. Sci Stat. Comput., 1981).
27
##
27
##
28
## __zgpbal__ computes a state/input/output weighting that attempts to
28
## @command{__zgpbal__} computes a state/input/output weighting that attempts to
29
## reduced the range of the magnitudes of the nonzero elements of [a,b,c,d]
29
## reduced the range of the magnitudes of the nonzero elements of [@var{a}, @var{b},
30
## @var{c}, @var{d}].
30
## The weighting uses scalar multiplication by powers of 2, so no roundoff
31
## The weighting uses scalar multiplication by powers of 2, so no roundoff
31
## will occur.
32
## will occur.
32
##
33
##
33
## __zgpbal__ should be followed by zgpred
34
## @command{__zgpbal__} should be followed by @command{zgpred}.
34
## @end deftypefn
35
## @end deftypefn
35
36
36
## References:
37
## References:
(-)octave-2.1.58/scripts/control/util/zgscal.m (-3 / +2 lines)
Lines 17-27 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} zgscal (@var{f}, @var{z}, @var{n}, @var{m}, @var{p})
20
## @deftypefn {Function File} {@var{x} =} zgscal (@var{f}, @var{z}, @var{n}, @var{m}, @var{p})
21
## Generalized conjugate gradient iteration to
21
## Generalized conjugate gradient iteration to
22
## solve zero-computation generalized eigenvalue problem balancing equation
22
## solve zero-computation generalized eigenvalue problem balancing equation
23
## @math{fx=z};
23
## @math{fx=z}; called by @command{zgepbal}.
24
## called by @code{zgepbal}
25
## @end deftypefn
24
## @end deftypefn
26
25
27
## References:
26
## References:
(-)octave-2.1.58/scripts/control/util/zgshsr.m (-4 / +12 lines)
Lines 17-26 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} {} zgshsr (@var{y})
20
## @deftypefn {Function File} {@var{x} =} zgshsr (@var{y})
21
## apply householder vector based on @math{e^(m)} to
21
## Apply householder vector based on 
22
## (column vector) y.
22
## @iftex
23
## Called by zgfslv
23
## @tex
24
## $ e^m $
25
## @end tex
26
## @end iftex
27
## @ifinfo
28
## @math{e^(m)}
29
## @end ifinfo
30
## to column vector @var{y}.
31
## Called by @command{zgfslv}.
24
## @end deftypefn
32
## @end deftypefn
25
33
26
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
34
## Author: A. S. Hodel <a.s.hodel@eng.auburn.edu>
(-)octave-2.1.58/scripts/elfun/acoth.m (-1 / +1 lines)
Lines 18-24 Link Here
18
## 02111-1307, USA.
18
## 02111-1307, USA.
19
19
20
## -*- texinfo -*-
20
## -*- texinfo -*-
21
## @deftypefn {Mapping Function} acoth (@var{x})
21
## @deftypefn {Mapping Function} {} acoth (@var{x})
22
## Compute the inverse hyperbolic cotangent of each element of @var{x}.
22
## Compute the inverse hyperbolic cotangent of each element of @var{x}.
23
## @end deftypefn
23
## @end deftypefn
24
24
(-)octave-2.1.58/scripts/linear-algebra/commutation_matrix.m (-1 / +1 lines)
Lines 40-46 Link Here
40
##  matrix such that
40
##  matrix such that
41
## @iftex
41
## @iftex
42
## @tex
42
## @tex
43
##  $K_{m,n} \cdot {\rm vec} (A) = {\rm vec} (A^T)$
43
##  $K_{m,n} \cdot {\rm vec} (A) = {\rm vec} (A^{\rm T})$
44
## @end tex
44
## @end tex
45
## @end iftex
45
## @end iftex
46
## @ifinfo
46
## @ifinfo
(-)octave-2.1.58/scripts/polynomial/polyout.m (-2 / +9 lines)
Lines 17-30 Link Here
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
17
## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
18
18
19
## -*- texinfo -*-
19
## -*- texinfo -*-
20
## @deftypefn {Function File} polyout (@var{c}, @var{x})
20
## @deftypefn {Function File} {} polyout (@var{c}, @var{x})
21
## Write formatted polynomial
21
## Write formatted polynomial
22
## @iftex
23
## @tex
24
## $$ c(x) = c_1 x^n + \ldots + c_n x + c_{n+1} $$
25
## @end tex
26
## @end iftex
27
## @ifinfo
22
## @example
28
## @example
23
##    c(x) = c(1) * x^n + ... + c(n) x + c(n+1)
29
##    c(x) = c(1) * x^n + ... + c(n) x + c(n+1)
24
## @end example
30
## @end example
31
## @end ifinfo
25
##  and return it as a string or write it to the screen (if
32
##  and return it as a string or write it to the screen (if
26
##  @var{nargout} is zero).
33
##  @var{nargout} is zero).
27
##  @var{x} defaults to the string @code{"s"}
34
##  @var{x} defaults to the string @code{"s"}.
28
## @end deftypefn
35
## @end deftypefn
29
## @seealso{polyval, polyvalm, poly, roots, conv, deconv, residue,
36
## @seealso{polyval, polyvalm, poly, roots, conv, deconv, residue,
30
## filter, polyderiv, and polyinteg}
37
## filter, polyderiv, and polyinteg}
(-)octave-2.1.58/scripts/polynomial/roots.m (-1 / +1 lines)
Lines 32-38 Link Here
32
## @ifinfo
32
## @ifinfo
33
##
33
##
34
## @example
34
## @example
35
## v(1) * z^(N-1) + ... + v(N-1) * z + v(N).
35
## v(1) * z^(N-1) + ... + v(N-1) * z + v(N)
36
## @end example
36
## @end example
37
## @end ifinfo
37
## @end ifinfo
38
## @end deftypefn
38
## @end deftypefn
(-)octave-2.1.58/scripts/specfun/log2.m (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
## -*- texinfo -*-
20
## -*- texinfo -*-
21
## @deftypefn {Mapping Function} {} log2 (@var{x})
21
## @deftypefn {Mapping Function} {} log2 (@var{x})
22
## @deftypefnx {Mapping Function} {[@var{f}, @var{e}]} log2 (@var{x})
22
## @deftypefnx {Mapping Function} {[@var{f}, @var{e}] =} log2 (@var{x})
23
## Compute the base-2 logarithm of @var{x}.  With two outputs, returns
23
## Compute the base-2 logarithm of @var{x}.  With two outputs, returns
24
## @var{f} and @var{e} such that
24
## @var{f} and @var{e} such that
25
## @iftex
25
## @iftex
(-)octave-2.1.58/scripts/special-matrix/toeplitz.m (-12 / +11 lines)
Lines 25-39 Link Here
25
## @var{c} is used.  If the second argument is omitted, the first row is
25
## @var{c} is used.  If the second argument is omitted, the first row is
26
## taken to be the same as the first column.
26
## taken to be the same as the first column.
27
##
27
##
28
## A square Toeplitz matrix has the form
28
## A square Toeplitz matrix has the form:
29
## @iftex
29
## @iftex
30
## @tex
30
## @tex
31
## $$
31
## $$
32
## \left[\matrix{c_0    & r_1     & r_2      & \ldots & r_n\cr
32
## \left[\matrix{c_0    & r_1     & r_2      & \cdots & r_n\cr
33
##               c_1    & c_0     & r_1      &        & c_{n-1}\cr
33
##               c_1    & c_0     & r_1      & \cdots & r_{n-1}\cr
34
##               c_2    & c_1     & c_0      &        & c_{n-2}\cr
34
##               c_2    & c_1     & c_0      & \cdots & r_{n-2}\cr
35
##               \vdots &         &          &        & \vdots\cr
35
##               \vdots & \vdots  & \vdots   & \ddots & \vdots\cr
36
##               c_n    & c_{n-1} & c_{n-2} & \ldots & c_0}\right].
36
##               c_n    & c_{n-1} & c_{n-2} & \ldots & c_0}\right]
37
## $$
37
## $$
38
## @end tex
38
## @end tex
39
## @end iftex
39
## @end iftex
Lines 42-53 Link Here
42
## @example
42
## @example
43
## @group
43
## @group
44
## c(0)  r(1)   r(2)  ...  r(n)
44
## c(0)  r(1)   r(2)  ...  r(n)
45
## c(1)  c(0)   r(1)      r(n-1)
45
## c(1)  c(0)   r(1)  ... r(n-1)
46
## c(2)  c(1)   c(0)      r(n-2)
46
## c(2)  c(1)   c(0)  ... r(n-2)
47
##  .                       .
47
##  .     ,      ,   .      .
48
##  .                       .
48
##  .     ,      ,     .    .
49
##  .                       .
49
##  .     ,      ,       .  .
50
##
51
## c(n) c(n-1) c(n-2) ...  c(0)
50
## c(n) c(n-1) c(n-2) ...  c(0)
52
## @end group
51
## @end group
53
## @end example
52
## @end example
(-)octave-2.1.58/scripts/special-matrix/vander.m (-12 / +11 lines)
Lines 21-34 Link Here
21
## @deftypefn {Function File} {} vander (@var{c})
21
## @deftypefn {Function File} {} vander (@var{c})
22
## Return the Vandermonde matrix whose next to last column is @var{c}.
22
## Return the Vandermonde matrix whose next to last column is @var{c}.
23
##
23
##
24
## A Vandermonde matrix has the form
24
## A Vandermonde matrix has the form:
25
## @iftex
25
## @iftex
26
## @tex
26
## @tex
27
## $$
27
## $$
28
## \left[\matrix{c_0^n  & \ldots & c_0^2  & c_0    & 1\cr
28
## \left[\matrix{c_1^{n-1}  & \cdots & c_1^2  & c_1    & 1      \cr
29
##               c_1^n  & \ldots & c_1^2  & c_1    & 1\cr
29
##               c_2^{n-1}  & \cdots & c_2^2  & c_2    & 1      \cr
30
##               \vdots &        & \vdots & \vdots & \vdots\cr
30
##               \vdots     & \ddots & \vdots & \vdots & \vdots \cr
31
##               c_n^n  & \ldots & c_n^2  & c_n    & 1}\right].
31
##               c_n^{n-1}  & \cdots & c_n^2  & c_n    & 1      }\right]
32
## $$
32
## $$
33
## @end tex
33
## @end tex
34
## @end iftex
34
## @end iftex
Lines 36-48 Link Here
36
##
36
##
37
## @example
37
## @example
38
## @group
38
## @group
39
## c(0)^n ... c(0)^2  c(0)  1
39
## c(1)^(n-1) ... c(1)^2  c(1)  1
40
## c(1)^n ... c(1)^2  c(1)  1
40
## c(2)^(n-1) ... c(2)^2  c(2)  1
41
##  .           .      .    .
41
##     .     .      .      .    .
42
##  .           .      .    .
42
##     .       .    .      .    .
43
##  .           .      .    .
43
##     .         .  .      .    .
44
##
44
## c(n)^(n-1) ... c(n)^2  c(n)  1
45
## c(n)^n ... c(n)^2  c(n)  1
46
## @end group
45
## @end group
47
## @end example
46
## @end example
48
## @end ifinfo
47
## @end ifinfo
(-)octave-2.1.58/src/DASPK-opts.cc (-1 / +2 lines)
Lines 601-607 tolerance must also be a vector of the s Link Here
601
The local error test applied at each integration step is\n\
601
The local error test applied at each integration step is\n\
602
\n\
602
\n\
603
@example\n\
603
@example\n\
604
  abs (local error in x(i)) <= rtol(i) * abs (Y(i)) + atol(i)\n\
604
  abs (local error in x(i)) <=\n\
605
      rtol(i) * abs (Y(i)) + atol(i)\n\
605
@end example\n\
606
@end example\n\
606
@item \"compute consistent initial condition\"\n\
607
@item \"compute consistent initial condition\"\n\
607
Denoting the differential variables in the state vector by @samp{Y_d}\n\
608
Denoting the differential variables in the state vector by @samp{Y_d}\n\
(-)octave-2.1.58/src/DASRT-opts.cc (-1 / +2 lines)
Lines 318-324 tolerance must also be a vector of the s Link Here
318
\n\
318
\n\
319
The local error test applied at each integration step is\n\
319
The local error test applied at each integration step is\n\
320
@example\n\
320
@example\n\
321
  abs (local error in x(i)) <= rtol(i) * abs (Y(i)) + atol(i)\n\
321
  abs (local error in x(i)) <=\n\
322
      rtol(i) * abs (Y(i)) + atol(i)\n\
322
@end example\n\
323
@end example\n\
323
@item \"initial step size\"\n\
324
@item \"initial step size\"\n\
324
Differential-algebraic problems may occaisionally suffer from severe\n\
325
Differential-algebraic problems may occaisionally suffer from severe\n\
(-)octave-2.1.58/src/DLD-FUNCTIONS/qz.cc (-9 / +27 lines)
Lines 207-236 DEFUN_DLD (qz, args, nargout, Link Here
207
  "-*- texinfo -*-\n\
207
  "-*- texinfo -*-\n\
208
@deftypefn {Loadable Function} {@var{lambda} =} qz (@var{a}, @var{b})\n\
208
@deftypefn {Loadable Function} {@var{lambda} =} qz (@var{a}, @var{b})\n\
209
Generalized eigenvalue problem @math{A x = s B x},\n\
209
Generalized eigenvalue problem @math{A x = s B x},\n\
210
@var{QZ} decomposition.  Three ways to call:\n\
210
@var{QZ} decomposition. There are three ways to call this function:\n\
211
@enumerate\n\
211
@enumerate\n\
212
@item @code{lambda = qz(A,B)}\n\
212
@item @code{lambda = qz(A,B)}\n\
213
\n\
213
\n\
214
Computes the generalized eigenvalues @var{lambda} of @math{(A - sB)}.\n\
214
Computes the generalized eigenvalues\n\
215
\n\
215
@iftex\n\
216
@tex\n\
217
$\\lambda$\n\
218
@end tex\n\
219
@end iftex\n\
220
@ifinfo\n\
221
@var{lambda}\n\
222
@end ifinfo\n\
223
of @math{(A - s B)}.\n\
216
@item @code{[AA, BB, Q, Z, V, W, lambda] = qz (A, B)}\n\
224
@item @code{[AA, BB, Q, Z, V, W, lambda] = qz (A, B)}\n\
217
\n\
225
\n\
218
Computes qz decomposition, generalized eigenvectors, and \n\
226
Computes qz decomposition, generalized eigenvectors, and \n\
219
        generalized eigenvalues of @math{(A - sB)}\n\
227
        generalized eigenvalues of @math{(A - sB)}\n\
228
@iftex\n\
229
@tex\n\
230
$$ A\\,V = B\\,V\\,{ \\rm diag }(\\lambda) $$\n\
231
$$ W^{ \\rm T } A = { \\rm diag }(\\lambda)\\,W^{ \\rm T } B $$\n\
232
$$ AA = Q^{ \\rm T } A\\,Z,~ BB = Q^{ \\rm T } B\\,Z $$\n\
233
@end tex\n\
234
@end iftex\n\
235
@ifinfo\n\
220
@example\n\
236
@example\n\
221
@group\n\
237
@group\n\
222
        A V = B V diag(lambda)\n\
238
        A*V = B*V*diag(lambda)\n\
223
        W' A = diag(lambda) W' B\n\
239
        W'*A = diag(lambda)*W'*B\n\
224
        AA = Q'*A*Z, BB = Q'*B*Z  with Q, Z orthogonal (unitary)= I\n\
240
        AA = Q'*A*Z, BB = Q'*B*Z\n\
225
@end group\n\
241
@end group\n\
226
@end example\n\
242
@end example\n\
243
@end ifinfo\n\
244
with @var{Q} and @var{Z} orthogonal (unitary)= @var{I}\n\
227
\n\
245
\n\
228
@item @code{[AA,BB,Z@{,lambda@}] = qz(A,B,opt)}\n\
246
@item @code{[AA,BB,Z@{, lambda@}] = qz(A,B,opt)}\n\
229
\n\
247
\n\
230
As in form [2], but allows ordering of generalized eigenpairs\n\
248
As in form [2], but allows ordering of generalized eigenpairs\n\
231
        for (e.g.) solution of discrete time algebraic Riccati equations.\n\
249
        for (e.g.) solution of discrete time algebraic Riccati equations.\n\
232
        Form 3 is not available for complex matrices and does not compute\n\
250
        Form 3 is not available for complex matrices, and does not compute\n\
233
        the generalized eigenvectors V, W, nor the orthogonal matrix Q.\n\
251
        the generalized eigenvectors @var{V}, @var{W}, nor the orthogonal matrix @var{Q}.\n\
234
@table @var\n\
252
@table @var\n\
235
@item opt\n\
253
@item opt\n\
236
 for ordering eigenvalues of the GEP pencil.  The leading  block\n\
254
 for ordering eigenvalues of the GEP pencil.  The leading  block\n\
(-)octave-2.1.58/src/DLD-FUNCTIONS/time.cc (-1 / +1 lines)
Lines 228-234 output without change. For example,\n\ Link Here
228
\n\
228
\n\
229
@example\n\
229
@example\n\
230
@group\n\
230
@group\n\
231
strftime (\"%r (%Z) %A %e %B %Y\", localtime (time ())\n\
231
strftime (\"%r (%Z) %A %e %B %Y\", localtime (time ()) )\n\
232
     @result{} \"01:15:06 AM (CST) Monday 17 February 1997\"\n\
232
     @result{} \"01:15:06 AM (CST) Monday 17 February 1997\"\n\
233
@end group\n\
233
@end group\n\
234
@end example\n\
234
@end example\n\
(-)octave-2.1.58/src/error.cc (-2 / +2 lines)
Lines 669-675 DEFUN (lasterr, args, , Link Here
669
@deftypefn {Built-in Function} {} lasterr ()\n\
669
@deftypefn {Built-in Function} {} lasterr ()\n\
670
@deftypefnx {Built-in Function} {} lasterr (@var{msg})\n\
670
@deftypefnx {Built-in Function} {} lasterr (@var{msg})\n\
671
Without any arguments, return the last error message.  With one\n\
671
Without any arguments, return the last error message.  With one\n\
672
argument, set the last warning message to @var{msg}.\n\
672
argument, set the last error message to @var{msg}.\n\
673
@end deftypefn")
673
@end deftypefn")
674
{
674
{
675
  octave_value_list retval;
675
  octave_value_list retval;
Lines 697-703 DEFUN (lastwarn, args, , Link Here
697
@deftypefn {Built-in Function} {} lastwarn ()\n\
697
@deftypefn {Built-in Function} {} lastwarn ()\n\
698
@deftypefnx {Built-in Function} {} lastwarn (@var{msg})\n\
698
@deftypefnx {Built-in Function} {} lastwarn (@var{msg})\n\
699
Without any arguments, return the last warning message.  With one\n\
699
Without any arguments, return the last warning message.  With one\n\
700
argument, set the last error message to @var{msg}.\n\
700
argument, set the last warning message to @var{msg}.\n\
701
@end deftypefn")
701
@end deftypefn")
702
{
702
{
703
  octave_value_list retval;
703
  octave_value_list retval;
(-)octave-2.1.58/src/file-io.cc (-1 / +1 lines)
Lines 1751-1757 DEFUN (mkstemp, args, , Link Here
1751
@deftypefn {Built-in Function} {[@var{fid}, @var{name}, @var{msg}] =} tmpfile (@var{template}, @var{delete})\n\
1751
@deftypefn {Built-in Function} {[@var{fid}, @var{name}, @var{msg}] =} tmpfile (@var{template}, @var{delete})\n\
1752
Return the file ID corresponding to a new temporary file with a unique\n\
1752
Return the file ID corresponding to a new temporary file with a unique\n\
1753
name created from @var{template}.  The last six characters of @var{template}\n\
1753
name created from @var{template}.  The last six characters of @var{template}\n\
1754
must be @code{XXXXXX} and tehse are replaced with a string that makes the\n\
1754
must be @code{XXXXXX} and these are replaced with a string that makes the\n\
1755
filename unique.  The file is then created with mode read/write and\n\
1755
filename unique.  The file is then created with mode read/write and\n\
1756
permissions that are system dependent (on GNU/Linux systems, the permissions\n\
1756
permissions that are system dependent (on GNU/Linux systems, the permissions\n\
1757
will be 0600 for versions of glibc 2.0.7 and later).  The file is opened\n\
1757
will be 0600 for versions of glibc 2.0.7 and later).  The file is opened\n\
(-)octave-2.1.58/src/input.cc (-2 / +2 lines)
Lines 1128-1137 value of @code{PS2} is @code{\"> \"}.\n\ Link Here
1128
  DEFVAR (PS4, "+ ", ps4,
1128
  DEFVAR (PS4, "+ ", ps4,
1129
    "-*- texinfo -*-\n\
1129
    "-*- texinfo -*-\n\
1130
@defvr {Built-in Variable} PS4\n\
1130
@defvr {Built-in Variable} PS4\n\
1131
If Octave is invoked with the @code{--echo-input} option, the value of\n\
1131
If Octave is invoked with the @code{--echo-commands} option, the value of\n\
1132
@code{PS4} is printed before each line of input that is echoed.  The\n\
1132
@code{PS4} is printed before each line of input that is echoed.  The\n\
1133
default value of @code{PS4} is @code{\"+ \"}.  @xref{Invoking Octave}, for\n\
1133
default value of @code{PS4} is @code{\"+ \"}.  @xref{Invoking Octave}, for\n\
1134
a description of @code{--echo-input}.\n\
1134
a description of @code{--echo-commands}.\n\
1135
@end defvr");
1135
@end defvr");
1136
1136
1137
  DEFVAR (completion_append_char, " ", completion_append_char,
1137
  DEFVAR (completion_append_char, " ", completion_append_char,
(-)octave-2.1.58/src/mappers.cc (-8 / +7 lines)
Lines 222-228 $\\theta = \\tan^{-1}(y/x)$.\n\ Link Here
222
@ifinfo\n\
222
@ifinfo\n\
223
@var{theta} = @code{atan (@var{y}/@var{x})}.\n\
223
@var{theta} = @code{atan (@var{y}/@var{x})}.\n\
224
@end ifinfo\n\
224
@end ifinfo\n\
225
\n\
226
@noindent\n\
225
@noindent\n\
227
in radians. \n\
226
in radians. \n\
228
\n\
227
\n\
Lines 245-251 Compute the inverse sine of each element Link Here
245
  DEFUN_MAPPER (asinh, 0, 0, 0, asinh, 0, asinh, 0.0, 0.0, 0, 0,
244
  DEFUN_MAPPER (asinh, 0, 0, 0, asinh, 0, asinh, 0.0, 0.0, 0, 0,
246
    "-*- texinfo -*-\n\
245
    "-*- texinfo -*-\n\
247
@deftypefn {Mapping Function} {} asinh (@var{x})\n\
246
@deftypefn {Mapping Function} {} asinh (@var{x})\n\
248
Ompute the inverse hyperbolic sine of each element of @var{x}.\n\
247
Compute the inverse hyperbolic sine of each element of @var{x}.\n\
249
@end deftypefn");
248
@end deftypefn");
250
249
251
  DEFUN_MAPPER (atan, 0, 0, 0, atan, 0, atan, 0.0, 0.0, 0, 0,
250
  DEFUN_MAPPER (atan, 0, 0, 0, atan, 0, atan, 0.0, 0.0, 0, 0,
Lines 257-263 Compute the inverse tangent of each elem Link Here
257
  DEFUN_MAPPER (atanh, 0, 0, 0, atanh, 0, atanh, -1.0, 1.0, 0, 1,
256
  DEFUN_MAPPER (atanh, 0, 0, 0, atanh, 0, atanh, -1.0, 1.0, 0, 1,
258
    "-*- texinfo -*-\n\
257
    "-*- texinfo -*-\n\
259
@deftypefn {Mapping Function} {} atanh (@var{x})\n\
258
@deftypefn {Mapping Function} {} atanh (@var{x})\n\
260
Compute the inverse hyperbolic tanget of each element of @var{x}.\n\
259
Compute the inverse hyperbolic tangent of each element of @var{x}.\n\
261
@end deftypefn");
260
@end deftypefn");
262
261
263
  DEFUN_MAPPER (ceil, 0, 0, 0, ceil, 0, ceil, 0.0, 0.0, 0, 0,
262
  DEFUN_MAPPER (ceil, 0, 0, 0, ceil, 0, ceil, 0.0, 0.0, 0, 0,
Lines 349-356 otherwise. For example,\n\ Link Here
349
\n\
348
\n\
350
@example\n\
349
@example\n\
351
@group\n\
350
@group\n\
352
finite ([13, Inf, NaN])\n\
351
finite ([13, Inf, NA, NaN])\n\
353
     @result{} [ 1, 0, 0 ]\n\
352
     @result{} [ 1, 0, 0, 0 ]\n\
354
@end group\n\
353
@end group\n\
355
@end example\n\
354
@end example\n\
356
@end deftypefn");
355
@end deftypefn");
Lines 599-611 For complex arguments, @code{sign} retur Link Here
599
  DEFUN_MAPPER (sin, 0, 0, 0, sin, 0, sin, 0.0, 0.0, 0, 0,
598
  DEFUN_MAPPER (sin, 0, 0, 0, sin, 0, sin, 0.0, 0.0, 0, 0,
600
    "-*- texinfo -*-\n\
599
    "-*- texinfo -*-\n\
601
@deftypefn {Mapping Function} {} sin (@var{x})\n\
600
@deftypefn {Mapping Function} {} sin (@var{x})\n\
602
Compute the sin of each element of @var{x}.\n\
601
Compute the sine of each element of @var{x}.\n\
603
@end deftypefn");
602
@end deftypefn");
604
603
605
  DEFUN_MAPPER (sinh, 0, 0, 0, sinh, 0, sinh, 0.0, 0.0, 0, 0,
604
  DEFUN_MAPPER (sinh, 0, 0, 0, sinh, 0, sinh, 0.0, 0.0, 0, 0,
606
    "-*- texinfo -*-\n\
605
    "-*- texinfo -*-\n\
607
@deftypefn {Mapping Function} {} sinh (@var{x})\n\
606
@deftypefn {Mapping Function} {} sinh (@var{x})\n\
608
Compute the inverse hyperbolic sin of each element of @var{x}.\n\
607
Compute the inverse hyperbolic sine of each element of @var{x}.\n\
609
@end deftypefn");
608
@end deftypefn");
610
609
611
  DEFUN_MAPPER (sqrt, 0, 0, 0, sqrt, 0, sqrt, 0.0, octave_Inf, 0, 1,
610
  DEFUN_MAPPER (sqrt, 0, 0, 0, sqrt, 0, sqrt, 0.0, octave_Inf, 0, 1,
Lines 619-625 result is returned. To compute the matr Link Here
619
  DEFUN_MAPPER (tan, 0, 0, 0, tan, 0, tan, 0.0, 0.0, 0, 0,
618
  DEFUN_MAPPER (tan, 0, 0, 0, tan, 0, tan, 0.0, 0.0, 0, 0,
620
    "-*- texinfo -*-\n\
619
    "-*- texinfo -*-\n\
621
@deftypefn {Mapping Function} {} tan (@var{z})\n\
620
@deftypefn {Mapping Function} {} tan (@var{z})\n\
622
Compute tanget of each element of @var{x}.\n\
621
Compute tangent of each element of @var{x}.\n\
623
@end deftypefn");
622
@end deftypefn");
624
623
625
  DEFUN_MAPPER (tanh, 0, 0, 0, tanh, 0, tanh, 0.0, 0.0, 0, 0,
624
  DEFUN_MAPPER (tanh, 0, 0, 0, tanh, 0, tanh, 0.0, 0.0, 0, 0,
(-)octave-2.1.58/src/ODESSA-opts.cc (-1 / +2 lines)
Lines 358-364 parameter may only be a scalar.\n\ Link Here
358
The local error test applied at each integration step is\n\
358
The local error test applied at each integration step is\n\
359
\n\
359
\n\
360
@example\n\
360
@example\n\
361
  abs (local error in x(i)) <= rtol * abs (y(i)) + atol(i)\n\
361
  abs (local error in x(i)) <=\n\
362
      rtol * abs (y(i)) + atol(i)\n\
362
@end example\n\
363
@end example\n\
363
@item \"integration method\"\n\
364
@item \"integration method\"\n\
364
A string specifing the method of integration to use to solve the ODE\n\
365
A string specifing the method of integration to use to solve the ODE\n\
(-)octave-2.1.58/src/pt-assign.cc (-1 / +1 lines)
Lines 334-340 symbols_of_pt_assign (void) Link Here
334
{
334
{
335
  DEFVAR (print_rhs_assign_val, false, print_rhs_assign_val,
335
  DEFVAR (print_rhs_assign_val, false, print_rhs_assign_val,
336
    "-*- texinfo -*-\n\
336
    "-*- texinfo -*-\n\
337
@defvr print_rhs_assign_val\n\
337
@defvr {Built-in Variable} print_rhs_assign_val\n\
338
If the value of this variable is non-zero, Octave will print the value\n\
338
If the value of this variable is non-zero, Octave will print the value\n\
339
of the right hand side of assignment expressions instead of the value\n\
339
of the right hand side of assignment expressions instead of the value\n\
340
of the left hand side (after the assignment).\n\
340
of the left hand side (after the assignment).\n\
(-)octave-2.1.58/src/pt-plot.cc (-1 / +1 lines)
Lines 1358-1364 is @code{\"gnuplot\"}. @xref{Installati Link Here
1358
@defvr {Built-in Variable} gnuplot_has_frames\n\
1358
@defvr {Built-in Variable} gnuplot_has_frames\n\
1359
If the value of this variable is nonzero, Octave assumes that your copy\n\
1359
If the value of this variable is nonzero, Octave assumes that your copy\n\
1360
of gnuplot has support for multiple frames that is included in recent\n\
1360
of gnuplot has support for multiple frames that is included in recent\n\
1361
3.6beta releases.  It's initial value is determined by configure, but it\n\
1361
3.6beta releases.  Its initial value is determined by configure, but it\n\
1362
can be changed in your startup script or at the command line in case\n\
1362
can be changed in your startup script or at the command line in case\n\
1363
configure got it wrong, or if you upgrade your gnuplot installation.\n\
1363
configure got it wrong, or if you upgrade your gnuplot installation.\n\
1364
@end defvr");
1364
@end defvr");
(-)octave-2.1.58/src/symtab.cc (-1 / +1 lines)
Lines 1741-1747 symbols_of_symtab (void) Link Here
1741
{
1741
{
1742
  DEFVAR (variables_can_hide_functions, true, variables_can_hide_functions,
1742
  DEFVAR (variables_can_hide_functions, true, variables_can_hide_functions,
1743
    "-*- texinfo -*-\n\
1743
    "-*- texinfo -*-\n\
1744
@defvr variables_can_hide_functions\n\
1744
@defvr {Built-in Variable} variables_can_hide_functions\n\
1745
If the value of this variable is nonzero, assignments to variables may\n\
1745
If the value of this variable is nonzero, assignments to variables may\n\
1746
hide previously defined functions of the same name.  A negative value\n\
1746
hide previously defined functions of the same name.  A negative value\n\
1747
will cause Octave to print a warning, but allow the operation.\n\
1747
will cause Octave to print a warning, but allow the operation.\n\

Return to bug 62982