<<

EL2620 2010 EL2620 2010

Output Feedback and State Feedback

x˙ = f(x, u) EL2620 y = h(x) • Output feedback: Find u = k(y) such that the closed-loop Lecture 10 x˙ = f x, k h(x) • Exact feedback linearization has nice properties.  • Input-output linearization • State feedback: Find u = ℓ(x) such that • Lyapunov-based control design methods x˙ = f(x,ℓ(x)) has nice properties.

k and ℓ may include dynamics.

Lecture 10 1 Lecture 10 2

EL2620 2010 EL2620 2010

Nonlinear Observers What if x is not measurable? x˙ = f(x, u), y = h(x) Nonlinear Controllers Simplest observer ˙ • Nonlinear dynamical controller: z˙ = a(z,y), u = c(z) x = f(x, u) Feedback correction, as in linearb case,b • Linear dynamics, static nonlinearity: z˙ = Az + By, u = c(z) x˙ = f(x, u) + K(y − h(x)) • Linear controller: z˙ = Az + By, u = Cz Choices of K b b b • Linearize f at x0, find K for the linearization • Linearize f at x(t), find K = K(x) for the linearization Second case is called Extended b b

Lecture 10 3 Lecture 10 4 EL2620 2010 EL2620 2010

Exact Feedback Linearization

Consider the nonlinear control-affine system x˙ = f(x) + g(x)u

Some state feedback control approaches idea: use a state-feedback controller u(x) to make the system linear

• Exact feedback linearization Example 1: 3 • Input-output linearization x˙ = cos x − x + u • Lyapunov-based design - backstepping control The state-feedback controller u(x) = − cos x + x3 − kx + v

yields the linear system x˙ = −kx + v

Lecture 10 5 Lecture 10 6

EL2620 2010 EL2620 2010

Another Example Diffeomorphisms A nonlinear state transformation z = T (x) with x˙ 1 = a sin x2 2 • T invertible for x in the domain of interest x˙ 2 = −x + u 1 − • T and T 1 continuously differentiable How do we cancel the term sin x2? is called a diffeomorphism Perform transformation of states into linearizable form: Definition: A

z1 = x1, z2 =x ˙ 1 = a sin x2 x˙ = f(x) + g(x)u yields is feedback linearizable if there exist a diffeomorphism T whose 2 z˙1 = z2, z˙2 = a cos x2(−x1 + u) domain contains the origin and transforms the system into the form and the linearizing control becomes x˙ = Ax + Bγ(x)(u − α(x)) v u(x) = x2 + , x ∈ [−π/2, π/2] 1 a cos x 2 with (A,B) controllable and γ(x) nonsingular for all x in the domain 2 of interest.

Lecture 10 7 Lecture 10 8 EL2620 2010 EL2620 2010

Exact vs. Input-Output Linearization The example again, but now with an output Input-Output Linearization 2 x˙ 1 = a sin x2, x˙ 2 = −x1 + u, y = x2 Use state feedback u(x) to make the control-affine system 2 • The control law u = x1 + v/a cos x2 yields x˙ = f(x) + g(x)u −1 z˙1 = z2 ;z ˙2 = v ; y = sin (z2/a) y = h(x) which is nonlinear in the output. linear from the input v to the output y • If we want a linear input-output relationship we could instead use • The general idea: differentiate the output, y = h(x), p times 2 untill the control u appears explicitly in y(p), and then determine u u = x1 + v so that to obtain y(p) = v x˙ 1 = a sin x2, x˙ 2 = v, y = x2 i.e., G(s) = 1/sp which is linear from v to y (but what about the unobservable state x1?)

Lecture 10 9 Lecture 10 10

EL2620 2010 EL2620 2010

Lie Derivatives Example: controlled van der Pol equation Consider the nonlinear SISO system x˙ = x n 1 2 x˙ = f(x) + g(x)u ; x ∈ R , u ∈ R1 2 x˙ 2 = −x1 + ǫ(1 − x1)x2 + u y = h(x), y ∈ R y = x1 The derivative of the output Differentiate the output dh dh y˙ = x˙ = (f(x) + g(x)u) , Lf h(x) + Lgh(x)u y˙ =x ˙ 1 = x2 dx dx 2 where L h(x) and L h(x) are the Lie derivatives (L h is the y¨ =x ˙ 2 = −x1 + ǫ(1 − x1)x2 + u f g f derivative of h along the vector field of x˙ = f(x)) The state feedback controller Repeated derivatives 2 − − ⇒ k−1 u = x1 ǫ(1 x1)x2 + v y¨ = v d(L h) d(L h) Lkh(x) = f f(x), L L h(x) = f g(x) f dx g f dx

