<<

Control of Nonlinear

N. Marchand Nicolas Marchand References

Outline CNRS Associate researcher

Introduction [email protected] Linear/Nonlinear The X4 example Control Systems Department, gipsa-lab Linear approaches Grenoble, France Antiwindup Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Master PSPI 2009-2010 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 1 / 174 References

Nonlinear systems Khalil - Prentice-Hall, 2002 Nonlinear Probably the best book to start with nonlinear control Control Nonlinear systems S. Sastry - Springer Verlag, 1999 N. Marchand Good general book, a bit harder than Khalil’s

References Mathematical - E.D. Sontag - Springer, 1998 Mathematically oriented, Can be downloaded at: Outline http://www.math.rutgers.edu/~sontag/FTP_DIR/sontag_mathematical_control_theory_springer98.pdf Introduction Constructive nonlinear control - Sepulchre et al. - Springer, 1997 More Linear/Nonlinear The X4 example focused on passivity and recursive approaches Linear Nonlinear control systems - A. Isidori - Springer Verlag, 1995 approaches A reference for geometric approach Antiwindup Linearization Applied Nonlinear control - J.J. Slotine and W. Li - Prentice-Hall, 1991 Gain scheduling An interesting reference in particular for sliding mode Stability “Research on Gain Scheduling” - W.J. Rugh and J.S. Shamma - Nonlinear Automatica, 36 (10):1401–1425, 2000 approaches CLF “Survey of gain scheduling analysis and design” - D.J. Leith and W.E. Sliding mode Geometric Leithead - Int. Journal of Control, 73:1001–1025, 1999 control Surveys on Gain Scheduling, The second reference can be downloaded at: Recursive techniques http://citeseer.ist.psu.edu/leith99survey.html X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 2 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 3 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 4 / 174 Introduction

Nonlinear Control

N. Marchand Some preliminary vocable and definitions References What is control ? Outline

Introduction A very short review of the linear case (properties, Linear/Nonlinear The X4 example design of control laws, etc.) Linear Why nonlinear control ? approaches Antiwindup Linearization Formulation of a nonlinear control problem (model, Gain scheduling representation, closed-loop stability, etc.)? Stability

Nonlinear Some strange possible behaviors of nonlinear systems approaches CLF Example : The X4 helicopter Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 5 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 6 / 174 Some preliminary vocable

Nonlinear Control

N. Marchand We consider a dynamical : References

Outline System u(t) y(t) Introduction x(t) Linear/Nonlinear The X4 example Linear approaches where: Antiwindup y is the output: represents what is “visible” from outside Linearization Gain scheduling the system Stability x is the state of the system: characterizes the state of the approaches CLF u is the control input: makes the system move Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 7 / 174 The 4 steps to control a system

Nonlinear Control yd yu N. Marchand k(x)

References Controller Outline x^

Introduction Linear/Nonlinear Observer The X4 example

Linear 1 approaches Modelization Antiwindup Linearization To get a mathematical representation of the system Gain scheduling Different kind of model are useful. Often: Stability a simple model to build the control law Nonlinear a sharp model to check the control law and the observer approaches CLF 2 Design the state reconstruction: in order to reconstruct Sliding mode Geometric control the variables needed for control Recursive techniques 3 Design the control and test it X4 stabilization Observers 4 Close the loop on the real system

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 8 / 174 Linear dynamical systems Some properties of (1/2)

Nonlinear Control Definition: Systems such that if y1 and y2 are the N. Marchand outputs corresponding to u1 and u2, then λ : ∀ ∈ References y1 + λy2 is the output corresponding to u1 + λu2

Outline Representation near the operating point:

Introduction Transfer : Linear/Nonlinear The X4 example y(s) = h(s)u(s) Linear approaches Antiwindup State space representation: Linearization Gain scheduling x˙ = Ax + Bu Stability y = Cx(+Du) Nonlinear approaches CLF The model can be obtained Sliding mode Geometric physical modelization (eventually coupled with control Recursive identification) techniques X4 stabilization identification (black box approach) Observers both give h(s) or (A, B, C, D) and hence the model.

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 9 / 174 Linear dynamical systems Some properties of linear system (2/2)

Nonlinear Control x˙ = Ax + Bu N. Marchand y = Cx(+Du)

References Nice properties:

Outline Unique and constant equilibrium Controllability (resp. observability) directly given by Introduction n−1 n−1 Linear/Nonlinear rank(B, AB,..., A B) (resp. rank(C, CA,..., CA )) The X4 example Stability directly given by the poles of h(s) or the eigenvalues Linear of A (asymptotically stable < < 0) approaches Local properties = global properties (like stability, Antiwindup Linearization stabilizability, etc.) Gain scheduling The time behavior is independent of the Stability Frequency analysis is easy Nonlinear Control is easy: simply take u = Kx with K such that approaches <(eig(A + BK)) < 0, the closed-loop system x˙ = Ax + BKx will CLF Sliding mode be asymptotically stable Geometric control ··· Recursive techniques Mathematical tool: X4 stabilization This is a caricature of the reality (of course problems due to Observers uncertainties, delays, noise, etc.)

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 10 / 174 Why nonlinear control ? Why nonlinear control if linear control is so easy ?

Nonlinear Control All physical systems are nonlinear because of N. Marchand Actuators saturations References Viscosity (proportional to speed2) Outline Sine or cosine functions in robotics Introduction Chemical kinetic in exp(temperature) Linear/Nonlinear The X4 example or phenomena Linear ... approaches Antiwindup More and more the performance specification requires Linearization Gain scheduling nonlinear control (eg. automotive) Stability More and more controlled systems are deeply nonlinear Nonlinear approaches (eg. µ-nano systems where hysteresis phenomena, friction, CLF Sliding mode discontinuous behavior) Geometric control Recursive Nonlinear control is sometimes necessary (oscillators, techniques X4 stabilization cyclic systems, . . . ) Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 11 / 174 Nonlinear dynamical systems How to get a model ?

Nonlinear Control Representation:

N. Marchand State space representation: ODE Ordinary differential : References

Outline In this course, only: Introduction x˙ (t) = f (x(t), u(t)) Linear/Nonlinear The X4 example y(t) = h(x(t), u(t)) Linear approaches PDE Partial differential equation (traffic, flow, etc.): Antiwindup ∂f (x,... ) Linearization 0 = g(x(t), x˙ (t), u(t)) Gain scheduling ∂x 0 = h(y(t), x(t), u(t)) Stability ... Algebraic differential (implicit), hybrid (with Nonlinear approaches discrete or event based equations), etc. CLF Sliding mode The model can be obtained Geometric control physical modelization and then nonlinear identification of Recursive techniques the parameters (identifiability problems) X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 12 / 174 Nonlinear dynamical systems Open-loop control versus closed-loop control ? Nonlinear y Control d yu k(x) N. Marchand States: x References Controller

Outline x^

Introduction Linear/Nonlinear Observer The X4 example Open-loop control Linear approaches find u(t) such that limt y(t) − yd (t) = 0 Antiwindup k k Linearization Gain scheduling Widely used for path planning→∞ problems (robotics) Stability Closed-loop control Nonlinear find u(x) such that limt y(t) − yd (t) = 0 approaches k k CLF Sliding mode Better because closed loop→∞ control can stabilize systems and is robust w.r.t. Geometric control perturbation. Recursive techniques In this course X4 stabilization Observers Only closed-loop control problems are treated

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 13 / 174 Nonlinear dynamical systems Aim of control ?

Nonlinear xd Control yu k(x) N. Marchand States: x References Controller

Outline x^

Introduction Observer Linear/Nonlinear The X4 example Tracking problem Linear approaches find u(x) such that limt x(t) − xd (t) = 0 k k Antiwindup Linearization →∞ Gain scheduling Stabilization problem

Stability find u(x) such that limt x(t) − xd (t) = 0 for xd (t) = constant k k Nonlinear →∞ approaches Null stabilization problem CLF find u(x) such that limt x(t) − xd (t) = 0 for xd (t) = 0 Sliding mode k k Geometric control In any cases,→∞a null stabilization problem of z(t) = y(t) − yd (t) Recursive techniques X4 stabilization In this course Observers Only the stabilization problem will be treated.

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 14 / 174 Some strange behaviors of nonlinear systems The undersea vehicle

Nonlinear Control Simplified model of the undersea vehicle (in one N. Marchand direction):

References v˙ (t) = −v v + u Outline | | Introduction Linear/Nonlinear Step answer: The X4 example 1.5 2 Linear u(s) = s approaches Antiwindup 1 1 Linearization No proportionality u(s) = s Gain scheduling between the input Stability and the output 0.5 Nonlinear u(s) = 1 approaches 100s CLF 0 Sliding mode 0 1 2 3 4 5 6 7 8 9 10 Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 15 / 174 Some strange behaviors of nonlinear systems The (1/2)

Nonlinear Control Van der Pol oscillator

N. Marchand x˙1 = x2 References x˙2 = −x1 − εh(x1)x2 Outline 2 Introduction with h(x1) = −1 + x Linear/Nonlinear 1 The X4 example Oscillations: ε tunes the Linear approaches 6 6 ε = 1, x(0) = (5, 5) ε = 1, x(0) = (5, 5) Antiwindup 5 5 ε = 0.1, x(0) = (5, 5) ε = 0.1, x(0) = (5, 5) Linearization 4 Gain scheduling 4 3 3 Stability 2 2 Nonlinear 1 x 1 x2 approaches 0 0 CLF −1

Sliding mode −1 −2 Geometric control −2 −3 Recursive −3 −4 techniques 0 10 20 30 40 50 −4 −2 0 2 4 6 X4 stabilization time x1 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 16 / 174 Some strange behaviors of nonlinear systems The Van der Pol oscillator (2/2)

Nonlinear Control Oscillations: stable limit cycles, fast dynamics

N. Marchand 6 6 ε = 1, x(0) = (0, 1) ε = 1, x(0) = (0, 1) 5 5 ε = 1, x(0) = (5, 5) ε = 1, x(0) = (5, 5) References 4 4

Outline 3 3 2 2 Introduction x 1 x2 1 Linear/Nonlinear The X4 example 0 0 Linear −1 −1 approaches −2 6 −2 Antiwindup −3 5 −3 0 10 20 30 40 50 −3 −2 −1 0 1 2 3 4 5 6 Linearization time x Gain scheduling 4 1 Stability 3

2 Nonlinear approaches - x 1 CLF 0 Sliding mode −1 Geometric control −2 ε = 1, x(0) = (0, 1) Recursive ε = 1, x(0) = (5, 5) techniques −3 0 0.1 0.2 0.3 0.4 0.5 X4 stabilization time Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 17 / 174 Some strange behaviors of nonlinear systems 2. Representation of non linear systems The tunnel diode (1/2)

Nonlinear Control The tunnel diode model • Example: the tunnel-diode circuit

N. Marchand

References dVC C + iR = iL Outline dt Introduction diL Linear/Nonlinear E − RiL = VC + L The X4 example dt Linear iR = h(vR ) approaches Antiwindup Linearization It gives: Gain scheduling Stability 1 Nonlinear x˙1(t) = (−h(x1) + x2) approaches C CLF 1 Sliding mode x˙2(t) = (−x1 − Rx2 + u) Geometric L control Recursive techniques with x = v , x = i and u = E X4 stabilization 1 C 2 L Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 18 / 174 Some strange behaviors of nonlinear systems The tunnel diode (2/2)

Nonlinear Control The tunnel diode behavior: bifurcation

N. Marchand with: i = 17.76v − 103.79v 2 + 229.62v 3 − 226.31v 4 + 83.72v 5 References R R R R R R

Outline 1.4 1.3 x(0) = (0, 1.23) x(0) = (0, 1.23) Introduction 1.2 1.2 x(0) = (0, 1.24) x(0) = (0, 1.24) Linear/Nonlinear 1.1 The X4 example 1 1 Linear 0.9 approaches 0.8 Antiwindup 0.8 x 0.6 x2 Linearization 0.7 Gain scheduling 0.4 0.6 Stability 0.5 0.2 Nonlinear 0.4 approaches 0 0 2 4 6 8 10 0 0.2 0.4 0.6 0.8 1 CLF time x Sliding mode 1 Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 19 / 174 Some strange behaviors of nonlinear systems The car parking Nonlinear The car parking simplified model Control

N. Marchand x˙1 = u1

References x˙2 = u2 Outline x˙3 = x2u1 Introduction Linear/Nonlinear The X4 example System with a misleading simplicity Linear approaches Theorem (Brockett (83)) Antiwindup Linearization There is no (u1(x), u2(x)) continuous w.r.t. x such that x is Gain scheduling asymptotically stable Stability

Nonlinear approaches CLF In practice: Sliding mode Geometric manoeuvres control discontinuous control Recursive

techniques time-varying control Marchand and Alamir (2003) X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 20 / 174 Nonlinear dynamical systems Everything is possible

Nonlinear Control x˙ = f (x, u) N. Marchand y = h(x, u)

References Everything is possible: Outline Equilibrium can be unique, multiple, infinite or even not exist Introduction Controllability (resp. observability) are very hard to prove (it is Linear/Nonlinear The X4 example often even not checked) Linear Stability may be hard to prove approaches Local properties = global properties (like stability, Antiwindup 6 Linearization stabilizability, etc.) Gain scheduling The time behavior is depends upon the initial condition Stability Frequency analysis is almost impossible Nonlinear No systematic approach for building a control law: to each approaches problem corresponds it unique solution CLF Sliding mode Geometric ··· control Mathematical tool: Lyapunov and differential tools Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 21 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 22 / 174 generated with a dissymmetry between left and right forces: Γr = l(F4 − F2) generated with a dissymmetry between front and rear forces: Γp = l(F1 − F3) generated with a dissymmetry between front/rear and left/right torques: Γy = Γ1 + Γ3 − Γ2 − Γ4

4 generated forces Fi 4 counter-rotating torques Γi Roll movement

Pitch movement

Yaw movement

The X4 helicopter How it works ? Nonlinear 4 fixed rotorsPrincipe with controlled de fonctionnement rotation Control speed s N. Marchand i 4 moteurs

References s3

Outline s4 Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup s Linearization 2 Gain scheduling Stability s1 Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 23 / 174 generated with a dissymmetry between left and right forces: Γr = l(F4 − F2) generated with a dissymmetry between front and rear forces: Γp = l(F1 − F3) generated with a dissymmetry between front/rear and left/right torques: Γy = Γ1 + Γ3 − Γ2 − Γ4

4 counter-rotating torques Γi Roll movement

Pitch movement

Yaw movement

The X4 helicopter How it works ? Nonlinear 4 fixed rotorsPrincipe with controlled de fonctionnement rotation Control speed s N. Marchand i 4 moteurs 4 generated4 forces prop.Fi à References F3

Outline F4 Introduction Linear/Nonlinear The X4 example F2 Linear approaches Antiwindup F1 Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 23 / 174 generated with a dissymmetry between left and right forces: Γr = l(F4 − F2) generated with a dissymmetry between front and rear forces: Γp = l(F1 − F3) generated with a dissymmetry between front/rear and left/right torques: Γy = Γ1 + Γ3 − Γ2 − Γ4

Roll movement

Pitch movement

Yaw movement

The X4 helicopter How it works ? Nonlinear 4 fixed rotorsPrincipe with controlled de fonctionnement rotation Control speed s N. Marchand i 4 moteurs 4 generated4 forces prop.Fi à References 4 counter-rotating4 couples torquesprop. à Γi Outline

Introduction Linear/Nonlinear Γ3 The X4 example Linear Γ4 approaches Antiwindup Linearization Gain scheduling Γ2 Stability Γ Nonlinear 1 approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 23 / 174 generated with a dissymmetry between front and rear forces: Γp = l(F1 − F3) generated with a dissymmetry between front/rear and left/right torques: Γy = Γ1 + Γ3 − Γ2 − Γ4

Pitch movement

Yaw movement

