Lecture 10
Lecture 10
1. Introduction
Dynamics is a major issue in control, since both the processes to be controlled and the controllers are dynamical
systems.
K. J. strm
1. Introduction
4. Physical Modeling
5. Homework
Theme: Physical modeling, state models, linearization
Newtons idea!
y = f (u )
Cruise Control
dV
= qin qout
Massbalance
dt
Z h
V=
A( h) dh
Geometry
0
p
Energybalance
qout = a 2g h
An Inverted Pendulum
p
dh
1
( qin a 2g h)
=
dt
A( h)
p
qout = a 2g h
Momentum balance
(Newtons Equation)
d2
mg l sin +mul cos = 0
dt2
qout = qin
q2
h = in 2
2g a
Not influenced by A!
Run ICtools or SysQuake
q
in
p
Normalize with 0 = mgQ/ J , introduce = 0 t and u = u/g
then
d2
sin + u cos = 0
d 2
c K. J. strm August, 2001
&
Pendulum on a Cart
Equations of motion Momentum balances
J p + ml x cos mg l sin = 0
ml cos ml 2 sin + M x = F
Standard Model
x state
dx
= x2 ,
dt
x(t) =
1
1t
dx
= 2 x , x(t) = 0
dt
2
( t a)
if t 0,
if t a
if t > a
Inverted Pendulum
Inverted Pendulum
The model:
The model:
dx1
= x2
dt
dx2
mgQ
mQ
=
sin x1 +
u cos x1
dt
Jp
Jp
dx1
= x2
dt
dx2
mgQ
mQ
=
sin x1 +
u cos x1
dt
Jp
Jp
Two cases:
Linearization
dx1
= f 1 ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
dt
dx2
= f 2 ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
dt
..
.
dxn
= f n ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
dt
y1 = g1 ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
y2 = g2 ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
..
.
yr = g1 ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
c K. J. strm August, 2001
&
A curve is approximated by
its tangent
Start with
dx
= f ( x , u)
dt
y = g( x, u)
10
y = g(u)
f ( x0 , u0 ) = 0
y y0 = gP (u0 )(u u0 )
u
When is the approximation
good?
0
0.5
1.5
2.5
3.5
dx
= f ( x , u)
dt
y = g( x, u)
d x
dx
=
= f ( x0 + x, u0 + u)
dt
dt
Vf
Vf
f ( x0 , u0 ) +
( x0 , u0 ) x +
( x0 , u0 ) u
Vx
Vu
y0 + y = g( x0 + x, u0 + u)
Vg
Vg
( x0 , u0 ) x +
( x0 , u0 ) u
y0 +
Vx
Vu
u = u0 + u,
y = y0 + y
Hence
Vf
Vf
dx
= f ( x0 + x, u0 + u) f ( x0 , u0 ) +
( x0 , u0 ) x +
( x0 , u0 ) u
dt
Vx
Vu
Vg
Vg
( x0 , u0 ) x +
( x0 , u0 ) u
y = g( x0 + x, u0 + u) y0 +
Vx
Vu
Vf
Vf
d x
=
( x0 , u0 ) x +
( x0 , u0 ) u = A x + B u
dt
Vx
Vu
Vg
Vg
y=
( x0 , u0 ) x +
( x0 , u0 ) u = C x + D u
Vx
Vu
A Remark on Notations
A=
Component-wise
a12
d x
= A x + B u
dt
y = C x + D u
Vf
( x0 , u0 )
Vx
Vg
C=
( x0 , u0 )
Vx
..
.
an1 =
Vf
( x0 , u0 )
Vu
Vg
D=
( x0 , u0 )
Vu
qout
ann =
V f n( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
V xn
p
= qin = q0 = a 2g h0
States x1 = = y and x2 =
dx1
= x2
dt
dx2
mgQ
mQ
sin x1 +
u cos x1
=
dt
J
J
q20
h0 =
2g a2
d h
a
2g
1
a 2 g h0
1
=
h + qin =
h + qin
dt
2A h0
A
2Ah0
A
r
2g
a 2 g h0
q0
qout = a
h =
h = h
h0
h0
h0
Time constant
2Ah0
Total water volume [m3 ]
T=
= 2
q0
Flow rate [m3 /s]
Physical interpretation!
V f n( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
V x1
..
.
B=
V f 1 ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
V x1
V f 1 ( x1 , x2 , . . . , xn , u1 , u2 , . . . , u p)
=
V x2
a11 =
can be approximated by
A=
Vf
( x0 , u0 )
Vx
x2
mgQ
mQ
sin x1 +
u cos x1
J
J
f ( x , u) =
x2
mgQ
J
sin x1 +
mQ
u cos
J
dx
= Ax + Bu
dt
y = Cx + Du
x1
Vf
Vf
0
1
0
,
= mgQ
= mQ
mQ
0
Vx
Vu
J cos x1 J u sin x1
J cos x1
Evaluate for u = 0, x1 = 0 och x2 = 0 (pendulum up)
Vf
Vf
0
1
0
A=
= mgQ
B=
= mQ
0
Vx
Vu
J
J
Z
x( t) = e x(0) +
At
e A( t s) Bu( s) ds
y( t) = Ce At x(0) + C
e A( t s) Bu( s) ds + Du( t)
1
1
eAt = I + At + ( At)2 + . . . + An tn + . . .
2
n!
=T
.
.
.
e At = T ( I + t +
= Tet T 1
Differentiate!
d At
1
1
( At)n1 + . . . = AeAt
e = A + At + ( At)2 . . . +
dt
2
(n 1)!
Rt
Differentiation of x(t) = eAt x(0) + 0 eA(t ) Bu( )d
1 n n
t + . . .) T 1
n!
...
0
...
0
1
T
...
1
1
1
eAt = I + At + ( At)2 + ( At)3 . . . + ( At)n + . . .
2
3!
n!
gives
e n t
dx
= Ax + Bu
dt
dx
= Ax + Bu
dt
y = Cx + Du
Input-output relation
Z
y(t) = Ce x(0) + C
At
Summary
Obtaining dynamics from physics
The concept of state
The standard model for nonlinear finite dimensional
systems
dx
= f ( x, u), y = g( x, u)
dt
Linearization and linear time invariant (LTI) systems
The standard model for linear time invariant systems
dx
= Ax + Bu,
dt
y = Cx + Du