Next: , Previous: numerical, Up: Control Theory

29.6 System Analysis-Properties

— Function File: analdemo ()

Octave Controls toolbox demo: State Space analysis demo

— Function File: [n, m, p] = abcddim (a, b, c, d)

Check for compatibility of the dimensions of the matrices defining the linear system [A, B, C, D] corresponding to

          dx/dt = a x + b u
          y = c x + d u

or a similar discrete-time system.

If the matrices are compatibly dimensioned, then abcddim returns

The number of system states.
The number of system inputs.
The number of system outputs.

Otherwise abcddim returns n = m = p = −1.

Note: n = 0 (pure gain block) is returned without warning.

— Function File: ctrb (sys, b)
— Function File: ctrb (a, b)

Build controllability matrix:

                       2       n-1
          Qs = [ B AB A B ... A   B ]

of a system data structure or the pair (a, b).

ctrb forms the controllability matrix. The numerical properties of is_controllable are much better for controllability tests.

— Function File: h2norm (sys)

Computes the H-2 norm of a system data structure (continuous time only).

Reference: Doyle, Glover, Khargonekar, Francis, State-Space Solutions to Standard H-2 and H-infinity Control Problems, IEEE TAC August 1989.

— Function File: [g, gmin, gmax] = hinfnorm (sys, tol, gmin, gmax, ptol)

Computes the H-infinity norm of a system data structure.


system data structure
H-infinity norm search tolerance (default: 0.001)
minimum value for norm search (default: 1e-9)
maximum value for norm search (default: 1e+9)
pole tolerance:
  • if sys is continuous, poles with |real(pole))| < ptol*||H|| (H is appropriate Hamiltonian) are considered to be on the imaginary axis.
  • if sys is discrete, poles with |abs(pole)-1| < ptol*||[s1,s2]|| (appropriate symplectic pencil) are considered to be on the unit circle.
  • Default value: 1e-9


Computed gain, within tol of actual gain. g is returned as Inf if the system is unstable.
Actual system gain lies in the interval [gmin, gmax].

References: Doyle, Glover, Khargonekar, Francis, State-space solutions to standard H-2 and H-infinity control problems, IEEE TAC August 1989; Iglesias and Glover, State-Space approach to discrete-time H-infinity control, Int. J. Control, vol 54, no. 5, 1991; Zhou, Doyle, Glover, Robust and Optimal Control, Prentice-Hall, 1996.

— Function File: obsv (sys, c)
— Function File: obsv (a, c)

Build observability matrix:

               | C        |
               | CA       |
          Qb = | CA^2     |
               | ...      |
               | CA^(n-1) |

of a system data structure or the pair (a, c).

The numerical properties of is_observable are much better for observability tests.

— Function File: [zer, pol] = pzmap (sys)

Plots the zeros and poles of a system in the complex plane.


System data structure.


if omitted, the poles and zeros are plotted on the screen. otherwise, pol and zer are returned as the system poles and zeros (see sys2zp for a preferable function call).

— Function File: retval = is_abcd (a, b, c, d)

Returns retval = 1 if the dimensions of a, b, c, d are compatible, otherwise retval = 0 with an appropriate diagnostic message printed to the screen. The matrices b, c, or d may be omitted.

— Function File: [retval, u] = is_controllable (sys, tol)
— Function File: [retval, u] = is_controllable (a, b, tol)

Logical check for system controllability.


system data structure
n by n, n by m matrices, respectively
optional roundoff paramter. default value: 10*eps


Logical flag; returns true (1) if the system sys or the pair (a, b) is controllable, whichever was passed as input arguments.
u is an orthogonal basis of the controllable subspace.

Method Controllability is determined by applying Arnoldi iteration with complete re-orthogonalization to obtain an orthogonal basis of the Krylov subspace

          span ([b,a*b,...,a^{n-1}*b]).

The Arnoldi iteration is executed with krylov if the system has a single input; otherwise a block Arnoldi iteration is performed with krylovb.

