L5:1

Lecture 5

Symmetric Root Locus LQR Design State Estimation

• Selection of 'optimal' poles for SISO pole placement design: SRL

• LQR design example

• Prediction and current estimators

L5:2

Optimal pole placement for SISO systems

• For a single-input system, we might select one particular output (y = Cx) to constrain in a cost function: = Ax + Bu y r=0 + u x ∞ J = ∫ (ρy 2 (t ) + u 2 (t ) )dt y = Cx 0 − • Plant transfer function: x K Y ( s) N (s) −1 = C(sI − A ) B = , say D( s) U (s)

• It can be shown that:

– J will be minimised by the control law u = −Kx – the eigenvalues of the closed-loop system are the left half-plane roots of the 2n-degree polynomial equation Ref: Kailath, Linear Systems, 1980

α c ( s )α c (− s ) = D ( s ) D(− s ) + ρN ( s ) N (− s ) = 0

plot the 0º locus instead • The SRL thus provides a basis for specifying CLPs in a SISO pole-placement design .L5:3 Optimal pole placement for SISO systems α c ( s )α c (− s ) = D ( s ) D(− s ) + ρN ( s ) N (− s ) = 0 • Hence we can see the effects of the output-weighting factor ρ on the closed-loop poles by plotting a root locus for N ( s ) N (− s) 1+ ρ =0 D( s ) D(− s) • This symmetric root locus (SRL) will be a 180º (0º) locus if the open-loop pole-zero excess is even (odd) • The roots of αc(s) = 0 are guaranteed stable • Hence if branches of the 180º SRL lie on the imaginary axis.

