LQG for discrete-time systems Starting point and control strategy - - PowerPoint PPT Presentation

lqg for discrete time systems
SMART_READER_LITE
LIVE PREVIEW

LQG for discrete-time systems Starting point and control strategy - - PowerPoint PPT Presentation

LQG for discrete-time systems Starting point and control strategy Standard state space representation: qx = Fx + Gu + Nv 1 , R 1 v 1 R 12 z = Mx, = , ( ) = . R T v 2 R 2 12 y = Hx + v 2


slide-1
SLIDE 1

LQG for discrete-time systems

Starting point and control strategy

◮ “Standard” state space representation:

     qx = Fx + Gu + Nv1, z = Mx, y = Hx + v2, η = v1 v2

  • , Φη(ω) =

R1 R12 RT

12

R2

  • .

◮ Minimize the criterion

V = ||z||2

Q1 + ||u||2 Q2 = E

  • zT Q1z + uT Q2u
  • .

◮ The weighting matrices Q1 = QT 1 ≥ 0 and Q2 = QT 2 > 0 are

design parameters.

◮ Control law:

u(k) = −Lˆ x(k) + ˜ r(k), qˆ x = F ˆ x + Gu + K(y − Hˆ x).

1 / 8 hans.rosth@it.uu.se LQG 2

slide-2
SLIDE 2

LQG: The optimal controller

Theorem 9.4

◮ The optimal control law is u(k) = −Lˆ

x(k|k − 1),

◮ ˆ

x(k|k − 1) is obtained from the corresponding Kalman filter.

◮ The optimal state feedback gain is

L = (GT SG + Q2)−1GT SF.

◮ The matrix S = ST ≥ 0 is the solution to the discrete-time

Riccati equation (DARE) S = F T SF + MT Q1M − F T SG(GT SG + Q2)−1GT SF.

◮ N.B. There are two different DAREs involved, the one above

and the one for the Kalman filter!

◮ Corollary 9.2: For the case when R12 = 0 the control law

u(k) = −Lˆ x(k|k) is the optimal controller with a direct/feed through term (so that u(k) depends on y(k) also).

2 / 8 hans.rosth@it.uu.se LQG 2

slide-3
SLIDE 3

Example: Sampled LQ control of a DC motor

The effect of Q1 and Q2

◮ The DC-motor Y (s) = 1 s(s+1)U(s), ◮ sampled with h = 0.1 ⇒ y(k) = 0.4837·10−2(q+0.9672) (q−1)(q−0.9048)

u(k).

◮ u(k) = −Lx(k) + mr(k), Q1 = 1 = constant and Q2 varied.

1 2 3 4 5 6 0.2 0.4 0.6 0.8 1 time y Q2 = 1 Q2 = 0.01 Q2 = 0.1 Q2 = 10−4 0.5 1 1.5 2 −20 −15 −10 −5 5 10 15 20 time u Q2 = 1 Q2 = 0.1 Q2 = 0.01 Q2 = 10−4

◮ Simulations: Step responses (r = unit step) for the closed

loop systems. The output y to the left, the input u to the right.

3 / 8 hans.rosth@it.uu.se LQG 2

slide-4
SLIDE 4

Cross term in the criterion

◮ Sometimes there is a cross term in the criterion:

V = E

  • zT Q1z + 2xT Q12u + uT Q2u
  • ◮ Can be treated explicitely.

◮ Alternative: Bring it back to the standard case by a

preliminary state feedback, ˜ u = u + Q−1

2 QT 12x. ◮ This leads to the modified LQ-problem with

˜ M = I, ˜ Q1 = MT Q1M − Q12Q−1

2 QT 12,

˜ Q2 = Q2.

◮ The optimal control law is then u = −Lx = −˜

Lx − Q−1

2 QT 12x,

i.e. L = ˜ L + Q−1

2 QT 12.

4 / 8 hans.rosth@it.uu.se LQG 2

slide-5
SLIDE 5

Continuous-time LQG by sampling controller

Sampling the criterion function

◮ Continuous-time system (A, B, M, C). ◮ Sampling controller with sampling period h. ◮ Minimize the continuous-time criterion

Vc = E

  • zT (t)Q1z(t) + uT (t)Q2u(t)
  • .

◮ This is equivalent to minimizing the discrete-time criterion

Vd = E

  • xT (k) ¯

Q1x(k) + 2xT (k) ¯ Q12u(k) + uT (k) ¯ Q2u(k)

  • ,

with

◮ ¯

Q1 = h

0 ΨT Q1Ψdt,

◮ ¯

Q12 = h

0 ΓT Q1Ψdt,

◮ ¯

Q2 = h

0 ΓT Q1Γdt + hQ2,

where Ψ(t) = MeAt and Γ(t) = t

0 Ψ(s)Bds.

5 / 8 hans.rosth@it.uu.se LQG 2

slide-6
SLIDE 6

Example: The effect of the sampling period

Intersample behaviour

◮ LQ control of the DC-motor. ◮ Two different sampling periods: h = 1 (left) and h = 0.1

(right).

1 2 3 4 5 6 0.2 0.4 0.6 0.8 1

time y Solid line: Sampling controller, discr.−time criterion Dashed line: Sampling controller, sampled criterion Output for discr.−time systems Output for cont.−time systems with sampling controllers Output with cont.−time controller 1 2 3 4 5 6 0.2 0.4 0.6 0.8 1 time y Outputs for cont.− −time systems with cont.−time controller and sampling controllers (coinciding) Outputs for discr.−time systems

◮ Identical weighting matrices, Q1 = 1 and Q2 = 0.01, were

used for

◮ continuous-time, ◮ discrete-time and ◮ sampled continuous-time

versions of the criterion.

6 / 8 hans.rosth@it.uu.se LQG 2

slide-7
SLIDE 7

LQG: Comments

◮ LQG optimal for given Q1 and Q2, and under idealized

conditions (exact model, R1 and R2 known etc)

◮ Q1 and Q2 are design parameters — use the optimization as a

design tool, adjust Q1 and Q2 to get desirable properties for the closed loop system

◮ Q1 penalizes z and Q2 penalizes u, and only their relative

sizes matter

◮ Q1 and Q2 usually diagonal matrices: if zi = [z]i is too big,

increase the corresponding diagonal element q1

i = [Q1]ii etc ◮ Too see any change of significance, Q1/Q2 should be

increased or decreased at least one order of magnitude (say 10 times)

7 / 8 hans.rosth@it.uu.se LQG 2

slide-8
SLIDE 8

LQG: Comments, cont’d

◮ LQG gives an explicit solution for the optimization problem,

and in the form of LTI filters Fy(q) and Fr(q) (Fy(s) and Fr(s) in cont. time), which are easily implemented in a computer

◮ The design is an iterative process: check e.g. the sensitivity

functions S and T, and simulate the closed loop system

◮ LQG requires a linear model, so limitations (e.g. bounds on u)

cannot be accounted for explicitely

◮ Useful Matlab functions:

◮ lqr, lqry, dlqr: compute L ◮ lqg, lqgreg: return the controller as LTI object ◮ lqrd: computes L for sampled cont.-time criterion 8 / 8 hans.rosth@it.uu.se LQG 2