Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

2E1282 2009

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

You should after the course be able to

• build mathematical models of technical systems from first priciples


• use the most powerful tools for modeling and simulation
• construct mathematical models from 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

2E1282 Modeling of Dynamical Systems

Lecture 1 - Introduction to Modeling

• Practical information
• Course outline
• Introduction to modeling

Lecture 1 5
2E1282 2009

Approaches for solving technical problems


1. Follow the tradition
– do as previously, rely on rules of thumb
– plagiarism

2. Experiment, use trial-and-error


– prototypes
– full-scale trials

3. Mathematical models and methods

Lecture 1 6
2E1282 2009

Mathematical models and methods


Example: Modeling of SUV rollover dynamics

v 2R

u 2L
r y

1R x z

1L

Physical object Abstraction

0.5

Steering angle [rad]


0

-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

0 0.5 1 1.5 2 2.5 3


Time [s]

Mathematical model Simulation experiments

From master thesis by B. Johansson

Lecture 1 7
2E1282 2009

Mathematical models and methods


• Do not require a physical system
– Can treat new designs/technologies without prototype
– Do not disturb operation of existing system
• Are easier to work with than real world
– Easy to evaluate many approaches, parameter values, . . .
– Flexible to time-scales
– Can access unmeasurable quantities
• Support safety
– Experiments may be dangerous
– Operators need to train for extreme situations
• Help to gain insight and understanding

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

Modeling of dynamical systems


What is a system?

“An object or collection of objects whose properties we


would like to study”

Lecture 1 10
2E1282 2009

The systems concept


A way of structuring problems

• what belongs to the system, and what does not


• inputs, outputs and internal dynamics

Example Systems view of cruise control in a car


environment

throttle
angle
Engine
Desired velocity Actual velocity
Controller Gearbox Vehicle

brake Brake
pressure

Lecture 1 11
2E1282 2009

Modeling of dynamical systems


“A model M for a system S and an experiment E is
anything to which E can be applied in order to answer
questions about S .”

A model is a tool which we use to avoid making real experiments

Lecture 1 12
2E1282 2009

Classes of models
Many classes of models

• a piece of hardware, mental model, mathematical model, . . .


We will only consider mathematical models

• algebraic equations, ODEs, PDEs, finite automota, . . .

We will focus on models based on differential and algebraic equations


ẋ(t) = f (x(t), u(t), w(t))
0 = g(x(t), u(t), w(t))

Lecture 1 13
2E1282 2009

How do you build mathematical models?


Two basic approaches

• 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

Example: physical modeling


DC motor with flexible coupling

A schematical illustration of the system structure

E
Motor Coupling Load
E

Example from lecture notes by S-E Mattsson, LTH

Lecture 1 15
2E1282 2009

Example: physical modeling


More detailed schematic
Motor Coupling Load
kc
Jm Jl
i
Ra La
Vs em Tm dc dl
dm

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

Example: system identification


Model of a starch boiler in a Swedish paper mill
– how does supplied steam influence boiler temperature?
– make step change in steam supply, observe temperature:

75

Transfer function fit


u

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

71.5 Model good enough


71

900 950 1000 1050 1100 1150 1200 1250 1300 1350 1400
for controller tuning!

Example from Panagopoulos et al. (2000)

Lecture 1 17
2E1282 2009

All models are approximate!


A model captures only some aspects of a system

• 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

• Large and complex – hard to gain insight


• Cumbersome and slow to manipulate
Good models are simple, yet capture the essentials!

Lecture 1 18
2E1282 2009

Quiz: vessel collision detection

vE
υE
E
vP
y
υP

x P

Quiz: Develop system that detects potential collision!

Lecture 1 19
2E1282 2009

Model complexity depends on purpose


Example (Disk drive control)
First-generation controllers based on simple model

Piv ot

d2

20 log |H|
Disks
Jm 2 θ = Mm
dt
Heads
Suspension 100 Hz 1 kHz
Frequency

Lecture 1 20
2E1282 2009

Model complexity depends on purpose


Need to model more phenomena as performance demands increase
– friction, resonances, saturations, . . .

Disk and Actuators Disk Piv ot


Sw ay Modes Fr iction Torsion
Piv ot Mode Modes
Motor

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

Good models are simple, yet capture the essentials!

From Abramovitch et. al (2002)

Lecture 1 21
2E1282 2009

2E1282 Modeling of Dynamical Systems

Lecture 1 - Introduction to Modeling

• Practical information
• Course outline
• Introduction to modeling
• State-space models

Lecture 1 22
2E1282 2009

Systems: signals and parameters


Natural to separate model quantities into
Disturbances

• (constant) parameters, and Inputs Outputs

• (time-varying) signals

System parameters are fixed, design parameters adjustable.

Signals are external (inputs, disturbances) or internal (states)

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))

States xi typically describe aggregation of energy

– level in tanks, velocity of masses, voltages across capacitors, . . .

Lecture 1 24
2E1282 2009

Example: Liquid level in tank


Tank system from basic controls course

q in

h
q out

State-space model
d dh p
V = qin − qout ⇒ A = −a 2gh + qin
dt dt

State variable: tank level h(t), control: inflow qin (t)

Lecture 1 25
2E1282 2009

Does the model make sense?


Important to verify that model “makes sense”

• 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 )

is called a stationary point.

At a stationary point, the system is at rest:


x(0) = x0 , u(t) = u0 for t ≥ 0 ⇒ x(t) = x0 for all t ≥ 0

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 )

Here, g(u0 ) describes the stationary relation between u0 and y0

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)

where ∆x(t) = x(t) − x0 , ∆u(t) = u(t) − u0 and ∆y(t) = y(t) − y0

∂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)

Hard to gain insight from nonlinear model. . .

From lecture notes by K.J. Åström, LTH

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

You might also like