You are on page 1of 8

# Lecture 3: State-feedback, observers, reference

values, and integrators
• Problem formulation
• Pole placement
• Observers
• Output feedback
• Reference values
• A larger example

Problem formulation
• Model: Continuous-time, sample with h

[

x( kh + h) = Φ x( kh) + Γ u( kh)

• Disturbances: Sporadic pulse disturbances x(0) = x0
• Criterion: x(t) → 0 reasonably fast with reasonable
inputs u. Choose closed loop poles
• Admissible controls: Linear controllers, all states available
More complicated problems later

Problem formulation cont’d
Design parameters
• Closed loop poles
• Sampling interval
Evaluation
• Compare x(t) and u( kh) with specifications
• Trade-off between control magnitude and speed of response
• Subjective judgements

Example – Double integrator

 2 

h /2 
1 h

 u( kh)

x( kh) + 
x( kh + h) =
0

1

h

Linear state-feedback controller

u( kh) = − Lx( kh) = −l1 x1 ( kh) − l2 x2 ( kh)

Closed-loop system becomes
x( kh + h) = (Φ − Γ L) x( kh)

1 − l1 h2 /2 h − l2 h2 /2 

=
 x( kh)
− l1 h
1 − l2 h

Characteristic equation  

2  

2
l1 h
l1 h
2
+ l2 h − 2 z +
− l2 h + 1 = 0
z +
2
2

. . Γ) reachable \ Wc = [Γ . linear in li • L depends on h • How to choose the specifications? – Use the continuous time counterpart – Damping ζ and natural frequency ω (ω 0 ) of dominating poles Solution via controllable form How to find T ?  ˜ =  p1 − a1 L = LT ˜ = T Φ T −1 .     . . . Φ n−1 Γ] has full rank • Matlab L = place(Phi. ΦΓ .. . .  .     0 p2 − a2 Solvable for T if the system is reachable 0 T −1   1 a1 ⋅ ⋅ ⋅ an−1        0 1 ⋅ ⋅ ⋅ an−2      −1   ˜   Wc =  . . . . . . . . .Example cont’d General case Characteristic equation  2   2  l1 h l1 h 2 z + + l2 h − 2 z + − l2 h + 1 = 0 2 2 Desired characteristic equation z2 + p1 z + p2 = 0 l1 h2 − l2 h + 1 = p2 2 Solution l1 = 1 (1 + p1 + p2 ) h2 l2 = Solvable \ (Φ . . Γ˜ = T Γ Φ ˜ = − LT ˜ x = − Lx u = − Lz z = T x.. an−1 Γ + ⋅ ⋅ ⋅ + Φ n−1 Γ  = Wc W c   L =  p1 − a1 p2 − a2 ⋅ ⋅ ⋅ pn − an  ⋅  −1  Γ a1 Γ + ΦΓ .  . . det( zI − Φ) = A( z) 0 ⋅⋅⋅ 1 0 Desired characteristic equation obtained for  pn − an  T ˜ c = [T Γ . .   . . . T Φ n−1 Γ] = T Wc W   1       0   Γ˜ =    ..Gamma..  . l˜n  z u = − Lz   = −  p1 − a1 p2 − a2 ⋅ ⋅ ⋅ pn − an  z • How to get T ? ⋅⋅⋅ det( zI − (Φ − Γ L)) = P( z)   −a1 −a2 ⋅ ⋅ ⋅ −an−1 −an        1 0 0 0  ⋅⋅⋅   ˜ = Φ   .. T Φ T −1 T Γ .       ˜ = −  l˜1 l˜2 . . an−1 Γ + ⋅ ⋅ ⋅ + Φ n−1 Γ  . .       0 0 ⋅⋅⋅ 1   ˜ −1 =  Γ a1 Γ + ΦΓ .    .neweigs) Linear equations for l1 and l2 l1 h2 + l2 h − 2 = p1 2 Basic problem: Find L such that Φ − Γ L has prescribed eigenvalues 1 (3 + p1 − p2 ) 2h • Unique solution.  . . .

. c) ω = 1. . d) N = 20 (a) 2 0 5 0 0 5 10 Input −2 0 5 Time 10 10 0 5 Time 10 5 10 0 5 Time 10 0 −2 0 0 0 (d) −2 −2 0 5 (c) Input (d) 0 0 −2 0 10 (c) Input 0 −2 0 Input (b) Output 2 Input Output (b) Input (a) 5 Time 10 Rule of thumb: ω h =0. 1  T P(Φ) L = LT     ˜ c W −1 P(Φ) =  0 .. 1  W −1 P(Φ) = 0 . 1  P(T Φ T −1 ) T =  0 .5. .6 . . 1 . d) ω = 2 Double integrator cont’d Double integrator cont’d Time Time Other initial value x T (0+ ) = [1 1] b) N = 5.. 1  Φ ˜ k =  0 . c) N = 10.Ackermann’s formula ˜ n + a1 Φ ˜ n−1 + ⋅ ⋅ ⋅ + an I = 0 Φ ˜ n + p1 Φ ˜ n−1 + ⋅ ⋅ ⋅ + pn I = ( p1 − a1 )Φ ˜ n−1 + ⋅ ⋅ ⋅ + ( pn − an ) I Φ For controllable form and 0 ≤ k < n      0 .44) x T (0) = [1 1].. c) N = 10. b) ω = 0... . d) N = 20 Change of h ( N ) b) N = 5..2 – 0. 1 W c c Change of ω (ω h = 0.. . . 1  P(Φ) ˜ =  p1 − a1 p2 − a2 ⋅ ⋅ ⋅ Use the continuous time counterpart Input ˜ = A(Φ) ˜ = P(Φ) Double integrator −5 T P(Φ)T −1 0 −5 0 5 10 15 }| {    z ˜ =  0 .. 0  (b) Input Output 2 1 0  ˜ pn − an  = L 0 −5 0 5 10 15 (c) 0 5 0 5 10 15 10 15 (d) 0 Input thus s2 + 2ζ ω s + ω 2 (a) n− k so that     0 . .

Deadbeat control Observers x( k + 1) = Φ x( k) + Γ u( k) Choose P( z) = zn Remaining design parameter h y( k) = Cx( k) Assume only the output available Double integrator x T (0) = [1 1] (a) (b) Input Output 2 0 5 10 (d) 5 Input Input • Kalman form • Luenberger form 0 −5 0 (c) • Direct calculation 5 0 −5 0 5 10 0 5 Time 10 5 0 Main question: How to choose the observer poles? −5 0 5 Time 10 b) h = 2. c) h = 1. d) h = 0.5 Luenberger observer Reduced order observer Reconstruction using dynamical model Consider the model x( k + 1) = Φ x( k) + Γ u( k) Introduce direct term in the observer y( k) = Cx( k) xˆ ( k p k) = Φ xˆ ( k − 1 p k − 1) + Γ u( k − 1)   + K y( k) − C (Φ xˆ ( k − 1 p k − 1) + Γ u( k − 1)) Introduce "feedback" from measured y( k) = ( I − K C ) (Φ xˆ ( k − 1 p k − 1) + Γ u( k − 1)) + K y( k) xˆ ( k + 1 p k) = Φ xˆ ( k p k − 1) + Γ u( k) + K [ y( k) − C xˆ ( k p k − 1)] Form the estimation error x˜ = x − xˆ x˜ ( k+1 p k) = Φ x˜ ( k p k−1)− K C x˜ ( k p k−1) = [Φ− K C] x˜ ( k p k−1) • Choose K to get good convergence • Any eigenvalues possible. provided Wo full rank • Trade-off against noise amplification Reconstruction error can be written as x˜ ( k p k) = x( k) − xˆ ( k p k) = (Φ − K C Φ) x˜ ( k − 1 p k − 1) Look at y˜( k) = y( k) − C xˆ ( k p k) = C x˜ ( k p k) = C ( I − K C )Φ x˜ ( k − 1 p k − 1) = ( C − C K C )Φ x˜ ( k − 1 p k − 1) = ( I − C K ) C Φ x˜ ( k − 1 p k − 1) | {z } =0? .