The X4 helicopter How it works ? Nonlinear 4 fixed rotorsPrincipe with controlled de fonctionnement rotation Control speed s N. Marchand i 4 moteurs 4 generated4 forces prop.Fi à References 4 counter-rotating4 couples torquesprop. à Γi Outline Roll movementContrôlegenerated : with a F4 Introduction dissymmetry„ betweenRoulis : left and right Linear/Nonlinear The X4 example forces: F2 1 Linear Γr = l(F4 − F2) approaches ) l Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 23 / 174 generated with a dissymmetry between front/rear and left/right torques: Γy = Γ1 + Γ3 − Γ2 − Γ4

Yaw movement

The X4 helicopter How it works ? Nonlinear 4 fixed rotorsPrincipe with controlled de fonctionnement rotation Control speed s N. Marchand i 4 moteurs 4 generated4 forces prop.Fi à References F3 4 counter-rotating4 couples torquesprop. à Γi Outline Roll movementContrôlegenerated : with a Introduction dissymmetry„ betweenRoulis : left and right Linear/Nonlinear „ Tangage : The X4 example forces: 1 Linear Γr = l(F4 − F2) approaches Pitch movement generated with a ) l Antiwindup F1 Linearization dissymmetry between front and rear Gain scheduling Stability forces:

Nonlinear Γp = l(F1 − F3) approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 23 / 174 The X4 helicopter How it works ? Nonlinear 4 fixed rotorsPrincipe with controlled de fonctionnement rotation Control speed s N. Marchand i 4 moteurs 4 generated4 forces prop.Fi à References 4 counter-rotating4 couples torquesprop. à Γi Outline Roll movementContrôlegenerated : with a Introduction dissymmetry„ betweenRoulis : left and right Linear/Nonlinear „ Tangage : Γ3 The X4 example forces: „ Lacet : Linear Γr = l(F4 − F2) Γ4 approaches Antiwindup Pitch movement generated with a Linearization dissymmetry between front and rear Gain scheduling Γ2 Stability forces: Γ Nonlinear Γp = l(F1 − F3) 1 approaches Yaw movement generated with a CLF Sliding mode dissymmetry between front/rear and Geometric control left/right torques: Recursive techniques Γy = Γ1 + Γ3 − Γ2 − Γ4 X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 23 / 174 The X4 helicopter Building a model (1/3) Nonlinear nd Control Electrical motor: A 2 order system with friction and saturation rst N. Marchand usually approximated by a1 order system:

2 References km 1 km s = − s − τ + ¯ (U ) i {1, 2, 3, 4} (1) ˙i i load satUi i Outline Jr R Jr Jr R ∈ Introduction Linear/Nonlinear si : rotation speed The X4 example Ui : voltage applied to the motor; real control Linear τload: motor load: τload = kgearbox κ si si with κ drag coefficient approaches | | Antiwindup Aerodynamical forces and torques: Very complex models exist Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 24 / 174 The X4 helicopter Building a model (1/3) Nonlinear nd Control Electrical motor: A 2 order system with friction and saturation rst N. Marchand usually approximated by a1 order system:

2 References km 1 km s = − s − τ + ¯ (U ) i {1, 2, 3, 4} (1) ˙i i load satUi i Outline Jr R Jr Jr R ∈ Introduction Linear/Nonlinear si : rotation speed The X4 example Ui : voltage applied to the motor; real control variable Linear τload: motor load: τload = kgearbox κ si si with κ drag coefficient approaches | | Antiwindup Aerodynamical forces and torques: Very complex models exist Linearization Gain scheduling but overcomplicated for control, better use the simplified model: Stability 2 Nonlinear Fi = bsi approaches 2 2 Γr = lb(s4 − s2 ) CLF 2 2 i {1, 2, 3, 4} (2) Sliding mode Γp = lb(s1 − s3 ) ∈ Geometric 2 2 2 2 control Γy = κ(s1 + s3 − s2 − s4 ) Recursive techniques X4 stabilization b: thrust coefficient, κ: drag coefficient Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 24 / 174 The X4 helicopter Building a model (2/3)

Nonlinear Control ~t3 N. Marchand Two frames

a fixed frame E(~e1,~e2,~e3) References ~t2 a frame attached to the X4 Outline T (~t1,~t2,~t3) Introduction Frame change Linear/Nonlinear ~t1 The X4 example a rotation matrix R from T to E ~e3 Linear State variables: approaches e Antiwindup Cartesian coordinates (in E) ~2 Linearization Gain scheduling position ~p ~e1 Stability velocity ~v

Nonlinear Attitude coordinates: approaches angular velocity ω~ in the moving frame T CLF either: Euler angles three successive rotations about ~t3, ~t1 and Sliding mode Geometric ~t3 of angles angles φ, θ and ψ giving R control Recursive or: Quaternion representation (q0,~q) = (cos β/2,~u sin β/2) techniques represent a rotation of angle β about ~u X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 25 / 174 The X4 helicopter Building a model (3/3)

Nonlinear Control Cartesian coordinates:

N. Marchand ~p˙ = ~v (3) ˙ ~ References  m~v = −mg~e3 + R( i Fi (si )t3) Outline Attitude: P Introduction Euler angles formalism: Linear/Nonlinear The X4 example 0 −ω ω R˙ = Rω~ × 3 2 Linear with ω~ × = ω3 0 −ω1 (4) Jω~˙ = −ω~ Jω~ + Γ   approaches × tot −ω2 ω1 0 Antiwindup   Linearization ω~ × is the skew symmetric associated to ω~ Gain scheduling Quaternion formalism: Stability ˙ 1 0 −ω~ T ~q = 2 Ω(ω~ )q Ω(ω~ ) = Nonlinear 1 ω~ −ω~ × = Ξ(q)ω~ with    (5) approaches 2 −~qT  ˙  Ξ(q) = CLF Jω~ = −ω~ ×Jω~ + Γtot  I3 3q0 + ~q×   ×  Sliding mode  Geometric   control Γr (s2, s4) Recursive × techniques where Γtot = − Ir ω~ ~t3si +Γpert + Γp(s1, s3)   X4 stabilization i Γ (s , s , s , s ) X y 1 2 3 4 Observers gyroscopic torque  

N. Marchand (gipsa-lab) | {z Nonlinear} Control Master PSPI 2009-2010 26 / 174 The X4 helicopter Review of the nonlinearities

Nonlinear Control 2 k kgearbox κ k N. Marchand s˙ = − m s − s s + m sat ¯ (U ) i Jr R i Jr i i Jr R Ui i ˙ | | References  ~p = ~v Outline  0  ˙ Introduction  m~v = −mg~e3 + R 0 Linear/Nonlinear    The X4 example  i Fi (si )  Linear  R˙ = Rω~ ×   approaches P Antiwindup 0 Γr (s2, s4) Linearization  Gain scheduling  ˙ × ×  Jω~ = −ω~ Jω~ − i Ir ω~ 0 + Γp(s1, s3) Stability       i si Γy (s1, s2, s3, s4) Nonlinear  P approaches       CLF In red: the nonlinearities P Sliding mode Geometric In blue: where the control variables act control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 27 / 174 l length of an arm of the helicopter, easy to measure m total of the helicopter, easy to measure J body inertia, hard to have precisely Ir rotor inertia, hard to have precisely

depends upon temperature, distance from ground, etc.

Mechanical parameters:

The X4 helicopter Identification of the parameters

Nonlinear Electrical motor : Autonomous Systems Control Laboratory For small input steps, the system behaves very close to a linear N. Marchand CoaX Winter 2004-2005 first order system Lorsqu’on bouge l’axe, l’hélice répond à la perturbation d’une manière similaire aux hélices References Hence, use linear identification tools Proxflyer ce qui¯ nous promet de bons résultats sur le CoaX. Malheureusement nous n’avons pas Outline pu tester le comportementUi is found du système on the avec data-sheet les deux hélices of sur the le syst motorème contrarotatif (damage n’ayant avoidance) pas deux hélices à disposition avant le montage final. Introduction Aerodynamical parameters: b and κ Linear/Nonlinear b and κ measured with specific test beds, The X4 example 5.5.2 Mécanisme de contra rotation avec hélices blanches

Linear Nous avons fait tourner le module muni d’hélices blanches approaches sur une balance pour avoir quelques chiffres quant à la Antiwindup qualité du système. Les hélices blanches ne sont pas les plus Linearization optimisée pour notre application, mais elle donne déjà des Gain scheduling informations utiles pour la suite du projet. Les résultats sont Stability représentés dans un tableau et des graphiques plus loin.

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Figure 35 : Ban de test utilisé Figure 36 : Hélices blanches Observers Pour tester les hélices ou les moteurs, nous utilisons, en temps normal, un ban de test N. Marchand (gipsa-labspécialement) conçu à cet effet. La forceNonlinear de poussée Control est transmise à la balance viaMaster un levier PSPI (voir 2009-2010 28 / 174 les tests des propulseurs latéraux). La valeur de la poussée est alors déduite à l’aide d’une constante. Cela est difficilement réalisable avec le système contrarotatif, mais comme le lacet résultant est faible et que les hélices sont montées à l’envers, seule une petite fixation à la balance suffit pour avoir des résultats satisfaisants.

Pour les tests, nous avons utilisé un moteur CC Faulhaber 1724 [10] avec une réduction de 1:4. Les hélices sont placées à l’envers sur les axes, de façon à appliquer une poussée verticale vers le bas. On évite ainsi les effets dus à la réflexion du flux d’air produit par les hélices sur le sol.

25 The X4 helicopter Identification of the parameters Nonlinear Electrical motor: Control For small input steps, the system behaves very close to a linear N. Marchand first order system References Hence, use linear identification tools ¯ Outline Ui is found on the data-sheet of the motor (damage avoidance)

Introduction Aerodynamical parameters: b and κ Linear/Nonlinear b and κ measured with specific test beds, depends upon temperature, The X4 example distance from ground, etc. Linear approaches Mechanical parameters: Antiwindup l length of an arm of the helicopter, easy to measure Linearization Gain scheduling m total mass of the helicopter, easy to measure Stability J body inertia, hard to have precisely

Nonlinear Ir rotor inertia, hard to have precisely approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 28 / 174 The X4 helicopter Values of the parameters

Nonlinear Control Motor parameters:

N. Marchand parameter description value unit −3 km motor constant 4.3 10 N.m/A × −5 2 References Jr rotor inertia 3.4 10 J.g.m R motor resistance 0.67× Ω Outline −3 kgearbox gearbox ratio 2.7 10 - × Introduction U¯i maximal voltage 12 V Linear/Nonlinear The X4 example Aerodynamical parameters: Linear approaches parameter description value −6 Antiwindup b thrust coefficient 3.8 10 × Linearization κ drag coefficient 2.9 10−5 Gain scheduling × Stability Body parameters:

Nonlinear parameter description value unit approaches 14.6 10−3 0 0 CLF × −3 2 Sliding mode J inertia matrix 0 7.8 10 0 kg.m  × −3 Geometric 0 0 7.8 10 × control m mass of the UAV  0.458  kg Recursive techniques l radius of the UAV 22.5 cm X4 stabilization g 9.81 m/s2 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 29 / 174 The X4 helicopter Open-loop behavior with roll initial speed

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 30 / 174 The X4 helicopter Open-loop behavior with pitch initial speed

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 31 / 174 The X4 helicopter Open-loop behavior with yaw initial speed

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 32 / 174 The X4 helicopter Open-loop behavior with roll and yaw initial speed

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 33 / 174 The X4 helicopter Open-loop behavior with pitch and yaw initial speed

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 34 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 35 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 36 / 174 Linear systems with saturated inputs Impact of input saturations on the control of the X4’s rotors (1/4)

Nonlinear Control

N. Marchand We go back to the X4 example and focus on the rotors:

References 2 km 1 km s = − s − τ + ¯ (U ) Outline ˙i i load satUi i Jr R Jr Jr R Introduction Linear/Nonlinear d The X4 example If one wants to act on the X4 with desired forces Fi , it Linear d approaches is necessary to be able to set the rotors speeds si to si Antiwindup with Linearization Gain scheduling Stability 1 sd = F d Nonlinear i b i approaches r CLF Sliding mode A usual way to control the electrical motor consist in Geometric control Recursive taking τload as un unknown load techniques ¯ X4 stabilization neglecting the voltage limitations Ui Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 37 / 174 Linear systems with saturated inputs Impact of input saturations on the control of the X4’s rotors (2/4)

Nonlinear Control The so obtained system is linear N. Marchand s (s) 1 G References i = km = Outline Jr R Ui (s) 1 + 2 s 1 + τs km Introduction Linear/Nonlinear The X4 example Define a PI controller for it: Linear approaches Ki Antiwindup C(s) = Kp + Linearization s Gain scheduling Stability 1 Taking Ki = and Kp = τKi , the closed loop system Nonlinear τCLG approaches is: CLF Sliding mode Geometric si (s) 1 control = Recursive techniques Ui (s) 1 + τCLs X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 38 / 174 Linear systems with saturated inputs Impact of input saturations on the control of the X4’s rotors (3/4)

Nonlinear Control Make a step that compensates the weight, that is such

N. Marchand d mg d that si = 4b so that i Fi = mg References Taking τCLq= 50 ms, oneP gets with saturations Outline 600 Introduction Linear/Nonlinear The X4 example 400 Linear approaches si 200 Antiwindup Linearization 0 Gain scheduling 0 1 2 3 4 5 Stability 80

Nonlinear 60 approaches 40 CLF Sliding mode Ui 20 Geometric control 0 Recursive −20 techniques 0 1 2 3 4 5 X4 stabilization time Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 39 / 174 Linear systems with saturated inputs Saturation may cause instability Nonlinear The result could be worse: Control

N. Marchand 7s+5 1 s s-1 Pulse Control Saturation Transfer Fcn References Generator

Outline

Introduction For u [−1.2, 1.2], the closed-loop behavior is: Linear/Nonlinear ∈ 4 The X4 example 3.5

Linear 3 approaches 2.5 with saturation Antiwindup 2 Linearization Gain scheduling 1.5 without saturation 1 Stability 0.5 Nonlinear 0 approaches −0.5

CLF −1 0 1 2 3 4 5 Sliding mode Geometric control Recursive Saturations may lead to instability especially in the techniques X4 stabilization presence of integrators in the loop Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 40 / 174 Linear systems with saturated inputs Key idea of the anti-windup scheme 6. Linear systems with a nonlinearity Nonlinear Control N. Marchand Consider a linear system with a PID controller:

References

Outline PID controller Linear system

Introduction Linear/Nonlinear The X4 example Linear K s approaches d Antiwindup

Linearization Kp Gain scheduling Stability KI 1/s Nonlinear approaches CLF The instability comes from the integration of the error Sliding mode Geometric control Key idea: soften the effect when the control is Recursive techniques saturated X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 41 / 174 Linear systems with saturated inputs 6. Linear systems with a nonlinearity PID controller with anti-windup

Nonlinear Control Structure of the PID controller with anti-windup:

N. Marchand

Anti Windup Linear system References PID controller

Outline

Introduction Linear/Nonlinear K s The X4 example d Linear K approaches p Antiwindup Linearization KI 1/s Gain scheduling

Stability Ks

Nonlinear approaches If u = u¯, that is if u is not saturated, then the PID CLF Sliding mode controller with anti-windup is identical to the classical Geometric control PID controller Recursive techniques If u is saturated (u = u¯), Ks tunes the reduction of the X4 stabilization integral effect of the6 PID Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 42 / 174 Linear systems with saturated inputs General controller with anti-windup

Nonlinear Control N. Marchand Structure of the general dynamic controller: References Outline D Introduction Linear/Nonlinear The X4 example F Linear approaches + + 1 + + ue Antiwindup GC Linearization s Gain scheduling Stability with dynamics given by: Nonlinear approaches CLF x˙c = Fxc + Ge Sliding mode Geometric u = Cxc + De control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 43 / 174 Linear systems with saturated inputs General controller with anti-windup

