EECE 574 - Adaptive Control Model-Reference Adaptive Control - Part I Guy Dumont Department of Electrical and Computer Engineering University of British Columbia January 2010 Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 1 / 41
Model-Reference Adaptive Systems The MRAC or MRAS is an important adaptive control methodology 1 1 see Chapter 5 of the Åström and Wittenmark textbook, or H. Butler, Model-Reference Adaptive Control-From Theory to Practice, Prentice-Hall, 1992 Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 2 / 41
Model-Reference Adaptive Systems The MIT rule Lyapunov stability theory Design of MRAS based on Lyapunov stability theory Hyperstability and passivity theory The error model Augmented error A model-following MRAS Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 3 / 41
The MIT Rule MIT Rule The Basics Original approach to MRAC developed around 1960 at MIT for aerospace applications With e = y y m, adjust the parameters θ to minimize J(θ) = 1 2 e2 It is reasonable to adjust the parameters in the direction of the negative gradient of J: dθ = γ J θ = γe e θ e/ θ is called the sensitivity derivative of the system and is evaluated under the assumption that θ varies slowly Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 4 / 41
The MIT Rule MIT Rule The Basics The derivative of J is then described by ( ) dj e 2 = e e t = γe2 θ Alternatively, one may consider J(e) = e in which case dθ = γ J θ = γ e θ sign(e) The sign-sign algorithm used in telecommunications where simple implementation and fast computations are required, is ( ) dθ J e = γ θ = γsign sign(e) θ Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 5 / 41
MIT Rule: Example 1 MIT Rule Examples Process: y = kg(s) where G(s) is known but k is unknown The desired response is y m = k 0 G(s)u c Controller is u = θu c Then e = y y m = kg(p)θu c k 0 G(p)u c Sensitivity derivative e θ = kg(p)u c = k k 0 y m MIT rule dθ = γ k k 0 y m e = γy m e Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 6 / 41
MIT Rule: Example 1 MIT Rule Examples Figure: MIT rule for adjustment of feedforward gain (from textbook). Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 7 / 41
MIT Rule: Example 1 MIT Rule Examples Figure: MIT rule for adjustment of feedforward gain: Simulation results (from textbook). Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 8 / 41
MIT Rule: Example 2 MIT Rule Examples Consider the first-order system dy The desired closed-loop system is dy m = ay + bu = a m y m + b m u c Applying model-following design (see lecture notes on pole placement) dega 0 0 degs = degr = degt = 0 Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 9 / 41
MIT Rule: Example 2 MIT Rule Examples The controller is then u(t) = t 0 u c (t) s 0 y(t) For perfect model-following dy = ay(t) + b[t 0 u c (t) s 0 y(t)] = (a + bs 0 )y(t) + bt 0 u c = a m y m (t) + b m u c This implies s 0 = a m a b t 0 = b m b Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 10 / 41
MIT Rule: Example 2 MIT Rule Examples With the controller we can write 2 y = bt 0 p + a + bs 0 u c With e = y y m, the sensitivity derivatives are e t 0 = e s 0 = b u c p + a + bs 0 b 2 t 0 (p + a + bs 0 ) 2 u b c = y p + a + bs 0 2 p is the differential operator d(.)/ Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 11 / 41
MIT Rule: Example 2 MIT Rule Examples However, a and b are unknown 3. For the nominal parameters, we know that a + bs 0 = a m p + a + bs 0 p + a m Then 0 ds 0 ( ) ( ) 1 = γ am b u c e = γ u c e p + a m p + a m ( ) ( ) 1 = γ am b y e = γ y e p + a m p + a m with γ = γ b/a m, i.e. b is absorbed in γ and the filter is normalized with static gain of one. 3 after all, we want to design an adaptive controller! Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 12 / 41
MIT Rule: Example 2 MIT Rule Examples Figure: MIT rule for first-order (from textbook) Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 13 / 41
MIT Rule: Example 2 MIT Rule Examples Figure: Simulation of MIT rule for first-order with a = 1, b = 0.5, a m = b m = 2 and γ = 1(from textbook) Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 14 / 41
MIT Rule: Example 2 MIT Rule Examples Figure: Simulation of MIT rule for first-order with a = 1, b = 0.5, a m = b m = 2. Controller parameters for γ = 0.2, 1 and 5(from textbook) Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 15 / 41
MIT Rule: Example 2 MIT Rule Examples Figure: Simulation of MIT rule for first-order with a = 1, b = 0.5, a m = b m = 2. Relation between controller parameters θ 1 and θ 2. The dashed line is θ 2 = θ 1 a/b. (from textbook) Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 16 / 41
MIT Rule Stability of the Adaptive Loop Stability of the Adaptive Loop Consider again the adaptation of a feedforward gain 1 G = s 2 + a 1 s + a 2 e = (θ θ 0 )Gu c e θ dθ = Gu c = y m θ 0 = γ e e θ = γ e y m θ 0 = γey m Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 17 / 41
MIT Rule Stability of the Adaptive Loop Stability of the Adaptive Loop Thus the system can be described as d 2 y m 2 + a dy m 1 d 2 y 2 + a 1 This is difficult to solve analytically + a 2 y m = θ 0 u c dy + a 2y = θu c dθ = γ(y y m )y m Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 18 / 41
MIT Rule Stability of the Adaptive Loop Stability of the Adaptive Loop d 3 y 3 + a d 2 y 1 2 + a dy 2 + γu cy m y = θ du c + γu cy 2 m Assume u o c and y o m constant, equilibrium is y(t) = y o m = θ 0u o c a 2 which is stable if a 1 a 2 > γu o cy o m = γ a 2 (u o c) 2 Thus, if γ or u c is sufficiently large, the system will be unstable Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 19 / 41
MIT Rule Stability of the Adaptive Loop Stability of the Adaptive Loop Figure: Influence on convergence and stability of signal amplitude for MIT rule (from textbook) Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 20 / 41
Modified MIT Rule MIT Rule Modified MIT Rule Normalization can be used to protect against dependence on the signal amplitudes With ϕ = e/ θ, the MIT rule can be written as The normalized MIT rule is then For the previous example, dθ = γϕe dθ = γϕe α 2 + ϕ T ϕ dθ = γey m/θ 0 α 2 + y 2 m/θ 2 0 Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 21 / 41
Modified MIT Rule MIT Rule Modified MIT Rule Figure: Influence on convergence and stability of signal amplitude for modified MIT rule (from textbook) Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 22 / 41
Lyapunov Design of MRAC Lyapunov Stability Theory Lyapunov Theory Aleksandr M Lyapunov (1857-1918, Russia) Classmate of Markov, taught by Chebyshev Doctoral thesis The general problem of the stability of motion became a fundamental contribution to the study of dynamic systems stability He shot himself three days after his wife died of tuberculosis Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 23 / 41
Lyapunov Design of MRAC Lyapunov Stability Theory Lyapunov Theory Consider the nonlinear time-varying system ẋ = f (x,t) with f (0,t) = 0 If at time t = t 0 x(0) = δ, i.e. if the initial state is not the equlibrium state x = 0, what will happen? There are four possibilities Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 24 / 41
Lyapunov Design of MRAC Lyapunov Stability Theory Lyapunov Theory The system is stable. For a sufficiently small δ, x stays within ε of x. If δ can be chosen independently of t 0, then the system is said to be uniformly stable. The system is unstable. It is possible to find ε which does not allow any δ. The system is asymptotically stable. For δ < R and an arbitrary ε, there exists t such that for all t > t, x x < ε. It implies that x x 0 as t. If asymptotic stability is guaranteed for any δ, the system is globally asymptotically stable. Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 25 / 41
Lyapunov Design of MRAC Lyapunov Stability Theory Lyapunov Theory A scalar time-varying function is locally positive definite if V(o,t) = 0 and there exists a time-invariant positive definite function V 0 (x) such that t t 0, V(x,t) V 0 (x). In other words, it dominates a time-invariant positive definite function. V(x, t) is radially unbounded if 0 < α x V(x, t), α > 0. A scalar time-varying function is said to be decrescent if V(o,t) = 0 and there exists a time-invariant positive definite function V 1 (x) such that t t 0, V(x,t) V 1 (x). In other words, it is dominated by a time-invariant positive definite function. Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 26 / 41
Lyapunov Design of MRAC Lyapunov Stability Theory Lyapunov Theory Theorem (Lyapunov Theorem) Stability: if in a ball B R around the equilibrium point 0, there exists a scalar function V(x,t) with continuous partial derivatives such that 1 V is positive definite 2 V is negative semi-definite then the equilibrium point is stable. Uniform stability and uniform asymptotic stability: If furthermore, 3 V is decrescent then the origin is uniformly stable. If condition 2 is strengthened by requiring that V be negative definite, then the equilibrium is uniformly asymptotically stable. Global uniform asymptotic stability: If B R is replaced by the whole state space, and condition 1, the strengthened condition 2, condition 3 and the condition 4 V(x,t) is radially unbounded are all satisfied, then the equilibrium point at 0 is globally uniformly asymptotically stable. Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 27 / 41
Lyapunov Design of MRAC Lyapunov Stability Theory Lyapunov Theory The Lyapunov function has similarities with the energy content of the system and must be decreasing with time. This result can be used in the following way to design a stable a stable adaptive controller 1 First, the error equation, i.e. a differential equation describing either the output error y y m or the state error x x m is derived. 2 Second, a Lyapunov function, function of both the signal error e = x x m and the parameter error φ = θ θ m is chosen. A typical choice is V = e T Pe + φ T Γ 1 φ where both P and Γ 1 are positive definite matrices. 3 The time derivative of V is calculated. Typically, it will have the form V = e T Qe + some terms including φ Putting the extra terms to zero will ensure negative definiteness for V if Q is positive definite, and will provide the adaptive law. Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 28 / 41
Lyapunov Design of MRAC Stability of Adaptive Loop Lyapunov Design of MRAC Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 29 / 41
Lyapunov Design of MRAC Lyapunov Design of MRAC Lyapunov Design of MRAC Determine controller structure Derive the error equation Find a Lyapunov equation Determine adaptation law that satisfies Lyapunov theorem Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 30 / 41
Lyapunov Design of MRAC Adaptation of Feedforward Gain Lyapunov Design of MRAC Process model Desired response Controller dy dy m = ay + ku = ay m + k 0 u c u = θu c Introduce error e = y y m The error equation is de = ae + (kθ k 0)u c Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 31 / 41
Lyapunov Design of MRAC Adaptation of Feedforward Gain Lyapunov Design of MRAC System model Desired equilibrium dy dθ = ay + ku =?? e = 0 θ = θ 0 = k 0 k Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 32 / 41
Lyapunov Design of MRAC Adaptation of Feedforward Gain Lyapunov Design of MRAC Consider the Lyapunov function V(e,θ) = γ 2 e2 + k 2 (θ θ 0) 2 dv Choosing the adjustment rule = γae 2 + (kθ k 0 )( dθ + γu ce) gives dθ = γu ce dv = γae2 Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 33 / 41
Lyapunov Design of MRAC Adaptation of Feedforward Gain Lyapunov Design of MRAC Lyapunov rule: dθ = γu c e MIT rule: dθ = γy m e Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 34 / 41
Lyapunov Design of MRAC Adaptation of Feedforward Gain Lyapunov Design of MRAC Lyapunov rule: MIT rule: Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 35 / 41
First-order System Lyapunov Design of MRAC Lyapunov Design of MRAC Process model Desired response Controller dy m dy = ay + bu = a m y m + b m u c u = θ 1 u c θ 2 y Introduce error e = y y m The error equation is de = a me (bθ 2 + a a m )y + (bθ 1 b m )u c Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 36 / 41
First-order System Lyapunov Design of MRAC Lyapunov Design of MRAC Candidate Lyapunov function V(t,θ 1,θ 2 ) = 1 (e 2 + 1bγ 2 (bθ 2 + a a m ) 2 + 1bγ ) (bθ 1 b m ) 2 Derivative dv = de + 1 γ (bθ 2 + a a m ) dθ 2 + 1 γ (bθ 1 b m ) dθ 1 = a m e 2 + 1 γ (bθ 2 + a a m )( dθ 2 This suggests the adaptation law γye) + 1 γ (bθ 1 b m )( dθ 1 + γu c e) dθ 1 dθ 2 = γu c e = γye Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 37 / 41
First-order System Lyapunov Design of MRAC Lyapunov Design of MRAC Lyapunov Rule MIT Rule Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 38 / 41
First-order System Lyapunov Design of MRAC Lyapunov Design of MRAC Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 39 / 41
Lyapunov Design of MRAC Lyapunov-based MRAC Design Lyapunov Design of MRAC The main advantage of Lyapunov design is that it guarantees a closed-loop system. For a linear, asymptotically stable governed by a matrix A, a positive symmetric matrix Q yields a positive symmetric matrix P by the equation A T P + PA = Q This equation is known as Lyapunov s equation. Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 40 / 41
Lyapunov Design of MRAC Lyapunov-based MRAC Design Lyapunov Design of MRAC The main drawback of Lyapunov design is that there is no systematic way of finding a suitable Lyapunov function V leading to a specific adaptive law. For example, if one wants to add a proportional term to the adaptive law, it is not trivial to find the corresponding Lyapunov function. The hyperstability approach is more flexible than the Lyapunov approach. Guy Dumont (UBC EECE) EECE 574: MRAC - 1 January 2010 41 / 41