You are on page 1of 35

2E1262

2006

2E1262 Nonlinear Control


Automatic Control

Disposition
5 credits, lp 2 28h lectures, 28h exercises, 3 home-works

Instructors
Bo Wahlberg, professor,

bo@ee.kth.se
Krister Jacobsson, teaching assistant,

krister.jacobsson@ee.kth.se
STEX (entrance oor in S3 building), administration,

stex@s3.kth.se
Lecture 1 1

2E1262

2006

Course Goal
To provide participants with a solid theoretical foundation of nonlinear control systems combined with a good engineering understanding You should after the course be able to

understand common nonlinear control phenomena apply the most powerful nonlinear analysis methods use some practical nonlinear design methods

Lecture 1

2E1262

2006

2E1262 Nonlinear Control


Lecture 1

Practical information Course outline Nonlinear control phenomena Nonlinear differential equations

Lecture 1

2E1262

2006

Todays Goal
You should be able to

Recognize some phenomena in nonlinear systems Transform differential equation to rst-order form Mathematically describe saturation, dead-zone, relay, back-lash Derive equilibrium points

Lecture 1

2E1262

2006

Course Information
All info and handouts are available at
http://www.s3.kth.se/control/kurser/2E1262

Get an E computer account for the computer exercise (see STEX) Homeworks are mandatory and have to be handed in on time

Lecture 1

2E1262

2006

Material
Textbook: Khalil, Nonlinear Systems, Prentice Hall, 3rd ed.,
2002. Optional but highly recommended.

Lecture notes: Copies of transparencies Exercises: Class room and home exercises Homeworks: 3 computer exercises to hand in Software: Matlab (provided by KTH Library)
Alternative textbooks (decreasing mathematical brilliance): Sastry, Nonlinear Systems: Analysis, Stability and Control; Vidyasagar, Nonlinear Systems Analysis; Slotine & Li, Applied Nonlinear Control; Glad & Ljung, Reglerteori, ervariabla och olinjara metoder. Only references to Khalil will be given. Two course compendia sold by STEX.
Lecture 1 6

2E1262

2006

Course Outline
Introduction: nonlinear models, computer simulation (L1-L2) Feedback analysis: linearization, stability theory, describing
function (L3-L6)

Control design: compensation, high-gain design, Lyapunov


methods (L7-L10)

Alternatives: gain scheduling, optimal control, neural networks,


fuzzy control (L11-L13)

Summary (L14)

Lecture 1

2E1262

2006

Linear Systems
Denition: Let M be a signal space. The system S linear if for all u, v M and R

: M M is

S(u) = S(u) S(u + v) = S(u) + S(v)


Example: Linear time-invariant systems

scaling superposition

x(t) = Ax(t) + Bu(t), y(t) = Cx(t), x(0) = 0 y(t) = g(t) u(t) = Y (s) = G(s)U (s)
t 0

g( )u(t )d

Notice the importance to have zero initial conditions


Lecture 1 8

2E1262

2006

Linear Systems Have Nice Properties


Local stability=global stability Stability if all eigenvalues of A (or poles of G(s)) are in the left half-plane Superposition Enough to know a step (or impulse) response Frequency analysis possible Sinusoidal inputs give sinusoidal outputs: Y (i) = G(i)U (i)

Lecture 1

2E1262

2006

Linear Models are not Enough


Example:Positioning of a ball on a beam

Nonlinear model:

m(t) = mg sin (t), Linear model: x(t) = g(t) x

Lecture 1

10

2E1262

2006

Can the ball move 0.1 meter in 0.1 seconds from steady state? Linear model (step response with

= 0 ) gives

t2 x(t) 10 0 0.050 2
so that

0.1 0 = 2 rad = 114 0.05


Unrealistic answer. Clearly outside linear region! Linear model valid only if sin

Must consider nonlinear model. Possibly also include other nonlinearities such as centripetal force, saturation, friction etc.

Lecture 1

11

2E1262

2006

2 minute exercise: Find a simple system x = f (x, u) that is stable for a small input step but unstable for large input steps.

Lecture 1

12

2E1262

2006

Stability Can Depend on Reference Signal


Example: Control system with valve characteristic f (u) Process Valve Motor y r 1 1

= u2

(s+1)2

Simulink block diagram:


1 s u2 1 (s+1)(s+1) y

Lecture 1

13

2E1262

2006

S TEP R ESPONSES
0.4

r = 0.2

Output y

0.2 0 0 4

10

15 Time t

20

25

30

r = 1.68 r = 1.72

Output y

0 0 10 Output y 5 0 0

10

15 Time t

20

25

30

10

15 Time t

20

25

30

Stability depends on amplitude of the reference signal! (The linearized gain of the valve increases with increasing amplitude)

Lecture 1

14

2E1262

2006

Stable Periodic Solutions


Example: Position control of motor with back-lash
0 Constant Sum 5 Pcontroller 1 5s 2+s Motor Backlash y

Motor:

G(s) =

1 s(1+5s)

Controller:

K=5

Lecture 1

15

2E1262

2006

Back-lash induces an oscillation Frequency and amplitude independent of initial conditions:


0.5 Output y 0 0.5 0 0.5 Output y 0 0.5 0 0.5 Output y 0 0.5 0

10

20

Time t

30

40

50

10

20

Time t

30

40

50

10

20

Time t

30

40

50

How predict and avoid oscillations?


Lecture 1 16

2E1262

2006

Automatic Tuning of PID Controllers


Relay induces a desired oscillation whose frequency and amplitude are used to choose PID parameters
PID

Relay

A T

Process

1 0 5 10 Time

Lecture 1

17

2E1262

2006

Harmonic Distortion
Example: Sinusoidal response of saturation

a sin t
Saturation

y(t) =