Lecture 10 11 Lecture 10 12 EL2620 2010 EL2620 2010

Lie derivatives and relative degree Example • The relative degree p of a system is defined as the number of The controlled van der Pol equation integrators between the input and the output (the number of times

y must be differentiated for the input u to appear) x˙ 1 = x2 2 • A linear system x˙ 2 = −x1 + ǫ(1 − x1)x2 + u m y = x1 Y (s) b0s + . . . + bm = n n−1 U(s) s + a1s + . . . + an Differentiating the output has relative degree p = n − m y˙ =x ˙ 1 = x2 • A nonlinear system has relative degree p if 2 y¨ =x ˙ 2 = −x1 + ǫ(1 − x1)x2 + u i−1 p−1 LgLf h(x) = 0, i = 1,...,p−1 ; LgLf h(x) =6 0 ∀x ∈ D Thus, the system has relative degree p = 2

Lecture 10 13 Lecture 10 14

EL2620 2010 EL2620 2010

The input-output linearizing control

Consider a nth order SISO system with relative degree p and hence the state-feedback controller x˙ = f(x) + g(x)u 1 y = h(x) p u = p−1 −Lf h(x) + v LgLf h(x) Differentiating the output  results in the linear input-output system =0 dh (p) y˙ = x˙ = Lf h(x) + Lgh(x)u y = v dx z }| { . . (p) p p−1 y = Lf h(x) + LgLf h(x)u

Lecture 10 15 Lecture 10 16 EL2620 2010 EL2620 2010

Zero Dynamics van der Pol again

• Note that the order of the linearized system is , corresponding to p x˙ 1 = x2 the relative degree of the system 2 x˙ 2 = −x1 + ǫ(1 − x1)x2 + u • Thus, if p

Lecture 10 17 Lecture 10 18

EL2620 2010 EL2620 2010

A simple introductory example

Lyapunov-Based Control Design Methods Consider x˙ = cos x − x3 + u x˙ = f(x, u) Apply the linearizing control • Find stabilizing state feedback u = u(x) u = − cos x + x3 − kx • Verify stability through Control Lyapunov function Choose the Lyapunov candidate V (x) = x2/2 • Methods depend on structure of f V (x) > 0 , V˙ = −kx2 < 0 Here we limit discussion to Back-stepping control design, which require certain f discussed later. Thus, the system is globally asymptotically stable

But, the term x3 in the control law may require large control moves!

Lecture 10 19 Lecture 10 20 EL2620 2010 EL2620 2010

Simulating the two controllers Simulation with x(0) = 10 The same example x˙ = cos x − x3 + u State trajectory Control input 10 linearizing 1000 Now try the control law non−linearizing linearizing 9 non−linearizing

800 u = − cos x − kx 8 7 600 Choose the same Lyapunov candidate V (x) = x2/2 6 5 400 State x ˙ 4 2 4 Input u V (x) > 0 , V = −x − kx < 0 200 3

2 Thus, also globally asymptotically stable (and more negative V˙ ) 0 1

0 −200 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 time [s] time [s]

The linearizing control is slower and uses excessive input

Lecture 10 21 Lecture 10 22

EL2620 2010 EL2620 2010

Back-Stepping Control Design

We want to design a state feedback u = u(x) that stabilizes Suppose the partial system x˙ 1 = f(x1) + g(x1)x2 (1) x˙ 1 = f(x1) + g(x1)¯v x˙ 2 = u can be stabilized by v¯ = φ(x1) and there exists Lyapunov fcn at x = 0 with f(0) = 0. V1 = V1(x1) such that Idea: See the system as a cascade connection. Design controller first for the inner loop and then for the outer. dV1 V˙1(x1) = f(x1) + g(x1)φ(x1) ≤−W (x1) u x2 x1 dx1   g(x1) for some positive definite function W . R R This is a critical assumption in backstepping control! f()

Lecture 10 23 Lecture 10 24 EL2620 2010 EL2620 2010

˙ The Trick Introduce new state ζ = x2 − φ(x1) and control v = u − φ:

x˙ 1 = f(x1) + g(x1)φ(x1) + g(x1)ζ Equation (1) can be rewritten as ζ˙ = v x˙ 1 = f(x1) + g(x1)φ(x1) + g(x1)[x2 − φ(x1)] x˙ = u where 2 dφ dφ φ˙(x ) = x˙ = f(x ) + g(x )x x2 1 1 1 1 2 u x1 dx1 dx1   g(x1) u ζ x1 R R g(x1) −φ(x1) f + gφ R R −φ˙(x1) f + gφ

Lecture 10 25 Lecture 10 26

EL2620 2010 EL2620 2010

2 Back-Stepping Lemma Consider V2(x1,x2) = V1(x1) + ζ /2. Then, T Lemma: Let − and dV1 dV1 z =(x1,...,xk 1) V˙2(x1,x2) = f(x1) + g(x1)φ(x1) + g(x1)ζ + ζv dx1   dx1 z˙ = f(z) + g(z)xk dV 1 x˙ k = u ≤−W (x1) + g(x1)ζ + ζv dx1 Assume , , Choosing φ(0) = 0 f(0) = 0 dV1 z˙ = f(z) + g(z)φ(z) v = − g(x1) − kζ, k> 0 dx1 gives stable, and V (z) a Lyapunov fcn (with V˙ ≤−W ). Then, V˙ (x ,x ) ≤−W (x ) − kζ2 2 1 2 1 dφ dV Hence, x = 0 is asymptotically stable for (1) with control law u = f(z) + g(z)xk − g(z) − (xk − φ(z)) dz   dz u(x) = φ˙(x) + v(x). 2 If V1 radially unbounded, then global stability. stabilizes x = 0 with V (z)+(xk − φ(z)) /2 being a Lyapunov fcn.

Lecture 10 27 Lecture 10 28 EL2620 2010 EL2620 2010

Strict Feedback

Back-stepping Lemma can be applied to stabilize systems on strict feedback form:

x˙ 1 = f1(x1)+ g1(x1)x2 x˙ 2 = f2(x1,x2)+ g2(x1,x2)x3 2 minute exercise: Give an example of a linear system x˙ 3 = f3(x1,x2,x3)+ g3(x1,x2,x3)x4 x˙ = Ax + Bu on strict feedback form. . .

x˙ n = fn(x1,...,xn)+ gn(x1,...,xn)u

where gk =6 0

Note: x1,...,xk do not depend on xk+2,...,xn.

Lecture 10 29 Lecture 10 30

EL2620 2010 EL2620 2010

Back-Stepping Example

Back-Stepping Lemma can be applied recursively to a system Design back-stepping controller for 2 x˙ = f(x) + g(x)u x˙ 1 = x1 + x2, x˙ 2 = x3, x˙ 3 = u

on strict feedback form. Step 0 Verify strict feedback form Step 1 Consider first subsystem Back-stepping generates stabilizing feedbacks φk(x1,...,xk) (equal to u in Back-Stepping Lemma) and Lyapunov functions 2 x˙ 1 = x1 + φ1(x1), x˙ 2 = u1 2 Vk(x1,...,xk) = Vk−1(x1,...,xk−1) + [xk − φk−1] /2 2 where φ1(x1) = −x1 − x1 stabilizes the first equation. With 2 by “stepping back” from x1 to u (see Khalil pp. 593–594 for details). V1(x1) = x1/2, Back-Stepping Lemma gives Back-stepping results in the final state feedback 2 2 u1 =(−2x1 − 1)(x1 + x2) − x1 − (x2 + x1 + x1) = φ2(x1,x2) 2 2 2 u = φn(x1,...,xn) V2 = x1/2+(x2 + x1 + x1) /2

Lecture 10 31 Lecture 10 32 EL2620 2010 EL2620 2010

Step 2 Applying Back-Stepping Lemma on

2 x˙ 1 = x1 + x2 x˙ = x 2 3 Next Lecture x˙ 3 = u

gives • Gain scheduling dφ dV u = u = 2 f(z) + g(z)x − 2 g(z) − (x − φ (z)) • Nonlinear controllability (How to park a car) 2 dz  n dz n 2

∂φ2 2 ∂φ2 ∂V2 = (x1 + x2) + x3 − − (x3 − φ2(x1,x2)) ∂x1 ∂x2 ∂x2 which globally stabilizes the system.

Lecture 10 33 Lecture 10 34