control systems ii - ethz.ch · jacopo tani sub: claudio ruch institute for dynamic systems and...

40
Control Systems II Lecture 12: Elements of Nonlinear Control Readings: Khalil, H. K. (1996). Noninear systems. Prentice-Hall, New Jersey, 2(5), 5-1. Jacopo Tani sub: Claudio Ruch Institute for Dynamic Systems and Control D-MAVT ETH Z¨ urich May 25, 2018 J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 1 / 40

Upload: truongcong

Post on 10-Dec-2018

237 views

Category:

Documents


5 download

TRANSCRIPT

Control Systems IILecture 12: Elements of Nonlinear Control

Readings: Khalil, H. K. (1996). Noninear systems. Prentice-Hall, New Jersey,2(5), 5-1.

Jacopo Tani sub: Claudio Ruch

Institute for Dynamic Systems and ControlD-MAVT

ETH Zurich

May 25, 2018

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 1 / 40

Big Picture Slide

Control Systems I: analysis and synthesis of single-input, single-output (SISO)control systems:

Mostly linear and time-invariant (LTI) systems.Various analysis methods and tools, e.g., root-locus method, bode plots,Nyquist criterion, controllability and observability tests, ...Various controller design methods, e.g., PID, loop-shaping, plant inversion,...

Control Systems II: extension to multiple-input, multiple-output control (MIMO)systems:

Again, mostly LTI.Analysis: singular value plots, small gains theorem, ...Controller design: LQR, state observers, H∞, ...

Today: very brief introduction to nonlinear systems and control.

What can go wrong in nonlinear case?What to do about it?

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 2 / 40

Recap: H∞ optimal control

In H∞ control, we consider the following closed-loop system representation with an”extended system” Tzw :

w z

u y

C(s)

extended

systemm1

m2 p2

p1

H2 design methods (includes LQR) minimize ||Tzw ||2, corresponding to the energyof performance output.

H∞ design methods minimize ||Tzw ||∞, corresponding to the worst-case of theperformance output.

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 3 / 40

Recap: Extended System

In class, we have analyzed one possible extended system to use in H∞ design:

ze

zu

zy

w = r

C(s)

P(s) eu y

We(s)

Wu(s)

Wy (s)

extended system

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 4 / 40

Recap: Frequency Domain Constraints

S(s), T (s) and R(s): acceptable upper bounds for the sensitivity S(s), thecomplementary sensitivity T (s) and the transfer function R → U, C(s)S(s).

Set We(s) = S−1(s), Wu(s) = R−1(s) and Wy (s) = T−1(s).

H∞ control problem: for sufficiently small number γ ∈ R>0 find C(s) such that:∣∣∣∣∣∣∣∣∣∣∣∣ We(s)S(s)Wu(s)C(s)S(s)Wy (s)T (s)

∣∣∣∣∣∣∣∣∣∣∣∣∞

≤ γ

H∞ problem has solution for γ = 1⇒ specifications for the S(s), T (s) and C(s)S(s) satisfied

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 5 / 40

Recap: State Space Representation of Extended System

Formulate Tzw in state space: Introduce (Aext ,Bext ,Cext ,Dext) andxext = [xs , xe , xu, xy ]T :

xxexuxy

= Aext

xxexuxy

+ Bext

[wu

]zezuzye

= Cext

xxexuxy

+ Dext

[wu

]

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 6 / 40

Recap: H∞ Control Design Solution Steps

H∞ is a powerful design method, but easy to get lost in the complexity of theimplementation.

Ensure to follow a cleanly planned step by step design process:

1 Derive a model of your plant, chose measured outputs y and control signals uand get to know the plant with analysis methods.

2 Chose an implementation scheme for the extended system, i.e., define w , z .3 Derive the transfer function Tzw of the extended system in frequency domain.4 Chose the weight functions W•(s) for all components of your performance

output z .5 Find the state space representation of the extended system, i.e.,

(Aext ,Bext ,Cext ,Dext).6 Evaluate the conditions for the existence of a solution to the H∞ control

problem.7 Solve the H∞ control problem.8 If necessary, reduce the order of C(s).9 Implement in digital control.

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 7 / 40

Motivation

Control Systems I, Lecture 2, Slide 16:

x(t) =d

dtx(t) = f (x(t), u(t))

y(t) = = g (x(t), u(t))

