Вы находитесь на странице: 1из 129

# EL2620 Nonlinear Control

Lecture notes
Karl Henrik Johansson, Bo Wahlberg and Elling W. Jacobsen
This revision December 2011

Automatic Control
KTH, Stockholm, Sweden

Preface
Many people have contributed to these lecture notes in nonlinear control.
Originally it was developed by Bo Bernhardsson and Karl Henrik Johansson,
and later revised by Bo Wahlberg and myself. Contributions and comments
by Mikael Johansson, Ola Markusson, Ragnar Wallin, Henning Schmidt,
Krister Jacobsson, Bj
orn Johansson and Torbjorn Nordling are gratefully
acknowledged.

Elling W. Jacobsen
Stockholm, December 2011

Lecture 1

EL2620

Practical information
Course outline
Linear vs Nonlinear Systems
Nonlinear differential equations

Lecture 1

stex@s3.kth.se

## STEX (entrance floor, Osquldasv. 10), course material

hanna.holmqvist@ee.kth.se

Per Hagg,
pehagg@kth.se, farakhi@kth.se

jacobsen@kth.se

Instructors

## 28h lectures, 28h exercises, 3 home-works

7.5 credits, lp 2

Disposition

Lecture 1

EL2620

2011

2011

Course Goal

Todays Goal

Lecture 1

systems

EL2620

Lecture 1

2011

2011

## To provide participants with a solid theoretical foundation of nonlinear

control systems combined with a good engineering understanding

EL2620

Course Outline

Lecture 1

Summary (L14)

2011

methods (L7-L10)

## Control design: compensation, high-gain design, Lyapunov

functions (L3-L6)

## Feedback analysis: linearization, stability theory, describing

simulation (L1-L2)

EL2620

Lecture 1

this!)

KTH Social

Linear Systems

superposition

scaling

Lecture 1

2011

: M M is

x(t)

## = Ax(t) + Bu(t), y(t) = Cx(t), x(0) = 0

! t
y(t) = g(t) " u(t) =
g( )u(t )d

## Example: Linear time-invariant systems

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

## Definition: Let M be a signal space. The system S

linear if for all u, v M and R

EL2620

Lecture 1

6

2011

## Alternative textbooks (decreasing mathematical rigour):

Sastry, Nonlinear Systems: Analysis, Stability and Control; Vidyasagar,
Nonlinear Systems Analysis; Slotine & Li, Applied Nonlinear Control; Glad &
metoder.
Ljung, Reglerteori, flervariabla och olinjara
Only references to Khalil will be given.

Software: Matlab

## Compulsory course items

3 homeworks, have to be handed in on time (we are strict on

Material
Textbook: Khalil, Nonlinear Systems, Prentice Hall, 3rd ed.,

EL2620

## Exercises: Class room and home exercises

Course Information

2011

EL2620

0.1
0
0.05

Lecture 1

## Must consider nonlinear model. Possibly also include other

nonlinearities such as centripetal force, saturation, friction etc.

so that

= 0 ) gives

t2
x(t) 10 0 0.050
2

## Linear model (step response with

Can the ball move 0.1 meter in 0.1 seconds from steady state?

EL2620

Lecture 1

## Frequency analysis possible Sinusoidal inputs give sinusoidal

outputs: Y (i) = G(i)U (i)

11

2011

2011

## Local stability=global stability Stability if all eigenvalues of A (or

poles of G(s)) are in the left half-plane

EL2620

Lecture 1

2011

## Linear Models are not Rich Enough

12

2011

10

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

## Linear models can not describe many phenomena seen in

nonlinear systems

EL2620

Lecture 1

Nonlinear model:

## Linear Models may be too Crude

Approximations
Example:Positioning of a ball on a beam

EL2620

PSfr

1
s

x2

+ f (1 x1 )

!f (x2 xc )

"

0
0

50

100

150

200

10

15

50

50

100
time [s]

Output

100

Input

150

150

200

200

15

2011

0
0

0
0
10

0
0
4

0.2

0.4

10

10

10

15
Time t

15
Time t

15
Time t

20

20

20

25

25

25

S TEP R ESPONSES

30

30

30

2011

Motor:

1
s(1+5s)

Sum

K=5

G(s) =

Constant

P-controller

-1

Motor

5s 2+s

1
Backlash

EL2620

Lecture 1

16

2011

14

Lecture 1

0.7, ! = 0.4

x2
"
1

20

r = 1.72

r = 1.68

r = 0.2

Lecture 1

x1 exp

1
(s+1)(s+1)

Controller:

x 2

x1 exp

-1

2
u

1
(s+1)2

Process

= u2

EL2620

## Existence of multiple stable equilibria for the same input gives

hysteresis effect

x 1

Valve

Multiple Equilibria

EL2620

Lecture 1

Motor

13

2011

EL2620

Coolant temp xc

Temperature x2

Output y
Output y
Output y

## Back-lash induces an oscillation

10

10

10

20

20

20

Time t

Time t

Time t

30

30

30

Lecture 1

10

-2

10

10

-2

10

40

40

40

10
Frequency (Hz)

a=2

10
Frequency (Hz)

a=1

a sin t

-2

-1

-2

-1

Saturation

2
3
Time t

2
3
Time t

y(t) =

Harmonic Distortion

-0.5

0
0.5

-0.5

0
0.5

-0.5

0.5

EL2620

Lecture 1

Output y

Output y

Output y

50

50

50

k=1

"

EL2620

Amplitude y

Amplitude y

19

Ak sin(kt)

2011

17

2011

Relay

A
T

Process

10

Time

Energy in tone k
Energy in tone 1

k=2

Lecture 1

20

2011

"

## Nonlinearities such as rectifiers, switched electronics, and

transformers give rise to harmonic distortion

EL2620

Lecture 1

PID

18

2011

## Relay induces a desired oscillation whose frequency and amplitude

are used to choose PID parameters

EL2620

10

10

Time t

15

15

Time t

Lecture 1

20

20

25

25

30

30

tf =

1
x0

1
0t<
x0

dx
2
= dt
Recall the trick: x = x
x2
1
1
x0
Integrate

= t x(t) =
x(t) x(0)
1 x0 t

## Solution not defined for

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

= x , x(0) = x0

Existence Problems

+ y y 3 = a sin(t)

Subharmonics

EL2620

Lecture 1

-1

-0.5

0.5

0.5

a sin t

-0.5

+ y

EL2620

23

2011

21

2011

Lecture 1

0
0

0.5

1.5

2.5

3.5

4.5

2
Time t

(1)

2011

24

2011

22

EL2620

Lecture 1

Example:

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

is fulfilled.

x(t)

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

Definition: A solution to

EL2620

x(t)

x =

Time t

Lipschitz Continuity

-1

-0.5

0.5

1.5

## x, x(0) = 0, has many solutions:

#
(t C)2 /4 t > C
x(t) =
0
tC

Uniqueness Problems

Lecture 1

(x( =

x21

+ +

x2n

Slope L

## Definition: 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},

EL2620

Lecture 1

Example:

EL2620

x(t)

27

2011

25

2011

Physical Interpretation
x(T ) = 0

x(0) = x0

Lecture 1

## f being C 1 implies Lipschitz continuity

(L = maxxBr (x0 ) f \$ (x))

= (r, L)

Remarks

x(t)

= f (x(t)),

## Local Existence and Uniqueness

dx
dx
=
ds
dt

= T t ds = dt and thus

Theorem:
If f is Lipschitz continuous, then there exists

EL2620

Lecture 1

28

2011

26

2011

## where x is the water level. It is then impossible to know at what time

t < T the level was x(t) = x0 > 0.

x = x,

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

EL2620

State-Space Models

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

x = Ax + Bu,

Affine in u:

Linear:

Lecture 1

x =

&

Pendulum

'T

= y

dy
dt

...

dn1 y
dtn1

%T

k
g
x 2 =
x2 sin x1
2
MR
R

x 1 = x2

gives

M R2 + k + M gR sin = 0

Example:

dn y
,
dtn

y = Cx

y = h(x)

EL2620

Lecture 1

x = f (x, u),

Explicit:

y = h(x)

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

General:

## State x, input u, output y

EL2620

31

2011

29

2011

x = f (x, t)

Equilibria

2011

30

2011

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

Lecture 1

Linear:

Affine in u:

Explicit:

General:

32

## Definition: A point (x , u , y ) is an equilibrium, if a solution starting

in (x , u , y ) stays there forever.

EL2620

Lecture 1

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

## is always possible to transform to an autonomous system by

introducing xn+1 = t:

A nonautonomous system

## Transformation to Autonomous System

EL2620

Multiple Equilibria

k
g
x2 sin x1
2
MR
R

Lecture 1

Lecture 1

Backlash

Math
Function

eu

Coulomb &
Viscous Friction

Look-Up
Table

Saturation

Next Lecture

Linearization

EL2620

Lecture 1

Relay

Sign

Abs

|u|

## Some Common Nonlinearities in Control

Systems

EL2620

Simulation in Matlab

35

2011

33

2011

Design?

EL2620

Lecture 1

x 2 =

x 1 = x2

## = = 0 gives sin = 0 and thus = k

M R2 + k + M gR sin = 0

Example: Pendulum

EL2620

36

2011

34

2011

Lecture 2

= f (t, x, u)

=0

Lecture 2

## Omsim, Dymola, Modelica

http://www.modelica.org

DAEs F (t, x,
x, u)

ODEs x

2011

2011

## Wrap-up of Lecture 1: Nonlinear systems and phenomena

Phase-plane analysis

Simulation tools:

EL2620

Lecture 2

EL2620

Todays Goal

Lecture 2

> matlab

EL2620

Lecture 2

EL2620

2011

2011

Transfer Fcn

s+1
Scope

To Workspace2

Transfer Fcn

s+1

To Workspace

To Workspace1

Lecture 2

>> plot(t,y)

2011

2011

Step

Clock

stepmodel.mdl

EL2620

Lecture 2

Step

## File -> New -> Model

Double click on Continous
Transfer Fcn
Step (in Sources)
Scope (in Sinks)
Connect (mouse-left)
Simulation -> Parameters

EL2620

10

-0.6

-0.8

-0.6

-0.8

Lecture 2

-1

-0.4

-0.4

-1

-0.2

0.2

-0.2

0.4

0.2

0.6

0.8

0.4

Refine = 1

0.6

0.8

Refine = 10

10

2011

2011

EL2620

Lecture 2

EL2620

1
s

Lecture 2

In

In

Sum

Subsystem

In

Gain

1/A

Subsystem2

In

s
Integrator

h = (u q)/A
!
q = a 2g h
f(u)
Fcn

1
Out

## The system consists of two identical tank models:

EL2620

11

2011

-1

u2

(s+1)(s+1)

1
(s+1)2

Process
y

Valve

= u2

2011

10

2011

Lecture 2

12

>> A=2.7e-3;a=7e-6,g=9.8;
>> [x0,u0,y0]=trim(twotank,[0.1 0.1],[],0.1)
x0 =
0.1000
0.1000
u0 =
9.7995e-006
y0 =
0.1000
>> [aa,bb,cc,dd]=linmod(twotank,x0,u0);
>> sys=ss(aa,bb,cc,dd);
>> bode(sys)

EL2620

Lecture 2

Lecture 2

Motor

## Nonlinear Control System

PSfr

EL2620

open_system(stepmodel)
set_param(stepmodel,RelTol,1e-3)
set_param(stepmodel,AbsTol,1e-6)
set_param(stepmodel,Refine,1)
tic
sim(stepmodel,6)
toc
subplot(2,1,1),plot(t,y),title(y)
subplot(2,1,2),plot(t,u),title(u)

2011

## If the block-diagram is saved to stepmodel.mdl,

the following Script-file simstepmodel.m simulates the system:

EL2620

## Differential Equation Editor

deedemo1

deedemo3

Homework 1

deedemo2

DEE

Differential Equation
Editor

deedemo4

Lecture 2

Write in English.

report.

15

2011

13

2011

EL2620

Lecture 2

>> dee

## dee is a Simulink-based differential equation editor

EL2620

Phase-Plane Analysis

Lecture 2

## This was the preferred tool last year!

http://math.rice.edu/dfield

## Down load DFIELD and PPLANE from

http://www.control.lth.se/ictools

EL2620

14

2011

Local Stability

Stability definitions
Linearization
Phase-plane analysis
Periodic solutions

Lecture 3

x(t)

!x(t)! < !, t 0

Lecture 3

If x

!x(0)! <

## = f (x) with f (0) = 0

Definition: The equilibrium x = 0 is stable if for all ! > 0 there
exists = (!) > 0 such that

Consider x

EL2620

Lecture 3

EL2620

2011

2011

Asymptotic Stability

lim x(t) = 0
t

Lecture 3

2011

2011

## The equilibrium is globally asymptotically stable if it is stable and

limt x(t) = 0 for all x(0).

!x(0)! <

## Definition: The equilibrium x = 0 is asymptotically stable if it is

stable and can be chosen such that

EL2620

Lecture 3

center points

## Linearize around equilibria and trajectories

Todays Goal
Explain local and global stability

EL2620

m(t)

Lecture 3

2011

2011

## = (h0 (t), v0 (t), m0 (t)) , u0 (t) u0 > 0, be a solution.

h(t)
= v(t)
v(t)
= g + ve u(t)/m(t)
m(t)

= u(t)

Example

0 1
0
0

e u0
e
u(t)
(t) + m0vu
x (t) = 0 0 (m0vu
2x
0 t)
0t
1
0 0
0

Let x0 (t)
Then,

h(t)

EL2620

Lecture 3

x(t)

## = f (x0 (t) + x(t), u0 (t) + u(t))

f
(x0 (t), u0 (t))
x(t)
= f (x0 (t), u0 (t)) +
x
f
+
(x0 (t), u0 (t))
u(t) + O(!
x, u!2 )
u

## Let (x0 (t), u0 (t)) denote a solution to x = f (x, u) and consider

another solution (x(t), u(t)) = (x0 (t) + x
(t), u0 (t) + u(t)):

EL2620

f
(x0 (t), u0 (t))
x
f
B(x0 (t), u0 (t)) =
(x0 (t), u0 (t))
u
A(x0 (t), u0 (t)) =

1 + cos2 t
1 sin t cos t
1 sin t cos t 1 + sin2 t

Lecture 3

## is unbounded solution for

> 1.
8

2011

2011

, >0

2 2 4
(t) = =
2
which are stable for 0 < < 2. However,
' (1)t
(
e
cos t et sin t
x(t) =
x(0),
e(1)t sin t et cos t

A(t) =

'

## Pointwise Left Half-Plane Eigenvalues of

A(t) Do Not Impose Stability

EL2620

Lecture 3

## Note that A and B are time dependent. However, if

(x0 (t), u0 (t)) (x0 , u0 ) then A and B are constant.

where

## x (t) = A(x0 (t), u0 (t))

x(t) + B(x0 (t), u0 (t))
u(t)

## Hence, for small (

x, u), approximately

EL2620

x(t) = c1 e

1 t

v1 + c 2 e

v1 v2

2 t

v2 ,

Lecture 3

= 1 v1 etc).

0
2 t

1 t

## where v1 , v2 are the eigenvectors of A (Av1

, e
+
eAt = V et V 1 = v1 v2

If A is diagonalizable, then

) *
) *
d x1
x
=A 1
x
x2
dt 2