Nonlinear Control Anti-windup structure of the general dynamic controller: N. Marchand D References F − KC Outline + ue Introduction + + + G − KD 1 C Linear/Nonlinear + s The X4 example Linear approaches K Antiwindup Linearization Gain scheduling with dynamics given by: Stability

Nonlinear x˙c = Fxc + Ge + K(u − Cxc − De) approaches = (F − KC)xc + (G − KD)e + Ku CLF Sliding mode Geometric control Choice of the antiwindup parameters Recursive techniques Take K such that (F − KC) is stable and λmax(F − KC) > λmax(F ) X4 stabilization | | | | Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 44 / 174 Linear systems with saturated inputs A short Lyapunov explanation of the behavior

Nonlinear Control Consider a stable closed loop linear system: it is N. Marchand globally asymptotically stable. A saturation on the input may: References

Outline transform the global stability into local stability. In this case, the aim of the anti-windup is to increase the radius Introduction Linear/Nonlinear of attraction of the closed loop system The X4 example keep the global stability property. In this case, the aim Linear approaches of the anti-windup is to renders the saturated system Antiwindup closer to its unsaturated equivalent Linearization Gain scheduling However, there is no formal proof of stability of Stability anti-windup strategies Nonlinear approaches CLF Other approaches for saturated inputs Sliding mode Geometric control Optimal control Recursive techniques X4 stabilization Nested saturation function (under development) Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 45 / 174 Linear systems with saturated inputs Back to the unstable case Nonlinear The unstable case: Control

N. Marchand 7s+5 1 s s-1 Pulse Control Saturation Transfer Fcn References Generator

Outline

Introduction The closed-loop behavior is: Linear/Nonlinear 4 The X4 example 3.5

Linear 3 approaches 2.5 with saturation Antiwindup 2 Linearization Gain scheduling without saturation1.5 with saturation and anti-windup 1 Stability 0.5 Nonlinear 0 approaches −0.5

CLF −1 0 1 2 3 4 5 Sliding mode Geometric control Recursive However, nothing is magic and divergent behavior may occur techniques X4 stabilization because of the level of the step input Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 46 / 174 Linear systems with saturated inputs Impact of input saturations on the control of the X4’s rotors (4/4)

Nonlinear Control Make a step that compensates the weight, that is such

N. Marchand d mg d that si = 4b so that i Fi = mg References Taking τCLq= 50 ms, oneP gets with anti-windup Outline 600 Introduction Linear/Nonlinear The X4 example 400 Linear approaches si 200 Antiwindup Linearization 0 Gain scheduling 0 1 2 3 4 5 Stability 80

Nonlinear 60 approaches 40 CLF Sliding mode Ui 20 Geometric control 0 Recursive −20 techniques 0 1 2 3 4 5 X4 stabilization time Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 47 / 174 1 Introduction Linear versus nonlinear Nonlinear The X4 example Control N. Marchand 2 Linear control methods for nonlinear systems

References Antiwindup Outline Linearization Introduction Gain scheduling Linear/Nonlinear The X4 example 3 Stability Linear approaches Antiwindup 4 Nonlinear control methods Linearization Gain scheduling Control Lyapunov functions Stability Sliding mode control Nonlinear approaches State and output linearization CLF Sliding mode Backstepping and feedforwarding Geometric control Stabilization of the X4 at a position Recursive techniques X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 48 / 174 Linearization of nonlinear systems Impact of the load on the control of the X4’s rotors

Nonlinear d mg Control Make a step that compensates the weight, that is such that si = 4b so d N. Marchand that i Fi = mg q Taking τCL = 50 ms, one gets with load References P 600 Outline

Introduction 400 Linear/Nonlinear The X4 example si 200 Linear approaches 0 0 1 2 3 4 5 Antiwindup Linearization Gain scheduling 20

Stability 10

Nonlinear 0 approaches Ui CLF −10 Sliding mode Geometric −20 control 0 1 2 3 4 5 Recursive techniques time X4 stabilization The PI controller seems badly tuned: for t > 1.3 s, the control is not saturated Observers but the convergence is very slow. What’s wrong ?

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 49 / 174 Linearization of nonlinear systems Impact of the load on the control of the X4’s rotors

Nonlinear Control

N. Marchand Back to the rotor dynamical equation:

References 2 km kgearbox κ km Outline s = − s − s s + ¯ (U ) ˙i i i i satUi i Jr R Jr | | Jr R Introduction Linear/Nonlinear The X4 example Taking τload as unknown implies that the PI control law Linear was tuned for: approaches Antiwindup Linearization 2 km km Gain scheduling s = − s + ¯ (U ) ˙i i satUi i Stability Jr R Jr R Nonlinear approaches Implicitly, the second order terms were neglected CLF Sliding mode Unfortunately, these two systems behave similarly iff s is Geometric i control d mg −1 Recursive small, which is not the case for s = 544 rad s techniques i 4b ≈ X4 stabilization q Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 50 / 174 Linearization of nonlinear systems Linearization at the origin

Nonlinear Control Linearization at the origin N. Marchand Take a nonlinear system

References x˙ = f (x, u) Outline y = h(x, u) Introduction Linear/Nonlinear The X4 example with f (0, 0) = 0. Then, near the origin, it can be approximated by its Linear linear Taylor expansion at the first order: approaches Antiwindup ∂f ∂f Linearization x˙ = x + u Gain scheduling ∂x ∂u (x=0,u=0) (x=0,u=0) Stability   A B Nonlinear  approaches  ∂h ∂h  y − h(0, 0) = x + u CLF  |∂x {z } |∂u {z } Sliding mode (x=0,u=0) (x=0,u=0) Geometric control  C D Recursive  techniques  X4 stabilization  | {z } | {z } Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 51 / 174 Linearization of nonlinear systems Linearization at a point Nonlinear Linearization at a point Control

N. Marchand Take a nonlinear system

References x˙ = f (x, u) Outline y = h(x, u)

Introduction Linear/Nonlinear then, near the equilibrium point (x0, u0), it can be approximated by its The X4 example linear Taylor expansion at the first order: Linear approaches Antiwindup ∂f ∂f x˙ = (x − x0) + (u − u0) Linearization ∂x ∂u Gain scheduling ˙ (x0,u0) (x0,u0)  x˜ x˜ u˜ Stability  A B  |{z} Nonlinear  ∂h | {z } ∂h | {z }  y − h(x0, u0) = (x − x0) + (u − u0) approaches  |∂x {z } |∂u {z } (x0,u0) (x0,u0) CLF x˜ u˜ Sliding mode  Geometric  C D control  | {z } | {z } Recursive  techniques which is linear in the variables| x˜{z= x }− x0 and u˜ =| u {z− u0} X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 52 / 174 Linearization of nonlinear systems Some properties of the linearization Nonlinear Controllability properties Control

N. Marchand Take a nonlinear system x˙ = f (x, u) (6) References and its linearization at (x , u ): Outline 0 0 Introduction x˙ = Ax + Bu (7) Linear/Nonlinear ˜ ˜ ˜ The X4 example Linear approaches Antiwindup If (7) is controllable then (6) is locally controllable Linearization Nothing can be concluded if (7) is uncontrollable Gain scheduling Stability

Nonlinear Example approaches CLF The car is controllable but not its linearization Sliding mode Geometric = control x˙1 u1 x˙1 1 0 Recursive x˙2 = u2 x˙2 = 0 1 u1 u2 techniques linearization at the origin     X4 stabilization x˙ = x u x˙ 0 0 3 2 1 ⇒ 3  Observers    

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 53 / 174 Linearization of nonlinear systems Some properties of the linearization

Nonlinear Control Stability properties N. Marchand Take a nonlinear system

References x˙ = f (x, u) (8) Outline

Introduction Linear/Nonlinear and its linearization at (x0, u0): The X4 example Linear x˜˙ = Ax˜ + Bu˜ (9) approaches Antiwindup Linearization Gain scheduling Assume that one can build a law u˜ = k(x˜) so that: Stability (9) is asymptotically stable (< < 0): then (8) is locally Nonlinear asymptotically stable with u = u + k(x˜) approaches 0 CLF (9) is unstable (< > 0): then (8) is locally unstable with Sliding mode Geometric u = u0 + k(x˜) control Recursive Nothing can be concluded if (9) is simply stable (< 0) techniques X4 stabilization ≤ Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 54 / 174 Linearization of nonlinear systems Impact of the load on the control of the X4’s rotors Nonlinear Back to the rotor dynamical equation: Control 2 N. Marchand km kgearbox κ km s = − s − s s + ¯ (U ) ˙i i i i satUi i Jr R Jr | | Jr R References

Outline d Define Ui , the constant control that keeps the steady state speed: Introduction Linear/Nonlinear d d Rkgearbox κ d d The X4 example Ui = kmsi + si si km Linear approaches The linearization of the rotor dynamics near sd gives: Antiwindup i Linearization 2 Gain scheduling km 2kgearbox κ d km s˙ = − + s s + ˜ ¯ (U˜ ) ˜i i ˜i satUi i Stability Jr R Jr Jr R   Nonlinear approaches with: ˜ d CLF Ui = Ui − Ui Sliding mode d Geometric ˜si = si − si control ˜ ¯ ¯ Recursive Ui if Ui [−Ui , +Ui ] techniques ∈ sat˜ ¯ (U˜i ) = U¯i if Ui U¯i X4 stabilization Ui  ≥ −U¯i if Ui −U¯i Observers  ≤  N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 55 / 174 Linearization of nonlinear systems Impact of the load on the control of the X4’s rotors Nonlinear Make a step that compensates the weight, that is such that Control d mg d N. Marchand si = 4b so that i Fi = mg d TakingqτCL = 50 msPand a PI controller tuned at si on the system References with load, one has: Outline 600 Introduction Linear/Nonlinear The X4 example 400 Linear s approaches i 200 Antiwindup Linearization 0 0 1 2 3 4 5 Gain scheduling

Stability 20

Nonlinear 10 approaches CLF 0 Sliding mode Ui Geometric −10 control Recursive −20 techniques 0 1 2 3 4 5 X4 stabilization time Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 56 / 174 1 Introduction Linear versus nonlinear Nonlinear The X4 example Control N. Marchand 2 Linear control methods for nonlinear systems

References Antiwindup Outline Linearization Introduction Gain scheduling Linear/Nonlinear The X4 example 3 Stability Linear approaches Antiwindup 4 Nonlinear control methods Linearization Gain scheduling Control Lyapunov functions Stability Sliding mode control Nonlinear approaches State and output linearization CLF Sliding mode Backstepping and feedforwarding Geometric control Stabilization of the X4 at a position Recursive techniques X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 57 / 174 Towards gain scheduling Impact of a change in the steady state speed of the X4’s rotors

Nonlinear d Control Take again τCL = 50 ms and a PI controller tuned at si Make speed steps of different level N. Marchand

600 References 400 Outline 200 Introduction si Linear/Nonlinear 0 The X4 example −200 Linear 0 2 4 6 8 10 approaches Antiwindup 20 Linearization Gain scheduling 10

Stability 0 Ui Nonlinear −10 approaches CLF −20 Sliding mode 0 2 4 6 8 10 Geometric control time Recursive d techniques The controller is well tuned near si but not very good a large X4 stabilization range of use Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 58 / 174 Towards gain scheduling Local linearization may be inadequate for large excursion

Nonlinear Control The result could be worse: N. Marchand Take the inverted

References

Outline θ¨ 1 m + M −ml cos θ mgl sin θ = Introduction y¨ ∆(θ) −ml cos θ I + ml2 u + mlθ˙ 2 sin θ − ky˙       Linear/Nonlinear The X4 example where Linear approaches I is the inertia of the pendulum Antiwindup ∆(θ) = (I + ml 2)(m + M) − m2l 2 cos2 θ Linearization Gain scheduling Stability Linearize it near the upper position (θ = 0) with m = M = I = g = 1, Nonlinear approaches k = 0 and x = (θ, θ,˙ y, y˙ ): CLF Sliding mode Geometric x˙1 0 1 0 0 x1 0 control 2 1 Recursive x˙2 3 0 0 0 x2 − 3 techniques   =     +   u X4 stabilization x˙3 0 0 0 1 x3 0 1 2 Observers x˙  − 0 0 0 x     4  3   4  3          N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 59 / 174 Towards gain scheduling Local linearization may be inadequate for large excursion

Nonlinear Build a linear feedback law that places the poles at -1 Control Starting from θ(0) = π/5, it converges, from θ(0) = 1.1 π/5, it diverges N. Marchand × 15 15 References Inverted pendulum Linearization of the Outline inverted pendulum Introduction Initial condition: Linear/Nonlinear x(0) = (π/5, 0, 0, 0) The X4 example 10 10 x(0) = (1.1π/5, 0, 0, 0) Linear approaches x x Antiwindup k k k k Linearization Gain scheduling Stability 5 5 Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques 0 0 X4 stabilization 0 5 10 15 0 5 10 15 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 60 / 174 Towards gain scheduling For some systems, the radius of attraction of a Nonlinear Control stabilized linearization may be very small (less than one N. Marchand degree on the double inverted pendulum for instance)

References ¼ Linearization is not suitable for large range of use of Outline the closed-loop system Introduction Linear/Nonlinear For other systems, the controller must be very finely The X4 example tuned in order to meet performance requirements (e.g. Linear approaches automotive with more and more restrictive pollution Antiwindup Linearization standards) Gain scheduling ¼ Stability Linearization is not suitable for high accuracy closed

Nonlinear loop systems approaches CLF Either for stability reasons or performance reasons, it Sliding mode Geometric may be necessary to tune the controller at more than control Recursive one operating point techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 61 / 174 Towards gain scheduling Gain scheduling uses the idea of using a collection of Nonlinear Control linearization of a nonlinear system at different N. Marchand operating points

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 62 / 174 Gain scheduling Take a nonlinear system Nonlinear Control x˙ = f (x, u) N. Marchand

References Define a family of equilibrium points Outline

Introduction s = (xeq, ueq) such that f (xeq, ueq) = 0 Linear/Nonlinear The X4 example At each point s, linearize the system assuming s is Linear approaches constant: Antiwindup Linearization Gain scheduling x˜˙ = A(s)x˜ + B(s)u˜ Stability with x˜ = x − xeq and u˜ = u − ueq Nonlinear approaches CLF At each point s, define a feedback law: Sliding mode Geometric control Recursive u = ueq(s) − K(s)(x − xeq(s)) techniques X4 stabilization with <(Eig(A(s) − B(s)K(s))) < 0 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 63 / 174 Gain scheduling The controller is then obtained by changing s in the a Nonlinear Control priori defined collection of points

N. Marchand The change of s can be done discontinuously or continuously by interpolation References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 64 / 174 Gain scheduling Drawbacks of gain scheduling : Nonlinear Control  Convergence only if s varies slowly  The performance within a linearization area may be poor N. Marchand  The mapping may be prohibitive if the number of states is References large Outline  The stability issues are not clear

Introduction Recent of gain scheduling: Linear/Nonlinear The X4 example Dynamic gain scheduling: improve the transition between Linear the different controllers, limits the importance of the slow approaches motion of s Antiwindup Linearization LPV: Linear parameter varying methods considers the Gain scheduling nonlinear system as Stability

Nonlinear x˙ = A(ρ(x))x + B(ρ(x))u approaches CLF Sliding mode and, under some conditions, uses LMI to build a feedback. Geometric control Improves the performance within a linearization area. Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 65 / 174 Gain scheduling Handling changes in the steady state speed of the X4’s rotors

Nonlinear Take again τCL = 50 ms and a PI controller tuned at si Control Make speed steps of different level N. Marchand

600 References 400 Outline 200 Introduction si Linear/Nonlinear 0 The X4 example −200 Linear 0 2 4 6 8 10 approaches Antiwindup 20 Linearization Gain scheduling 10