So far: neglected possibility of f (x(t), u(t)) or g (x(t), u(t)) being nonlinear,focused on linear time-invariant systems.

f and / or g nonlinear ⇒ nonlinear system.

How to handle?

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 8 / 40

Equilibrium Point and Linearization

Nonlinear system:

x(t) = f (x(t), u(t))

y(t) = g (x(t), u(t))

Equilibrium point: (xe , ue) such that 0 = f (xe , ue)

Linearized system:

δx(t) = Aδx + Bδu

δy(t) = Cδx + Dδu

With:

A =∂f

∂x(x , u)

∣∣∣∣x=xe ,u=ue

B =∂f

∂u(x , u)

∣∣∣∣x=xe ,u=ue

C =∂g

∂x(x , u)

∣∣∣∣x=xe ,u=ue

C =∂g

∂u(x , u)

∣∣∣∣x=xe ,u=ue

and

δx = x − xe δu = u − ue δy = y − ye

Standard approach (especially for regulation problems): linearize nonlinear systemin equilibrium point, control linearized system.

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 9 / 40

Example: Depth Control of an Underwater Robot

g

V (t), n(t), p(t)

S

d(t)

y(t)

u(t)

m

Task: Depth control of underwaterrobot with surface controlled air tank.

Neglected: forces of the air tube on therobot, lateral dynamics, nonideal gasbehavior, friction in water, air mass,...

Depth d(t), air voume V (t), amountof air in mol n(t), pressure of the airp(t), center of mass S , mass m.

Water density ρ, gravitationalacceleration g , surface pressure p0,universal gas constant Rm, constantwater temperature T

Control input on mass flow u(t)

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 10 / 40

Example: Depth Control of an Underwater Robot

g

V (t), n(t), p(t)

S

d(t)

y(t)

u(t)

m

Impulse conservation yields:

md = mg − V ρg

p can be computed with Pascale’s law:

p(d) = ρgd + p0

The ideal gas law is used to calculatethe volume V :

V = T · Rmn

p

We can control the amount of air asfollows: n = αu

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 11 / 40

Example: Depth Control of an Underwater Robot

States: x1 = p = ρ · g · d + p0, x2 = d , x3 = n.

Nonlinear system:x1

x2

x3

=

c1x2

c2 − c3x3x1

0

+

00α

u

With c1 = ρg , c2 = g , c3 = ρg TRmm

.

Assumption: system operates in range [0, 100] m, x1 measurable.

Equilibrium point: x1,e = pe , x2,e = 0, x3,e = c2c3pe and ue = 0.

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 12 / 40

Example: Depth Control of an Underwater Robot

Controller designed for plant linearized at de = 50m resulting in

Clin(s) = −2.4e06s4−8.76e07s3−6.588e08s2−1.847e09s−1.782e09s5+400s4+60000s3+4e06s2+1e08s

Response to disturbance with Clin operating at d = de = 50m:

Response to disturbance with Clin operating at d = 11.5m:

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 13 / 40

Stability

Definition: The equilibrium point xeq of x = f (x) is

stable if for each ε > 0 there is δ > 0 (dependent of ε) such that

||x(0)− xeq|| < δ → ||x(t)− xeq|| < ε, ∀t ≥ 0

unstable if it is not stable.asymptotically stable if it is stable and δ can be chosen such that

||x(0)− xeq|| < δ → limt→∞

x(t) = xeq

Linear systems:

Asymptotically stable ⇔ Re(λi ) < 0 ∀λi ∈ eig(A)Stability of an equilibrium point does not depend on the point itself.

For nonlinear systems, it does!

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 14 / 40

Example: Multiple Equilibria

Frictionless pendulum:

ϕ

mg

l

ϕ = − glsin(ϕ), x1 = ϕ, x2 = ϕ

Equilibrium ϕ = π, ϕ = 0 is unstable, equilibrium ϕ = 0, ϕ = 0 is stable.

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 15 / 40

Local Stability

Let x = xeq be an equilibrium point for the nonlinear system

x = f (x)

where f : D → Rn is continuously differentiable and D is a neighborhood of xeq. Let

A =∂f

∂x(x)

∣∣∣∣x=xeq

Then,

1 xeq is asymptotically stable if Re(λi ) < 0 for all eigenvalues of A.2 xeq is unstable if Re(λi ) > 0 for one or more of the eigenvalues of A.

Linear systems: local stability ⇔ global stability.

