Lecture 37 Neuro-Adaptve Desgn II: A Robustfyng Tool for Any Desgn Dr. Radhakant Padh Asst. Professor Dept. of Aerospace Engneerng Indan Insttute of Scence - Bangalore
Motvaton Perfect system modelng s dffcult Sources of mperfecton Unmodelled dynamcs (mssng algebrac terms n the model) Inaccurate knowledge of system parameters Change of system parameters/dynamcs durng operaton Black box adaptve approaches exst. But, makng use of exstng desgn s better! (faster adaptaton, chance of nstablty before adaptaton s mnmal) The adaptve desgn should preferably be compatble wth any nomnal control desgn Dr. Radhakant Padh, AE Dept., IISc-Bangalore
Reference Radhakant Padh, Nshant Unnkrshnan and S. N. Balakrshnan, Model Followng Neuro-Adaptve Control Desgn for Non-square, Nonaffne Nonlnear Systems, IET Control Theory and Applcatons, Vol. 1 (6), Nov 007, pp.1650-1661. Dr. Radhakant Padh, AE Dept., IISc-Bangalore 3
Modelng Inaccuracy: A Smple Example ( ) 0.1sn( ) x = sn x + x Known part of actual system (nomnal system) Unknown part of actual system ( x) csn( x) = sn +Δ Weght Bass Functon Dr. Radhakant Padh, AE Dept., IISc-Bangalore 4
Objectve: To ncrease the robustness of a nomnal controller wth respect to parameter and/or modelng naccuraces, whch lead to mperfectons n the system model. Dr. Radhakant Padh, AE Dept., IISc-Bangalore 5
Problem Descrpton and Strategy Desred Dynamcs: Actual Plant: Goal: (, ) X = f X U d d d X = f( X, U) + d( X) (unknown) X X, as t d Approxmate System: Strategy: ( ) X = f( X, U) + dˆ ( X) + K X X ( K > 0) a a a X X, a Xd as t a NN Approx. Dr. Radhakant Padh, AE Dept., IISc-Bangalore 6
Steps for assurng Select a gan matrx K > 0 such that E + K E = 0, E X X Ths leads to Solve for the control X a X { f ( X U) dˆ ( X) K ( )} a X Xa f ( Xd Ud) K( Xa Xd), + +, + = 0 { } d d a a a d (, ) = (, ) ˆ ( ) ( ) ( ) f X U f X U d X K X X K X X ( ) = ( ) e.. f X, U h X, X, X, U U a d d d ( ) d d d a d Dr. Radhakant Padh, AE Dept., IISc-Bangalore 7
Control Soluton: (No. of controls = No. of states) Affne Systems: ( ) + ( ) = (,,, ) f X g X U h X X X U d a d 1 [ ( )] (,,, ) ( ) { } U= g X h X X X U f X d a d Non-affne Systems: Use Numercal Method (e.g. N-R Technque) (, ) = (,,, ) f XU h X X X U ( U ) guess k d a d Ud : k = 1 = Uk 1 : k =,3,... Dr. Radhakant Padh, AE Dept., IISc-Bangalore 8
Control Soluton: (No. of controls < No. of states) Modfy X a dynamcs: (, ) ˆ ( ) ( ) ( ) ( ) X = f X U + d X Ψ X U +Ψ X U + K X X a s s a a (, ) ˆ ( ) ( ) ( ) = f X U + d X +Ψ X U + K X X a s a a Solve for the control from: { f ( X U) d ˆ ( ) ( ) ( )} a X X Us Ka X Xa f ( Xd Ud) K( Xa Xd), + +Ψ +, + = 0 { } (, ) +Ψ ( ) = (, ) ˆ ( ) ( ) ( ) f X U X U f X U d X K X X K X X s d d a a a a d (,,, ) = h X X X U a d d Dr. Radhakant Padh, AE Dept., IISc-Bangalore 9
Soluton for affne systems: (No. of controls < No. of states) { f ( X) + g( X) U} +Ψ ( X) Us = h( X, Xa, Xd, Ud) U f X g X X h X X X U ( ) + ( ) Ψ( ) = (,,, ) U s a d d ( ) = ( ) + (,,, ) G X V f X h X X X U 1 ( ) ( ) (,,, ) a d d { a d d } V= G X f X + h X X X U Extract U from V For smplcty, we wll not consder ths specal case n our further dscusson. Dr. Radhakant Padh, AE Dept., IISc-Bangalore 10
Steps for assurng X X a Error: Error Dynamcs: ( ), ( ) E X X e x x a a a a (, ) ( ) (, ) ˆ ( ) x = f X U + d X x = f X U + d X + k e a a a e = x x a a d ( ) ˆ X d( X) kae a T { ( ) } ˆ T ε ( ) T ( ) ε = = W Φ X + W Φ X k e a a e = W Φ X + k e a a a Dr. Radhakant Padh, AE Dept., IISc-Bangalore Ideal neural network T d ( X) = W ϕ ( X) + ε Actual neural network ˆ ( ) ˆ T d X = W ϕ ( X) ( W ˆ ) W W 11
Stable Functon Learnng Lyapunov Functon Canddate 1 1 L = pe a + W W p γ > γ ( ) ( T ) (, 0) Dervatve of Lyapunov Functon 1 T L = pe e + W W γ a a 1 = pe W Φ X + k e W Wˆ W W Wˆ γ ( T T ( ) ε ) ( ) a a a T 1 W pe X W ˆ = Φ + pe k pe γ ( ) ε a a a a 0 Dr. Radhakant Padh, AE Dept., IISc-Bangalore 1
Stable Functon Learnng Weght update rule (Neural network tranng) Wˆ = γ pe Φ X a ( ) Dervatve of Lyapunov Functon L = pe ε k pe a a a The system s Practcally Stable L < 0 f e > / k ( ε ) a a Dr. Radhakant Padh, AE Dept., IISc-Bangalore 13
Neuro-adaptve Desgn: Implementaton of Controller Weght update rule: where, Wˆ e = γ pe Φ, Wˆ 0 = 0 γ : Learng rate a Φ a : Bass functon ( ) ( ) Estmaton of unknown functon: dˆ X = x x = Wˆ a T Φ Dr. Radhakant Padh, AE Dept., IISc-Bangalore 14
Neuro-adaptve Desgn: Implementaton of Controller Desred Dynamcs: Actual Plant: (, ) X = f X U d d d (unknown) X = f( X, U) + d( X) In realty, X(t) should be avalable from sensors and flters! Approxmate System: NN Approxmaton ( ) ( ) X = f ( X, U ) + dˆ ( X ) + K X X, K > 0 pdf a a a a Intal Condton: ( ) = ( ) = ( ) X 0 X 0 X 0 : known d a Dr. Radhakant Padh, AE Dept., IISc-Bangalore 15
Example 1 A Motvatng Scalar Problem Dr. Radhakant Padh Asst. Professor Dept. of Aerospace Engneerng Indan Insttute of Scence - Bangalore
Example 1: A scalar problem System dynamcs (nomnal system) System dynamcs (actual system) Problem objectves: ( ) ( 1 ) x = x + x + + x u d d d d d ( ) ( 1 ) ( ) x = x+ x + + x u+ d x d( x) = sn ( π x/ ) ( unknown for control desgn) * Nomnal control desgn: x 0 * Adaptve control desgn: x Note: The objectve x x should be acheved much faster than x 0 d d x d d Dr. Radhakant Padh, AE Dept., IISc-Bangalore 17
Example 1: A scalar problem Nomnal control (dynamc nverson) Nomnal control Adaptve control Desgn parameters k =.5 k = 1 p = 1 γ = 30 a ( x) ( x/ x ) ( x/ x ) ( x/ x ) Φ = 3 0 0 0 ( x 0) + ( 1/ τ ) ( x 0) = 0 ( τ = 1) d d d d 1 ( ) ( 1 ) u = + x x + x + x d d d d d ( xd + xd ) + ( 1+ xd ) ud k( xa xd ) ( ) ˆ ( ) a( a) 1 u = 1+ + x x x d x k x x T Dr. Radhakant Padh, AE Dept., IISc-Bangalore 18
Example 1: A scalar problem State Trajectory Control Trajectory Dr. Radhakant Padh, AE Dept., IISc-Bangalore 19
Example 1: A scalar problem Approxmaton of the unknown functon Dr. Radhakant Padh, AE Dept., IISc-Bangalore 0
Example Double Inverted Pendulum: A Benchmark Problem Dr. Radhakant Padh Asst. Professor Dept. of Aerospace Engneerng Indan Insttute of Scence - Bangalore
Example : Double nverted pendulum Dr. Radhakant Padh, AE Dept., IISc-Bangalore
Example : Double nverted pendulum Nomnal Plant: Actual Plant: x 1 x 1 = x1 kr u kr x = α sn( x ) + l b + tanh u + sn x x = x 1max ( ) ( ) ( ) 1 1 1 1 1 1 J1 J1 4J1 1 = x x = α sn( x ) + kr l b u + tanh u kr + sn x max ( ) ( ) ( ) 1 1 1 J J 4J 1 1 1 1 kr u1 tanh ( u1) kr 1 1 = ( α1 +Δ α1)sn( 1) + ( ) + + sn( ) + m1 J1 J1 4J1 1 = x 1 kr u tanh ( u) kr 1 = ( α +Δ α)sn( ) + ( ) + + sn ( 1) + m J J 4J x x l b x K e x 1 max ax 1 1 x x l b x K e 1 max ax Dr. Radhakant Padh, AE Dept., IISc-Bangalore 3
Example : Double nverted pendulum α β ξ σ mgr J kr J u max J kr 4J kr 4J ( l b) Dr. Radhakant Padh, AE Dept., IISc-Bangalore 4
Example : Double nverted pendulum Parameters n unknown functon Δα, Δα : 0% off 1 Control desgn parameters K = 0. I4, Ka = I4 10 10 0 0 ψ ( X ) = 10 10 10 10 p γ = p4 = 1 = γ 4 = 0 ( ) T a1 = a = 0.01 K m = K = m 1 0.1 17 17 T Φ X = 1 x1 /1! x1 /17! 1 x /1! x /17! 17 17 T Φ 4( X) = 1 x3 /1! x3 /17! 1 x4 /1! x4 /17! Dr. Radhakant Padh, AE Dept., IISc-Bangalore 5
Example : Double nverted pendulum Poston of Mass 1 Velocty of Mass 1 Dr. Radhakant Padh, AE Dept., IISc-Bangalore 6
Example : Double nverted pendulum Poston of Mass Velocty of Mass Dr. Radhakant Padh, AE Dept., IISc-Bangalore 7
Example : Double nverted pendulum Torque for Mass 1 Torque for Mass Dr. Radhakant Padh, AE Dept., IISc-Bangalore 8
Example : Double nverted pendulum Capturng d ( X ) Capturng d ( X) 4 Dr. Radhakant Padh, AE Dept., IISc-Bangalore 9
Neuro-Adaptve Desgn for Output Robustness Dr. Radhakant Padh Asst. Professor Dept. of Aerospace Engneerng Indan Insttute of Scence - Bangalore
N-A for Robustness of Output Dynamcs Desred output dynamcs: Actual output dynamcs: Y = f X + G X U + d X Y d ( ) ( ) ( ) Y d Objectve: Y Y d as soon as possble Dr. Radhakant Padh, AE Dept., IISc-Bangalore 31
N-A for Robustness of Output Dynamcs Dynamcs of auxlary output: ( ) ˆ Y = f X + G ( X) U + d( X) + K ( Y Y ) a Y Y a a d d Strategy: Approxmate state NN Approx. Y a Actual Y state Y d Desred state Dr. Radhakant Padh, AE Dept., IISc-Bangalore 3
Steps for assurng Ya Yd Enforce the error dynamcs E + KE = 0 E ( Y Y ) d d d a d After carryng out the necessary algebra f( X, U) = h( X, X, X, U ) In case of control affne system The control s gven by a d d f ( X ) + [ g( X)] U = h( X, X, X, U ) d a d U = g X h X X X U f X 1 [ ( )] { (, d, a, d) ( )} Dr. Radhakant Padh, AE Dept., IISc-Bangalore 33
Steps for assurng Y Y a The error n the output s defned as E ( Y Y ) e ( y y ) a a a a Ideal neural network s gven by: T d ( X) = W ϕ ( X) + ε where W s the weght matrx and ϕ ( X ) s the radal bass functon Dr. Radhakant Padh, AE Dept., IISc-Bangalore 34
Functon Learnng: Defne error e Output dynamcs a Δ ( y ya y = f ( X) + g ( X) U + d ( X) Y Y y = f ( X) + g ( X) U + dˆ ( X) + k e a Y Y a a Error dynamcs e = d ( X) dˆ ( X) k e a a a T = W Φ ( X) + ε k e a a ) From unversal functon approxmaton property T d ( X) = W ϕ ( X) + ε ˆ ( ) ˆ T d X = W ϕ ( X) Dr. Radhakant Padh, AE Dept., IISc-Bangalore 35
Lyapunov Stablty Analyss Lyapunov Functon Canddate: Dervatve of Lyapunov Functon: Weght Update Rule: L = e pe + W γ W T a a T T = e ( ) ˆ a p W Φ X + ε kae a W γw = W e p ( X) γ Wˆ Φ + e pε k e p a T 1 a a a 0 Dr. Radhakant Padh, AE Dept., IISc-Bangalore 36
Lyapunov Stablty Analyss Ths condton leads to L = e p ε k a a e a p whenever e > ε / k a a Usng the Lyapunov stablty theory, we conclude that the trajectory of ea and W ~ are pulled towards the orgn. Hence, the output dynamcs s Practcally Stable! Dr. Radhakant Padh, AE Dept., IISc-Bangalore 37
Neuro-Adaptve Desgn wth Modfed Weght Update Rule (wth σ modfcaton) Dr. Radhakant Padh Asst. Professor Dept. of Aerospace Engneerng Indan Insttute of Scence - Bangalore
Neuro-adaptve Desgn wth σ Modfcaton Weght update rule: where, ˆ W = γ e Φ γσwˆ, Wˆ 0 = 0 γ : Learng rate, e = x x a Φ a : Bass functon Estmaton of unknown functon: dˆ X ( ) a ˆ T = W Φ σ ( ) > 0: Stablzng factor Dr. Radhakant Padh, AE Dept., IISc-Bangalore 39
Neuro-adaptve Desgn wth σ Modfcaton Lyapunov functon canddate: 1 1 T 1 v = ea + W γ W p = Then v = e e + W γ W T 1 a a ( ε ) ( Note: 1) T = e e + σw Wˆ (can be derved so, wth k = 1) a a a Consder the last term n v T ˆ 1 WW = ( T WW ˆ ) 1 T 1 T T = W W W = W W W W ( ) ( ) Dr. Radhakant Padh, AE Dept., IISc-Bangalore 40
Neuro-adaptve Desgn wth σ Modfcaton However, T T T WW = WW + WW ( ˆ ) ( ˆ ) T T = W W + W + W W W T ˆ T T ˆ T = WW + WW + WW WW ˆ T T T = W W W + W W + W W ( ) ˆ T ˆ T T = WW + WW + WW T ˆ 1 ˆ T ˆ T T T T σww = σ WW+ WW + WW WW WW 1 ( ˆ T ˆ T T = σww σww + σww) 1 ( ) σ W ˆ σ W + σ W Hence, ( ) Dr. Radhakant Padh, AE Dept., IISc-Bangalore 41
Neuro-adaptve Desgn wth σ Modfcaton Hence, the equaton for v becomes 1 1 1 v ˆ eaε ea σ W σ W + σ W ea ε 1 1 1 + e W W + W ea ε 1 1 1 σ ˆ + + W σ W σ W ˆ a σ σ σ Dr. Radhakant Padh, AE Dept., IISc-Bangalore 4
Neuro-adaptve Desgn wth σ Modfcaton Defnng β ( ) W W W ε 1 ˆ + σ We have v ea < 0, whenever > β e.. v < 0, whenever e > β a Dr. Radhakant Padh, AE Dept., IISc-Bangalore 43
Summary: Neuro-Adaptve Desgn N-A Desgn: A generc model-followng adaptve desgn for robustfyng any nomnal controller It s vald for both non-square and nonaffne problems n general Extensons: Robustness of output dynamcs only Structured N-A desgn for effcent learnng Dr. Radhakant Padh, AE Dept., IISc-Bangalore 44
References Padh, R., Unnkrshnan, N. and Balakrshnan, S. N., Model Followng Neuro-Adaptve Control Desgn for Non-square, Non-affne Nonlnear Systems, IET Control Theory and Applcatons, Vol. 1 (6), Nov 007, pp.1650-1661. Padh, R., Kothar, M., An Optmal Dynamc Inverson Based Neuro-adaptve Approach for Treatment of Chronc Myelogenous Leukema, Computer Methods and Programs n Bomedcne, Vol. 87, 007, pp. 08-4. Rajasekaran, J., Chunodkar, A. and Padh, R., Structured Model-followng Neuro-adaptve Desgn for Atttude Maneuver of Rgd Bodes, Control Engneerng Practce, Vol. 17, 009, pp.676-689. Dr. Radhakant Padh, AE Dept., IISc-Bangalore 45
Dr. Radhakant Padh, AE Dept., IISc-Bangalore 46