Stability 0 Ui Nonlinear −10 approaches CLF −20 0 2 4 6 8 10 Sliding mode Geometric time control Recursive The rotors are now well controlled techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 66 / 174 Stability 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 67 / 174 Stability Consider the autonomous nonlinear system: Nonlinear Control x˙ = f (x, u(x)) = g(x) (10) N. Marchand Stability References

Outline System (10) is said to be stable at the origin iff: Introduction R > 0, r(R) > 0 such that x0 (r(R)), x(t; x0), solution Linear/Nonlinear ∀ ∃ ∀ ∈ B The X4 example of (10) with x0 as initial condition, remains in (R) for all B Linear t > 0. approaches Antiwindup Linearization Gain scheduling Attractivity Stability The origin is said to be attractive iff: Nonlinear approaches limt x(t; x0) = 0. CLF Sliding mode Geometric →∞ control Asymptotic stability Recursive techniques X4 stabilization System (10) is said to be asymptotically stable at the origin Observers iff it is stable and attractive

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 68 / 174 Stability Graphical interpretation

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF For linear systems: Attractivity Stability Sliding mode Geometric A For nonlinear systems: Attractivity Stability control 9 Recursive techniques Stability and attractivity : properties→ hard to check ? X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 69 / 174 Stability Using the linearization

Nonlinear Control

N. Marchand Asymptotic stability and local linearizaton References Consider x˙ = g(x) and its linearization at the origin Outline ∂g Introduction x˙ = ∂x x. Then: Linear/Nonlinear x=0 The X4 example Linearization with eig< 0  Nonlinear system is locally Linear approaches asymptotically stable Antiwindup Linearization Linearization with eig> 0  Nonlinear system is locally Gain scheduling unstable Stability Nonlinear Linearization with eig= 0: nothing can be concluded on approaches CLF the nonlinear system (may be stable or unstable) Sliding mode Geometric control Recursive Only local conclusions techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 70 / 174 Stability Lyapunov theory: Lyapunov functions

Nonlinear Control

N. Marchand Aleksandr Mikhailovich Lyapunov References Markov’s school friend, Chebyshev’s student Master Thesis : On the stability of ellipsoidal forms of equilibrium of a rotating liquid in 1884 Outline Phd Thesis : The general problem of the stability of motion in 1892 Introduction 6 June 1857 - 3 Nov 1918 Linear/Nonlinear The X4 example Linear approaches Antiwindup Definition: Linearization n Gain scheduling Let V : R R be a such that: Stability 1 (definite) V (x) = 0 x = 0 Nonlinear approaches 2 → CLF (positive) x, V (x) 0 Sliding mode ∀ ≥ Geometric 3 (radially unbounded)⇔ lim V (x) = + control kxk Recursive techniques X4 stabilization Lyapunov functions are energies→∞ ∞ Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 71 / 174 Aleksandr Mikhailovich Lyapunov Markov’s school friend, Chebyshev’s student Master Thesis : On the stability of ellipsoidal forms of equilibrium of a rotating liquid in 1884 Phd Thesis : TheStability general problem of the stability of motion in 1892 Lyapunov6 theory: June Lyapunov1857 - 3 Nov theorem 1918

Nonlinear Control Aleksandr Mikhailovich Lyapunov N. Marchand Markov’s school friend, Chebyshev’s student Master Thesis : On the stability of ellipsoidal forms of equilibrium of a rotating liquid in 1884 References Phd Thesis : The general problem of the stability of motion in 1892 Outline 6 June 1857 - 3 Nov 1918 Introduction Linear/Nonlinear The X4 example Linear Theorem: (First) Lyapunov theorem approaches n + Antiwindup If a Lyapunov function V : R R s.t. Linearization ∃ Gain scheduling (strictly decreasing) V (x(t)) is strictly decreasing for all Stability x(0) = 0 → Nonlinear approaches 6 CLF then the origin is asymptotically stable. Sliding mode Geometric n + control If a Lyapunov function V : R R s.t. Recursive ∃ techniques (decreasing) V (x(t)) is decreasing X4 stabilization Observers then the origin is stable. →

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 72 / 174 Stability Lyapunov theorem: a graphical interpretation

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 73 / 174 Stability Stability and robustness

Nonlinear Control

N. Marchand

References Outline Stability holds robustness: Introduction Linear/Nonlinear ∂V The X4 example x˙ = g(x) stable V˙ = g(x) < 0 Linear ∂x approaches Antiwindup ∂V Linearization ⇒ (g(x) + ε(x)) < 0 Gain scheduling ∂x Stability x˙ = g(x) + ε(x) stable Nonlinear ⇒ approaches CLF Sliding mode ⇒ Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 74 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 75 / 174 The X4 helicopter The control problems

Nonlinear Control

N. Marchand

References 2 k kgearbox κ k s˙ =− m s − s s + m sat ¯ (U ) Outline i Jr R i Jr i i Jr R Ui i ˙ | | Position control problem Introduction  ~p = ~v Linear/Nonlinear  0 The X4 example   m~v˙ = −mg~e3 + R 0 Linear    approaches  F (s )  i i i Antiwindup  ˙ × Linearization  R = Rω~  Attitude control problem Gain scheduling P 0 Γr (s2, s4) Stability  ˙ × ×  Jω~ = −ω~ Jω~ − i Ir ω~ 0 + Γp(s1, s3) Nonlinear      approaches  si Γy (s1, s2, s3, s4)  P i CLF      Sliding mode  Geometric  P control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 76 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 77 / 174 Control Lyapunov functions Characterizing property (1/3)

Nonlinear Control Control Lyapunov functions (CLF) where introduced in the 80’s

N. Marchand CLF are for controllability and control what Lyapunov functions are for stability References Lyapunov: a tool for stability analysis of autonomous Outline systems Introduction Take Linear/Nonlinear The X4 example x˙1 = x2 Linear approaches x˙2 = −x1 − x2 Antiwindup Linearization Gain scheduling Take the Lyapunov function Stability 3 2 2 Nonlinear V (x) = x1 + x1x2 + x2 approaches 2 CLF Sliding mode Along the trajectories of the system: Geometric control 2 Recursive V˙ (x(t)) = V (x).f (x) = − x techniques ∇ k k X4 stabilization Observers hence, V Ä 0 and the system is asymptotically stable

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 78 / 174 Control Lyapunov functions Characterizing property (2/3)

Nonlinear Control Control Lyapunov Functions: a tool for stabilization of N. Marchand controlled systems

References Take now the controlled system

Outline x˙1 = x2 Introduction Linear/Nonlinear x˙2 = −x1 + u The X4 example Linear approaches Take the Lyapunov function Antiwindup Linearization 3 Gain scheduling 2 2 V (x) = x1 + x1x2 + x2 Stability 2 Nonlinear Along the trajectories of the system: approaches CLF Sliding mode V˙ (x(t), u(t)) = V (x).f (x, u) Geometric control ∇ 2 2 Recursive = −x + x1x2 + x + (x1 + 2x2)u techniques 1 2 X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 79 / 174 Control Lyapunov functions Characterizing property (3/3)

Nonlinear Control Control Lyapunov Functions: a tool for stabilization of N. Marchand controlled systems Along the trajectories of the system: References Outline V˙ (x(t), u(t)) = V (x).f (x, u) Introduction ∇ 2 2 Linear/Nonlinear = −x1 + x1x2 + x2 + (x1 + 2x2)u The X4 example Linear hence approaches Antiwindup if x1 + 2x2 6= 0, there exists u such that V Ä Linearization Gain scheduling otherwise (if x1 + 2x2 = 0) Stability ˙ 2 2 2 2 V (x(t), u(t)) = −4x2 − 2x2 + x2 = −5x2 Nonlinear approaches 1 Ä CLF which is negative unless x2 = 0 = − 2 x1: V Sliding mode Geometric control Recursive In conclusion: characterizing property of CLF techniques X4 stabilization For any x = 0, there exists u such that V˙ (x(t), u(t)) < 0 Observers 6

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 80 / 174 Control Lyapunov functions Formal definitions

Nonlinear Control Definition: Lyapunov function n N. Marchand A continuous function V : R R≥0 is called a Lyapunov

References function if

Outline 1 [positive definiteness] V (x→) 0 for all x and V (0) = 0 if and ≥ Introduction only if x = 0 Linear/Nonlinear 2 The X4 example [radially unbounded] limx V (x) = + Linear or: approaches →∞ Antiwindup 1 [positive definiteness] V (x) 0 for all x∞and V (0) = 0 if and Linearization ≥ Gain scheduling only if x = 0 Stability 2 [proper] for each a 0, the set {x|V (x) a} is compact Nonlinear ≥ ≤ approaches or, alternatively: CLF Sliding mode Geometric n control ( α, α ) α( x ) V (x) α( x ) x R Recursive ∃ ∈ K k k ≤ ≤ k k ∀ ∈ techniques X4 stabilization ∞ Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 81 / 174 Control Lyapunov functions Formal definitions

Nonlinear Control Definition: Control Lyapunov Function N. Marchand A differentiable control Lyapunov function denotes a References differentiable Lyapunov function being infinitesimally Outline

Introduction decreasing, meaning that there exists a positive continuous n Linear/Nonlinear definite function W : and such that: The X4 example R R≥0 Linear approaches sup min V (x)f (x, u) + W (x) 0 m Antiwindup x∈ n u∈R ∇→ ≤ Linearization R Gain scheduling Stability Roughly speaking a CLF is a Lyapunov function that one Nonlinear approaches can force to decrease CLF Sliding mode Geometric Extensions to nonsmooth CLF exist and are necessary for control Recursive the class of system that can not be stabilized by means of techniques X4 stabilization smooth static feedback Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 82 / 174 Control Lyapunov functions Control affine systems Nonlinear Definition: Directional Lie Control For any f and g with values in appropriate sets, the Lie derivative of g along f is N. Marchand defined by: Lf g(x) := g(x) f (x) References ∇ · Outline Iteratively, one defines: Lk g(x) := L Lk−1g(x) Introduction f f f Linear/Nonlinear The X4 example Theorem Linear m approaches Consider a control affine system x˙ = g0(x) + i=1 ui gi (x) with f smooth and Antiwindup f (0) = 0. Assume that the set Linearization P Gain scheduling k = x|Lf V (x) = 0 and Lf Lgi V (x) = 0 for all k N, i {1,..., m} = {0} Stability S ∈ ∈ Nonlinear then, the feedback approaches CLF T T Sliding mode k(x) := − ( V (x) G(x)) = Lg1 V (x) Lgm V (x) Geometric ∇ · ··· control Recursive globally asymptotically stabilizes the system at the origin.  techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 83 / 174 Control Lyapunov functions Control affine systems Nonlinear Theorem: Sontag’s universal formula (1989) Control Consider a control affine system x˙ = g (x) + m u g (x) with f smooth and N. Marchand 0 i=1 i i f (0) = 0. Assume that there exists a differentiable CLF, then the feedback P References ki (x) = −bi (x)ϕ(a(x), β(x)) (= 0 for x = 0) Outline

Introduction Linear/Nonlinear The X4 example a(x) := V (x)f (x) and bi (x) := V (x)gi (x) for i = 1,..., m ∇ ∇ 2 B(x) = b1(x) b2(x) and β(x) = B(x) Linear ··· k k approaches q : is any real analytic function with q(0) = 0 and bq(b) > 0 for any R R  Antiwindup b > 0 Linearization Gain scheduling ϕ is the→ real analytic function: Stability a+√a2+bq(b) if b = 0 Nonlinear ϕ(a, b) = b 6 approaches  0 if b = 0 CLF Sliding mode n Geometric is such that k(0) = 0, k smooth on R \0 and control Recursive techniques sup V (x)f (x, k(x)) + W (x) 0 n X4 stabilization x∈R ∇ ≤ Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 84 / 174 Control Lyapunov functions Control affine systems

Nonlinear Control Definition: Small control property N. Marchand A CLF V is said to satisfies the small control property if for any ε,

References there is some δ so that:

Outline sup min V (x)f (x, u) + W (x) 0 Introduction x∈B(δ) u∈B(ε) ∇ ≤ Linear/Nonlinear The X4 example Linear The small control property implicitly means that if ε is small (hence the approaches Antiwindup control), the system can still be controlled as long as it is sufficiently close to Linearization Gain scheduling the origin Stability Theorem: Sontag’s universal formula (1989) Nonlinear approaches m CLF Consider an control-affine system x˙ = g0(x) + i = 1 ui gi (x) Sliding mode Geometric with f smooth and f (0) = 0. Assume that there exists a control P Recursive differentiable CLF, then the previous feedback k with q(b) = b is techniques n X4 stabilization smooth on R \0 and continuous at the origin Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 85 / 174 Control Lyapunov functions Robustness issues

Nonlinear Control Model Real system

N. Marchand x˙ = f (x, u) x˙ = f (x, u)+ε u = k(x) u = k(x+δ) References Outline Definition: Robustness w.r.t. model errors n m Introduction A feedback law k : R R is said to be robust with respect to model errors if Linear/Nonlinear The X4 example limt x(t) (r(ε)) with limε 0 r(ε) = 0 (x(t) denotes the solution of ∈ B Linear x˙ = f (x, k(x)) + ε) → approaches →∞ → Antiwindup Linearization Definition: Robustness w.r.t. measurement errors Gain scheduling A feedback law k : n m is said to be robust with respect to measurement Stability R R errors if limt x(t) (r(δ)) with limδ 0 r(δ) = 0 (x(t) denotes the solution Nonlinear ∈ B approaches of x˙ = f (x, k(x + δ))) → →∞ CLF → Sliding mode Geometric Theorem: Smooth CLF = robust stability (1999) control Recursive techniques The existence of a feedback law robust to measurement errors and model errors X4 stabilization is equivalent to the existence of a smooth CLF Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 86 / 174 Control Lyapunov functions Conclusion

Nonlinear Control N. Marchand A CLF is a theoretical tool, not a magical tool

References A CLF is not a constructive tool Outline Finding a stabilizing control law and finding a CLF are at Introduction Linear/Nonlinear best the same problems. In all other cases, finding a The X4 example stabilizing control law is easier than finding a CLF Linear approaches Even if one can find a CLF for a system, the universal Antiwindup Linearization formula often gives a feedback with poor performances Gain scheduling Stability However, this is an important field of research in the Nonlinear control system theory community that proved important approaches CLF theoretical results, for instance the equivalence between Sliding mode Geometric asymptotic controllability and stabilizability of nonlinear control Recursive techniques systems (1997) X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 87 / 174 Other structural tools Passivity

Nonlinear Control Definition: Passivity N. Marchand A system References x˙ = f (x, u) Outline y = h(x, u)

Introduction is said to be passive if there exists some function S(x) 0 with Linear/Nonlinear ≥ The X4 example S(0) = 0 such that Linear approaches T Antiwindup T Linearization S(x(T )) − S(x(0)) u (τ)y(τ)dτ Gain scheduling ≤ Z0 Stability Nonlinear Roughly speaking, S(x(0)) (called the storage function) approaches CLF denotes the largest amount of energy which can be extracted Sliding mode Geometric from the system given the initial condition x(0). control Recursive Passivity eases the design of control law and is a powerful tool techniques X4 stabilization for interconnected systems Observers Important literature

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 88 / 174 Other structural tools Input-to-State Stability (ISS)

Nonlinear Class K A continuous function γ : R≥0 R≥0 is said in K if it is strictly increasing Control and γ(0) = 0

