2E1282 Modeling of Dynamical Systems: Automatic Control School of Electrical Engineering
2E1282 Modeling of Dynamical Systems: Automatic Control School of Electrical Engineering
• Disposition
6 hp, lp 4
24h lectures, 24h exercises, 3 lab sessions
• Instructors
Håkan Hjalmarsson, hakan.hjalmarsson@ee.kth.se
Oscar Flärdh, oscar.flardh@ee.kth.se
• Course administration
Anneli Ström (course registration,
STEX (computer accounts, exam registration)
Lecture 1 1
2E1282 2009
Course goal
To teach systematic methods for building mathematical models of
dynamical systems based on physical priciples and measured data
Lecture 1 2
2E1282 2009
Course outline
Modeling overview L1
Physical modeling L1-L5
Simulation L6
System identification L7-L11
Summary L12
Lecture 1 3
2E1282 2009
Material
All info and handouts available in real-time at
http://www.ee.kth.se/control/courses/EL1820
Lecture 1 4
2E1282 2009
• Practical information
• Course outline
• Introduction to modeling
Lecture 1 5
2E1282 2009
Lecture 1 6
2E1282 2009
v 2R
u 2L
r y
1R x z
1L
0.5
-0.5
0 0.5 1 1.5 2 2.5 3
1 Time [s]
50
O
0
W WL
-1
0 0.5 1 1.5 2 2.5 3
Time [s]
40
8000
6000
[N]
4000
1zL
F
2000
0
30
0 0.5 1 1.5 2 2.5 3
Time [s]
8000
[N]
6000
1zR
4000
F
2000
20
0 0.5 1 1.5
Time [s]
2 2.5 3
wheel lift-off
6000
[N]
4000
2zL
10
2000
F
0
0 0.5 1 1.5 2 2.5 3
Time [s]
6000
[N]
0
4000
2zR
0
15
10
F
2000
Lecture 1 7
2E1282 2009
Lecture 1 8
2E1282 2009
Driving forces
• Economic and profitability requirements
• Quality and performance objectives
• Safety
• Environmental requirements
• Regulations
• New technologies – new opportunities
Lecture 1 9
2E1282 2009
Lecture 1 10
2E1282 2009
throttle
angle
Engine
Desired velocity Actual velocity
Controller Gearbox Vehicle
brake Brake
pressure
Lecture 1 11
2E1282 2009
Lecture 1 12
2E1282 2009
Classes of models
Many classes of models
Lecture 1 13
2E1282 2009
• Physical modeling
– Use first principles, laws of nature, etc. to model components
– Need to understand system and master relevant facts!
• System identification
– Use experiments and observations to deduce model
– Need prototype or real system!
Lecture 1 14
2E1282 2009
E
Motor Coupling Load
E
Lecture 1 15
2E1282 2009
State equations
di
La = Vs − Ra i − km ωm
dt | {z }
em
dθm dωm
= ωm Jm = km i − dm ωm − kc (θm − θl ) − dc (ωm − ωc )
dt dt |{z}
Tm
dθl dωl
= ωl Jl = −dl ωl − kc (θl − θm ) − dc (ωl − ωm )
dt dt
Lecture 1 16
2E1282 2009
75
74
73
75.5
75
74.5 1.34e−12.9s
74
Y (s) ≈ U (s)
73.5
(43.3s + 1)2
y
73
72.5
72
900 950 1000 1050 1100 1150 1200 1250 1300 1350 1400
for controller tuning!
Lecture 1 17
2E1282 2009
• Important to know which aspects are modelled and which are not
• Make sure that model is valid for intended purpose
• “If the map does not agree with reality, trust reality”
All-encompasing models often a bad idea
Lecture 1 18
2E1282 2009
vE
υE
E
vP
y
υP
x P
Lecture 1 19
2E1282 2009
Piv ot
d2
20 log |H|
Disks
Jm 2 θ = Mm
dt
Heads
Suspension 100 Hz 1 kHz
Frequency
Lecture 1 20
2E1282 2009
20 log |H|
Mode Disks
Sw ay
Mode
Heads Gimbal
Piv ot Suspension
Mode 100 Hz 1 kHz
Voice Mode Ya w Frequency
Coil Torsion
Slider Mode
Motor Mode
Lecture 1 21
2E1282 2009
• Practical information
• Course outline
• Introduction to modeling
• State-space models
Lecture 1 22
2E1282 2009
• (time-varying) signals
Lecture 1 23
2E1282 2009
State-space models
Many systems naturally described by differential equations
ẋ1 (t) = f1 (x1 (t), . . . , xn (t), u1 (t), . . . , um (t))
ẋ2 (t) = f2 (x1 (t), . . . , xn (t), u1 (t), . . . , um (t))
..
.
ẋn (t) = fn (x1 (t), . . . , xn (t), u1 (t), . . . , um (t))
Or, in vector notation
ẋ(t) = f (x(t), u(t))
Lecture 1 24
2E1282 2009
q in
h
q out
State-space model
d dh p
V = qin − qout ⇒ A = −a 2gh + qin
dt dt
Lecture 1 25
2E1282 2009
• stationary behaviour
• linearized dynamics
Linear models useful for gaining insight
• stability
• time scales
• poles/zeroes
• what parameters influence dynamics?
Lecture 1 26
2E1282 2009
Stationary points
Given a system
ẋ(t) = f (x(t), u(t))
y(t) = g(x(t), u(t))
A solution (x0 , u0 ) such that
0 = f (x0 , u0 )
Lecture 1 27
2E1282 2009
Static relations
For asymptotically stable stationary point (x0 , u0 ), output converges to
y0 = h(x0 , u0 )
Since x0 depends implicitly on u0 ,
y0 = h(x(u0 ), u0 ) = g(u0 )
Lecture 1 28
2E1282 2009
Linearization
Near a stationary point, the system is approximately linear
d
∆x(t) = A∆x(t) + B∆u(t)
dt
∆y(t) = C∆x(t) + D∆u(t)
∂f1 ∂f1
(x , u ) ... (x0 , u0 )
∂x1 0 0 ∂xn
.. ..
A=
. .
∂f ∂fn
n
(x0 , u0 ) ... (x0 , u0 )
∂xn ∂xn
and B, C, D are computed similarly.
Lecture 1 29
2E1282 2009
Example
Model of bicycle dynamics
2
mlV02
d θ mgl cos θ a dβ
= sin θ + tan β +
dt2 Jp bJp V0 cos2 β dt
where θ is the vertical tilt and β is front wheel angle (control)
Lecture 1 30
2E1282 2009
Example
Linearized dynamics (around θ = β = 0)
d2 θ mlV02
mgl a dβ
= θ+ β+
dt2 Jp bJp V0 dt
has transfer function
a
s 1+
mlV02 V0
G(s) =
bJp 2 mgl
s −
Jp
Gain proportional to V02
– more control authority at high speeds
p p
Unstable pole at mgl/Jp ≈ g/l – slower when l is large
– easier to ride a full size bike than a children’s bike
From lecture notes by K.J. Åström, LTH
Lecture 1 31
2E1282 2009
Next Lecture
• A modeling methodology
• Principles of physical modeling
• Examples: electronics, mechanics and thermodynamics
Lecture 1 32