## Linear Systems Revival

Analytic solution:

EL2620

Lecture 3

## If (A) < 0, then x0 is asymptotically stable

Denote A

f
(x0 )
x

,1

= f (x) with f C1 .
and (A) = max Re((A)).

## Theorem: Let x0 be an equilibrium of x

EL2620

11

2011

2011

x(t) = c1 e1 t v1 + c2 e2 t v2

Lecture 3

## Fast eigenvalue/vector: x(t) c1 e1 t v1 + c2 v2 for small t.

Moves along the fast eigenvector for small t

## Slow eigenvalue/vector: x(t) c2 e2 t v2 for large t.

Moves along the slow eigenvector towards x = 0 for large t

Solution:

## Given the eigenvalues 1 < 2 < 0, with corresponding

eigenvectors v1 and v2 , respectively.

EL2620

Lecture 3

system.

## x 2 = cos x2 x31 5x2

x 1 = x21 + x1 + sin x2

Example

## = (1, 0)T is given by

'
(
1 1
A=
,
(A) = {2, 4}
3 5

at the equilibrium x0

The linearization of

EL2620

12

2011

10

2011

center point

ExampleUnstable Focus

unstable focus

Re i = 0

1 < 0 < 2

2011

Lecture 3

r = r
=

15

*

x =
x,
, > 0,
1,2 = i

)
*)
*)
*1
1 1 et eit
0
1 1
At
x(0)
x(t) = e x(0) =
i i
0
et eit i i
In polar coordinates r =
x21 + x22 , = arctan x2 /x1
(x1 = r cos , x2 = r sin ):

EL2620

Lecture 3

stable focus

Re i > 0

Im i *= 0 : Re i < 0

unstable node

1 , 2 > 0

stable node

Im i = 0 : 1 , 2 < 0

Six cases:

## The location of the eigenvalues (A) determines the characteristics

of the trajectories.

13

2011

EL2620

Lecture 3

EL2620

x1

1,2 = 1 i

Re

Im

x2

1,2 = 0.3 i

## Equilibrium Points for Linear Systems

Lecture 3

EL2620

16

2011

14

2011

(1 , 2 ) = (1, 2) and

v1 v2

*
1 1
x =
x
0 2

)
*

Lecture 3

## Hint: Two cases; only one linear independent eigenvector or all

vectors are eigenvectors

= 2 ?

1 1
=
0 1

## 5 minute exercise: What is the phase portrait if 1

EL2620

Lecture 3

ExampleStable Node

## v1 is the slow direction and v2 is the fast.

EL2620

19

2011

17

2011

+ c3

2011

18

2011

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

Lecture 3

## Remark: If the linearized system has a center, then the nonlinear

system has either a center or a focus.

## with lim%x%0 !g(x)!/!x! = 0. If z = Az has a focus, node, or

saddle point, then x = f (x) has the same type of equilibrium at the
origin.

Theorem: Assume

20

EL2620

Lecture 3

Fast: x2 = x1
Slow: x2 = 0

EL2620

## How to Draw Phase Portraits

Lecture 3

+ n, 0) since

x2 (t) + KT

sin(in x1 (t))

x 1 = 0 x2 = 0
x 2 = 0 sin(in x1 ) = 0 x1 = in + n

x 2 (t) = T

x 1 (t) = x2 (t)

## Phase-Plane Analysis of PLL

dee or pplane

Let (x1 , x2 )

EL2620

Lecture 3

1. Matlab:

By computer:

5. Guess solutions

dx2
x 1
=
dx1
x 2

## 2. Sketch local behavior around equilibria

1. Find equilibria

By hand:

EL2620

23

2011

21

2011

sin()

K
out
1 + sT

Filter

1
s

VCO

Classification of Equilibria

Phase
Detector

2 + T 1 + KT 1 = 0

Lecture 3

>0

2 + T 1 KT 1 = 0
Saddle points for all K, T

n odd:

## K > (4T )1 gives stable focus

0 < K < (4T )1 gives stable node

n even:

## Linearization gives the following characteristic equations:

EL2620

Lecture 3

in

sin

out

out

= A sin[t + in (t)].

Phase-Locked Loop
A PLL tracks phase in (t) of a signal sin (t)

EL2620

24

2011

22

2011

Lecture 3

Only r

gives

1
=
r

'

r cos r sin
sin cos

('

r = r(1 r2 )
= 1

## x 2 = r(1 r ) sin + r cos

x 1
x 2

x 1 = cos r r sin
x 2 = sin r + r cos

## x 1 = r(1 r2 ) cos r sin

= 1 is a stable equilibrium!

'

x2 = r sin

x1 = r cos

## Periodic solution: Polar coordinates.

implies

EL2620

Lecture 3

.
/
.
/
(K, T ) = (1/2, 1): focuses 2k, 0 , saddle points (2k + 1), 0

EL2620

27

2011

25

2011

Periodic Solutions

t 0

>0

Lecture 3

## const is by convention not regarded periodic

When is it stable?

## A periodic orbit is the image of x in the phase portrait.

x(t + T ) = x(t),

## A system has a periodic solution if for some T

EL2620

Lecture 3

x 2 = x1 + x2 x2 (x21 + x22 )

x 1 = x1 x2 x1 (x21 + x22 )

EL2620

28

2011

26

(1)

2011

t (x0 )

Flow

P (x ) = x

Lecture 3

Rn

EL2620

Lecture 3

## to emphasize the dependence on the initial point x0

The solution of x

EL2620

31

2011

29

2011

Poincare Map

Lecture 3

32

2011

30

2011

EL2620

Lecture 3

P (x)

t (x)

## P (x) = (x) (x)

where (x) is the time of first return.

Let

## Rn be an n 1-dim hyperplane transverse to f at x0 .

Definition: The Poincare map P : is

EL2620

'

'
e4 0
0
1

Lecture 3

dP
W =
(1, 2k) =
d(r0 , 0 )

## The periodic solution that corresponds to (r(t), (t))

asymptotically stable because

= (1, t) is

0 + 2

P (r0 , 0 ) =

EL2620

Lecture 3

## If |i (W )| < 1 for all i *= j , then the corresponding periodic

j (W ) = 1 for some j

if x is close to x .

P (x) W x

EL2620

35

2011

33

2011

[1 +

(r02

Lecture 3

2t 1/2

(r0 , 0 ) = 2.

is

1)e

t (r0 , 0 ) =

'

The solution is

Choose

r = r(1 r2 )
= 1

, t + 0

## ExampleStable Unit Circle

Rewrite (1) in polar coordinates:

EL2620

34

2011

f ()

G(s)

History

Inputoutput stability

Lecture 5

Lecture 5

(False!)

(False!)

f (y)

EL2620

Lecture 5

EL2620

2011

2011

2011

Lecture 5

2011

EL2620

Lecture 5

Passivity

Circle Criterion

## analyze stability using

Gain

Todays Goal
derive the gain of a system

EL2620

and

Norms

x21

+ +

Lecture 5

## is not a gain (nor a norm).

(M ) = max |i (M )|

"x" =

EL2620

Lecture 5

Max norm:

Euclidean norm:

Examples:

x2n

"x" = 0 x = 0

## "x + y" "x" + "y"

"x" 0

Definition:
A norm is a function " "

## A norm " " measures size

EL2620

2011

2011

= diag {1 , . . . , n } ; U U = I ; V V = I

M = U V

Gain of a Matrix

"M x"
"x"

Lecture 5

sup-norm:

"x"2 =

"#

Examples:

|x(t)|2 dt

## A signal norm " "k is a norm on the space of signals x.

: R+ R.

Signal Norms
A signal x is a function x

EL2620

Lecture 5

## where " " is the Euclidean norm.

xRn

max (M ) = 1 = sup

## i - the singular values

where

Every matrix M

EL2620

2011

2011

Parsevals Theorem

1
|x(t)| dt =
2

1
y(t)x(t)dt =
2

|X(i)|2 d.

Y (i)X(i)d.

Lecture 5

S2

(S1 )(S2 ).

S1

## 2 minute exercise: Show that (S1 S2 )

EL2620

Lecture 5

11

2011

The power calculated in the time domain equals the power calculated
in the frequency domain

"x"22

In particular,

then

\$
\$
it
eit y(t)dt,
X(i) =
e
x(t)dt,
Y (i) =

Theorem: If x, y

2011

EL2620

uL2

(S) = sup

f ()

uL2

y(t)
x

Kx
x

f (x)

K|x| and

## Gain of a Static Nonlinearity

Lecture 5

&
# %
#
"y"22 = 0 f 2 u(t) dt 0 K 2 u2 (t)dt = K 2 "u"22 ,
where u(t) = x , t (0, 1), gives equality, so
'
(f ) = sup "y"2 "u"2 = K
Proof:

u(t)

= u(t) is

||"u"2
"u"2
= sup
= ||
"u"2
uL2 "u"2

## Lemma: A static nonlinearity f such that |f (x)|

f (x ) = Kx has gain (f ) = K .

EL2620

Lecture 5

uL2

() = sup

12

2011

10

2011

"y"2
"S(u)"2
= sup
"u"2 uL2 "u"2

## The gain of S is defined as

y = S(u).

System Gain
A system S is a map from L2 to L2 :

EL2620

(G)

r1

e1

S2

S1

e2

r2

Lecture 5

13

15

2011

## Theorem: Assume S1 and S2 are BIBO stable. If (S1 )(S2 ) < 1,

then the closed-loop system is BIBO stable from (r1 , r2 ) to (e1 , e2 )

EL2620

Lecture 5

"y"22 =

10

2011

## (0, ) and |G(i )| = K

10

|G(i)|

\$
1
|Y (i)|2 d
2
\$
1
=
|G(i)|2 |U (i)|2 d K 2 "u"22
2

## Proof: Assume |G(i)| K for

for some . Parsevals theorem gives

10 -1
10

-2

-1

10

10

10

## Gain of a Stable Linear System

% &
"Gu"2
G = sup
= sup |G(i)|
uL2 "u"2
(0,)

Lemma:

EL2620

BIBO Stability

f ()

Lecture 5

Ky
y

f (y)

(0, 1/2).
16

2011

14

2011

f (y)
K, y *= 0, f (0) = 0
y

## Small Gain Theorem gives BIBO stability for K

(G) = 2 and (f ) K .

2
,
(s + 1)2

G(s)

G(s) =

EL2620

Lecture 5

< .

% &
"S(u)"2
S = sup
"u"2
uL2

## = Ax is asymptotically stable then

G(s) = C(sI A)1 B + D is BIBO stable.

Example: If x

Definition:
S is bounded-input bounded-output (BIBO) stable if (S)

EL2620

"e1 "2

## "r1 "2 + (S2 )"r2 "2

1 (S2 )(S1 )

"e1 "2 "r1 "2 + (S2 )["r2 "2 + (S1 )"e1 "2 ]

"e2 "2

1 (S1 )(S2 )

2011

17

2011

Lecture 5

f ()

G(s)

-1

-0.5

-1

0.5

-0.5

0.5

1.5

G(i)
2

19

## Let f (y) = Ky in the previous example. Then the Nyquist Theorem

proves stability for all K [0, ), while the Small Gain Theorem
only proves stability for K (0, 1/2).

EL2620

Lecture 5

## Note: Formal proof requires " "2e , see Khalil

so also e2 is bounded.

Similarly we get

(S2 )(S1 ) < 1, "r1 "2 < , "r2 "2 < give "e1 "2 < .

gives

EL2620

G(s)

-1
-1

-0.5

0.5

-0.5

From: U(1)

0.5

f ()

G(s)

k1 y

k2 y f (y)

k11

## The Circle Criterion

k12
G(i)

2011

18

2011

f (y)
k2 , y *= 0,
y

f (0) = 0

Lecture 5

If the Nyquist curve of G(s) does not encircle or intersect the circle
defined by the points 1/k1 and 1/k2 , then the closed-loop
system is BIBO stable.

0 k1

20

Theorem: Assume that G(s) has no poles in the right half plane, and

EL2620

Lecture 5

Theorem: If G has no poles in the right half plane and the Nyquist
curve G(i), [0, ), does not encircle 1, then the
closed-loop system is stable.

EL2620

To: Y(1)

2011

f (y)

-1

-0.5

-1

0.5

-0.5

1
K
0

0.5

f(()

(
G(s)

r2

k
1
G(i)

Lecture 5

23

2011

21

(0, 4).

< 1, where
G
(=
is stable (This has to be checked later). Hence,
G
1 + kG
)
)
) 1
)
1
)
=)
+ k )) > R
(
G(i)
|G(i)|

(
Small Gain Theorem gives stability if |G(i)|R

r(1

EL2620

Lecture 5

= 1/K .

1.5

G(i)

## The circle is defined by 1/k1 = and 1/k2

Since
min Re G(i) = 1/4

Ky

## ExampleStatic Nonlinear Feedback (contd)

EL2620

e1

y2
f ()

G(s)
e2

y1

r2

r(1

1
G(i)

k11

k12

Lecture 5

r2

y1

G(i)
G
is stable since 1/k is inside the circle.
1 + kG

k1

Note that G(s) may have poles on the imaginary axis, e.g.,
integrators are allowed

Note that

k2

f(()

2011

22

2011

24

C : |z + k| > R} mapped

(
G

)
)
) f((y) ) k2 k1
)
)
=: R, y *= 0,
f((0) = 0
) y )
2