N. Marchand Class KL A continuous function β : R≥0 ×→R≥0 R≥0 is said in KL if β(·, s) ∈ K for each fixed s and β(r, ·) is decreasing for each fixed r and lims β(r, s) = 0 References → →∞ Outline Definition: Input-to-State Stability Introduction A system Linear/Nonlinear The X4 example x˙ = f (x, u) Linear is said to be input-to-state stable if there exists functions β and γ approaches ∈ KL ∈ K Antiwindup such that for each bounded u( ) and each x(0), the solution x(t) exists and is Linearization · Gain scheduling bounded by: Stability x(t) β( x(0) , t) + γ( sup u(τ) ) k k ≤ k k 0≤τ≤t k k Nonlinear approaches CLF Roughly speaking, ISS characterizes a relation between the norm of the Sliding mode Geometric state and the energy injected in the system: the system can not diverge in control Recursive finite time with a bounded control techniques ISS eases the design of control law X4 stabilization Important literature Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 89 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 90 / 174 Sliding mode control An introducing example

Nonlinear Control Take again the linear system

N. Marchand x˙1 = x2 References x˙2 = −x1 + u Outline Introduction Assume u is forced to remain in [−1, 1] Linear/Nonlinear The X4 example In practical applications, u is always constrained in an interval [u, u]. We will Linear see later on how to handle it. To begin, we take the above simplified approaches Antiwindup constraint. Linearization Take the CLF Gain scheduling

Stability 3 1 3 2 2 T 2 2 Nonlinear V (x) = x1 + x1x2 + x2 = x x 2 1 1 approaches  2  CLF Sliding mode Geometric control Recursive Goal techniques X4 stabilization Find u in [−1, 1] that makes V decrease as fast as possible Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 91 / 174 Sliding mode control An introducing example Nonlinear Making V decrease as fast as possible is equivalent to minimizing V˙ : Control N. Marchand u = Argmin V˙ u∈[−1,1] References  22 22 = Argmin −−x11 + x11x22 + x22 + (xx11 + 2xx22))u Outline u∈[−1,1]  can not be changed minimal for u=− sign(x1+2x2) Introduction = − sign(x1 + 2x2) Linear/Nonlinear | {z } | {z } The X4 example Simulating the closed loop system with initial condition x(0) = (2, −3), it gives:

Linear 2 approaches x2 0 Antiwindup

Linearization −2 x1 Gain scheduling −4 Stability 0 2 4 6 8 10

1.5 Nonlinear 1 approaches 0.5 0 CLF u −0.5 Sliding mode −1 Geometric −1.5 control 0 2 4 6 8 10 Recursive techniques X4 stabilization Why does it work ? Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 92 / 174 Sliding mode control An introducing example Nonlinear Define σ(x) = x + 2x . The set Control 1 2 {S(x) = {x|σ(x) = 0}} { x1 0.6, x2 0.3} is attractive: N. Marchand ∩ | | ≤ | | ≤

References S Outline = {x |x Introduction 1 + V 2x Linear/Nonlinear 2 = The X4 example 0} Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control x1 x2 Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 93 / 174 Sliding mode control An introducing example Nonlinear Define σ(x) = x + 2x . The set Control 1 2 {S(x) = {x|σ(x) = 0}} { x1 0.6, x2 0.3} is attractive: N. Marchand ∩ | | ≤ | | ≤

References S Outline = {x |x Introduction 1 + 2x Linear/Nonlinear 2 = The X4 example 0} Linear approaches Antiwindup Linearization Gain scheduling Stability SS˙ > 0 Nonlinear SS˙ < 0 approaches SS˙ < 0 CLF SS˙ > 0 Sliding mode Geometric control x1 x2 Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 93 / 174 Sliding mode control An introducing example Nonlinear The set {S(x) = {x|σ(x) = 0}} { x 0.6, x 0.3} is Control 1 2 attractive ∩ | | ≤ | | ≤ N. Marchand Once the set is joined, the control is such that x remains on References S(x), that is: Outline ˙ Introduction S(x) = 0 = x˙1 + 2x˙2 = x2 − x1 + u Linear/Nonlinear The X4 example Hence, on S(x), u = − sign(x1 + 2x2) has the same influence Linear approaches on the system as the control ueq = x1 − x2 Antiwindup On S(x), the system behaves like: Linearization Gain scheduling Stability x˙1 = x2

Nonlinear x˙2 = −x1 + u = −x2 approaches CLF Sliding mode x2 and hence also x1 clearly exponentially go to zero without Geometric control leaving {S(x) = {x|x1 + 2x2 = 0}} { x1 0.6, x2 0.3} Recursive techniques ∩ | | ≤ | | ≤ X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 94 / 174 Sliding mode control Principle of sliding mode control

Nonlinear Control N. Marchand Principle: References Define a sliding surface S(x) = {x|σ(x) = 0} Outline A stabilizing sliding mode control is a control law Introduction Linear/Nonlinear discontinuous in on S(x) The X4 example that insures the attractivity of S(x) Linear approaches such that, on the surface S(x), the states “slides” to Antiwindup the origin Linearization Gain scheduling Main characteristic of sliding mode control: Stability

Nonlinear  Robust control law approaches CLF  Discontinuities may damage actuators (filtered versions Sliding mode Geometric exist) control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 95 / 174 Sliding mode control Notion of sliding surface and equivalent control Nonlinear With a sliding mode control, the system takes the form: Control N. Marchand f +(x) if σ(x) > 0 x˙ = f −(x) if σ(x) < 0 References Outline

Introduction f +(x) Linear/Nonlinear σ(x) > 0 + The X4 example fn (x) Linear − approaches f (x) f −(x) Antiwindup n Linearization Gain scheduling Stability

Nonlinear σ(x) < 0 σ(x) = 0 approaches CLF What happens for σ(x) = 0 ? Sliding mode + − Geometric The solution on σ(x) = 0 is the solution of x˙ = αf (x) + (1 − α)f (x) control + − Recursive where α satisfies αfn (x) + (1 − α)fn (x) = 0 for the normal projections of techniques + − X4 stabilization f and f Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 96 / 174 Sliding mode control A sliding mode control for a class of affine systems

Nonlinear Control Theorem: Sliding mode control for a class of nonlinear systems N. Marchand Take the nonlinear system: References

Outline x˙1 f1(x) + g1(x)u

Introduction x˙2 x1  .  =  .  = f (x) + g(x)u Linear/Nonlinear . . The X4 example     Linear x˙n  xn−1  approaches     Antiwindup     Linearization Choose the control law Gain scheduling T Stability p f (x) µ u = − − sign(σ(x)) Nonlinear pT g(x) pT g(x) approaches CLF T T Sliding mode with µ > 0, σ(x) = p x and p = p1 pn is a stable Geometric ··· control (all roots have strictly negative real parts) Recursive  techniques Then the origin of the closed loop system is asymptotically X4 stabilization stable Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 97 / 174 Sliding mode control Sliding mode control for some affine systems: proof of convergence

Nonlinear Proof: Control Take the Lyapunov function N. Marchand 1 References V (x) = xT ppT x Outline 2 Introduction σ2(x) Linear/Nonlinear Note that V (x) = 2 The X4 example Along the trajectories of the system, one has: Linear approaches T T T T Antiwindup V˙ (x) = σ (x)σ˙ (x) = x p p f (x) + p g(x)u Linearization Gain scheduling   Stability with the chosen control, it gives: Nonlinear approaches V˙ (x) = −µσ(x) sign(σ(x)) = −µ σ(x) CLF | | Sliding mode Geometric control x tends to S = {x|σ(x) = 0} Recursive techniques µ tunes how fast the system converges to S = {x|σ(x) = 0} X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 98 / 174 Sliding mode control Sliding mode control for some affine systems: proof of convergence Nonlinear On S, the system is such that Control

N. Marchand σ(x) = 0 = p1x1 + + pn−1xn−1 + pnxn ··· References But: Outline xn−1 = x˙n Introduction (2) Linear/Nonlinear xn−2 = x˙n−1 = xn The X4 example . Linear . approaches (n−1) x1 = x˙2 = = xn Antiwindup ··· Linearization Gain scheduling That can be written with zi = xn−i+1 in the form: Stability 0 1 0 0 Nonlinear ··· .. . approaches  0 0 1 . .  CLF z˙ = . .. .. z Sliding mode  . . . 0  Geometric   control  0 0 1  Recursive  p2 ······p3 pn  techniques − − −   p1 p1 ······ p1  X4 stabilization   Observers Hence, x asymptotically goes to the origin 

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 99 / 174 Sliding mode control Sliding mode control for some affine systems: time to switch

Nonlinear Control

N. Marchand Consider an initial point x0 such that σ(x0) > 0. References Since Outline σ(x)σ˙ (x) = −µσ(x) sign(σ(x)) Introduction Linear/Nonlinear it follows that as long as σ(x) > 0 The X4 example Linear approaches σ˙ (x) = −µ Antiwindup Linearization Gain scheduling Hence, the instant of the first switch is Stability Nonlinear σ(x ) approaches 0 ts = < CLF µ Sliding mode Geometric control Recursive Moreover, ts 0 as µ ∞ techniques X4 stabilization Observers → → ∞ N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 100 / 174 Sliding mode control Robustness issues

Nonlinear Control Assume that one knows only a model

N. Marchand x˙ = f^(x) +g ^(x)u References Outline of the true system Introduction Linear/Nonlinear The X4 example x˙ = f (x) + g(x)u Linear approaches The time derivative of the Lyapunov function is: Antiwindup Linearization Gain scheduling pT (f g^ − f^ g T )p pT g Stability V˙ (x) = σ(x) − µ sign(σ(x)) pT g^ pT g^ Nonlinear " # approaches CLF Sliding mode If sign(pT g) = sign(pT g^) and µ > 0 sufficiently large, V˙ < 0 Geometric control Recursive The closed-loop system is robust against model errors techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 101 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 102 / 174 State and output linearization Introducing examples Nonlinear Consider nonlinear the system Control

N. Marchand x˙1 = −2x1 + ax2 + sin(x1)

References x˙2 = −x2 cos(x1) + u cos(2x1) Outline Take the new set of state variables Introduction Linear/Nonlinear The X4 example z1 = x1 x1 = z1 z −sin(z ) Linear z = ax + sin(x ) 2 1 2 1 1 x2 = a approaches Antiwindup Linearization The state equations become: Gain scheduling

Stability z˙1 = −2z1 + z2

Nonlinear z˙2 = −2z1 cos(z1) + cos(z1) sin(z1) + au cos(2z1) approaches CLF Sliding mode The nonlinearities can then be canceled taking the new control v: Geometric control Recursive 1 techniques u = (v − cos(z1) sin(z1) + 2z1 cos(z1)) X4 stabilization a cos(2z1) Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 103 / 174 State and output linearization Introducing examples

Nonlinear Control The system then becomes linear: N. Marchand −2 1 0 z˙ = z + v References 0 0 1     Outline Taking v = −2z places the poles of the closed-loop in {−2, −2} Introduction 2 Linear/Nonlinear Hence, limt z = 0 The X4 example Looking back to the transformation: Linear →∞ approaches Antiwindup x1 = z1 Linearization Gain scheduling z2 − sin(z1) x2 = Stability a Nonlinear approaches one also have limt x = 0 CLF In the original coordinates, the control writes: Sliding mode Geometric →∞ control Recursive 1 techniques u = [−2ax2−2 sin(x2)−cos(x1) sin(x1)+2x1 cos(x1)] X4 stabilization a cos(2x1) Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 104 / 174 State and output linearization Introducing examples Nonlinear Consider nonlinear the system Control

N. Marchand x˙1 = sin(x2) + (x2 + 1)x3 5 References x˙2 = x1 + x3 2 Outline x˙3 = x1 + u Introduction Linear/Nonlinear Take x1 as “output”: y = x1 The X4 example When not imposed, the choice of the appropriate output is often delicate Linear Compute the first time derivative of y: approaches Antiwindup Linearization y˙ = x˙1 = sin(x2) + (x2 + 1)x3 Gain scheduling Stability Compute the second time derivative of y: Nonlinear approaches 5 2 y¨ = (x2 + 1)u + (x1 + x3)(x3 + cos(x2)) + (x2 + 1)x1 CLF Sliding mode m(x) Geometric control Recursive v−m(x) | {z } techniques Taking u = gives the linear system: y¨ = v x2+1 X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 105 / 174 State and output linearization Introducing examples

Nonlinear Control  Potential problem if x2 = −1 N. Marchand Here again, take the linear feedback v = y + 2y˙ that

References places the poles of the closed loop system in {−1, −1} Outline Hence, y and y˙ asymptotically converges to the origin Introduction Linear/Nonlinear The state of the system is of dimension 3. Only two The X4 example variables have been brought to the origin, what about the Linear approaches third one ? Antiwindup Linearization Gain scheduling Write the system with the new coordinates Stability (z1, z2, z3) = (y, y˙ , x3): Nonlinear approaches z˙1 = z2 CLF Linearized sub-system: Sliding mode z˙2 = v Geometric control 2 Recursive Internal dynamics: z = z + u(z) techniques ˙3 1 X4 stabilization Observers 

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 106 / 174 State and output linearization Introducing examples Nonlinear One has to check that the internal dynamics is stable. For this, we Control assume that y = y˙ = 0 (which happens asymptotically): N. Marchand

