You are on page 1of 19
Complement to: “Adaptive Control: Stability, Convergence, and Robustness.” S. Sastry & M. Bodson, Prentice-Hall, 1989. Homework Exercises Dec. 1991 © Marc Bodson, 1991. Problem 0.1 ‘Consider the plant P(s)=2/(s+1) and the reference model M(s)=1/(s+1). a) Plot the responses over 20 seconds of 0(¢), eo(t) and v(0)=e5(¢)+k, #°(¢) for the M.LT. rule, the Lya- punov redesign and the indirect scheme of chapter 0. Let r#)=sin(t), 6(0)=1 and all other initial condi- tions be zero. Comment on the responses in view ofthe analytical results. ) Repeat part a) with (= Problem 0.2 Give an example of a control system where parametric adaptation is required or desirable. Identify the source of variation and indicate whether itis due to a nonlinearity, a slow state variable, an external factor, ‘an initial uncertainty of an inherent change in the system under contro. Problem 0.3 ‘Consider the MRAC algorithm of chapter 0, using the Lyapunov redesign. Let r=ry be constant, Show that the system with state variables (¢9, ¢) is linear time-invariant. Calculate the poles of the system as functions of a, ky and ro. Plot the locus of the poles as 7o varies from 0 to «=, Discuss what happens when ro=0,and when kp <0. Problem 0.4 ‘The stability properties of the MIT rule were investigated by DJ.G. James in “Stability of a Model Refer- cence Control System,” AIAA Journal, vol. 9, no. 5, pp. 950-952, 1971. The algorithm is the same as the ‘one given by eqn, (0.3.6). ‘The author calculated the stable and unstable regions of the algorithm, which are shown on Figure PO. Bees Figure P0.4: Stability Regions for the MIT Rule Assuming that the plant is P(s)=1/(s+ 1), the reference model is M(s)= 1ds+1), and the reference input ‘r=sin(w t), the x-axis of the figure becomes =a and the y-axis becomes = g. Note that, for small ‘enough ©, the MIT rule is stable for all g, while for small cnough g, itis stable forall «. Otherwise, the dynamic behavior of the algorithm is quite complex, with interleaving ofthe stable and unstable regions. 8) Write the differential equations of the overall adaptive system and show that it is a nonlinear time-varying system. Given that the equation for y_ can be solved independently of the others, show that ‘the remaining cquations constitute a linear time-varying system = A() x. ') Simulate the responses of the adaptive system fora few values ofthe parameters to check the validity of the figure. In particular, check the responses for @=1 and g=10,35,50 and 80, then for g=10 and @=1,1.5 and 2.5, Let all initial conditions be zer0 and plot the error eo for 50 seconds. Could such -3- behavior be observed with a second-order linear time-invariant system ? Problem 1.1 18) Determine which functions belong 10 Ly, La, Las Lies Lau Lene f=e*" for a>0 and asd 1 Homi AO= BGs Mom zy b) Show that fe Ly. implies fe Lo, Problem 1.2 1a) Show that A © R® is positive definite if and only if ayy >0, ay >0, and a4) app >(ay2+ay)°/4. ‘b) Find examples of 2x2 symmetric (but not diagonal) matrices such that A 20, A <0 and A is neither posi- tive nor negative semidefinite. In each case, give 4;(A).. ) Find an example of two symmetric postive definite matrices A and B such that the product is nether symmetric nor postive definite. Give 4,(A B) and 2,((A B) + (A B)"). Problem 1.3 Prove the following facts. All matrices are real and square (except in a)). Use only the definitions of eigen- ‘values and eigenvectors. a) Forall Ce R™, CTC2O and CTC>0 ifrank(C)=n b)A=A™ implies a(A)e R AAT and a,(A)# 2964) implies where 21, x are the eigenvectors associated with 4,(A),Aa(A) ®) A20 implies Rea(A)20 Problem 1.4 Prove the following facts, All matrices are real and square. You may use the fact that A= AT implies that A=UT AU with A= diag 4(A) and UT U=1. a) For A=A? A20 ifandonlyif 4,(4)20 b) A20 ifandonly if 4,(As)20 ©) For A=AT20. Agi(A)IXP S 27 AxS ggg (A)LXP 6) For A=A™>OAyas(A)= (Ania ©) For A=A720 WAN Agua(4) 1) det(S)#0 implies 2(A)= a(S AS) 8) A=A™>0, B=B720 implics a(AB)ER and 4,(AB)20 Problem 1.5 ‘Consider the plant F(s)=1/(s+ ay) and the reference model Ai(s)=1/(s+ a_). Let the controller be given by undy,tr where ris the reference input (bounded), « and y, are the input and output of the plant, and d is an adap- tive gain with update law 4. 4) Is the overall system described by a linear or nonlinear differential equation ? Ts it time-invariant or time-varying ? b) For constant g>0, indicate whether the system is stable, uniformly stable, asymptotically stable, or uni- formly asymptotically stable. Does ey —>0 as t >? ©) Let g(@) be a continuously differentiable function of time. What stahility properties does the system have if g(0)>0 forall? Problem 1.6 Let = f (1,2), (69)=xo, with f(t, x) globally Lipschitz in x (with constant 1) and /(¢,0) bounded (with bound 6). Show that kth sixDisky the FFind expressions for ky ka, ks and ke as functions of ob and 1. Problem 1.7 Consider the linear time-invariant system d=Ax #lo)= x0 ‘Assume that there exist matrices P= P™ >0 and Q=Q" >0 such that AT P+PA+Q=0 Find m20 and a>0 as functions of the matrices P and Q such that Ix@Isme*) Lol Problem 1.8 Consider the linear time-varying system (from Vidyasagar’s Nonlinear Systems Analysis, Prentice-Hall, 1978) =AQx where ac =( ~1+ac0s"+ eer | ~1-asinecos! —1+asin’s Show tha the transition matrix @¢,r satisfies eM co6¢ et sine ) ae ( OF sine eFeose ‘and that the matrix A() has eigenvalues that are independent of t and located in the left-half plane for 1 0, Show that, for zero initial conditions yl, s Wath Wat, where It is the L, norm of the impulse response Ait) corresponding to H(3),and yl, Hull, are the La norms of 3(t) and u(() respectively. Give the value of Wl, asa function of a and 6 and show that there exists a nonzero u(t) such thatthe inequality above becomes an equality. Problem 2.1 8) Consider the identifier of section 2.2. Show that the plant transfer function may be realized by two state space representations (R1) and (R2): (Ri) k= A,r+byr Ap=A+b, 6 byab, = cpm” ‘and A,b,,a", b"are as defined in equations (2.2.9) and (2.2.10). (R2) yp where A o alate asta" ) ba a (3) oe) ‘b) Show that (R1) is controllable, Show that (R1) is observable if #,, d, are coprime. +) Show that (R2) is nonminimal and, from the eigenvalues of A,, deduce that the extra modes are those of A Wher ) Using the Popov-Belevitch-Hautus test, show that (R2) is controllable if #,, d, are coprime. In the same manner, show that any unobservable mode must (indeed) be a mode of A, so that (R2) is detectable. Hint: Tre Popov-Delevich-Havtus test indicates that a state-space realization i controllable if nd only if rank (s!—A B)=dim (A) for all s and observable if and ony if Cc rank (4 )=aimey —foras [Note that itis only necesary to check the rank fr values of s for which det! A)=0. Problem 2.2 a) Let w(1)=sin (¢), Find and plot ao=f wx) de 2 'b) Show that there exist a), a2 and 6>0 such that a> | Woda, for all 1920. ©) Show thatthe following limit exists, independently of fg ae 1 R= fm af ode where R,,>0. 6) Repeat partc) with moe( amee |} eee -w*(r) by w(t} w" (1). What conditions must a, ¢ satisfy so that the matrix R,, is positive def- Problem 2.3 1) Consider the function w{#) such that w= te [n,n+(1/2)"*1] for all positive integers n wi)=0 otherwise. lot w(@) and show that there exists 6 > 0 such that gs f wa)dr>0 forall 920. Show that, however, the solutions of ds-276 — HO=H0 40 not converge to zero exponentially. 1s w persistently exciting ? Why ? b) Consider the following proof of exponential convergence for #=~g ww? ¢, with w PE: Let v= 9" @, s0 that ¥=—2.g (97 w)*$O. Therefore, for all 920, 5>0, and + [to,to+ 8] #7 (to) ta) 29 C=) HEP Co + 4) Hto+ 5) a and we Wa)—Wiot)=2e f Eww ede @ * wees 22 e648) f mew (ede Mto+d) o where the last inequality follows from (1). If w is PE, this implies that Hla) Wto+4)22.g0% t+ 5) @ ‘and exponential convergence follows asin the proof of theorem 1.5.2. Why is this proof incorrect ? Problem 2.4 ‘This problem investigates the parameter convergence properties of the least-squares algorithm with forget- ting factor =-PO MOET WO=¥0)_ 00)= 000) PO=APO=POMODWTOPM — PO)=PTO)=Pp>0, 2>0 “9. a) Let 4=0. Use eqn (2.0.30) to show that 19(:)—0" 10 as te» if J mow @marzar a and a(1)—>2° as tee, Show that if a(t) 2k for some k >0, then 16(%) Whatif aze!? b) For 20, find expressions similar to (2.0.29) and (2.0.30). Hint: First derive d(P™) de and d(P"* @)/ dt. ©) What optimization criterion does the least-squares algorithm with forgetting factor solve ? 4) Show that 16(2)~ 6" converges to zero exponentially with rate 2 if P() is bounded. ©) Show that P(0) is bounded if w is PE. "| converges to zero as 1/1. Problem 2.5 ‘This problem constructs discrete-time algorithms for the identification of sampled-data systems. ‘The derivations follow lines parallel to the continuous-time case. However, see G.C. Goodwin & K.S. Sin (2984) for more details. 3) Consider the first order system Vp=— Ap Vp thy ‘The continuous-time system is interfaced to a digital compater through discrete-time signals r p(k] and ol] such that r@=rolkl forte (ET. 1)TI yolk] = yk T) By solving the differential equation, show that yp and rp satisfy exacily a first-order difference equation Yolk]=4p yolk 1] + kp rplk—1] and find expressions for ap, kp, as functions of kp, ap, and T (this is the so-called step-response dis- crete-time equivalent of the continuous-time system). What is the discrete-time transfer function PO2)=Ip@)/Fo(2)? 'b) Extend the results of part a) to a general n-th order system SeAxtbr ypaCx ©) Adapt the results of section 2.2 t0 the discrete-time by describing an identifier structure for an nth ‘order plant with transfer function P(z). In particular, show that yolkl=07 wik] where 6° is a vector of unknown parameters and w is an observer state vector, Give conditions that the polynomial £(2) must satisfy and indicate the simplifications that arise when £(2)=2, f ‘observer poles are at the origin, What isthe effect of initial conditions in that case?” d) The so-called projection algorithm is the estimate 6[k} such that lefk]—e[k—1yP is minimized, subject to yolkl=6" [kl wk} ‘Using Lagrange multipliers, show that the solution of this optimization cnterion is = 10+ 87 [k- 1 wf - yolk] UE] = otk 1-0] ‘Show that 6{E] is also the projection of o{k~ 1] on the set of o[k] 's such that 67 [4] w(K] yp[E]=0. €) Find the (batch) least-squares estimate, which minimizes sore BOT eI w/I- yo? ‘Then, show thatthe recursive formula for the least-squares estimate is Ptk—1] wl] we) Ple— 1) PU PRN —sFel POE Twi PUe— 1) wk] (67k — 11 wEkd — yolk) T+ wT TAD PUR= Tw T Hint; To find the difference equation for the covariance matrix, the following identity is useful (AtBCY'=At-AT BUCA BY'CAT tk] =o[— 1)- 1. Simulate the responses of the identifier with the projection algorithm. Replace the denominator wT [k] w(E] by 1+" [K] wIE] to avoid possible division by zer0 or by a very small number. Let k,=1, 4y=1, T=0. 15, and all initial conditions be zero, Plot rp[e1, yo[eI, 6:(E], and 8,(k] for rp[k]= sin (kT) and for 7 p{k]=1. Compare the convergence properties. £8) Repeat part f) for the least-squares algorithm. Let P[0}= and plot P(t), Pzalk] and P,zf4), in addi- ton to the other variables. Problem 2.6 2) Find conditions on a, a9, f;, fp such thatthe transfer function s asta M(s)= Fest h, is SPR. ») Find conditions on Ry, Ra, C1, C2 (all > 0) such that the impedance Z(s)=¥ (3) /{(s) (see figure P2.6) is Problem 2.7 Let #1(3) be a rational, strictly proper transfer function, ‘a) Let s(t) be the step response associated with #(s). Show that if 4(s) is SPR, then. ‘ds (le = ‘Hint: Use the Kalman: Yacubovitch-Popov Jemma. 'b) Show that 4(s) is SPR if and only if there exists a minimal state-space representation =Axtbu such that c=6 and A+ AT=~Q for some Q= 97 >0. ue ‘om R, CG re) Ry -0 Figure P2.6: Circuit Hint; Use again the Kalman-Yacubovitch-Popov lemma. Problem 2.8 a) Prove one direction of the Kalman-Yacubovitch-Popov lemma, that is, show that If there exist matrices P= P™ >0, =" >0 such that ATP+PA=-Q and = Ph=e with [4,6] controllable Then M(s)=c" (I~ AY" b is stable Re W(ja)>0 foralla and im o* Re Mjo)>0 Hint: Show frst that P(ja@l-Ay'+(jol-A7y" P. ) Consider the system o1-AY'Q(jol-ayt k= Ax-b6™ w(a)+bu where x, be R*, 0°.we R™, Ae R™, and we R. A and b are known exactly, w(x) is a known, globally Lipschitz function of x and the vector x(¢) itself is available, The vector 8” is completely unknown. Assume that A is asymptotically stable and [4,0] is contollable. Use the Kalman-Yacubovitch-Popov Jemma to find an adaptive control law such that x—x,,-90 as 1° where Argtbr 12. where r € L... Prove the result, including the boundedness of all the signals. Problem 2.9 ‘This problem examines the extension of the single-input single-output identification results to multivari- able systems where all the states are available for measurement. 2) Consider the state-space representation xed reo where xe R*, we R", A” R™ and Be R®™*, Assume that x, & and w are available. A” and B* are completely unknown, Show that a multivariable, linear error equation can be obtained, and that a gradient identification algorithm can be derived. What stability properties can you establish? ) Propose an algorithm for the caso when is not available and one does not wish to differentiate x explicitly for noise considerations. Problem 2.10 ‘This problem investigates the stability properties of the projection algorithm, which is the discrete-time equivalent ofthe gradient algorithm. 8) Consider the modified projection algorithm 67 [k- 1] wikl- yolk) 91k) = 0th 1) rete wlll Define the a prior error Tk) = 6" tk— 1] whe) yolk and the a posteriori error e*[k) = 07 (e] wk] yolk] Show that ete) =e 1k)/(14 wk] wIk]) so that ete tk ey MA 0k 1)— "Tk wk In other words, the modified projection algorithm isa gradient algorithm for thea posteriori error e*{k} b) Let and tk iho" Using the results of part), show that VelkDP=19tk— 1 — (ett)? (2+ wt) wld) wletk-e — ceteyy: tet) =letk-1P — (etary Tore ©) A sequence {2} is said w be in 1, if “Be E ixteyr and, ifs, is the limit necessarily 6” ? Problem 2.11 ‘Show how the identification method described in section 2.2 can be extended vo proper transfer functions of the form ID py a Fe 7 PO = ‘Specialize the results to a first-order system (n= 1) to check the method. Problem 2.12 Consider the linear error equation ¢,=9 w where e,,¢, w are all scalars. Further, let w(t) =W be constant a) Consider the gradient algorithm o=-eme with g>0 and 4(0)= arbitrary, Find the solution of the differential equation. Indicate to what value # converges and describe the type of convergence (exponential, asymptotic,...). Discuss the case when with ¢>0, 6(0)=¢o. and p(0)= po>0. Find the solutions of the differential equations. Indicate to what values ¢ and p converge and describe the type of convergence, Discuss the case when wo=0. Hint: note that a or" c) Consider the least-squares algorithm with forgetting factor o=-g wer oie a(-4p+ wa) with g>0, 4>0, #(0)=¢, and p(0)= po>0. Give the solutions of the differential equations. Indicate to ‘what values ¢ and p converge and describe the type of convergence. Discuss the case when Wo Hine: start again from 4 @p). 4) Consider the stabilized least-squares algorithm with forgetting factor o=-anwie = a(-Aptp wire p) with g>0, 2>0, a>0, 60)=¢o, and p(0)= po>0. The stabilized algorithm was proposed in the dis- crete-time framework by G. Kreisselmeie, in “Stabilized Least-Squares Type Adaptive Identifiers,” [EEE Trans. on Automatic Control, vol. 35, 10. 3, pp. 306-310, 1990. The stabilizing term arp? is an interesting alternative to covariance resetting. Give the solution of the differential equation for p. Indicate to what values @ and p converge and describe. the type of convergence. Discuss the case when wo =0. Hin; show that p is bounded away from 0 to establish the. convergence properties of #. Problem 2.13 A periodic signal (1) is measured. Its period 1 is known and one wishes to design a recursive scheme to estimate the coefficients of its Fourier series. Its assumed that a finite number of terms is sufficient to rep- resent (@) exactly, the number being known, 48) Show that the problem can be put in the form of a linear error equation of the type described in chapter 2, Give a recursive algorithm to estimate the coefficients of the Fourier series. b) Determine whether the estimates are guaranteed 10 converge to the values of the coefficients of the Fourier series, and justify your answer, Problem 2.14 18) Consider the assertion made in the book on p. 61 that the filters (sf~ A)" b, can be replaced by (at least) two other vector transfer functions, For the first transfer function, indicate how the vector 6” is ‘elated to the polynomials &, A,(s) and d,(s). Give explicit formulas relating the as and p's to the com- ponents of 6° for the transfer function (O° Trash bb) Repeat part a) for the other transfer function. Hint: it may be useful to remember partial fraction expansions. Problem 2.15 ‘This problem investigates the properties of the projection modification, introduced to keep the adaptive parameters within a specified region in which the nominal parameters are known to lie. It is shown that a different projection modification is necessary for the least-squares algorithm in order to preserve the prop- entes of the Lyapunov function. ‘Assume that 6" $, where S is a closed set with a smooth, differentiable boundary given by ‘4 (@,,8,-..,8,)=0. Assume that @€S if and only if f(0,,...,0,)S0 and that outside S, $(0,,..-+8,)>0. See figure P2.15 for n=2. Let x(@) be a vector perpendicular to the plane tangent to the boundary of S at 6, pointing outwards, 8) Show how x(6) can be obtained from /(0,,...,0,). What condition must $ satisfy so that #7 x > 0 for @ on the boundary ? iar F218 Psion moda, 8 b) Show that the modification on2- iff(@)=0 and G"x)>0 =e otherwise consists in projecting the update vector z on the tangent plane when the boundary of the set $ is reached and the vector is pointing ourwards. ©) Show that, for the gradient algorithm (z= g ¢; w), the projection modification guarantces that a(0)€ for all ¢, assuming that 4(0)€ S. Prove also that, for v=o" ¢ -0 22207 wP ) Repeat part c) for the least-squares algorithm, leuing 2=—g Pe, w, P=—g P ww" P, and the Lya- Punov function v= ¢ P~' 9, However, note here that the properties of the Lyapunov function are not pre- served by the projection modification. ©) Show that to preserve both properties for the least-squares algorithm, the following projection can be used GT x).PD) Os2-"Srpr if f(6)=0 and (27 x)>0 Optional: Show that this modification consists in projecting in the transformed space P~\@ instead of the @ space. 1) Consider the case when 0 € R? and the set 5 is the set of 6°s such that 6 $6}, with 6 arbitrary. Write explicitly what the update laws for 6; and 8 are, as functions of 21. 22, Pi1, P12, Pax, and 6} (compare the ‘gradient and the least-squares algorithms). Problem 3.1 ‘This problem considers the sampled-data control of a first-order system. The scheme is an indirect, model reference adaptive control algorithm, 18) Consider the first order system Yp=— Ap Ypthyu -16- ‘The continuous time system is controlled by a digital computer through discrete time signals up(] and otk} such that Mi)=up[E] fore (RT.(+1)T) Let the control law be given by up Gel = ef] 7 nfkl + ae] yolk] ‘Show that there exist nominal values of the controller parameters c* and d° such that the discrete time transfer function from rp to yp matches the reference mode! transfer function y= WO oan where ky, du are arbitrary, but lag <1. ')_ Simulate the responses of an indirect adaptive control algorithm, combining a discrete time identifier using the modified projection algorithm (¢f. problem 2.10) and a control aw derived from part a). Let kp=1y Gp=1, T=0.15 and M(z) be the discrete time equivalent of 3/(s+3). Let rolk]=sin [kT]. Include a standard modification to the identification algorithm so that the estimate of the gain is bounded ‘away from 0 (assume thatthe sign and a lower bound of the gain is known). Problem 32 8) Consider the vector #, in section 3.2, Show that 7 is the state of P in a nonminimal state-space repre- sentation (give the A, b, and c matrices). Hind: First show that there exist unique fg € Rand f*,g" € R™ such that p= four sw + so yp ts” Ww? by proving that there exist unique polynomials 7”, g* of degree at most n— 1 such that sB= £ f 6 Indicate how f* and g can be obtained from P and 4, ') Consider the polynomial g in section 3,2, Under the assumptions, is this polynomial guaranteed to be ‘Hurwitz ? What can you conclude about the stability ofthe controller itself (as represented in Figure 3.2). Problem 33 8) Consider the output error MRAC scheme of chapter 3, Let the reference model be given by _st3. PIED Simulate the response ofthe adaptive scheme for r(t)=2 sin (0) and s+] bea “17s Let g=1 and all initial conditions be zero. Plot ¢o and the adaptive parameters for 1000 seconds. Calculate the nominal values of the adaptive parameters and comment on the responses. 'b) Repeat part a) with the plant +3 “CP and the same adaptive controller. Again, comment on the responses. ‘Note: This problem illustrates the fact that two totally different unstable systems can be stabilized by @ sin- gle adaptive controller, However, as the simulations show, some surprising responses can be observed within the confines of the Lyapunov stability results. Poor convergence results are often observed with gra- dient algorithms, and the intrested student is invited to investigate other algorithms based on the least-squares estimates. Problem 4.1 In this problem, tne averaging results willbe proved in the (simpler) linear periodic case, re, x)=eA x] x= where A(})e R™*s a piecewise continuous, bounded, and periodic function of with period 7. a) Let r w= Jaa Woy= | (AG@)-Aaddr a Show that W(0) is periodic and bounded. 'b) Show that, for e sufficiently small, the transformation from x to z defined by xO=2)+eWO20 is one-to-one and is differentiable with bounded derivatives. Further Ix@)~20)1<2eTHAG ILO! ©) Show that z satisfies a differential equation tee Ayrher(reW) (AW -W AQ) 4) Show tacit faye For is exponentially stable, then =e A x(0) is exponentially stable fore sufficiently small. Hint; Use the Lyapunov lemma. 18- Problem 42 ‘Calculate the averaged system and simulate the responses of the original and averaged system for a) k=—gsin%()x g=Land g=0.25 b) k=—g(cos(t)+sin@@nyPx g=0.5 Phot In ( x*) and In (x2,). Problem 43 a) Consider the least-squares algorithm o b ePwwe 9O=6 gPwwiP — PO)=P()"=Fo>0 Where a gain g>0 has been included. Assume that w is stationary. Find an expression for the averaged system, Solve for Pay and Gey and discuss the convergence properties of =» when w is PE. In particular show the asymptotic stability of the parameter vector and characterize the type of convergence. ') Repeat part a) with the least-squares with forgetting factor Pan g(-aP+Pww'P) — a>0 Problem 5.1 8) Consider the system A= AO 2104 BO UO), Prove a special case of theorem 5.3.1, by showing that If; —_A(®), B(0) ate piecewise continuous and bounded, and x)= AD x0) is exponentially stable Then: (¥) Wall, <7, lll, for x90 and for lll, 0. Problem 5.2 ‘The following problem illustrates the tradeoff between speed of convergence and robustness. 4) Let the plant Ip ip Yet kyr where kp is unknown and a,>0 is known, One wishes (o identify k,. Exploiting the fact that a, is ‘known, the following identifier is created w: a,w+r -19- b=-gPw(Ow-y,) g>0 PagaP-Piw) 450 Explain how this identifier is related to the algorithms presented in the book and what the nominal value of the parameter @ is. Simulate the responses for ay= 1, ky=1, 4 1, P(0)=1, and the other inital conditions Deal zero, Letr=sin (#) and experiment with the values g=0.2,1,5,25. ») Replace the equation for w by W=-Gawtr Simulate again the responses, with dg;=

You might also like