## The curve G1 (i) and the circle {z

through z + 1/z gives the result:

EL2620

Lecture 5

r1

Let k

EL2620

Passive System

Lecture 5

27

2011

## Definition: Consider signals u, y : [0, T ] Rm . The system S is

passive if
,y, u-T 0, for all T > 0 and all u

EL2620

Lecture 5

25

2011

## The main result: Feedback interconnections of passive systems are

passive, and BIBO stable (under some additional mild criteria)

EL2620

y T (t)u(t)dt

cos =

,y, u-T
=0
|y|T |u|T

Lecture 5

## 2 minute exercise: Is the pure delay system y(t) = u(t )

passive? Consider for instance the input u(t) = sin ((/)t).

EL2620

Lecture 5

Example:
because

Cauchy-Schwarz Inequality:

28

2011

26

2011

## = |y|T |u|T cos

!
|y|T = ,y, y-T - length of y , - angle between u and y

## If u and y are interpreted as vectors then ,y, u-T

,y, u-T =

Scalar Product
Scalar product for signals y and u

EL2620

)) 0,

Lecture 5

passive.

1
is strictly passive,
G(s) =
s+1
1
G(s) =
is passive but not strictly
s

Example:

Re G(i

-0.4

-0.2

0.2

0.4

0.6

0.2

0.4

0.6

G(i)
0.8

> 0

31

2011

du
Cu2 (T )
dt =
0
dt
2

di
Li2 (T )
L i(t)dt =
0
dt
2

u(t)C

## Theorem: An asymptotically stable linear system G(s) is passive if

and only if
Re G(i) 0,
> 0

EL2620

Lecture 5

di
u = L : ,u, i-T =
dt

du
: ,u, i-T =
i=C
dt

29

2011

EL2620

y2

e1

S2

S1
e2

y1

r2

= supuL2

y
&y&2
&u&2

< .

Lecture 5

Hence, )"y"22

1
"y"2 "u"2
)

"y"2 "u"2 , so

Proof:

32

2011

EL2620

Lecture 5

Proof:

30

2011

## Lemma: If S1 and S2 are passive then the closed-loop system from

(r1 , r2 ) to (y1 , y2 ) is also passive.

r1

EL2620

r1

y2

e1

S2

S1

e2

y1

r2

y2

e1

S2

S1

e2

y1

r2
1

## The Passivity Theorem is a

Small Phase Theorem

Lecture 5

S2 passive cos 2 0 |2 | /2
S1 strictly passive cos 1 > 0 |1 | < /2

r1

EL2620

Lecture 5

## Theorem: If S1 is strictly passive and S2 is passive, then the

closed-loop system is BIBO stable from r to y .

EL2620

35

2011

33

2011

Proof

1
2,y2 , r2 -T + ,y, r-T
)

G(s)

## and the result follows.

|y|2T

+
1
2+
|y|T |r|T
)

1
|y1 |2T + |y2 |2T 2,y2 , r2 -T + |r1 |2T ,y, r-T
)

1
|y1 |2T + ,r1 y2 , r1 y2 -T ,y, r-T
)

2011

34

2011

Lecture 5

36

## 2 minute exercise: Apply the Passivity Theorem and compare it with

the Nyquist Theorem. What about conservativeness? [Compare the
discussion on the Small Gain Theorem.]

EL2620

Lecture 5

Let T

Hence

or

Therefore

## S1 strictly passive and S2 passive give

%
&
) |y1 |2T + |e1 |2T ,y1 , e1 -T + ,y2 , e2 -T = ,y, r-T

EL2620

c
s

G(s)

( )u

ym y

c > 0.

ym

Lecture 5

## S is passive (see exercises).

If G(s) is strictly passive, the closed-loop system is BIBO stable

EL2620

Lecture 5

G(s)

(t)

Model

G(s)

d
= cu(t)[ym (t) y(t)],
dt

Process

## Applications in telecommunication channel estimation and in noise

cancellation etc.

EL2620

39

2011

37

2011

Lecture 5

Let G(s)

EL2620

Lecture 5

G(s)

G(s)
ym

c
s

0
0

0.5

1.5

-2

10

10

y , ym

15

15

20

20

1
, c = 1, u = sin t, and (0) = 0.
s+1

(t)

replacements

EL2620

40

2011

38

2011

x *= 0

: R R such that
n

Lecture 5

V uT y

V 0

EL2620

Lecture 5

absorbed energy

43

2011

41

2011

## V (T ) represents the stored energy in the system

\$ T

V (x(T ))
y(t)u(t)dt + V (x(0)) , T > 0
, -. /
, -. /
0
,
-.
/ stored energy at t = 0
stored energy at t = T

Remark:

## V (0) = 0 and V (x) 0,

V (x) uT y , x, u

x = f (x, u),

y = h(x)

Storage Function

EL2620

## Storage Function and Passivity

,y, u-T =

\$
0

ExampleKYP Lemma
x = Ax + Bu,

y = Cx

BT P = C

Lecture 5

and hence the system is strictly passive. This fact is part of the
Kalman-Yakubovich-Popov lemma.

## = 0.5xT Qx + uy < uy, x *= 0

42

44

2011

V = 0.5(x T P x + xT P x)
= 0.5xT (AT P + P A)x + uB T P x

= 0.5xT P x. Then

AT P + P A = Q,

Consider V

2011

> 0,

EL2620

Lecture 5

y = h(x)

with x(0)

x = f (x, u),

EL2620

Todays Goal

Lecture 5

Passivity

Circle Criterion

## You should be able to

EL2620

45

2011

G(s)

Lecture 6

-2

-1

10

4
and u = sat e give a stable oscillation.
s(s + 1)2

Motivating Example

Lecture 6

G(s) =

EL2620

Lecture 6

EL2620

15

20

2011

2011

Todays Goal

## A Frequency Response Approach

Lecture 6

But, can we talk about the frequency response, in terms of gain and
phase lag, of a static nonlinearity?

2011

## A (linear) feedback system will have sustained oscillations

(center) if the loop-gain is 1 at the frequency where the phase lag
is 180o

Nyquist / Bode:

EL2620

Lecture 6

function analysis

2011

EL2620

n=1

N.L.

G(s)

Key Idea

Lecture 6

2011

## # |G(i)| for n 2, then n = 1 suffices, so that

'
y(t) |G(i)| a21 + b21 sin[t + arctan(a1 /b1 ) + arg G(i)]

If |G(in)|

u(t) =

!
"

EL2620

Lecture 6

## Note: Sometimes we make the change of variable t

= 2/T and
#
#
2 T
2 T
u(t) cos nt dt, bn () =
u(t) sin nt dt
an () =
T 0
T 0

where

a0
+
(an cos nt + bn sin nt)
2
n=1

2011

## = u(t + T ) has a Fourier series expansion

Fourier Series

a0 ! " 2
+
=
an + b2n sin[nt + arctan(an /bn )]
2
n=1

u(t) =

EL2620

2
T

N.L.

&2
u(t) u
\$k (t) dt

Lecture 6

## can be used instead of u(t) to analyze the system.

N (A, )

u
\$1 (t)
u
\$1 (t) = |N (A, )|A sin[t + arg N (A, )]

e(t)

b1 () + ia1 ()
A

= 0, then

u(t)

N (A, ) =

e(t)

min

## The describing function is

EL2620

Lecture 6

solves

a0 !
u
\$k (t) =
+
(an cos nt + bn sin nt)
2
n=1

## The Fourier Coefficients are Optimal

The finite expansion

EL2620

2011

2011

-1

-0.5

0.5

a1 =

4H
b1 () + ia1 ()
=
A
A

f ()

G(s)

1/N (A)

G(i)

N (A) =

Lecture 6

## The intersections of the curves G(i) and 1/N (A)

give and A for a possible periodic solution.

G(i)N (A) = 1

11

2011

2011

replacements

EL2620

Lecture 6

= 2t/T

1 2
u() cos d = 0
0
#
#
1 2
2
4H
b1 =
u() sin d =
H sin d =
0
0

EL2620

G(s) =

G(s)

-1

-0.5

-0.4

-0.3

-0.2

-0.1

0.1

-0.8

-0.6

-0.4

-0.2

G(i)

1/N (A)

## Periodic Solutions in Relay System

2011

10

2011

Lecture 6

12

3
with feedback u = sgn y
(s + 1)3

EL2620

Lecture 6

## Nf +g (A) = Nf (A) + Ng (A)

Nf (A) = Nf (A)

Nf (A, ) = Nf (A)

Im Nf (A, ) = 0

## Assume f () and g() are odd (i.e. f (e) = f (e)) static

nonlinearities with describing functions Nf and Ng . Then,

EL2620

10

Lecture 6

EL2620

Lecture 6

b1 =

a1 =

#
1 2
u() cos d = 0
0
#
#
1 2
4 /2
u() sin d =
u() sin d
0
0
#
#
4A 0 2
4D /2
sin d +
sin d
0
0
)
*
A
20 + sin 20

## Note that G filters out almost all higher-order harmonics.

-1

-0.5

0.5

The prediction via the describing function agrees very well with the
true oscillations:

EL2620

15

2011

13

2011

-1

-0.5

0.5

= arcsin D/A.

Lecture 6

0.1
0

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.1

N (A) for H = D = 1

10

)
*
1
Hence, if H = D , then N (A) =
20 + sin 20 .

)
*
H
20 + sin 20
N (A) =
D

EL2620

Lecture 6

where 0

