State Space 2 - Modelling
State Space 2 - Modelling
State-space models 2
2nd order ODEs
J A Rossiter
Introduction
• This resource focuses on derivations of state
space model equivalents for systems described
by ODEs.
• Here we consider 2nd order ODEs (see separate
resources for detailed derivation).
• The state-space model is defined in terms of the
derivatives of the states. If you know the
derivatives of all the states, then you can capture
the system behaviour.
• States relate to dynamic variables such as
displacement, height, tension, temperature, etc.
Slides by Anthony Rossiter
3
Modelling a mass-spring-damper
Force balance can be used to determine the overall
model of behaviour.
f 1 Bˆ v
f 2 kx
dv
f3 M
dt
f f 1 f 2 f 3
dv ˆ
f M Bv kx States are v and x
dt
Slides by Anthony Rossiter
5
State-space model
Write the derivatives of v and x and stack in a
vector. dv dv f kx ˆv
B
M f kx Bˆ v
dt dt M
dx dx
v v
dt dt
dv ˆ k In compact
dt B v 1
form
dx M M M f
1 x 0
0 z Az Bf
dt z B
A
Resistor-inductor-capacitor in series
Consider the following circuit and use Kirchhoff’s
voltage law to derive an appropriate model.
dq
v1 iR1 R1
dt
di di dq 1
v2 L
dt vL R q
1 dt dt C
v3 q
C
v v1 v 2 v3 States are i and q
Slides by Anthony Rossiter
8
State-space model
Write the derivatives of i and q and stack in a
vector. q
di q v iR
L v iR di C
dt C
dt L
dq
i di
dt q
dt
di In compact
dt R 1 i 1 form
dq L LC L v
1
0 0
q
dt z z Az Bv
A B
DC servo
The model can be
summarised with
some simple
equations.
Here it may be less
obvious which states
to choice due to the di
possibilities of two
v L kwL iR
dt
angles/velocities,
ˆ dw
current, back emf and ki BwL J L
torque. dt
Slides by Anthony Rossiter
10
di dw
v L kwL iR; ki Bˆ wL J L
dt dt
Slides by Anthony Rossiter
11
Pendulum
• A pendulum of length l
with end mass m is able to length - l
swing freely (assume some
friction – constant k).
• A model can be derived mass - m
using force balance in the
tangential direction (small
angles).
ml mg kl
• Choose states: , w
Slides by Anthony Rossiter
14
dw
dt kl mg w 0
d ml ml f
1
0 0
dt z B
A
Summary
Illustrated state-space model derivation for several
common 2nd order systems.
It is noted that the selection of states is important, but this
choice is often obvious from the underlying component
and balance equations as only certain states will have their
derivatives defined explicitly.
The compact form has vectors of states/inputs and
matrices of coefficients.
x Ax Bu
Slides by Anthony Rossiter
Anthony Rossiter
Department of Automatic Control and
Systems Engineering
University of Sheffield
www.shef.ac.uk/acse
This work is licensed under the Creative Commons Attribution 2.0 UK: England & Wales Licence. To view a copy of this licence, visit
http://creativecommons.org/licenses/by/2.0/uk/ or send a letter to: Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.
It should be noted that some of the materials contained within this resource are subject to third party rights and any copyright notices must remain with these materials
in the event of reuse or repurposing.
If there are third party images within the resource please do not remove or alter any of the copyright notices or website details shown below the image.
(Please list details of the third party rights contained within this work.
If you include your institutions logo on the cover please include reference to the fact that it is a trade mark and all copyright in that image is reserved.)