0 0 References 0 0 5 2 Outline 2 v −(( →z1 +z3)(z3 + cos x2) + (x2 +→ 1)z1 ) z˙3 = →z1 + → Introduction z}|{ x2 + 1 z }| { Linear/Nonlinear z}|{ z}|{ z3(z3 + cos x2) The X4 example = − Linear x2 + 1 approaches Antiwindup If x2 and z3 are small enough, z˙3 −z3(z3 + 1) −z3: the internal Linearization ≈ ≈ Gain scheduling dynamics is locally asymptotically stable Stability

Nonlinear The approach can be applied if and only if the internal dynamics is approaches stable CLF Sliding mode If the internal dynamics is unstable, the system is called non-minimum Geometric phase control Recursive Change the input techniques X4 stabilization Use additional inputs to stabilize the internal dynamics Observers Other approach in the literature like approximate linearization

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 107 / 174 State and output linearization Introduction Nonlinear Consider again nonlinear systems affine in the control: Control N. Marchand x˙ = f (x) + g(x)u y = h(x) References Outline The linearization approach tries to find Introduction a feedback control law Linear/Nonlinear The X4 example Linear u = α(x) + β(x)v approaches Antiwindup and a change of variable Linearization Gain scheduling z = T (x) Stability that transforms the nonlinear systems into: Nonlinear approaches Input-State linearization Input-Output linearization CLF Sliding mode (r) Geometric z˙ = Az + Bv y = v control Recursive techniques  No systematic approach  Systematic approach X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 108 / 174 State and output linearization The SISO case

Nonlinear Control Take x˙ = f (x) + g(x)u N. Marchand y = h(x) References The time derivative of y is then given by: Outline Introduction ∂h Linear/Nonlinear y˙ = (f (x) + g(x)u) = Lf h(x) + Lg h(x)u The X4 example ∂x Linear approaches If Lg h(x) = 0, the control is Antiwindup 6 Linearization 1 Gain scheduling u = (−Lf h(x) + v) Stability Lg h(x) Nonlinear approaches yielding y˙ = v CLF Sliding mode Otherwise (that is Lg h(x) 0), differentiate once more: Geometric ≡ control Recursive ∂Lf h techniques 2 y¨ = (f (x) + g(x)u) = Lf h(x) + Lg Lf h(x)u X4 stabilization ∂x Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 109 / 174 State and output linearization The SISO case

Nonlinear If Lg Lf h(x) = 0, the control is Control 6 N. Marchand 1 2 u = (−Lf h(x) + v) References Lg Lf h(x) Outline yielding to y¨ = v Introduction ... Linear/Nonlinear The X4 example Linear Definition: Relative degree approaches i Antiwindup There exists an integer r n such that Lg Lf h(x) 0 for all Linearization ≤r−1 ≡ i {1,..., r − 2} and Lg L h(x) = 0 that is called the relative degree of Gain scheduling ∈ f 6 Stability the system

Nonlinear approaches The control law CLF Sliding mode Geometric 1 r control u = r−1 (−Lf h(x) + v) Recursive Lg L h(x) techniques f X4 stabilization (r) Observers yields the linear system y = v

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 110 / 174 State and output linearization The MIMO case

Nonlinear Control Take N. Marchand x˙ = f (x) + g1(x)u1 + g2(x)u2 y = h (x) References  1 1 Outline  y2 = h2(x) Introduction Linear/Nonlinear The relative degree {r1, r2} is then given by: The X4 example Linear i−1 i−1 approaches Lg1 Lf h1(x) = Lg2 Lf h1(x) = 0 i < r1 Antiwindup i−1 i−1 ∀ Linearization Lg1 Lf h2(x) = Lg2 Lf h2(x) = 0 i < r2 Gain scheduling ∀ Stability Assume that the Input-Output decoupling condition is Nonlinear approaches satisfied, that is: CLF Sliding mode r1−1 r1−1 Geometric Lg1 L h1(x) Lg2 L h1(x) control f f rank r2−1 r2−1 = 2 Recursive L L h (x) L L h (x) techniques g1 f 2 g2 f 2 X4 stabilization   Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 111 / 174 State and output linearization The MIMO case

Nonlinear One has: Control

N. Marchand y˙1 = Lf h1(x) + Lg1 h1(x) u1 + Lg2 h1(x) u2 =0 =0 References y¨ = L2h (x) + L L h (x) u + L L h (x) u 1 f 1 |g1 {zf 1} 1 | {zg2 f} 1 2 Outline =0 =0 . Introduction . | {z } | {z } Linear/Nonlinear (r1) r1 r1−1 r1−1 The X4 example y1 = Lf h1(x) + Lg1 Lf h1(x) u1 + Lg2 Lf h1(x) u2 Linear either 6=0 or 6=0 approaches Antiwindup | {z } | {z } Linearization Make the same for y2: Gain scheduling

Stability y˙2 = Lf h2(x) + Lg1 h2(x) u1 + Lg2 h2(x) u2 Nonlinear =0 =0 approaches 2 y¨2 = Lf h2(x) + Lg1 Lf h2(x) u1 + Lg2 Lf h2(x) u2 CLF | {z } | {z } Sliding mode =0 =0 Geometric . control . | {z } | {z } Recursive (r2) r r −1 r −1 techniques 2 2 2 y2 = Lf h2(x) + Lg1 Lf h2(x) u1 + Lg2 Lf h2(x) u2 X4 stabilization either 6=0 or 6=0 Observers | {z } | {z } N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 112 / 174 State and output linearization The MIMO case

Nonlinear Control Hence, one has:

N. Marchand (r1) r1 r1−1 r1−1 y1 Lf h1(x) Lg1 Lf h1(x) Lg2 Lf h1(x) u1 = r + References (r2) L 2 h (x) L Lr2−1h (x) L Lr2−1h (x) u y2 ! f 2 g1 f 2 g2 f 2 2 Outline       b(x) A(x) u Introduction Linear/Nonlinear | {z } | {z } The X4 example Thanks to the decoupling| condition, one can{z take: } Linear approaches −1 −1 Antiwindup u = −A(x) b(x) + A(x) v Linearization Gain scheduling which gives two chains of integrators: Stability

Nonlinear (r1) (r2) approaches y1 = v1 y2 = v2 CLF Sliding mode Geometric This approach can be extended to any output and input sizes control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 113 / 174 State and output linearization A block diagram representation

Nonlinear Control

N. Marchand

References Linearization techniques can be interpreted as: Outline

Introduction Linear/Nonlinear The X4 example Linear Nonlinear Linear control system approaches Antiwindup Linearizing Linearization Linear loop Gain scheduling feedback Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 114 / 174 State and output linearization The general case

Nonlinear Control The internal dynamics or zero-dynamics is then of dimension

N. Marchand n − r; its stability has to be checked For linear systems r =number of poles-number of zeros References Outline This approach took a rapid development in the 80’s Introduction Linear/Nonlinear  Maybe the only “general” approach for nonlinear system with The X4 example predictive control Linear approaches  Can be extended to MIMO systems with a decoupling Antiwindup Linearization condition Gain scheduling  Many extensions in particular with the notion of flatness Stability  Power tool for path generation Nonlinear approaches  Non robust approach since it is based on coordinate changes CLF Sliding mode that can be stiff Geometric control  The control may take too large values Recursive techniques  “Kills” nonlinearities even if they are good X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 115 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 116 / 174 Backstepping Main results

Nonlinear Theorem: backstepping design Control Assume that the system χ˙ = f (χ, v) with f (0, 0) = 0 can asymptotically be stabilized with N. Marchand v = k(χ). Let V denote a 1 Lyapunov function (definite, positive and radially ∂V C unbounded) such that ∂χ f (χ, k(χ)) < 0 for all χ = 0. Then, the system References 6

Outline χ˙ = f (χ, ξ) ˙ Introduction ξ = h(χ, ξ) + u Linear/Nonlinear The X4 example with h(0, 0) = 0 is also asymptotically stabilizable with the control: Linear T approaches ∂k ∂V u(χ, ξ) = −h(χ, ξ) + f (χ, ξ) − ξ + k(χ) − G(χ, ξ − k(χ)) Antiwindup ∂χ ∂χ Linearization   Gain scheduling with Stability 1 ∂f Nonlinear G(χ, ξ) = (χ, k(χ) + λξ)dλ approaches ∂ξ Z0 CLF Sliding mode The Lyapunov function Geometric control 1 Recursive W (χ, ξ) = V (χ) + ξ − k(χ) 2 techniques 2 k k X4 stabilization is then strictly decreasing for any (χ, ξ) = (0, 0) Observers 6

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 117 / 174 Backstepping Main results

Nonlinear Control

N. Marchand

References The theorem can recursively be applied to Outline

Introduction χ˙ = f (χ, ξ1) Linear/Nonlinear ˙ The X4 example ξ1 = a1(χ, ξ1) + b1(χ, ξ1)ξ2

Linear ξ˙ 2 = a2(χ, ξ1, ξ2) + b2(χ, ξ1, ξ2)ξ3 approaches . Antiwindup . Linearization . Gain scheduling ξ˙ n−1 = an−1(χ, ξ1, ξ2, . . . , ξn−2) + bn−1(χ, ξ1, ξ2, . . . , ξn−2)ξn−1 Stability ξ˙ = a (χ, ξ , ξ , . . . , ξ ) + b (χ, ξ , ξ , . . . , ξ )u Nonlinear n n 1 2 n−1 n 1 2 n−1 approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 118 / 174 Forwarding Strict-feedforward systems

Nonlinear Control N. Marchand Consider the class of strict-feedforward systems: References Outline x˙1 = x2 + f1(x2, x3,..., xn, u) Introduction x = x + f (x ,..., x , u) Linear/Nonlinear ˙2 3 2 3 n The X4 example . Linear . approaches Antiwindup x˙n−1 = xn + fn−1(xn, u) Linearization Gain scheduling x˙n = u Stability

Nonlinear approaches Strict-feedforward systems are in general no feedback CLF Sliding mode linearizable Geometric control Backstepping is not applicable Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 119 / 174 Forwarding Forwarding procedure

Nonlinear At step 0: Begin with stabilizing the system x˙n = un. Control 1 2 Take e.g. un = −xn and the corresponding Lyapunov function Vn = 2 xn N. Marchand At step 1: Augment the control law

References un−1(xn−1, xn) = un(xn) + vn−1(xn−1, xn) Outline such that un−1 stabilizes the cascade Introduction Linear/Nonlinear x˙n−1 = xn + fn−1(xn, un−1) The X4 example x˙n = un−1 Linear approaches Antiwindup At step k: Augment the control law Linearization Gain scheduling un−k (xn−k ,..., xn) = un−k+1(xn−k+1,..., xn) + vn−k (xn−k ,..., xn) Stability such that un−k stabilizes the cascade Nonlinear approaches ξ˙ = x + f (x ,..., x , u ) CLF n−k n−k+1 n−k n−k+1 n n−k Sliding mode . Geometric . control Recursive x˙n−1 = xn + fn−1(xn, un−k ) techniques X4 stabilization x˙n = un−k Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 120 / 174 Forwarding Forwarding procedure

Nonlinear Control The control law un−k always exists for all N. Marchand k {1,..., n − 1} ∈ References The Lyapunov function at step k can be given by: Outline Introduction 1 2 Linear/Nonlinear Vk = Vk+1 + xk + xk (τ)fk (xk+1(τ),..., xn(τ))dτ The X4 example 2 Z0∞ Linear approaches To avoid computations of the , low-gain control Antiwindup Linearization can be used. It gave rise to an important litterature on Gain scheduling Stability bounded feedback control (Teel (91), Sussmann et al.

Nonlinear (94)) approaches CLF Various extensions for more general system exist but are Sliding mode Geometric still based on the same recursive construction control Recursive techniques Forwarding can be interpreted with passivity, ISS or X4 stabilization optimal control Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 121 / 174 Backstepping/Forwarding An interpretation of the names

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 122 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 123 / 174 The X4 helicopter X4 position stabilization Nonlinear The aim is now to apply nonlinear control techniques to the stabilization Control problem of an X4 helicopter at a point N. Marchand Input-Ouput Linearization techniques can not be applied since the system

References is non minimum phase The backstepping approach is inspired from Outline S. Bouabdallah and R. Siegwart, ‘‘Backstepping and sliding-mode Introduction Linear/Nonlinear techniques applied to an indoor micro quadrotor’’, at the EPFL The X4 example (Lausanne, Switzerland) presented at the International Conference on Linear Robotics and 2005 (ICRA’05, Barcelonna, Spain) approaches Antiwindup The PVTOL control strategy comes from Linearization A. Hably, F. Kendoul, N. Marchand and P. Castillo, Positive Systems, Gain scheduling chapter: "Further results on global stabilization of the PVTOL Stability aircraft", pp 303-310, Springer Verlag , 2006 Nonlinear The saturated control law is taken in: approaches CLF N. Marchand and A. Hably, "Nonlinear stabilization of multiple Sliding mode integrators with bounded controls", Automatica, vol. 41, no. 12, pp Geometric control 2147-2152, 2005. Recursive techniques Revealing example of what often happens in nonlinear: a solution comes X4 stabilization from the combination of different methods Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 124 / 174 The X4 helicopter A two steps approach

Nonlinear Control

N. Marchand

References 2 k kgearbox κ k s˙ =− m s − s s + m sat ¯ (U ) Outline i Jr R i Jr i i Jr R Ui i ˙ | | Position control problem Introduction  ~p = ~v Linear/Nonlinear  0 The X4 example   m~v˙ = −mg~e3 + R 0 Linear    approaches  F (s )  i i i Antiwindup  ˙ × Linearization  R = Rω~  Attitude control problem Gain scheduling P 0 Γr (s2, s4) Stability  ˙ × ×  Jω~ = −ω~ Jω~ − i Ir ω~ 0 + Γp(s1, s3) Nonlinear      approaches  si Γy (s1, s2, s3, s4)  P i CLF      Sliding mode  Geometric  P control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 125 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control The aim of this first step is to be able to bring (φ, θ, ψ) to N. Marchand any desired configuration (φd , θd , ψd ) Attitude equations (with an appropriate choice of Euler References angles): Outline x˙1 = x2 Introduction Linear/Nonlinear x˙2 = a1x4x6 + b1Γr The X4 example   x˙3 = x4 Linear  approaches  x˙4 = a2x2x6 + b2Γp Antiwindup  Linearization x˙5 = x6 Gain scheduling x˙6 = a3x2x4 + b3Γy Stability    J2−J3 J3−J1 Nonlinear with (x1,..., x6) = (φ, φ,˙ θ, θ,˙ ψ, ψ˙ ), a1 = , a2 = , approaches J1 J2 J1−J2 1 1 1 CLF a3 = , b1 = , b2 = and b3 = Sliding mode J3 J1 J2 J3 Geometric The system would be trivial to control if (x , x , x ) was the control 2 4 6 Recursive techniques control instead of (Γr ,Γp,Γy ) X4 stabilization This is precisely the philosophy of backstepping Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 126 / 174 The X4 helicopter: attitude stabilization Recall of backstepping main result

Nonlinear Theorem: backstepping design Control Assume that the system χ˙ = f (χ, v) with f (0, 0) = 0 can asymptotically be stabilized with N. Marchand v = k(χ). Let V denote a 1 Lyapunov function (definite, positive and radially ∂V C unbounded) such that ∂χ f (χ, k(χ)) < 0 for all χ = 0. Then, the system References 6

Outline χ˙ = f (χ, ξ) ˙ Introduction ξ = h(χ, ξ) + u Linear/Nonlinear The X4 example with h(0, 0) = 0 is also asymptotically stabilizable with the control: Linear T approaches ∂k ∂V u(χ, ξ) = −h(χ, ξ) + f (χ, ξ) − ξ + k(χ) − G(χ, ξ − k(χ)) Antiwindup ∂χ ∂χ Linearization   Gain scheduling with Stability 1 ∂f Nonlinear G(χ, ξ) = (χ, k(χ) + λξ)dλ approaches ∂ξ Z0 CLF Sliding mode The Lyapunov function Geometric control 1 Recursive W (χ, ξ) = V (χ) + ξ − k(χ) 2 techniques 2 k k X4 stabilization is then strictly decreasing for any (χ, ξ) = (0, 0) Observers 6

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 127 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Define first the tracking error:

References z1 = x1 − x1d = φ − φd Outline z2 = x3 − x3d = θ − θd Introduction  z = x − x = ψ − ψ Linear/Nonlinear  3 5 5d d The X4 example Linear approaches It gives the subsystem Antiwindup Linearization Gain scheduling z˙1 = x2 − x˙1d Stability z˙ = x − x˙  2 4 3d Nonlinear z˙ = x − x˙ approaches  3 6 5d CLF Sliding mode Geometric where, at this step, (x2, x4, x6) is the control vector control Recursive 1 2 techniques Take first V1 = 2 z1 . X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 128 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control Along the trajectories of the system, the Lyapunov

N. Marchand function gives: ˙ V1 = z1(x2 − x˙1d ) References

Outline Hence taking as fictive control x2 = x˙1d − α1z1 with Introduction α1 > 0 insures the decrease of V1: Linear/Nonlinear The X4 example ˙ 2 V1 = −α1z1 Linear approaches Antiwindup x1 will asymptotically converge to x1d ... unfortunately x2 Linearization Gain scheduling is not the control and we have to build thanks to Stability backstepping approach “ the Γr that will force x2 to make Nonlinear x1 converge to x1 ” approaches d CLF For this, define the tracking error for x2: Sliding mode Geometric control z = x − (x − α z ) Recursive 2 2 ˙1d 1 1 techniques X4 stabilization input of subsystem in z1 we would like to put Observers | {z } N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 129 / 174 The X4 helicopter: attitude stabilization A backstepping approach Nonlinear One has Control z˙ = a x x + b Γ −x¨ + α x − α x˙ N. Marchand 2 1 4 6 1 r 1d 1 2 1 1d

x˙2 α1z˙1 References Recall we have to build| “ the{z Γr that} will force x2 to make x1 converge Outline | {z } to x1d ”. For this, we use the formula of the backstepping theorem: Introduction Linear/Nonlinear Theorem: backstepping design The X4 example Linear . approaches . Antiwindup T Linearization ∂k ∂V u(χ, ξ) = −h(χ, ξ) + f (χ, ξ) − ξ + k(χ) − G(χ, ξ − k(χ)) Gain scheduling ∂χ ∂χ Stability   . Nonlinear . approaches CLF with in our case: Sliding mode Geometric control χ = z k = x˙ − α z Recursive 1 1d 1 1 techniques ξ = z f = x − x˙ X4 stabilization 2 2 1d h = a x x − x + α x − α x V = 1 z2 Observers 1 4 6 ¨1d 1 2 1 ˙1d 2 1

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 130 / 174 The X4 helicopter: attitude stabilization A backstepping approach Nonlinear Or more simply, we construct it: Control

N. Marchand 1 2 1 2 2 W (z1, z2) = V (z1) + x2 − (x˙1d − α1z1) = (z1 + z2 ) References 2 k k 2 Outline Along the trajectories of the system: Introduction Linear/Nonlinear control The X4 example ˙ Linear W = z1(x2 − x˙1d ) + z2 a1x4x6 + b1Γr −x¨1d + α1x2 − α1x˙1d approaches   Antiwindup z}|{ Linearization   Gain scheduling Taking v as new control variable: Stability

Nonlinear v = a1x4x6 + b1Γr − x¨1d + α1x2 − α1x˙1d approaches b Γ = v − a x x + x¨ − α x + α x˙ CLF 1 r 1 4 6 1d 1 2 1 1d Sliding mode Geometric control gives: Recursive ˙ techniques W = z1(x2 − x˙1d ) + z2v X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 131 / 174 The X4 helicopter: attitude stabilization A backstepping approach Nonlinear Trying to write Control

N. Marchand x2 − x˙1d = −α1z1 +? (x2 − x˙1d + α1z1)

References ideal case difference between real and ideal cases Outline = −|α{z1z1}+ x2|− x˙1d +{zα1z1 } Introduction Linear/Nonlinear z2 The X4 example Linear | {z } approaches Hence, it gives: Antiwindup ˙ 2 Linearization W = −α1z1 + z1z2 +z2v Gain scheduling can be compensated with v Stability Taking: Nonlinear |{z} approaches v = −z1 − α2z2 CLF Sliding mode where α2 > 0 in order to insure Geometric control Recursive ˙ 2 2 techniques W = −α1z1 − α2z2 < 0 X4 stabilization Observers Repeating this for θ and ψ gives the wanted control law

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 132 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control Attitude stabilization N. Marchand The control law given by

References b1Γr = −z1 − α2z2 − a1x4x6 + x¨1d − α1x2 + α1x˙1d Outline b2Γp = −z3 − α4z4 − a2x2x6 + x¨3d − α3x4 + α3x˙3d Introduction Linear/Nonlinear b3Γy = −z5 − α6z6 − a3x2x4 + x¨5d − α5x6 + α5x˙5d The X4 example Linear with z = x − x , z = x − x˙ + α z , z = x − x , approaches 1 1 1d 2 2 1d 1 1 3 3 3d Antiwindup z4 = x4 − x˙3d + α3z3, z5 = x5 − x5d and z6 = x6 − x˙5d + α5z5 Linearization Gain scheduling asymptotically stabilizes (x1, x3, x5) to their desired position Stability (x1d , x3d , x5d ) Nonlinear approaches CLF This kind of approach appeared in the literature in the last Sliding mode Geometric control 90’s Recursive techniques Now better approach based on forwarding are appearing X4 stabilization taking into account practical saturation of the control torques Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 133 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Simulations: apply successive steps of 45 in roll, pitch and yaw References

Outline 60 40 Introduction 20 Linear/Nonlinear The X4 example 0 −20 Linear 0 10 20 30 40 50 60 70 approaches 60 Antiwindup 40 Linearization 20 Gain scheduling 0 Stability −20 0 10 20 30 40 50 60 70 Nonlinear 60 approaches 40 CLF 20 Sliding mode 0 Geometric control −20 Recursive 0 10 20 30 40 50 60 70 techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 134 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Adjusting the α’s: with αi = 0.2 References

60 1 Outline 40 20 0 Introduction 0 Linear/Nonlinear −20 −1 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 The X4 example 60 0.5 40 Linear 20 0 approaches 0 −20 −0.5 Antiwindup 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 Linearization 60 1 Gain scheduling 40 0 20 −1 Stability 0 −20 −2 Nonlinear 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 approaches CLF Roll, pitch and yaw answers Γr , Γp and Γy controls Sliding mode Geometric control  Too many oscillations Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 135 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Adjusting the α’s: with αi = 2 References

60 5 Outline 40 20 0 Introduction 0 Linear/Nonlinear −20 −5 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 The X4 example 60 2 40 Linear 20 0 approaches 0 −20 −2 Antiwindup 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 Linearization 60 2 Gain scheduling 40 20 0 Stability 0 −20 −2 Nonlinear 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 approaches CLF Roll, pitch and yaw answers Γr , Γp and Γy controls Sliding mode Geometric control  Seems to be a good choice Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 136 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Adjusting the α’s: with αi = 10 References 60 100 Outline 40 20 0 Introduction 0 −20 −100 Linear/Nonlinear 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 The X4 example 60 50 40 Linear 20 0 approaches 0 −20 −50 Antiwindup 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 60 50 Linearization 40 Gain scheduling 20 0 Stability 0 −20 −50 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 Nonlinear approaches Roll, pitch and yaw answers Γr , Γp and Γy controls CLF Sliding mode Geometric  The controls are too large, may be two fast to consider control Recursive the rotors as instantaneous techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 137 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Successive steps of 45 in roll, pitch and yaw with αi = 2 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 138 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control The saturation of the possible control torques Γr , Γp, Γy

N. Marchand may be problematic On the X4 system, the maximum speed of the rotors is References given by the solution of: Outline

Introduction 2 k smax + k κRs 2 − kmU = 0 Linear/Nonlinear m gearbox max The X4 example −1 Linear which gives: smax = 604 rad.s approaches Antiwindup The maximum roll and pitch torques are when one rotor is Linearization Gain scheduling at rest, the other one at is maximum speed (we assume Stability that the rotation is in only one direction): Nonlinear max 2 approaches Γr,p = lbsmax = 0.31 N.m CLF Sliding mode Geometric The maximum yaw torque is obtained when two opposite control Recursive rotors turn at the s the two others are at rest: techniques max X4 stabilization max 2 Observers Γy = 2κsmax = 21.2 N.m

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 139 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Adapt the parameters to the saturation: Linear Take larger α5,6 than the α1,...,4 approaches Antiwindup Take small enough αi to fulfill the saturation constraint Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 140 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Adjusting the α’s: with α1,...,4 = 0.4 and α5,6 = 8 References

60 1 Outline 40 20 0 Introduction 0 Linear/Nonlinear −20 −1 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 The X4 example 60 0.5 40 Linear 20 0 approaches 0 −20 −0.5 Antiwindup 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 Linearization 60 50 Gain scheduling 40 20 0 Stability 0 −20 −50 Nonlinear 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 approaches CLF Roll, pitch and yaw answers Γr , Γp and Γy controls Sliding mode Geometric control  The controls are still too large Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 141 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Adjusting the α’s: with α1,...,4 = 0.2 and α5,6 = 8 References

60 1 Outline 40 20 0 Introduction 0 Linear/Nonlinear −20 −1 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 The X4 example 60 0.5 40 Linear 20 0 approaches 0 −20 −0.5 Antiwindup 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 Linearization 60 50 Gain scheduling 40 20 0 Stability 0 −20 −50 Nonlinear 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 approaches CLF Roll, pitch and yaw answers Γr , Γp and Γy controls Sliding mode Geometric control  Oscillations are now present Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 142 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand Taking α1,...,4 = 0.2 and α5,6 = 8 and applying it on the References system with saturations, it gives:

Outline 60 0.5 Introduction 40 20 0 Linear/Nonlinear 0 The X4 example −20 −0.5 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 Linear 60 0.5 approaches 40 20 0 Antiwindup 0 Linearization −20 −0.5 Gain scheduling 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 60 50 Stability 40 20 0 Nonlinear 0 −20 −50 approaches 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 CLF Sliding mode Roll, pitch and yaw answers Γr , Γp and Γy controls Geometric control Recursive  Seems to work techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 143 / 174 The X4 helicopter: attitude stabilization A backstepping approach

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization The control law with the saturated system Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 144 / 174 The X4 helicopter: position control Simplification of the problem

Nonlinear Control

N. Marchand First use the attitude control to adjust the X4 in the right direction: References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 145 / 174 The X4 helicopter: position control Simplification of the problem

Nonlinear Control There exists a relation between (α, β, ψ) and (φ, θ, ψ) (a

N. Marchand rotation about the yaw axis) Use the attitude control to drive and keep α and ψ to the References origin Outline Take now the system in the plane: Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 146 / 174 The X4 helicopter: position control Simplification of the problem

Nonlinear Control

N. Marchand This problem is referred in the literature as the PVTOL References aircraft stabilization problem (Planar Vertical Take Off Outline and Landing aircraft) Introduction Linear/Nonlinear The “generic” equations are: The X4 example Linear u v approaches x = − sin(θ)u ¨ θ Antiwindup y Linearization y¨ = cos(θ)u − 1 Gain scheduling ¨ Stability θ = v

Nonlinear x approaches CLF Sliding mode where ’-1’ represent the normalized gravity, v represents Geometric control the equivalent control torque. Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 147 / 174

The X4 helicopter: position control A saturation based control Nonlinear T ˙ T Control Define z , (z1, z2, z3, z4, z5, z6) , (x, x˙ , y, y˙ , θ, θ) N. Marchand The system becomes: Translational part: References z˙1 = z2 Rotational part: Outline z˙2 = −u sin(z5) z˙5 = z6 Introduction Linear/Nonlinear z˙3 = z4 z˙6 = v The X4 example z˙4 = u cos(z5) − 1 Linear d approaches The idea is to use v to drive z5 to z5 such that: Antiwindup Linearization Gain scheduling −r1 z5d , arctan( ) Stability r2 + 1

Nonlinear 1 approaches with ε < 2 (tuning parameter) and σ( ) = max(min( , 1), −1): CLF · · Sliding mode 2 Geometric r = −εσ(z ) − ε σ(εz + z ) control 1 2 1 2 Recursive 2 techniques r2 = −εσ(z4) − ε σ(εz3 + z4) X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 148 / 174 The X4 helicopter: position control A saturation based control

Nonlinear Control When z5 reaches z5d and applying the thrust control input u N. Marchand u = r 2 + (r + 1)2 References 1 2

Outline q the translational subsystem takes the form of two independent Introduction Linear/Nonlinear second order chain of integrators The X4 example z˙1 = z2 z˙3 = z4 Linear approaches z˙2 = r1 z˙4 = r2 Antiwindup Linearization If we could prove that Gain scheduling 2 Stability r1 = −εσ(z2) − ε σ(εz1 + z2) Nonlinear 2 approaches r2 = −εσ(z4) − ε σ(εz3 + z4) CLF Sliding mode Geometric insures (z , z , z , z ) 0 control 1 2 3 4 Recursive techniques Then, it will follow that once (z1, z2, z3, z4) = 0, z5d = 0 and X4 stabilization z˙5d = z6d = 0 hence also→ (z5, z6) 0 Observers

N. Marchand (gipsa-lab) Nonlinear Control → Master PSPI 2009-2010 149 / 174 The X4 helicopter: position control A saturation based control

Nonlinear Control

N. Marchand

References Remain two problems: Outline

Introduction Prove that Linear/Nonlinear The X4 example r = −εσ(z ) − ε2σ(εz + z ) Linear 1 2 1 2 approaches 2 Antiwindup r2 = −εσ(z4) − ε σ(εz3 + z4) Linearization Gain scheduling Stability brings (z1, z2, z3, z4) to zero

Nonlinear Build a control so that (z5, z6) tends to (z5 , z˙5 = z6 ) approaches d d d CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 150 / 174 The X4 helicopter: position control A saturated control law for linear systems

Nonlinear Control An integrator chain is defined by:

N. Marchand 0 1 0 ... 0 0 . . . . References ...... . 1 . . . . . x˙ = . .. .. x + . u (11) Outline . 0 . . .    Introduction . .. 1 0     Linear/Nonlinear   1 0 ...... 0   The X4 example      =:A  =:B Linear approaches | {z } | {z } Antiwindup Problem: stabilizing (11) with Linearization Gain scheduling Stability −u¯ u u¯ ≤ ≤ Nonlinear approaches and u¯ is a positive constant CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 151 / 174 The X4 helicopter: position control A saturated control law for linear systems

Nonlinear Control First compute N. Marchand n i n−1 n (λ + ε ) = p0 + p1λ + + pn−1λ + λ References ··· i=1 Outline Y Introduction Apply the coordinate change Linear/Nonlinear The X4 example n i Tn = B Linear ε Tn−1 = (A + pn−1I )B i=1 2 approaches y := Tx with Tn−2 = (A + pn−1A + pn−2I )B . Antiwindup u¯  . n−1 n−2 P T1 = (A + pn−1A + + p1I )B Linearization  ··· Gain scheduling Stability The system becomes normalized in

Nonlinear n−1 n−2 approaches 0 ε ε . . . ε 1 n−2 . 0 0 ε . . . ε . CLF     Sliding mode ...... y˙ = . . . . y + .v Geometric   control   . 0 ...... 0 ε . Recursive     0 ...... 0 0 1 techniques     X4 stabilization     n n Observers with − εi v εi i=1 ≤ ≤ i=1 N. Marchand (gipsa-lab) P NonlinearP Control Master PSPI 2009-2010 152 / 174 The X4 helicopter: position control A saturated control law for linear systems

Nonlinear Control

N. Marchand

References Theorem: An efficient saturated control Outline n Introduction Let ¯ε(n) denote the only root of ε − 2ε + 1 = 0 in ]0, 1[. Linear/Nonlinear The X4 example Then for all ε with 0 < ε < ¯ε(n), Linear approaches n Antiwindup u¯ n−i+1 Linearization u = − n ε sat1(yi ) Gain scheduling εi i=1 i=1 Stability X Nonlinear P approaches globally asymptotically stabilizes the integrator chain. CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 153 / 174 The X4 helicopter: position control A saturated control law for linear systems

Nonlinear Control Sketch of the proof: 1 2 N. Marchand Assume that |yn| > 1 and take Vn := 2 yn Then References 2 n Outline V˙ n = −yn ε sat1(yn) −yn ε sat1(yn−1) + + ε sat1(y1) ··· Introduction =ε <ε2+ +εn Linear/Nonlinear  |·| ···  The X4 example So V is decreasing| {z } if | {z } Linear approaches Antiwindup ε > ε2 + + εn 1 − 2ε + εn > 0 ε < ¯ε(n) Linearization ··· Gain scheduling y joins [−1, 1] in finite time and remains there Stability n ⇔ ⇔ Nonlinear During that time, yn−1 to y1 can not blow up approaches Repeating this scheme for yn−1 to y1 gives y (1) after CLF ∈ B Sliding mode some time Geometric control In (1), the system is linear and stable GAS Recursive B techniques The construction of this feedback law is based on feedforward X4 stabilization ⇒ Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 154 / 174 The X4 helicopter: position control A saturation based control

Nonlinear Control Remain two problems: N. Marchand Prove that

References 2 Outline r1 = −εσ(z2) − ε σ(εz1 + z2) 2 Introduction r2 = −εσ(z4) − ε σ(εz3 + z4) Linear/Nonlinear The X4 example Linear brings (z1, z2, z3, z4) to zero approaches Antiwindup º direct application of the saturated control law Linearization Gain scheduling Build a control so that (z5, z6) tends to (z5d , z˙5d = z6d ) Stability º take: Nonlinear approaches 2 CLF v = σ (z¨ ) − εσ(z − z˙ ) − ε σ(ε(z − z ) + (z − z˙ )) Sliding mode β 5d 6 5d 5 5d 6 5d Geometric control Recursive techniques that work applying the saturated control law on the X4 stabilization variables z5 − z5d and z6 − z˙5d Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 155 / 174 The X4 helicopter Second step: position control

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques pi pi pi X4 stabilization (φ, θ, ψ, x, y, z) = ( 2 , 2 , 4 , 5, 5, 5) Observers (φ,˙ θ,˙ ψ,˙ x˙ , y˙ , z˙) = (0, 0, 0, 1, 2, 0)

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 156 / 174 The X4 helicopter Second step: position control

Nonlinear Control

N. Marchand

References

Outline

Introduction Linear/Nonlinear The X4 example Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Zoom on the 10 first seconds with a snapshot every second Geometric control Recursive techniques Initial conditions: X4 stabilization pi pi pi (φ, θ, ψ, x, y, z) = ( 2 , 2 , 4 , 5, 5, 5) Observers (φ,˙ θ,˙ ψ,˙ x˙ , y˙ , z˙) = (0, 0, 0, 1, 2, 0)

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 157 / 174 Outline 1 Introduction Nonlinear Control Linear versus nonlinear N. Marchand The X4 example

References 2 Linear control methods for nonlinear systems Outline Antiwindup Introduction Linearization Linear/Nonlinear The X4 example Gain scheduling Linear approaches 3 Stability Antiwindup Linearization Gain scheduling 4 Nonlinear control methods Stability Control Lyapunov functions Nonlinear Sliding mode control approaches CLF State and output linearization Sliding mode Geometric Backstepping and feedforwarding control Recursive techniques Stabilization of the X4 at a position X4 stabilization 5 Observers Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 158 / 174 Nonlinear observers

Nonlinear y Control d yu k(x) N. Marchand

References Controller

Outline x^

Introduction Linear/Nonlinear Observer The X4 example Linear 1 Modelization approaches Antiwindup To get a mathematical representation of the system Linearization Gain scheduling Different kind of model are useful. Often: Stability a simple model to build the control law a sharp model to check the control law and the observer Nonlinear approaches 2 CLF Design the state reconstruction: in order to reconstruct Sliding mode Geometric the variables needed for control control Recursive 3 Design the control and test it techniques X4 stabilization Observers Close the loop

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 159 / 174 Linear systems: Simple observer Nonlinear Control

N. Marchand x˙ (t) = Ax(t) + Bu(t) y(t) = Cx(t) References Outline n−1 Introduction Observability given by rank(C, CA,..., CA ) Linear/Nonlinear The X4 example Once the observability has been checked, define the Linear observer: approaches Antiwindup ˙ Linearization x^(t) = Ax^ + Bu(t) + L(^y(t) − y(t)) Gain scheduling y^(t) = Cx^(t) Stability 

Nonlinear approaches with L such that <(eig(A + LC)) < 0. CLF Then x^ tends to x asymptotically with a speed Sliding mode Geometric related to eig(A + LC) control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 160 / 174 Nonlinear Control N. Marchand Linear systems (cntd.):

References convergence of the observer

Outline Define the error e(t) :=x ^(t) − x(t). Then:

Introduction Linear/Nonlinear e˙(t) = Ae(t) + L(^y(t) − y(t)) = (A + KC)e(t) The X4 example Linear approaches Hence, if <(eig(A + LC)) < 0, limt x^(t) = x(t) Antiwindup Separation principle: the controller and the observer can Linearization →∞ Gain scheduling be designed separately, if each are stable, their association Stability will be stable Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 161 / 174 Linear systems (cntd.): Kalman filter

˙ Nonlinear x^(t) = Ax^(t) + Bu(t) + L(^y(t) − y(t)) Control y^(t) = Cx^(t) N. Marchand 

References The way to chose L proposed by Kalman is: Outline Introduction AP + PAT − PC T W −1CP + V + δP = 0 Linear/Nonlinear The X4 example W = W T > 0 Linear T −1 approaches L = −PC W Antiwindup Linearization T Gain scheduling with δ > 2 A or V = V > 0. k k Stability δ enables to tunes the speed of convergence of the

Nonlinear observer approaches The observer can also be computed as L = −S −1C T W −1 CLF Sliding mode where Geometric control Recursive T T −1 techniques A S + SA − C W C + SVS + δS = 0 X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 162 / 174 Time-varying linear systems:

Nonlinear x˙ (t) = A(t)x(t) + B(t)u(t) Control y(t) = C(t)x(t) N. Marchand

References Kalman filter:

Outline x^˙ = A(t)^x(t) + B(t)u(t) + L(t)(^y(t) − y(t)) Introduction Linear/Nonlinear y^(t) = C(t)^x(t) The X4 example  Linear T T −1 approaches with: P˙ = AP + PA − PC W CP + V + δP Antiwindup Linearization T Gain scheduling P(0) = P0 = P0 > 0 Stability W = W T > 0 Nonlinear T −1 approaches L = −PC W CLF T Sliding mode δ > 2 A or V = V > 0 Geometric control k k Recursive techniques δ enables to tunes the speed of convergence of the X4 stabilization Observers observer

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 163 / 174 The observer can also be computed as L = −S−1C T W −1 where Nonlinear Control ˙ T T −1 N. Marchand −S = A S + SA − C W C + SVS + δS T References S(0) = S0 = S0 > 0

Outline

Introduction The observer is optimal in the sense that it minimizes Linear/Nonlinear The X4 example t T −1 Linear [C(τ)z(τ) − y(τ)] W [C(τ)z(τ) − y(τ)] + approaches 0 Antiwindup Z Linearization T −1 Gain scheduling [B(τ)u(τ)] V [B(τ)u(τ)] dτ + Stability T −1 (x0 −x ^0) P0 (x0 −x ^0) Nonlinear approaches CLF The observer is also optimal for Sliding mode Geometric x is affected by a white noise wx of variance V control Recursive y is affected by a white noise wy of variance W techniques X4 stabilization wx and wy are uncorrelated Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 164 / 174 Nonlinear systems:

Nonlinear Control x˙ (t) = f (x(t), u(t)) N. Marchand y(t) = h(x(t))

References Observability Outline

Introduction Linked with the notion that for two trajectories of the Linear/Nonlinear system x1 and x2 defined on [0, t], we must have The X4 example Linear t approaches Antiwindup h(x1(τ)) − h(x2(τ)) dτ > 0 if x1 = x2 Linearization 0 k k 6 Gain scheduling Z Stability Linked with the input:

Nonlinear approaches 0 u CLF x˙ = x y = 1 0 x Sliding mode 0 0 Geometric   control  Recursive techniques is observable for any u(t) = 0 but not for u(t) = 0 X4 stabilization 6 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 165 / 174 Extended Kalman filter (EKF):

Nonlinear Control x^˙ = f (x(t), u(t)) − L(t)(^y(t) − y(t)) N. Marchand  y^(t) = h(^x(t)) References Outline with P˙ = AP + PAT − PC T W −1CP + V + δP Introduction T Linear/Nonlinear P(0) = P0 = P0 > 0 The X4 example T Linear W = W > 0 approaches T −1 Antiwindup L = PC W Linearization Gain scheduling δ > 2 A or V = V T > 0 Stability k k ∂f ∂h Nonlinear A = (^x(t), u(t)) C = (^x(t)) approaches ∂x ∂x CLF Sliding mode Geometric No guarantee of convergence (except for specific control Recursive techniques structure conditions) X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 166 / 174 Luenberger-Like observers For a system of the form:

Nonlinear x˙ (t) = Ax(t) + φ(Cx(t), u) Control y(t) = Cx(t)

N. Marchand with (A, C) observable, if A − KC is stable, an observer is: References ˙ Outline x^(t) = Ax^(t) + φ(y(t), u(t)) − K(Cx^(t) − y(t))

Introduction Linear/Nonlinear For a system of the form: The X4 example Linear x˙ (t) = A0x(t) + φ(x(t), u(t)) approaches y(t) = C0x(t) Antiwindup Linearization Gain scheduling with (A0, C0) are in canonical form, if A0 − K0C0 is stable, λ Stability sufficiently large, φ global lipschitz and

Nonlinear ∂φi approaches (x, u) = 0 for j i + 1 CLF ∂xj ≥ Sliding mode Geometric control an observer is: Recursive techniques ˙ 2 n X4 stabilization x^(t) = A0x^(t) + φ(^x(t), u(t)) − diag(λ, λ , . . . , λ )K0(C0x^(t) − y(t)) Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 167 / 174 Kalman-Like observers

Nonlinear For a system of the form: Control N. Marchand x˙ (t) = A(u(t))x(t) + B(u(t)) y(t) = Cx(t) References Outline an observer is: Introduction Linear/Nonlinear ˙ The X4 example x^(t) = A(u(t))^x(t) + B(u(t)) − K(t)(Cx^(t) − y(t)) Linear approaches with Antiwindup Linearization T T −1 Gain scheduling P˙ = A(u(t))P + PA (u(t)) − PC W CP + V + δP Stability T T P(0) = P0 = P0 > 0, W = W > 0 Nonlinear T approaches δ > 2 A(u(t)) or V = V > 0 CLF k T −1 k Sliding mode L = PC W Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 168 / 174 Kalman-Like observers (cntd.) For a system of the form:

x˙ (t) = A (u(t), y(t))x(t) + φ(x(t), u(t)) Nonlinear 0 Control y(t) = C x(t) 0 N. Marchand with:

References 0 a12(u, y) 0 . Outline .. A0(u, y) =   bounded Introduction a (u, y)  n−1n  Linear/Nonlinear 0 0  The X4 example     C0 = 1 0 0 Linear ··· approaches ∂φi Antiwindup (x, u) = 0 for j i + 1  Linearization ∂xj ≥ Gain scheduling Stability an observer is:

Nonlinear 2 n x^˙ = A(u, y)^x + φ(^x, u) − diag(λ, λ , . . . , λ )K0(t)(C0x^ − y) approaches CLF ˙ T T −1 Sliding mode with P = λ A(u(t))P + PA (u(t)) − PC W CP + δP Geometric T T control P(0) =P0 = P0 > 0, W = W > 0  Recursive techniques δ > 2 A(u(t)) and λ large enough X4 stabilization k k L = PC T W −1 Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 169 / 174 Nonlinear Control N. Marchand Not mentionned:

References Optimal observers (robust, very efficient and easy to Outline tune but costly) Introduction Based on something like: Linear/Nonlinear The X4 example t1 Linear approaches x^ = Arg min h(x(τ)) − y(τ)) dτ Antiwindup x(·) t0 k k Linearization Z Gain scheduling Stability Sliding mode observers