Nonlinear systems: local stability 6⇒ global stability

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 16 / 40

Example: Local Stability and Region of Attraction

x = f (x) = x · (x2 − a2) a ∈ R

Local stability analysis at xeq = 0:

A =∂f

∂x(x)

∣∣∣∣x=0

= −a2

⇒ system locally asymptotically stable at xeq = 0.

Phase portrait:

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 17 / 40

Region of Attraction

Definition: Let xeq be an asymptotically stable equilibrium point of the system x = f (x),where f is a locally Lipschitz function defined over a domain D ⊂ Rn and xeq iscontained in D

The region of attraction (also: region of asymptotic stability, domain of attractionor basin) is the set of all points x0 in D such that the solution of

x = f (x) x(0) = x0

is defined for all t ≥ 0 and converges to xeq as t →∞.

xeq is said to be globally asymptotically stable if the region of attraction is thewhole space Rn.

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 18 / 40

Lyapunov Stability

Local: Let x = 0 be an equilibrium point for x = f (x) and D ⊂ Rn be a domaincontaining x = 0. Let V : D → R be a continuously differentiable function, suchthat

V (0) = 0 and V (x) > 0 in D other than 0

V (x) ≤ 0 in D

Then, x = 0 is stable. Moreover, if

V (x) < 0 in D other than 0

then x = 0 is asymptotically stable.

Global: Let x = 0 be an equilibrium point for x = f (x). Let V : Rn → R be acontinuously differentiable function, such that

V (0) = 0 and V (x) > 0 ∀x 6= 0

||x || → ∞ ⇒ V (x)→∞

V (x) < 0 ∀x 6= 0

then x = 0 is globally asymptotically stable.

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 19 / 40

Overview of Nonlinear Control Methods 1

Extend applicability of linear design methods:

Gain scheduling.Integrator anti-windup schemes.

Geometric Control

Feedback linearization.Differential flatness.Dynamics inversion.

Adaptive Control

Neural network augmentation.

Lyapunov-based methods / Contraction Theory

Control Lyapunov FunctionsSliding Mode ControlBackstepping

Computational / Logic approaches

Hybrid SystemsModel Predictive Control

1Emilio Frazzoli, 16.30/31 Feedback Control Systems, Overview of Nonlinear Control Synthesis, Aeronautics and Astronautics, MIT, 2010

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 20 / 40

Gain Scheduling 2

Nonlinear system: x = f (x , u)

Choose n equilibrium points (xe,i , ui,e), i = 1, ..., n.

For each of these equilibria, linearize the system and design a ”local” control lawui (x) = ui,e − K(x − xi,e) for the linearization.

A global control law consists of:

Choose the right control law, as a function of the state i = σ(x)Use that control law: u(x) = uσ(x)(x)

2Emilio Frazzoli, 16.30/31 Feedback Control Systems, Overview of Nonlinear Control Synthesis, Aeronautics and Astronautics, MIT, 2010

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 21 / 40

Example: Depth Control of an Underwater Robot

Response to disturbance when operating at d = 11.5m (Clin(s)):

Response to disturbance when operating at d = 11.5m ( 0.2Clin(s)):

The plant transfer function shows why: P(s) = −αc1c3

x1,e (s2− c1c3x21,e

)

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 22 / 40

Example: Input-State Feedback Linearization

Reconsider the pendulum with an input term, e.g., two propulsion engines added tothe pendulum:

ϕ

lu(t)

mg

ϕ = − glsin(ϕ) + u(t), x1 = ϕ, x2 = ϕ

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 23 / 40

Example: Input-State Feedback Linearization

Another nonlinear system:

x1 = x2

x2 = (x21 + 1) · c · u(t)

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 24 / 40

Input-State Feedback Linearization

Ability to use feedback to convert a nonlinear state equation into a linear stateequation by canceling nonlinearities requires the nonlinear state equation to havethe structure

x = Ax + Bβ−1(x) [u − α(x)]

with

(A,B) controllable.α : Rn → Rp and β : Rn → Rp×p defined on the domain Dx ⊂ Rn thatcontains the origin.The matrix β(x) is assumed to be nonsingular ∀x ∈ Dx .

Linearize using feedback law

u = α(x) + β(x)v(t)

Resulting in

x = Ax + Bv

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 25 / 40

Input-State Feedback Linearization

Feedback scheme:

rC(s) P(s)

e u

n

y

With Feedback Linearization F (s):

rClin(s) P(s)

e v

n

y

− F (s)u

C(s)

xStateEstimator

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 26 / 40

Example: Input-State Feedback Linearization usingDiffeomorphism

x1 = a · sin(x2)

x2 = −x21 + u

Change of variables z = T (x):

z1 = x1

z2 = a · sin(x2) = x1

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 27 / 40

Input-State Linearizability 3

Change of variables z = T (x) (bijection).

Diffeomorphism: T with both T (·) and T−1(·) are continuously differentiable.

A nonlinear system

x = f (x) + Γ(x) · u

where f : Dx → Rn and Γ : Dx → Rp×p are sufficiently smooth on a domainDx ⊂ Rn is said to be input-state linearizable if there exists a diffeomorphismT : Dx ⊂ Rn such that Dz = T (Dx) contains the origin and the change of variablesz = T (x) transforms the system into the form

z = Az + Bβ−1(x)[u − α(x)]

with (A,B) controllable and β(x) invertible for all x ∈ Dx .

3REF KHALIL TODO

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 28 / 40

Example: Depth Control with Feedback linearization

x = f (x) + Γ(x) ux1

x2

x3

=

c1 · x2

c2 − c3 · x3x1

0

+

00α

u

Use: z1 = x1, z2 = x2, z3 = x3x1

+ c2c3

, then:

z1

z2

z3

=

c1z2

−c3z3

α

z1︸︷︷︸β−1

(c2

c3− z3

)c1z2

α︸ ︷︷ ︸α

+u

State feedback linearization with u = −

(c2c3− z3

)c1z2α

+ z1αv :z1

z2

z3

=

0 c1 00 0 −c3

0 0 0

z1

z2

z3

+

001

v

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 29 / 40

Example: Depth Control with Feedback linearization

Assuming knowledge of x , implemented linear controller with control signal v :

Response to disturbance when operating at d = 50m:

Response to disturbance when operating at d = 11.5m:

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 30 / 40

Differential Flatness definition and equivalence

A dynamical system

x(t) = f (x(t), u(t))

y(t) = g (x(t), u(t))

is said to be differentially flat with flat output z , if one can compute the state andinput trajectories as a function of the flat ouputs and a finite number of itsderivatives, i.e., if one can find a map Ξ such that

(x , u) = Ξ(z , z , ..., z (k)) k finite

Differential flatness can shown to be equivalent to input-state feedbacklinearizability.4

4ON THE EQUIVALENCE BETWEEN DIFFERENTIAL FLATNESS AND DYNAMIC FEEDBACK LINEARIZABILITY, JeanLvine*

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 31 / 40

Underwater Robot Trajectory

Want to follow dref = −D2

(cos(Ωt)− 1), 0 ≤ t ≤ 2πΩ

x1,ref = c1dref + p0 = p0 − c1D2

(cos(Ωt)− 1)

x1,ref = c1x2,ref ⇒ x2,ref = ΩDsin(Ωt)2

x2,ref = Ω2Dcos(Ωt)2

= c2 − c3x3,ref

x1,ref

Therefore x3,ref = x1r ef

(c2c3− Ω2Dcos(Ωt)

2c3

)=

(2c2−DΩ2(cos(tΩ)))(p0− 12

c1D(cos(tΩ)−1))2c3

Finally uref =DΩ(sin(tΩ))(2c1c2+Ω2(c1D+2p0)−2c1DΩ2(cos(tΩ)))

4αc3

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 32 / 40

Underwater Robot Trajectory

Control variable uref trajectory for this differentially flat system:

Tracking under disturbance using feedforward command uref and linear control:

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 33 / 40

Conditions for Feedback Linearizability (General Case)

When can we find a transformation z = T (x) that brings the nonlinear system intothe feedback linearizable form?

x = f (x) + Γ(x) · u

z = Az + Bβ−1(x)[u − α(x)]

Formulate z in terms of derivatives of T :

z =∂T

∂xx =

∂T

∂x[f (x) + Γ(x)u] = Az + Bβ−1(x)[u − α(x)]

The equation must hold in the entire domain of interest for x and u. Evaluate atu = 0 and z = T (x):

∂T

∂x[f (x)] = AT (x)− Bβ−1(x)α(x)

and consequently

∂T