Why reduced order? Output feedback xˆ New coordinates     C y  x = Tx =  ¯   z= C z¯ The error can be written as    y˜( k p k)    = z˜( k p k) =  z˜¯( k p k) 0 z˜¯( k p k) where dim z˜¯ = dim x − dim y = n − p u −L y Process Observer xˆ ( k + 1 p k) = Φ xˆ ( k p k − 1) + Γ u( k) + K ( y( k) − C xˆ ( k p k − 1))    u( k) = − L xˆ ( k p k − 1) xˆ ( k + 1 p k) = (Φ − K C − Γ L) xˆ ( k p k − 1) + K y( k) u( k) = − L xˆ ( k p k − 1) Only zˆ¯( k p k) = . needed The transfer function of the controller Gr ( z) = − L( zI − Φ + Γ L + K C)−1 K Closed loop system Example – Double integrator x( k + 1) = Φ x( k) + Γ u( k) Process poles: Observer poles: Ar ( z) = det( zI − Φ + Γ L) Ao ( z) = det( zI − Φ + K C ) May also use observer with direct term Velocity (a) Estimated states a) Kalman b) Luenberger 5 Time 0 10 0 2 0 0 (b) 5 Time 10 0 5 10 0 5 Time 10 2 Velocity Separation 0 0  ΓL   x( k)    Φ − KC x˜ ( k p k − 1) 0 5 0 10 2 2 Velocity x˜ ( k + 1 p k)  Measured states Position Eliminate u( k)    x( k + 1)  Φ − ΓL   =  2 Position u( k) = − L( x( k) − x˜ ( k p k − 1)) Position 2 x˜ ( k + 1 p k) = (Φ − K C ) x˜ ( k p k − 1) 0 0 5 Time 10 0 . . .