07)( z + 0.82)( z + 7.0036.m and function srl.m Example: u M Compliant structure: M = 1.00134( z + 0. m = 0. k = 0.91 ± j 0.1 b = 0.SRL for discrete systems N ( z ) N ( z −1 ) 1+ ρ =0 −1 D( z ) D( z ) k m b d L5:4 • The SRL is plotted for the equation See script flex_srl.74) = U ( z) ( z − 1) 2 ( z − 0.4 s T Open-loop TF: D( z ) 0.39) .091 States: x = [d d y y y ] Sample period: T = 0.

5 -2 -2 -1.5 2 .5 1 1.5 -1 -1.Discrete SRL for compliant structure Symmetric root locus L5:5 2 1.5 Imag Axis 0 -0.5 1 0.5 0 Real Axis 0.5 -1 -0.

4074i 0.7989 + 0.5 » dclp=clp(find(abs(clp)<1)) dclp = 0.5 -1 0 Real Axis 0.0.7989 + 0.Use rlocfind to select trial CLPs » [rho.3414 clp = 1.7989 .1342i 2 0.0.5 -1.1342i -1 -1.2387i 1.5 1 1.4074i 0.5 s i x A g a m I 0 -0.4074i 0.1342i 0.0.0.5 rho = 1.7378 + 0.5065i 0.5 1 0.3120 + 0.9934 + 0.7378 .5065i 0.4074i 0.7989 .5 -2 -2 -0.1342i .7378 + 0.3120 .0.2387i 0.clp]=rlocfind(Gol) L5:6 2 1.7378 .0.9934 .

% Closed-loop regulator system Gdu = [Gpd. C. % augment plant outputs with states Gcl = feedback(Gdux.m) L5:7 Gp = ss(A. 'StateName'.1). set(Gp.'force u'. % get d and u as outputs Gdux = augstate(Gdu). [3:6]). 'y'.'InputName'. % MCG-written function % State-feedback control gains Phi = Gpd. % feed-back 4 states to u Gcl = Gcl(1:2. Gam. % discrete ss model % Plot symmetric root locus and get desired CL poles [rho. % sample period Gpd = c2d(Gp. dclp] = srl(Gpd). x0) . {'d'.4. K. Gam = Gpd.a.b. K = acker(Phi.SRL pole-placement design (see flex_srl. 'ydot'}) T = 0. 1]. % suppress state outputs Gcl. D.outputn={'disp d'. T). % Initial condition response x0 = [1 0 0 0]'.'OutputName'. B. [1]. % d(0) = 1 initial(Gcl. dclp). 'ddot'.'disp d'). 'ctrl u'}.

5 To: disp d 0 -0.5 To: ctrl u 0 -0.5 Amplitude 1 u 0.SRL pole-placement design Initial condition response L5:8 1 d 0.5 5 10 15 20 25 0 Time (sec.) .

4.LQR design for compliant structure (see flex_lqr. K = dlqr(Phi.b. Qc. % Optimal control: trial and error Rc = 1. Qc = diag([Q11 0 Q22 0]). Gpd = c2d(Gp. Gam = Gpd.a. % Scalar input % Weight displacements but not velocities % Get trial diagonal elements for Q Q11 = input('Enter controller Q11: ').m) L5:9 % Discrete model T = 0. Gam. Rc) . Phi = Gpd. T). Q22 = input('Enter controller Q22: ').

R = 1 1 d 0.L5:10 LQR design.5 u 2 To: force u 0 -2 2 4 6 8 10 12 0 Time (sec.5 To: disp d 0 -0.) . Q11 = 100.5 1 y 0.5 Amplitude To: disp y 0 -0. Q22 = 10.

L5:11 LQR with prediction estimator u(k) m Γ C + q−1 Φ x(k) y(k) p Plant: Plant x(k + 1) = Φx(k ) + Γu(k ) y ( k ) = Cx(k ) Control law: u ( k ) = − Kx ˆ (k | k − 1) u(k) Γ q−1 Φ C y ˆ (k ) Estimator Estimator: −K x ˆ (k | k − 1) + Lp + − x ˆ ( k + 1 | k ) = Φx ˆ (k | k − 1) + Γu(k ) + L p [y (k ) − Cx ˆ (k | k − 1)] Feedback compensator .

Full-order prediction estimator L5:12 Plant: x(k + 1) = Φx(k ) + Γu(k ) y ( k ) = Cx(k ) ˆ ( k + 1 | k ) = Φx ˆ (k | k − 1) + Γu(k ) + L p [y (k ) − Cx ˆ (k | k − 1)] Estimator: x x p (k ) = x ˆ (k | k − 1) − x(k ) Estimation error: ~ x p (k + 1) = [Φ − L p C]~ x p (k ) Estimation error dynamics: ~ Characteristic polynomial: α L ( z ) = det[zI − Φ + L p C] n coefficients containing p×n unknowns α e ( z ) = ( z − β1 )( z − β 2 ) ( z − β n ) Desired characteristic polynomial: n chosen coefficients For MIMO systems. Matlab’s place function uses the extra DoF to give a robust solution .

97] to place poles at z = 0.05.1 b = 0.Example: Regulation of compliant structure with prediction estimator L5:13 k m b d u M Compliant structure: M = 1.88. % estimator z-poles . m = 0.4 (corresponding to [ζ.46 −0. k = 0. 1.9 ± j 0.29]. ωn] = [0.4 s Sensed outputs: y = [d y]T • A previous controller design ⇒ K = [−0.8 ± j 0. 0.091 d States: x = [d y y ] T y Sample period: T = 0.57 0. 0.25 0. [0. % controller s-poles deps = 5*dcls. depz = exp(T*deps).0036.23.19]) • Try placing estimator poles 5-times faster: dcls = 1/T*log(dclz).

K. H.35 ⇒ Lp =  0. (Matlab script flex_predict.59 4. • Estimator gains: Lp = place(Phi'.87 0.C'. Gpd = c2d(Gp.L5:14 Prediction estimator design • Discretised plant model: T = 0.depz)’ • • • • Regulator: H = reg(Gpd. C = Gpd. Lp) Feedback: Gcl = feedback(Gpd.20 0. Phi = Gpd.a. +1) Check response to initial condition d(0) = 1 Experiment with estimator pole selection. etc.47  .c.4.T).57  0.29  0.m)  2.07 0.

) 15 20 0 .4 0.2 1 u(k) To: force u 0 -1 5 10 Time (sec.2 y(k) Amplitude To: disp y 0 -0.Response to initial condition d = 1 u b y d k M m L5:15 1 To: disp d 0.5 d(k) 0 0.

4 0.4 0 5 Time (s) 10 -0.2 0.2 -0.esponse of states and predictive estimates to prediction x 1(0) = 1 Actual states compared with L5:16 3 x 2=ddot x 2hat 5 estimates 2 0 x 1=d x 1hat 1 0 -5 0 -1 10 1 x 3=y x 3hat 0 5 Time (s) 5 Time (s) 10 0.5 0 5 Time (s) 10 .5 x 4=ydot x 4hat 0 0 -0.

based on the current measurement.Current estimators L5:17 • Using the previous prediction estimator. it would be worthwhile: x ˆ (k | k ) = x ˆ (k | k − 1) + L c [y (k ) − Cx ˆ (k | k − 1)] • This measurement update is performed on the model prediction (a time update): x ˆ (k | k − 1) = Φx ˆ (k − 1 | k − 1) + Γu(k − 1) • We need to organise the calculations so that the measurement update can be performed rapidly . the control at instant k is based on sensor data up to the previous sampling instant: u(k ) = −Kx ˆ (k | k − 1) • We know that delays (latency) in a feedback loop are de-stabilising • Hence. if we were able to quickly update the state estimate at instant k.

L5:18 u(k) LQR with current estimator m Φ Γ C + q−1 p x(k) y(k) Plant: Plant x(k + 1) = Φx(k ) + Γu(k ) y ( k ) = Cx(k ) Control law: u ( k ) = − Kx ˆ (k | k ) u(k) x ˆ (k | k − 1) Estimator: Γ + q−1 Φ x ˆ (k | k ) y ˆ (k ) + C − Time update: x ˆ ( k + 1 | k ) = Φx ˆ ( k | k ) + Γu ( k ) −K Measurement update: x ˆ (k | k ) = x ˆ (k | k − 1) + L c [y (k ) − Cx ˆ (k | k − 1)] + Lc .

Comparison between prediction and current estimates L5:19 • For the current estimator we have x ˆ (k + 1 | k ) = Φx ˆ ( k | k ) + Γu ( k ) and x ˆ (k | k ) = x ˆ (k | k − 1) + L c [y (k ) − Cx ˆ (k | k − 1)] • Hence x ˆ ( k + 1 | k ) = Φx ˆ (k | k − 1) + Γu(k ) + ΦL c [y (k ) − Cx ˆ (k | k − 1)] • The prediction estimation error is ~ x p (k + 1) = x ˆ (k + 1 | k ) − x(k + 1) = Φx ˆ (k | k − 1) + Γu(k ) + ΦL c [Cx(k ) − Cx ˆ (k | k − 1)] − Φ x ( k ) − Γu ( k ) = [Φ − ΦL c C]~ x p (k ) .

(C*Phi)’.. • For the current estimator we have the prediction error ~ x p (k + 1) = x ˆ (k + 1 | k ) − x(k + 1) = [Φ − ΦL C]~ x (k ) c p • Similarly. depz)’ .L5:20 Comparison between prediction and current estimates . we can show that the current estimate error is ~ xc (k + 1) = x ˆ (k + 1 | k + 1) − x(k + 1) = [Φ − L CΦ ]~ x (k ) c c • The two error equations have the same eigenvalues (both are outputs from the same dynamic system) – hence can use either as a basis for calculating Lc x p (k + 1) = [Φ − L p C]~ x p (k ) • For the prediction estimator: ~ • Hence for current estimator we can use: Lc = place(Phi’..

are u(k ) = −K [I − L c C]x ˆ (k | k − 1) − KL c y (k ) x ˆ (k + 1 | k ) = [Φ − ΓK ][I − L c C]x ˆ (k | k − 1) + [Φ − ΓK ]L c y (k ) • Script flex_current compares responses of current and prediction estimators . with input y(k) and output u(k).L5:21 Implementation of current estimator in Matlab • Given x ˆ ( k + 1 | k ) = Φx ˆ ( k | k ) + Γu ( k ) and x ˆ (k | k ) = x ˆ (k | k − 1) + L c [y (k ) − Cx ˆ (k | k − 1)] we can show that the state equations for the estimator.

5 0 0.Initial Condition Results L5:22 1 To: disp d 0.) 15 20 0 .2 prediction estimator 1 To: force u 0 -1 5 10 Time (sec.2 Amplitude To: disp y 0 -0.4 current estimator 0.

Sign up to vote on this title
UsefulNot useful