∂x[Γ(x)] = Bβ−1(x)

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 34 / 40

Conditions for Feedback Linearizability (General Case)

x = f (x) + Γ(x) · u (1)

z = Az + Bβ−1(x)[u − α(x)] (2)

T (·) fulfilling these partial differential equations is a necessary and sufficientcondition that a transformation T (·) exists that transforms (1) into (2).

∂T

∂x[f (x)] = AT (x)− Bβ−1(x)α(x)

∂T

∂x[Γ(x)] = Bβ−1(x)

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 35 / 40

Conditions for Feedback Linearizability (1 Input)

Simplifications possible in single-input case (p = 1).

The map z = T (x) is not unique: consider a linear transformation ξ = Mz with Minvertible, we then have

ξ = MAM−1ξ + MBβ−1(x)[u − α(x)]

which is of the same form as (2) but with different matrices A, B.

We remember the controller canonical form from control systems I and chose Msuch that it transforms A and B in the controller canonical form:

[Ac + Bcγ

T Bc

Cc Dc

]=

0 1 0 . . . . . . 0 00 0 1 0 . . . 0 0...

. . .. . .

. . .. . .

... 00 . . . . . . 0 1 0 00 . . . . . . . . . 0 1 0−γ0 −γ1 . . . . . . −γn−2 −γn−1 1

c0 . . . cm 0 . . . 0 0

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 36 / 40

Conditions for Feedback Linearizability (1 Input)

Now we have:

MAM−1 = Ac + BcγT and MB = Bc

with

Ac =

0 1 0 . . . . . . 00 0 1 0 . . . 0...

. . .. . .

. . .. . .

...0 . . . . . . 0 1 00 . . . . . . . . . 0 10 . . . . . . . . . . . . 0

and Bc =

00...01

The term Bcγ

T ξ = BcγTMT (x) is included into the nonlinearity Bcβ

−1(x)α(x)which allows to reformulate the partial differential equations element-wise:

AcT (x)− Bcβ−1(x)α(x) =

T2(x)T3(x)

...Tn−1(x)Tn(x)

and = Bcβ−1(x) =

00...0

1/β(x)

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 37 / 40

Conditions for Feedback Linearizability (1 Input)

Finally:

∂T1

∂xf (x) = T2(x)

∂T1

∂xγ(x) = 0

∂T2

∂xf (x) = T3(x)

∂T2

∂xγ(x) = 0

......

∂Tn−1

∂xf (x) = Tn(x)

∂Tn−1

∂xγ(x) = 0

∂Tn

∂xf (x) = − α(x)/β(x)

∂Tn

∂xγ(x) = 1/β(x) 6= 0

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 38 / 40

Example: Conditions for Feedback Linearizability

The conditions can also be used to find a suitable diffeomorphism to bring thesystem into a feedback-linearizable form.

Consider again the system:[x1

x2

]=

[asin(x2)−x2

1

]+

[01

]u = f (x) + γu

We evaluate ∂T1∂xγ(x) = 0 and see that ∂T1

∂x2= 0.

Using this, T2(x) = ∂T1∂x

f (x) = ∂T1∂x1

asin(x2) + ∂T1∂x2

(−x21 ) = ∂T1

∂x1asin(x2).

Then differentiating T2 = ∂T1∂x1

asin(x2) with respect to x2 and using that T1 isindependent of x2 yields:

∂T2

∂xγ(x) =

∂T2

∂x2=∂T1

∂x1acos(x2) 6= 0

In the domain where cos(x2) 6= 0 this is satisfied by any T1 such that ∂T1∂x16= 0.

Choosing z1 = T1(x) = x1 results in the previously used diffeomorphism:

z1 = x1

z2 = a · sin(x2) = x1

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 39 / 40

Summary

Analysis Methods and Control Synthesis methods taught so far are designed forlinear (time-invariant) SISO and MIMO systems.

Using linearization, they can be used to understand and control many nonlinearsystems as well.

However, nonlinear systems show different behaviors that are not present inlinear systems, e.g., have to consider regions of attractions and stability of eachindividual equilibrium.

In some cases, linear methods will fail, in which case nonlinear control methodsare needed.

Today we have seen a brief intro to these methods and briefly looked at gainscheduling and state-feedback linearization.

Next week: Question session, don’t forget to post!

J. Tani (ETH) Lecture 12: Control Systems II 25/05/2018 40 / 40