[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

29.9 Controller Design

Function File: dgkfdemo ()

Octave Controls toolbox demo: options demos.

Function File: hinfdemo ()

design demos for continuous SISO and MIMO systems and a discrete system. The SISO system is difficult to control because it is non-minimum-phase and unstable. The second design example controls the jet707 plant, the linearized state space model of a Boeing 707-321 aircraft at v=80 m/s Inputs: (1) thrust and (2) elevator angle Outputs: (1) airspeed and (2) pitch angle. The discrete system is a stable and second order.

SISO plant:
 
                              +----+
         -------------------->| W1 |---> v1
     z   |                    +----+
     ----|-------------+
         |             |
         |    +---+    v   y  +----+
       u *--->| G |--->O--*-->| W2 |---> v2
         |    +---+       |   +----+
         |                |
         |    +---+       |
         -----| K |<-------
              +---+

W1 und W2 are the robustness and performance weighting functions.

MIMO plant:

The optimal controller minimizes the norm of the augmented plant P (mixed-sensitivity problem):

 
     w
      1 -----------+
                   |                   +----+
               +---------------------->| W1 |----> z1
     w         |   |                   +----+
      2 ------------------------+
               |   |            |
               |   v   +----+   v      +----+
            +--*-->o-->| G  |-->o--*-->| W2 |---> z2
            |          +----+      |   +----+
            |                      |
            ^                      v
            u                       y (to K)
         (from controller K)
Discrete system:

This is not a true discrete design. The design is carried out in continuous time while the effect of sampling is described by a bilinear transformation of the sampled system. This method works quite well if the sampling period is "small" compared to the plant time constants.

The continuous plant:

is discretised with a ZOH (Sampling period = Ts = 1 second):

 
                              +----+
         -------------------->| W1 |---> v1
     z   |                    +----+
     ----|-------------+
         |             |
         |    +---+    v      +----+
         *--->| G |--->O--*-->| W2 |---> v2
         |    +---+       |   +----+
         |                |
         |    +---+       |
         -----| K |<-------
              +---+

W1 and W2 are the robustness and performance weighting functions.

Function File: [l, m, p, e] = dlqe (a, g, c, sigw, sigv, z)

Construct the linear quadratic estimator (Kalman filter) for the discrete time system where w, v are zero-mean gaussian noise processes with respective intensities sigw = cov (w, w) and sigv = cov (v, v).

If specified, z is cov (w, v). Otherwise cov (w, v) = 0.

The observer structure is

The following values are returned:

l

The observer gain, is stable.

m

The Riccati equation solution.

p

The estimate error covariance after the measurement update.

e

The closed loop poles of

Function File: [k, p, e] = dlqr (a, b, q, r, z)

Construct the linear quadratic regulator for the discrete time system to minimize the cost functional

z omitted or z included.

The following values are returned:

k

The state feedback gain, is stable.

p

The solution of algebraic Riccati equation.

e

The closed loop poles of

Function File: [Lp, Lf, P, Z] = dkalman (A, G, C, Qw, Rv, S)

Construct the linear quadratic estimator (Kalman predictor) for the discrete time system where w, v are zero-mean gaussian noise processes with respective intensities Qw = cov (w, w) and Rv = cov (v, v).

If specified, S is cov (w, v). Otherwise cov (w, v) = 0.

The observer structure is

The following values are returned:

Lp

The predictor gain, is stable.

Lf

The filter gain.

P

The Riccati solution.

Z

The updated error covariance matrix.

Function File: [K, gain, kc, kf, pc, pf] = h2syn (asys, nu, ny, tol)

Design optimal controller per procedure in Doyle, Glover, Khargonekar, Francis, State-Space Solutions to Standard Control Problems, IEEE TAC August 1989.

Discrete-time control per Zhou, Doyle, and Glover, Robust and optimal control, Prentice-Hall, 1996.

Inputs

asys

system data structure (see ss, sys2ss)

  • controller is implemented for continuous time systems
  • controller is not implemented for discrete time systems
nu

number of controlled inputs

ny

number of measured outputs

tol

threshold for 0. Default: 200*eps

Outputs

k

system controller

gain

optimal closed loop gain

kc

full information control (packed)

kf

state estimator (packed)

pc

ARE solution matrix for regulator subproblem

pf

ARE solution matrix for filter subproblem

Function File: K = hinf_ctr (dgs, f, h, z, g)

Called by hinfsyn to compute the optimal controller.

Inputs

dgs

data structure returned by is_dgkf

f
h

feedback and filter gain (not partitioned)

g

final gamma value

Outputs

K

controller (system data structure)

Do not attempt to use this at home; no argument checking performed.

Function File: [k, g, gw, xinf, yinf] = hinfsyn (asys, nu, ny, gmin, gmax, gtol, ptol, tol)

Inputs input system is passed as either

asys

system data structure (see ss, sys2ss)

  • controller is implemented for continuous time systems
  • controller is not implemented for discrete time systems (see bilinear transforms in c2d, d2c)
nu

number of controlled inputs

ny

number of measured outputs

gmin

initial lower bound on optimal gain

gmax

initial upper bound on Optimal gain.

gtol

Gain threshold. Routine quits when gmax/gmin < 1+tol.

ptol

poles with abs(real(pole)) (H is appropriate Hamiltonian) are considered to be on the imaginary axis. Default: 1e-9.

tol

threshold for 0. Default: 200*eps.

gmax, min, tol, and tol must all be postive scalars.

Outputs

k

System controller.

g

Designed gain value.

gw

Closed loop system.

xinf

ARE solution matrix for regulator subproblem.

yinf

ARE solution matrix for filter subproblem.

References:

  1. Doyle, Glover, Khargonekar, Francis, State-Space Solutions to Standard Control Problems, IEEE TAC August 1989.
  2. Maciejowksi, J.M., Multivariable feedback design, Addison-Wesley, 1989, ISBN 0-201-18243-2.
  3. Keith Glover and John C. Doyle, State-space formulae for all stabilizing controllers that satisfy an bound and relations to risk sensitivity, Systems & Control Letters 11, Oct. 1988, pp 167-172.

Function File: [retval, pc, pf] = hinfsyn_chk (a, b1, b2, c1, c2, d12, d21, g, ptol)

Called by hinfsyn to see if gain g satisfies conditions in Theorem 3 of Doyle, Glover, Khargonekar, Francis, State Space Solutions to Standard Control Problems, IEEE TAC August 1989.

Warning: do not attempt to use this at home; no argument checking performed.

Inputs

As returned by is_dgkf, except for:

g

candidate gain level

ptol

as in hinfsyn

Outputs

retval

1 if g exceeds optimal Hinf closed loop gain, else 0

pc

solution of "regulator" ARE

pf

solution of "filter" ARE

Do not attempt to use this at home; no argument checking performed.

Function File: [xinf, x_ha_err] = hinfsyn_ric (a, bb, c1, d1dot, r, ptol)

Forms

 
xx = ([bb; -c1'*d1dot]/r) * [d1dot'*c1 bb'];
Ha = [a 0*a; -c1'*c1 - a'] - xx;

and solves associated Riccati equation. The error code x_ha_err indicates one of the following conditions:

0

successful

1

xinf has imaginary eigenvalues

2

hx not Hamiltonian

3

xinf has infinite eigenvalues (numerical overflow)

4

xinf not symmetric

5

xinf not positive definite

6

r is singular

Function File: [k, p, e] = lqe (a, g, c, sigw, sigv, z)

Construct the linear quadratic estimator (Kalman filter) for the continuous time system where w and v are zero-mean gaussian noise processes with respective intensities

 
sigw = cov (w, w)
sigv = cov (v, v)

The optional argument z is the cross-covariance cov (w, v). If it is omitted, cov (w, v) = 0 is assumed.

Observer structure is dz/dt = A z + B u + k (y - C z - D u)

The following values are returned:

k

The observer gain, is stable.

p

The solution of algebraic Riccati equation.

e

The vector of closed loop poles of

Function File: [k, q1, p1, ee, er] = lqg (sys, sigw, sigv, q, r, in_idx)

Design a linear-quadratic-gaussian optimal controller for the system

 
dx/dt = A x + B u + G w       [w]=N(0,[Sigw 0    ])
    y = C x + v               [v]  (    0   Sigv ])

or

 
x(k+1) = A x(k) + B u(k) + G w(k)       [w]=N(0,[Sigw 0    ])
  y(k) = C x(k) + v(k)                  [v]  (    0   Sigv ])

Inputs

sys

system data structure

sigw
sigv

intensities of independent Gaussian noise processes (as above)

q
r

state, control weighting respectively. Control ARE is

in_idx

names or indices of controlled inputs (see sysidx, cellidx)

default: last dim(R) inputs are assumed to be controlled inputs, all others are assumed to be noise inputs.

Outputs

k

system data structure format LQG optimal controller (Obtain A, B, C matrices with sys2ss, sys2tf, or sys2zp as appropriate).

p1

Solution of control (state feedback) algebraic Riccati equation.

q1

Solution of estimation algebraic Riccati equation.

ee

Estimator poles.

es

Controller poles.

Function File: [k, p, e] = lqr (a, b, q, r, z)

construct the linear quadratic regulator for the continuous time system to minimize the cost functional

z omitted or z included.

The following values are returned:

k

The state feedback gain, is stable and minimizes the cost functional

p

The stabilizing solution of appropriate algebraic Riccati equation.

e

The vector of the closed loop poles of

Reference Anderson and Moore, Optimal control: linear quadratic methods, Prentice-Hall, 1990, pp. 56-58.

Function File: [y, x] = lsim (sys, u, t, x0)

Produce output for a linear simulation of a system; produces a plot for the output of the system, sys.

u is an array that contains the system's inputs. Each row in u corresponds to a different time step. Each column in u corresponds to a different input. t is an array that contains the time index of the system; t should be regularly spaced. If initial conditions are required on the system, the x0 vector should be added to the argument list.

When the lsim function is invoked a plot is not displayed; however, the data is returned in y (system output) and x (system states).

Function File: K = place (sys, p)

Computes the matrix K such that if the state is feedback with gain K, then the eigenvalues of the closed loop system (i.e. A-BK) are those specified in the vector p.

Version: Beta (May-1997): If you have any comments, please let me know. (see the file place.m for my address)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on July, 20 2006 using texi2html 1.76.