Nonlinear approaches CLF Sliding mode Geometric control Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 170 / 174 Observers Application to the attitude estimation Nonlinear Application: attitude estimation Control 9 sensors: N. Marchand 3 triax accelerometers References 3 triax gyrometers 3 triax magnetometers Outline The accelerometers give: Introduction Linear/Nonlinear The X4 example ~bacc = C(q)( ~a + ~g ) + ηacc Linear acceleration gravity noise approaches Antiwindup 2 T |{z} T |{z} |{z} Linearization where C(q) = (q0 − ~q ~q)I3 + 2(~q~q − q0~q×) is called the Gain scheduling Rodrigues matrix, that is the rotation from the fixed frame to the Stability mobile one. Nonlinear The magnetometers give: approaches CLF Sliding mode ~bmag = C(q)~hmag + ηmag Geometric control noise Recursive techniques X4 stabilization |{z} where ~hmag are the coordinates of the magnetic field in the fixed Observers frame.

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 171 / 174 Observers Application to the attitude estimation

Nonlinear Control The gyrometers give:

N. Marchand ~ bgyr = ω + ηgyr1 + νgyr1 References

Outline noise bias

Introduction Linear/Nonlinear where ~h are the coordinates|{z of} the|{z magnetic} field in The X4 example mag Linear the fixed frame. approaches The bias drift is the main error and it deteriorates the Antiwindup Linearization Gain scheduling accuracy of the rate gyros on the low frequency band. Stability We take: ~ Nonlinear bgyr = ω + ηgyr1 + νgyr1 approaches ν˙ = − 1 ν + η CLF gyr1 τ gyr1 gyr2 Sliding mode  Geometric  noise control Recursive techniques X4 stabilization  |{z} Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 172 / 174 Observers Application to the attitude estimation