— Function File: retval = is_detectable (a, c, tol, dflg)
— Function File: retval = is_detectable (sys, tol)

Test for detactability (observability of unstable modes) of (a, c).

Returns 1 if the system a or the pair (a, c) is detectable, 0 if not, and -1 if the system has unobservable modes at the imaginary axis (unit circle for discrete-time systems).

See is_stabilizable for detailed description of arguments and computational method.

— Function File: [retval, dgkf_struct ] = is_dgkf (asys, nu, ny, tol )

Determine whether a continuous time state space system meets assumptions of DGKF algorithm. Partitions system into:

          [dx/dt]   [A  | Bw  Bu  ][w]
          [ z   ] = [Cz | Dzw Dzu ][u]
          [ y   ]   [Cy | Dyw Dyu ]

or similar discrete-time system. If necessary, orthogonal transformations qw, qz and nonsingular transformations ru, ry are applied to respective vectors w, z, u, y in order to satisfy DGKF assumptions. Loop shifting is used if dyu block is nonzero.


system data structure
number of controlled inputs
number of measured outputs
threshold for 0; default: 200*eps.
true(1) if system passes check, false(0) otherwise
data structure of is_dgkf results. Entries:
dimensions of w, z
system A matrix
(n x nw) qw-transformed disturbance input matrix
(n x nu) ru-transformed controlled input matrix;

B = [Bw Bu]

(nz x n) Qz-transformed error output matrix
(ny x n) ry-transformed measured output matrix

C = [Cz; Cy]

off-diagonal blocks of transformed system D matrix that enter z, y from u, w respectively
controlled input transformation matrix
observed output transformation matrix
nonzero if the dyu block is nonzero.
untransformed dyu block
nonzero if the system is discrete-time
is_dgkf exits with an error if the system is mixed discrete/continuous.


Doyle, Glover, Khargonekar, Francis, State Space Solutions to Standard H-2 and H-infinity Control Problems, IEEE TAC August 1989.
Maciejowksi, J.M., Multivariable Feedback Design, Addison-Wesley, 1989.

— Function File: digital = is_digital (sys, eflg)

Return nonzero if system is digital.


System data structure.
When equal to 0 (default value), exits with an error if the system is mixed (continuous and discrete components); when equal to 1, print a warning if the system is mixed (continuous and discrete); when equal to 2, operate silently.


When equal to 0, the system is purely continuous; when equal to 1, the system is purely discrete; when equal to -1, the system is mixed continuous and discrete.
Exits with an error if sys is a mixed (continuous and discrete) system.

— Function File: [retval, u] = is_observable (a, c, tol)
— Function File: [retval, u] = is_observable (sys, tol)

Logical check for system observability.

Default: tol = tol = 10*norm(a,'fro')*eps

Returns 1 if the system sys or the pair (a, c) is observable, 0 if not.

See is_controllable for detailed description of arguments and default values.

— Function File: is_sample (ts)

Return true if ts is a valid sampling time (real, scalar, > 0).

— Function File: is_siso (sys)

Returns nonzero if the system data structure sys is single-input, single-output.

— Function File: retval = is_stabilizable (sys, tol)
— Function File: retval = is_stabilizable (a, b, tol, dflg)

Logical check for system stabilizability (i.e., all unstable modes are controllable). Returns 1 if the system is stabilizable, 0 if the the system is not stabilizable, -1 if the system has non stabilizable modes at the imaginary axis (unit circle for discrete-time systems.

Test for stabilizability is performed via Hautus Lemma. If dflg!=0 assume that discrete-time matrices (a,b) are supplied.

— Function File: is_signal_list (mylist)

Return true if mylist is a list of individual strings.

— Function File: is_stable (a, tol, dflg)
— Function File: is_stable (sys, tol)

Returns 1 if the matrix a or the system sys is stable, or 0 if not.


is a roundoff parameter, set to 200*eps if omitted.
Digital system flag (not required for system data structure):
dflg != 0
stable if eig(a) is in the unit circle
dflg == 0
stable if eig(a) is in the open LHP (default)