General disturbances General disturbances. v( k + 1) = v( k) and Φ xw = Γ Servo case Try first u( k) = − L xˆ ( k) + L c uc ( k) The closed loop system =1 z}|{ u( k) = − L xˆ ( k) − Lw wˆ ( k) = − L xˆ ( k) − wˆ ( k) xˆ ( k + 1) = Φ xˆ ( k) + Γ(wˆ ( k) + u( k)) + K ( y( k) − C xˆ ( k)) x( k + 1) = (Φ − Γ L) x( k) + Γ L x˜ ( k) + Γ Lc uc ( k) wˆ ( k + 1) = wˆ ( k) + K w( y( k) − C xˆ ( k)) x˜ ( k + 1) = (Φ − K C ) x˜ ( k) y( k) = Cx( k) Integrator in the controller! v uc xˆ ε L − ∑ − Disturbance Observer State Observer ∑ u vˆ ∑ Process y xˆ Lc −L Observer ∑ u Process y .e. cont’d Dynamical systems with initial values gives the disturbance v u( k) = − Lx( k) − Lww( k) dx = Ax + Bu + v dt dw = Aw w v = Cww    dt      x   A Cw   x   B  d      u +  =       dt w 0 0 Aw w Closed-loop system x( k + 1) = (Φ − Γ L) x( k) + (Φ xw − Γ Lw ) w( k) {z } | (0? Sampling gives         Φ Φ xw   x( k)   Γ  x( k + 1)     +   u( k)   =  w( k + 1) Φw 0 w( k) Combined feedback and feedforward w( k + 1) = Φ ww( k) w uncontrollable from u! w observable? 0 Unmeasurable disturbances – Step input load Φ w = 1 i.

cont’d Model and feedforward Observer error not reachable from uc .5 and ζ m = 0.5 [ ωN = 6 x3 = ω 2 /ω 0 u( kh) = − L xˆ ( kh p kh − h) + L c uc ( kh) Desired closed loop poles (in continuous time) (s2 + 2ζ mω m s + ω 2m ) (s + α 1ω m ) = 0 α 1 = 2 0.1 0 u f f ( k) = Open-loop system: ω p = 1 and ζ p = 0.→ 0 after an impulse 75  s2 + 2ζ mα 0ω m s + (α 0ω m )2 (s + α 0α 1ω m ) = 0 α 0 = 2 .Servo case.05 ω2 x2 = ω 1 /ω 0 Observer Design ϕ2 Motor x1 = ϕ 1 − ϕ 2 Impulse response y u( k) = L( xm ( k) − xˆ ( k)) + u f f ( k) Feedforward signal J1 Process ym ( k) = Cm xm ( k) A design example I ∑ xm ( k + 1) = Φ m xm ( k) + Γ m uc ( k) Reference trajectories for states Open-loop pulse transfer function ϕ1 L − −1 H ( z) = C( zI − Φ)−1 Γ = u fb Observer design 0 25 50 Time No friction [ Integrator [ y .e. cancellation of Use a two-degree-of-freedom controller Ao = det( zI − Φ + K C) uc Model and Feedforward xm Generator Closed loop system from reference to output u ff ∑ xˆ B ( z) H cl ( z) = C( zI − Φ + Γ L) Γ L c = L c Ac ( z) B ( z) A( z) Controller Notice: Same zeros! Why? ω1 Output J2 H m ( q) uc ( k) H ( q) Specifications: ω m = 0. i.7 Sampling interval: h = 0.

Design Summary Output Feedback from observed states. 0 20 40 60 80 Input 2 – Full model – Reduced order – Delays in the estimator • General disturbances • The servo case 1 0 −1 – Reachability – Ackermann’s formula • Observers 1 0 • State feedback • Two degree-of-freedom controller 0 20 40 Time 60 80 . Observer twice as fast as closed loop dynamics.