(0, )
(
A sin ,
(0, 0 ) ( 0 , )
u() =
D,
(0 , 0 )

Let e(t)

EL2620

16

2011

14

2011

Lecture 6

## oscillation amplitude is decreasing.

If G() does not encircle the point 1/N (A), then the

amplitude is increasing.

1/N (A)

G()

EL2620

Lecture 6

19

2011

17

2011

## 5 minute exercise: What oscillation amplitude and frequency do the

describing function analysis predict for the Motivating Example?

EL2620

KG(s)
1/K

G(i)

2011

1/N (A)

G()

Lecture 6

## An intersection with amplitude A0 is unstable if A < A0 leads to

decreasing amplitude and A > A0 leads to increasing.

EL2620

Lecture 6

## system is stable (damped oscillations)

20

2011

18

If G(i) does not encircle the point 1/K , then the closed-loop

## Assume that G is stable, and K is a positive gain.

EL2620

G(s) =

G(s)

-0.2
-5

-0.15

-0.1

-0.05

0.05

0.1

-4

-3

-2

-1

1/N (A)

G(i)

(s + 10)2
with feedback u = sgn y
(s + 1)3

-1

-0.8

-0.6

-0.4

-0.2

0.2

0.4

0.6

0.8

= arcsin D/A.

(
0,
(0, 0 )
u() =
1,
(0 , 0 )

where 0

Lecture 6

## Describing Function for a Quantizer

Let e(t)

EL2620

Lecture 6

gives one stable and one unstable limit cycle. The left most
intersection corresponds to the stable one.

0.15

0.2

EL2620

23

2011

21

2011

## Automatic Tuning of PID Controller

Lecture 6

EL2620

Lecture 6

Relay

A
T

Process

10

Time

#
1 2
u() cos d = 0
a1 =
0
#
#
1 2
4 /2
b1 =
u() sin d =
sin d
0
0
4
4"
= cos 0 =
1 D2 /A2

+
0,
A<D
N (A) =
4 "
1 D2 /A2 , A D
A

PID

Period and amplitude of relay feedback limit cycle can be used for
autotuning:

EL2620

24

2011

22

2011

0
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

10

= sgn y :

Friction

Lecture 6

## The oscillation depends on the zero at s

= z.

s(s z)
G
= 3
with feedback u = sgn y
1 + GC
s + 2s2 + 2s + 1

Corresponds to

yref

27

2011

25

2011

EL2620

Lecture 6

N (A) for D = 1

EL2620

15

15

20

20

25

25

30

30

0.2

0.4

0.6

Lecture 6

0.5

z = 1/3

-0.5

z = 4/3

-0.4
-1

10

z = 4/3

10

0.8

1.2

-0.4

z = 1/3

-0.2

-0.2

0.2

0.4

-1

EL2620

Lecture 6

28

2011

26

2011

## The predicted amplitude and frequency are only approximations

A limit cycle may exist even if the DF does not predict it.

EL2620

=x ?

Lecture 6

## Powerful graphical methods

Approximate results

## Describing function analysis

Frequency-domain:

Time-domain:

EL2620

Lecture 6

## 2 minute exercise: What is N (A) for f (x)

EL2620

31

2011

29

2011

e(t) = A sin t
f ()

u(t)

Harmonic Balance

a0 !
+
(an cos nt + bn sin nt)
2
n=1

2011

30

2011

Lecture 6

function analysis

32

## Analyze existence and stability of periodic solutions by describing

Todays Goal
Derive describing functions for static nonlinearities

EL2620

Lecture 6

## Example: f (x) = x2 gives u(t) = (1 cos 2t)/2. Hence by

considering a0 = 1 and a2 = 1/2 we get the exact result.

## may give much better result. Describing function corresponds to

k = 1 and a0 = 0.

u
\$k (t) =

EL2620

PSfr

PID

u
G

Friction models

Lecture 7

## EL2620 Nonlinear Control

Lecture 7

1
+ Td s
Recall: CPID (s) = K 1 +
Ti s

"
3

2011

2011

behavior!

EL2620

Lecture 7

EL2620

Todays Goal

0.1

0.1

20

20

40
Time

40

60

60

80

80

Lecture 7

EL2620

Lecture 7

EL2620

y
u

2011

2011

## Anti-Windup for PID Controller

K
Ti

KTd s

KTd s

1
Tt

1
s

1
Tt

1
s

es

Actuator

es

Actuator

Actuator model

State feedback

Actuator

x = A
x + B sat v + K(y C x)
v = L(xm x)

Observer

xm

Lecture 7

sat v

## Anti-Windup for Observer-Based

State Feedback Controller

K
Ti

## x is estimate of process state, xm desired (model) state

Need actuator model if sat v is not measurable

EL2620

Lecture 7

(b)

(a)

EL2620

2011

2011

## Anti-Windup is Based on Tracking

%
#
Ke( ) es ( )
1 t
+
es ( ) d
d
Ti
Tt
Tt 0

2011

Lecture 7

(a)
y

SA

(b)

y
SB

2011

Idea: Rewrite representation of control law from (a) to (b) with the
same inputoutput relation, but where the unstable SA is replaced by
a stable SB . If u saturates, then (b) behaves better than (a).

## Windup possible if F unstable and u saturates

x c = F xc + Gy
u = Cxc + Dy

Anti-Windup for
General State-Space Controller

State-space controller:

EL2620

Lecture 7

I(t) =

# t\$

## Remark: If 0 < Tt # Ti , then the integrator state becomes sensitive

to the instances when es \$= 0:

Tt = Ti

Tt = Ti Td

Common choices of Tt :

## When the control signal saturates, the integration state in the

controller tracks the proper state

EL2620

= G KD.

2011

2011

Lecture 7

## Note that this implies G KD = 0 in the figure on the previous

slide, and we thus obtain P-feedback with gain D under saturation.
11

## and the eigenvalues of the observer based controller becomes equal

to the zeros of F (s) when u saturates

K = G/D

F KC = F GC/D

u=0

## Thus, choose observer gain

x c = F xc + Gy
u = Cxc + Dy

&
'(
)
x c = (F GC/D) xc
y = C/Dxc

zero dynamics

Most controllers are minimum phase, i.e. have zeros strictly in LHP

EL2620

Lecture 7

where G0

x c = F0 xc + G0 y + Ku
u = sat(Cxc + Dy)

## Choose K such that F0 = F KC has desired (stable)

eigenvalues. Then use controller

## x c = F xc + Gy + K(u Cxc Dy)

= (F KC)xc + (G KD)y + Ku

EL2620

s 1

F KC

s 1

xc

xc

sat

y
+

1 1
D
F (s)

sat

Lecture 7

## If the transfer function (1/F (s) 1/D) in the feedback loop is

stable (stable zeros) No stability problems in case of saturation

10

12

2011

G KD

2011

equals F (s)!

Let D

EL2620

Lecture 7

EL2620

Q(s)

*
G(s)

G(s)

y*

Lecture 7

Choose Q

G1 .

v
*
G

y*.

EL2620

Lecture 7

*
Design: assume G

## Assume G stable. Note: feedback from the model error y

C(s)

differ!
IMC: apply feedback only when system G and model G

EL2620

15

2011

13

2011

Lecture 7

No integration.

(T1 s + 1)
y
s

T1 s + 1
umax
y
s + 1
s + 1

If |u|

u=

## < umax (v = u): PI controller u =

* = T1 s + 1 y + 1 v
u = Q(y Gv)
s + 1
s + 1

Example (contd)

if |u|

Assume r

EL2620

Lecture 7

PI-controller!

*
1 QG
!
"
T1
1
T1 s + 1
=
1+
F =
s

T1 s

T1 s + 1
, < T1
s + 1

1
T1 s + 1

Example
*
G(s)
=
Q=

F =

Choose

EL2620

16

2011

14

2011

Friction

Lecture 7

Problems:

Earthquakes

## Sometimes too small:

Friction in brakes

Sometimes good:

EL2620

Lecture 7

## Solutions above are all based on tracking.

EL2620

19

2011

17

2011

Bumpless Transfer

1
Tr

1
Tm

uc

1
Tr

1
s

PD

1
s

1
Tr

Lecture 7

Ff

EL2620

Lecture 7

Fp

0
0

0
0

0.2

0.4

0
0

10

Ff

Fp

10

10

Stick-Slip Motion

uc

20

20

20

20

Time

Time

Time

2011

18

2011

uc /Tm )

## Another application of the tracking idea is in the switching between

automatic and manual control modes.

EL2620

Lecture 7

EL2620

xr

0.2

0.2

0
0

0.5

20

20

20

40

40

40

ms

60

60

60

Friction

80

80

80

Friction Modeling

PID

100
Time

100
Time

100
Time

Lecture 7

EL2620

23

2011

21

2011

Stribeck Effect

Lecture 7

-0.04

-200

-150

-100

-50

50

100

150

200

Stribeck (1902)

-0.03

-0.02

-0.01

0
0.01

0.02

0.03

0.04

EL2620

Lecture 7

EL2620

Friction [Nm]

24

2011

22

2011

Integral Action

Lecture 7

xr

PID

1
ms

Friction

v
1
s

## If friction force changes quickly, then large integral action

(small Ti ) necessary. May lead to stability problem

EL2620

Lecture 7

## Advanced models capture various friction phenomena better

EL2620

27

2011

25

2011

Friction Compensation

K
Ti

e(t)

e( )d where
e(t)

+t

Lecture 7

## Modified Integral Action

Modify the integral part to I

EL2620

Lecture 7

The Knocker

## Model-based friction compensation

Dither signal

Integral action

Lubrication

EL2620

28

2011

26

2011

Dither Signal

PID

+
+

Friction
estimator

1
ms

Friction

z = kuPID sgn v
a
= z km|v|
F = a
sgn v

F = a sgn v

uPID

Friction estimator:

Lecture 7

1
ms

Friction

v
1
s

1
s

EL2620

Lecture 7

(labyrintspel)

xr

## Avoid sticking at v = 0 (where there is high friction)

by adding high-frequency mechanical vibration (dither )

replacements

EL2620

31

2011

29

2011

u = uPID + F

Lecture 7

= 0.

= k(a a
)
= ke

de
d
a
dz
d
=
= + km |v|
dt
dt
dt
dt
= kuPID sgn v + kmv sgn v
= k sgn v(uPID mv)

= k sgn v(F F )

e=aa
0 as t

d
Remark: Careful with dt
|v| at v

Proof:

EL2620

Lecture 7

## u and F does apply at the same point

An estimate F F is available

Possible if:

an estimate of F .
where uPID is the regular control signal and F

m
x=uF

## Model-Based Friction Compensation

For process with friction F :

EL2620

32

2011

30

2011

-10

-5

10

-1

-0.5

-10

-5

10

-1

-0.5

0.5

PI-controller

0.5

P-controller

vref

50

50

100

100

150

150

200

time

200

Lecture 7

10.5

11

11.5

12

98

99

100

101

102

250

250

300

300

350

350

EL2620

Lecture 7

-10

-5

10

-1

-0.5

0.5

EL2620

35

2011

33

2011

The Knocker

Todays Goal

Lecture 7

10

## You should be able to analyze and design

EL2620

Lecture 7

Hagglund:
Patent and Innovation Cup winner

-0.5

0.5

1.5

2.5

## Coulomb friction compensation and square wave dither

Typical control signal u

EL2620

36

2011

34

2011

Lecture 7

Quantization

Backlash

EL2620

Next Lecture

37

2011

Lecture 8

Fin!

EL2620

Lecture 8

EL2620

Tin

in

" D!

xin

2D

" D!

xout

out

Backlash
Quantization

Lecture 8

Tout

Fout
!

2011

2011

Todays Goal

Lecture 8

## increasing with wear

Backlash
present in most mechanical and hydraulic systems

Backlash (glapp) is

EL2620

Lecture 8

Quantization

Backlash

EL2620

2011

2011

otherwise

in contact

xout
out

xin
in

## xin | = D and x in (xin xout ) > 0.

x out

!
x in ,
=
0,

Backlash Model

Effects of Backlash

Lecture 8

ref

1
1 + sT

in
1
s

in

EL2620

Lecture 8

out

2011

2011

= 0.2

## Multivalued output; current output depends on history. Thus,

in contact if |xout

EL2620

10

15

20

No backlash K

25

30

35

= 0.25, 1, 4

40

0
0

0.2

0.4

0.6

0.8

1.2

1.4

1.6

10

15

Backlash K

20

25

30

35

= 0.25, 1, 4

xin xout
(in out )

40

Lecture 8

2011

2011

## Oscillations for K = 4 but not for K = 0.25 or K = 1. Why?

0
0

0.5

1.5

EL2620

Lecture 8

(Torque)

Force

Alternative Model

EL2620

K=4

-2

Real Axis

K = 0.25

K=1

1/N (A)

Nyquist Diagrams

0
0

10

15

Lecture 8

20

25

30

35

## Input and output of backlash

= 0.33, = 1.24
Simulation: A = 0.33, = 2/5.0 = 1.26

DF analysis: Intersection at A

0.2

0.4

0.6

0.8

1.2

1.4

1.6

1.8

K = 4, D = 0.2:

-4
-4

-3

-2

-1

EL2620

Re N (A) =

1
+ arcsin(1 2D/A)
2
# \$
%&
D
D
+ 2(1 2D/A)
1
A
A
\$
%
D
4D
1
Im N (A) =
A
A

"

Lecture 8

If A

EL2620

Imaginary Axis

40

11

2011

2011

-3.5

-2.5

-2

-1.5
-1
Re -1/N(A)

-0.5

0.5

1
1 + sT

in

1
s

Lecture 8

ref

in

## Do there exist conditions that guarantee stability (of the

out

12

2011

10

2011

1 as A (physical interpretation?)

-3

replacements

EL2620

Lecture 8

-16
-4

-14

-12

-10

-8

-6

-4

-2

EL2620

Im -1/N(A)

G(s)

Lecture 8

Backlash inverse

## Linear controller design

G(s)

BL

in in contact
0 otherwise

in

out

Backlash Compensation

Mechanical solutions

EL2620

Lecture 8

out

out =

in

EL2620

15

2011

13

2011

Homework 2

G(s)

BL

Lecture 8

ref

1+sT2
K 1+sT
1

1
1 + sT

in

1
s

in

EL2620

Lecture 8

=1

out

in

## Analyze this backlash system with inputoutput stability results:

EL2620

out

16

2011

14

2011

-5

without filter

Real Axis

Nyquist Diagrams

10

-2

-1

u, with/without filter

y, with/without filter

10

10

15

15

20

20

## + if u(t) > u(t)

u+D
+ if u(t) < u(t)
xin (t) =
uD

x (t) otherwise
in

Oscillation removed!

with filter

0
0

0.5

1.5

Lecture 8

If D

If D

## + = D then perfect compensation (xout = u)

If D

EL2620

Lecture 8

-10
-10

-8

-6

-4

-2

10

1+sT2
F (s) = K 1+sT
with T1 = 0.5, T2 = 2.0:
1

EL2620

Imaginary Axis

19

2011

17

2011

Backlash Inverse

D
D

Lecture 8

-2

0.4

0.8

1.2

10

10

## Motor with backlash on input in feedback with PD-controller

EL2620

! xout

