# Created by Octave 3.4.2, Mon Oct 10 09:51:08 2011 UTC <mockbuild@fedora2.s390.bos.redhat.com>
# name: cache
# type: cell
# rows: 3
# columns: 52
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
BMWengine


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1283
 -- Function File: SYS = BMWengine ()
 -- Function File: SYS = BMWengine ("SCALED")
 -- Function File: SYS = BMWengine ("UNSCALED")
     Model of the BMW 4-cylinder engine at ETH Zurich's control
     laboratory.
          OPERATING POINT
          Drosselklappenstellung     alpha_DK = 10.3 Grad
          Saugrohrdruck              p_s = 0.48 bar
          Motordrehzahl              n = 860 U/min
          Lambda-Messwert            lambda = 1.000
          Relativer Wandfilminhalt   nu = 1

          INPUTS
          U_1 Sollsignal Drosselklappenstellung   [Grad]
          U_2 Relative Einspritzmenge             [-]
          U_3 Zuendzeitpunkt                      [Grad KW]
          M_L Lastdrehmoment                      [Nm]

          STATES
          X_1 Drosselklappenstellung     [Grad]
          X_2 Saugrohrdruck              [bar]
          X_3 Motordrehzahl              [U/min]
          X_4 Messwert Lamba-Sonde       [-]
          X_5 Relativer Wandfilminhalt   [-]

          OUTPUTS
          Y_1 Motordrehzahl              [U/min]
          Y_2 Messwert Lambda-Sonde      [-]

          SCALING
          U_1N, X_1N   1 Grad
          U_2N, X_4N, X_5N, Y_2N   0.05
          U_3N   1.6 Grad KW
          X_2N   0.05 bar
          X_3N, Y_1N   200 U/min




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
Model of the BMW 4-cylinder engine at ETH Zurich's control laboratory.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
Boeing707


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 392
 -- Function File: SYS = Boeing707 ()
     Creates a linearized state-space model of a Boeing 707-321 aircraft
     at V=80 m/s (M = 0.26, GA0 = -3 deg, ALPHA0 = 4 deg, KAPPA = 50
     deg).

     System inputs: (1) thrust and (2) elevator angle.

     System outputs:  (1) airspeed and (2) pitch angle.

     *Reference*: R. Brockhaus: `Flugregelung' (Flight Control),
     Springer, 1994.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Creates a linearized state-space model of a Boeing 707-321 aircraft at
V=80 m/s 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
MDSSystem


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 156
Robust control of a mass-damper-spring system.  Type `which MDSSystem'
to locate, `edit MDSSystem' to open and simply `MDSSystem' to run the
example file.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Robust control of a mass-damper-spring system.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
WestlandLynx


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1288
 -- Function File: SYS = WestlandLynx ()
     Model of the Westland Lynx Helicopter about hover.
          INPUTS
          main rotor collective
          longitudinal cyclic
          lateral cyclic
          tail rotor collective

          STATES
          pitch attitude           theta       [rad]
          roll attitude            phi         [rad]
          roll rate (body-axis)    p           [rad/s]
          pitch rate (body-axis)   q           [rad/s]
          yaw rate                 xi          [rad/s]
          forward velocity         v_x         [ft/s]
          lateral velocity         v_y         [ft/s]
          vertical velocity        v_z         [ft/s]

          OUTPUTS
          heave velocity           H_dot       [ft/s]
          pitch attitude           theta       [rad]
          roll attitude            phi         [rad]
          heading rate             psi_dot     [rad/s]
          roll rate                p           [rad/s]
          pitch rate               q           [rad/s]

          Reference:
          Skogestad, S. and Postlethwaite I.
          Multivariable Feedback Control: Analysis and Design
          Second Edition
          Wiley 2005
          http://www.nt.ntnu.no/users/skoge/book/2nd_edition/matlab_m/matfiles.html




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Model of the Westland Lynx Helicopter about hover.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
augw


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3059
 -- Function File: P = augw (G, W1, W2, W3)
     Extend plant for stacked S/KS/T problem.  Subsequently, the robust
     control problem can be solved by h2syn or hinfsyn.

     *Inputs*
    G
          LTI model of plant.

    W1
          LTI model of performance weight.  Bounds the largest singular
          values of sensitivity S.  Model must be empty `[]', SISO or
          of appropriate size.

    W2
          LTI model to penalize large control inputs.  Bounds the
          largest singular values of KS.  Model must be empty `[]',
          SISO or of appropriate size.

    W3
          LTI model of robustness and noise sensitivity weight.  Bounds
          the largest singular values of complementary sensitivity T.
          Model must be empty `[]', SISO or of appropriate size.

     All inputs must be proper/realizable.  Scalars, vectors and
     matrices are possible instead of LTI models.

     *Outputs*
    P
          State-space model of augmented plant.

     *Block Diagram*

              | W1 | -W1*G |     z1 = W1 r  -  W1 G u
              | 0  |  W2   |     z2 =          W2   u
          P = | 0  |  W3*G |     z3 =          W3 G u
              |----+-------|
              | I  |    -G |     e  =    r  -     G u

                                                                +------+  z1
                      +---------------------------------------->|  W1  |----->
                      |                                         +------+
                      |                                         +------+  z2
                      |                 +---------------------->|  W2  |----->
                      |                 |                       +------+
           r   +    e |   +--------+  u |   +--------+  y       +------+  z3
          ----->(+)---+-->|  K(s)  |----+-->|  G(s)  |----+---->|  W3  |----->
                 ^ -      +--------+        +--------+    |     +------+
                 |                                        |
                 +----------------------------------------+

                         +--------+
                         |        |-----> z1 (p1x1)          z1 = W1 e
           r (px1) ----->|  P(s)  |-----> z2 (p2x1)          z2 = W2 u
                         |        |-----> z3 (p3x1)          z3 = W3 y
           u (mx1) ----->|        |-----> e (px1)            e = r - y
                         +--------+

                         +--------+
                 r ----->|        |-----> z
                         |  P(s)  |
                 u +---->|        |-----+ e
                   |     +--------+     |
                   |                    |
                   |     +--------+     |
                   +-----|  K(s)  |<----+
                         +--------+

          Reference:
          Skogestad, S. and Postlethwaite I.
          Multivariable Feedback Control: Analysis and Design
          Second Edition
          Wiley 2005
          Chapter 3.8: General Control Problem Formulation

     See also: h2syn, hinfsyn, mixsyn





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Extend plant for stacked S/KS/T problem.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
bode


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 723
 -- Function File: [MAG, PHA, W] = bode (SYS)
 -- Function File: [MAG, PHA, W] = bode (SYS, W)
     Bode diagram of frequency response.  If no output arguments are
     given, the response is printed on the screen.

     *Inputs*
    SYS
          LTI system.  Must be a single-input and single-output (SISO)
          system.

    W
          Optional vector of frequency values.  If W is not specified,
          it is calculated by the zeros and poles of the system.

     *Outputs*
    MAG
          Vector of magnitude.  Has length of frequency vector W.

    PHA
          Vector of phase.  Has length of frequency vector W.

    W
          Vector of frequency values used.

     See also: nichols, nyquist, sigma





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Bode diagram of frequency response.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
bodemag


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 664
 -- Function File: [MAG, W] = bodemag (SYS)
 -- Function File: [MAG, W] = bodemag (SYS, W)
     Bode magnitude diagram of frequency response.  If no output
     arguments are given, the response is printed on the screen.

     *Inputs*
    SYS
          LTI system.  Must be a single-input and single-output (SISO)
          system.

    W
          Optional vector of frequency values.  If W is not specified,
          it is calculated by the zeros and poles of the system.

     *Outputs*
    MAG
          Vector of magnitude.  Has length of frequency vector W.

    W
          Vector of frequency values used.

     See also: bode, nichols, nyquist, sigma





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
Bode magnitude diagram of frequency response.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
care


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1610
 -- Function File: [X, L, G] = care (A, B, Q, R)
 -- Function File: [X, L, G] = care (A, B, Q, R, S)
 -- Function File: [X, L, G] = care (A, B, Q, R, [], E)
 -- Function File: [X, L, G] = care (A, B, Q, R, S, E)
     Solve continuous-time algebraic Riccati equation (ARE).  Uses
     SLICOT SB02OD and SG02AD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Inputs*
    A
          Real matrix (n-by-n).

    B
          Real matrix (n-by-m).

    Q
          Real matrix (n-by-n).

    R
          Real matrix (m-by-m).

    S
          Optional real matrix (n-by-m).  If S is not specified, a zero
          matrix is assumed.

    E
          Optional descriptor matrix (n-by-n).  If E is not specified,
          an identity matrix is assumed.

     *Outputs*
    X
          Unique stabilizing solution of the continuous-time Riccati
          equation (n-by-n).

    L
          Closed-loop poles (n-by-1).

    G
          Corresponding gain matrix (m-by-n).

     *Equations*
                         -1
          A'X + XA - XB R  B'X + Q = 0

                               -1
          A'X + XA - (XB + S) R  (B'X + S') + Q = 0

               -1
          G = R  B'X

               -1
          G = R  (B'X + S')

          L = eig (A - B*G)

                              -1
          A'XE + E'XA - E'XB R   B'XE + Q = 0

                                    -1
          A'XE + E'XA - (E'XB + S) R   (B'XE + S') + Q = 0

               -1
          G = R  B'XE

               -1
          G = R  (B'XE + S)

          L = eig (A - B*G, E)

     See also: dare, lqr, dlqr, kalman





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Solve continuous-time algebraic Riccati equation (ARE).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
covar


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 310
 -- Function File: [P, Q] = covar (SYS, W)
     Return the steady-state covariance.

     *Inputs*
    SYS
          LTI model.

    W
          Intensity of white noise inputs which drive SYS.

     *Outputs*
    P
          Output covariance.

    Q
          State covariance.

     See also: lyap, dlyap





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Return the steady-state covariance.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
ctrb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 390
 -- Function File: CO = ctrb (SYS)
 -- Function File: CO = ctrb (A, B)
     Return controllability matrix.

     *Inputs*
    SYS
          LTI model.

    A
          State transition matrix (n-by-n).

    B
          Input matrix (n-by-m).

     *Outputs*
    CO
          Controllability matrix.

     *Equation*
                       2       n-1
          Co = [ B AB A B ... A   B ]




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 30
Return controllability matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
dare


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1769
 -- Function File: [X, L, G] = dare (A, B, Q, R)
 -- Function File: [X, L, G] = dare (A, B, Q, R, S)
 -- Function File: [X, L, G] = dare (A, B, Q, R, [], E)
 -- Function File: [X, L, G] = dare (A, B, Q, R, S, E)
     Solve discrete-time algebraic Riccati equation (ARE).  Uses SLICOT
     SB02OD and SG02AD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Inputs*
    A
          Real matrix (n-by-n).

    B
          Real matrix (n-by-m).

    Q
          Real matrix (n-by-n).

    R
          Real matrix (m-by-m).

    S
          Optional real matrix (n-by-m).  If S is not specified, a zero
          matrix is assumed.

    E
          Optional descriptor matrix (n-by-n).  If E is not specified,
          an identity matrix is assumed.

     *Outputs*
    X
          Unique stabilizing solution of the discrete-time Riccati
          equation (n-by-n).

    L
          Closed-loop poles (n-by-1).

    G
          Corresponding gain matrix (m-by-n).

     *Equations*
                                    -1
          A'XA - X - A'XB (B'XB + R)   B'XA + Q = 0

                                          -1
          A'XA - X - (A'XB + S) (B'XB + R)   (B'XA + S') + Q = 0

                        -1
          G = (B'XB + R)   B'XA

                        -1
          G = (B'XB + R)   (B'XA + S')

          L = eig (A - B*G)

                                       -1
          A'XA - E'XE - A'XB (B'XB + R)   B'XA + Q = 0

                                             -1
          A'XA - E'XE - (A'XB + S) (B'XB + R)   (B'XA + S') + Q = 0

                        -1
          G = (B'XB + R)   B'XA

                        -1
          G = (B'XB + R)   (B'XA + S')

          L = eig (A - B*G, E)

     See also: care, lqr, dlqr, kalman





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Solve discrete-time algebraic Riccati equation (ARE).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
dlqr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1274
 -- Function File: [G, X, L] = dlqr (SYS, Q, R)
 -- Function File: [G, X, L] = dlqr (SYS, Q, R, S)
 -- Function File: [G, X, L] = dlqr (A, B, Q, R)
 -- Function File: [G, X, L] = dlqr (A, B, Q, R, S)
 -- Function File: [G, X, L] = dlqr (A, B, Q, R, [], E)
 -- Function File: [G, X, L] = dlqr (A, B, Q, R, S, E)
     Linear-quadratic regulator for discrete-time systems.

     *Inputs*
    SYS
          Continuous or discrete-time LTI model.

    A
          State transition matrix of discrete-time system.

    B
          Input matrix of discrete-time system.

    Q
          State weighting matrix.

    R
          Input weighting matrix.

    S
          Optional cross term matrix.  If S is not specified, a zero
          matrix is assumed.

    E
          Optional descriptor matrix.  If E is not specified, an
          identity matrix is assumed.

     *Outputs*
    G
          State feedback matrix.

    X
          Unique stabilizing solution of the discrete-time Riccati
          equation.

    L
          Closed-loop poles.

     *Equations*
          x[k+1] = A x[k] + B u[k],   x[0] = x0

                  inf
          J(x0) = SUM (x' Q x  +  u' R u  +  2 x' S u)
                  k=0

          L = eig (A - B*G)

     See also: dare, care, lqr





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Linear-quadratic regulator for discrete-time systems.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
dlyap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 510
 -- Function File: X = dlyap (A, B)
 -- Function File: X = dlyap (A, B, C)
 -- Function File: X = dlyap (A, B, [], E)
     Solve discrete-time Lyapunov or Sylvester equations.  Uses SLICOT
     SB03MD, SB04QD and SG03AD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Equations*
          AXA' - X + B = 0      (Lyapunov Equation)

          AXB' - X + C = 0      (Sylvester Equation)

          AXA' - EXE' + B = 0   (Generalized Lyapunov Equation)

     See also: dlyapchol, lyap, lyapchol





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Solve discrete-time Lyapunov or Sylvester equations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
dlyapchol


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 461
 -- Function File: U = dlyapchol (A, B)
 -- Function File: U = dlyapchol (A, B, E)
     Compute Cholesky factor of discrete-time Lyapunov equations.  Uses
     SLICOT SB03OD and SG03BD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Equations*
          A U' U A'  -  U' U  +  B B'  =  0           (Lyapunov Equation)

          A U' U A'  -  E U' U E'  +  B B'  =  0      (Generalized Lyapunov Equation)

     See also: dlyap, lyap, lyapchol





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
Compute Cholesky factor of discrete-time Lyapunov equations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
dss


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 935
 -- Function File: SYS = dss (SYS)
 -- Function File: SYS = dss (D)
 -- Function File: SYS = dss (A, B, C, D, E, ...)
 -- Function File: SYS = dss (A, B, C, D, E, TSAM, ...)
     Create or convert to descriptor state-space model.

     *Inputs*
    SYS
          LTI model to be converted to state-space.

    A
          State transition matrix (n-by-n).

    B
          Input matrix (n-by-m).

    C
          Measurement matrix (p-by-n).

    D
          Feedthrough matrix (p-by-m).

    E
          Descriptor matrix (n-by-n).

    TSAM
          Sampling time in seconds.  If TSAM is not specified, a
          continuous-time model is assumed.

    ...
          Optional pairs of properties and values.  Type `set (dss)'
          for more information.

     *Outputs*
    SYS
          Descriptor state-space model.

     *Equations*
            .
          E x = A x + B u
            y = C x + D u

     See also: ss, tf





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Create or convert to descriptor state-space model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
estim


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 654
 -- Function File: EST = estim (SYS, L)
 -- Function File: EST = estim (SYS, L, SENSORS, KNOWN)
     Return state estimator for a given estimator gain.

     *Inputs*
    SYS
          LTI model.

    L
          State feedback matrix.

    SENSORS
          Indices of measured output signals y from SYS.  If omitted,
          all outputs are measured.

    KNOWN
          Indices of known input signals u (deterministic) to SYS.  All
          other inputs to SYS are assumed stochastic.  If argument
          KNOWN is omitted, no inputs u are known.

     *Outputs*
    EST
          State-space model of estimator.

     See also: kalman, place





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Return state estimator for a given estimator gain.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
gensig


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 802
 -- Function File: [U, T] = gensig (SIGTYPE, TAU)
 -- Function File: [U, T] = gensig (SIGTYPE, TAU, TFINAL)
 -- Function File: [U, T] = gensig (SIGTYPE, TAU, TFINAL, TSAM)
     Generate periodic signal.  Useful in combination with lsim.

     *Inputs*
    SIGTYPE = "SIN"
          Sine wave.

    SIGTYPE = "COS"
          Cosine wave.

    SIGTYPE = "SQUARE"
          Square wave.

    SIGTYPE = "PULSE"
          Periodic pulse.

    TAU
          Duration of one period in seconds.

    TFINAL
          Optional duration of the signal in seconds.  Default duration
          is 5 periods.

    TSAM
          Optional sampling time in seconds.  Default spacing is tau/64.

     *Outputs*
    U
          Vector of signal values.

    T
          Time vector of the signal.

     See also: lsim





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
Generate periodic signal.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
gram


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 462
 -- Function File: W = gram (SYS, MODE)
 -- Function File: WC = gram (A, B)
     `gram (SYS, "c")' returns the controllability gramian of the
     (continuous- or discrete-time) system SYS.  `gram (SYS, "o")'
     returns the observability gramian of the (continuous- or
     discrete-time) system SYS.  `gram (A, B)' returns the
     controllability gramian WC of the continuous-time system dx/dt = a
     x + b u; i.e., WC satisfies a Wc + m Wc' + b b' = 0.





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
`gram (SYS, "c")' returns the controllability gramian of the
(continuous- or dis



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
h2syn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1579
 -- Function File: [K, N, GAMMA, RCOND] = h2syn (P, NMEAS, NCON)
     H-2 control synthesis for LTI plant.  Uses SLICOT SB10HD and
     SB10ED by courtesy of NICONET e.V. (http://www.slicot.org)

     *Inputs*
    P
          Generalized plant.  Must be a proper/realizable LTI model.

    NMEAS
          Number of measured outputs v.  The last nmeas outputs of P
          are connected to the inputs of controller K.  The remaining
          outputs z (indices 1 to p-nmeas) are used to calculate the
          H-2 norm.

    NCON
          Number of controlled inputs u.  The last ncon inputs of P are
          connected to the outputs of controller K.  The remaining
          inputs w (indices 1 to m-ncon) are excited by a harmonic test
          signal.

     *Outputs*
    K
          State-space model of the H-2 optimal controller.

    N
          State-space model of the lower LFT of P and K.

    GAMMA
          H-2 norm of N.

     *Block Diagram*

          gamma = min||N(K)||             N = lft (P, K)
                   K         2

                         +--------+
                 w ----->|        |-----> z
                         |  P(s)  |
                 u +---->|        |-----+ v
                   |     +--------+     |
                   |                    |
                   |     +--------+     |
                   +-----|  K(s)  |<----+
                         +--------+

                         +--------+
                 w ----->|  N(s)  |-----> z
                         +--------+

     See also: augw, lqr, dlqr, kalman





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
H-2 control synthesis for LTI plant.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
hinfsyn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1851
 -- Function File: [K, N, GAMMA, RCOND] = hinfsyn (P, NMEAS, NCON)
 -- Function File: [K, N, GAMMA, RCOND] = hinfsyn (P, NMEAS, NCON, GMAX)
     H-infinity control synthesis for LTI plant.  Uses SLICOT SB10FD
     and SB10DD by courtesy of NICONET e.V. (http://www.slicot.org)

     *Inputs*
    P
          Generalized plant.  Must be a proper/realizable LTI model.

    NMEAS
          Number of measured outputs v.  The last nmeas outputs of P
          are connected to the inputs of controller K.  The remaining
          outputs z (indices 1 to p-nmeas) are used to calculate the
          H-infinity norm.

    NCON
          Number of controlled inputs u.  The last ncon inputs of P are
          connected to the outputs of controller K.  The remaining
          inputs w (indices 1 to m-ncon) are excited by a harmonic test
          signal.

    GMAX
          The maximum value of the H-infinity norm of N.  It is assumed
          that GMAX is sufficiently large so that the controller is
          admissible.

     *Outputs*
    K
          State-space model of the H-infinity (sub-)optimal controller.

    N
          State-space model of the lower LFT of P and K.

    GAMMA
          L-infinity norm of N.

     *Block Diagram*

          gamma = min||N(K)||             N = lft (P, K)
                   K         inf

                         +--------+
                 w ----->|        |-----> z
                         |  P(s)  |
                 u +---->|        |-----+ v
                   |     +--------+     |
                   |                    |
                   |     +--------+     |
                   +-----|  K(s)  |<----+
                         +--------+

                         +--------+
                 w ----->|  N(s)  |-----> z
                         +--------+

     See also: augw, mixsyn





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
H-infinity control synthesis for LTI plant.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
hsvd


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 328
 -- Function File: HSV = hsvd (SYS)
 -- Function File: HSV = hsvd (SYS, "OFFSET", ALPHA)
     Hankel singular values of the stable part of an LTI model.  If no
     output arguments are given, the Hankel singular values are
     displayed in a plot.  Uses SLICOT AB13AD by courtesy of NICONET
     e.V. (http://www.slicot.org)




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Hankel singular values of the stable part of an LTI model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
impulse


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1247
 -- Function File: [Y, T, X] = impulse (SYS)
 -- Function File: [Y, T, X] = impulse (SYS, T)
 -- Function File: [Y, T, X] = impulse (SYS, TFINAL)
 -- Function File: [Y, T, X] = impulse (SYS, TFINAL, DT)
     Impulse response of LTI system.  If no output arguments are given,
     the response is printed on the screen.

     *Inputs*
    SYS
          LTI model.

    T
          Time vector.  Should be evenly spaced.  If not specified, it
          is calculated by the poles of the system to reflect
          adequately the response transients.

    TFINAL
          Optional simulation horizon.  If not specified, it is
          calculated by the poles of the system to reflect adequately
          the response transients.

    DT
          Optional sampling time.  Be sure to choose it small enough to
          capture transient phenomena.  If not specified, it is
          calculated by the poles of the system.

     *Outputs*
    Y
          Output response array.  Has as many rows as time samples
          (length of t) and as many columns as outputs.

    T
          Time row vector.

    X
          State trajectories array.  Has `length (t)' rows and as many
          columns as states.

     See also: initial, lsim, step





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Impulse response of LTI system.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
initial


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1546
 -- Function File: [Y, T, X] = initial (SYS, X0)
 -- Function File: [Y, T, X] = initial (SYS, X0, T)
 -- Function File: [Y, T, X] = initial (SYS, X0, TFINAL)
 -- Function File: [Y, T, X] = initial (SYS, X0, TFINAL, DT)
     Initial condition response of state-space model.  If no output
     arguments are given, the response is printed on the screen.

     *Inputs*
    SYS
          State-space model.

    X0
          Vector of initial conditions for each state.

    T
          Optional time vector.  Should be evenly spaced.  If not
          specified, it is calculated by the poles of the system to
          reflect adequately the response transients.

    TFINAL
          Optional simulation horizon.  If not specified, it is
          calculated by the poles of the system to reflect adequately
          the response transients.

    DT
          Optional sampling time.  Be sure to choose it small enough to
          capture transient phenomena.  If not specified, it is
          calculated by the poles of the system.

     *Outputs*
    Y
          Output response array.  Has as many rows as time samples
          (length of t) and as many columns as outputs.

    T
          Time row vector.

    X
          State trajectories array.  Has `length (t)' rows and as many
          columns as states.

     *Example*
                             .
          Continuous Time:   x = A x ,   y = C x ,   x(0) = x0

          Discrete Time:   x[k+1] = A x[k] ,   y[k] = C x[k] ,   x[0] = x0

     See also: impulse, lsim, step





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Initial condition response of state-space model.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
isctrb


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 760
 -- Function File: BOOL = isctrb (SYS)
 -- Function File: BOOL = isctrb (SYS, TOL)
 -- Function File: BOOL = isctrb (A, B)
 -- Function File: BOOL = isctrb (A, B, E)
 -- Function File: BOOL = isctrb (A, B, [], TOL)
 -- Function File: BOOL = isctrb (A, B, E, TOL)
     Logical check for system controllability.  Uses SLICOT AB01OD and
     TG01HD by courtesy of NICONET e.V. (http://www.slicot.org)

     *Inputs*
    SYS
          LTI model.

    A
          State transition matrix.

    B
          Input matrix.

    E
          Descriptor matrix.

    TOL
          Optional roundoff parameter.  Default value is 0.

     *Outputs*
    BOOL = 0
          System is not controllable.

    BOOL = 1
          System is controllable.

     See also: isobsv





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Logical check for system controllability.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
isdetectable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1414
 -- Function File: BOOL = isdetectable (SYS)
 -- Function File: BOOL = isdetectable (SYS, TOL)
 -- Function File: BOOL = isdetectable (A, C)
 -- Function File: BOOL = isdetectable (A, C, E)
 -- Function File: BOOL = isdetectable (A, C, [], TOL)
 -- Function File: BOOL = isdetectable (A, C, E, TOL)
 -- Function File: BOOL = isdetectable (A, C, [], [], DFLG)
 -- Function File: BOOL = isdetectable (A, C, E, [], DFLG)
 -- Function File: BOOL = isdetectable (A, C, [], TOL, DFLG)
 -- Function File: BOOL = isdetectable (A, C, E, TOL, DFLG)
     Logical test for system detectability.  All unstable modes must be
     observable or all unobservable states must be stable.  Uses SLICOT
     AB01OD and TG01HD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Inputs*
    SYS
          LTI system.

    A
          State transition matrix.

    C
          Measurement matrix.

    E
          Descriptor matrix.

    TOL
          Optional tolerance for stability.  Default value is 0.

    DFLG = 0
          Matrices (A, C) are part of a continuous-time system.
          Default Value.

    DFLG = 1
          Matrices (A, C) are part of a discrete-time system.

     *Outputs*
    BOOL = 0
          System is not detectable.

    BOOL = 1
          System is detectable.

     See `isstabilizable' for description of computational method.

     See also: isstabilizable, isstable, isctrb, isobsv





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Logical test for system detectability.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
isobsv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 760
 -- Function File: BOOL = isobsv (SYS)
 -- Function File: BOOL = isobsv (SYS, TOL)
 -- Function File: BOOL = isobsv (A, C)
 -- Function File: BOOL = isobsv (A, C, E)
 -- Function File: BOOL = isobsv (A, C, [], TOL)
 -- Function File: BOOL = isobsv (A, C, E, TOL)
     Logical check for system observability.  Uses SLICOT AB01OD and
     TG01HD by courtesy of NICONET e.V. (http://www.slicot.org)

     *Inputs*
    SYS
          LTI model.

    A
          State transition matrix.

    C
          Measurement matrix.

    E
          Descriptor matrix.

    TOL
          Optional roundoff parameter.  Default value is 0.

     *Outputs*
    BOOL = 0
          System is not observable.

    BOOL = 1
          System is observable.

     See also: isctrb





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Logical check for system observability.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
issample


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 614
 -- Function File: BOOL = issample (TS)
 -- Function File: BOOL = issample (TS, FLG)
     Return true if TS is a valid sampling time.

     *Inputs*
    TS
          Alleged sampling time to be tested.

    FLG = 1
          Accept real scalars TS > 0.  Default Value.

    FLG = 0
          Accept real scalars TS >= 0.

    FLG = -1
          Accept real scalars TS > 0 and TS == -1.

    FLG = -10
          Accept real scalars TS >= 0 and TS == -1.

    FLG = -2
          Accept real scalars TS >= 0, TS == -1 and TS == -2.

     *Outputs*
    BOOL
          True if conditions are met and false otherwise.





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Return true if TS is a valid sampling time.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
isstabilizable


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1705
 -- Function File: BOOL = isstabilizable (SYS)
 -- Function File: BOOL = isstabilizable (SYS, TOL)
 -- Function File: BOOL = isstabilizable (A, B)
 -- Function File: BOOL = isstabilizable (A, B, E)
 -- Function File: BOOL = isstabilizable (A, B, [], TOL)
 -- Function File: BOOL = isstabilizable (A, B, E, TOL)
 -- Function File: BOOL = isstabilizable (A, B, [], [], DFLG)
 -- Function File: BOOL = isstabilizable (A, B, E, [], DFLG)
 -- Function File: BOOL = isstabilizable (A, B, [], TOL, DFLG)
 -- Function File: BOOL = isstabilizable (A, B, E, TOL, DFLG)
     Logical check for system stabilizability.  All unstable modes must
     be controllable or all uncontrollable states must be stable.  Uses
     SLICOT AB01OD and TG01HD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Inputs*
    SYS
          LTI system.

    A
          State transition matrix.

    B
          Input matrix.

    E
          Descriptor matrix.

    TOL
          Optional tolerance for stability.  Default value is 0.

    DFLG = 0
          Matrices (A, B) are part of a continuous-time system.
          Default Value.

    DFLG = 1
          Matrices (A, B) are part of a discrete-time system.

     *Outputs*
    BOOL = 0
          System is not stabilizable.

    BOOL = 1
          System is stabilizable.

     *Method*
          * Calculate staircase form (SLICOT AB01OD)
          * Extract unobservable part of state transition matrix
          * Calculate eigenvalues of unobservable part
          * Check whether
            real (ev) < -tol*(1 + abs (ev))   continuous-time
            abs (ev) < 1 - tol                discrete-time

     See also: isdetectable, isstable, isctrb, isobsv





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Logical check for system stabilizability.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
kalman


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1539
 -- Function File: [EST, G, X] = kalman (SYS, Q, R)
 -- Function File: [EST, G, X] = kalman (SYS, Q, R, S)
 -- Function File: [EST, G, X] = kalman (SYS, Q, R, [], SENSORS, KNOWN)
 -- Function File: [EST, G, X] = kalman (SYS, Q, R, S, SENSORS, KNOWN)
     Design Kalman estimator for LTI systems.

     *Inputs*
    SYS
          Nominal plant model.

    Q
          Covariance of white process noise.

    R
          Covariance of white measurement noise.

    S
          Optional cross term covariance.  Default value is 0.

    SENSORS
          Indices of measured output signals y from SYS.  If omitted,
          all outputs are measured.

    KNOWN
          Indices of known input signals u (deterministic) to SYS.  All
          other inputs to SYS are assumed stochastic.  If argument
          KNOWN is omitted, no inputs u are known.

     *Outputs*
    EST
          State-space model of the Kalman estimator.

    G
          Estimator gain.

    X
          Solution of the Riccati equation.

     *Block Diagram*
                                           u  +-------+         ^
                +---------------------------->|       |-------> y
                |    +-------+     +       y  |  est  |         ^
          u ----+--->|       |----->(+)------>|       |-------> x
                     |  sys  |       ^ +      +-------+
          w -------->|       |       |
                     +-------+       | v

          Q = cov (w, w')     R = cov (v, v')     S = cov (w, v')

     See also: care, dare, estim, lqr





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 40
Design Kalman estimator for LTI systems.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
lqr


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1253
 -- Function File: [G, X, L] = lqr (SYS, Q, R)
 -- Function File: [G, X, L] = lqr (SYS, Q, R, S)
 -- Function File: [G, X, L] = lqr (A, B, Q, R)
 -- Function File: [G, X, L] = lqr (A, B, Q, R, S)
 -- Function File: [G, X, L] = lqr (A, B, Q, R, [], E)
 -- Function File: [G, X, L] = lqr (A, B, Q, R, S, E)
     Linear-quadratic regulator.

     *Inputs*
    SYS
          Continuous or discrete-time LTI model.

    A
          State transition matrix of continuous-time system.

    B
          Input matrix of continuous-time system.

    Q
          State weighting matrix.

    R
          Input weighting matrix.

    S
          Optional cross term matrix.  If S is not specified, a zero
          matrix is assumed.

    E
          Optional descriptor matrix.  If E is not specified, an
          identity matrix is assumed.

     *Outputs*
    G
          State feedback matrix.

    X
          Unique stabilizing solution of the continuous-time Riccati
          equation.

    L
          Closed-loop poles.

     *Equations*
          .
          x = A x + B u,   x(0) = x0

                  inf
          J(x0) = INT (x' Q x  +  u' R u  +  2 x' S u)  dt
                   0

          L = eig (A - B*G)

     See also: care, dare, dlqr





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Linear-quadratic regulator.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
lsim


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1744
 -- Function File: [Y, T, X] = lsim (SYS, U)
 -- Function File: [Y, T, X] = lsim (SYS, U, T)
 -- Function File: [Y, T, X] = lsim (SYS, U, T, X0)
 -- Function File: [Y, T, X] = lsim (SYS, U, T, [], METHOD)
 -- Function File: [Y, T, X] = lsim (SYS, U, T, X0, METHOD)
     Simulate LTI model response to arbitrary inputs.  If no output
     arguments are given, the system response is plotted on the screen.

     *Inputs*
    SYS
          LTI model.  System must be proper, i.e. it must not have more
          zeros than poles.

    U
          Vector or array of input signal.  Needs `length(t)' rows and
          as many columns as there are inputs.  If SYS is a
          single-input system, row vectors U of length `length(t)' are
          accepted as well.

    T
          Time vector.  Should be evenly spaced.  If SYS is a
          continuous-time system and T is a real scalar, SYS is
          discretized with sampling time `tsam = t/(rows(u)-1)'.  If
          SYS is a discrete-time system and T is not specified, vector
          T is assumed to be `0 : tsam : tsam*(rows(u)-1)'.

    X0
          Vector of initial conditions for each state.  If not
          specified, a zero vector is assumed.

    METHOD
          Discretization method for continuous-time models.  Default
          value is zoh (zero-order hold).  All methods from `c2d' are
          supported.

     *Outputs*
    Y
          Output response array.  Has as many rows as time samples
          (length of t) and as many columns as outputs.

    T
          Time row vector.  It is always evenly spaced.

    X
          State trajectories array.  Has `length (t)' rows and as many
          columns as states.

     See also: impulse, initial, step





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Simulate LTI model response to arbitrary inputs.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
ltimodels


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 144
 -- Function File: test ltimodels
 -- Function File: ltimodels
 -- Function File: ltimodels (SYSTYPE)
     Test suite and help for LTI models.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Test suite and help for LTI models.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
lyap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 510
 -- Function File: X = lyap (A, B)
 -- Function File: X = lyap (A, B, C)
 -- Function File: X = lyap (A, B, [], E)
     Solve continuous-time Lyapunov or Sylvester equations.  Uses
     SLICOT SB03MD, SB04MD and SG03AD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Equations*
          AX + XA' + B = 0      (Lyapunov Equation)

          AX + XB + C = 0       (Sylvester Equation)

          AXE' + EXA' + B = 0   (Generalized Lyapunov Equation)

     See also: lyapchol, dlyap, dlyapchol





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Solve continuous-time Lyapunov or Sylvester equations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
lyapchol


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 461
 -- Function File: U = lyapchol (A, B)
 -- Function File: U = lyapchol (A, B, E)
     Compute Cholesky factor of continuous-time Lyapunov equations.
     Uses SLICOT SB03OD and SG03BD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Equations*
          A U' U  +  U' U A'  +  B B'  =  0           (Lyapunov Equation)

          A U' U E'  +  E U' U A'  +  B B'  =  0      (Generalized Lyapunov Equation)

     See also: lyap, dlyap, dlyapchol





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
Compute Cholesky factor of continuous-time Lyapunov equations.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
margin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2742
 -- Function File: [GAMMA, PHI, W_GAMMA, W_PHI] = margin (SYS)
 -- Function File: [GAMMA, PHI, W_GAMMA, W_PHI] = margin (SYS, TOL)
     Gain and phase margin of a system.  If no output arguments are
     given, both gain and phase margin are plotted on a bode diagram.
     Otherwise, the margins and their corresponding frequencies are
     computed and returned.

     *Inputs*
    SYS
          LTI model.  Must be a single-input and single-output (SISO)
          system.

    TOL
          Imaginary parts below TOL are assumed to be zero.  If not
          specified, default value `sqrt (eps)' is taken.

     *Outputs*
    GAMMA
          Gain margin (as gain, not dBs).

    PHI
          Phase margin (in degrees).

    W_GAMMA
          Frequency for the gain margin (in rad/s).

    W_PHI
          Frequency for the phase margin (in rad/s).

     *Equations*
          CONTINUOUS SYSTEMS
          Gain Margin
                  _               _
          L(jw) = L(jw)      BTW: L(jw) = L(-jw) = conj (L(jw))

          num(jw)   num(-jw)
          ------- = --------
          den(jw)   den(-jw)

          num(jw) den(-jw) = num(-jw) den(jw)

          imag (num(jw) den(-jw)) = 0
          imag (num(-jw) den(jw)) = 0

          Phase Margin
                    |num(jw)|
          |L(jw)| = |-------| = 1
                    |den(jw)|
            _     2      2
          z z = Re z + Im z

          num(jw)   num(-jw)
          ------- * -------- = 1
          den(jw)   den(-jw)

          num(jw) num(-jw) - den(jw) den(-jw) = 0

          real (num(jw) num(-jw) - den(jw) den(-jw)) = 0

          DISCRETE SYSTEMS
          Gain Margin
                                       jwT         log z
          L(z) = L(1/z)      BTW: z = e    --> w = -----
                                                    j T
          num(z)   num(1/z)
          ------ = --------
          den(z)   den(1/z)

          num(z) den(1/z) - num(1/z) den(z) = 0

          Phase Margin
                   |num(z)|
          |L(z)| = |------| = 1
                   |den(z)|

          L(z) L(1/z) = 1

          num(z)   num(1/z)
          ------ * -------- = 1
          den(z)   den(1/z)

          num(z) num(1/z) - den(z) den(1/z) = 0

          PS: How to get L(1/z)
                    4       3       2
          p(z) = a z  +  b z  +  c z  +  d z  +  e

                      -4      -3      -2      -1
          p(1/z) = a z  +  b z  +  c z  +  d z  +  e

                    -4                    2       3       4
                 = z   ( a  +  b z  +  c z  +  d z  +  e z  )

                        4       3       2                     4
                 = ( e z  +  d z  +  c z  +  b z  +  a ) / ( z  )

     See also: roots





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Gain and phase margin of a system.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
mixsyn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3862
 -- Function File: [K, N, GAMMA] = mixsyn (G, W1, W2, W3, ...)
     Solve stacked S/KS/T H-inf problem.  Bound the largest singular
     values of S (for performance), K S (to penalize large inputs) and
     T (for robustness and to avoid sensitivity to noise).  In other
     words, the inputs r are excited by a harmonic test signal.  Then
     the algorithm tries to find a controller K which minimizes the
     H-infinity norm calculated from the outputs z.

     *Inputs*
    G
          LTI model of plant.

    W1
          LTI model of performance weight.  Bounds the largest singular
          values of sensitivity S.  Model must be empty `[]', SISO or
          of appropriate size.

    W2
          LTI model to penalize large control inputs.  Bounds the
          largest singular values of KS.  Model must be empty `[]',
          SISO or of appropriate size.

    W3
          LTI model of robustness and noise sensitivity weight.  Bounds
          the largest singular values of complementary sensitivity T.
          Model must be empty `[]', SISO or of appropriate size.

    ...
          Optional arguments of `hinfsyn'.  Type `help hinfsyn' for
          more information.

     All inputs must be proper/realizable.  Scalars, vectors and
     matrices are possible instead of LTI models.

     *Outputs*
    K
          State-space model of the H-infinity (sub-)optimal controller.

    N
          State-space model of the lower LFT of P and K.

    GAMMA
          L-infinity norm of N.

     *Block Diagram*

                                              | W1 S   |
          gamma = min||N(K)||             N = | W2 K S | = lft (P, K)
                   K         inf              | W3 T   |

                                                                +------+  z1
                      +---------------------------------------->|  W1  |----->
                      |                                         +------+
                      |                                         +------+  z2
                      |                 +---------------------->|  W2  |----->
                      |                 |                       +------+
           r   +    e |   +--------+  u |   +--------+  y       +------+  z3
          ----->(+)---+-->|  K(s)  |----+-->|  G(s)  |----+---->|  W3  |----->
                 ^ -      +--------+        +--------+    |     +------+
                 |                                        |
                 +----------------------------------------+

                         +--------+
                         |        |-----> z1 (p1x1)          z1 = W1 e
           r (px1) ----->|  P(s)  |-----> z2 (p2x1)          z2 = W2 u
                         |        |-----> z3 (p3x1)          z3 = W3 y
           u (mx1) ----->|        |-----> e (px1)            e = r - y
                         +--------+

                         +--------+
                 r ----->|        |-----> z
                         |  P(s)  |
                 u +---->|        |-----+ e
                   |     +--------+     |
                   |                    |
                   |     +--------+     |
                   +-----|  K(s)  |<----+
                         +--------+

                         +--------+
                 r ----->|  N(s)  |-----> z
                         +--------+

          Extended Plant:  P = augw (G, W1, W2, W3)
          Controller:      K = mixsyn (G, W1, W2, W3)
          Entire System:   N = lft (P, K)
          Open Loop:       L = G * K
          Closed Loop:     T = feedback (L)

          Reference:
          Skogestad, S. and Postlethwaite I.
          Multivariable Feedback Control: Analysis and Design
          Second Edition
          Wiley 2005
          Chapter 3.8: General Control Problem Formulation

     See also: hinfsyn, augw





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Solve stacked S/KS/T H-inf problem.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
ncfsyn


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2143
 -- Function File: [K, N, GAMMA, INFO] = ncfsyn (G, W1, W2, FACTOR)
     Normalized Coprime Factor (NCF) H-infinity synthesis.  Compute
     positive feedback controller using the McFarlane/Glover Loop
     Shaping Design Procedure.  Uses SLICOT SB10ID, SB10KD and SB10ZD
     by courtesy of NICONET e.V. (http://www.slicot.org)

     *Inputs*
    G
          LTI model of plant.

    W1
          LTI model of precompensator.  Model must be SISO or of
          appropriate size.  An identity matrix is taken if W1 is not
          specified or if an empty model `[]' is passed.

    W2
          LTI model of postcompensator.  Model must be SISO or of
          appropriate size.  An identity matrix is taken if W2 is not
          specified or if an empty model `[]' is passed.

    FACTOR
          `factor = 1' implies that an optimal controller is required.
          `factor > 1' implies that a suboptimal controller is required,
          achieving a performance that is FACTOR times less than
          optimal.  Default value is 1.

     *Outputs*
    K
          State-space model of the H-infinity loop-shaping controller.

    N
          State-space model of the closed loop depicted below.

    GAMMA
          L-infinity norm of N.

    INFO
          Structure containing additional information.

    INFO.EMAX
          Nugap robustness.  `emax = inv (gamma)'.

    INFO.GS
          Shaped plant.  `Gs = W2 * G * W1'.

    INFO.KS
          Controller for shaped plant.  `Ks = ncfsyn (Gs)'.

    INFO.RCOND
          Estimates of the reciprocal condition numbers of the Riccati
          equations.

     *Block Diagram of N*

                      ^ z1              ^ z2
                      |                 |
           w1  +      |   +--------+    |            +--------+
          ----->(+)---+-->|   Ks   |----+--->(+)---->|   Gs   |----+
                 ^ +      +--------+          ^      +--------+    |
                 |                        w2  |                    |
                 |                                                 |
                 +-------------------------------------------------+




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Normalized Coprime Factor (NCF) H-infinity synthesis.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nichols


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 727
 -- Function File: [MAG, PHA, W] = nichols (SYS)
 -- Function File: [MAG, PHA, W] = nichols (SYS, W)
     Nichols chart of frequency response.  If no output arguments are
     given, the response is printed on the screen.

     *Inputs*
    SYS
          LTI system.  Must be a single-input and single-output (SISO)
          system.

    W
          Optional vector of frequency values.  If W is not specified,
          it is calculated by the zeros and poles of the system.

     *Outputs*
    MAG
          Vector of magnitude.  Has length of frequency vector W.

    PHA
          Vector of phase.  Has length of frequency vector W.

    W
          Vector of frequency values used.

     See also: bode, nyquist, sigma





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Nichols chart of frequency response.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
nyquist


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 734
 -- Function File: [RE, IM, W] = nyquist (SYS)
 -- Function File: [RE, IM, W] = nyquist (SYS, W)
     Nyquist diagram of frequency response.  If no output arguments are
     given, the response is printed on the screen.

     *Inputs*
    SYS
          LTI system.  Must be a single-input and single-output (SISO)
          system.

    W
          Optional vector of frequency values.  If W is not specified,
          it is calculated by the zeros and poles of the system.

     *Outputs*
    RE
          Vector of real parts.  Has length of frequency vector W.

    IM
          Vector of imaginary parts.  Has length of frequency vector W.

    W
          Vector of frequency values used.

     See also: bode, nichols, sigma





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Nyquist diagram of frequency response.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
obsv


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 459
 -- Function File: OB = obsv (SYS)
 -- Function File: OB = obsv (A, C)
     Return observability matrix.

     *Inputs*
    SYS
          LTI model.

    A
          State transition matrix (n-by-n).

    C
          Measurement matrix (p-by-n).

     *Outputs*
    OB
          Observability matrix.

     *Equation*
               | C        |
               | CA       |
          Ob = | CA^2     |
               | ...      |
               | CA^(n-1) |




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Return observability matrix.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
optiPID


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 235
Numerical optimization of a PID controller using an objective function.
The objective function is located in the file `optiPIDfun'.  Type
`which optiPID' to locate, `edit optiPID' to open and simply `optiPID'
to run the example file.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
Numerical optimization of a PID controller using an objective function.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
optiPIDfun


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 464
 ===============================================================================
 optiPIDfun                       Lukas Reichlin                       July 2009
 ===============================================================================
 Objective Function
 Reference: Guzzella, L. (2007) Analysis and Synthesis of SISO Control Systems.
            vdf Hochschulverlag, Zurich
 ===============================================================================



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
 ===============================================================================



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
place


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1710
 -- Function File: F = place (SYS, P)
 -- Function File: F = place (A, B, P)
 -- Function File: [F, NFP, NAP, NUP] = place (SYS, P, ALPHA)
 -- Function File: [F, NFP, NAP, NUP] = place (A, B, P, ALPHA)
     Pole assignment for a given matrix pair (A,B) such that `p = eig
     (A-B*F)'.  If parameter ALPHA is specified, poles with real parts
     (continuous-time) or moduli (discrete-time) below ALPHA are left
     untouched.  Uses SLICOT SB01BD by courtesy of NICONET e.V.
     (http://www.slicot.org)

     *Inputs*
    SYS
          LTI system.

    A
          State transition matrix (n-by-n) of a continuous-time system.

    B
          Input matrix (n-by-m) of a continuous-time system.

    P
          Desired eigenvalues of the closed-loop system state-matrix
          A-B*F.  `length (p) <= rows (A)'.

    ALPHA
          Specifies the maximum admissible value, either for real parts
          or for moduli, of the eigenvalues of A which will not be
          modified by the eigenvalue assignment algorithm.  `alpha >=
          0' for discrete-time systems.

     *Outputs*
    F
          State feedback gain matrix.

    NFP
          The number of fixed poles, i.e. eigenvalues of A having real
          parts less than ALPHA, or moduli less than ALPHA.  These
          eigenvalues are not modified by `place'.

    NAP
          The number of assigned eigenvalues.  `nap = n-nfp-nup'.

    NUP
          The number of uncontrollable eigenvalues detected by the
          eigenvalue assignment algorithm.

     *Note*
          Place is also suitable to design estimator gains:
          L = place (A.', C.', p).'
          L = place (sys.', p).'   # useful for discrete-time systems




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
Pole assignment for a given matrix pair (A,B) such that `p = eig
(A-B*F)'.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
pzmap


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 415
 -- Function File: pzmap (SYS)
 -- Function File: [P, Z] = pzmap (SYS)
     Plot the poles and zeros of an LTI system in the complex plane.
     If no output arguments are given, the result is plotted on the
     screen.  Otherwise, the poles and zeros are computed and returned.

     *Inputs*
    SYS
          LTI model.

     *Outputs*
    P
          Poles of SYS.

    Z
          Transmission zeros of SYS.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
Plot the poles and zeros of an LTI system in the complex plane.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
rlocus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 912
 -- Function File: rlocus (SYS)
 -- Function File: [RLDATA, K] = rlocus (SYS[, INCREMENT, MIN_K, MAX_K])
     Display root locus plot of the specified SISO system.

     *Inputs*
    SYS
          LTI model.  Must be a single-input and single-output (SISO)
          system.

    MIN_K
          Minimum value of K.

    MAX_K
          Maximum value of K.

    INCREMENT
          The increment used in computing gain values.

     *Outputs*
    RLDATA
          Data points plotted: in column 1 real values, in column 2 the
          imaginary values.

    K
          Gains for real axis break points.

     *Block Diagram*
           u    +         +---+      +------+             y
          ------>(+)----->| k |----->| SISO |-------+------->
                  ^ -     +---+      +------+       |
                  |                                 |
                  +---------------------------------+




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Display root locus plot of the specified SISO system.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 5
sigma


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1476
 -- Function File: [SV, W] = sigma (SYS)
 -- Function File: [SV, W] = sigma (SYS, W)
 -- Function File: [SV, W] = sigma (SYS, [], PTYPE)
 -- Function File: [SV, W] = sigma (SYS, W, PTYPE)
     Singular values of frequency response.  If no output arguments are
     given, the singular value plot is printed on the screen;

     *Inputs*
    SYS
          LTI system.  Multiple inputs and/or outputs (MIMO systems)
          make practical sense.

    W
          Optional vector of frequency values.  If W is not specified,
          it is calculated by the zeros and poles of the system.

    PTYPE = 0
          Singular values of the frequency response H of system SYS.
          Default Value.

    PTYPE = 1
          Singular values of the frequency response `inv(H)'; i.e.
          inversed system.

    PTYPE = 2
          Singular values of the frequency response `I + H'; i.e.
          inversed sensitivity (or return difference) if `H = P * C'.

    PTYPE = 3
          Singular values of the frequency response `I + inv(H)'; i.e.
          inversed complementary sensitivity if `H = P * C'.

     *Outputs*
    SV
          Array of singular values.  For a system with m inputs and p
          outputs, the array sv has `min (m, p)' rows and as many
          columns as frequency points `length (w)'.  The singular
          values at the frequency `w(k)' are given by `sv(:,k)'.

    W
          Vector of frequency values used.

     See also: bodemag, svd





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Singular values of frequency response.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 4
step


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1235
 -- Function File: [Y, T, X] = step (SYS)
 -- Function File: [Y, T, X] = step (SYS, T)
 -- Function File: [Y, T, X] = step (SYS, TFINAL)
 -- Function File: [Y, T, X] = step (SYS, TFINAL, DT)
     Step response of LTI system.  If no output arguments are given,
     the response is printed on the screen.

     *Inputs*
    SYS
          LTI model.

    T
          Time vector.  Should be evenly spaced.  If not specified, it
          is calculated by the poles of the system to reflect
          adequately the response transients.

    TFINAL
          Optional simulation horizon.  If not specified, it is
          calculated by the poles of the system to reflect adequately
          the response transients.

    DT
          Optional sampling time.  Be sure to choose it small enough to
          capture transient phenomena.  If not specified, it is
          calculated by the poles of the system.

     *Outputs*
    Y
          Output response array.  Has as many rows as time samples
          (length of t) and as many columns as outputs.

    T
          Time row vector.

    X
          State trajectories array.  Has `length (t)' rows and as many
          columns as states.

     See also: impulse, initial, lsim





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Step response of LTI system.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
strseq


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 250
 -- Function File: STRVEC = strseq (STR, IDX)
     Return a cell vector of indexed strings by appending the indices
     IDX to the string STR.

          strseq ("x", 1:3) = {"x1"; "x2"; "x3"}
          strseq ("u", [1, 2, 5]) = {"u1"; "u2"; "u5"}




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
Return a cell vector of indexed strings by appending the indices IDX to
the stri



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
test_control


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
 -- Script File:  test_control
     Execute all available tests at once.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
Execute all available tests at once.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
tfpolyones


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Return (pxm) cell of tfpoly([1]).  For internal use only.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Return (pxm) cell of tfpoly([1]).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
tfpolyzeros


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
Return (pxm) cell of tfpoly([0]).  For internal use only.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
Return (pxm) cell of tfpoly([0]).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 3
zpk


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1373
 -- Function File: S = zpk ("S")
 -- Function File: Z = zpk ("Z", TSAM)
 -- Function File: SYS = zpk (SYS)
 -- Function File: SYS = zpk (K)
 -- Function File: SYS = zpk (Z, P, K, ...)
 -- Function File: SYS = zpk (Z, P, K, TSAM, ...)
 -- Function File: SYS = zpk (Z, P, K, TSAM, ...)
     Create transfer function model from zero-pole-gain data.  This is
     just a stop-gap compatibility wrapper since zpk models are not yet
     implemented.

     *Inputs*
    SYS
          LTI model to be converted to transfer function.

    Z
          Cell of vectors containing the zeros for each channel.
          z{i,j} contains the zeros from input j to output i.  In the
          SISO case, a single vector is accepted as well.

    P
          Cell of vectors containing the poles for each channel.
          p{i,j} contains the poles from input j to output i.  In the
          SISO case, a single vector is accepted as well.

    K
          Matrix containing the gains for each channel.  k(i,j)
          contains the gain from input j to output i.

    TSAM
          Sampling time in seconds.  If TSAM is not specified, a
          continuous-time model is assumed.

    ...
          Optional pairs of properties and values.  Type `set (tf)' for
          more information.

     *Outputs*
    SYS
          Transfer function model.

     See also: tf, ss, dss, frd





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
Create transfer function model from zero-pole-gain data.