Nonlinear Control N. Marchand Nonlinear observer for attitude estimation References An observer of the attitude can be: Outline ˙ 1 ~ Introduction q^ = 2 Ω(bgyr −ν ^gyr1 + K1ε)^q Linear/Nonlinear ν^˙ = −T 1ν^ − K ε The X4 example 2 Linear approaches where T is a diagonal matrix of time constant, K are positive Antiwindup i Linearization ε Gain scheduling definite matrices, is given by: Stability

Nonlinear ε = ~qe sign(qe0 ) approaches CLF Sliding mode where qe = (qe0 ,~qe ) is the quaternion error between the Geometric control estimate q^ and a direct projection obtained with ~bmag and ~bacc Recursive techniques X4 stabilization Observers

N. Marchand (gipsa-lab) Nonlinear Control Master PSPI 2009-2010 173 / 174 where T is a diagonal matrix of time constants and Ki, i = 1, 2 are chosen to be positive definite matrices. qˆ(t) is a prediction of the attitude at time t, obtained by propagating the kinematics equation using the measured angular velocity, the bias estimate and ε which depends on the discrepancy qe between qˆ(t) and the one obtained from the accelerometers and the magnetometers (20):

8 γϕ ϕT q (t) = I i i qˆ(t) (27) ms  4 − α + ϕT ϕ  j=1 i i Y    1 T q =q ˆ(t) q− (t) = [q ~q ] (28) e Observers⊗ ms e0 e

Application toε = the~qe attitudesign(qe estimationo ) (29) Nonlinear Control It is possible to demonstrate that the error model for (25) and T T T Fig. 4. Constant bias estimated, error estimation, variant bias estimated N. Marchand (26) has the equilibrium state [q ˜b ] = [ 1 0 0 0 0 0 0] e ± and is exponentially stable [19]. References Block diagram of the observer Euler angles. As can be shown, after large angular velocity Outline change over a long period, the CAN has a low convergence Introduction Linear/Nonlinear rate (approx. 1 min) compared to the one archived with our The X4 example observer. Linear approaches Antiwindup Linearization Gain scheduling Stability

Nonlinear approaches CLF Sliding mode Geometric control Fig. 3. Block diagram showing the attitude estimation Recursive techniques X4 stabilization The complet schema of the attitude observer is given in Observers Fig. 3.

N. Marchand (gipsa-lab) Remark 2: supposeNonlinear Controlthat the rigid bodyMaster has a PSPI slow 2009-2010 angular 174 / 174 velocity that q qms φ(q, qms) ρ, thus (27) can be k − k≈ ≤ 8 T γ ϕiϕ j=1 i approximated by: qms(t) = I4 8 T qˆ(t). − α+ ϕi ϕi  P j=1  C. Simulation Study P Fig. 5. Experimental Data The proposed observed Fig. 3. is compared to the existing methods (namely, the multiplicative Extended (MEKF) and the Additive Kalman Filter (AEKF)). Initial IV. FOUR-ROTORHELICOPTERDYNAMICS conditions are set to extreme error values in order to assess This helicopter has four fixed-pitch rotors mounted at the effectiveness of the new observer. These results are the four ends of a simple cross frame. On this platform, depicted in Fig. 4. given that the front and rear motors rotate counter-clockwise The proposed method performances are similar to those of while the other two rotate clockwise, gyroscopic effects and the Extended Kalman Filter (Multiplicative and Additive). aerodynamic torques tend to cancel in trimmed flight, see However, for extreme errors the convergence rate for our Fig. 2. The collective input (or throttle input) is the sum observer is higher. of the thrusts of each motor. Pitch movement is obtained by increasing (reducing) the speed of the rear motor while D. Experimental results reducing (increasing) the speed of the front motor. The roll A Commercial Attitude Unit (CAU) [24] is used to acquire movement is obtained similarly using the lateral motors. the data instead of the MEMS sensors presented in section The yaw movement is obtained by increasing (decreasing) II. This CAU also provides the Euler angles. The observer the speed of the front and rear motors while decreasing depicted in Fig. 3 is implemented in real-time using the (increasing) the speed of the lateral motors. This should LabView environment. Remember that the attitude estimate be done while keeping the total thrust constant. In order is computed using a unit quaternion formulation. For com- to model the , two frames are defined, parison purpose, the estimate quaternion is converted into Fig. 2. According to [1] and to the kinematics equation