Lecture 9: State Feedback and s [IFAC PB Ch 9] State Feedback s Disturbance Estimation & Integral Action Control Design Many factors to consider, for example: Attenuation of load disturbances Reduction of the effect of measurement noise Command signal following Variations and uncertainties in process behavior Two Classes of Control Problems Regulation problems: compromise between reduction of load disturbances and injection of measurement noise Lecture 9 Servo problems: make the output respond to command signals in the desired way Lecture State Feedback: Problem Formulation Discrete-time process model x(k + = Φx(k+ Γu(k Linear feedback from all states u(k = Lx(k Disturbances modelled by nonzero x( =x Reasonable stability margins required Control signal magnitude must be reasonable 3 4 Closed-Loop System The state equation x(k + = Φx(k+ Γu(k with the control law u(k = Lx(k gives the closed-loop system x(k + =[Φ ΓL] x(k Choose L to obtain the desired characteristic equation det(zi Φ + Γ L = (Matlab: place or acker Example Double Integrator x(k + = h x(k+ h / u(k h Linear state-feedback controller Closed-loop system becomes u(k = Lx(k = l x (k l x (k x(k + =(Φ ΓLx(k = l h / h l h / x(k l h l h Characteristic equation ( ( z l h + + l l h h z + l h + = 6
Example Cont d Characteristic equation ( ( z l h + + l l h h z + l h + = Assume desired characteristic equation z + a z + a =. Solution: Example Cont d l = h ( + a + a l = h (3 + a a Linear equations for l and l l h + l l h h = a l h + = a Linear in l, l for every a, a L depends on h 7 8 Where to Place the Poles? Example Choice of Design Parameters Recall from Lecture 7: Loci of constant ζ (solid and ω h (dashed when Double integrator, x T ( =[], ω h =.44, ζ =.77 (b ω =. (dash-dotted, (c ω = (dashed, (d ω = (solid is sampled: Imaginary axis. ω s + ζωs + ω ζ= ζ =. ζ =.4 ζ =.6 ζ =.8 (a Output (c (b (d ζ =... Real axis 9 Deadbeat Control Only in Discrete State Feedback in Controllable Form Choose P(z =z n h only remaining design parameter Drives all states to zero in at most n steps after an impulse disturbance in the states. Finite time as opposed to infinite time in continuous time. Example: Double integrator, x T ( =[] h = (a Output h = h =. We previously derived the controllable canonical form 3 3 a a... a n... x(k + = 6. 4..... 7 x(k+ 6 4 7. u(k In this case, application of the state feedback u = l x l nx n changes the coefficients a,...,a n to a + l,...,a n + l n,sothe characteristic polynomial changes to z n +(a + l z n + +(a n + l n z + a n + l n Design method: Transform to controllable canonical form, apply state feedback, transform the controller back again Ackermann s formula (see IFAC PB
Controllability The eigenvalues of Φ Γ L can be assigned to arbitrary positions if and only if the system is controllable, i.e.ifthe matrix W c = Γ ΦΓ... Φ n Γ Reconstruction What should you do if you can not measure the full state vector or if you have noisy measurements? has full rank. In practice, moving some eigenvalues could require very high gain and lead to very bad controllers. 3 4 Reconstruction Through Direct Calculations Basic idea: Reconstruct the state vector through direct calculations using the input and output sequences y(k, y(k,..., u(k, u(k l,... together with the state-space model of the plant. Explained in detail in IFAC PB pg 6 6 Make sure that you understand it (a lot of notation but not difficult! Often sensitive to disturbances. A better alternative is to use the model information explicitly. Reconstruction Using x(k + = Φx(k+ Γu(k y(k =Cx(k Introduce "feedback" from measured y(k ˆx(k + = Φ ˆx(k+ Γu(k+ K [y(k C ˆx(k] Form the estimation error x = x ˆx x(k + = Φ x(k KC x(k =[Φ KC] x(k C. Any eigenvalues possible, provided W o =. full rank CΦ n Choose K to get good convergence Trade-off against noise amplification 6 Deadbeat A deadbeat observer is obtained if the observer gain K is chosen so that the matrix Φ KC has all eigenvalues zero. The observer error goes to zero in finite time (in at most n steps, where n is the order of the system Noise sensitive (fast observer dynamics Equivalent to reconstruction using direct calculations. for the Double Integrator Φ KC = h k = k h k Characteristic equation k Desired characteristic equation: z ( k z + k + k h = z + p z + p = Gives: k = p k + k h = p 7 8
for the Double Integrator cont d An Alternative Solution: k = + p k =( + p + p /h The observer presented so far has a one sample delay: ˆx(k k depends only on measurements up to time k Alternative observer with direct term: Assume deadbeat observer (p = p = k = k = /h Resulting observer ( ˆx (k + = ˆx (k+hˆx (k+ y(k ˆx (k ˆx (k + = ˆx (k+ ( y(k ˆx (k h ˆx(k k =Φ ˆx(k k +Γu(k [ ( ] + K y(k C Φ ˆx(k k +Γu(k ( =(I KC Φ ˆx(k k +Γu(k + Ky(k Reconstruction error: x(k k =x(k ˆx(k k =(Φ KCΦ x(k k Φ KCΦ can be given arbitrary eigenvalues if Φ KC can K may be chosen so that some of the states will be observed directly through y the order of the observer can be reduced 9 Reduced order observer or Luenberger observer Output Feedback Analysis of the Closed-Loop System State feedback from observed state: ˆ x L u Process y x(k + = Φx(k+ Γu(k x(k + =(Φ KC x(k u(k = L ˆx(k = L(x(k x(k Controller: ˆx(k + = Φ ˆx(k+ Γu(k+ K (y(k C ˆx(k u(k = L ˆx(k Eliminate u(k x(k + = Φ Γ L Γ L x(k x(k + Φ KC x(k Separation Transfer function from y to u: L(zI Φ + Γ L + KC K Control poles: A c (z =det(zi Φ + Γ L poles: A o (z =det(zi Φ + KC Disturbance Estimation How to handle disturbances that can not be modeled as impulse disturbances in the process state? Assume that the process is described by dx = Ax + Bu + v dt y = Cx where v is a disturbance modeled as dw dt = A ww v = C w w Since disturbances typically have most of their energy at low frequencies, the eigenvalues of A w are typically in the origin or on the imaginary axis (sinusoidal disturbance Disturbance Estimation Augment the state vector: x w Gives the augmented system d x = A C w x + B u dt w A w w y = C x w which is sampled into x(k + = Φ Φ xw x(k + Γ u(k w(k + Φ w w(k y = C x(k w(k 3 4
Augmented and State Feedback Disturbance Estimation: Block Diagram Augmented observer: ˆx(k + = Φ Φ xw ˆx(k + Γ u(k+ K ɛ(k ŵ(k + Φ w ŵ(k K w with ɛ(k =y(k Cˆx(k x ˆ ŵ L L w u Process y Augmented state feedback control law: u(k = L ˆx(k L w ŵ(k If possible, select L w such that Φ xw Γ L w = 6 Disturbance Estimation: Closed-Loop System The closed-loop system can be written x(k + =(Φ ΓLx(k+(Φ xw Γ L w w + Γ L x(k+γl w w w(k + =Φ w w(k x(k + =(Φ KC x(k+φ xw w(k w(k + =Φ w w(k K w C x(k L ensures that x goes to zero at the desired rate after a disturbance. The gain L w reduces the effect of the disturbance v on the system by feedforward from the estimated disturbances ŵ. K and K w influence the rate at which the estimation errors go to zero. Special Case: Constant Disturbance Assume constant disturbance acting on the plant input: v = w Φ w = Φ xw = Γ If we choose L w = we will have perfect cancellation of the load disturbance New controller + estimator u(k = Lˆx(k ˆv(k ( ˆx(k + =Φ ˆx(k+Γ ˆv(k+u(k + K ɛ(k ˆv(k + = ˆv(k+K w ɛ(k ɛ(k =y(k Cˆx(k 7 8 ˆ x ε Special Case: Block Diagram L Disturbance State v ˆ u v Process The disturbance estimator is integrating the prediction error of the observer. The overall controller will have integral action y 9 Example Design Control of double integrator dx dt = x + u y = x Sample with h =.44 Discrete state feedback designed based on continuoustime specification ω =, ζ =.7 Gives L =[.73.] Extended observer assuming constant input disturbance to obtain integral action; all three poles placed in z =.7. 3
(a (b (c Output Disturbance Example Simulation.. Optimization-Based Design Pole-placement design: L and K derived through pole-placement In the course Multivariable Control (Flervariabel Reglering, Lp Vt L and K are instead derived through optimization LQ (Linear Quadratic and LQG (Linear Quadratic Gaussian control Short overview in Ch of IFAC PB Not part of this course 3 3 Examples in Matlab >> A = [ ; ]; >> B = [; ]; >> h =.44; >> % Sampled system matrices >> [Phi,Gamma] = cd(a,b,h >> % Desired poles in continuous time >> omega = ; zeta =.7; >> pc = roots([ *zeta*omega omega^] >> % Corresponding desired discrete poles >> pd = exp(pc*h >> % Design state feedback >> L = place(phi,gamma,pd >> % Design augmented observer >> Phie = [Phi Gamma; zeros(, ]; >> Ce = [C ]; >> Ke = acker(phie,ce,[.7.7.7] 33