ExamplePerfect Compensation

\$
! ##
! xin
! #\$
!
#
#
##
#

Lecture 8

xout

EL2620

xin

20

2011

18

2011

40

60

80

21

Lecture 8

2011

EL2620

2011

22

A/D

Lecture 8

## Roundoff, overflow, underflow in computations

Quantization of parameters

D/A

/2

## What precision is needed in computations? (864 bits?)

23

e2 fe de =

/2

/2

e
y

2
e2
de =

12

Lecture 8

24

But, added noise can never affect stability while quantization can!

Var(e) =

## Model quantization error as a uniformly distributed stochastic signal e

independent of u with

20

-2

2011

## Linear Model of Quantization

80

60

40

0.4

0.4

20

0.8

0.8

ExampleOver-Compensation
1.2

EL2620

1.2

ExampleUnder-Compensation

2011

Quantization

EL2620

Lecture 8

EL2620

-1

-0.8

-0.6

-0.4

-0.2

0.2

0.4

0.6

A/Delta

0,
A<D
4 .
1 D2 /A2 , A > D
A

0.8

2011

25

2011

Lecture 8

27

## Predicts oscillation if Nyquist curve intersects negative real axis to

the left of /4 0.79

EL2620

Lecture 8

N (A) =

Lecture 6

EL2620

N (A)

u
Q

/2

Lecture 8

G(s)

1es
s

## Nyquist of linear part (K & ZOH & G(s)) intersects at 0.5K :

Stability for K < 2 without Q.

= 0.2

## ExampleMotor with P-controller.

Quantization of process output with

EL2620

Lecture 8

A < 2

0,
#
\$
%2
n
N (A) =
2i 1
4 /

1
<A<
, 2n1

2
A i=1
2A

EL2620

28

2011

26

2n+1

2011

(a)

(b)

(c)

Quantization

EL2620

Lecture 8

EL2620

Output

Output

Time

K = 1.6

K = 1.2

K = 0.8

0.05

0.98

1.02

31

0.05

0.05

0.05

0.05

50

50

50

Time

100

100

100

Lecture 8

150

D/A

Real axis

## = 0.01 in D/A converter:

Lecture 8

100

150

150

Quantization

EL2620

Lecture 8

Au = 0.005 and T = 39
Simulation: Au = 0.005 and T = 39

Time

100

100

2011

29

A/D

150

150

150

## Example1/s2 & 2nd-Order Controller

EL2620

Describing function:

50

50

50

50

50

50

2011

Ay = 0.01 and T = 39
Simulation: Ay = 0.01 and T = 28

Describing function:

## = 0.02 in A/D converter:

0.05

Output

Output

Output

Input

Output
Unquantized
Input

Imaginary axis

32

2011

30

2011

Quantization Compensation

Lecture 8

converter

converter

A/D

controller

Digital

filter

EL2620

Analog

decim.

D/A

33

2011

Todays Goal

Lecture 8

Quantization

Backlash

EL2620

34

2011

f ()

f ()

Lecture 9

f ()

Lecture 9

EL2620

Lecture 9

EL2620

2011

2011

Todays Goal

2 e f (e)

Lecture 9

f ()

\$ 1/1 , yields

f (e)
2
e

choose K

1
r
K

1
2
r y
r
1 + 1 K
1 + 2 K

1 e

2011

2011

EL2620

Lecture 9

## You should be able to analyze and design

EL2620

A Word of Caution

f ()

k
s

!
"
u = k v f (u)

Lecture 9

!
"
0 = k v f (u)

f (u) = v

If k

f (u)

u = f 1 (v)

2011

Feedback

EL2620

Lecture 9

2011

## Nyquist: high loop-gain may induce oscillations (due to dynamics)!

EL2620

Inverting Nonlinearities

F (s)

f1 ()
f ()

G(s)

2011

2011

Lecture 9

The case K

0
0

0.2

0.4

0.6

0.2

= u2 through feedback.

f ()

0.4

0.6

y(r)

## = 100 is shown in the plot: y(r) r.

Linearization of f (u)

0.8

0.8

f (u)
1

EL2620

Lecture 9

Controller

EL2620

= 0.1

Lecture 9

## Gtot = (Gcl )100 10100

dGtot
= (1 + 103 )100 1 0.1
Gtot

dG
dGcl
=S
0.001
Gcl
G

## 100 feedback amplifiers in series give total amplification

Choose K

= 0.1

11

2011

1
dG
dG
dGcl
=
=S
Gcl
1 + GF G
G

ExampleDistortion Reduction

Let G = 1000,
distortion dG/G

EL2620

Lecture 9

2011

= (1 + GF )1

dGcl
1
=
dG
(1 + GF )2

G
Gcl =
1 + GF

EL2620

f ()

2011

10

2011

Lecture 9

14
16
480

1938
1941

1
1923

Channels

Year
1914

30000

1000

150400

60

Loss (dB)

600

40

620

36

No amps

12

EL2620

Lecture 9

f ()

## Distortion Reduction via Feedback

The feedback reduces distortion in each link.

EL2620

1
r

GF (i)

|S(i)| r1

f ()

GF

OnOff Control

G(s)

Lecture 9

15

2011

13

2011

1
f (y)
1

1+r
y
1r

EL2620

Lecture 9

## Then, the Circle Criterion gives stability if

|1 + GF (i)| > r

Consider a circle C

## := {z C : |z + 1| = r}, r (0, 1).

GF (i) stays outside C if

EL2620

k1 y

x = Ax + Bu,

u [1, 1]

2011

Lecture 9

x = Ax + B

x = Ax B
B T QP x = 0

16

## is minimized if u = sgn(B T P x) (Notice that V = a + bu, i.e. just

a segment of line in u, 1 < u < 1. Hence the lowest value is at an
endpoint, depending on the sign of the slope b. )

V = xT (AT P + P A)x + 2B T P xu

Assume V (x)

EL2620

Lecture 9

1
k1 =
1+r
1
k2 =
1r

k2 y f (y)

14

2011

EL2620

+ (1

)fn

f+

Lecture 9

x1 = 1

## This implies the following behavior

x1 = 1

x2 < 0

x2 > 0

x 2 (t) x1 + 1, dx2 1 + x1
dx1

x2 = 0

x2 < 0

x2 > 0

f + + (1 )f

= {x : (x) = 0}.

dx2

x (t) x1 1,
1 x1

2
dx1

## For small x2 we have

EL2620

Lecture 9

(x) < 0

(x) > 0

= f + + (1 )f , where satisfies
= 0 for the normal projections of f + , f

fn+

f+

Sliding Modes

(x) > 0
(x) < 0

# +
f (x),
x =
f (x),

EL2620

19

2011

17

2011

Ax B,
Ax + B,

x2 > 0
x2 < 0

Lecture 9

x =

## The dynamics along the sliding surface S is obtained by setting

u = ueq [1, 1] such that x(t) stays on S .

EL2620

Lecture 9

Example
%
\$ %
0 1
1
x =
x+
u = Ax + Bu
1 1
1
u = sgn (x) = sgn x2 = sgn(Cx)
is equivalent to

EL2620

20

2011

18

2011

=0

x = Ax + Bu
u = sgn (x) = sgn(Cx)

= CAx/CB .

Lecture 9

because (x)

## = x2 = 0. (Same result as before.)

!
"
ueq = CAx/CB = 1 1 x = x1 ,

gives ueq

## > 0. The sliding surface S = {x : Cx = 0} so

\$
%
!
"
d
0 = (x)

=
f (x) + g(x)u = C Ax + Bueq
dx

Assume CB

EL2620

= {x : x2 = 0}.

ueq = x1

## gives the dynamics on the sliding surface S

=0

x 1 = x2 + ueq = x1
*+,-

Lecture 9

2011

23

2011

21

## = ueq such that (x)

= x 2 = 0 on (x) = x2 = 0 gives

Example (contd)

0 = x 2 = x1 x2 + ueq = x1 + ueq
*+,-

Finding u

EL2620

d
f (x)
dx

Lecture 9

## Remark: The condition that Cx = 0 corresponds to the zero at

s = 0, and thus this dynamic disappears on S = {x : Cx = 0}.

## under the constraint Cx = 0, where the eigenvalues of

(I BC/CB)A are equal to the zeros of
sG(s) = sC(sI A)1 B .

= {x : Cx = 0} is given by
%
\$
1
BC Ax,
x = Ax + Bueq = I
CB

The dynamics on S

EL2620

%1

Sliding Dynamics

d
ueq =
g(x)
dx

Lecture 9

2011

24

2011

22

## = {x : (x) = 0}. Then, for x S ,

\$
%
d dx
d
0 = (x)

=
f (x) + g(x)u
dx dt
dx

x = f (x) + g(x)u
u = sgn (x)

## has a stable sliding surface S

Assume

EL2620

Proof

2011

Closed-Loop Stability

## = 2 (x)/2 with (x) = pT x. Then,

!
"
V = T (x)(x)

= xT p pT f (x) + pT g(x)u

= 0.

+ +

pn1 x(1)
n

pn x(0)
n

2011

25

Lecture 9

27

## where x(k) denote time derivative. Now p corresponds to a stable

differential equation, and xn 0 exponentially as t . The
state relations xk1 = x k now give x 0 exponentially as t .

p1 x(n1)
n

so x tend to (x)

Consider V (x)

EL2620

Lecture 9

## but this transfer function is also 1/(sG(s)) Hence, the eigenvalues of

(I BC/CB)A are equal to the zeros of sG(s).

1
1
1
1
+
CA(sI ((I
BC)A))1
B
CB CB
CB
CB

## Hence, the transfer function from y to u equals

1
1
CAx
y
y = Cx y = CAx + CBu u =
CB
CB
\$
%
1
1
x = I
BC Ax
B y
CB
CB

x = Ax + Bu

EL2620

2011

pT f (x)
T
sgn (x),
T
p g(x) p g(x)

> 0:

Lecture 9

Note that ts

0 as .

ts =

= 0) is
0
<

(x)

(x)(x)

## = (x0 ) > 0. Since

Time to Switch
Consider an initial point x0 such that 0

EL2620

Lecture 9

T
> 0 is a design
" parameter, (x) = p x, and
p = p1 . . . pn are the coefficients of a stable polynomial.

where !

u=

## Choose control law

28

2011

26

Idea: Design a control law that forces the state to (x) = 0. Choose
(x) such that the sliding mode tends to the origin. Assume

x1
f1 (x) + g1 (x)u

x1
d
x2

.. =
= f (x) + g(x)u
..
dt .

.
xn
xn1

EL2620

## ExampleSliding Mode Controller

"T

0
=3

Lecture 9

y = y

x1

Time Plots

x2

pT Ax
T sgn (x)
pT B
p B
= 2x1 sgn(x1 + x2 )

u=

ts =

2011

31

2011

29

## Simulation agrees well with

time to switch

x(0) = 1.5 0

Initial condition
!

EL2620

Lecture 9

Choose p1 s + p2
given by

%
\$ %
1 0
1
x =
x+
u
1 0
0
!
"
y= 0 1 x

EL2620

x1

Lecture 9

## The closed-loop system is thus robust against model errors!

if sgn(pT g)

6
5 T
pT g
p (f g4T f4g T )p

V = (x)
pT g4
p g4

32

2011

30

2011

Phase Portrait

## Assume that only a model x = f4(x) + g

4(x)u of the true system
x = f (x) + g(x)u is known. Still, however,

EL2620

Lecture 9

x2

Simulation with

EL2620

Next Lecture

Lecture 9

EL2620

Lecture 9

EL2620

35

2011

33

2011

Todays Goal

Lecture 9

## You should be able to analyze and design

EL2620

34

2011

Nonlinear Controllers

## Lyapunov-based control design methods

Input-output linearization

Lecture 10

## EL2620 Nonlinear Control

Lecture 10

Linear controller: z = Az + By , u = Cz

2011

2011

## Nonlinear dynamical controller: z = a(z, y), u = c(z)

EL2620

Lecture 10

EL2620

Nonlinear Observers

x
# = f (#
x, u)

Lecture 10

## Second case is called Extended Kalman Filter

Linearize f at x
#(t), find K = K(#
x) for the linearization

Choices of K

x
# = f (#
x, u) + K(y h(#
x))

## Feedback correction, as in linear case,

Simplest observer

EL2620

Lecture 10

x = f (x, !(x))

system
!
!
""
x = f x, k h(x)

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

## has nice properties.

EL2620

2011

2011

x 2 = x21 + u

x 1 = a sin x2

Another Example

z1 = z2 , z2 = a cos x2 (x21 + u)

Lecture 10

u(x) =

x21

v
, x2 [/2, /2]
+
a cos x2

## and the linearizing control becomes

yields

z1 = x1 , z2 = x 1 = a sin x2

EL2620

Lecture 10

## Lyapunov-based design - backstepping control

Input-output linearization

EL2620

2011

2011

## Exact Feedback Linearization

x = cos x x3 + u

Lecture 10

with (A, B) controllable and (x) nonsingular for all x in the domain
of interest.

x = Ax + B(x) (u (x))

2011

## is feedback linearizable if there exist a diffeomorphism T whose

domain contains the origin and transforms the system into the form

x = f (x) + g(x)u

## Definition: A nonlinear system

is called a diffeomorphism

= T (x) with

Diffeomorphisms

x = kx + v

EL2620

Lecture 10