k=1

Ak sin(kt)

Amplitude y

10

a=1
0

2 1 0

10

1 2 0 2 1 0 1 2 3 Time t 4 5

10 Frequency (Hz)

Amplitude y

10

a=2
0

10

1 2 0 1 2 3 Time t 4 5

10 Frequency (Hz)

Lecture 1

18

2E1262

2006

Example: Electrical power distribution Nonlinearities such as rectiers, switched electronics, and transformers give rise to harmonic distortion

Total Harmonic Distortion

k=2

Energy in tone k

Energy in tone 1

Example: Electrical ampliers Effective ampliers work in nonlinear region Introduces spectrum leakage, which is a problem in cellular systems Trade-off between effectivity and linearity

Lecture 1

19

2E1262

2006

Subharmonics
Example: Dufngs equation y + y
0.5

+ y y 3 = a sin(t)

0.5 0 1

10

Time t

15

20

25

30

a sin t

0.5 0

0.5 1 0 5 10 15 20 25 30

Time t

Lecture 1

20

2E1262

2006

Nonlinear Differential Equations


Denition: A solution to

x(t) = f (x(t)), x(0) = x0


over an interval [0, T ] is a C1 function x is fullled.

(1)

: [0, T ] Rn such that (1)

When does there exists a solution? When is the solution unique?


Example:

x = Ax, x(0) = x0 , gives x(t) = exp(At)x0

Lecture 1

21

2E1262

2006

Existence Problems
Example: The differential equation x

= x2 , x(0) = x0 1 0t< x0

x0 has solution x(t) = , 1 x0 t

1 Solution not dened for tf = x0


Solution interval depends on initial condition!

dx Recall the trick: x = x = dt 2 x 1 1 x0 Integrate = t x(t) = x(t) x(0) 1 x0 t


2
Lecture 1 22

2E1262

2006

Finite Escape Time


Simulation for various initial conditions x0
Finite escape time of dx/dt = x2 5 4.5 4 3.5 3

x(t)

2.5 2 1.5 1 0.5 0 0 1 2 3 4 5

Time t

Lecture 1

23

2E1262

2006

Uniqueness Problems
Example:

x=

x, x(0) = 0, has many solutions: (t C)2 /4 t > C 0 tC

x(t) =
2

1.5

1 x(t)

0.5

0.5

1 0

Time t

Lecture 1

24

2E1262

2006

Physical Interpretation
Consider the reverse example, i.e., the water tank lab process with

x = x,

x(T ) = 0

where x is the water level. It is then impossible to know at what time t < T the level was x(t) = x0 > 0. Hint: Reverse time s

= T t ds = dt and thus dx dx = ds dt

Lecture 1

25

2E1262

2006

Lipschitz Continuity
Denition: f : Rn Rn is Lipschitz continuous if there exists L, r > 0 such that for all x, y Br (x0 ) = {z Rn : z x0 < r},

f (x) f (y) L x y

Euclidean norm is given by

Slope L

= x2 + + x 2 1 n

Lecture 1

26

2E1262

2006

Local Existence and Uniqueness


Theorem: If f is Lipschitz continuous, then there exists

> 0 such that

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

x(0) = x0

has a unique solution in Br (x0 ) over [0, ]. Proof: See Khalil, Appendix C.1. Based on the contraction mapping theorem Remarks

= (r, L) f being C 0 is not sufcient (cf., tank example) f being C 1 implies Lipschitz continuity (L = maxxBr (x0 ) f (x))
Lecture 1 27

2E1262

2006

State-Space Models
State x, input u, output y General: Explicit: Afne in u: Linear:

f (x, u, y, x, u, y, . . .) = 0 x = f (x, u), y = h(x) y = h(x)

x = f (x) + g(x)u, x = Ax + Bu,

y = Cx

Lecture 1

28

2E1262

2006

Transformation to Autonomous System


A nonautonomous system

x = f (x, t)
is always possible to transform to an autonomous system by introducing xn+1 = t:

x = f (x, xn+1 ) xn+1 = 1

Lecture 1

29

2E1262

2006

Transformation to First-Order System


Given a differential equation in y with highest derivative express the equation in x Example: Pendulum

= y

dy dt

...

dn1 y dtn1

dn y , dtn

M R2 + k + M gR sin = 0 x=
T

gives

x1 = x2 k g x2 = x sin x1 2 2 MR R
Lecture 1 30

2E1262

2006

Equilibria
Denition: A point (x , u , y ) is an equilibrium, if a solution starting in (x , u , y ) stays there forever. Corresponds to putting all derivatives to zero: General: Explicit: Afne in u: Linear:

f (x , u , y , 0, 0, . . .) = 0 0 = f (x , u ), y = h(x ) 0 = f (x ) + g(x )u , y = h(x ) 0 = Ax + Bu , y = Cx

Often the equilibrium is dened only through the state x

Lecture 1

31

2E1262

2006

Multiple Equilibria
Example: Pendulum

M R2 + k + M gR sin = 0 = = 0 gives sin = 0 and thus = k


Alternatively in rst-order form:

x1 = x2 k g x2 = x sin x1 2 2 MR R x1 = x2 = 0 gives x = 0 and sin(x ) = 0 2 1


Lecture 1 32

2E1262

2006

Some Static and Dynamic Nonlinearities


|u| Abs u e Math Function Saturation

Sign

Dead Zone

LookUp Table

Relay

Backlash

Coulomb & Viscous Friction

Lecture 1

33

2E1262

2006

2 minute exercise: Construct a rate limiter (i.e., a system that limit the rate of change of a signal) using one of the previous models

1 s

Hint: Try a saturation!

Lecture 1

34

2E1262

2006

Next Lecture
Simulation in Matlab Linearization

Lecture 1

35

You might also like