Lecture 10-Averaging Properties of Adaptive Systems Lecture 11- robust ness and 1.nt roduct ion Convergence Rate 2. Nonlinear DynamIcs 1. The idea 3. Adapt at io n of Feedfo rward Gain 2. Averag ing theorems 4. St ability of dstr 5. Averag ing pplicat ions to adapt ive cont rol 6. Applicat io ns of Averaging Perfo rmance 7. Robust ness e Co nvergence rates 8. Conclusio ns Sensitivity to ass umptions ypical Result d f(e, y, t) dy e aea eg(a, y, t) Separate Fast and Slow Motions Ass ume y is const ant and solve the fast · The Origin of the ldea de Class ical mechanics =f(x,y,) Numerical analys is Let the solutio n be S(t). the averag ed equa Nonlinear Oscillations n Krylov and Bo boliubov 1937 Mino sky 1962 d eavgg(5(t),y, t)=EG(g) . Two Time scales Consider solutions such that Slow parameters 3(0)=y(0) Fast st at es What did we really ass ume. Think. vy(t)-y(t川<KE for0<t<T/E If the averaged equation is stable then y is also sta ble and the inequality holds for0<t<∞ C K.J. Astrom and BWittenmark
Properties of Adaptive Systems 1. Introduction 2. Nonlinear Dynamics 3. Adaptation of Feedforward Gain 4. Stability of DSTR 5. Averaging 6. Applications of Averaging 7. Robustness 8. Conclusions Lecture 10 - Averaging Lecture 11 - Robustness and Convergence Rate 1. The idea 2. Averaging theorems 3. How to do it? 4. Applications to adaptive control Performance Convergence rates Sensitivity to assumptions 5. A new look at MRAS The Idea Separate Fast and Slow Motions The Origin of the Idea { Classical Mechanics { Numerical Analysis { Nonlinear Oscillations { Krylov and Boboliubov 1937 { Minorsky 1962 Two Time Scales { Slow parameters { Fast states { What did we really assume. Think! Typical Result dx dt = f (x; y; t) dy dt = g(x; y; t) Assume y is constant and solve the fast equation dx dt = f (x; y; t) Let the solution be (t). The averaged equation is then dy dt = avgg((t); y; t ) = G(y) Consider solutions such that y(0) = y(0) = y0 Then jy(t) y(t)j < K for 0 t < T =. If the averaged equation is stable then y is also stable and the inequality holds for 0 t < 1 c K. J. Åström and B. Wittenmark 1
M any ways to Compute Averages avg f(a,(6,t),t) (6:6+分}=黑吗/(( Re {(6(+)}=E((4 Consider para met ers co nst ant when analysing system Sinusoidal sig nals Average fast motion w hen analysing the v(s=G(sU(s estimat s=Gu(sU(s Many ways to take averages If u= sin wt we have Go(iw )l Ga(iw)lcos(arg Gw(iw)-arg Ga(in)) Structure of ada A Typical self-tuning reg ulator Continuo us time mras d=40+B(o)y Process parameters C()E+D(0)y Estimation dt 7(6,.)(,5) Controller parameters Reference Alternat ive at i Process dt Nonlinear syster Discrete time st What can we say apart fro m stability? £(+ob=A()(t)+B(0)v(t) Fast feed back loop p() C()(t)+D(0)(t) Slower parameter adjustment loo p A(t+op=0(t)+P(t+opp(te(t) Use difference in time scales in a nalysis P(t+op= P(t-P(t(ts(t)P() +p(tP(tp(t) CK.J. Astrom and BWittenmark
Recipe Consider parameters constant when analysing system Average fast motion when analysing the estimate Many ways to take averages Many Ways to Compute Averages avg n f ; ^ ( ; ^ t); to = 1 T Z T 0 f ; ^ (; t ^ ); t dt avg n f ^ ; (^ ; t); to = lim T!1 Z T 0 f ^ ; (^ ; t); t dt avg n f ^ ; (^ ; t); to = E f ^ ; (^ ; t); t Sinusoidal signals V (s) = Gv(s)U (s) W(s) = Gw(s)U (s) If u = sin !t we have avg(vw) = u2 0 2 jGv(i!)j jGw(i!)j cos(arg Gv(i!) arg Gw(i!)) = u2 0 2 Re (Gv (i!)Gw(i!)) A Typical Self-tuning Regulator Process parameters Controller design Estimation Controller Process Controller parameters Reference Input Output Specification Self-tuning regulator Nonlinear system What can we say apart from stability? Notice two loops { Fast feedback loop { Slower parameter adjustment loop Use dierence in time scales in analysis Structure of Adaptive Systems Continuous time MRAS d dt = A(#) + B(#) = e ' = C(#) + D(#) d^ dt = '(#; )e(#; ) + '(#; )T '(#; ) Alternative representation d^ dt = (G' ) (Ge ) + (G' )T G' Discrete time STR (t + 1) = A(#)(t) + B(#)(t) (t) = e(t) '(t) = C(#)(t) + D(#)(t) ^ (t + 1) = ^ (t) + P (t + 1)'(t)e(t) P (t + 1) = P (t) P (t)'(t)'T (t)P (t) + 'T (t)P (t)'(t) c K. J. Åström and B. Wittenmark 2
MRAS with MIT and Lyapunov rule hat do we know? The robustness issue · What happens when G≠G0? . What is Ro bust ness? How sens it ive is the result to the 叫G(s) assumpt io ns? hat are the critical assum pt io ns? What about the assum pt io ns in the Model stability proof Ot her fields Adapt at io n of Feedfo rward gain Lyapunov versus MIT once more · A first order system yme (MIT) dt (SPR) Analysis (SPR) Analysis e=3-gn=M6(p)(0(()-4Cm(n()+6g(a)=4gcn dt +r(ho gm e)kG(Buc)=yko Gmue +y0kavgluc Guc)]=rboavg(gmu)] The equilibrium para meters are dtt mucho G(Bue)=rko Gme avg(G Averaged equations BMITF avgi(Gmue)(Guc)H G+y0kkoavgi(Gmue)(Guc))=yk3avg(Gmus)2) ko avgluc(much d+70 kavgfuel(Gue))=rk avgfuc(Gm ue)y navg(gmc)(Gu]>0 (MIT) The equilibrium para ravguc(Gu)>0(SPR G ggmu(G espr- ko avgfuc(gm ue)) CK.J. Astrom and BWittenmark
The Robustness Issue What is Robustness? { How sensitive is the result to the assumptions? { What are the critical assumptions? { What about the assumptions in the stability proof { Other elds Adaptation of Feedforward Gain { Lyapunov versus MIT once more A rst order system MRAS with MIT and Lyapunov Rule What do we know? What happens when G 6= G0? θ Σ – Model Process + Σ – Model Process + y y e e θ uc uc kG(s) kG(s) k0G(s) k0G(s) y m y m − γ s − γ s Π Π Π Π (a) (b) d^ dt = yme (MIT) d^ dt = uce (SPR) Analysis d^ dt = yme (MIT) d^ dt = uce (SPR) e = y ym = kG(p) ^ (t)uc(t)k0Gm(p)uc(t) Hence d^ dt + (k0Gmuc)kG(^ uc) = k0Gmuc d^ dt + uckk0G(^ uc) = k0Gmuc Averaged equations d dt + kk0avgf(Gmuc)(Guc)g = k2 0 avgf(Gmuc)2g d dt + kavgfuc(Guc)g = k0avgfuc(Gmuc)g The equilibrium parameters are MIT = k0 k avgf(Gmuc)2g avgf(Gmuc)(Guc)g SPR = k0 k avgfuc(Gmuc)g avgfuc(Guc)g Analysis d dt + kk0avgf(Gmuc)(Guc)g = k2 0 avgf(Gmuc)2g d dt + kavgfuc(Guc)g = k0avgfuc(Gmuc)g The equilibrium parameters are MIT = k0 k avgf(Gmuc)2g avgf(Gmuc)(Guc)g SPR = k0 k avgfuc(Gmuc)g avgfuc(Guc)g avgf(Gmuc)(Guc)g > 0 (MIT) avgfuc(Guc)g > 0 (SPR) c K. J. Åström and B. Wittenmark 3
An Example G(s +a)(s+ Stability co ndit io ns ko b2 Analysis of MRAs for First Order MIT- b2 System AspR k b(ab-w2) Equilibrium conditions Local st ability (a) ce rate ● Ro bust ness The system Design Mod Desired Respo nse Gm(s)=bm Anal - yuce Cont roller u(t)=6 dt rye Lyapunov design 叫G(s) y= G(pju Gm(puc u=61ue-62y C K.J. Astrom and BWittenmark
An Example Gm(s) = a s + a G(s) = ab (s + a)(s + b) Stability conditions MIT = k0 k b 2 + !2 b2 SPR = k0 k a(b 2 + !2 ) b(ab !2 ) ! < p ab 0 100 300 500 0.0 0.5 1.0 0 100 300 500 0.0 0.5 1.0 0 100 300 500 0 5 10 0 100 300 500 0 5 10 Time Time Time Time (a) (b) (c) (d) ^ ^ ^ ^ Analysis of MRAS for First Order System Equilibrium conditions Local stability Convergence rate Robustness The System Design Model G(s) = b s + a Desired Response Gm(s) = bm s + am Controller u(t) = 1uc 2y Lyapunov design − Σ Π + e u y Σ Π Π Π − + uc Gm (s) G(s) θ 1 θ 2 γ s − γ s Analysis d^ 1 dt = uce d^ 2 dt = ye e = y ym y = G(p)u ym = Gm(p)uc u = ^ 1uc ^ 2y c K. J. Åström and B. Wittenmark 4
Equilibrium values trans fer function A vera ag ing A nalysis c 61G 62G Control error e(t)=y(t-ynht)=(Gdp)-Gmp))udt) dt Yuo Re f(o, 8, 2)) d62 F(a,61,62) nhiw)G(iw)+gri B.-Imt1/G(iw)l FO Gmi) IGm(iw/G(iw) Disc uss hig h and lo Lo cal stabi accuracy of averaging Linearize the a verged equations Consider t he b= 2, am= bm= 3 G(s A 2 GmI -Gm2cos gm w here arctan(w/am GM(s A4+a(1 Dis c uss convergence rate as a function of CK.J. Astrom and BWittenmark
Equilibrium Values Closed loop transfer function Gc = ^ 1G 1 + ^ 2G Control error e(t) = y(t) ym(t)=(Gc(p) Gm(p)) uc(t) Sinusoidal signals ^ 0 1G(i!) = ^ 0 2Gm(i!)G(i!) + Gm(i!) Hence ^ 0 1 = Imf1=G(i!)g Imf1=Gm(i!)g ^ 0 2 = ImfGm(i!)=G(i!)g ImGm(i!) Discuss high and low !, signs etc. Averaging Analysis Ge = ^ 1G 1 + ^ 2G Gm GT ' = 1 ^ 1G 1 + ^ 2G d 1 dt = u2 0 2 Re F (!; 1; 2) d 2 dt = u2 0 2 Re F (!; 1; 2) 1G(i!) 1 + 2G(i!) F (!; 1; 2) = 1G(i!) (1 + 2G(i!) Gm(i!) Accuracy of Averaging Consider the case a = 1, b = 2, am = bm = 3, = 1, uc = sin !t G(s) = 2 s + 1 GM (s) = 2 s + 2 0 20 40 60 80 100 0 1 Time Local Stability Linearize the averaged equations A = u2 0jGmj 2 0 1 cos m jGmj cos 2m jGmj jGmj2 cos m where m = arctan(!=am) 2 + (1 + cos2 m) + 2 sin2 m = 0 where = u2 0amb 2 (a2m + !2) Discuss convergence rate as a function of frequency. c K. J. Åström and B. Wittenmark 5
Step Commands and sinusoidal Unmodeled dynamics Measurement errors Review basic ass umptions. Robust ness 458 (s) s+1)(s2+30s+229) A1(no noise) Sinusoidal command sig nals 82(no noise) g Hint Num ber of para met ers and excit at ion Anal Closed loo p characteristic equation for fixed Sinusoidal commands Command sig nal sinusoid al wit h frequen (s+1)(s2+30s+229)+4586 (a)=1;(b)u=3;(c)w=6;(d)w=2o +31s2+259s+229+45862 bef-0.5<62<1703 62(d) 62G(0) de2 72 81G 1G(0) dt=1+b2G(0)1+62G(0 d
Unmodeled Dynamics Review basic assumptions. Robustness. G(s) = 458 (s + 1)(s2 + 30s + 229) What happens? { Step commands { Sinusoidal command signals Analysis Intuitive insight Step Commands and Sinusoidal Measurement Errors 0 10 20 30 40 −0.2 0.0 0.2 0.4 0.6 Time ^ 1 ^ 1 (no noise) ^ 2 ^ 2 (no noise) Hint: Number of parameters and excitation. Sinusoidal Commands Command signal sinusoidal with frequencies (a) ! = 1; (b) ! = 3; (c) ! = 6; (d) ! = 20. 0 50 100 150 200 0 1 0 50 100 150 200 0 2 4 0 50 100 150 200 0 1 2 0 50 100 150 200 0 5 10 15 Time Time Time Time (a) ^ 1 ^ 2 (b) ^ 2 ^ 1 (c) ^ 2 ^ 1 (d) ^ 1 ^ 2 Analysis - Step Commands Closed loop characteristic equation for xed parameters (s + 1)(s 2 + 30s + 229) + 4582 = 0 or s 3 + 31s 2 + 259s + 229 + 4582 = 0 Stable if 0:5 < ^ 2 < 17:03 = stab 2 d 1 dt = u2 0 2 1G(0) 1 + 2G(0) Gm(0) d 2 dt = u2 0 2 1G(0) 1 + 2G(0) 1G(0) 1 + 2G(0) Gm(0) Equilibrium values 2 = 1 Gm(0) 1 G(0) c K. J. Åström and B. Wittenmark 6
Local and global behavi Linearize around the equilibrium set dr 11o Analysis of Global Behavior ability boundary 61G(0) 61G(0) 1+62G(0)1+62G(0) G(0)61 +62G(0) This differential equat ion has the solut ion Global behavior 2 Measurement noise mmary 62 Exact Mode l D Step Equilibrium is Stability lo st half line C Step drift alo EQ noise equilib rium set until unst able Equilibrium function equilib rium input dependent Noise makes the syst em drift along the 1 Unstable for equilib rium line C K.J. Astrom and B. Wittenmark
Local and Global Behavior Linearize around the equilibrium set dx dt = u2 0 20 1 1 1 1 1 x Stability boundary θ2 θ1 Global behavior −20 −10 0 10 20 0 10 20 −20 −10 0 10 20 0 10 20 (a) ^ 2 ^ 1 (b) ^ 2 ^ 1 Analysis of Global Behavior d 1 dt = u2 0 2 1G(0) 1 + 2G(0) Gm(0) d 2 dt = u2 0 2 1G(0) 1 + 2G(0) 1G(0) 1 + 2G(0) Gm(0) d 2 d 1 = G(0) 1 1 + 2G(0) This dierential equation has the solution 2 2 + 2 G(0) 2 + 2 1 = const Measurement Noise 0 0.2 0.4 0.6 0.8 1 −0.2 0.0 0.2 0.4 ^ 2 ^ 1 (a) (b) Noise makes the system drift along the equilibrium line! Summary Input Exact Model Unmodeled Dynamics Step Equilibrium is Stability lost half line for some IC Step & Drift along Drift along EQ noise equilibrium set until unstable Sine Correct Equilibrium function equilibrium input dependent Unstable for high frequencies c K. J. Åström and B. Wittenmark 7
Robust Ada ptive control Stochastic self-tuner w hat do the diffic ulties de pend on? How can the diffic ulties be avoided? A'(g)y(t)=B'(q-)u(t-d)+C'(q-)e(t) Excitation Model Dead y(t=R"(q u(t-d)+s(a y(t-d ● Leakage east squares parameter estimation dt 仟F )=6(t-1)+(+)(+)-p(t-d)e(t) e(t) +f;le(6° R()=(t-1)+7(t)(y(t-d)y2(t-d)-R(t-1) Control ormallza tion Cr(t=max (u(t)I, ly(tD) u(t)= (a ormallze ed signal y y P(t)=r(tr(t w here y( t=1/t Stochastic Averaging An example Approximate To c 1)+bu(t-2)+e(t)+ The equations then becomes B(t)=b(t-1)+?(t)R(t)f(6 Parameters: a=-099 b=0.5. and c==0.7 R(t)=R(t-1)+(t)(G(6)-Rt-1) Estim ation mod f(0)=E{y(t-d,0)(y(t)-2(-d,6)同} ()=E{y(t-d,6)92(t-d,b)} y(t=u(t Define△r=∑kt1(k),then C ntro A(t)=a(t)+ArR(t)f(a(t) R(t)=R(t)+A(G(e(t)-R(t) Change time scale t=T and t'=t+AT R(T)f((-) dT (6(7)-R(r) C K.J. Astrom and B Wittenmark
Robust Adaptive Control What do the diculties depend on? How can the diculties be avoided? Excitation Dead zones Leakage d^ dt = 'e + 'T ' + 1( 0 ^ ) d^ dt = 'e + 'T ' + 1jej( 0 ^ ) Normalization C r(t) = max (ju(t)j; jy(t)j) Normalized signals y~ = y r ; u~ = ur; v~ = v r Stochastic Self-tuner Process A (q1 )y(t) = B (q1 )u(t d) + C (q1 )e(t) Model y(t) = R (q1 )u(t d) + S (q1 )y(t d) Least squares parameter estimation ^ (t) = ^ (t 1) + (t)R(t)1 '(t d)e(t) e(t) = y(t) 'T (t d)^ (t 1) R(t) = R(t 1) + (t) '(t d)'T (t d) R(t 1) Control u(t) = S^ (q1 ) R^ (q1 ) y(t) This implies '(t)T ^ (t)=0 Notice P (t) = (t)R(t)1 where (t)=1=t. Stochastic Averaging Approximate y(t) = 'T (t d) 'T (t d; ) The equations then becomes (t) = (t 1) + (t)R (t)1f ( ) R (t) = R (t 1) + (t) G( ) R (t 1) f ( ) = E '(t d; ) y(t) 'T (t d; ) G( ) = E '(t d; )' T (t d; ) Dene = Pt 0 k=t (k), then (t 0) = (t)+R (t)1f (t) R(t 0) = R(t)+ G (t) R(t) Change time scale t = and t 0 = t + d d = R( )1f ( ) dR d = G ( ) R ( ) An example Process y(t) + ay(t 1) = u(t 1) + bu(t 2) + e(t) + ce(t 1) Parameters: a = 0:99, b = 0:5, and c = 0:7 Estimation model y(t) = u(t 1) + r1u(t 2) + s0y(t 1) Controller u(t) = s0y(t) r1u(t 1) 0123 −1 0 1 0123 −1 0 1 (a) r1 s0 (b) r^1 s^0 c K. J. Åström and B. Wittenmark 8
Loc al inst a biliti Process Conc lusions yt)-1.6y(t-1)-0.75y(t-2) · Averaging a usefu tod e(t)+1.5e(t-1)+0.75e(t-2) Captures a key feature of adaptive systems The B-pdlynomial has zeros at Parameters change sowly 5o±0.81l1 Simplification · Problemsplit in two C(212)=-0.40±0.4oi Linear system 八~ Nonliear equation of lower dmension f(0,t) Good insight into rob usiness issues good complement to simulation e But still dffialt c K.J. Astrom and B Wittenmark
Local Instabilities Process y(t) 1:6y(t 1) 0:75y(t 2) = u(t 1) + u(t 2) + 0:9u(t 3) e(t)+1:5e(t 1) + 0:75e(t 2) The B-polynomial has zeros at z1;2 = 0:50 0:81i and C(z1;2) = 0:40 0:40i 0 500 1000 1500 2000 −1 0 1 2 3 Time s^0 r^1 r^2 s^1 Conclusions Averaging a useful tool Captures a key feature of adaptive systems { Parameters change slowly Simplication Problem split in two { Linear system = constant { Nonliear equation of lower dimension d dt = f (; t) Good insight into robustness issues Good complement to simulation But still dicult c K. J. Åström and B. Wittenmark 9