## yields the linear system

u(x) = cos x + x3 kx + v

Example 1:

2011

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

x = f (x) + g(x)u

EL2620

+ u, y = x2

u = x1 %(1

Lecture 10

x21 )x2
+u

x21 )x2

+v

y = v

y = x 1 = x2

x 2 = x1 + %(1
y = x1

x 1 = x2

EL2620

Lecture 10

## Caution: the control has rendered the state x1 unobservable

x 1 = a sin x2 , x 2 = v, y = x2
which is linear from v to y

to obtain

u = x21 + v

11

2011

2011

## The control law u = x21 + v/a cos x2 yields

x 1 = a sin x2 , x 2 =

x21

## The example again, but now with an output

EL2620

Input-Output Linearization

2011

= 1/sp

Lie Derivatives

2011

10

Lecture 10

Lkf h(x)

d(Lk1
d(Lf h)
f h)
f (x), Lg Lf h(x) =
g(x)
=
dx
dx

Repeated derivatives

12

dh
dh
x =
(f (x) + g(x)u) ! Lf h(x) + Lg h(x)u
dx
dx
where Lf h(x) and Lg h(x) are Lie derivatives (Lf h is the derivative
of h along the vector field of x = f (x))
y =

## The derivative of the output

x = f (x) + g(x)u ; x Rn , u R1
y = h(x), y R

## Consider the nonlinear SISO system

EL2620

Lecture 10

i.e., G(s)

y (p) = v

The general idea: differentiate the output, y = h(x), p times untill the
control u appears explicitly in y (p) , and then determine u so that

## linear from the input v to the output y

x = f (x) + g(x)u
y = h(x)

EL2620

2011

=nm

## The input-output linearizing control

Lecture 10

\$ %& '
dh
x = Lf h(x) + Lg h(x)u
dx

=0

f h(x)u

..
.

y =

## Differentiating the output repeatedly

x = f (x) + g(x)u
y = h(x)

EL2620

Lecture 10

15

2011

13

f h(x) \$= 0 x D

## has relative degree p

b0 sm + . . . + bm
Y (s)
= n
U (s)
s + a1 sn1 + . . . + an

A linear system

integrators between the input and the output (the number of times
y must be differentiated for the input u to appear)

EL2620

Example

1
Lg Lp1
f h(x)

Lecture 10

=2

Lpf h(x) + v

y (p) = v

u=

EL2620

Lecture 10

"

y = x 1 = x2

y = x1

x 1 = x2

EL2620

16

2011

14

2011

Zero Dynamics

2011

Lecture 10

## Here we limit discussion to Back-stepping control design, which

require certain f discussed later.

x = f (x, u)

17

19

2011

EL2620

Lecture 10

## The dynamics of the n p states not observable in the linearized

dynamics of y are called the zero dynamics. Corresponds to the
dynamics of the system when y is forced to be zero for all times.

EL2620

x 1 = x2

2011

x = cos x x3 + u

## A simple introductory example

= x2 /2

Lecture 10

18

20

2011

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

## Choose the Lyapunov candidate V (x)

u = cos x + x3 kx

Consider

EL2620

Lecture 10

(but bounded)

## With y = x2 the relative degree p = 1 < n and the zero

dynamics are given by x 1 = 0, which is not asymptotically stable

it yourself!

## With y = x1 the relative degree p = n = 2 and there are no

zero dynamics, thus we can transform the system into y
= v . Try

EL2620

u = cos x kx
2

= 0 with f (0) = 0.

(1)

2011

21

Lecture 10

x2

g(x1 )

f ()

x1

23

## Idea: See the system as a cascade connection. Design controller first

for the inner loop and then for the outer.

at x

x 2 = u

EL2620

Lecture 10

= x /2

x = cos x x3 + u

2011

0.5

1.5

2.5
time [s]

3.5

State trajectory

4.5

linearizing
non-linearizing

-200

200

400

600

800

1000

0.5

1.5

2.5
time [s]

Control input

3.5

Lecture 10

## for some positive definite function W .

)
*
dV
1
V 1 (x1 ) =
f (x1 ) + g(x1 )(x1 ) W (x1 )
dx1

can be stabilized by v
=
V1 = V1 (x1 ) such that

x 1 = f (x1 ) + g(x1 )
v

EL2620

Lecture 10

## The linearizing control is slower and uses excessive input. Thus,

linearization can have a significant cost!

0
0

10

= 10

## Simulating the two controllers

Simulation with x(0)

EL2620

State x

EL2620

Input u

24

2011

22

4.5

linearizing
non-linearizing

2011

The Trick

(x1 )

x2

g(x1 )

f + g

(
x1

dV1
g(x1 ) k,
dx1
k>0

g(x1 )

Lecture 10

Lecture 10

u=

x1

dV
g(z) (xk (z))
dz

W ). Then,

2011

26

2011

28

d
f (z) + g(z)xk
dz

## stable, and V (z) a Lyapunov fcn (with V

z = f (z) + g(z)(z)

= 0, f (0) = 0,

z = f (z) + g(z)xk
x k = u

## = (x1 , . . . , xk1 )T and

f + g

Back-Stepping Lemma

1)
(x

Assume (0)

stabilizes x

V 2 (x1 , x2 ) W (x1 ) k 2

v=

)
*
d
d

(x1 ) =
x 1 =
f (x1 ) + g(x1 )x2
dx1
dx1

Lemma: Let z

EL2620

Lecture 10

where

= v

EL2620

## = 0 is asymptotically stable for (1) with control law

u(x) = (x)
+ v(x).
If V1 radially unbounded, then global stability.

Hence, x

gives

Choosing

Consider V2 (x1 , x2 )

27

2011

25

2011

)
*
dV1
dV1

g(x1 ) + v
V2 (x1 , x2 ) =
dx1
dx1
dV1
W (x1 ) +
g(x1 ) + v
dx1

EL2620

Lecture 10

x 2 = u

EL2620

## Strict Feedback Systems

Back-Stepping

Example

32

Lecture 10

Lecture 10

u = n (x1 , . . . , xn )

2011

30

2011

## = x21 x1 stabilizes the first equation. With

V1 (x1 ) = x21 /2, Back-Stepping Lemma gives
where 1 (x1 )

x 1 = x21 + 1 (x1 ), x 2 = u1

## Step 0 Verify strict feedback form

Step 1 Consider first subsystem

x 1 = x21 + x2 , x 2 = x3 , x 3 = u

EL2620

Lecture 10

EL2620

31

2011

29

2011

## Back-stepping generates stabilizing feedbacks k (x1 , . . . , xk )

(equal to u in Back-Stepping Lemma) and Lyapunov functions

## on strict feedback form.

x = f (x) + g(x)u

EL2620

\$= 0

## x1 , . . . , xk do not depend on xk+2 , . . . , xn .

Lecture 10

Note:

where gk

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

..
.

## x 1 = f1 (x1 ) + g1 (x1 )x2

x 2 = f2 (x1 , x2 ) + g2 (x1 , x2 )x3
x 3 = f3 (x1 , x2 , x3 ) + g3 (x1 , x2 , x3 )x4

feedback form:

EL2620

Lecture 10

## which globally stabilizes the system.

33

2011

)
*
d2
dV2
g(z) (xn 2 (z))
f (z) + g(z)xn
u = u2 =
dz
dz
2 2
2
V2
=
(x1 + x2 ) +
x3
(x3 2 (x1 , x2 ))
x1
x2
x2

gives

x 1 = x21 + x2
x 2 = x3
x 3 = u

## Step 2 Applying Back-Stepping Lemma on

EL2620

x = f (x, u)

Controllability

Gain scheduling

Nonlinear controllability

Lecture 11

Lecture 11

## is controllable if for any x , x there exists T > 0 and

u : [0, T ] R such that x(0) = x0 and x(T ) = x1 .

Definition:

EL2620

Lecture 11

EL2620

2011

2011

Todays Goal

Lecture 11

## has full rank.

!
"
Wn = B AB . . . An1 B

x = Ax + Bu

Linear Systems

Lemma:

EL2620

Lecture 11

## You should be able to

EL2620

2011

2011

2011

= 0 and

z = Az + B1 u1 + B2 u2

= u2 = 0 gives

Lecture 11

2011

## linearization is not controllable. Still the car is controllable!

0
cos(0 + 0 )

0
sin(0 + 0 )
B1 = ,
B2 =

0
sin(0 )
1
0
!
"
rank Wn = rank B AB . . . An1 B = 2 < 4, so the

with A

Linearization for u1

EL2620

Lecture 11

## Hence, if rank Wn = n then there is an ! > 0 such that for every

x1 B! (0) there exists u : [0, T ] R so that x(T ) = x1

Remark:

## at x = 0 with f (0) = 0. If the linear system is controllable then the

nonlinear system is controllable in a neighborhood of the origin.

x = f (x) + g(x)u

z = Az + Bu

Controllable Linearization

be the linearization of

Lemma: Let

EL2620

(x, y)

Input:
velocity

## u1 steering wheel velocity, u2 forward

Car Example

2011

f
g
f
g
x
x

Lecture 11

*
) *
cos x2
x1
f=
,
g=
x1
1
)
*)
* )
*) *
1 0
cos x2
0 sin x2
x1
[f, g] =

0 0
x1
1
0
1
*
)
cos x2 + sin x2
=
x1

Example:

[f, g] =

: Rn Rn is a vector field

Lie Brackets
Lie bracket between vector fields f, g
defined by

EL2620

Lecture 11

2011

x
0
cos( + )

d
y 0
sin( + )
= u1 +
u2 = g1 (z)u1 + g2 (z)u2
dt 0
sin()

1
0

EL2620

4. Finally, for t

Lecture 11

t [0, !)
t [!, 2!)
t [2!, 3!)
t [3!, 4!)

[2!, 3!]

x(4!) = x0 + !2

[3!, 4!]

dg1
dg2
g1
g2
dx
dx

dg1
1 dg2
dg2
g1
g2 +
g2
dx
dx
2 dx

Proof, continued

x(3!) = x0 + !g2 + !

3. Similarily, for t

EL2620

Lecture 11

(1, 0),
(0, 1),
(1, 0),
(0, 1),

## x(4!) = x(0) + !2 [g1 , g2 ] + O(!3 )

(u1 , u2 ) =

x = g1 (x)u1 + g2 (x)u2

gives motion

the control

EL2620

11

2011

2011

Proof

= g2 (x0 ) +

dg2
dx !g1 (x0 )

## Car Example (Contd)

Lecture 11

g2
g1
g3 := [g1 , g2 ] =
g1
g2
x
x

0 0 sin( + ) sin( + )
0

cos( + ) 0
0 0 cos( + )
=
0
0
cos() 0
0 0
0 0
0
0
1

sin( + )

cos( + )
=

cos()
0

EL2620

Lecture 11

12

2011

10

*
)
dg2
1 dg2
1 dg1
(x0 )g1 (x0 ) +
(x0 )g1 (x0 ) +
(x0 )g2 (x0 )
!2
2 dx
dx
2 dx

## and with x(!) from (1), and g2 (x(!))

1 dg2
g2 (x(!))!2
2 dx

1 dg1
g1 (x0 )!2 + O(!3 )
2 dx

## x(2!) = x(!) + g2 (x(!))! +

[!, 2!]

x(!) = x0 + g1 (x0 )! +

(1)

2011

## [0, !], assuming ! small and x(0) = x0 , Taylor series yields

2. Similarily, for t

1. For t

EL2620

2011

Parking Theorem

Lecture 11

## Wriggle, Drive, Wriggle, Drive

13

15

2011

You can get out of any parking lot that is ! > 0 bigger than your car
by applying control corresponding to g4 , that is, by applying the
control sequence

EL2620

Lecture 11

(x, y)

## We can hence move the car in the g3 direction (wriggle) by applying

the control sequence

EL2620

2011

14

2011

Lecture 11

16

## 2 minute exercise: What does the direction [g1 , g2 ] correspond to for

a linear system x = g1 (x)u1 + g2 (x)u2 = B1 u1 + B2 u2 ?

EL2620

Lecture 11

sideways movement

g4 direction corresponds to

(sin(), cos())

sin( + 2)
cos( + 2)
g3
g2

g3
g2 = . . . =
g4 := [g3 , g2 ] =

x
x
0

EL2620

Lecture 11

## Controllable because {g1 , g2 , [g1 , g2 ]} spans R3

cos
0
sin
g1 = sin , g2 = 0 , [g1 , g2 ] = cos
0
1
0

2011

19

2011

17

## [g2 , [g2 , [g1 , g2 ]]]

[g2 , [g1 , g2 ]]

(x1 , x2 )

ExampleUnicycle

[g1 , g2 ]

## The Lie Bracket Tree

x
cos
0
d 1
x2 = sin u1 + 0 u2
dt

0
1

EL2620

Lecture 11

## [g1 , [g1 , [g1 , g2 ]]]

[g1 , [g1 , g2 ]]

EL2620

2011

Lecture 11

## Show that {g1 , g2 , [g1 , g2 ]} spans R3 for the unicycle

2 minute exercise:

EL2620

Lecture 11

20

2011

18

The system can be steered in any direction of the Lie bracket tree

Remark:

## is controllable if the Lie bracket tree (together with g1 and g2 ) spans

Rn for all x

x = g1 (x)u1 + g2 (x)u2

Controllability Theorem
Theorem:The system

EL2620

Gain Scheduling

Controller

Process

Gain
schedule

Output

Operating
condition

2011

21

Lecture 11

23

## Examples of scheduling variable are production rate, machine speed,

Mach number, flow rate

Control
signal

variable.

Command
signal

Controller
parameters

## Control parameters depend on operating conditions:

EL2620

Lecture 11

2011

0
cos
x1

d
sin

x
0

2
u1 + u2
=
dt 0
1
0
1

ExampleRolling Penny

## Controllable because {g1 , g2 , [g1 , g2 ], [g2 , [g1 , g2 ]]} spans R4

(x1 , x2 )

EL2620

2011

Lecture 11

EL2620

Lecture 11

v
u

x = f

Flo

Linear

Quickopening

Eualpercentage
Position

Valve Characteristics

## A: The answer requires Lie brackets and further concepts from

differential geometry (see Khalil and PhD course)

24

2011

22

## Q: When can we transform x = f (x) + g(x)u into z = Az + bv by

means of feedback u = (x) + (x)v and change of variables
z = T (x) (see previous lecture)?

EL2620

uc

Lecture 11

5.0

5.1

1.0

1.1

0.2

0.3

uc

uc

uc

## With gain scheduling:

EL2620

Lecture 11

10

Valve characteristics

EL2620

20

20

20

PI

0.5

40

40

40

f 1

60

60

60

1.5

f(u)

Process

Nonlinear Valve

80

80

80

f (u)

G 0 (s)

100
Time

100
Time

100
Time

27

2011

25

2011

Lecture 11

uc

uc

uc

q =

Pitch dynamics

EL2620

Lecture 11

5.0

5.2

1.0

1.1

0.2

0.3

20

20

20

Nz

Flight Control

10

10

10

EL2620

30

30

30

40
Time

40
Time

40
Time

28

2011

26

2011

1.6
0.8
1.2
Mach number

Todays Goal

0.4

Flight Control

2.0

Lecture 11

## You should be able to

EL2620

Lecture 11

20

40

60

80

Operating conditions:

EL2620

2.4

31

2011

29

2011

Lecture 11

EL2620

Filter

Pitch rate

Filter

Acceleration

Filter

Position

Pitch stick

A/D

A/D

A/D
M

T2 s
1+ T2 s

1
1+ T3 s

T1s
1+ T1s

K DSE

VIAS

H M VIAS

K QD

K Q1

K SG

Gear

VIAS H

M H

K NZ

Filter

D/A

D/A

To servos

30

2011

Optimal control

Lecture 12

2011

2011

Lecture 12

function

u(t)

## Idea: formulate the control design problem as an optimization problem

EL2620

Lecture 12

EL2620

Todays Goal

ExampleBoat in Stream

Lecture 12

v(x2 )

## x 1 (t) = v(x2 ) + u1 (t)

x 2 (t) = u2 (t)
x1 (0) = x2 (0) = 0

max x1 (tf )
u:[0,tf ]U

=1

x2

## Sail as far as possible in x1 direction

Speed of water v(x2 ) with dv/dx2

EL2620

Lecture 12

EL2620

x1

2011

2011

min

tf

x(t)

u:[0,tf ]U

Lecture 12

## Infinite dimensional optimization problem:

Optimization over functions u : [0, tf ] U

Remarks:

[1 u(t)]x(t)dt

x(t)

= u(t)x(t)
x(0) = x0 > 0

tf

> 0)

Standard form:

EL2620

Lecture 12

max

u:[0,tf ][0,1]

## change of production rate (

portion of x stored

portion of x reinvested

production rate

## Maximization of stored profit

ExampleResource Allocation

x(t) [0, )
u(t) [0, 1]
1 u(t)
u(t)x(t)
[1 u(t)]x(t)

EL2620

2011

2011

2011

"

1 + u2 (t)dt

tf

Lecture 12

uU

## Moreover, the optimal control is given by

H T
T

(t)
=
(x (t), u (t), (t)), (tf ) =
(x (tf ))
x
x

uU

2011

## Suppose the optimal control problem above has the solution

u : [0, tf ] U and x : [0, tf ] Rn . Then,

EL2620

Lecture 12

tf

x(t)

= u(t)
x(0) = a

u:[0,tf ]R

min

## Line: Vertical through (tf , 0)

Curve:

x(t)

Find the curve with minimal length between a given point and a line

EL2620

Remarks

2011

= 0)

u1 (t) = "

Lecture 12

21 (t) + 22 (t)

, u2 (t) = "

2 (t)

1
tf t
, u2 (t) = "
1 + (t tf )2
1 + (t tf )2

21 (t) + 22 (t)

1 (t)

u1 +u2 =1

1 (t)u1 + 2 (t)u2
= arg 2min
2

u1 (t) = "

Hence,

or

u1 +u2 =1

## u (t) = arg 2min

1 (t)(v(x2 (t)) + u1 ) + 2 (t)u2
2

Optimal control

EL2620

Lecture 12

9

11

2011

## Solution involves 2n ODEs with boundary conditions x(0) = x0

and (tf ) = T /x(x (tf )). Often hard to solve explicitly.

## there may exist many or none solutions

(cf., minu:[0,1]R x(1), x = u, x(0)

## increase the criterium. Then perform a clever Taylor expansion.

See textbook, e.g., Glad and Ljung, for proof. The outline is simply
to note that every change of u(t) from the optimal u (t) must

EL2620

tf

x(0) = x0

[u(t) 1]x(t)dt

(t)
= 1 u (t) (t)u (t),

(tf ) = 0

H = L + T f = (u 1)x + ux

Hamiltonian satisfies

Lecture 12

x(t)

= u(t)x(t),

u:[0,tf ][0,1]

min

## ExampleResource Allocation (contd)

EL2620

Lecture 12

2 (tf ) = 0

1 (tf ) = 1

(x) = x1

&
%
\$ v(x2 ) + u1
2
u2

1 (t) = 1, 2 (t) = t tf

1 (t) = 0,
2 (t) = 1 (t),

\$
H #
= 0 1 ,
x

have solution

H = f = 1

## ExampleBoat in Stream (contd)

Hamiltonian satisfies

EL2620

12

2011

10

2011

u[0,1]

(x (t) > 0)

Lecture 12

min

tf

1+

"

x(t)

= u(t),

u:[0,tf ]R

x(0) = a

u2 (t)dt

EL2620

Lecture 12

For t

= 1.

= (t).

u[0,1]
'
0,
(t) 1/
=
1,
(t) < 1/

Optimal control

EL2620

15

2011

13

2011

0.4

0.4

0.6

0.6

0.8

0.8

u (t)

1.2

1.2

t [0, tf 1/]
t (tf 1/, tf ]

0.2

0.2

(t)

1.4

1.4

1.6

1.6

1.8

1.8

Lecture 12

u4 dt + x(1)
x = x + u
x(0) = 0

min

EL2620

Lecture 12

## Its optimal to reinvest in the beginning

0.2

0.4

0.6

0.8

-1

-0.8

-0.6

-0.4

0
-0.2

'
1,

u (t) =
0,

EL2620

16

2011

14

2011

HistoryCalculus of Variations

"
1 + y \$ (x)2
"
dx
2gy(x)

Lecture 12

maxu h(tf )

## 0 u umax and m(tf ) = m1 (empty)

Optimization criterion:

Constraints:

u D
v

d
m

h =
v

dt
m
u

EL2620

Lecture 12

"
"
1 + y \$ (x)2
dx2 + dy 2
= "
dx
v
2gy(x)

J(y) =

ds
dt =
=
v

Minimize

time

19

2011

17

2011

## Brachistochrone (shortest time) problem (1696): Find the

(frictionless) curve that takes a particle from A to B in shortest

EL2620

HistoryOptimal Control

tf

Lecture 12

x(t)

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

(x(tf )) = 0

min

u:[0,tf ]U

Generalized form:

EL2620

Lecture 12

Financeportfolio theory

## PhysicsSnells law, conservation laws

Aeronauticssatellite orbits

Roboticstrajectory generation

EL2620

20

2011

18

2011

## H(x (tf ), u (tf ), (tf ), n0 )

(tf , x (tf ))
= n0 (tf , x (tf )) T
t
t

H T

(t)
=
x

(tf , x (tf ))
x
x

Lecture 12

Remarks:

EL2620

Lecture 12

D(v, h) + 0:

D(v, h) 0:

23

2011

21

2011

EL2620

2011

2011

22

tf

1 dt =

tf

## (x(tf )) = (x1 (tf ), x2 (tf ))T = (0, 0)T

u (t) = arg min 1 + 1 (t)x2 (t) + 2 (t)u
u[1,1]
'
1,
2 (t) < 0
=
1,
2 (t) 0

Lecture 12

min

u:[0,tf ][1,1]

## x 1 (t) = x2 (t), x 2 (t) = u(t)

u:[0,tf ][1,1]

min

24

Bring the states of the double integrator to the origin as fast as possible

EL2620

Lecture 12

where

uU

tf

x(t)

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

(tf , x(tf )) = 0

u:[0,tf ]U

min

Theorem: Suppose u
solutions to

EL2620

## x1 (t) = x1 (0) + x2 (0)t + t2 /2

x2 (t) = x2 (0) + t

= = 1, we have

u:[0,)Rm

min

Lecture 12

where L

(xT Qx + uT Ru) dt

SA + AT S + Q SBR1 B T S = 0

u = Lx

x = Ax + Bu

## has optimal solution

with

EL2620

Lecture 12

These define the switch curve, where the optimal control switch

With u(t)

## = 0, 2 (t) = 1 (t) gives

1 (t) = c1 , 2 (t) = c2 c1 t

1 (t)

EL2620

27

2011

25

2011

2011

Properties of LQ Control

Lecture 12

1978)

## Closed-loop system stable with u = (t)Lx for

(t) [1/2, ) (infinite gain margin)

Stabilizing

EL2620

Lecture 12

## reference value to a linear regulator, which keeps the system

close to the wanted trajectory

28

2011

26

## Optimal control problem makes no distinction between open-loop

control u (t) and closed-loop control u (t, x).

EL2620

Lecture 12

EL2620

Lecture 12

EL2620

31

2011

29

2011

15

Acceleration

0.05

0.05

0.1

0.1

0.15

0.15

0.2

0.2

Slosh

0.25

0.25

0.3

0.3

0.35

0.35

0.4

0.4

2011

30

2011

Lecture 12

## Applications: Aeronautics, Robotics, Process Control,

Bioengineering, Economics, Logistics

32

## Pontryagins Maximum principle: Main results; Special cases such

as time optimal control and LQ control

## Dynamic Programming: Discrete & continuous; Principle of

optimality; Hamilton-Jacobi-Bellman equation

http://www.math.kth.se/optsyst/

EL2620

Lecture 12

-1

-0.5

0.5

-15

-10

-5

10

## Given dynamics of system and maximum slosh = 0.63, solve

.t
minu:[0,tf ][10,10] 0 f 1 dt, where u is the acceleration.

EL2620

Todays Goal

Lecture 12

Generalized form

Standard form

EL2620

33

2011

## Fuzzy logic and fuzzy control

Artificial neural networks

Lecture 13

Fuzzy Control

Lecture 13

## IF Speed is High AND Traffic is Heavy

THEN Reduce Gas A Bit

Example of a rule:

Idea:

## Many plants are manually controlled by experienced operators

EL2620

Lecture 13

en
and M. Johansson
Some slides copied from K.-E. Arz

EL2620

2011

2011

Todays Goal

Lecture 13

## Fuzzy control design

Model manual control Implement control rules

## Conventional control design

Model plant P Analyze feedback Synthesize controller C
Implement control algorithm

EL2620

Lecture 13

You should

EL2620

2011

2011

x A or x \$ A

Fuzzy Logic

AND Y OR Z

Lecture 13

## Defines logic calculations as X

Fuzzy logic:
AND: AB (x) = min(A (x), B (x))
OR: AB (x) = max(A (x), B (x))
NOT: A! (x) = 1 A (x)

Conventional logic:
AND: A B
OR: A B
NOT: A!

EL2620

Lecture 13

25

Warm

Cold

10

## A fuzzy set is defined as (A, A )

Membership function:
A : [0, 1] expresses the degree x belongs to A

EL2620

2011

2011

Example

Cold

10

10

Cold

Lecture 13

25

CW

Warm

EL2620

Lecture 13

10

Cold

CW

25

Warm

## Q2: Is it cold OR warm?

25

Warm

= 1/3.

Example

15

Q2: Is x = 15 warm?
A2: It is not really warm since W (15)

## Q1: Is the temperature x = 15 cold?

A1: It is quite cold since C (15) = 2/3.

EL2620

2011

2011

Fuzzy
Controller

u
Plant

y

Fuzzifier

Lecture 13

Example
y = 15: C (15)

15

25

Warm

Cold

10

EL2620

Lecture 13

## r, y, u : [0, ) ( R are conventional signals

EL2620

11

2011

2011

y
Fuzzifier

Fuzzy Controller
Fuzzy
Inference

Fuzzy Inference

Lecture 13

Rule 2:

! "# \$

2.

1.

2.

IF y is Warm THEN u
! is"#Low\$
! "# \$

1.

! "# \$

## Examples of fuzzy rules:

Rule 1: IF y is Cold THEN u is High

Fuzzy Inference:

EL2620

Lecture 13

Defuzzifier

Fuzzy Controller

## Fuzzifier: Fuzzy set evaluation of y (and r )

Fuzzy Inference: Fuzzy set calculations
Defuzzifier: Map fuzzy set to u

EL2620

12

2011

10

2011

Lecture 13

EL2620

Lecture 13

15

2011

13

2011

EL2620

Lecture 13

EL2620

Lecture 13

Defuzzifier

16

2011

14

2011

EL2620

Fuzzifier

Fuzzy Controller

Fuzzy
Inference
Defuzzifier

Lecture 13

EL2620

19

2011

Lecture 13

EL2620

Lecture 13

Lecture 13

20

2011

18

2011

## ExampleFuzzy Control of Steam Engine

EL2620

http://isc.faqs.org/docs/air/ttfuzzy.html
17

2011

## Fuzzy Inference: Fuzzy set calculations

Fuzzy ControllerSummary

EL2620

Lecture 13

EL2620

Lecture 13

EL2620

23

2011

21

2011

Lecture 13

EL2620

Lecture 13

EL2620

24

2011

22

2011

## Pros and Cons of Fuzzy Control

2011

Lecture 13

EL2620

Lecture 13

Brain neuron

xn

x1
x2

wn

()

Artificial neuron

w1
w2

Neurons

27

2011

25

## User-friendly way to design nonlinear controllers

EL2620

Lecture 13

xn

w2
x2

wn

w1
x1

()

%
'
&
y = b + ni=1 wi xi

Model of a Neuron
Inputs: x1 , x2 , . . . , xn
Weights: w1 , w2 , . . . , wn
Bias: b
Nonlinearity: ()
Output: y

EL2620

Lecture 13

## A network of computing components (neurons)

Neural Networks
How does the brain work?

EL2620

28

2011

26

2011

Lecture 13

Success Stories

Lecture 13

31

2011

29

2011

Fuzzy controls:

EL2620

Output Layer

u3

u2

u1

EL2620

Todays Goal

Lecture 13

You should

EL2620

Lecture 13

EL2620

32

2011

30

2011

Next Lecture

Lecture 13

EL2620

33

2011

Question 1

Lecture 14

Question 2

Lecture 14

Lecture 14

## saturations, valves etc

Optimal control

Nonlinear controllability

Evaluate:

approach:

EL2620

Lecture 14

## See homepage for old exams

TEFYMA or BETA
(No other material: textbooks, exercises, calculators etc. Any
other basic control book must be approved by me before the
exam.).

You may bring lecture notes, Glad & Ljung Reglerteknik, and

Exam
Regular written exam (in English) with five problems

EL2620

## Sliding modes, equivalent controls

Describing functions

2011

2011

EL2620

Lecture 14

EL2620

2011

2011

Question 3

k1 y

k11
k12

## The Circle Criterion

k2 y f (y)

G(i)

Lecture 14

If the Nyquist curve of G(s) stays on the correct side of the circle
defined by the points 1/k1 and 1/k2 , then the closed-loop
system is BIBO stable.

k1 f (y)/y k2 .

## Theorem Consider a feedback loop with y = Gu and

u = f (y). Assume G(s) is stable and that

EL2620

Lecture 14

2011

## Since they do not provide necessary conditions for stability, none

But, if one method does not prove stability, another one may.

## No, the Small Gain Theorem, Passivity Theorem and Circle

2011

Can a system be proven stable with the Small Gain Theorem and
unstable with the Circle Criterion?

EL2620

Question 4

Lecture 14

2011

2011

< 0 < k2 ?

3.

2.

1.

Stable system G

EL2620

Lecture 14

EL2620

Question 5

G KD

Lecture 14

s 1

F KC

s 1

xc

xc

sat

EL2620

Lecture 14

EL2620

11

2011

2011

Lecture 14

EL2620

Lecture 14

EL2620

(b)

(a)

K
Ti

1
Tt

1
s

1
Tt

1
s

+
es

Actuator

es

Actuator

Actuator model

Question 6

KTd s

KTd s

K
Ti

Tracking PID

12

2011

10

2011

#x(t)# < R, t 0

lim x(t) = 0

Lecture 14

then x

V (x) as #x#

## V (x) > 0, for all x )= 0

V (0) = 0

15

2011

13

2011

= 0. Assume that V : Rn R

## Theorem Let x = f (x) and f (0)

is a C 1 function. If

EL2620

Lecture 14

x(0) Rn .

#x(0)# < r

#x(0)# < r

## locally stable, if for every R

= 0 of x = f (x) is

Stability Definitions

An equilibrium point x

EL2620

Lecture 14

then x

16

## = f (x) such that V (x) = 0 is x(t) = 0

V (x) as #x#
(5) The only solution of x
for all t

(4)

(2)
(3)

V (0) = 0

(1)

## Theorem: Let x = f (x) and f (0)

V : Rn R such that

14

2011

Stability

EL2620

Lecture 14

then x

then x

V (0) = 0

2011

Rn . Assume that

## Lyapunov Theorem for Local Stability

Theorem Let x = f (x), f (0) = 0, and 0
V : R is a C 1 function. If

EL2620

2011

g
k
x 1 = x2 , x 2 = sin x1 x2
l
m
1
k
g
V (x) = (1 cos x1 ) + x22 V = x22
l
2
m

2011

17

Lecture 14

## The domain is compact if we consider

= {(x1 , x2 ) R2 |V (x) c}

M = {(x1 , x2 )|x1 = k, x2 = 0}

19

## The invariant points in E are given by x 1 = x2 = 0 and x 2 = 0.

Thus, the largest invariant set in E is

## We can not prove global asymptotic stability; why?

The set E = {(x1 , x2 )|V = 0} is E = {(x1 , x2 )|x2 = 0}

EL2620

Lecture 14

## and V is a positive definite function

= {x Rn |V (x) c}

consider

Let V

## : Rn R be a C 1 function such that V (x) 0 for x .

Let E be the set of points in where V (x) = 0. If M is the largest
invariant set in E , then every solution with x(0) approaches M
as t

x = f (x).

Theorem Let
with respect to

EL2620

2011

Lecture 14

## If we e.g., consider : x21 + x22 1 then

M = {(x1 , x2 )|x1 = 0, x2 = 0} and we have proven

EL2620

Lecture 14

In particular, if the compact region does not contain any fixed point
then the -limit set is a limit cycle

20

2011

18

## Poincare-Bendixson Any orbit of a continuous 2nd order system that

stays in a compact region of the phase plane approaches its -limit
set, which is either a fixed point, a periodic orbit, or several fixed
points connected through homoclinic or heteroclinic orbits

EL2620

Question 7

x 1 = ax1 (t)

Lecture 14

## Choose large a: fast convergence along sliding manifold

(x) = ax1 + x2 = 0

x 1 = x2 (t)
x 2 = x1 (t)x2 (t) + u(t)

Example

EL2620

Lecture 14

23

2011

21

2011

EL2620

S of

2011

## Step 2. The Sliding Controller

Lecture 14

Example: f (x)

u=

2011

u = x1 x2 x2 sgn(x1 + x2 )
24

f (x) + x2 + sgn()
g(x)
= x1 x2 , g(x) = 1, = x1 + x2 , yields

## = x2 , x 2 = f (x) + g(x)u and

= 0.5 2 yields V =

= x1 + x2 we get

invariant set

EL2620

22

Lecture 14

If x

## and make S invariant

S = {x Rn |(x) = 0} R1

## Idea: use u to force the system onto a sliding manifold

dimension n 1 in finite time

x = f (x) + g(x)u, x Rn , u R1

EL2620

2011

ueq = x2 x1 x2

Question 8

Lecture 14

## Can you repeat backstepping?

EL2620

Lecture 14

27

2011

25

Thus, the sliding controller will take the system to the sliding manifold
S in finite time, and the equivalent control will keep it on S .

= x 1 + x 2 = x2 + x1 x2 + ueq = 0

Example:

## However, an equivalent control ueq (t) that keeps x(t) on S can be

computed from = 0 when = 0

## When trajectory reaches sliding mode, i.e., x

(high frequency switching).

EL2620

Note!

Backstepping Design

Lecture 14

## In this course we only consider f (x, u) with a special structure,

namely strict feedback structure

28

2011

26

2011

## General Lyapunov control design: determine a Control Lyapunov

function V (x, u) and determine u(x) so that

x = f (x, u)

system

EL2620

Lecture 14

## This is OK, but is not completely general (see example)

u = sgn()

Previous years it has often been assumed that the sliding mode
control always is on the form

EL2620

## The Backstepping Result

2011

29

2011

Lecture 14

31

!
"
d
dV
u(x) =
f (x1 )+g(x1 )x2
g(x1 )(xk (x1 ))f2 (x1 , x2 )
dx1
dx1

## x 1 = f1 (x1 ) + g1 (x1 )x2

x 2 = f2 (x1 , x2 ) + u

= (x1 ).

## Then V2 (x1 , x2 ) = V1 (x1 ) + (x2

Lyapunov Function for the system

## with corresponding controller u

x 1 = f1 (x1 ) + g1 (x1 )u

## Let V1 (x1 ) be a Control Lyapunov Function for the system

EL2620

)= 0

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

..
.

## x 1 = f1 (x1 ) + g1 (x1 )x2

x 2 = f2 (x1 , x2 ) + g2 (x1 , x2 )x3
x 3 = f3 (x1 , x2 , x3 ) + g3 (x1 , x2 , x3 )x4

Lecture 14

Note:

where gk

EL2620

Lecture 14

EL2620

Lecture 14

Question 9

## x1 = f1 (x1 ) + g1 (x1 )x2

x2 = f2 (x1 , x2 ) + u

## find a Control Lyapunov function V2 (x1 , x2 ), with corresponding

control u = 2 (x1 , x2 ), for the system

x 1 = f1 (x1 ) + g1 (x1 )u

## Given a Control Lyapunov Function V1 (x1 ), with corresponding

control u = 1 (x1 ), for the system

EL2620

32

2011

30

2011

Backlash Compensation

1+sT2
K 1+sT
1

1
1 + sT
1
s

Question 10

in

Lecture 14

EL2620

Lecture 14

ref

in

Backlash inverse

## Linear controller design

EL2620

33

35

2011

out

2011

-5

without filter
10

-2

-1
0

u, with/without filter

y, with/without filter

Oscillation removed!

with filter

0
0

0.5

1.5

10

10

Inverting Nonlinearities

Real Axis

Nyquist Diagrams

f1 ()

f ()

Lecture 14

F (s)

Controller

15

15

G(s)

## Compensation of static nonlinearity through inversion:

EL2620

Lecture 14

-10
-10

-8

-6

-4

-2

10

1+sT2
F (s) = K 1+sT
with T1 = 0.5, T2 = 2.0:
1

20

20

36

2011

34

2011

EL2620

Imaginary Axis

f ()

k
s

#
\$
e = v f (u)

Lecture 14

EL2620

Lecture 14

Question 12

#
\$
0 = v f (u)

f (u) = v

If k

f (u)

39

2011

u = f 1 (v)

37

2011

Feedback

EL2620

Question 11

%y%2
%u%2

n=1

N.L.

G(s)

2011

38

2011

Lecture 14

40

## . |G(i)| for n 2, then n = 1 suffices, so that

'
y(t) |G(i)| a21 + b21 sin[t + arctan(a1 /b1 ) + arg G(i)]

If |G(in)|

u(t) =

%
&

## Idea Behind Describing Function Method

EL2620

Lecture 14

Passivity Theorem

Circle Criterion

BIBO stability

EL2620

N.L.

e(t)
N (A, )

u
(1 (t)

Lecture 14

## EL2450 Hybrid and Embedded Control Systems, per 3

EL2620

Lecture 14

= 0 then

u(t)

u
(1 (t) = |N (A, )|A sin[t + arg N (A, )] u(t)

e(t)

N (A, ) =

b1 () + ia1 ()
A

EL2620

43

2011

41

2011

G(i) =

G(i)
1/N (A)

e
f () u G(s)

1
N (A)

Lecture 14

## Linear multivariable systems

Multivariable control:

Period 4, 7.5 p

44

2011

42

2011

## Aim: provide an introduction to principles and methods in advanced

control, especially multivariable feedback systems.

EL2620

Lecture 14

## The intersections of the curves G(i) and 1/N (A)

give and A for a possible periodic solution.

replacements

EL2620

Systems

Lecture 14

Contact: Hakan

Period 1, 6 p

## Aim: teach how to systematically build mathematical models of

technical systems from physical laws and from measured signals.

EL2620

Lecture 14

Period 3, 7.5 p

## Aim:course on analysis, design and implementation of control

algorithms in networked and embedded systems.

EL2620

47

2011

45

2011

Networks

Lecture 14

Lecture 14

jonas1@kth.se

Team work

Period 4, 12 p

46

48

2011

## Aim: provide practical knowledge about modeling, analysis, design,

and implementation of control systems. Give some experience in
project management and presentation.

EL2620

2011

## Essential tools within communication, control, optimization and

signal processing needed to cope with WSN

Period 3, 7.5 cr

## Aim: provide the participants with a basic knowledge of wireless

sensor networks (WSN)

EL2620

Lecture 14

Hints:

## The research edge

Cross-disciplinary

49

2011

Control Lab

EL2620

Control

Lecture 14

Competitive

## Get paid for studying

Intellectual stimuli

EL2620

50

2011