Modeling and Simulation PDF
Modeling and Simulation PDF
Simulation for
Automatic Control
or via fax:
Marine Cybernetics AS
P.O. Box 4607, NO-7451 Trondheim, Norway
fax: [+47] 72 81 00 18
ISBN 82-92356-01-0
Produced from camera-ready copy supplied by the author using Scientific WorkPlace.
Modeling and simulation of dynamic processes are very important subjects in control
systems design. Most processes that are encountered in practical controller design are
very well described in the engineering literature, and it is important that the control
engineer is able to take advantage of this information. It is a problem that several books
must be used to get the relevant modeling information of a particular process, and it may
take a long time to go through all the necessary material. The idea of this book is to
supply the control engineer with a sufficient modeling background to design controllers
for a wide range of processes. In addition, the book provides a good starting point for
going into the specialist literature of different engineering disciplines. In this connection
the references indicate where to start. The book also contains more material than what
will normally be covered in the lectures of a typical course, so that students may return
to the book at a later stage and find additional information about a particular subject.
This will be more efficient than to extract the required information from a series of other
books. In this sense the book will be of great value for practicing control engineers.
The development of new products and systems is often done in a team of experts
with different backgrounds. It is hoped that this book will help control engineers to
communicate with other experts in this type of team. To achieve this we have been careful
to use standard terminology and notation from the different engineering disciplines in
question. Here we deliberately break the tradition evident in many books in the control
literature where the emphasis is on having a unified formulation specific to automatic
control.
The selection of the material is based on the experience of the authors in teaching
and research at the Norwegian University of Science and Technology. In addition to this,
material has been selected on the basis of extensive industrial activity through research
programs between university and industry, and product development in industry. In this
activity there has been close cooperation with experts from other disciplines, and this
has given useful experience on how to approach different topics, and on how to interact
with other specialists.
The style of modeling used in this book is inspired from the field of robotics where
modeling is presented in a precise style based on equations. In addition, quite detailed
results and optimized algorithms are included in standard textbook in robotics. As a
result of this, the development in our book relies on many equations, but it is our expe-
rience that this is well appreciated by most students, as they do no have to waste time
on trying to understand long written descriptions on subjects that are easily understood
in terms of a series of equations. Moreover, we have experienced that the material pre-
sented in this book is suited both for newcomers and for students with prior courses in
the topics of the book. In particular we have seen that students with virtually no back-
ground in dynamics have been able to master rigid body dynamics after going through
i
ii
the dynamics chapters of this book. At the same time, students who have taken courses
in dynamics also find the material in this book to be useful.
Parts of this book have been taught as a one-semester course at the Norwegian Uni-
versity of Science and Technology. The students are in the third year of their study
in electrical engineering with specialization in automatic control, and have taken a ba-
sic course in automatic control theory. Standard undergraduate courses in engineering
mathematics give a sufficient background in mathematics.
The results presented in this book have been developed and accumulated over a
period of 15 years. The first author would like to thank all of his doctoral students over
this period for their contributions. Also our colleagues and friends abroad have been
important in this work. Thanks are due to Rolf Johansson, Henk Nijmeijer, Rogelio
Lozano and Atul Kelkar for discussions on this book. In the writing of the book and
in the selection of the material we have benefited from the availability of the lecture
notes by Steinar Sælid, Rolf Henriksen and Torleif Iversen that have been used in earlier
versions of the course.
We would like to thank doctoral candidate Erlend Kristiansen for his work on simula-
tions, figures and proofreading. We would also like to thank Thor I. Fossen who has been
writing a book in parallel, and we have enjoyed all the discussions on writing in general
and modeling in particular. Thanks are also due to our colleagues Kristin Y. Pettersen,
Tor Arne Johansen and Asgeir Sørensen. We would also like to thank our colleagues at
the Department of Engineering Cybernetics for contributing to the stimulating working
environment that allowed us to write this book. Also the support from the Norwegian
Research Council has been important, as this has made it possible to have a large group of
PhD students and Post Docs at the Department. In particular, the Strategic University
Program in Marine Control Systems has given us very good working conditions.
Olav Egeland
Jan Tommy Gravdahl
December 2002
Contents
I Modeling 1
1 Model representation 3
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 State space methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.1 State space models . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.2 Second order models of mechanical systems . . . . . . . . . . . . . 5
1.2.3 Linearization of state space models . . . . . . . . . . . . . . . . . . 5
1.2.4 Linearization of second order systems . . . . . . . . . . . . . . . . 7
1.2.5 Stability with zero input . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2.6 Stability of linear systems . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.7 Stability analysis using a linearized model . . . . . . . . . . . . . . 9
1.3 Transfer function models . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.2 The transfer function of a state-space model . . . . . . . . . . . . . 10
1.3.3 Rational transfer functions . . . . . . . . . . . . . . . . . . . . . . 11
1.3.4 Impulse response and step response . . . . . . . . . . . . . . . . . 12
1.3.5 Loop transfer function . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.6 Example: Actuator with dynamic compensation . . . . . . . . . . 15
1.3.7 Stability of transfer functions . . . . . . . . . . . . . . . . . . . . . 16
1.3.8 Stability of closed loop systems . . . . . . . . . . . . . . . . . . . . 17
1.3.9 Partial differential equations . . . . . . . . . . . . . . . . . . . . . 17
1.4 Network description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.4.3 Multiport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1.4.4 Example: DC motor with flexible load . . . . . . . . . . . . . . . . 21
1.4.5 Example: Voltage controlled DC motor . . . . . . . . . . . . . . . 22
1.4.6 Example: Diesel engine with turbocharger . . . . . . . . . . . . . . 23
1.4.7 Assigning computational inputs and outputs . . . . . . . . . . . . 24
1.4.8 Bond graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.5 Linear network theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
1.5.1 Driving point impedance . . . . . . . . . . . . . . . . . . . . . . . . 26
1.5.2 Linear two-ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.5.3 Impedance of two-port with termination . . . . . . . . . . . . . . . 28
1.5.4 Example: Passive mechanical two-port . . . . . . . . . . . . . . . . 29
1.5.5 Mechanical analog of PD controller . . . . . . . . . . . . . . . . . . 31
1.6 Example: Transmission line model . . . . . . . . . . . . . . . . . . . . . . 33
1.6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
iii
iv CONTENTS
5 Friction 191
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
5.1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
5.2 Static friction models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
5.2.1 Models for the individual phenomena . . . . . . . . . . . . . . . . 192
5.2.2 Combination of individual models . . . . . . . . . . . . . . . . . . 195
5.2.3 Problems with the static models . . . . . . . . . . . . . . . . . . . 196
5.2.4 Problems with signum terms at zero velocity . . . . . . . . . . . . 197
5.2.5 Karnopp’s model of Coulomb friction . . . . . . . . . . . . . . . . 198
5.2.6 More on Karnopp’s friction model . . . . . . . . . . . . . . . . . . 198
5.2.7 Passivity of static models . . . . . . . . . . . . . . . . . . . . . . . 199
viii CONTENTS
V Simulation 507
14 Simulation 509
14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
14.1.1 The use of simulation in automatic control . . . . . . . . . . . . . 509
14.1.2 The Moore Greitzer model . . . . . . . . . . . . . . . . . . . . . . 510
14.1.3 The restricted three-body problem . . . . . . . . . . . . . . . . . . 513
14.1.4 Mass balance of chemical reactor . . . . . . . . . . . . . . . . . . . 516
14.2 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
14.2.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
14.2.2 Computation error . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
14.2.3 The order of a one-step method . . . . . . . . . . . . . . . . . . . . 517
CONTENTS xv
Modeling
1
Chapter 1
Model representation
1.1 Introduction
In this chapter we will present model formulations for use in controller analysis and
design. The usual type of models in control problems are based on ordinary differential
equations with time as the free variable. The two main representations of such models are
state-space descriptions, where the model is given as a system of first-order differential
equations, and transfer function models using the Laplace transformation. In this setting
the signal-flow representation of models is used where each model has a defined set of
input variables and a set of output variables. Control theory offers a wide variety of
tools and techniques for controller analysis and design based on state-space models and
transfer function models.
The signal-flow description has been very successful in control applications. However,
in energy-based control analysis and in the development of simulation systems, there is an
alternative formulation which is based on an energy-flow description. This formulation
is of great use in the development of large simulation systems as it opens up for object-
oriented modeling. This is an approach where a model is developed for each physical
subsystem, and where the model of the total system is obtained by interconnecting the
models of the subsystems using energy-flow variables.
Throughout the book models are developed from physics. This includes physical
principles like Newton’s laws and balance equations, which are typically based on the
conservation of mass, momentum, energy, and electrical charge. In addition, results
are derived using the purely mathematical field of kinematics, which is the geometric
description of motion. Finally, empirically established constitutive equations are needed
to describe material properties like the relation between the force and deformation of a
spring, the relation between velocity gradients and viscous tension of a fluid, and the
relation between charge and voltage of a capacitive element.
In contrast to this, models may be obtained as black-box model where transfer func-
tions or state space models between inputs and outputs are established from identification
experiments . This approach will not be discussed in this book.
This chapter starts with a presentation of state-space models and transfer function
models in the signal-flow description, which is the usual formulation in automatic con-
trol. Then the energy-flow description is presented. Material on second order me-
chanical systems and systems described by partial differential equations is also dis-
cussed. Background material on control is found in (Kuo 1995), (Chen 1999) and
3
4 CHAPTER 1. MODEL REPRESENTATION
(Dorf and Bishop 2000), while additional material on linear systems theory is covered by
(Rugh 1996) and (Antsaklis and Michel 1997).
ẋ = f (x, u, t) (1.5)
y = h (x, t) (1.6)
D
u x y
B C
are said to be affine in the control u, which means that when x is given, then the right side
of (1.8) is a constant plus a term that is linear in u. This type of system is important in
nonlinear control theory where methods are available for this type of model (Isidori 1989),
(Nijmeijer and der Schaft 1990).
1.2. STATE SPACE METHODS 5
where the matrices appearing from the differentiations have elements given by
½ ¾ ½ ¾ ½ ¾ ½ ¾
∂f ∂fi ∂f ∂fi ∂h ∂hi ∂h ∂hi
= , = , = , = (1.19)
∂x ∂xj ∂u ∂uj ∂x ∂xj ∂u ∂uj
Insertion of (1.13) into (1.17), and insertion of (1.16) into (1.18) gives the following
linearized system:
¯ ¯
∂f ¯¯ ∂f ¯¯
∆ẋ = ∆x + ∆u (1.20)
∂x ¯x0 (t),u0 (t) ∂u ¯x0 (t),u0 (t)
¯ ¯
∂h ¯¯ ∂h ¯¯
∆y = ∆x + ∆u (1.21)
∂x ¯x0 (t),u0 (t) ∂u ¯ x0 (t),u0 (t)
It is noted that this model is of the same form as (1.7). The matrices A, B, C and
D are seen to be given by
¯ ¯
∂f ¯¯ ∂f ¯¯
A(t) = , B(t) = (1.22)
∂x ¯x0 (t),u0 (t) ∂u ¯x0 (t),u0 (t)
¯ ¯
∂h ¯¯ ∂h ¯¯
C(t) = , D(t) = (1.23)
∂x ¯x0 (t),u0 (t) ∂u ¯x0 (t),u0 (t)
Example 2 A simplified model for the design of a cruise control system for a car is
obtained from Newton’s law. Suppose that the forces acting on the car are the air resis-
tance, which is proportional to the square of the velocity, and the motor force, which is
assumed to be proportional to the throttle input. Then the model is
1
mv̇ = − CD ρAv 2 + Kt u (1.24)
2
where v is the velocity and m is the mass of the car, CD is the drag coefficient, ρ is
the density of air, A is the projected area of the car when seen from the front, Kt is the
throttle constant, and u is the throttle input. The control input u0 corresponding to a
constant speed v0 is found by inserting mv̇0 = 0 in the model, which gives
1
u0 = CD ρAv02 (1.25)
2Kt
We define the perturbations ∆v = v − v0 and ∆u = u − u0 and find the linearized model
i2
mz̈ = −C + mg (1.27)
z2
where m is the mass, z is the vertical position of the ball in the downwards direction, C is
a constant, i is the control input, which is the current of the electromagnet, and g is the
1.2. STATE SPACE METHODS 7
acceleration of gravity. Let zd be the constant desired position of the ball. The solution
(zd , id ) is found by inserting mz̈d = 0 in the model, which gives the constant current
r
mg
id = zd (1.28)
C
which will give a lifting force that can hold the ball stationary at position zd . We define
the perturbations ∆z = z − zd and ∆i = i − id and get the linearized model
i2d id
m∆z̈ = 2C ∆z − 2C 2 ∆i (1.29)
zd3 zd
∂f ∂f ∂f
q̈0 + ∆q̈ = f (q0 , q̇0 , u0 ) + ∆q + ∆q̇ + ∆u (1.32)
∂q ∂ q̇ ∂u
∂f ∂f ∂f
∆q̈ = ∆q + ∆q̇ + ∆u (1.33)
∂q ∂ q̇ ∂u
L
g
of a pendulum. The states of the pendulum are selected to be θ and θ̇ so that the state
vector is µ ¶
θ
x= (1.38)
θ̇
We see that ẋ = 0 whenever θ̇ = 0 and sin θ = 0, which is the case for θ = 0 and θ = π.
This means that the system has equilibrium states at
µ ¶ µ ¶
0 π
xe1 = and xe2 = (1.39)
0 0
Here x = xe1 is the equilibrium where the pendulum is hanging downwards, and x = xe2
is the equilibrium where the pendulum is raised upwards with the mass on the top. We
know from experience that if the pendulum starts from a state close to the downwards
configuration xe1 , and with a speed close to zero, then the pendulum will stay close to
the downwards configuration. Therefore, the system is stable around the equilibrium
1.2. STATE SPACE METHODS 9
xe1 . Our experience with the equilibrium xe2 is that for any small deviation from the
equilibrium state the pendulum will fall down and move far away from the equilibrium
state. Therefore, the system is unstable around the equilibrium xe2 .
ẋ = Ax + Bu (1.40)
y = Cx + Du (1.41)
where u is input, y is output, and x ∈ Rn is the state vector. The solution of the state
equation are known from basic textbooks in automatic control to be
Z t
A(t−t0 )
x (t) = e x (t0 ) + eA(t−τ ) Bu (τ ) dτ (1.42)
t0
• Stable whenever all simple eigenvalues have real parts that are not positive, and
all multiple eigenvalues have real parts that are negative, that is, if
• If the linearized system is asymptotically stable, then the nonlinear system is also
asymptotically stable.
• If the linearized system is stable, but with at least one pole at the imaginary axis,
then the nonlinear system may be stable or unstable.
where ω 20 = g/L and 2ζω 0 θ̇ is a viscous damping term where 0 ≤ ζ. First, linearization
around (θ, θ̇) = (0, 0) gives
θ̈ + 2ζω 0 θ̇ + ω 20 θ = 0 (1.47)
If ζ > 0 then the linearized system is asymptotically stable. This implies that the non-
linear system is asymptotically stable around (θ, θ̇) = (0, 0) for ζ > 0. If ζ = 0, then
the eigenvalues of the systems are at the imaginary axis, and we cannot conclude on
the stability of the nonlinear system by analyzing the linear system. Next, consider the
equilibrium point (θ, θ̇) = (π, 0). The linearized system is
θ̈ + 2ζω 0 θ̇ − ω 20 θ = 0 (1.48)
which has one pole in the right half plane. The linearized system is therefore unstable, and
we may conclude that the nonlinear system is unstable around the equilibrium (θ, θ̇) =
(π, 0).
x (s) = L{x (t)}, u (s) = L{u (t)} and y (s) = L{y (t)} (1.51)
In the development of transfer function models the initial conditions x (t = 0) are always
set to zero. This can be done as the system is linear and superposition applies. Therefore
we set ẋ (t = 0) = 0 and get
L{ẋ (t)} = sx (s) (1.53)
1.3. TRANSFER FUNCTION MODELS 11
and write
y
(s) = H (s) . (1.58)
u
A block diagram is shown in Figure 1.3.
us ys
Hs
1
y (s) = H (s) (1.65)
s
u 1 x y
T
-
us ys
1
1Ts
is referred to as a time constant. A block diagram is shown in Figure 1.4. The Laplace
transformation gives the transfer function
y 1
(s) = H (s) = (1.68)
u 1 + Ts
1.3. TRANSFER FUNCTION MODELS 13
di
Example 9 By setting all initial values dti x (t) = 0, i = 1, . . . , n we find that
½ ¾
dn
L x (t) = sn X (s) (1.71)
dtn
u x x y
-
2 0
20
us 1
ys
2
s 2 2 0 0
1
x (s) = u (s) (1.75)
s2 + 2ζω 0 s + ω 20
y 1
(s) = H (s) = 2 (1.76)
u s + 2ζω 0 s + ω 20
14 CHAPTER 1. MODEL REPRESENTATION
Ls
Gs
Figure 1.6: Plant H (s) with a series compensation controller K (s) in feedback compen-
sation controller G (s)
where yd is the input signal to the closed-loop system. Define the loop transfer function
by
L (s) = K (s) H (s) G (s) . (1.79)
From
e (s) = yd (s) − G (s) y (s) = yd (s) − G (s) H (s) K (s) e (s) (1.80)
it is seen that the transfer function from the input signal yd (s) to the error signal e (s)
is given by
e 1
S (s) := (s) = (1.81)
yd 1 + L (s)
where S (s) is called the sensitivity function of the closed loop system.
The closed-loop transfer function T (s) is defined as the transfer function from the
closed-loop input yd (s) to the output y (s). From the expression
y (s) = K (s) H (s) e (s) = K (s) H (s) [yd (s) − G (s) y (s)] (1.82)
it is possible to solve for y (s) as a function of yd (s), and the closed-loop transfer function
T (s) is found to be
y K (s) H (s)
T (s) := (s) = (1.83)
yd 1 + L (s)
The closed-loop transfer function can be written
½ 1
1 L (s) G(s) |L (s)| À 1
T (s) = ≈
G (s) 1 + L (s) K (s) H (s) |L (s)| ¿ 1
This means that if the loop-transfer function is large, that is, if |L (s)| À 1, then T (s) =
1/G (s).
1.3. TRANSFER FUNCTION MODELS 15
L (s)
T (s) = = 1 − S (s)
1 + L (s)
T is
1T is
In many control systems there is a servomotor that acts as an actuator for the main
plant. In this case it can be useful to control the servomotor with an inner actuator loop
with dynamic feedback to achieve a suitable transfer function in the outer loop. Suppose
that the main plant is described by the transfer function model
while the control input is obtained using a velocity controlled servomotor. The model
for the actuator is assumed to be given by
1
u (s) = ua (s) (1.85)
s
where ua (s) is the velocity command to the actuator. The actuator is here modeled by
an integration which is the transfer function of a motor with a velocity loop where ua is
the desired velocity input. The feedback for the actuator loop is given by
Ti s
Ga (s) = (1.87)
1 + Ti s
as shown in Figure 1.7. Then the loop transfer function of the actuator loop is
Ka Ti
La (s) = (1.88)
1 + Ti s
and we find that the closed loop transfer function of the actuator loop is given by
u 1 + Ti s 1
(s) = Kp (1.89)
u0 Ti s 1 + T1 s
16 CHAPTER 1. MODEL REPRESENTATION
where
Ka Ti Ti
Kp = , T1 = (1.90)
1 + Ka Ti 1 + Ka Ti
This is illustrated in Figure 1.8. If Kp and Ti are selected so that break frequency 1/T1
is much higher than the crossover frequency of the outer loop, then the actuator loop
will introduce integral action in the outer loop according to
y 1 + Ti s
(s) ≈ Kp H (s) (1.91)
u0 Ti s
Figure 1.8: System with the closed loop dynamics of the actuator with controller.
Suppose that all the poles are to the left of −α. Then there is a constant k ≥ 0 so
that
|h (t)| ≤ ke−αt (1.96)
R ∞ −αt −1
and, using the fact that for α > 0 we have 0 e dt = α , it follows that
Z ∞
k
|h (τ )| dτ ≤ , if α > 0 (1.97)
0 α
1.3. TRANSFER FUNCTION MODELS 17
We find that
k2
|y (t)| ≤ U when α > 0 (1.98)
α
which shows that when Re [λi ] < 0, then y (t) is bounded whenever u (t) is bounded.
Suppose that all poles have real parts less than zero, except one pole in s = 0. Then
the control input u (t) = 1 will for large t give y (t) ∝ t → ∞. Next, suppose that all
poles have real parts less than zero, except a complex conjugated pole pair in s = ±jω 0 .
Then the control input u (t) = cos ω 0 t will give a response which for large t satisfies
y (t) ∝ t cos ω 0 t → ∞ where ∝ denotes proportional to. If there are poles with real part
larger than zero, than y (t) will be unbounded for a unit step input. This shows that an
unbounded output may occur for bounded input when there are poles on the imaginary
axis or to the right of the imaginary axis.
Example 12 Large tankers may be unstable, and the transfer function H (s) from the
rudder angle δ to the course angle ψ will then include a pole in the right half plane. An
example of this is the following model of a tanker (Blanke 1981), (Fossen 1994)
ψ 1 + Ta s
H(s) = (s) = K (1.99)
δ s(1 + T1 s)(T2 s − 1)
where K = 0.022, Ta = 38 s, T1 = 16 s and T2 = 192 s. The integration represented by
the factor s in the denominator is due to the integration from angular velocity around
the vertical axis to the course angle ψ. The transfer function has a pole at s = 1/T2 . An
autopilot with a PD controller
1 + T1 s
δ(s) = Kp (ψ − ψ) (1.100)
1 + 0.1T1 s 0
gives the characteristic equation
for the closed loop system. The closed loop poles are therefore at s = −0.5609 and
s = −0.0295 ± j0.0303. This is found using the MATLAB command
roots(conv([1.6 1 0],[192 -1]) + 20*0.022*[0 0 38 1])
Example 13 The time delay in (1.106) can be approximated by a rational Padé approx-
imation Pkk (−T s) of order k where (Golub and van Loan 1989, p. 557)
Qkk (s)
Pkk (s) = (1.107)
Qkk (−s)
Xk
k! (2k − i)! si
Qkk (s) = 1 + (1.108)
i=1
(k − i)! (2k)! i!
By letting k go to infinity we can represent the time delay by a rational transfer function
of infinite dimension.
Example 14 Transmission line dynamics are described by the second order wave equa-
tion. A hydraulic transmission line where the outlet is open has the irrational transfer
function
sinh s
tanh s = (1.110)
cosh s
1.4. NETWORK DESCRIPTION 19
from the input flow to the input pressure. The transfer functions has zeros when the
numerator is zero, which is the case when
1¡ s ¢
sinh s = e − e−s = 0 ⇒ e−2s = 1 = ej2kπ (1.111)
2
This occurs for
s = jkπ (1.112)
where k = 0, ±1, ±2, . . .. In the same way we find that the singularities appear for
µ ¶
1
cosh s = 0 ⇒ s = ±j k + π (1.113)
2
It can be shown that the numerator and the denominator can be represented by infinite
dimensional polynomials in the complex variable s, and this gives the following infinite
dimensional representation of the transfer function
³ ¡ ¢2 ´ ³ ¡ s ¢2 ´ ³ ¡ s ¢2 ´
s 1 + πs 1 + 2π 1 + 3π ...
tanh s = ³ ¡ 2s ¢2 ´ ³ ¡ 2s ¢2 ´ ³ ¡ 2s ¢2 ´ (1.114)
1 + 3π 1 + 5π 1 + 7π ...
We see that there are infinitely many zeros and singularities along the imaginary axis.
Moreover, we see that the zeros and singularities alternate along the imaginary axes.
This implies that the phase of tanh jω is between -90◦ and +90◦ .
1.4.2 Background
The network description has been very successful in the analysis and design of electrical
circuits (Anderson and Vongpanitlerd 1973), (Nilsson 1983). The underlying properties
of an electrical circuit that make the network description efficient are seen also in other
types of physical systems like mechanical translation, mechanical rotation, thermal flow
and hydrostatic flow. To make the discussion general it is advantageous to define flow
variables f and effort variables e for these systems. The flow f corresponds to the
current i in an electrical network, while the effort variable e corresponds to the voltage
u in and electrical network. The efforts and flows for typical physical systems is shown
in Table 1.1.
1.4. NETWORK DESCRIPTION 21
1.4.3 Multiport
A multiport, which is also called an n-port, is a system with n ports. To port has an
effort ek and a flow fk so that the net power flowing into the n-port is given by
n
X
P = ek fk (1.115)
k=1
At each port of the n-port it is possible to connect a port of another m-port system
as long as the effort and flow variables are compatible, that is, an electrical port can be
connected with an electrical port, a translational port can be connected to a translational
port and so on.
If one more elastic transmission and an inertia J2 is added, then the transfer function
becomes
µ ³ ´2 ¶ µ ³ ´2 ¶
s s
1 + 2ζ 2a ω2a + ω2a s
1 + 2ζ 2b ω2b + ωs2b
ωm 1
(s) = µ ³ ´2 ¶ µ ³ ´2 ¶ (1.121)
T (Jm + J1 + J2 ) s s s
1 + 2ζ 21 ω21 + ω21 s
1 + 2ζ 22 ω22 + ωs22
At this level the modeling becomes quite complicated, and the inclusion of even more
degrees of freedom will lead to very extensive modeling efforts. We conclude that the
inclusion of new physical objects in the model may be quite complicated to account for
in the transfer function setting, and that the complexity increases dramatically when the
order of the system increases. In particular, we note that in the present formulation we
do not have a transfer function library of motors and elastic transmissions that can easily
be combined.
In contrast to this the network approach to modeling makes it possible to assemble
the model from the models of the physical objects of the system. In that case the modules
are connected through the ports. The motor model is
Jm ω̇ m = Tm − TL (1.122)
If the motor is running alone, then TL is set to zero. The inertia J1 and the flexible
transmission is described by
J1 ω̇ 1 = TL − T1 (1.123)
d
(θm − θ1 ) = (ω m − ω 1 ) (1.124)
dt
TL = D1 (ω m − ω 1 ) + K1 (θm − θ1 ) (1.125)
The motor model (1.122) and the load model (1.123—1.125) are then connected through
the port variables TL and ω m , while T1 is set to zero. Moreover, a second flexibility
described by
J2 ω̇ 2 = T1 − T2 (1.126)
d
(θ1 − θ2 ) = (ω 1 − ω 2 ) (1.127)
dt
T1 = D2 (ω 1 − ω 2 ) + K2 (θ1 − θ2 ) (1.128)
can be connected to the model with the port variables T1 and ω m with T2 = 0. We see
that this leads to what may be called a object-oriented approach where each physical
object has a model, and where a model of an interconnection of physical objects is
obtained by simply interconnecting the models of the objects through port variables.
This approach scales well in the sense that the complexity of the modeling does not
increase with the order of the model. The key to this is the careful selection of the
interconnection variables. Note that once the model has been established, a state-space
model is available, and a signal-flow model can be obtained by selecting input and output.
This makes it possible to apply controller design based on signal flow representation.
u a ,i a T L , 1 T 1 , 1
DC Elastic
Load
motor shaft
Figure 1.9. The DC motor with constant field is connected to the electric supply by the
terminals of the armature circuit and the motor shaft. The motor may be described as
a two-port where one port is electrical and one port is mechanical. The electrical port
is the armature port where the effort variable is the armature voltage ua and the flow
variable is the armature current ia . The mechanical port is the motor shaft where the
effort is the load torque TL and the flow is the angular velocity ω 1 . The dynamic model
of the motor is given in state-space form as
dia
La = −Ra ia − KE ω m + ua (1.129)
dt
Jm ω̇ m = KT ia − TL (1.130)
θ̇m = ωm (1.131)
Suppose that the motor shaft is connected to a mechanical two-port describing a spring
and a damper. The port on the motor side has port variables TL and ω m , and the port
on the load side has variables T1 and ω 1 . The model is
d
(θm − θ1 ) = ω m − ω 1 (1.132)
dt
TL = K(θm − θ1 ) + B(ω m − ω 1 ) (1.133)
T1 = TL (1.134)
Finally, the spring and the damper is connected to an inertial load described as a one-port
with port variables T1 and ω 1 . The model is
Jm ω̇ 1 = TL (1.135)
θ̇1 = ω1 (1.136)
jQ Tm , m
Diesel
h co , w co engine h ti , w ti
T c , tc
Compressor Turbine
h ci , w ci h to , w to
port of the compressor with port variables hco and the mass flow wco . The engine has an
exhaust outlet port connected to the air intake port of the turbine with port variables
hti and wti . In addition, the motor drives the motor shaft which can be described as a
port with variables being the motor torque Tm and the motor shaft speed ω m . We note
that the power delivered from the engine is Pm = Tm ω m . Finally, the engine has a fuel
injector where the power added is the heat rate jQ of the fuel. However, this is not a
port in the usual sense as there is no bilateral energy flow.
Example 15 Signal directions can be assigned according to Figure 1.11 for the DC motor
with load shown in Figure 1.9 so that integrations are used in the computations. This is
done by using ua and TL as inputs to the DC motor so that dia /dt, ω̇ m and θ̇m can be
evaluated from (1.129—1.131). For the spring ω m and ω 1 are used as inputs so that TL
and T1 can be computed from (1.132—1.134), and for the load the input is T1 so that ω̇ 1
and θ̇1 can be computed from (1.135—1.136).
1.4. NETWORK DESCRIPTION 25
ua m T1
DC Elastic
ia motor TL shaft
1 Load
Figure 1.11: DC motor and load in network descriptions with signal directions assigned
Example 16 Signal directions are indicated in Figure 1.12 for the diesel engine with
turbocharger as shown in Figure 1.10. Given the turbocharger speed ω tc and the specific
enthalpies hci and hco the compressor will produce a mass flow wc to the engine, and
a compressor torque Tc on the shaft. Given the compressor torque Tc and the specific
enthalpies hti and hto , the turbine dynamics will give the turbocharger speed ω tc and the
exhaust mass flow wt . The gas contained in the diesel engine will have as inputs the
mass flow wc into the engine, the mass flow wt out of the engine, the motor shaft speed
ω m , and the heat flow jQ . The resulting outputs are the specific enthalpies hco and hti ,
and the motor torque Tm .
jQ m Tm
Diesel
wc h co engine wt h ti
Tc
Compressor tc Turbine
h ci wc h to wt
Figure 1.12: Turbocharged diesel engine with signal directions assigned for the port
variables
Example 17 Karnopp’s friction model extends the basic Coulomb friction model for
dry friction to be valid also for zero velocity (Karnopp 1985). Karnopp’s model can be
explained by considering a mass m with velocity v that is pushed on a flat surface with
an actuator force Fa . The friction force on the mass is Ff so that the equation of motion
is
mv̇ = Fa − Ff (1.137)
The Karnopp model can be formulated as a two-port where the input port has effort Fa
26 CHAPTER 1. MODEL REPRESENTATION
and flow v, while the output port has effort Fa − Ff and flow v, and where
½
Fa v = 0 and |Fa | ≤ Fc
Ff = (1.138)
Fc sgn(v) else
Note that the computational input of the model at the input port is Fa under the condition
v = 0 and |Fa | ≤ Fc , and that the computational input changes to v when the condition
does no longer hold. Further discussion on this model is found in Chapter 5.
1 i
+
u C
-
2 i
+
u R C
-
3 i
+ R L C
u
-
4 i
+ R1
u L C R
-
To become more familiar with the notion of the on the driving point impedance of
passive electrical one-ports we present the driving-point impedance of the one-ports in
Figure 1.13. Circuit 1 is a capacitor, circuit 2 is a parallel interconnection of a resistor
and a capacitor, circuit 3 is a RLC series connection, and circuit 4 is a resistor in series
with a parallel RLC interconnection. The driving point impedances are
1
Z1 (s) = (1.141)
Cs
R
Z2 (s) = (1.142)
1 + RCs
1 + RCs + LCs2
Z3 (s) = (1.143)
Cs
³ ´
L L
1 + R1 + R s + LCs2
Z4 (s) = R1 L
(1.144)
1+ Rs + LCs2
We see that Z1 (s) and Z2 (s) are strictly proper, Z3 (s) is not proper, and Z4 (s) is proper.
It is straightforward to verify that the poles of the impedances appear in the left half
plane, or as simple poles on the imaginary axis, and that the phase of the impedances is
between -90◦ and +90◦ .
We define the driving point impedance Z(s) and the driving point admittance Y (s) of a
general one-port with effort e and flow f according to
This set of equations can be solved to find the driving-point impedance description
of the resulting one-port. From the second row of (1.154) it is found that
z21
f2 = − f1 (1.156)
z22 + ZL
K1
F1 F2
m1
v1 D1 v2
and
K1 + D1 s
F1 (s) = [v1 (s) − v2 (s)] (1.162)
s
30 CHAPTER 1. MODEL REPRESENTATION
as sx1 (s) = v1 (s) and sx2 (s) = v2 (s). By solving for F2 (s) and v2 (s) we get the cascade
description
µ ¶ Ã m1 s2 +D1 s+K1 !µ ¶
F2 (s) D1 s+K1 −m 1 s F1 (s)
= s (1.163)
v2 (s) − D1 s+K 1
1 v1 (s)
Alternatively, we may develop the impedance description
µ ¶ Ã K1 +D1 s K1 +D1 s
!µ ¶
F1 (s) s s v1 (s)
= K1 +D1 s m1 s2 +D1 s+K1 (1.164)
F2 (s) s s
−v2 (s)
We note that the mechanical two-port has an electrical analog as shown in Figure 1.15.
i1 i2
m1 s
+ +
u1 D1 u2
K1
- s -
Figure 1.15: Electrical analog of mechanical two-port. The voltages u1 and u2 are the
analogs of the forces F1 and F2 , while the currents i1 and i2 are the analogs of the
velocities v1 and v2 .
K1 F2 K2
F1
m1
v1 D1 v2 D2
Figure 1.16: Termination of mechanical two-port with mechanical one-port with spring
and damper.
Suppose that the two-port of the previous section is terminated at port 2 by a me-
chanical one-port consisting of a parallel interconnection of a spring with stiffness K2
and a damper with coefficient D2 connected to a fixed point. The resulting mechanical
one-port is shown in Figure 1.16. The impedance of the termination is
D
K2 + D2 s 1 + K22 s
ZL (s) = = K2 (1.166)
s s
so that
F2 (s) = ZL (s)v2 (s) (1.167)
1.5. LINEAR NETWORK THEORY 31
F1 z12 z21
(s) = Z1 = z11 − (1.168)
v1 z22 + ZL
Kp
u
x x0
D
We consider a mass m with position x and velocity v = ẋ. The equation of motion is
mẍ = u where the applied force u is the control input. The desired position is xd , and
the desired velocity is vd = ẋd . A PD controller u = K(1 + Td s)(xd − x) is used. The
control law can be written
where D = KTd . The mechanical analog is found from the observation that the controller
force is the same force as the force that would appear if the mass m at position x was
connected to a point of position xd with a parallel interconnection of a spring with
stiffness K and a damper with coefficient D, as shown in Figure 1.17.
Kp
u
x x0
D
u = Kp (x0 − x) − Dv (1.171)
32 CHAPTER 1. MODEL REPRESENTATION
K2
K1
m
xd x1 D2
This is the force that would result if the mass m was connected by a spring of stiffness
K to a point xd and by a damper to a fixed point as shown in Figure 1.18.
If the velocity is not measured it is possible to use a PD controller with limited
derivative action. Then the control is
1 + Td s
u(s) = Kp [x0 (s) − x(s)] (1.172)
1 + αTd s
where 0 ≤ α ≤ 1. This control law gives the same force as a mechanical analog where
the mass m is connected to a point with position xd by a spring of stiffness K1 in series
with a parallel interconnection of a spring of stiffness K2 and a damper with coefficient
D2 as shown in Figure 1.19.
This is shown by letting x1 be the position of the interconnection point between the
spring K1 and the parallel interconnection. Then the spring force is u = K1 (x1 − x), and
Laplace transformation gives x1 (s) = x(s) + u(s)/K1 . As there is no mass in the point
x1 , this force must be equal to the force from the parallel interconnection, so that
u(s) = K2 [xd (s) − x1 (s)] + D2 [vd (s) − v1 (s)] = (K2 + Ds)[xd (s) − x1 (s)] (1.173)
1
u(s) = (K2 + D2 s)[x0 (s) − x(s) − u(s)] (1.174)
K1
K2 + D2 s
u(s) = K1 [x0 (s) − x(s)]
K1 + K2 + D2 s
D2
K1 K2 1+ K 2
s
= K D2
[x0 (s) − x(s)] (1.175)
K1 + K2 1 + K +K
2
s
1 2 K2
i Rdx Lsdx i di
+ +
u 1
Cs
dx Gdx u du
- -
∂i
u(x + dx, t) − u(x, t) = −Rdxi(x, t) − M dx (x, t) (1.179)
∂t
∂u
i(x + dx, t) − i(x, t) = −Gdxu(x + dx, t) − Cdx (x + dx, t) (1.180)
∂t
Dividing by dx we get
∂u ∂i
(x, t) = −Ri(x, t) − M (x, t) (1.181)
∂x ∂t
∂i ∂u
(x, t) = −Gu(x, t) − C (x, t) (1.182)
∂x ∂t
34 CHAPTER 1. MODEL REPRESENTATION
Laplace transformation of (1.181) and (1.182) gives the transmission line equations
∂u
(x, s) = −(R + M s)i(x, s) (1.183)
∂x
∂i
(x, s) = − (G + Cs) u(x, s) (1.184)
∂x
Note that these equations have the form
∂u
(x, s) = −Z(s)i(x, s) (1.185)
∂x
∂i
(x, s) = −Y (s)u(x, s) (1.186)
∂x
where Z(s) = R + M s is the series impedance, and Y (s) = G + Cs is the parallel
admittance.
A general transmission line is characterized in terms of the line length L, the series
impedance Z(s), the parallel admittance Y (s), and the two first-order differential equa-
tions
∂e
(x, s) = −Z(s)f (x, s) (1.187)
∂x
∂f
(x, s) = −Y (s)e(x, s) (1.188)
∂x
in the Laplace domain, where e is the effort variable and f is the flow variable.
From this characterization we arrive at the following second order differential equation
for the effort
∂2e
L2 2 (x, s) = Γ2 (s)e(x, s) (1.189)
∂x
where we have introduced the propagation operator Γ(s) defined by
p
Γ(s) = L Z(s)Y (s) (1.190)
and the additional requirement that Re[Γ(s)] ≥ 0. The solution of this differential
equation is ³ x´ ³ x´
e(x, s) = C1 cosh Γ + C2 sinh Γ (1.191)
L L
where C1 and C2 are given by the boundary conditions. From (1.191) we see that the
flow is given by
1 ³ ³ x´ ³ x ´´
f (x, s) = − C1 sinh Γ + C2 cosh Γ (1.192)
Zc (s) L L
where the characteristic impedance Zc (s) is defined by
s
Z(s)
Zc (s) = (1.193)
Y (s)
1.6. EXAMPLE: TRANSMISSION LINE MODEL 35
From these two equations we can eliminate the constants C1 C2 and find the cascade
form of the transfer functions.
µ ¶ Ã !µ ¶
e1 (s) cosh Γ Zc sinh Γ e2 (s)
= sinh Γ (1.197)
f1 (s) Zc cosh Γ f2 (s)
The cascade form can be used for analysis purposes like the derivation transfer func-
tions when the line is terminated with a load impedance. However, the cascade form
is an ill-posed boundary value problem, and numerical models derived from the cascade
form may be ill-conditioned (Mäkinen, Piché and Ellman 2000).
By straightforward manipulation of the equations (1.194, 1.195) we can find the trans-
fer functions between different combinations of port variables. First we consider the im-
mittance forms which are the impedance form and the admittance form. These forms
are found from
µ ¶ µ ¶µ ¶
e1 (s) 1 0 C1 (s)
= (1.198)
e2 (s) cosh Γ sinh Γ C2 (s)
| {z } | {z }| {z }
e G(s) c
µ ¶ µ ¶ ¶µ
f1 (s) 0 −1 C1 (s)
Zc = (1.199)
−f2 (s) sinh Γ cosh Γ C2 (s)
| {z } | {z }| {z }
f H(s) c
1
e = Zc G(s)H(s)−1 f , f = H(s)G(s)−1 e (1.200)
Zc
36 CHAPTER 1. MODEL REPRESENTATION
Proceeding as in the impedance and admittance case we eliminate the c vector and get
y = F(s)E(s)−1 u, u = E(s)F(s)−1 y (1.205)
This system can be made diagonal by finding the eigenvalues and the eigenvectors of
the matrix A. The eigenvalues of A are found to be ±Γ(s)/L, and the system is made
diagonal with the following change of variables:
1
e(x, s) = (a(x, s) + b(x, s)) (1.214)
2
1
f (x, s) = (a(x, s) − b(x, s)) (1.215)
2Zc (s)
which correspond to
This leads to
∂a Γ(s)
(x, s) = − a(x, s) (1.218)
∂x L
∂b Γ(s)
(x, s) = b(x, s) (1.219)
∂x L
The variables a and b are called the wave variables of the transmission line. The wave
variables have the solutions
h xi
a(x, s) = a(0, s) exp −Γ(s) (1.220)
· L ¸
(L − x)
b(x, s) = b(L, s) exp −Γ(s) (1.221)
L
We define the wave variables at the end-points of the line to be a1 (s) = a(0, s), a2 =
a(L, s), b2 (s) = b(L, s) and b2 (s) = b(L, s). Then we get
a2 (s)
= exp [−Γ(s)] (1.222)
a1 (s)
b1 (s)
= exp [−Γ(s)] (1.223)
b2 (s)
38 CHAPTER 1. MODEL REPRESENTATION
a(0,s) a(l,s)
exp(-Ts)
gL (s)
b(0,s) b(l,s)
exp(−Ts)
Figure 1.21: Scattering representation of lossless transmission line with load gL (s) cor-
responding to load impedance zL (s) at x = .
which are pure time delays of T = L/c. It is seen that the a(x, t) propagates in the
positive direction with velocity c, while b(x, t) propagates in the negative direction with
velocity −c. Because of this the variables a and b can be seen as wave variables.
b1 (s)
= exp (−2T s) GL (s) (1.228)
a1 (s)
and
b2 (s) ZL (s) − Zc
= =: GL (s) (1.230)
a2 (s) ZL (s) + Zc
1.6. EXAMPLE: TRANSMISSION LINE MODEL 39
z0
+ +
u1 u2 zL
- -
Example 18 Consider a short circuit as the load, so that zL = 0. Then gL = −1, and
b1 (s)
= − exp (−2Γ(s)) (1.234)
a1 (s)
which in the lossless case is a pure time delay of 2T together with a change of sign. The
effort transfer function is obviously
e(L, s)
=0 (1.235)
e(0, s)
Example 19 Consider an open circuit as the load. In this case i(L, s) = 0, zL = ∞,
and gL = 1. The transfer function becomes
b1 (s)
= exp (−2Γ(s)) (1.236)
a1 (s)
which in the lossless case is a pure time delay of 2T . The effort transfer function is
e(L, s) 2 1
= = (1.237)
e(0, s) [exp (Γ(s)) + exp (−Γ(s))] cosh(Γ(s))
Example 20 Impedance matching is achieved with zL = Zc . Then gL = 0, and
b1 (s)
=0 (1.238)
a1 (s)
which means that no wave is reflected. The voltage transfer function is
e(L, s)
= exp (−Γ(s)) (1.239)
e(0, s)
which in the lossless case is a pure time delay.
40 CHAPTER 1. MODEL REPRESENTATION
Here we have used the wave propagation time T = L/c, and the wave propagation velocity
1
c := √ (1.241)
MC
For a standard coaxial cable the wave velocity is 75 % of the speed of light, which gives
c = 2.25 × 108 m/s.
Chapter 2
It turns out to be a great advantage to work with the Laplace transform, which contains
the Fourier transform as a special case.
41
42 CHAPTER 2. MODEL ANALYSIS TOOLS
k
d m F
x
where x is the position of the mass m, d is the viscous friction coefficient and k is the
spring constant. The input is the force F . The model can be normalized in to the form
1
ẍ + 2ζω 0 ẋ + ω 20 x = F (2.9)
m
where the undamped natural frequency is
r
k
ω0 = (2.10)
m
and the relative damping is
1 d d
ζ= = √ (2.11)
2ω 0 m 2 km
The transfer function is found by inserting
which leads to
x 1 1
H (s) = (s) =
F m s2 + 2ζω 0 s + ω 20
1 1
= ³ ´2 (2.13)
k
1 + 2ζ ωs0 + ωs0
2.1. FREQUENCY RESPONSE METHODS 43
We assume that ζ < 1 which implies that the poles of the transfer function are complex
conjugated and given by µ q ¶
2
λ = −ζ ± j 1 − ζ ω 0 (2.14)
|Lj |
Gain for
required Slope of -1
accuracy around
crossover 0 dB
Damping of
noise, and
robustness to
unmodelled
dynamics
Figure 2.2: Performance requirements on the loop transfer function in a Bode diagram.
Frequency response techniques are well suited to specify the performance of a control
system. This involves specifications on the loop transfer function L (jω) in a Bode
diagram. We recall that the magnitude of the sensitivity function S (jω) will satisfy the
approximations
¯ ¯ (
¯ 1 ¯ |L (jω)|−1 , |L (jω)| À 1
|S (jω)| = ¯¯ ¯= (2.18)
1 + L (jω) ¯ 1, 1 À |L (jω)|
44 CHAPTER 2. MODEL ANALYSIS TOOLS
and that for unity feedback the magnitude of the closed-loop transfer function T (jω)
can be approximated by
¯ ¯ ½
¯ L (jω) ¯ 1 |L (jω)| À 1
|T (jω)| = ¯¯ ¯= (2.19)
1 + L (jω) ¯ |L (jω)| 1 À |L (jω)|
Typically, we would like the sensitivity |S (jω)| to be small for low frequencies to
reduce the effect of disturbances on the system in the low-frequency region. In addition,
we would like |T (jω)| to be small for high frequencies to reduce the influence of measure-
ment noise and the influence of unmodeled dynamics. This implies that |L (jω)| should
be large for low frequencies, and small for high frequencies. In addition, there has to be
a significant interval around the crossover frequency ω c , defined by |L (jω c )| = 1, where
the phase should be around ∠L (jω) ≈ −90◦ to ensure a sufficient phase margin. These
requirements on the loop transfer function L (jω) are indicated in Figure 2.2.
dω m Ra
Tm = ia (2.26)
dt K
dia K 1
Ta = −ia − ωm + ua (2.27)
dt Ra Ra
where ω m is the motor speed, ia is the armature current, ua is the armature voltage, Ta
is the electrical time constant, and Tm is the mechanical time constant defined by
La JRa
Ta = , Tm = (2.28)
Ra K2
The transfer function H(s) from ua to ω m is found from the Laplace-transformed model
Ra
Tm sω m (s) = ia (s) (2.29)
K
K 1
(1 + Ta s) ia (s) = − ω m (s) + ua (s) (2.30)
Ra Ra
to be
ωm 1 1
H(s) = (s) = (2.31)
ua K 1 + Tm s + Ta Tm s
Suppose that Ta ¿ Tm so that Tm ≈ Tm + Ta . Then the transfer function can be written
1 1
H(s) = (2.32)
K (1 + Tm s)(1 + Ta s)
Suppose that Ta is small, so that the break frequency 1/Ta is much higher than the
frequency range where the model will be used. The the transfer function can be approx-
imated with
1 1
H(s) = (2.33)
K (1 + Tm s)
which is obtained using the approximation
1 + Ta s ≈ 1 (2.34)
We will now discuss how the state-space model (2.26, 2.27) should be modified to re-
flect this approximation. This is best seen from (2.30) where the approximation (2.34)
amounts to writing
K 1
ia (s) = − ω m (s) + ua (s) (2.35)
Ra Ra
This give the approximated state-space model
dω m Ra
Tm = ia (2.36)
dt K
K 1
0 = −ia − ωm + ua (2.37)
Ra Ra
46 CHAPTER 2. MODEL ANALYSIS TOOLS
ẋ = f (x, z, t, ) (2.40)
ż = g(x, z, t, ) (2.41)
ẋ = f (x, z, t, 0) (2.42)
0 = g(x, z, t, 0) (2.43)
The function V (x, t) may be the total energy of the system, or it may be some other
function, usually related to energy. When the system evolves the time derivative of the
energy function V (x, t) is
∂V ∂V
V̇ = + f (x, u, t). (2.47)
∂t ∂x
which follows from the standard rules of time differentiation of a function of two variables.
We say that V̇ is the time derivative along the solutions of the system. Information about
the time derivative of the energy of a system may give valuable insight into properties
of the dynamics of the system. In particular, if V̇ ≤ 0, then the energy is monotonically
decreasing, which may be important in connection with stability considerations. The
analysis of energy functions and their time derivatives along the solutions of the system
forms the basis for Lyapunov’s stability theory (Slotine 1991), (Khalil 1996). This is an
important tool in nonlinear control theory.
ẋ1 = x2 (2.48)
ẋ2 = −ω 20 x1 − 2ζω 0 x2 (2.49)
which gives
V̇ = −2ζω 0 x22 ≤ 0 (2.52)
Note that the energy of the system decreases proportionally with the relative damping ζ
whenever x2 6= 0.
then the time derivative of an energy function V (x, ẋ, t) along the solutions of the system
is
∂V ∂V ∂V
V̇ = + ẋ + f (x, ẋ, t) (2.54)
∂t ∂x ∂ ẋ
For the system in the Example 24 we could arrive at a second-order description by writing
x1 = x and x2 = ẋ. The dynamics could then be presented as the second order system
ẍ = −ω 20 x − 2ζω 0 ẋ (2.55)
and we find the time derivative of V = 12 ω 20 x2 + 12 ẋ2 along the solutions of the system to
be ¡ ¢
V̇ = ω 20 xẋ + ẋẍ = ω 20 xẋ + ẋ −ω 20 x − 2ζω 0 ẋ = −2ζω 0 ẋ2 (2.56)
This result is the same as the result in (2.52).
The time derivative for solutions of the system is found by inserting the equation of
motion (2.57). This gives
Two observations are important at this point. First, V̇ < 0, which means that the energy
is not increasing, and second, the energy decreases because of power dissipated in the
damper.
From the expression of the energy we see that
r r
2 2
x(t) ≤ V , ẋ ≤ V (2.61)
k m
This means that if the energy V decreases to zero, then also the position x and the
velocity ẋ will decrease to zero. Moreover, because V decreases, V (t) will be less than
the initial value V0 . Therefore
r r
2 2
x (t) ≤ V0 , ẋ (t) ≤ V0 (2.62)
k m
This means that if the initial energy is small, then also the position and velocity will
remain small.
2.3. ENERGY-BASED METHODS 49
Friction
Now, consider the mass-spring-damper system with a friction force, so that
which has two terms, the power Ff ẋ dissipated by the system by the friction and the
power dẋ2 dissipated in the damper. In its very physical nature, friction work transfers
kinetic energy to heat energy. This means that the friction work will decrease the total
energy of the system, and it follows that
Ff ẋ ≥ 0 (2.65)
and, accordingly,
V̇ ≤ −dẋ2 (2.66)
External force
Suppose that the mass-spring-damper system is actuated with an input force F . Then
the equation of motion is
mẍ + dẋ + kx = F (2.67)
The time derivative of the energy function is found to be
V̇ = F ẋ − dẋ2 (2.68)
Here the term F ẋ is the power that is supplied to the system due to the force F . We see
that if F ẋ < 0, then the energy V will be decreasing.
F = −Kd ẋ (2.69)
will give
V̇ = − (Kd + d) ẋ2 (2.70)
It is seen that the feedback gain Kd appears as a damping coefficient.
1 T
V (x) = x Px (2.72)
2
50 CHAPTER 2. MODEL ANALYSIS TOOLS
u = −kp x − kd ẋ (2.74)
mẍ + kd ẋ + kp x = 0. (2.75)
This means that the controller defines a virtual spring and a virtual damper. We define
the Lyapunov function candidate to be the sum of the kinetic energy of the mass and the
potential energy of the virtual spring:
1 1
V = mẋ2 + kp x2 (2.76)
2 2
The time derivative of V along the solutions of the system (2.75) is
V̇ = ẋmẍ + kp xẋ
= −ẋ (kd ẋ + kp x) + kp xẋ
= −kd ẋ2 (2.77)
We see that whenever ẋ 6= 0, then V will decrease, and it can be shown that V will tend
to zero. Then, because m and kp are positive constants, this implies that x and ẋ will
tend to zero.
2.3.6 Contraction
We have introduced energy functions to study the stability of nonlinear system around an
equilibrium point by calculating the time derivative of the energy function for solutions
of the system. A slightly different view is taken in contraction analysis (Hartman 1982,
p. 537), (Lohmiller and Slotine 1998) where the convergence of different solutions to each
other is studied. We will look at two different solutions x1 (t) and x2 (t) for the system
ẋ = f (x)
2.3. ENERGY-BASED METHODS 51
where the initial conditions are x1 (t0 ) = x10 and x2 (t0 ) = x20 . We consider the energy
function
1
(x1 − x2 )T (x1 − x2 )
V =
2
which can be seen as a measure of how far the two solutions are from each other. The
time derivative of V along the solutions of the system is
where Z 1 © ª
1
Q=− J [αx1 + (1 − α) x2 ] + JT [αx1 + (1 − α) x2 ] dα (2.79)
2 0
We see that whenever £ ¡ ¢¤
Re λi J + JT < 0 (2.80)
then Q is positive definite, and it follows that V̇ ≤ 0. This means that the two solutions
x1 (t) and x2 (t) will converge to each other as time goes to infinity. As the two solutions
were selected freely, this implies that any two solutions will converge to each other as
time goes to infinity.
Diesel
cylinder
Wc Wt
h c C T h t Wastegate
J tc , tc
exchanged partly as thermal energy with power P = wh where w is mass flow and h
is specific enthalpy, and partly as rotation power P = τ ω where τ is torque and ω is
angular velocity. The speed ω tc of the turbocharger shaft depends on how much energy
that is absorbed by the turbine compared to how much energy that is used to compress
the air in the compressor. In other words, the time derivative of the kinetic energy of the
turbocharger shaft is equal to the thermal power which is converted to kinetic energy in
the turbine, minus the thermal power that is required in the compressor. This is written
· ¸
d 1
Jtc ω 2tc = wt ∆ht − wc ∆hc (2.81)
dt 2
where Jtc is the moment of inertia of the combined shaft of the turbine and the compres-
sor, wt is the mass flow through the turbine, ∆ht is the reduction in specific enthalpy
over the turbine, wc is the mass flow through the compressor, and ∆hc is the increase in
specific enthalpy over the compressor.
If the energy carried by the exhaust becomes to high, then the turbocompressor may
over-speed. This problem can be avoided by opening a wastegate valve for dumping power
from the system. The effect of this is to reduce wt . Alternatively, inlet guidevanes on
the turbine can be used to control the amount of energy that is absorbed by the turbine.
The effect of this is to reduce the change of specific enthalpy ∆ht in the turbine. During
acceleration it may be desirable to speed up the turbocharger to achieve sufficiently high
pressure of the injected air. This can be done by closing the wastegate, or by adjusting
the inlet guide vanes for a higher ∆ht . The use of inlet guide vanes gives a faster response
than the use of a wastegate, and has become the preferred solution in car engines.
2.4 Passivity
2.4.1 Introduction
The concept of passivity is very useful in control systems analysis and design. Passivity
theory provides a set of analysis tools that can be used for a wide range of physical systems
with commonly used controllers like the PID controller, and, in addition, for nonlinear
2.4. PASSIVITY 53
2.4.2 Definition
The following definition of passivity will be used:
Definition 1 Consider a system with input u and output y. Suppose that that there is
a constant E0 ≥ 0 so that for all control time histories u and all T ≥ 0 the integral of
y (t) u (t) satisfies
Z T
y (t) u (t) dt ≥ −E0 (2.82)
0
Then the system is said to be passive.
2.4.3 Examples
Time constant
A time constant given by
ẏ = −ay + u (2.83)
54 CHAPTER 2. MODEL ANALYSIS TOOLS
The first and last term on the right side are positive. It follows that
Z T
1
yudt ≥ − y 2 (0) (2.85)
0 2
and the system has been shown to be passive with E0 := (1/2)y 2 (0).
where
1 1
mv 2 (0) + Kx2 (0)
E0 = (2.89)
2 2
is the initial energy in the form of kinetic and potential energy. It follows that
Z T
F ẋdt ≥ −E0 (2.90)
0
which shows that the system is passive when F is input and ẋ is output. Note that the
product F ẋ between the input and the output is the power supplied to the mass because
of the control input F . Moreover, note that the constant E0 in the passivity inequality
(2.90) is the initial energy in the system. It seems intuitively right to describe this type
of system as passive as the systems has only passive components in the form of a mass,
a spring and a damper. In particular, there is no active element in the system that can
produce energy.
2.4. PASSIVITY 55
Electrical circuit
Consider an electrical circuit with input voltage u, which is the control input, and current
i, which is the system output. The circuit is a serial interconnection of a resistor R, a
capacitor C and an inductance L. The voltage law gives
1 di
u = Ri + q+L (2.91)
C dt
where q is the capacitor charge which satisfies q̇ = i. Then passivity from u to i is shown
by the calculation
Z T Z T Z Z t
1 t di
uidt = R i2 dt + q̇qdt + L i dt
0 0 C 0 0 dt
Z T
1 £ ¤ L£2 ¤
= R i2 dt + q 2 (T ) − q 2 (0) + i (T ) − i2 (0)
0 2C 2
Z T
≥ −E0 + R i2 dt (2.92)
0
where
1 2 L
E0 = q (0) + i2 (0) (2.93)
2C 2
is the initially stored energy in the circuit. Note that the product ui between the input
and the output is the power supplied to the circuit from the control input u. It is also
interesting to note that if the current had been take to be the control variable, and the
voltage had been the measurement, then the system would still be passive.
This implies that Re[H(jω)] ≥ 0 as long as jω is not a pole of H(s). These arguments
provide a partial explanation of the following important result:
is real and positive. If H(s) has a pole at infinity, then it is a simple pole, and
H(jω)
R∞ = lim (2.96)
ω→∞ jω
exists, and is real and positive.
The derivation of this result is found in (Anderson and Vongpanitlerd 1973) and
(Lozano, Brogliato, Egeland and Maschke 2000).
2.4. PASSIVITY 57
Example 29 The transfer function H(s) = Ls where L > 0 has the frequency response
H(jω) = jωL, so that Re[H(jω)] = 0. The transfer function has only one pole, which is
at infinity. As
jωL
R∞ = lim =L (2.102)
ω→∞ jω
is real and positive, it follows that the transfer function is positive real.
s2 + a2
H (s) = , a > 0, ω 0 > 0 (2.106)
s (s2 + ω 20 )
All the poles are simple poles on the imaginary axis in s = 0 and s = ±jω 0 . The
frequency response is
a2 − ω 2
H (jω) = −j (2.107)
ω (ω 20 − ω 2 )
so that Re[H (jω)] = 0. The residuals at the poles on the imaginary axis are
a2 ω 20 − a2
Ress=0 H(s) = , Ress=±jω0 H(s) = (2.108)
ω 20 2ω 20
The residuals are real and positive and the transfer function is positive real if and only
if a < ω 0 .
(s + z1 ) (s + z2 ) . . .
H(s) = (2.109)
s (s + p1 ) (s + p2 ) . . .
where Re[pi ] > 0 and Re[zi ] > 0. Then, H(s) is positive real if and only if Re[H(jω)] ≥ 0
for all ω 6= 0. This follows from
z1 z2 . . .
Ress=0 H(s) = >0 (2.110)
p1 p2 . . .
and from the observation that the H(s) has one pole in the origin while the remaining
poles have negative real parts.
First we check if the transfer function is analytic in the right half plane. We find that
es + e−s = 0 ⇒ e2s = −1
π + 2kπ
⇒ s=j , k = 0, ±1, ±2, (2.112)
2
This means that h(s) is analytic for all Re [s] > 0. It is trivial that H1 (s) is real for all
positive and real s. We then have to establish that Re [H1 (s)] ≥ 0 for all Re [s] > 0 to
show that H1 (s) is positive real. To do this we introduce σ = Re [s] and ω = Im [s] , so
that s = σ + jω, and, using
we find that
sinh σ cosh σ
Re [tanh s] = 2 > 0 for all σ > 0. (2.115)
|cosh s|
We have then showed that H1 (s) = tanh s is a positive real transfer function.
The transfer function from the pressure p1 on the input side to the pressure p2 on
the output side is
p2 1
(s) = H2 (s) = (2.116)
p1 cosh s
This transfer function is not positive real as the real part of the transfer function is
· ¸
1 cosh σ cos ω
Re = 2 (2.117)
cosh s |cosh s|
It follows that for all ω so that cos ω < 0 the real part will be negative for all σ > 0.
A linear time-invariant system with input u and output y described with the transfer
function model y(s) = H(s)u(s) is passive if and only if the transfer function H(s) is
positive real.
To demonstrate that passivity and positive realness are related, we consider the linear
system
y(s) = H(s)u(s) (2.118)
(s + z1 ) (s + z2 ) . . . (s + zm )
H(s) = K (2.119)
(s + p1 ) (s + p2 ) . . . (s + pn )
We will now show that passivity is related to the positive realness of the transfer function
H(s).
60 CHAPTER 2. MODEL ANALYSIS TOOLS
The second term on the right side will be a sinusoidal signal that is bounded by its ampli-
tude. In the third term on the right side the transient signal yt (t) will tend exponentially
to zero. This leads to
¯ Z T ¯
¯ U2 ¯
¯ ¯
¯+ |H (jω 0 )| sin [2ω 0 t + ∠H (jω 0 )] + yt (t) u(t)dt¯ ≤ E0 (2.124)
¯ 4ω 0 0 ¯
for all T ≥ 0. From this result it is seen that the system is passive if and only if
Re H (jω) ≥ 0 for all ω. The if part is obvious. Concerning the only if part, it is
RT
seen that if Re H (jω 0 ) < 0 for some ω 0 , then there is no lower bound on 0 y (t) u(t)dt
as |U 2 T Re H (jω 0 ) /2| can be made arbitrarily large by selecting T sufficiently large.
Finally, assume that the system has a simple pole at the origin s = 0. Then
Ress=0 H(s)
H(s) = + G0 (s) (2.131)
s
where G(s) is due to the poles to the left of the imaginary axis. If ω 0 6= 0, the results
(2.121) and (2.125) are still valid. If u(t) = U , then
U Ress=±jω0 H(s)
y(s) = H(s)u(s) = + ... (2.132)
s2
and the time function is
y(t) = tRess=0 H(s) + . . . (2.133)
This gives
Z T Z T
y (t) u(t)dt = t2 Ress=0 H(s)dt + . . . (2.134)
0 0
It may then be concluded that if the system has a simple pole in s = jω 0 at the imaginary
axis, then the system is passive if and only if the residual Ress=jω0 [H(s)] is real and
positive.
From this computation it is seen that Re [H(s)] ≥ 0 for all Re [s] > 0 if and only if
|B(s)| ≤ 1 in Re [s] > 0.
Example 33 Suppose that the transfer function H(s) is positive real. Then the inverse
H −1 (s) is positive real. Statement 2 of Definition 2 is trivial in this case. Statements
1 and 3 are shown as follows: It is the possible to conclude from the maximum modulus
theorem that B(s) 6= −1 in Re [s] > 0, and we may express the inverse of H(s) as
1 − B(s)
G(s) = H −1 (s) = (2.139)
1 + B(s)
which is analytic in Re [s] > 0 because B(s) is analytic and B(s) 6= −1 in this region.
This proves Statement 1 for G(s). Finally, statement 3 for G(s) is verified from
1 1 − B(s) 1 1 − B ∗ (s)
Re G(s) = +
2 1 + B(s) 2 1 + B ∗ (s)
1 − B(s)B ∗ (s)
= (2.140)
[1 + B(s)] [1 + B ∗ (s)]
A PID controller u(s) = Hr (s)e(s) is a passive system with input e and output u, and
the transfer function Hr (s) is positive real.
The transfer function H(s) is then positive real due to the passivity of the system. The
input u is generated by the system
where the transfer function G(s) is supposed to be positive real. Then the loop transfer
function is L(s) = G(s)H(s). Note the positive realness implies that two transfer func-
tions G(s) and H(s) will have no poles to the right of the imaginary axis. Moreover, the
magnitude of the phase of the of G(jω) and H(jω) will be less than or equal to 90◦ . This
implies that L(jω) has phase that is greater than -180◦ . This means that the system is
at least marginally stable.
ẋ = f (x, u) (2.147)
y = h (x) (2.148)
Suppose that there is a storage function V (x) ≥ 0 and a dissipation function g(x) ≥ 0
so that the time derivative of V for solutions of the system satisfies
∂V
V̇ = f (x, u) = uT y − g(x) (2.149)
∂x
for all control inputs u. Then the system with input u and output y is said to be passive.
u1 y1 u u1 y1 y
System 1 System 1
u y
u2 y2 y2 u2
System 2 System 2
Figure 2.4: Parallel interconnection and feedback interconnection of two passive systems.
which are passive in the sense that there are functions V1 (x1 ) ≥ 0 and V2 (x2 ) ≥ 0 so
that
∂V1
V̇1 = f1 (x1 , u1 ) ≤ uT1 y1 − g1 (x1 ) (2.157)
∂x1
∂V2
V̇2 = f2 (x2 , u2 ) ≤ uT2 y2 − g2 (x2 ) (2.158)
∂x2
where g1 (x1 ) ≥ −Eg1 and g2 (x2 ) ≥ −Eg2 . We will now show that the parallel intercon-
nection and the feedback interconnection shown in Figure 2.4 are passive.
A parallel interconnection
u1 = u2 = u, y = y1 + y2 (2.159)
V := V1 + V2 ≥ 0 (2.160)
satisfies
V̇ = V̇1 + V̇2
= uT1 y1 − g1 (x1 ) + uT2 y2 − g2 (x2 )
= uT y−g1 (x1 ) − g2 (x2 ) (2.161)
which shows that the parallel interconnection with input u and output y is passive.
A feedback interconnection
y1 = u2 = y, u1 = u − y2 (2.162)
2.4. PASSIVITY 65
implies that
V̇ = V̇1 + V̇2
= uT1 y1 − g1 (x1 ) + uT2 y2 − g2 (x2 )
= uT y−g1 (x1 ) − g2 (x2 ) (2.163)
so that also the feedback interconnection with input u and output y is passive.
1 + Ti s
Hpid (s) = K (1 + Td s)
Ts
µ i ¶
Td 1
= K 1+ + Td s + (2.165)
Ti Ti s
V̇p = yu − gp (2.170)
yd e u Passive y
PID
system
The time derivative of Vcl along the solutions of the closed-loop system is
µ ¶
Td
V̇cl = yu − gp + eu − K 1 + e2
Ti
µ ¶
Td
= yd u − gp − K 1 + e2 (2.172)
Ti
where it is used that e = yd − y. We see that the closed-loop system with input yd and
output y is passive. In particular we have that if yd = 0, then
µ ¶
Td
V̇cl = −gp − K 1 + e2 ≤ 0 (2.173)
Ti
V̇ = F ẋ − dẋ2 (2.174)
Suppose that the input F is generated by the P controller F = −K ẋ. Then, with the
same storage function we have
In particular, we see that if ẋd = 0, then V̇cl ≤ 0. Note that the controller is a PID
controller from velocity, which corresponds to a PD2 controller from position.
where q is the vector of generalized coordinates, which are the elastic deformations, M
is a symmetric mass matrix, K is a symmetric stiffness matrix, D (q, q̇) q̇ is a damping
term and f is the input control force. Detailed vibration models of high accuracy can
be derived from the method of finite elements (Bathe 1996). To give the reader an idea
richness of the structural properties of this model we briefly mention some issues that will
be addressed later in the book: The total energy of the vibration system is V = K + U ,
where
1
K = q̇T Mq̇ ≥ 0 (2.180)
2
is the kinetic energy, and
1
U = qT Kq ≥ 0 (2.181)
2
is the potential energy. The damping term is an energy dissipation term related to
friction, and will always satisfy
The time derivative of the total energy along the solutions of the system is
d T
V = q̇T Mq̈ + q̇T Kq = q̇T Bf − q̇ Dq̇. (2.183)
dt
If the input force is set to the P controller f = −kBT q̇, which is a velocity feedback, then
the time derivative of the energy is
d ¡ ¢
V = −q̇T kBBT + D q̇ ≤ 0 (2.184)
dt
It is interesting to note that with this velocity feedback the energy will decrease whenever
q̇ 6= 0. It should be clear from this discussion that the vibration model reflects important
physical properties related to energy that may be important in controller design. These
properties may be obscured if the model is reformulated in state space. Therefore, when
energy-based methods are used, the model is usually kept in the second-order form.
V̇ = ui − Pr (2.185)
68 CHAPTER 2. MODEL ANALYSIS TOOLS
This means that for a passive electrical one-port the energy that can be extracted from
the circuit over the terminals is less or equal to the energy V (0) that is initially stored
in the circuit. Note that (2.187) has the form of a passivity inequality, and that if u is
input and i is output, then the system is passive. This implies that the driving point
impedance Z(s) = u(s)/i(s) is positive real. On background of this we may conclude
that
Example 35 From the passivity inequality (2.187) it is seen that if the current is taken
as input and the voltage is considered to be the output, then the system will still be passive,
which means that the driving point admittance Y (s) = i(s)/u(s) is passive.
i
+
u R C
-
id R L C u
Figure 2.7: Electrical analog of PID controller for an electrical one-port where the current
i is controlled with the voltage u.
where id is the desired current. This is an electrical one-port where a current source with
current id is placed in in parallel to a series connection with a resistor R = K(1 + Td /Ti ),
a capacitor C = Ti /K, and an inductor L = Td K (Figure 2.7). A PI controller is obtained
by setting Td to zero, and in that case there is no inductor in the one-port. In the case
that id = 0, the PID controller is a passive one-port with only passive elements.
If we add these equations and insert the connection equations (2.193) we get
Z T
i1 (t) u1 (t) dt ≥ − [V1 (0) + V2 (0)] (2.196)
0
70 CHAPTER 2. MODEL ANALYSIS TOOLS
The physical interpretation is that the energy that can be extracted from the combined
circuits is equal to the sum of the initially stored energy in the two circuits. This result
shows clearly shows that if a passive two-port is terminated with a passive-one-port, then
the resulting one-port with port variables u1 and i1 is passive.
where u= (u1 , . . . , un ) and i = (i1 , . . . , in )T . As for the passive one-port, the energy
T
that can be extracted from a passive n-port cannot be larger than the energy En that is
initially stored in the capacitors and the inductors
Z T
iT (t) u (t) dt ≥ −Vn (0) (2.198)
0
A general n-port with effort vector e and flow vector f is passive if the energy that can be
extracted from the n-port is limited by the energy that is initially stored in the n-port,
that is, if
Z T
f T (t) e (t) dt ≥ −E0 (2.199)
0
As in the electrical case this can be expressed in terms of conditions on the impedance
Z (s) for a one-port.
with effort Fh and flow vm on the input port, and effort Fm and flow vm on the output
port. The slave is a passive two-port
ms v̇s = Fs − Fe (2.201)
with effort Fs and flow vs is the input port and effort Fe and vs at the output port. The
key to a satisfactory system is to have a passive two-port with effort Fm and flow vm on
the input port, and effort Fs and flow vs is the output port to connect the output port
of the master to the input port of the slave. The total energy E of the system will then
be Z Z
T T
E(T ) = E(0) + Fh (t)vm (t)dt + Fe (t)vs (t)dt (2.202)
0 0
It is reasonable to assume that the total energy is positive, that is, E ≥ 0, which implies
that Z T Z T
Fh (t)vm (t)dt ≥ −E(0) − Fe (t)vs (t)dt (2.203)
0 0
The physical interpretation of this is that the energy that is returned to the operator
through the handle on the master is less that the energy initially stored in the system
plus the energy supplied to the slave from the environment.
First, suppose that the master is directly connected to the slave through a rigid
interconnection so that
Fs = Fm and vs = vm (2.204)
Then the interconnection between the master and the slave is certainly a passive two-port,
and the desired passivity of the system is ensured. Moreover, we see that
Next, consider the case where the slave is driven by DC motors, and that the com-
manded velocity vm from the master is measured by a sensor and transmitted electroni-
cally without any time delay. Then a possible solution is to control the slave with a PD
controller with desired velocity vd and desired position xd given by
ms v̇s = Fs − Fe (2.207)
Fs = Ks (xm − xs ) + Ds (vm − vs ) (2.208)
with effort Fs and flow vm at the input port and effort Fe and flow vs at the output port.
Force reflection to the master is achieved by setting up the force Fm (t) = Fs (t) in the
master, which gives the following two-port for the master:
mm v̇m = Fh − Fs (2.209)
1 Fh
mm ms Fe
vm vs
2 Fh
Ks
mm ms Fe
vm vs
Ds
3 Fh
Ks
mm z 0 , ms Fe
vm vs
Ds
Figure 2.8: Mechanical analogs of telemanipulation systems with force reflection. The
master is represented by a mass mm that is moved with a force Fh from the human
operator. The slave is represented by a mass ms which is exposed to a force Fe from
the environment. In 1) there is a direct mechanical coupling between the master and the
salve. In 2) the slave is controlled by a DC motor with PD control, and there is no time
delay in the signal transmission. In 3) the slave is controlled by a DC motor with PD
control, and the signals are transmitted with time delay using wave variables.
2.4. PASSIVITY 73
Finally, suppose that there is a time delay τ in the electronic transmission between
master and slave. Early attempts involved using the same solution as presented above,
but with transmission given by
The resulting system is not passive, as there is no passive mechanical two-port that delays
the velocity in the forward direction and that delays the force in the opposite direction.
Stability problems where experienced for such solutions already at time delays of 40 ms.
A different solution must therefore be sought. An elegant solution to this problem is to
use a lossless transmission line to interconnect master and slave. The key to this solution
is that a lossless transmission line transmits the wave variables with a time delay that is
the transport time τ of the transmission line. We therefore introduce the wave variables
am = Fm + z0 vm and bm = Fm − z0 vm (2.211)
for the output port of the master, and the wave variables
as = Fs − z0 vd and bs = Fs + z0 vd (2.212)
for the input port of the slave where z0 is the characteristic impedance of the transmission
line. The wave variables are transmitted according to
In terms of forces and velocities this gives the following description of the passive two-port
1
vd (t) = vm (t − τ ) + [Fm (t − τ ) − Fs (t)] (2.214)
z0
Fm (t) = Fs (t − τ ) + z0 [vm (t) − v0 (t − τ )] (2.215)
with effort Fm and vm at the input and effort Fs and flow vs at the output port. The
slave may then be controlled with the PD controller
as in the case of no time delay. The mechanical analog is as when there is no time delay,
but with a transmission corresponding to a lossless hydraulic transmission line with a
compressible fluid shown in Figure 2.8.
r = u + λy (2.217)
Then Z Z Z Z
T T T T
r2 dt = u2 dt + 2λ uydt + λ2 y 2 dt (2.218)
0 0 0 0
From this equation it is seen that
Z T
uydt ≥ −E0 (2.219)
0
74 CHAPTER 2. MODEL ANALYSIS TOOLS
This shows that passivity of the system with input u and output y is equivalent to a small
gain condition in the L2 norm (Khalil 1996) from r to u, and from r to y. A related
result is used in semi-group theory (Pazy 1983, p. 14).
Example 37 This result was used in attitude control in (Egeland and Godhavn 1994)
where
r = ω + λ² (2.221)
was used. A controller was designed so that r ∈ L2 , and then (2.220) was used to show
that the passivity of the system with input ω and output ² implied that the mapping from
r to ω, and the mapping from r to ² were L2 stable.
ẋ = f (x, u, t) (2.223)
y = h (x, t) (2.224)
ẋ = Ax + Bu (2.225)
y = Cx + Du (2.226)
• Parameter values
• Model structure
• System order
There are techniques for describing such uncertainties (Skogestad and Postlethwaite
1996), which may be based on additive uncertainties. Such additive terms may be related
to model properties.
2.5. UNCERTAINTY IN MODELING 75
where ab are the measured accelerations. We see that the equations for calculating the
acceleration a are relatively complicated and highly nonlinear. However, it is interesting
to note that there are no approximations or uncertainty involved in the development of
this model.
In addition, kinematics play an important role in fluid mechanics, where the concepts
of divergence and curl are kinematic, and moreover, the Laplace equation
∇2 φ = 0 (2.230)
where ρ is density, vi is the velocity in direction i, Tji,j is the gradient of the stress tensor,
and fi is the body force. The modeling assumptions enter in the constitutive equations
where the assumptions on the functional dependence of the stress tensor on fluid motion
enters. The mass balance is important in many physical systems, and perhaps even more
important is the energy balance. The model
d
[total energy in a V ] = [energy flow into V ]
dt
− [energy flow out of V ]
+ [energy generated in V ] (2.232)
2.5.4 Passivity
In several important applications the plant may have passivity as a physical property
for a given combination of control variable and output variable. This means that the
plant will be passive when plant parameters undergo large variations in numerical values,
and even under changes in model order. Then with a properly selected PID controller
the closed loop system will always be stable although there may by a high degree of
uncertainty in numerical parameters and detailed modeling.
77
Chapter 3
Electromechanical systems
3.1 Introduction
This chapter deals with mathematical models of electrical motors, and models of elec-
tromechanical sensors and actuators. These electromechanical systems are based on
energy conversion between electrical energy and mechanical energy due to capacitive and
inductive effects. This type of electromechanical systems are important, as they are vital
components in most control systems. Special attention is given to the DC motor with
constant field, which is a basic building block in many control systems. This motor is
described by a simple model, and it is possible to control the motor torque directly. Be-
cause of its importance and simplicity the chapter starts with the model of a DC motor,
and presents typical load configurations for the DC motor. Then selected topics from the
general theory of electromechanical energy conversion is presented with emphasis on en-
ergy functions. This provides us with the necessary background to derive more advanced
models of electrical motors. This includes the model of a DC motor with externally
controlled field, the model of a general AC motor, and models for induction motors.
79
80 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
PL = TL ω m (3.3)
The motor shaft dynamics can be described as a two-port with effort T and flow ω m at
the input port, and effort TL and flow ω m at the output port. Different types of motors
are characterized according to how the motor torque T is generated. In electrical motors
the torque is due to electromagnetic forces, in a hydraulic motor of the hydrostatic type
it is due to the pressure force from a pressurized fluid, while in a turbine the torque is
set up by the forces that result from the change of momentum in the flowing fluid.
The speed of a motor is commonly given in revolutions per minute (rev/min). The
relation to the SI unit rad/s is
rev 2π rad rad
1 = = 0.105 (3.4)
min 60 s s
in ,T in out ,T out
1:n
An electrical motor will typically have a speed range from zero up to about 3000
rev/min. Specially designed electrical motors may run up to 12000 rev/min. In compar-
ison to this, car engines run from 800—6000 rev/min. For many applications the required
speed range of the load is significantly less than the speed range of the motor, and a re-
duction gear must be used. This gives a lower speed of the load, and, more importantly,
it gives a higher torque.
A reduction gear with gear ratio n (Figure 3.1) is described by
ω out = nω in (3.5)
where ω in is the angular velocity of the shaft on the input side of the gear, and ω out is
the angular velocity of the shaft on the output side of the gear. For a reduction gear
n < 1, and a gear is said to have a gear ratio of, say, 10 if n = 1/10.
3.2. ELECTRICAL MOTORS 81
The relation between the input torque Tin and the output torque Tout is found by
comparing power in and power out for the gear. Suppose that the gear is lossless. Then
power in is equal to power out, that is,
ω out = nω in (3.8)
1
Tout = Tin (3.9)
n
with variables Tin and ω in at the input port, and variables Tout and ω out at the output
port.
m ,T L L
Jm JL Te
1 :n
Jm ω̇ m = T − TL (3.10)
that drives a load over a reduction gear with gear ratio n (Figure 3.2). Then the load
has a shaft speed ω L = nω m , and is driven by the output torque of the gear, which is
TL /n. The inertia of the load is JL , and it is assumed that an external torque Te acts on
the load. Then the equation of motion for the load is
1
JL ω̇ L = TL − Te (3.11)
n
If the load equation (3.11) is multiplied by n and added to the equation of motion of
the motor (3.10), then the result is the equation of motion for the system referred to the
motor side. Alternatively, the motor equation (3.10) can be divided by n and added to
the load equation (3.11). This will give the equation of motion of the system referred to
the load side. To sum up:
82 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
The equation of motion for motor, gear and load referred to the motor side is
The equation of motion for motor, gear and load referred to the load side is
µ ¶
1 1
2
Jm + J L ω̇ L = T − Te (3.13)
n n
m ,TL
r
Jm Fe
m
v
v = rω m (3.14)
1
F = TL (3.15)
r
with variables TL and ω m at the input port, and variables F and v at the output port.
Consider a motor which drives a mass m in translational motion over a wheel with
radius r. The load is assumed to have equation of motion
mv̇ = F − Fe (3.16)
Jm ω̇ m = T − TL (3.17)
The equation of motion for motor and load referred to the motor side is
The equation of motion for motor and load referred to the load side is
1 1
( Jm + m)v̇ = T − Fe (3.19)
r2 r
TL 1
2
TL
T
T
m m
Figure 3.4: To the left is shown a stable system where the load torque TL is increasing
for increasing motor velocity ω m . To the right is shown a system with two equilibrium
points. Equilibrium 1 is stable, while equilibrium 2 is unstable as the load torque TL
decreases faster than the motor torque T when the motor velocity ω m increases.
In many applications the load torque TL will depend on the motor speed. An example
of this is shown in the left diagram of Figure 3.4, where the load torque increases with
increasing speed. This will be the case for systems where the friction increases with the
velocity, like the air resistance of a car or a bicycle. Moreover, the motor torque will
typically be a decreasing function of the motor shaft speed ω m due to increasing energy
loss in the motor. It turns out that if both the motor torque and the load torque are
functions of the motor speed so that T = T (ω m ) and TL = TL (ω m ), then the stability
of the motor and load can be investigated in a torque-speed diagram. This is done by
linearization of the motor model (3.1), which gives
where µ ¶¯
∂T ∂TL ¯¯
k= − (3.21)
∂ω m ∂ω m ¯ωmo
is a linearization constant. From linear stability theory we see that the system is stable
if and only if k ≤ 0. This can be investigated graphically in a torque-speed diagram as
shown in Figure 3.4.
m ia
T ua
Figure 3.5: The four quadrants of the motor (to the left), and the four quadrants of the
power amplifier (to the right).
A motor delivers the mechanical power T ω m through the motor shaft, where T is
the motor torque and ω m is the motor speed. If T and ω m has the same signs under
stationary operation, then the motor delivers power. In this case the motor transforms
electrical power to mechanical power, and is said to work as a motor. If T and ω m has
opposite signs under stationary operation, then the motor receives mechanical power and
transforms it into electrical power, and is said to work as a generator. This is illustrated
in Figure 3.5.
3.3. THE DC MOTOR WITH CONSTANT FIELD 85
3.3.2 Model
ia
Ra La
T, m , m
+ +
TL
ua ea
- - Jm
T = KT ia (3.27)
the electromechanical energy conversion unit with an electrical port with port variables
ea and ia , and a mechanical port with port variables T and ω m . Finally, the third
two-port is the motor shaft with input port with variables T and ω m and output port
with variables TL and ω m . There is no energy storage in the electromechanical energy
conversion unit, which implies that the power ea ia of the electrical port equals the power
T ω m of the mechanical port. This gives
ea ia = T ω m = KT ia ω m ⇒ ea = KE ω m (3.28)
where KE = KT is the field constant. The dynamic model can then be found from the
voltage law of the armature circuit and the equation of motion for the motor shaft:
TL
ua
1
ia - 1
m m
La KT Jm
- -
Ra
Ke
Now, suppose that the load model with input ω m and output TL is passive, and that
there is a storage function VL ≥ 0 so that
V̇L ≤ ω m TL (3.34)
Then the total energy Vt := V + VL is greater that or equal to zero, and the time
derivative of Vt along the solution of the system is
V̇t ≤ ia ua (3.35)
The DC motor model (3.29—3.31) with input ua and output ia is passive if the load with
input ω m and output TL is passive.
Example 42 Suppose that the load is simply a damper with viscous friction so that
TL = BL ω m . Then the system with input ω m and output TL is passive with storage
function VL = 0 as this gives
V̇L = 0 ≤ BL ω 2m = ω m TL (3.36)
It follows that the DC motor with input ua and output ia is passive with this load.
Example 43 Suppose that the load is an inertia JL with shaft angle θL connected to the
motor shaft by a spring with torque
JL θ̈L = TL (3.38)
Then the system with input ω m and output TL is passive with storage function equal to
the total energy
1 2 1
VL = JL θ̇L + K(θm − θL )2 ≥ 0 (3.39)
2 2
because the time derivative of VL along the solutions of the system is
it is therefore useful to present models of the DC motor with current control and with
speed control. The advantage of these feedback loops is that the current loop will have
very high bandwidth, and it will therefore suppress nonlinearities in the power amplifier.
The velocity loop can also be given a high bandwidth, and will tend to eliminate the
effect of friction on the motor. The outer position control loop will normally have to
be slower than the first mechanical resonance, and this limits the gain in the position
loop. Usually a PI controller will be used in the current loop, and a PI controller with
limited integral action will used in the velocity loop. In the presentation here we use P
controllers to simplify the expressions. The main results will still be valid.
KT ia Jm s2
s2 θm = ia ⇒ (s) = (3.54)
Jm θm KT
ua = Ki (id − ia ) (3.56)
ia Ki Ha (s)
(s) = (3.57)
id 1 + Ki Ha (s)
The model of a current controlled DC motor is given by the double integrator model
1
θm (s) = [KT id (s) − TL (s)] (3.59)
Jm s2
where the input is the desired current id .
TL
id - 1
m m
KT Jm
1 + Ti s
ua = Ki Ti (i0 − ia ) (3.60)
Ti s
for armature current control where Ti = Tm . Assume that Ta ¿ Tm so that the denom-
inator of L(s) can be factored as (1 + Ta s)(1 + Tm s). Then the loop transfer function
is
Jm 1
L(s) = Ki (3.61)
KE KT 1 + Ta s
which shows that the controller is effective also at low frequencies. Also in this case the
model (3.59) results for realistic gains Ki . This is the controller that is used in practice.
ωm ωm θm KT
(s) = (s) (s) = (3.62)
id θm id Jm s
This transfer function is the product of a gain KT /Jm and an integrator 1/s. The velocity
controller
id = Kω (ω d − ω m ) (3.63)
gives gives the closed-loop dynamics
Ka
ωm s 1
(s) = = (3.64)
ωd 1+ sKa 1 + Ksa
where
KT Kω
Ka = (3.65)
Jm
is the acceleration constant of the system. We see that the velocity loop is stable as it
has only one pole, which is at s = −Ka .
θm 1
(s) = ³ ´ (3.66)
ωd s 1+ s
Ka
3.5. MOTOR AND LOAD WITH ELASTIC TRANSMISSION 91
d d m m
Kv Ka
- -
ca
cv
Figure 3.9: Current controlled DC motor with velocity loop and position loop. The
crossover frequency of the velocity loop is ω ca = Ka , and the crossover frequency of the
position loop is ω cv = Kv provided that Ka À Kv .
T m , m , m L , L
Motor Load
Jm JL
K, D
where θm is the motor shaft angle, θL is the load shaft angle, Tm is the motor torque, and
TL is the load torque from the transmission on the motor shaft. The elastic transmission
and the load inertia is modelled as a torsional spring with spring constant K in parallel
with a torsional damper with damping coefficient D. The resulting torque is
TL = −Kθe − Dθ̇e (3.72)
where
θe = θL − θm (3.73)
is the elastic deflection of the the transmission. In the derivation of the transfer functions
it is helpful to introduce the variable
JL
θr = θm + θL . (3.74)
Jm
and derive the model in terms of the variables θe and θr .
The equations of motion for θe and θr are found by combining the equations (3.70—
3.72). This gives
D K 1
θ̈e + θ̇e + θe = − Tm (3.75)
Je Je Jm
Tm
θ̈r = (3.76)
Jm
where
Jm JL
Je = , J = Jm + JL (3.77)
J
The transfer functions for the original variables are found by solving (3.73) and (3.74),
which gives
µ ¶
Jm JL
θm = θr − θe (3.81)
J Jm
Jm
θL = (θr + θe ) (3.82)
J
This gives
· ¸
θm Jm θr JL θe
(s) = (s) − (s)
Tm J Tm Jm Tm
³ ´2
JL 1
11 Jm ω 1
= 2+ ³ ´2 (3.83)
J s s s
1 + 2ζ 1 ω1 + ω1
and
· ¸
θL Jm θr θe
(s) = (s) + (s)
Tm J Tm Tm
³ ´2
1
Jm 1 1 ω1
= − ³ ´2 (3.84)
J Jm s2 Jm
1 + 2ζ 1 ωs1 + ωs1
The motor and elastic load with elastic transmission is described by the two transfer
functions
³ ´2
s s
θm 1 1 + 2ζ a ωa + ωa
Hθm (s) : = (s) = ³ ´2 (3.85)
Tm Js2
1 + 2ζ 1 ωs1 + ωs1
θL 1 1 + 2ζ 1 ωs1
HθL (s) : = (s) = ³ ´2 (3.86)
Tm Js2
1 + 2ζ 1 ωs1 + ωs1
The transfer functions are often formulated in terms of the shaft speeds ω m (s) =
94 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
sθm (s) and ω L (s) = sθL (s). Then the transfer functions are
³ ´2
s s
ωm 1 1 + 2ζ a ω a
+ ωa
Hωm (jω) : = (s) = ³ ´2 (3.89)
Tm Js
1 + 2ζ 1 ωs1 + ωs1
ωL 1 1 + 2ζ 1 ωs1
HωL (jω) : = (s) = ³ ´2 (3.90)
Tm Js
1 + 2ζ 1 ωs1 + ωs1
40 50
30
20
0
10
Magnitude
Magnitude
0
-10
-50
-20
-30
-40 -100
0 -150
-200
-50
-250
Phase
Phase
-100
-300
-150
-350
-200 -400
-1 0 1 -1 0 1
10 10 10 10 10 10
Figure 3.11: Frequency response from the motor torque Tm to the motor angle θm (to
the left), and frequency response from the motor torque Tm to the load angle θL (to the
right).
An important observation is that ω a < ω 1 , which means that the break frequency
of the zeros in is smaller than the break frequency of the poles in θm /Tm (jω). The
frequency responses are shown in Figure 3.11 for K1 = 0.5, Jm = J1 = 1 and D1 = 0.01.
Note that the frequency response Hθm (jω) of the motor angle does not have any negative
phase contribution from the elasticity, whereas the frequency response HθL (jω) of the
load angle drops 180◦ because of the resonance. Obviously, this has serious consequences
for controller design, and for the achievable bandwidth when feedback is taken from
either θ̇m or θ̇L . In practice it means that when feedback is taken from θ̇L the crossover
frequency must be less than ω 1 . In contrast to this, the crossover may be selected above
ω 1 when feedback is taken from θ̇m . Experience shows that feedback loops from θ̇m are
very robust, and can be given a very high crossover frequency. Feedback from θ̇L gives
an upper limit on the crossover frequency at ω 1 .
3.5. MOTOR AND LOAD WITH ELASTIC TRANSMISSION 95
Under the assumption that ζ a ¿ 1 the transfer function Hθm (s) will have zeros close to
±jω a . This means that a nonzero torque input Tm (jω a ) with frequency ω a will give a
small θm (jω a ) as ±jω a are close to the zeros of Hθm (s).
From (3.85) and (3.86) it is seen that the transfer function from the motor angle to
the load angle is given by
θL θL Tm 1 + 2ζ 1 ωs1
(s) = (s) (s) = ³ ´2 (3.92)
θm Tm θm
1 + 2ζ a ωsa + ωsa
This means that poles of θL (s) /θm (s) are equal to the zeros of Hθm (s) which are close
to ±jω a . This means that the system θL (s) /θm (s) will have resonances near ±jω a , so
that a large amplitude in θL (jω a ) can occur with a small θm (jω a ). This agrees with the
fact that the zeros of Hθm (s) which are close to ±jω a .
The time derivative of the energy as the system evolves will be the power θ̇m Tm supplied
2
by the input Tm minus the power Dθ̇e dissipated in the rotational damper. This is
written
2
V̇ = θ̇m Tm − Dθ̇e (3.94)
This implies that the system with input Tm and output θ̇m is passive. This again implies
that the transfer function Hωm (s) from the input Tm to ω m = θ̇m is positive real, which
means that
Re[Hωm (jω)] ≥ 0 for all ω. (3.95)
Thus, from simple energy arguments we can establish that
J2 ω̇ 2 = T1 − T2 (3.99)
d
(θ1 − θ2 ) = (ω 1 − ω 2 ) (3.100)
dt
T1 = D1 (ω 1 − ω 2 ) + K1 (θ1 − θ2 ) . (3.101)
where ω 2 is the shaft speed, and J2 is the inertia. The transmission is modelled as a
torsional spring with spring constant K1 in parallel with a torsional damper with damping
coefficient D1 . The input port has effort T1 and flow ω 1 , while the output port has effort
T2 and flow ω 2 . We may add on any number of additional degrees of freedom as two-ports
Ji ω̇ i = Ti−1 − Ti (3.102)
d
(θi−1 − θi ) = (ω i−1 − ω i ) (3.103)
dt
Ti−1 = Di−1 (ω i−1 − ω i ) + Ki−1 (θi−1 − θi ) (3.104)
with port variables Ti−1 and ω i−1 at the input and Ti and ω i at the output. In a
computational setting the inputs are ω i−1 and Ti , while the outputs are ω i and Ti−1 .
The sum of kinetic and potential energy for a motor with n degrees of freedom in the
load is
Xn n−1
X1
1 1 1
V = Jm ω 2m + Ji ω 2i + Kθ2e + Ki (θi − θi+1 )2 (3.105)
2 i=1
2 2 i=1
2
The time derivative of the energy for the solutions of the system will be the power ω m Tm
supplied by the input Tm minus the power dissipated in the rotational dampers. This is
written
n−1
X
2
V̇ = ω m Tm − Dθ̇e − Di (ω i − ω i+1 )2 (3.106)
i=1
This implies that the system with input Tm and output ω m will still be passive with n
degrees of freedom in the load.
where Tg1 is the torque from gear 1 on motor 1, and Tg2 is the torque from gear 2 on
motor 2. The equation of motion for the load is
1
JL θ̈L = (Tg1 + Tg2 ) − Te (3.109)
n
3.6. MOTOR AND LOAD WITH DEADZONE IN THE GEAR 97
This shows that if a passive controller from θ̇2 to Tm2 is used for motor 2, then the system
with input Tm1 and output θ̇1 will be passive.
is used for motor 2. This controller is passive when θ̇2 is considered to be the input and
Tm2 is the output. In agreement with this, the controller has a mechanical analog which
is a spring with stiffness Kp2 and a damper with coefficient Kd2 . The system can then be
analyzed using the energy function of the system including the mechanical analog. The
energy function for this system is
1³ 2 2 2
´ 1¡ ¢
Va = J1 θ̇1 + J2 θ̇2 + JL θ̇L + K1 φ21 + K2 φ22 + Kp2 θ22 ≥ 0 (3.114)
2 2
which will have time derivative along the solutions of the system given by
2 2 2
V̇a = Tm1 θ̇1 − D1 φ̇1 − D2 φ̇2 − Kd2 θ̇2 (3.115)
This shows that the system with input Tm1 and output θ̇1 is passive when the PD controller
(3.113) is used.
the output axis of the gear, and as a consequence of this there is no torque transmitted
through the gear in the deadzone. The modeling of a gear with deadzone requires some
care. In the following it will be seen that if it is assumed that there is elasticity in the
gear, then the modeling is simplified. In case of a rigid gear with deadzone it is necessary
to switch between two models of that have a different number of states.
where Tgm is the gear torque on the motor side, and TgL is the gear torque on the load
side. The gear ratio is n. The deflection between the motor and the load is given by
1
φ = θm − θL (3.118)
n
The gear has a deadzone δ. This means that the gear torque is zero when |φ| < δ.
Suppose that the gear is elastic, and that is can be described by a spring with stiffness
K outside of the deadzone. Then the gear torques Tgm and TgL are given as functions
of the gear deflection φ according to
K (φ + δ) , φ ≤ −δ 1
Tgm (φ) = 0, −δ ≤ φ ≤ δ , TgL (φ) = Tgm (φ) (3.119)
n
K (φ − δ) , δ ≤ φ
The gear is then a mechanical two-port in impedance form where port 1 has input θ̇m
and output Tgm , and port 2 with input θ̇L and output TgL . Port 1 of the gear will then
be compatible with the motor port, which has output θ̇m and input Tgm , and in the same
way port 2 of the gear can be connected with the port of the load. The interconnection
of the motor, gear and load is then straightforward, and a simulation model is given by
the equations (3.116—3.119).
This can be regarded as an impedance model with inputs θ̇m and θ̇L and outputs Tgm
and TgL . Outside the deadzone the gear is defined by the usual gear equations
¾
θ̇L = nθ̇m
, |φ| = δ (3.121)
Tgm = nTgL
3.6. MOTOR AND LOAD WITH DEADZONE IN THE GEAR 99
In terms of inputs and outputs this can be regarded as a hybrid model with inputs θ̇m
and TgL and outputs θ̇L and Tgm , or it can be seen as a cascade model with inputs θ̇m
and Tgm and outputs θ̇L and TgL . Note, however, that the gear model for |φ| = δ cannot
be put in impedance form.
The impedance model (3.120) that is valid for |φ| < δ is a two-port with inputs and
outputs that are compatible with the two-port formulation of the motor and load where
shaft speed is output and torque is output. In contrast to this, the hybrid model (3.121)
does not have inputs and output that can be connected to the motor and load. In fact,
the system of motor, gear and load has only one degree of freedom in this case, and the
models of the motor and load must be combined into one model.
The way to handle this in a simulation system is to switch between three models,
where one model is valid inside the deadzone, and there is one model on each side of
the deadzone. At the negative side of the deadzone where φ = −δ the load angle is
θL = n(θm + δ), and JL θ̈L = TgL must be negative if the system is to stay at φ = −δ.
This implies that θ̈m must be negative, which is the case if Tm < 0, while the systems
enters the deadzone if Tm > 0 At the positive side of the deadzone where φ = δ then
Tm > 0 will give positive acceleration, and the system will stay at φ = δ. If Tm < 0,
then the system enters the deadzone. The three models are therefore given by
¡ ¢ ¾
Jm + n2 JL θ̈m = Tm
when φ = −δ and Tm < 0 (3.122)
θL = n(θm + δ)
¡ ¢ ¾
Jm + n2 JL θ̈m = Tm
when φ = δ and Tm > 0 (3.123)
θL = n(θm − δ)
¾
Jm θ̈m = Tm
otherwise (3.124)
JL θ̈L = 0
where Tg1 is the torque from gear 1 on motor 1, and Tg2 is the torque from gear 2 on
motor 2. The equation of motion for the load is
1
JL θ̈L = (Tg1 + Tg2 ) − Te (3.127)
n
where Te is an external disturbance torque.
100 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
The gears are supposed to have a spring constant K and a deadzone δ. The deviation
angle of the gear referenced to the motor side are given by
1 1
φ1 = θ1 − θL , φ2 = θ2 − θL
n n
The gears can then be modeled as a spring with a deadzone, which gives the gear torques
K (φi + δ) , φi ≤ −δ
Tgi = 0, −δ ≤ φi ≤ δ , i = 1, 2 (3.128)
K (φi − δ) , δ ≤ φi
The motors can then be connected to the load with the gear equations. The system is
shown in Figure 3.12.
Motor 1 Dead-zone
Torque
reference 1 Torque 1 1
loop
J 1s s Load
Load
torque 1 1
J ps s
Torque
reference 2 Torque 1 1
loop J 2s s
Motor 2 Dead-zone
Figure 3.12: Block diagram of two motors driving a load through elastic gears with
deadzone.
Due to the deadzone and the lack of damping in the gear the load may oscillate.
This can be eliminated by pretensioning the gears by controlling the motors with an
offset torque in opposite directions. Alternatively, damping of φ1 and φ2 can be achieved
by including rate feedback from φ̇1 and φ̇2 (Leonhard 1996), (Gavronski, Beech-Brandt,
Ahlstrom and Manieri 2000).
∇×H = J (3.129)
∇·B = 0 (3.130)
where J is the current density. The relation between the two vector fields H and B is
given by
B = µH (3.131)
where the permeability µ is a material constant given by the constitutive law
µ = (1 + χm ) µ0 (3.132)
v h
H
We consider the magnetic circuit in Figure 3.13. The magnetic circuit has an iron
core of cross section A and length . The iron core has a small airgap of length h and a
winding of N turns with current i. Then the integral form of (3.129) is
I
H · ds = N i =: F (3.133)
where F is the magnetomotive force (mmf), which is also called the ampere-turns, and
ds is a differential length which is tangent to the path of integration. The magnetic flux
φ of the circuit is
φ = AB (3.134)
The iron core has much higher magnetic permeability than the surrounding air, and as
the airgap is small, the iron core and the airgap form a closed path for the magnetic
flux φ of length in the core and length h in air. The magnetic flux density B has zero
divergence, which means that the flux φ is the same for all cross sections of the iron core
and for the airgap. Therefore we may consider the iron core and the airgap to form a
magnetic circuit where the magnetomotive force N i sets up a magnetic flux φ that flows
102 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
through the circuit. The magnitude of the magnetic field intensity is Hc = B/µ in the
core and Ha = B/µ0 in the airgap. Then (3.133) gives
µ ¶ µ ¶
h h φ
N i = Hc + Ha h = + B= + (3.135)
µ µ0 µ µ0 A
The magnetic circuit has a reluctance R defined so that the relation between the mag-
netomotive force and the flux is
N i = Rφ (3.136)
We see that the reluctance of the magnetic circuit is
µ ¶
Ni 1 h h
R= = + ≈ (3.137)
φ A µ µ0 Aµ0
where the approximation can be done as the magnetic permeability µ0 in air is much
smaller than the permeability µ in iron.
We now turn to the electrical circuit with the coil. Define the magnetic flux linkage
λ of the coil which is defined by
λ := N φ (3.138)
In the example in this section, the flux linkage is a linear function of the current, which
is given by
λ = Li (3.139)
where
µ0 N 2 A
L= (3.140)
h
is the inductance of the coil.
i = i(λ) (3.141)
The voltage set up in the winding is the time derivative of the state λ by Faraday’s law:
u = λ̇ (3.142)
The state of a capacitive circuit element is given by the electrical charge q, and the
current is defined by
i = q̇ (3.143)
The voltage is given by the constitutive equation
u = u(q) (3.144)
dλ
dWm = P dt = iudt = i dt = idλ (3.146)
dt
We can then calculate the stored energy corresponding to the state λ from
Z Z
λ
0 0
λ
λ0 0 λ2
Wm (λ) = i(λ )dλ = dλ = (3.147)
0 0 L 2L
where the energy is given as a function of the flux linkage λ. To change the variable to
the current i we define the coenergy of an inductive element by
Z i
∗
Wm (i) = λ (i0 ) di0 (3.151)
0
104 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
i
Characteristic curve
P
i
Coenergy stored
Wm i Energy stored
Wm i i Wm
Wm Wm 0 i d
which means that the coenergy is found from the energy through a Legendre transfor-
mation
∗
Wm (i) = λi − Wm (λ) (3.153)
Again we stress that the coenergy is not necessarily a meaningful physical quantity, but
rather a mathematical tool that is useful in the modeling of electromechanical systems.
The differentials of the energy and the coenergy is given by
∗
dWm (λ) = idλ, dWm (i) = idλ + λdi − dWm (λ) = λdi (3.154)
This implies
∗
∂Wm (λ) ∂Wm (i)
= i and =λ (3.155)
∂λ ∂i
Example 46 If the flux linkage is given by λ = Li where the impedance L is a constant,
then the coenergy is
∗ λ2 1
Wm (i) = λi − = Li2 (3.156)
2L 2
∗
Then the numerical value of the energy Wm (λ) and the coenergy Wm (i) is the same,
note however, that the energy is a function of λ while the coenergy is a function of i.
We note that the energy is given in terms of the stored charge q. It may be desirable to
use the voltage u as a free variable instead of q. We therefore define the coenergy by
Z u
∗
Wc (u) = q (u0 ) du0 (3.158)
0
3.7. ELECTROMECHANICAL ENERGY CONVERSION 105
q
Characteristic curve
P
q
u u
it it may be concluded that the coenergy is found from the energy through the Legendre
transformation
Wc∗ (u) = qu − Wc (q) (3.160)
The differential of the energy is
dWc (q) = udq (3.161)
while the differential of coenergy is
We see that
∂Wc (q) ∂Wc∗ (u)
= u and =q (3.163)
∂q ∂u
Example 47 If q = Cu and the capacitance C is a constant, then
q2 1
Wc∗ (u) = qu − = Cu2 (3.164)
2C 2
and we see that the numerical value of the energy and the coenergy is the same. In this
case the characteristic curve of Figure 3.15 is a straight line.
The electrical port has current i and voltage given by u = λ̇. The constitutive
equations are assumed to be given by
i = i(λ, x) (3.165)
F = F (λ, x) (3.166)
P = iλ̇ − F ẋ (3.167)
The energy stored in the magnetic system is assumed to be given by Wm (λ, x), and we
get
dWm (λ, x) = P dt = idλ − F dx (3.168)
Note that dWm (λ, x) is the absolute differential of the function Wm (λ, x). The absolute
differential may also be written
∂Wm (λ, x)
i (λ, x) = (3.170)
∂λ
∂Wm (λ, x)
F (λ, x) = − (3.171)
∂x
The flux linkage λ and the force F of an electromechanical inductive element are given
∗
from the coenergy Wm (i, x) by
∗
∂Wm (i, x)
λ (i, x) = (3.175)
∂i
∗
∂Wm (i, x)
F (i, x) = (3.176)
∂x
3.7. ELECTROMECHANICAL ENERGY CONVERSION 107
∗ λ2 1
Wm (i, x) = λi − = L(x)i2 (3.178)
2L(x) 2
An electromechanical two-port with linear flux linkage λ = L(x)i has force given by
or alternatively, by
∗
∂Wm (i, x) 1 ∂L (x) 2
F (i, x) = = i (3.180)
∂x 2 ∂x
i
+
N i = φ (Ra + Rc + Rb + Rr ) (3.184)
where
z
Ra = (3.185)
Aµ0
is the reluctance of the airgap, Rc is the reluctance of the core, Rb is the reluctance of the
ball, and Rr is the reluctance of the return path through the open air. The reluctances
Rc and Rb are negligible. Moreover, if the ball is sufficiently close to the core, then the
return path through the open air will not change significantly as the ball moves, and we
may assume that Rr is a constant. Therefore we may write
z + z0
Ni = φ (3.186)
Aµ0
N 2 Aµ0
λ = Nφ = i, (3.187)
z + z0
N 2 Aµ0
L (z) = (3.188)
z + z0
i2 ∂L (z) µ AN 2 i2
F = =− 0 2 (3.189)
2 ∂z 2 (z + z0 )
The model for the magnetic levitation experiment is then found from the equation of
motion and the circuit dynamics to be
1 i2
mz̈ = − AN 2 µ0 + mg (3.191)
2 (z + z0 )2
di µ0 AN 2 dz
L = −Ri + 2 i+u (3.192)
dt (z + z0 ) dt
Let zd be the constant desired position of the ball. The solution (zd , id ) is found from
1 i2d
0 = mz̈d = − AN 2 µ0 + mg (3.193)
2 (zd + z0 )2
AN 2 µ0 i2d id
m∆z̈ = 3 ∆z − AN 2 µ0 ∆i
(zd + z0 ) (zd + z0 )2
p
2mg 2AN 2 µ0 mg
= ∆z − ∆i (3.195)
zd + z0 zd + z0
Paper cone
r
Motion
S N
In a loudspeaker the sound is created with a voice coil motor by setting up motion in a
membrane as shown in Figure 3.17. The voice coil is an inductive motor with translational
motion. In this section we will develop a simplified model for the loudspeaker dynamics
that gives some insight into the dynamics at low frequencies (Meisel 1966), (Crandall,
Karnopp, E.F. Kurtz and Pridmore-Brown 1968). More accurate models will depend on
acoustic properties of the loudspeaker, and on the modes of vibration of the membrane.
The membrane has mass m, the air resistance is modeled as a damper with coefficient
b, and the cone suspension is modeled as a spring with stiffness k. The electrical circuit
has input voltage u, resistance R and inductance L and induced voltage e.
The flux density B in the airgap is constant and set up by a permanent magnet. The
magnetic flux from the permanent magnet through the winding is
φ = 2πrBx (3.196)
where x is the position of winding which is wound around a cylinder that is fixed to the
membrane. The flux linkage for the coil with N windings can then be written
λ (i, x) = Li + Ke x (3.197)
where L is the self inductance of the coil and Ke = 2πrN B. The magnetic coenergy is
found by integrating (3.173) from (0, 0) to (0, x), and then from (0, x) to (i, x). Under
the assumption that the force is zero when i = 0, this gives
Z i
∗ 1 2
Wm (i, x) = λ(i0 , x)di0 = Li + Ke xi (3.198)
0 2
P = iT λ̇ − T θ̇ (3.202)
where i = (i1 , i2 )T and λ = (λ1 , λ2 )T . The absolute differential of the energy Wm (λ1 , θ)
stored in the system is found from dW = P dt to be
and by comparing this to the defining expression for the absolute differential we find that
λ = M(θ)i (3.205)
where M(θ) is the inductance matrix. The matrix M(θ) can be shown to be positive
definite and symmetric. We may then integrate dWm (λ, θ) to get the energy function
Z λ ¡ 0 ¢T −1 1
Wm (λ, θ) = λ M (θ)dλ0 = λT M−1 (θ)λ (3.206)
0 2
The coenergy is found to be
1 1
∗
Wm (i, θ) = λT i− λT M−1 (θ)λ = iT M(θ)i − iT MT (θ)M−1 (θ)M(θ)i (3.207)
2 2
which gives
∗ 1
Wm (i, θ)= iT M(θ)i (3.208)
2
It follows that the torque is
∗
∂Wm (i, θ) 1 ∂M(θ)
T = = iT i (3.209)
∂θ 2 ∂θ
u = u(q, x) (3.210)
F = F (q, x) (3.211)
P = uq̇ − F ẋ (3.212)
The energy stored in the magnetic system is Wc (q, x). The rate of change of the stored
energy must be equal to the energy supplied due to the power P . This may be expressed
dWc (q, x)
= P ⇒ dWc (q, x) = P dt = udq − F dx (3.213)
dt
Note that dWc (q, x) is the absolute differential of the function Wc (q, x). The absolute
differential may also be written
Comparing the two expressions for the absolute differential we find that
∂Wc (q, x)
u(q, x) = (3.215)
∂q
∂Wc (q, x)
F (q, x) = − (3.216)
∂x
The charge q (u, x) and the force F (u, x) of an electromechanical capacitive element with
constitutive equations (3.210, 3.211) are given from the coenergy Wc∗ (u, x) by
∂Wc∗ (u, x)
q (u, x) = (3.219)
∂u
∂Wc∗ (u, x)
F (u, x) = (3.220)
∂x
1 C(x)2 u2 1
Wc∗ (v, x) = C(x)u2 − = C(x)u2 (3.222)
2 C(x) 2
An electromechanical system with linear charge equation q = C(x)u has force given by
the energy according to (3.216), which gives
µ ¶
1 d 1
F (q, x) = − q2 (3.223)
2 dx C(x)
1 dC(x) 2
F (v, x) = u (3.224)
2 dx
3.7. ELECTROMECHANICAL ENERGY CONVERSION 113
d0
C(x) = C0 (3.225)
d0 + x
Here d0 is the nominal position of the moving plate with mass m and position x. More-
over, the force over the capacitor is zero when the charge is zero. The force over the
capacitor is then found from (3.223) to be
µ ¶
1 d d0 + x 2
F (q, x) = − q (3.226)
2 dx C0 d0
q q2
u(q, x) = , F (q, x) = − (3.227)
C(x) 2C0 d0
q2
mẍ + bẋ + kx + = −Fa (3.228)
2C0 d0
q (d0 + x)
Rq̇ + = u0 (3.229)
C0 d0
Here (3.228) is the equation of motion for the moving plate where b is the friction coeffi-
cient, k is the spring stiffness, the last term on the left side is the force from the capacitor,
and Fa is the acoustic excitation force due to the sound. The stationary value of this
force is zero. Equation (3.229) is the voltage law for the electric circuit with a resistor
R in series with the capacitor, and with a constant driving voltage u0 . We note that the
dynamics of the system are nonlinear. Before linearization the equilibrium points are
investigated. By setting the time derivatives of x and q to zero and eliminating q we find
the equilibrium values x0 and q0 , which are related to u0 by
q02 q0 (d0 + x0 )
kx0 + = 0, = u0 (3.230)
2C0 d0 C0 d0
Elimination of q0 by inserting the second equation of (3.230) into the first equation gives
C0 d0 u20
kx0 + 2 = 0, −d0 ≤ x0 ≤ 0 (3.231)
2 (d0 + x0 )
where the first term is the spring force of the mechanical spring and the second term can
be regarded as a nonlinear electrical spring. There are two equilibrium points where one
is stable, and the other is unstable.
114 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
By inserting ∆x from the second equation into the first equation we get
· ¸
¡ 2 ¢ q2 ∆q(s)
ms + bs + k (C0 d0 Rs + d0 + x0 ) − 0 = Fa (s) (3.234)
C0 d0 q0
The output from the microphone is the increment in voltage ∆uR over the resistor R,
which is ∆uR = R∆i = Rs∆q. The transfer function from the acoustic force to the
measurement is found from (3.234) to be
where
k b
ω 20 = ζ0 = √
, (3.237)
m 2 km
We see that the measured voltage u0 is proportional to the acoustic excitation force Fa
in the frequency range up to ω 0 .
q02
k (d0 + x0 ) − ≥0 (3.238)
C0 d0
which is simplified to
d0
x0 ≥ − (3.239)
3
by inserting the equation (3.230) for the equilibrium point.
q (u, x) = Cp x + Cu (3.240)
Fpe (u, x) = −Kx + Cp u (3.241)
3.7. ELECTROMECHANICAL ENERGY CONVERSION 115
where x is the elongation of the piezoelectric material, Fpe is the actuator force, q is the
charge, u is the voltage, C is the capacitance, Cp is the piezoelectric constant, and K is
the mechanical stiffness. The coenergy Wc∗ (u, x) of the actuator is found by integrating
dWc∗ = qdu + Fpe dx from (0, 0) to (0, x), and then from (0, x) to (u, x). This gives
Z x Z u
∗ 0 0
Wc (u, x) = Fpe (0, x ) dx + q (u0 , x) du0 (3.242)
0
Z x Z q 0
= − Kx0 dx0 + (Cp x + Cu0 ) du0 (3.243)
0 0
Ks
F F
Actuator force
Piezoelectric
Actuator Piezoelectric force
F pe F pe
Voltage V - F Force
Cp
control input output
K Ks
x0 x Deflection
- response
In this case the deflection x is treated as an output while the force F on the actuator
is an input (Figure 3.20. The decision on whether to treat the piezoelectric actuator as
Voltage V 1
x Deflection
control input
Cp KK s output
x0
F Force
response
a force or deflection actuator depends on how the actuator is connected to the system
to be controlled. If the actuator is connected to a spring, then deflection should be the
output of the actuator. If the actuator is connected to mass, then force should be the
actuator output.
Re ie + λ̇e = ue (3.249)
where ie is the field current, Re is the field resistance, Ne is the number of windings in
the field circuit, λe = λe (ie ) is the flux linkage of the field circuit, and ue is the field
3.8. DC MOTOR WITH EXTERNALLY CONTROLLED FIELD 117
ia
Ra La
T, m , m
+ +
ie TL
ua + e ea
ue Jm
- -
- Re
circuit voltage. The voltage law for the armature circuit in the rotor gives
d
Ra ia + La ia + ea = ua (3.250)
dt
ea = ke λe ω m (3.251)
is proportional to the flux linkage λe and the shaft speed ω m . The electrical power ea ia
and the mechanical power T ω m of the electromechanical conversion unit must be equal,
and this implies that the motor torque
T = kT λe ia (3.252)
d
Ra ia + La ia + ke λe ω m = ua (3.253)
dt
T = kT λe ia (3.254)
The input port variables are ua and ia and the output port has variables T and ω m .
The equation of motion for the motor shaft is
Jm ω̇ m = T − TL (3.255)
where Jm is the inertia of the motor shaft, and TL is the torque that acts on the motor
shaft from the load.
118 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
The input variables to the DC motor are the field voltage ue and the armature voltage
ua . Note that the model is nonlinear due to the product λe ω m in the armature equation
and the product λe ia in the field equation.
This shows that if the load is passive, then the DC motor with input ua and output ia is
passive. Note in particular that this result does not rely on any assumptions on how the
field circuit is controlled. This means that a passive current controller like a PI controller
will give a stable armature current control independently of the field circuit.
Moreover, the energy of the field circuit is
1
Ve = Le i2e (3.262)
2
with time derivative
die
V̇e = ie Le = ie (−Re ie + ue ) (3.263)
dt
= ie ue − Re i2e (3.264)
along the solutions of the system. These calculations show that the field circuit is passive
with input ue and output ie . Moreover, it is seen that there is no energy exchange between
the field circuit and the rest of the system. This means that the field current ie can be
controlled with a passive controller of the PI type independently of how the armature
circuit is controlled.
In terms of a network description the field circuit is a passive electrical one-port
with input port with voltage ue and current ie . The dynamic model of the armature
circuit and the motor shaft can be described as in the case of a DC motor with constant
field with interconnection of three passive two-ports, namely, the armature circuit, the
electromechanical energy conversion unit, and the motor shaft.
3.8. DC MOTOR WITH EXTERNALLY CONTROLLED FIELD 119
Re ie = ue (3.265)
Ra ia + kf λe ω m = ua (3.266)
kT λe ia = TL . (3.267)
The armature equation (3.266) gives an expression for the stationary velocity
ua − Ra ia ua Ra TL
ωm = = − (3.268)
kf λe kf λe kT kf λ2e
where the torque equation (3.267) was used to eliminate ia . Suppose that the armature
voltage is limited by
−U ≤ ua ≤ U (3.269)
while the flux linkage is limited by
0 ≤ λe ≤ λ̄ (3.270)
Then, with a constant maximum flux linkage λe = λ̄ the maximum velocity will be
U Ra TL
ωm = − . (3.271)
kf λ̄ kT kf λ̄2
It turns out that the speed of the the motor may be increased over this value by reducing
the flux linkage λe . This is referred to as field weakening. To see this we note that for
ua = U then
∂ω m U Ra TL 2Ra TL
=− 2 +2 < 0 if λe > λmin = . (3.272)
∂λe kf λe kT kf λ3e kT U
This means that when the armature voltage ua has reached its maximum value U , an
additional increase in velocity can be achieved by weakening the field as long as the
load torque TL is sufficiently small, so that λe > λmin . Field weakening is typically
implemented so that the induced voltage ea = kf λe ω m is kept constant, that is, with a
desired field is set to (
λed = ¯ λ̄ ¯ |ea | < ea,max (3.273)
¯ ea,max ¯
¯ kf ωm ¯ otherwise
The induced voltage can be computed from the armature voltage and armature current
measurements using
dia
ea = ua − Ra ia − La (3.274)
dt
and a feedback controller can be used to achieve the desired flux linkage λed . In this case
the desired flux linkage λed is considered as an input to the system, and, assuming that
the field circuit is sufficiently fast, the model is
dia
La = −Ra ia − kf λed ω m + ua (3.275)
dt
Jm ω̇ m = kT λed ia − TL (3.276)
θ̇m = ωm (3.277)
120 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
Typically, the armature current ia is controlled with a PI controller where the armature
voltage ua is the input. Stability of the armature current control loop is ensured as the
system with input ua and output ia is passive independently of the dynamics of the field
circuit.
3.9.2 Notation
For the modeling of the general AC motor we will represent voltages, currents and flux
linkages in terms of two-dimensional coordinate vectors in the stator-fixed frame s, the
rotor-fixed frame r, and in the rotor flux frame f . The stator-fixed frame s is also referred
to as the ab frame, while the flux frame f is referred to as the dq frame. The tradition
in the literature of electrical machines is to write the coordinate vectors as complex
numbers. A voltage vector given in the coordinates of the stator frame s is written as
the complex number
us = ua + jub . (3.278)
The same vector in the flux frame is written
uf = ud + juq . (3.279)
In the same way the vector can be given in the rotor frame r as ur .
The rotational angle from the stator to the rotor is denoted θ, so that
us = ur ejθ (3.282)
and µ ¶
dus dur
= + j θ̇ur ejθ (3.283)
dt dt
iS
120 °
i S3 i S2
i R2
i R3
i R1 S ,t
i S1
iR
We will here develop the dynamic model of a general alternating current (AC) mo-
tor based on the presentation in (Leonhard 1996) where complex numbers are used to
represent vectors in the plane. An alternative formulation based on vector notation is
found in (Vas 1990). The results of this section will later be specialized to the dynamic
model of the induction motor. The general AC motor has a stationary part called the
stator, which is assumed to be an iron cylinder containing a concentric rotor, which is
the moving part of the motor. Both the rotor and the stator are assumed to have circular
cross sections separated by a constant airgap h. Both stator and rotor have symmetrical
three-phase windings close to the airgap. Each stator phase has NS windings, while each
rotor phase has NR windings. The magnetic permeability of the fully laminated stator
and rotor iron is assumed to be infinite, and iron losses are left out of the analysis. A mo-
tor with two poles is considered. For details on this consult (Leonhard 1996) for control
122 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
issues, and (Fitzgerald et al. 1983), which is a basic textbook on electrical machines.
The geometry of the AC motor is given in Figure 3.22. The angle θ is the rotor angle,
α is the angular coordinate of the stator, and β = α − θ is the corresponding angular
coordinate of the rotor. The currents of the stator phases 1, 2 and 3 are denoted iS1 , iS2
and iS3 , respectively. The stator currents are balanced so that
Note that the currents iS1 (t), iS2 (t) and iS3 (t) are real, and, moreover, they are general
time functions that need not have any specified wave-form. The radial magnetomotive
force (mmf) distribution from the stator windings at the angular coordinate α is by
design sinusoidal and given by
FS (α, t) = NS [iS1 cos α + iS2 cos (α − γ) + iS3 cos (α − 2γ)] , γ = 120◦ (3.285)
we get
Complex notation
1 ¡ jα ¢
cos α = e + e−iα (3.289)
2
1 ¡ jα ¢
sin α = e − e−jα (3.290)
2j
is introduced, and this makes it possible to write the magnetomotive force in the form
1 £ ¤ £ ¤
FS (α, t) = NS isS (t)e−jα + is∗
S (t) e
jα
= NS Re isS (t)e−jα (3.291)
2
where the complex variable isS and its complex conjugate is∗
S are defined by
To explain the introduction of the complex current isS further we note that in the gen-
eration of the magnetomotive force FS (α, t) the three stator phases are rotated in the
stator by an angle γ = 120◦ relative to each other. Because of this, the influence of a
current iS2 (t) in the second phase is the same as the influence of a current iS2 (t) ejγ in
the first phase. In the same way, the influence of a current iS3 (t) in the third phase is the
same as the influence of a current iS3 (t) ej2γ in the first phase. The combined influence
of the three phases iS1 (t), iS2 (t) and iS3 (t) is therefore the same as the single complex
current isS .
The polar form of isS is written
p s s
where |iS | = isS is∗
S is the magnitude of iS and ζ is the angle of iS . Using the polar form
of the stator current we may write the magnetomotive force at the angular coordinate α
as h i
1
FS (α, t) = NS |iS | ej(ζ−α) + |iS | e−j(ζ−α) = NS |iS | cos (ζ − α) . (3.295)
2
The currents of the rotor phases 1, 2 and 3 are denoted iR1 , iR2 and iR3 , respectively.
The radial magnetomotive force from the three-phase rotor windings is given at the
angular coordinate β in the rotor as
where
β = α − θ. (3.297)
The rotor currents iR1 , iR2 and iR3 are represented by the complex variable irR and its
complex conjugate ir∗
R defined by
which gives
1 h i
NR irR e−j(α−θ) + ir∗
FR (α, θ, t) = Re
j(α−θ)
. (3.300)
2
The total radial magnetomotive force is then given by the sum
As the magnetic permeability of the iron is much higher than the magnetic permeability
for air, the magnetomotive force will be over the airgaps. The corresponding magnetic
flux density at the airgap is
µ0
BS (α, θ, t) = [FS (α, t) + FR (α, θ, t)] (3.302)
2h
where µ0 is the magnetic permeability of air.
The flux linkage of stator winding 1 is
Z π2 Z ψ+ π2
1
λS1 (t) = NS cos ψ lrBS (α, θ, t) dαdψ. (3.303)
2 −π 2 ψ− π
2
i S1 i R1
RS S1 R1 RR
i S2 i R2
RS S2 R2 RR
+ +
i S3 i R3
u S1 + + u R1
RS S3 R3 RR
- u S2 + u R2 -
+
- u S3 u R3 -
- -
and rotor circuits are shown in Figure 3.23. For each of the stator phases 1, 2 and 3 the
voltage law leads to
dλS1
RS iS1 + = uS1 (3.311)
dt
dλS2
RS iS2 + = uS2 (3.312)
dt
dλS3
RS iS3 + = uS3 (3.313)
dt
Likewise, the voltage law for each of the rotor phases gives
dλR1
RR iR1 + = uR1 (3.314)
dt
dλR2
RR iR2 + = uR2 (3.315)
dt
dλR3
RR iR3 + = uR3 (3.316)
dt
3.9. DYNAMIC MODEL OF THE GENERAL AC MOTOR 125
The voltage laws for stator and rotor in terms of complex variables can be written
dλsS
RS isS + = usS (3.319)
dt
r dλrR
RR iR + = urR . (3.320)
dt
where
λsS = LS isS + M isR , λrR = LR irR + M irS (3.321)
Note that the dynamics of the stator circuits are given in the stator-fixed frame s,
while the dynamics of the rotor circuits are given in the rotor fixed frame r.
The motor torque is due to the Lorentz force on the rotor, which is caused by the
rotor current flowing in the magnetic flux from the stator. The magnetic flux from the
stator is
NS µ0 h s i
BRS (β, θ, t) = iS (t)e−j(β+θ) + is∗
S (t) e
j(β+θ)
(3.322)
4h
while the current density in the rotor is given by
1 ∂FR NR £ r −jβ ¤
aR (β, t) = = −j iR e − ir∗
Re
jβ
(3.323)
2r ∂β 4r
The resulting torque is
dT = −rBRS aR lrdβ (3.324)
j M h s −j(β+θ) i£ ¤
= i e + is∗
S e
j(β+θ)
irR e−jβ − ir∗
Re
jβ
dβ (3.325)
2π 3 S
h
j M s∗ r jθ i
= i i e − isS ir∗
Re
−jθ
+ isS irR e−j(2β+θ) − is∗ r∗ j(2β+θ)
S iR e dβ (3.326)
2π 3 S R
which is integrated to
· ¸
M isS ir∗
Re
−jθ
− is∗ r jθ
S (t) iR e 2
T = = M Im [isS isR ∗ ] (3.327)
3 2j 3
i R1
R1 RR
i R2
R2 RR
i R2
R3 RR
A type of induction motor that is widely used is the squirrel cage induction motor,
which is designed so that the rotor circuits are short-circuited (Figure 3.24). The dynamic
model is obtained by setting the rotor voltage urR to zero in the general AC motor model.
In a network description the induction motor model is obtained from the general AC
motor model by introducing a short circuit of the rotor port.
where the equation is expressed in the s frame, and where it is used that urR = 0.
Differentiation gives
dλs
RR isR + R − jω m λsR = 0 (3.337)
dt
Next, insertion of (3.307) into (3.319) gives
d
RS isS + (LS isS + M isR ) = usS (3.338)
dt
From (3.309) it follows that
1
isR = irR ejθ = (λs − M isS ) (3.339)
LR R
and, combining this with (3.337), it is found that
µ s ¶ µ ¶
disR 1 dλR disS 1 s s disS
= −M = jω m λR − RR iR − M
dt LR dt dt LR dt
·µ ¶ s
¸
1 RR R R di
= jω m − λsR + M isS − M S (3.340)
LR LR LR dt
dω m 2M h ¡ ¢∗ i
J = Im isS λrR ejθ − TL
dt 3 LR
The coordinate form of this model is found by inserting
dia L2R RS + M 2 RR RR κ 1
= − ia + λa + κω m λb + ua (3.348)
dt L2R LS σ LR LS σ
dib L2 RS + M 2 RR Rr κ 1
= − R 2 ib + λb − κω m λa + ub (3.349)
dt LR LS σ LR LS σ
dλa RR RR M
= − λa − ω m λb + ia (3.350)
dt LR LR
dλb RR RR M
= − λb + ω m λa + ib (3.351)
dt LR LR
Jm ω̇ m = µ (λa ib − λb ia ) − TL (3.352)
where
M2 M 2M
σ =1− , κ= , µ= (3.353)
LS LR σLS LR 3 LR
b
q iS i Sq
Rotor axis
i Sb
d
i Sd Flux axis
R
a
i Sa
is also referred to as the dq frame. Here d refers to the direct axis, which is the xf axis,
and q refers to the quadrature axis, which is the yf axis. The rotor flux linkage in the
dq frame is then purely real, which is seen from
2M h ³ ´∗ i 2 M
T = Im ifS λfR = |λR | iSq . (3.358)
3 LR 3 LR
This expression for the torque is very interesting as it resembles the torque expression for
a DC motor. In particular, it is seen that if the field represented by the rotor flux linkage
|λR | can be controlled to a constant, say |λR | = Λ, then the torque will be proportional
to the stator current component iSq along the quadrature axis yf . To investigate this
further we develop a model of the induction motor in the dq frame. The rotor flux linkage
can be expressed by the rotor and stator currents by rotating (3.309) to the flux frame
f , which gives
λfR = LR ifR + M ifS (3.359)
This expression is combined with the voltage law
dλrR
RR irR + =0 (3.360)
dt
for the rotor windings. In the f frame this gives
³ ´
d λfR e−j(θ−ρ) RR ³ f ´
ej(θ−ρ) + λR − M ifS = 0, (3.361)
dt LR
which leads to the following differential equation for the rotor flux linkage:
dλfR RR ³ f ´
+ j (ρ̇ − ω m ) λfR + λR − M ifS = 0. (3.362)
dt LR
LR d |λR |
+ |λR | = M iSd (3.363)
RR dt
M RR iSq
ρ̇ = ω m + (3.364)
LR |λR |
Note that the second equation is singular when the rotor flux is zero, that is, for |λR | = 0.
The stator flux equation is
d
RS isS + (LS isS + M isR ) = usS (3.365)
dt
130 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
diSd M d |λR |
LS σ = −RS iSd + uSd − + LS σ ρ̇iSq (3.371)
dt LR dt
diSq M
LS σ = −RS iSq + uSq − ρ̇ |λR | − LS σ ρ̇iSd (3.372)
dt LR
LR d |λR |
+ |λR | = M iSd (3.373)
RR dt
M RR iSq
ρ̇ = ω m + (3.374)
LR |λR |
Jm ω̇ m = µ |λR | iSq − TL (3.375)
We can interpret this in the following way: The stator current component iSd along
the direct axis is controlled by the voltage uSd , and is used to magnetize the motor,
that is, to control the flux linkage |λR |. The stator current component iSq along the
quadrature axis is controlled by the quadrature voltage component uSq , and is used to
control the torque Tm . This is the underlying principle of field-oriented control. In field-
oriented control the magnitude |λR | of the rotor flux is controlled to a constant value Λ
with the controllers
iSd,ref = Kid (s) [Λ − |λR | (s)] (3.376)
uSd = Kud (u) [iSd,ref − iSd ] (3.377)
Then the torque can be controlled to a desired value τ d by controlling the quadrature
current
uSq = Kuq (u) [iSq,ref − iSq ] (3.378)
where iSq,ref = τ d / (µΛ). In addition, the flux angle ρ must be calculated in some way.
Solutions to this problem are discussed in great detail in (Leonhard 1996).
3.11. LAGRANGIAN DESCRIPTION OF ELECTROMECHANICAL SYSTEMS 131
where q̇k = ik is the current through element k, and λ̇k = uk is the voltage over element
k. The energy stored in the circuit is
Xn Z t
W = q̇k λ̇k dt (3.382)
k=1 t0
Suppose that circuit element k is capacitive, and that the voltage λ̇k can be given as
a function of the charge qk according to
λ̇k = λ̇k (qk ) (3.383)
Then, using q̇k dt = dqk , the energy of element k can be written
Z qk
Wck (qk ) = λ̇k (qk0 ) dqk0 (3.384)
qk (t0 )
132 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
where qk0 is the dummy variable used in the integration. The coenergy of element k is
³ ´ Z λ̇k ³ 0´ 0
∗
Wck λ̇k = qk λ̇k dλ̇k (3.385)
λ̇k (t0 )
0
where λ̇k is the dummy variable in the integration. Then the following expressions hold
∗
∂Wck (qk ) ∂Wck (λ̇k )
= λ̇k and = qk (3.386)
∂qk ∂ λ̇k
Next, suppose that circuit element i is inductive, and that the current can be written
as a function
q̇i = q̇i (λi ) (3.387)
of the flux linkage λi . Then the energy is of an inductive element is
Z λi
¡ ¢
Wmi (λi ) = q̇i λ0i dλ0i (3.388)
λi (t0 )
where the summation is done over the capacitive elements of the circuit. The energy
∗
Wm (λ) and the coenergy Wm (q̇) of the circuit are given by
X X
∗ ∗
Wm (λ) = Wmi (λi ) , Wm (q̇) = Wmi (q̇i ) (3.392)
i i
where the summation is done over the inductive elements of the circuit.
Suppose that electrical analog 1 is used, which means that the charge q is taken as a
generalized coordinate of the electrical system. Then the energy stored in an inductance
is analog to the kinetic energy of a mass, and the energy stored in a capacitor is the
analog of the potential energy in a spring. On the equation level there is no distinction
between mechanical components and electrical components, and therefore Lagrangian
dynamics can be formulated also for electrical systems by using the analogies that have
been pointed out.
which is the coenergy of the capacitive elements minus the energy of the inductive ele-
ments.
The generalized forces Qi corresponding to the generalized coordinate in the form
of an electrical charge qi is found from a power consideration. The power a generalized
force Qi is Pi = Qi q̇i , which shows that the generalized force must be the voltage over
element i, that is,
Qi = ui . (3.395)
134 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
Example 50 We consider an electrical motor with shaft angle qm and inertia Jm . The
kinetic energy of the shaft is given by Tm (q̇m ) = 12 Jm q̇m
2
, and the potential energy is
V (q) = 0. The coenergy of the inductive elements of the motor is given by
∗ 1 T
Wm (q̇e , qm ) = q̇ Me (qm ) q̇e (3.405)
2 e
∗
and the Lagrangian is L = Tm (q̇m ) + Wm (q̇e , qm ). Then the dynamics of the motor is
given by
∂Me (qm )
Me (qm ) q̈e + q̇m q̇e = u (3.406)
∂qm
1 ∂Me (qm )
Jm q̈m − q̇Te q̇e = τ (3.407)
2 ∂qm
where the input voltage u is the generalized force corresponding to the generalized co-
ordinates, and τ is the external torque acting on the motor. The coupling between the
electrical part and the mechanical part gives rise to a torque
1 T ∂Me (qm )
τm = q̇ q̇e (3.408)
2 e ∂qm
∂Me (qm )
e = q̇m q̇e (3.409)
∂qm
∗
In terms of the energy T = Tm (q̇m ) + Wm (q̇e , qm ), the coupling terms balance the energy
exchange between the electrical part and the mechanical part along the solutions of the
system. This is seen from
1 ∂Me (qm )
Ṫ = q̇m Jm q̈m + q̇Te Me (qm ) q̈e + q̇m q̇Te q̇e
2 ∂qm
= q̇m τ +q̇Te u (3.410)
and we may conclude that if the mechanical port with effort τ m and flow q̇m is terminated
with a passive mechanical one-port, then the system with input u and output q̇e is passive.
Example 51 The electrical motor in the previous example can be described as a passive
electrical two-port in series with a passive electromechanical two-port. The input port of
the electrical two-port has variables u and q̇e and output port with variables e and −q̇e .
The electromechanical two-port has input port with variables e and −q̇e and output port
with variables τ m and q̇m .
Example 52 The flux linkage for the motor in the previous examples is given by
∗
∂Wm (q̇e , qm )
λ= = Me (qm ) q̇e (3.411)
∂ q̇e
The power is P = F v = ṗv, the differential of the kinetic energy is dT = P dt = vdp, and
the kinetic energy is Z p
T (p) = v(p0 )dp0 (3.412)
0
The kinetic coenergy is then Z v
T ∗ (v) = p(v 0 )dv 0 (3.413)
0
In the linear case where p = mv, the kinetic energy and the kinetic coenergy have same
numerical values as
1 p2 1
T (p) = = mv 2 = T ∗ (v) (3.414)
2m 2
Therefore, the kinetic coenergy T ∗ (v) is referred to as the kinetic
penergy and is denoted
by T (v). However, in a relativistic setting where m(v) = m0 / 1 − (v 2 /c2 ) there is a
difference between kinetic energy and kinetic coenergy.
where µ ¶
0 −1
S= (3.421)
1 0
The partial derivative of the inductance matrix with respect to the shaft angle is
µ ¶
∂Me (qm ) 0 M SR2 (qm )
P (qm ) := = (3.422)
∂qm −M SR2 (−qm ) 0
The Lagrangian is equal to the sum of kinetic energy and electrical coenergy:
∗
L = T (q̇e , qm , q̇m ) = Tm (q̇m ) + Wm (q̇e , qm ) (3.423)
Then the dynamics of the motor is given by
Me (qm ) q̈e + P (qm ) q̇m q̇e + Re q̇e = u (3.424)
1 T
J q̈m − q̇e P (qm ) q̇e = −τ L (3.425)
2
Example 54 The dynamic equations for the electrical part can be written out as
disS dir
LS + M R2 (qm ) S + M q̇m SR2 (qm ) irR + RS isS = usS (3.426)
dt dt
disS dirR
M R2 (−qm ) + LR − M q̇m SR2 (−qm ) isS + RR irR = urR (3.427)
dt dt
This leads to the result
dis d
LS S + M [R2 (qm ) irR ] + RS isS = usS (3.428)
dt dt
dir d
LR R + M [R2 (−qm ) isS ] + RR irR = urR (3.429)
dt dt
dq̇m
J = τm − τL (3.430)
dt
where the motor torque is given by
T
τ m = M (isS ) SR2 (qm ) irR (3.431)
This result corresponds to the model (3.328—3.331) of the general AC motor except for
the factor 2/3 in the torque expression which is due to the three phase assumption used
in the previous derivation.
Example 55 The time derivative of the energy function T for solutions of the general
AC motor is given by
∂T ∂T
Ṫ = q̇ + q̈
∂q ∂ q̇
µ ¶T µ ¶T
0 Me (qm ) q̇e
= 1 T q̇+ q̈
2 q̇e P (qm ) q̇e J q̇m
1 T
= q̇ P (qm ) q̇e q̇m + q̇Te Me (qm ) q̈e +q̇m J q̈m
2 e
1 T
= q̇ P (qm ) q̇e q̇m + q̇Te [−P (qm ) q̇m q̇e − Re q̇e − ue ]
2 e · ¸
1 T
+q̇m q̇e P (qm ) q̇e − τ L
2
= q̇Te ue − q̇m τ L − q̇Te Re q̇e
= isT s rT r T
S uS + iR uR − q̇m τ L − q̇e Re q̇e
138 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
where the field flux linkage λe = LS ie . In the torque expression (3.431) the stator current
can be expressed in terms of the stator flux linkage according to
1
isS = (λs − M isR ) (3.443)
LS S
which gives the torque expression
M M
τm = (λsS )T SisR = λe ia (3.444)
LS LS
die
LS + RS ie = ue (3.445)
dt
dia M
LR + q̇m λe + RR ia = ua (3.446)
dt LS
dq̇m M
J = λe ia − τ L (3.447)
dt LS
140 CHAPTER 3. ELECTROMECHANICAL SYSTEMS
Chapter 4
Hydraulic motors
4.1 Introduction
Hydraulic motors are widely used because of the low weight and small size of hydraulic
motors compared to electrical motors with the same power. Typically a hydraulic motor
can have 10 times as high power as an electrical motor of the same dimensions. Hydraulic
systems can be divided into hydrostatic and hydrodynamic systems. Hydrostatic motors
are motors that are driven by pressure work of a flowing fluid. In contrast to this,
hydrodynamic motors are driven by the exchange of momentum of a fluid that flows past
the turbine blades. We will use the term hydraulic systems for hydrostatic systems in
the following. In this chapter dynamic models for hydraulic systems will be presented
and analyzed. The main reference for the material is (Merritt 1967). We mention the
following conversion rules between commonly used physical units:
• 1 bar = 105 Pa
• 1 atm = 1.01325 · 105 Pa
• 1 psi = 1 pound/inch2 = 6897 Pa = 0.068 bar
• 1 Pa = 1 N/m2
4.2 Valves
4.2.1 Introduction
Valves are important components of hydraulic systems, and are used to control flow. In
this section background material and models for typical valves will be developed.
141
142 CHAPTER 4. HYDRAULIC MOTORS
the assumption of zero loss of energy, and that the flow area is not smaller than A, the
discharge coefficient is found to be Cd = 1 from the continuity equation and Bernoulli’s
equation in Section 11.2.8. In practice, there will be some loss of energy, and the cross
section of the flow will be somewhat smaller than the cross section A. This will reduce
the discharge coefficient Cd to be in the range 0.60 — 0.65 for orifices with sharp edges,
and in the range 0.8 — 0.9 when the edges are rounded.
The Reynolds number for flow through a restriction is given by
D
Re = q (4.2)
Aν
where D is the diameter of the restriction, A is the cross sectional area of the flow, and
ν is the kinematic viscosity. For hydraulic oil the kinematic viscosity is approximately
ν ≈ 30 × 10−6 m2 /s. The flow may be assumed to be turbulent and given by (4.1) for
Reynolds numbers larger than 1000.
For a narrow restriction with low volumetric flow q the Reynolds number becomes
small. If the Reynolds number becomes less than 10 the flow may be assumed to be
laminar and given by
q = Cl ∆p (4.3)
where Cl is a constant and ∆p is the pressure drop. This is the case for leakage flows
through narrow openings, and for typical restrictions in pressure feedback channels.
When Re > 1000 the flow through a restriction will be turbulent and proportional to the
square root of the pressure difference according to (4.1). When Re < 10 the flow will be
laminar and proportional to the pressure drop as in (4.3).
Example 56 The leakage flow coefficient of laminar flow through a circular tube (Hagen-
Poiseuille flow) is (Merritt 1967):
r2
Cl = A (4.4)
8µL
where
9 Re2tr ρν 2 π
Ftr = (4.14)
8Cd2 4
The regularized characteristic (4.13) describes the flow as laminar according to (4.3) for
low Reynolds numbers, and turbulent as given by (4.1) for high Reynolds numbers. There
is a smooth transition between the laminar and the turbulent flow regimes.
Numerical values for hydraulic oil are according to (Ellman and Piché 1999): Retr =
1000, ρ = 900 kg/m3 , ν = 30 × 10−6 m2 /s =30 cSt, Cd = 0.6. The regularized charac-
teristic (4.13) is well suited for numerical simulation as it it physically justified, and it
eliminates the problems that are experienced with the turbulent characteristic (4.1).
144 CHAPTER 4. HYDRAULIC MOTORS
q1
qs p1
ps
qa qb
q2
p2
qc qd
qr
pr
Typical flow control valves used in hydraulic systems have four orifices, and the flow is
controlled by varying the flow areas of the orifices. This type of valve is termed a four-
way valve. In this section we will derive the flow equations for the four-way valve shown
schematically in Figure 4.1. The valve is connected to the rest of the hydraulic system
through four ports, where each port has pressure as the effort variable and volumetric
flow as the flow variable. The supply port is connected to the pressure supply with
pressure ps and flow qs , the return port is connected to the return tank with pressure
pr = 0 and flow qr , port 1 with pressure p1 and flow q1 is connected to input side of the
load, and port 2 with pressure p2 and flow q2 is connected to the output side of the load.
The volumetric flows through the orifices a, b, c and d are given by the orifice equations
q
qa = Cd Aa (xv ) ρ2 (ps − p1 )
q
qb = Cd Ab (xv ) ρ2 (ps − p2 )
q (4.15)
qc = Cd Ac (xv ) ρ2 (p1 − pr )
q
qd = Cd Ad (xv ) ρ2 (p2 − pr )
where the opening areas Aa (xv ), Ab (xv ), Ac (xv ) and Ad (xv ) of the orifices are assumed
to be functions of the spool position xv , and the turbulent flow characteristic (4.1) has
been used to keep the equations simple. The more elaborate flow model (4.13) should be
used in simulations. The port flows are related to the orifice flows through the equations
qs = qa + qb , qr = qc + qd (4.16)
q1 = qa − qc , q2 = qd − qb (4.17)
4.2. VALVES 145
q1 q2
xv
qa qb
qc
qd
qs qr
If a matched and symmetric valve is equipped with a critical spool and rectangular
orifices, then the port areas are given by
½
0, xv ≤ 0
Aa (xv ) = Ad (xv ) = (4.19)
bxv , xv ≥ 0
½
−bxv , xv ≤ 0
Ab (xv ) = Ac (xv ) = (4.20)
0, xv ≥ 0
A matched and symmetric valve with open center spool and rectangular orifices has port
openings given by
Aa (xv ) = Ad (xv ) = b(U + xv ), |xv | ≤ U (4.21)
Ab (xv ) = Ac (xv ) = b(U − xv ), |xv | ≤ U (4.22)
therefore not consistent with the assumptions that will used in the derivation of models of
hydraulic motors in the following. However, the assumption of a matched and symmetric
valve and a symmetric load leads to a very useful transfer function model for valve
controlled hydraulic motors, and in spite of the inconsistent assumptions introduced in
the modeling, the resulting transfer function model turns out to represent the dynamics
of the system with sufficient accuracy. In this connection it is it is interesting to note that
major textbooks on hydraulic control systems like (Merritt 1967) and (Watton 1989) rely
to a great extent on the use of the symmetric load assumption (4.23) in the analysis of
control systems for valve controlled motors and cylinders.
The symmetric load assumption (4.23) together with the orifice equations (4.15) and
the matching conditions (4.19, 4.20) imply the equations
qa = qd , qb = qc (4.24)
pL = p1 − p2 (4.26)
The load flow of a matched and symmetric valve with a symmetric load can be expressed
by valve characteristic r
1
qL = Cd bxv (ps − sgn(xv )pL ) (4.31)
ρ
1.5
*
x =1
v
0.5
L
*
normalized flow, q
*
x =0
v
0
-0.5
-1
*
x =-1
v
-1.5
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
*
normalized load pressure, p
L
which is commonly plotted using pressure-flow curves as in (Figure 4.3), where the nor-
malized values are
∗ qL xv pL
qL = q , x∗v = , p∗L = (4.33)
Cd bxv max ps xv max ps
ρ
qL = Kq xv − Kc pL (4.34)
where r
∂qL 1
Kq = = Cd b (ps − sgn(xv )pL ) (4.35)
∂xv ρ
and p
∂qL Cd bxv (1/ρ)(ps − sgn(xv )pL )
Kc = − = (4.36)
∂pL 2(ps − sgn(xv )pL )
At zero flow, zero load pressure and zero spool position, that is, at qL = 0, pL = 0
and xv = 0 the constants of linearization are
r
ps
Kq0 = Cd b (4.37)
ρ
Kc0 = 0 (4.38)
148 CHAPTER 4. HYDRAULIC MOTORS
If the system is designed so that the load pressure satisfies the condition |pL | < 23 ps , then
2
|pL | < ps ⇒ 0.577Kq0 ≤ Kq ≤ 1.29Kq0 (4.39)
3
The calculated value for Kc is not consistent with what is found in practice. A more
realistic value for the constant Kc is obtained by setting the spool in its zero position
(xv = 0) and measuring the leakage flow ql as a function of the load pressure pL . The
flow-pressure coefficient Kc0 is then found from Kc0 = ql /pL .
The valve characteristic (4.31) is only valid when a matched and symmetrical valve with
critical spool is connected to a symmetric load as defined by (4.23). If the load is not
symmetric, then the valve must be modelled with the orifice equations (4.15).
where
9 Re2tr ρν 2 π
Ftr = , A = bxv , pe = ps − sgn(xv )pL (4.42)
8Cd2 4
pc
p3
p 1, q 1 Ac xv
xc
p4
p 2, q 2
Figure 4.4: The figure shows the mechanical design and symbols for a pressure com-
pensated valve for volume flow control. The compensation spool with position xc which
is positive in the upwards direction will be positioned so that the pressure difference
p2 − pc over the main spool is approximately constant for varying input variables q1 , p1
and output variables q2 , p2 . The position xv of the main spool may be controlled with a
electric actuator or a pilot valve.
spring side, and to the internal pressure pc on the opposite side. The input and output
flows are given by the orifice equations
r
2
q1 = Cd bc xc (p1 − pc ) (4.45)
ρ
r
2
q2 = Cd bxv (pc − p2 ) (4.46)
ρ
where xc is the position of the spool in the pressure compensation valve, and xv is the
position of the main valve.
To analyze the dynamics of the pressure correction valve we use the equation of
motion for the pressure compensation spool
mc s2 xc (s) + Kc xc (s) = Ac [p4 (s) − p3 (s)] + Fc0 (4.47)
and the pressure dynamics of the compensation chambers
V3
ṗ3 = +Ac ẋc + C3 (pc − p3 ) (4.48)
β
V4
ṗ4 = −Ac ẋc + C4 (p2 − p4 ) (4.49)
β
The Laplace transformed pressure equations are
µ ¶
V3
C3 1 + s p3 = +Ac sxc + C3 pc (4.50)
C3 β
µ ¶
V4
C4 1 + s p4 = −Ac sxc + C4 p2 (4.51)
C4 β
150 CHAPTER 4. HYDRAULIC MOTORS
Under the assumption that the time constants V3 /(C3 β) and V4 /(C4 β) are sufficiently
small, we may use the approximations
Ac
C3 p3 = +Ac sxc + C3 pc ⇒ p3 = pc + sxc (4.52)
C3
Ac
C4 p4 = −Ac sxc + C4 p2 ⇒ p4 = p2 − sxc (4.53)
C4
Insertion in the equation of motion gives
C3 + C4
mc s2 xc (s) + A2c sxc (s) + Kc xc (s) = Ac [p2 (s) − pc (s)] + Fc0 (4.54)
C3 C4
which is Laplace transformed and rearranged to
µ ¶
Fc0 Kc mc 2 A2c C3 + C4
pc (s) − p2 (s) = + − s + s + 1 xc (s)
Ac Ac Kc Kc C3 C4
µ 2 ¶
Fc0 Kc s s
= + − + 2ζ c + 1 xc (s) (4.55)
Ac Ac ω 2c ωc
where ω 2c = Kc /mc . It can be seen that for frequencies well below ω c , the compensation
spool dynamics will satisfy
Fc0 Kc xc
pc − p2 = − (4.56)
Ac Ac
It follows that if Kc /Ac is sufficiently small, then the pressure difference pc − p2 over the
main spool will be approximately constant, and the flow (4.46) through the valve can be
approximated by s
2 Fc0
q1 = q2 = Cd bxv (4.57)
ρ Ac
This means that the use of an additional pressure compensated stage in the valve, the
flow through the valve becomes proportional to the orifice area bxv of the main spool.
xv
A
p 2, q 2
p 1, q 1
Ap
pp
Balance valves are used in heavy lifting operations to ensure that a hanging load will
not fall down if the supply pressure is lost. In a balance valve a preset spring will push
the spool towards the closed position. The inlet pressure will set up a force that will
push the spool to the open position, while a high output pressure will tend to close the
spool. In addition, a pilot pressure is used to assist in the opening of the valve. Consider
a balance valve with inlet pressure p1 , outlet pressure p2 and pilot pressure pp . The
balance valve has a spool with cross section A at the spring end and cross section Ap at
the pilot end. Define the area
Ar = A − Ap (4.58)
and the pilot ratio
Ap
R=
Ar
The spring force on the spool is F = F0 + Ke xv where F0 is the pretensioning of the
spring, Ke is the spring stiffness, and xv is the spool position. We define xv = 0 in the
closed position, while the valve is open for xv > 0. A preset pressure p0 = F0 /Ar is
defined for convenience of notation. The equation of motion for the spool is
mv ẍv = pp Ap + (p1 − p0 ) Ar − Kxv − p2 A (4.59)
where mv is the mass of the spool. For a properly selected balance valve, the spool
dynamics will be stable, and in the frequency range of the rest of the system it can be
represented by the static characteristic
Ar
xv = [p1 − p0 + Rpp − p2 (R + 1)] , 0 ≤ xv ≤ xv,max
K
It is seen that the valve will open when the input pressure p1 and the pilot pressure pp
are sufficiently high in comparison to the preset pressure p0 and the outlet pressure p2 .
The influence of the pilot pressure increases when the area ration R increases. If p1 > p2
then there will be flow in the positive direction if the spool opens. If the pressures reverse
so that p2 > p1 , then the flow is lead through the relief which can be considered to have
a flow area Ac when it is open. The resulting flow is given by
q
Cd xv b 2 (p1 − p2 ) p1 > p2
q1 = qρ (4.60)
−Cd Ac 2 (p2 − p1 ) p1 < p2
ρ
Again the regularized orifice flow model (4.13) should be used in simulations.
The relation between the differential dρ in density and the differential dp in pressure is
given by
dρ dp
= (4.61)
ρ β
where β is the bulk modulus.
152 CHAPTER 4. HYDRAULIC MOTORS
We see that the bulk modulus β has the physical dimension of pressure. Usually a
numerical value of β = 7 × 108 Pa =7000 bar (which corresponds to 105 psi) is assumed
for the bulk modulus, although the value can change by a factor of 10.
The mass balance for a volume V is given by
d
(ρV ) = win − wout (4.62)
dt
Here win = ρqin is the mass flow and qin is the volumetric flow into the volume, while
wout = ρqout is the mass flow and qout is the volumetric flow out of the volume. The
density is assumed to be a function of time only. This leads to
q 1 ,p 1 TL
q 2 ,p 2
m
stationary
valving plate stationary cam plate
case drain line at fixed angle
q1 q2
c em p 1 c em p 2
T m
V 1 p1 V 2 p2
C im p 1 p 2
Figure 4.7: Rotational hydraulic motor of the single vane type with limited travel.
Rotational hydraulic motors are available in many designs, and are made with limited
travel and continuous travel (Merritt 1967). A limited travel motor (Figure 4.7) will have
a maximum rotational angle that will be slightly less than 180◦ or slightly less than 360◦ ,
while a motor with continuous travel (Figure 4.6) there is no limit on the rotational angle.
A hydraulic motor may also run as a pump. The dynamic model is the same for a motor
and pump operation.
In this section the dynamic model for a motor with limited travel will be derived. A
schematic diagram of the motor is shown in Figure 4.7. The resulting model is equal
to the model for motors of continuous travel. A motor with limited travel has one inlet
chamber and one outlet chamber. The inlet chamber has volume V1 and pressure p1 ,
and the flow into the chamber is q1 . The outlet chamber has volume V2 and pressure
p2 , and the flow out of the chamber is q2 . A motor torque is set up by the pressure
difference between the two chambers, and the motor torque drives the motor shaft. A
dynamic model for a rotational hydraulic motor can be derived from the mass balances
of chambers 1 and 2, and the equation of motion for the motor shaft. The mass balance
for the inlet and outlet chambers are
V1
V̇1 + ṗ1 = −Cim (p1 − p2 ) − Cem p1 + q1 (4.67)
β
V2
V̇2 + ṗ2 = −Cim (p2 − p1 ) − Cem p2 − q2 (4.68)
β
where Cim is the coefficient for the internal leakage and Cem is the coefficient for leakage
out of the motor. β is the bulk modulus, and V1 and V2 are the volumes of the two
chambers. The rate of change of the chamber volumes are proportional to the angular
velocity ω m of the motor:
V̇1 = −V̇2 = Dm ω m (4.69)
The constant Dm is called the displacement. The shaft angle is denoted θm .
The motor torque T is proportional to the pressure difference, and by equating the
154 CHAPTER 4. HYDRAULIC MOTORS
qL
xv
Valve pL Motor
m
J1 J2 Jn
Figure 4.8: Valve controlled motor with elastic modes in the load.
power of the motor torque with the power of the working fluid we find that
T ω m = p1 V̇1 + p2 V̇2 = (p1 − p2 ) Dm ω m (4.70)
It follows that the motor torque is
T = Dm (p1 − p2 ) (4.71)
The equation of motion for the motor shaft is therefore
Jt ω̇ m = −Bm ω m + Dm (p1 − p2 ) − TL (4.72)
where Jt is the moment of inertia of the motor, Bm is the viscous friction coefficient, and
TL is the load torque. To sum up:
The rotational hydraulic motor can be described with a two-port for each chamber,
and a three-port for the shaft dynamics. Chamber 1 has one port with effort p1 and flow
q1 , and one port with effort T1 = Dm p1 and flow ω m . Chamber 2 has one port with effort
p2 and flow q2 , and one port with effort T2 = Dm p2 and flow ω m . The shaft model has
one port with effort T1 and flow ω m , one port with effort −T2 and flow ω m , and one port
with effort TL and flow ω m . In terms of computation the systems can be interconnected
if the variables q1 and ω m are inputs to chamber 1, q2 and ω m are inputs to chamber 2,
and T = T1 − T2 and TL are inputs to the shaft dynamics.
where the input port has been connected to the motor shaft. The inputs to the two-port
are ω m and T1 , while TL and ω 1 are outputs. We may add on any number of additional
degrees of freedom as two-ports
Ji ω̇ i = Ti−1 − Ti (4.79)
Ti = Di (ω i−1 − ω i ) + Ki (θi−1 − θi ) (4.80)
with port variables Ti−1 and ω i−1 at the input and Ti and ω i at the output.
q1
V 1 ,p 1 V 2 ,p 2
A1 A2
q2
q1
V 1 ,p 1 V 2 ,p 2
A1
A1
q2
1. If the rod goes through both chambers as in Figure 4.9, then the cylinder is said
to be symmetric, and the areas A1 and A2 are equal and given by
A1 = A2 = Ap − Ar (4.81)
2. If the rod goes through chamber 2 but not chamber 1 as in Figure 4.10, then the
cylinder is said to have a single-rod piston and the areas are given by
A1 = Ap , A2 = Ap − Ar (4.82)
156 CHAPTER 4. HYDRAULIC MOTORS
The motor force acting on the piston will be F = A1 p1 − A2 p2 . The mass balance for
the inlet and outlet chambers and the equation of motion for the piston will then give
the model.
Here q1 is the flow into chamber 1, q2 is the flow out of chamber 2, Cim is the
coefficient for the internal leakage and Cem is the coefficient for leakage out of the motor,
mt is the mass of the piston and load, Bp is the viscous friction coefficient, FL is the load
force.
The model of a symmetric hydraulic motor with a matched and symmetric valve is given
by
Vt
ṗL = −Ctm pL − Dm ω m + qL (4.89)
4β
Jt ω̇ m = −Bm ω m + Dm pL − TL (4.90)
1 1V 2
V = Jt ω 2m + p (4.91)
2 2 4β L
We see that is the load dynamics is passive, then the system with input qL and output pL
is passive. However, this does not have much relevance for the controller design for this
system.
TL
xv 4 pL T -
1 m m
Kq Vt
Dm Jt
- - -
K ce Bm
Dm
A linearized dynamic model for a valve controlled motor is found by inserting the
linearized valve characteristic (4.34) into the model (4.89, 4.90). The result is
Vt
ṗL = −Kce pL − Dm ω m + Kq xv (4.93)
4β
Jt ω̇ m = −Bm ω m + Dm pL − TL (4.94)
θ̇m = ωm (4.95)
where Kce = Kc + Ctm is the leakage coefficient for motor and valve, Bm is the viscous
friction coefficient, while θm is the angle of rotation of the motor shaft. A block diagram
is shown in Figure 4.11. Note the similarity to Figure 3.7.
158 CHAPTER 4. HYDRAULIC MOTORS
Under the assumption that Bm = 0 the standard formulation of this expression is ob-
tained:
The Laplace transformed model of a symmetric hydraulic motor with matched and sym-
metric valve and Bm = 0 is given by
³ ´
Kq Kce s
Dm xv (s) − 2
Dm 1 + ω t TL (s)
θm (s) = ³ ´ (4.100)
2
s 1 + 2ζ h ωsh + ωs 2
h
where ω h the hydraulic undamped natural frequency, ζ h is the the relative damping, and
ω t is the break frequency of the pressure dynamics defined by
2
r
2 4βDm Kce βJt 4βKce
ωh = , ζh = , ωt = (4.101)
Vt Jt Dm Vt Vt
We note that
4βKce
2ζ h ω h =
= ωt (4.102)
Vt
The transfer function from the spool position xv to the shaft angle θm is given by
Kq
θm Dm
Hm (s) = (s) = ³ ´ (4.103)
xv s 1 + 2ζ h ωsh + s2
ω 2h
The magnitude of the frequency response Hm (jω) is shown in Figure 4.12 with the
parameters Kq /Dm = 40, ω h = 400 rad/s and ζ h = 0.1.
The transfer function Hm (s) has a pole in s = 0, which corresponds to the integrator
from angular velocity to the valve angle. This means that for low frequencies where
s s2
(1 + 2ζ h + 2)≈1 (4.104)
ωh ωh
4.4. MODELS FOR TRANSFER FUNCTION ANALYSIS 159
2
10
1
10
|H (jω)|
m
0 dB
0
10
amplitude
-1
10
-2
10
-3
10
0 1 2 3
10 10 10 10
ω (rad/s)
Figure 4.12: Magnitude of the frequency response from the valve spool position xv to
the motor angle θ. Numerical values are Kq /Dm = 40, ω h = 400 rad/s and ζ h = 0.1.
The dashed line is drawn at -6 dB.
the motor velocity ω m will be proportional to the spool position xv . The gain Kq /Dm of
the transfer function is the flow gain Kq divided by the displacement Dm . The displace-
ment is given by the geometry of the motor, and will be available with high accuracy.
Thus, variations in the
√ gain will only depend on the flow gain Kq . The flow gain will
√
vary with the factor ps − pL / ps , and under the usual design rule |pL | < 23 ps the flow
gain will be between 57.7 % and 129 % of the nominal value.
The hydraulic undamped natural frequency ω h is an important parameter in the
design of electrohydraulic servomechanisms. The undamped natural frequency is given
by β, Dm and Jt . The parameters Jt and Dm can be found with high accuracy, while
the bulk modulus β may vary. However, the numerical value β = 7.0 · 108 Pa (= 105 psi)
(Merritt 1967) will in many cases be reasonably accurate when the working fluid is
hydraulic oil. It turns out that the leakage coefficient Kce will be dominated by the
valve.
The transfer function to the load torque TL to the shaft angle θm is
³ ´
θm −K ce
2
Dm 1 + ωst
(s) = ³ ´ (4.105)
TL 2
s 1 + 2ζ h ωsh + ωs 2
h
xv = Kp (θd − θm ) (4.106)
160 CHAPTER 4. HYDRAULIC MOTORS
Kv
L(s) = Kp Hm (s) = ³ ´ (4.107)
s2
s 1 + 2ζ h ωsh + ω 2h
where
Kp Kq
Kv = (4.108)
Dm
is the velocity constant of the closed loop system. The loop transfer function L(s) has
a pole in s = 0 and two complex conjugated poles as the numerical value of the relative
damping is typically in the range 0.1 < ζ h < 0.5.
An important parameter in the control design is the gain of the loop transfer function
at ω 180 , which is the frequency where the frequency response L (jω h ) has a phase of 180◦ .
A closer inspection of the loop transfer function L(s) reveals that ω 180 = ω h , and that
Kv
|L (jω h )| = , ∠L (jω h ) = −180◦ (4.109)
2ζ h ω h
Kv
|L (jω 180 )| = (4.110)
2ζ h ω h
Thus, a gain margin of ∆K = 6 dB, which occurs for |L (jω 180 )| = 1/2, is achieved with
Dm
Kv = ζ h ω h ⇒ Kp = ζ ωh (4.111)
Kq h
For the numerical values in Figure 4.12 a gain margin of 6 dB will be obtained with
Kv = ζ h ω h = 40, which corresponds to a gain of Kp = Kv Dm /Kq = 1, and it follows
that in Figure 4.12 we have L(jω) = Hm (jω) if Kp = 1. The dashed line in the figure,
which is drawn at -6 dB, will therefore indicate |L (jω 180 ) | = Kv /(2ζ h ω h ) = 0.5.
Then, from Nyquist stability theory it may be concluded that:
A rotation motor with matched and symmetric valve that is controlled with a proportional
controller xv = Kp (θd − θm ) will be stable if the velocity constant satisfies
Kp Kq Dm
Kv = ≤ 2ζ h ω h ⇒ Kp ≤ 2 ζ ωh (4.112)
Dm Kq h
Example 60 Suppose that the leakage coefficient Kce is determined by the valve, which is
the typical situation as the leakage in motors are usually negligible. Then if two different
motors are used with the same valve and the same fluid, the constants Kq , Kce and β
will be unchanged. It follows that the stability limit will be proportional to Vt−1 .
4.4. MODELS FOR TRANSFER FUNCTION ANALYSIS 161
Example 61 If a nonzero Bm is used, the undamped natural frequency and the relative
damping are given by µ ¶
2
2 4βDm Bm Kce
ωh = 1+ 2
Vt Jt Dm
and à r s !µ ¶− 12
Kce βJt Bm Vt Bm Kce
ζh = + 1+ 2
Dm Vt 4Dm βJt Dm
We note that in this case
µ ¶ 2
Kce Jt Bm Vt 4βDm 4βKce Bm
2ζ h ω h = 2
+ 2
= + (4.114)
Dm 4βDm Vt Jt Vt Jt
The Laplace transform of a symmetric cylinder with matched and symmetric valve is
³ ´
Kq Kce s
Ap xv (s) − 2
Ap 1 + ω t FL (s)
xp (s) = ³ ´ (4.117)
2
s 1 + 2ζ h ωsh + ωs 2
h
where r
4βA2p Kce βmt 4βKce
ω 2h = , ζh = , ωt = (4.118)
Vt mt Ap Vt Vt
if it is assumed that Bp = 0.
Example 62 With a proportional controller xv = Kp (xd − xp ), the stability limit for the
gain Kp is found in the same way as for the rotation motor with matched and symmetric
valve. Moreover, to have a gain margin of 6 dB the gain should be selected as
Ap
Kp = ζ ωh (4.119)
Kq h
Example 63 A hydraulic cylinder is to be selected so that it can generate a force F0
for a given supply pressure ps , and so that the position xp of the piston can be changed
between zero and x̄p . The cross sectional area of the cylinder must then be Ap = F0 /ps ,
and the volume is found from Vt = Ap x̄p = F0 x̄p /ps . Note that the required volume can
be found if the force F0 , the stroke x̄p and the supply pressure ps is given. Suppose that
a similar installation with the same valve has volume Vs and bandwidth ω s as defined by
the crossover frequency. Then the bandwidth of the system with volume Vt will be
Vs
ωc = ωs (4.120)
Vt
162 CHAPTER 4. HYDRAULIC MOTORS
where r
2
βDm Ct βJt βCt
ω 2h = , ζh = , ω0 = (4.122)
V0 Jt 2Dm V0 V0
It is seen that the dynamic model of a pump controlled hydraulic motor has the same
structure as a valve controlled motor. The main differences are:
• The volume V0 includes the high pressure pipe and the high pressure chamber of
the motor and pump. Only the high pressure side is considered to be driving the
motor, and because of this the volume term in ω 2h is V0 for the pump controlled
system instead of the 4Vt term which appears for the valve controlled motor.
• The gain kp ω p /Dm does not vary and can be found with high accuracy.
• The relative damping of the system may be very small compared to a valve con-
trolled motor where the main leakage is in the valve. Additional leakage may be
introduced in the system to make it less oscillatory. This will give loss of power,
but it may be necessary to achieve satisfactory performance.
The usual controller for this system is a proportional feedback from the motor shaft
angle θm :
up = Kp (θd − θm ) (4.123)
The loop transfer function L (s) is seen to be
Kv
L (s) = ³ ´ (4.124)
s2
s 1 + 2ζ h ωsh + ω2h
where Kv = Kp kp ω p /Dm is the velocity constant. The system is seen to be stable if and
only if
Kv ≤ 2ζ h ω h (4.125)
where 2ζ h ω h = ω 0 . Typically, a gain margin equal to 2 will be used, in which case the
velocity constant is set to
Dm
Kv = ζ h ω h ⇒ Kp = ζ ωh (4.126)
kp ω p h
Pressure
dynamics TL
Valve
xv Kq
flow D 2m 1 T - m m
G 1
Dm K ce 1 s J ts s
-
Displacement flow
Figure 4.13: Block diagram for valve controlled motor with elastic modes in the load.
Then the transfer function from the motor torque T to the motor angle θm is given by
(3.85) to be
Js2 θm (s) = G (s) T (s) (4.127)
where ³ ´2
1 + 2ζ a ωsa + s
ωa
G (s) = ³ ´2 , ωa < ω1 (4.128)
1+ 2ζ 1 ωs1 + s
ω1
The pressure dynamics will still be given by (4.96), while the equation of motion is found
from (4.127) and T = Dm pL . This gives
µ ¶
Vt
Kce 1 + s pL = (−Dm sθm + Kq xv ) (4.129)
4βKce
Jt s2 θm = G (s) Dm pL (4.130)
This is more or less the same equation as (4.98) except for the appearance of G(s), and
the transfer function is found to be
K
θm G (s) Dmq
He (s) = (s) = ³ ´ (4.132)
xv s G (s) + 2ζ h ωsh + s2
ω 2h
which reduces to the transfer function Hm (s) given by (4.103) for the rigid case if G(s) =
1. The block diagram is given in Figure 4.13.
3. If ω h ¿ ω a , then
K
G (s) Dmq
He (s) ≈ ³ ´ (4.134)
s2
s 1 + 2ζ h ωsh + ω 2h
K2
K1
m Fs
x D2 x0
Figure 4.14: Mechanical analog of hydraulic motor with proportional position controller.
which clearly shows that this corresponds to a PD controller with limited derivative
action, and where the constants are given by.
K1 K2 K2 K1 + K2
Kp = , ω1 = , ω2 = (4.136)
K1 + K2 D2 D2
Suppose that a mass m with position x and friction coefficient B is actuated by the force
F1 from the mechanical interconnection, and that the mass is subject to the load force
FL . Then the equation of motion will be
³ ´
1 + ωs1
(ms2 + Bs)x(s) = Kp ³ ´ [x0 (s) − x (s)] − FL (4.137)
1 + ωs2
where
4βKce
ωt = (4.138)
Vt
4.5. HYDRAULIC TRANSMISSION LINES 165
¡ 2 ¢ 2 1+ s 2
Dm Kv Dm 1
Jt s + Bm s θm = −Kv s θ m + Kv θ0 − TL (4.139)
Kce 1 + ωt Kce 1 + ωst
and we find that the dynamics are the same as for the mechanical analog if the constants
satisfy
D2 K1 K2 K2 K1 + K2
Kv m = , Kv = , ωt = (4.141)
Kce K1 + K2 D2 D2
We may solve for the parameters of the mechanical analog, which are found to be
2 2 2
4βDm Kv 4βDm 1 4βDm
K1 = , K2 = , D2 = (4.142)
Vt ω t − Kv Vt ω t − Kv Vt
Note that the mechanical analog is passive if and only if Kv ≤ ω t , which is also the
condition for stability of the closed loop system. It is interesting to see that in the
unstable case when Kv > ω t , then the mechanical analog is no longer passive as K2
and D2 become negative for Kv > ω t . This means that the closed loop system has a
passive mechanical analog if and only if the closed loop system is stable. This result also
applies to pump-controlled motors, which have the same transfer transfer functions as
valve controlled motors with minor adjustments in the parameters.
V
ṗ + V̇ = qin − qout (4.143)
β
In the derivation of this equation it was assumed that the pressure would be the same
over the volume, which means that the pressure p = p(t) is a function of time only.
Pressure changes will propagate with the speed of sound, which is about c = 1000 m/s
for hydraulic oil. If the volume is reasonably small so that the pressure only propagates
less than one meter, then pressure differences in the volume will disappear after 1 ms. It
is then normally justified to assume that the pressure is the same over the volume.
However, there are systems where the spatial variations of the pressure must be taken
into account by describing the pressure as a function of position and time. If the volume
V is a pipe of length L, then the time for a pressure change to propagate through the
pipe will be T = L/c. Long pipes are used in large hydraulic installations where pipes
166 CHAPTER 4. HYDRAULIC MOTORS
A
q q dq
, p
x x dx
of length up to 10 m are not uncommon. Moreover, in offshore oil and gas production
pipes of several hundred meters may be used. A propagation time of T = 10 ms will
result if L = 10 m. This introduces a time delay that may be significant if bandwidths
up to 100 rad/s (16 Hz) are required. The propagation time will increase to T = 0.5 s
for a pipe with length L = 500 m. In addition to problems associated with time delays,
a severe problem with long hydraulic pipes is that pressure pulses may be reflected at
the end of the pipe. This may cause strong pressure fluctuations in the system that will
limit bandwidth, and that will increase the risk of mechanical damage to the system.
On background of this there is a need to describe the pressure and flow dynamics of
long hydraulic pipes. It will be shown that the dynamics of such systems are described
by partial differential equations in the form of the wave equation, and that this is a
special case of the theory of transmission lines. The relevant models, analysis tools and
simulation algorithms will be presented in the following. Basic references are (Goodson
and Leonard 1972), (Stecki and Davis 1986a) and (Stecki and Davis 1986b).
The model for a hydraulic transmission line can be written as the partial differential
equations
∂p(x, t) ∂q(x, t)
= −cZ0 (4.144)
∂t ∂x
∂q(x, t) c ∂p(x, t) F [q(x, t)]
= − − (4.145)
∂t Z0 ∂x ρ0
4.5. HYDRAULIC TRANSMISSION LINES 167
where the sonic velocity c and the line impedance Z0 are defined by
s p
β ρ0 c ρ0 β
c= , Z0 = = (4.146)
ρ0 A A
To complete the model the friction model F = F [q(x, s)] must be specified so that
the wave propagation operator Γ(s) can be found from (4.149). This will be done in the
following with three different friction models.
Example 64 The equations of the transmission line model (4.150) and (4.151) can be
combined so the Laplace transformed model can be written as a wave equation in pressure
or flow as given by the two equations
∂ 2 p(x, s)
L2 − Γ2 p(x, s) = 0 (4.152)
∂x2
∂ 2 q(x, s)
L2 − Γ2 q(x, s) = 0 (4.153)
∂x2
Example 65 The series impedance X(s) and the parallel admittance Y (s) are given by
Z0 Γ(s)2 Ts
X(s) = , Y (s) = (4.154)
LT s L(s)Z0
168 CHAPTER 4. HYDRAULIC MOTORS
In the lossless case the propagation operator Γ(s) and the characteristic impedance Zc (s)
are given by
Γ(s) = T s, Zc (s) = Z0 (4.158)
F = ρ0 Bq (4.159)
∂q(x, s) s
= − p(x, s) (4.161)
∂x cZ0
∂p(x, s) Z0
= − (s + B) q(x, s) (4.162)
∂x c
Then the propagation operator can be found according to (4.150) to be given by
Γ2 = T 2 s(s + B) (4.163)
With linear friction the propagation operator and the characteristic impedance are
r r
s+B s+B
Γ = Ts , Zc = Z0 (4.164)
s s
4.5. HYDRAULIC TRANSMISSION LINES 169
In this the case the wave equation from the lossless case is modified to
∂2p ∂p 2
2 ∂ p(x, s)
+ B − c =0 (4.165)
∂t2 ∂t ∂x2
or, using the Laplace transform,
∂ 2 p(x, s)
L2 = T 2 s (s + B) p(x, s) (4.166)
∂x2
By taking the eigenvectors of the matrix A it is found that the system can be made
diagonal a change of variables.
Here
Γ
Zc = Z0 (4.175)
Ts
is the characteristic impedance of the transmission line. From 4.172) the model for the
wave variables is found to be
∂a(x, s) Γ
= − a(x, s) (4.176)
∂x L
∂b(x, s) Γ
= b(x, s) (4.177)
∂x L
The solutions for the wave variables are given by
³ x´
a(x, s) = exp −Γ a(0, s) (4.178)
µ L ¶
L−x
b(x, s) = exp −Γ b(L, s) (4.179)
L
It is seen that a describes a wave moving in the positive x direction, and b describes a
wave moving in the negative x direction.
Suppose that the transmission line is terminated with an impedance ZL (s) so that
where
ZL (s) − Zc
GL (s) = (4.188)
ZL (s) + Zc
The transfer function from a(0, s) to b(0, s) is then found to be
b(0, s)
= exp (−2Γ) GL (s) (4.189)
a(0, s)
4.5. HYDRAULIC TRANSMISSION LINES 171
p(L, s)
= exp (−T s) (4.200)
p(0, s)
and
p(0, s)
= Zc (4.201)
q(0, s)
where the transfer functions or impedance functions are found from (4.206—4.208) to be
given by
µ ¶
Z0 Γ(s) cosh Γ(s) + 1
Zs (s) = (4.211)
Ts sinh Γ(s)
µ ¶
Z0 Γ(s) cosh Γ(s) − 1
Za (s) = (4.212)
Ts sinh Γ(s)
The transfer functions Zs (s) and Za (s) both have singularities for
sinh Γ = 0 ⇔ e2Γ = 1 ⇔ Γ = jω sk (4.213)
where the natural frequencies are
ω sk = kπ, k = 0, ±1, ±2, . . . (4.214)
Note that there are infinitely many singularities with an even spacing of π along the
imaginary axis.
The following partial fraction expansions of the impedance functions can be used to arrive
at the rational series with infinitely many terms:
∞
X ∞
X
2Z0 4Z0 Γ2 4Z0 Γ2
Zs (s) = + , Za (s) = (4.215)
Ts T s (Γ2 + ω 2sk ) T s (Γ2 + ω 2sk )
k=2,4,... k=1,3,...
where ω sk = kπ
174 CHAPTER 4. HYDRAULIC MOTORS
Using partial fraction expansion in the same way as for the impedance model we find the
following rational representation of the infinite-dimensional admittances:
∞
X ∞
X
4T s 2T s 4T s
Ys (s) = , Ya (s) = + (4.226)
Z0 (Γ2 + ω 2sk ) Z0 Γ2 Z0 (Γ2 + ω 2sk )
k=1,3,... k=2,4,...
4.5. HYDRAULIC TRANSMISSION LINES 175
This is used in combination with the transmission line model (4.157) which is
d2 p(s)
Γ2 p(s) − L2 =0 (4.228)
dx2
The boundary conditions are supposed to be
∂p(0, s) Z0 Γ(s)2 ∂p(L, s) Z0 Γ(s)2
=− q(0, s), =− q(L, s) (4.229)
∂x LT s ∂x LT s
where q(0, s) and q(L, s) are inputs to the model.
The pressure shape functions in the lossless case with zero flow at the end-points are
µ ¶
kπ
φk (x) = cos x (4.230)
L
which is a well-established result for the wave equation. These shape functions are
orthogonal in the sense that
Z L Z L µ ¶ µ ¶
kπ jπ L
φk (x)φj (x)dx = cos x cos x dx = δ kj (4.231)
0 0 L L 2
Moreover, the derivatives of the shape functions are orthogonal and satisfies
Z L Z L µ ¶ µ ¶ 2
0 0 kπ jπ (kπ)
φk (x)φj (x)dx = sin x sin x dx = δ kj (4.232)
0 0 L L 2
These shape functions will be used as assumed modes in a Ritz approximation as in
(Mäkinen et al. 2000) to derive a rational model with Galerkin’s method. This is done
by multiplying the shape function φk (x) with the model (4.228) using p = p̄, and then
integrating over the length of the transmission line. This gives
Z L µ ¶
d2 p̄(s, x)
I := φk (x) Γp̄(s, x) − L2 dx = 0 (4.233)
0 dx2
As usual in the Galerkin approach the expression for the integral is developed using
partial integration:
Z L µ ¶
dφ (x) dp̄(s, x)
I = φk Γ2 φk (x)p̄(s, x) + L2 k dx
0 dx dx
¯L
¯
2 ∂ p̄(s, x) ¯
+ φk (x)L
∂x ¯0
Z Lµ ¶
dφ (x) dp̄(s, x)
= Γ2 φk (x)p̄(s, x) + L2 k dx
0 dx dx
z0 Γ2 L
+ [φk (L)q(L) − φk (0)q(0)] (4.234)
Ts
176 CHAPTER 4. HYDRAULIC MOTORS
Using the orthogonality of φk (x) and φ0k (x) as stated in (4.231) and (4.232) we find that
L³ 2 ´ z Γ2 L £
0 ¤
Pk (s) Γ + (kπ)2 − (−1)k q(L) + q(0) = 0 (4.235)
2 Ts
which means that the pressure coefficients are given by
2z Γ2 £ ¤
Pk (s) = ³ 0 ´ q(0) + (−1)k q(L) (4.236)
2
T s Γ2 + (kπ)
This result is the same as the result (4.215) that was obtained by series expansion of the
transfer functions.
d2 q(s)
Γ2 q(s) − L2 =0 (4.241)
dx2
with boundary conditions
∂q(0, s) s ∂q(L, s) s
=− p(0, s), =− p(L, s) (4.242)
∂x cZ0 ∂x cZ0
where p(0, s) and p(L, s) are inputs to the model. The shape functions are taken to be
the orthogonal eigenfunctions of the lossless wave equation when the pressures are zero
at both ends. This gives µ ¶
kπ
φk (x) = cos x (4.243)
L
The Galerkin approach gives
Z L µ ¶
d2 q̄(x)
I := φk (x) Γ2 q̄(x) − L2 dx = 0 (4.244)
0 dx2
4.5. HYDRAULIC TRANSMISSION LINES 177
and
Z Lµ ¶
dφ (x) dq̄(x)
I = φk Γ2 φk (x)q̄(s) + L2 k dx
0 dx dx
¯L
2 ∂q(x) ¯
¯
+ φk (x)L
∂x ¯0
Z Lµ ¶
dφ (x) dq̄(x)
= Γ2 φk (x)q̄(x) + L2 k dx
0 dx dx
LT s
+ [φk (L)p(L) − φk (0)p(0)] (4.245)
z0
and due to the orthogonality of φk (x) and φ0k (x), it follows that
L³ 2 2
´ LT s £ ¤
Qk (s) Γ + (kπ) = p(0) + (−1)k p(L) (4.246)
2 z0
so that
2T s £ ¤
Qk (s) = ³ ´ p(0) + (−1)k p(L) (4.247)
2
z0 Γ2 + (kπ)
The admittance functions of the symmetric and asymmetric variables
qs (s) = Ys (s)ps (s) (4.248)
qa (s) = Ya (s)pa (s) (4.249)
are found to be
∞
X ∞
X
4T s 2T s 4T s
Ys (s) = ³ ´ , Ya (s) = 2
+ ³ ´ (4.250)
2 2 Z0 Γ 2 2
k=1,3,... Z0 Γ + (kπ) k=2,4,... Z0 Γ + (kπ)
which is the same result as the result (4.226) that was found from the transfer functions.
are the orthogonal eigenfunctions of the lossless wave equation when the pressure at the
input is zero and the flow at the output is zero. The Galerkin method gives
Z L µ ¶
d2 p̄(s, x)
I := φk (x) Γp̄(s, x) − L2 dx = 0 (4.255)
0 dx2
and
Z Lµ ¶
dφ (x) dp̄(s, x)
I = φk Γ2 φk (x)p̄(s, x) + L2 k dx
0 dx dx
¯L
¯
2 ∂ p̄(s, x) ¯
+ φk (x)L
∂x ¯0
Z Lµ ¶
dφ (x) dp̄(s, x)
= Γ2 φk (x)p̄(s, x) + L2 k dx
0 dx dx
Z0 Γ2 L h i
+ (−1)k q(L) (4.256)
Ts
and orthogonality of the shape functions gives
à ·µ ¶ ¸2 !
L 2 1 Γ2 L Z0 Γ2 L £ ¤
Pk (s) Γ + k− π +¡ 1
¢ p 1 − (−1)k q(L) = 0 (4.257)
2 2 k− 2 π Ts
and the pressure coefficients are found to be
à !
2Γ2 1 k Z0
Pk (s) = − £¡ ¢ ¤2 ¡ ¢ p1 + (−1) q2 (4.258)
Γ2 + k − 12 π k − 12 π Ts
of the rational transfer functions where N terms are included. It is assumed that N
is an even number. To find a state-space formulation for this model it is necessary to
investigate the terms of Zs (s) and Za (s) closer. In the lossless case Γ = T s and
4Z0 Γ2 4Z0 T s
= 2 2 (4.264)
T s (Γ2 + ω 2sk ) T s + ω 2sk
4.5. HYDRAULIC TRANSMISSION LINES 179
4Z0 Γ2 4Z0 T (s + B)
= 2 2 (4.265)
T s (Γ2 + ω 2sk ) T s + BT 2 s + ω 2sk
(T s)2
Γ2 = ¡ ¢−1/2 (4.266)
1 − 1 + 2 TBs
In (Piché and Ellman 1996) this approximation is used to get a rational approximation
which is accurate at the natural frequencies. This is done with
4Z0 Γ2 4T (s + B)
2 2 = 2 (4.267)
T s (Γ + ω sk ) (T s) + Bk T 2 s + ω 2k
where
1p B Bk
Bk = ω sk B + , ω k = ω sk − (4.268)
2 8 2
Then the transfer function from qs (s) to ps (s) can be expressed as a parallel intercon-
nection of an integrator and N/2 second order systems that can be given a state-space
realization. In the same way the transfer function from qa (s) to pa (s) will be a parallel
interconnection of N/2 second order systems.
Solutions computed from such a truncated model will give spurious and non-physical
oscillations in the face of discontinuities like a step change in an input. This is known
as the Gibb’s phenomenon, and resembles problems that appear with data windows in
digital signal processing. A solution to the problem (Piché and Ellman 1996) is to use a
data window to modify the truncated transfer function to
N
X N
X −1
2Z0 4Z0 Γ2 σ k 4Z0 Γ2 σ k
Zs = + , Za = (4.269)
Ts T s (Γ2 + ω 2sk ) T s (Γ2 + ω 2sk )
k=2,4,... k=1,3,...
where
sin β k ω sk
σk = , βk = (4.270)
βk N +1
are the coefficients of a Riemann window. It is also possible to use a Hann window with
σ k = (1 − cos β k )/2 or a Hamming window with σ k = 0.54 + 0.46 cos β k . Moreover, a
steady-state correction is necessary to achieve correct steady-state pressure reduction,
which is
p2 = p1 − εZ0 q (4.271)
where it is assumed that q1 = q2 = q. To obtain this steady-state result with a truncated
approximation it is sufficient to insert bN B for B in Za where
−1
N
X −1
σk
bN = 8 (4.272)
ω 2k
k=1,3,...
180 CHAPTER 4. HYDRAULIC MOTORS
Γ2 Zs (s)/Z0 Za (s)/Z0
P PN −1
(T s)2 2
Ts + Nk=2,4,...
4σ k T s
(T s)2 +(kπ)2
4σ k T s
k=1,3,... (T s)2 +(kπ)2
2
PN 4σ k T (s+B) PN−1 4σ k T (s+bN B)
T 2 s (s + B) Ts + k=2,4,... (T s)2 +BT 2 s+(kπ)2 k=1,3,... (T s)2 +BT 2 s+(kπ)2
2 1 2
PN 4σ k T (s+B) PN−1 4σ k T (s+bN B)
(T s) √ Ts + k=2,4,... (T s)2 +Bk T 2 s+ω 2k k=1,3,... (T s)2 +Bk T 2 s+ω2k
N (r s
ν )
Table 4.1: Rational approximations of infinite dimensional transfer function with three
different friction models.
The rational truncated models are summarized in the following Table 4.1. SIMULINK
models are available on the web (Mäkinen et al. 2000).
The constants of the models are given by
L 8ν 0 1√ B Bk
T = , B = 2 , Bk = kπB + , ω 2k = kπ − (4.273)
c r0 2 8 2
−1
N
X −1
sin β k ω sk σk
σk = , βk = , bN = 8 (4.274)
βk N +1 ω 2k
k=1,3,...
1. The velocity of the fluid in the volume is sufficiently small to assume that the
pressure p is the same over the volume.
2. The compressibility effects in the pipe are negligible, so that the volumetric flow q
is the same along the pipe.
This means that the Helmholtz resonator is modeled by a pipe with incompressible
fluid flow that is connected to a volume with compressibility effects. The mass balance
of the volume is
V
ṗ = q (4.275)
β
while the momentum balance of the pipe is
where the inlet pressure of the pipe has been set to zero. By differentiating the mass
balance (4.275) with respect to time and inserting the momentum equation (4.276) the
harmonic oscillator
p̈ + ω 2H p = 0 (4.277)
is obtained, where
Aβ Ac20
ω 2H = = (4.278)
V hρ0 Vh
is the Helmholtz frequency. Here c20 = β/ρ0 is the sonic speed corresponding to the
constant density ρ0 .
Ah
ṗi = qi−1 − qi (4.279)
β
for a volume Vh = hA with pressure pi . Here qi−1 is the volumetric flow into the volume,
qi is the volumetric flow out of the volume, and β = c20 ρ0 is the bulk modulus. In
addition, the model includes a momentum balance
for an incompressible fluid with density ρ0 in a pipe of length h with volumetric flow
qi−1 . Here F is the friction force per unit length. This gives the following model for
Helmholtz resonator i:
182 CHAPTER 4. HYDRAULIC MOTORS
Note that when h tends to zero, then the model will converge to the transmission line
model
∂p c2 ρ0 ∂q
= − (4.283)
∂t A ∂x
∂q A ∂p F
= − − (4.284)
∂t ρ0 ∂x ρ0
which equivalent to the transmission line model (4.144, 4.145). This means that the
lumped parameter model converges to the partial differential equation model when h
tends to zero.
The model (4.281, 4.282) describes a two-port with input variables qi and pi−1 and
output variables qi−1 and pi . This means that this is a model in hybrid form. We
denote the port variables of the transmission line at x = 0 as pin and qin , while the port
variables at the line end are x = L are pout and qout .Depending on which of the port
variables that are selected for inputs and outputs the model will be in admittance form,
impedance form, or hybrid form. Equations for these three cases will be presented in the
next sections.
q0 q1 q2 q3
V1 V2 V3
p1 p2 p3
h h h h
q0 q1 q2 q3
V1 V2 V3
p1 p2 p3
0 h 2h 3h 4h
Figure 4.17: Spatial discretization of a transmission line with pressure inputs at both
sides to get a description in the form of a chain of Helmholtz resonators.
Ac2 c
ω 2H = ⇒ ωH = (4.295)
Vh h h
Through the discretization we have introduced Helmholtz resonator i with oscillatory
poles at s = ±jω H .
Example 67 Consider a transmission line with both ends closed. This means that the
inlet and outlet flow are given as inputs, so that an impedance model should be used.
With two volumes, that is, with L = 2h, the dynamics of the model are given by
c2 ρ0
ṗ1 = − q (4.296)
Ah
c2 ρ0
ṗ2 = q (4.297)
Ah
A
q̇ = (p1 − p2 ) (4.298)
ρ0 h
Laplace transformation of the model, and insertion of the pressure equations in the mass
flow equation leads to µ ¶
c2
s2 + 2 2 q(s) = 0 (4.299)
h
This system has undamped natural frequency
√ c √ c c
ω0 = 2 = 2 2 = 2.82 (4.300)
h L L
while the exact value for the first resonance of the partial differential equation model is
found from the period T1 = 2L/c, which gives
2π c c
ω1 = = π = 3.14 (4.301)
T1 L L
This means that the resonance frequency of this simplified model is about 11% lower than
the exact resonance frequency.
4.7. OBJECT ORIENTED SIMULATION MODELS 185
Example 68 For N = 3 volumes we have L = 3h, and the state space model of the
impedance model is
The resonance is at
3c c
ω1 = = 1.5 (4.308)
2L L
while the exact value for the first resonance is
πc c
ω= = 1.57 (4.309)
2L L
p m
p1
Electric m
motor
p p2 m
Figure 4.18: Pump controlled hydraulic motor with variable displacement in the pump
and the motor. The arrangement is known as a hydrostatic gear.
rotation of the rotor can then be controlled with the displacement of the pump which is
varied by the stroke angle φp of the pump. The stroke of the pump is controlled with a
small servomechanism, which may use a valve controlled hydraulic motor or an electrical
actuator.
The dynamic model of the pump is given by (4.73—4.75). This is also the case for the
hydraulic motor. In this type of system the high pressure side with pressure p1 will be
driving the motor, while the pressure p2 of the return pipe from the motor to the pump
will be zero. Therefore, only the mass balances of the high pressure side are included in
the model. Then the model for the pump is
V1p
ṗ1p = Dp ω p − Cip p1p − Cep p1p − q1p (4.310)
β
Jp ω̇ p = −Bp ω p − Dp p1p + Tem (4.311)
where Dp is the pump displacement, ω p is the angular velocity of the pump, Vip is the
volume of chamber 1 of the pump, Cip and Cep are leakage coefficients, Jp is the inertia of
the pump, Tem is the torque from the electrical motor, and Bm is the friction coefficient
of the pump. The model for the hydraulic motor is
V1m
ṗ1m = −Dm ω m − Cim p1m − Cem p1m + q1m (4.312)
β
Jm ω̇ m = −Bm ω m + Dm p1m − TL (4.313)
where Vim is the volume of chamber 1 of the motor, Cim and Cem are leakage coefficients,
and Bm is the friction coefficient of the motor. The displacement of the pump and motor
are assumed to be given by
Dp = kp φp (4.314)
Dm = km φm (4.315)
where φp is the stroke angle of pump, φm is the stroke angle of motor, and kp and km
are displacement coefficients.
In contrast to the model of the valve controlled motor it is not possible to connect
the outputs of the pump model to the inputs of the hydraulic motor and vice versa. The
reason for this is the model are interconnected by imposing the conditions q1 = q1p = q1m
and p1 = p1p = p1m . However, q1 will then be input to both models, and p1 will be output
from both models. The solution to this problem is to combine the two mass balances
4.7. OBJECT ORIENTED SIMULATION MODELS 187
whereV1 = V1p + V1m , Cit = Cip + Cim and C1 = Cit + Cep + Cem .
Example 70 Suppose that the motor displacement Dm and the pump speed ω p are con-
stants, and that the pump displacement is Dp = kp φp where the stroke angle φp of the
pump is the control input. Then the model is
V1
ṗ1 = −Dm ω m − C1 p1 + kp ω p φp (4.319)
β
Jm ω̇ m = −Bm ω m + Dm p1 − TL (4.320)
Example 71 If the pump and the hydraulic motor are connected with a transmission
line on the high pressure side, then there will be independent mass balances for the pump
and the motor. The high pressure port of the pump would then have pressure pp and flow
qp and the high pressure port of the motor would have pressure pm and flow qm . The
models of the pump and the motor would be
V1p
ṗ1p = Dp ω p − Cip p1p − Cep p1p − q1p (4.321)
β
Jp ω̇ p = −Bp ω p − Dp p1p + Tem (4.322)
and
V1m
ṗ1m = −Dm ω m − Cim p1m − Cem p1m + q1m (4.323)
β
Jm ω̇ m = −Bm ω m + Dm p1m − TL (4.324)
These model have flows as inputs and pressures as outputs. The transmission line model
of the high pressure line would be an admittance model
µ ¶ µ cosh Γ 1
¶µ ¶
q1p (s) 1 sinh Γ − sinh Γ p1p (s)
= 1 (4.325)
q1m (s) Zc sinh Γ − cosh Γ
sinh Γ
p1m (s)
with the pressures p1p and p1m as inputs and the flows q1p and q1m as outputs. The
admittance model is irrational due to the transcendental functions cosh Γ and sinh Γ.
Rational approximation of this irrational model must be used to develop a simulation
model.
Example 72 A load with inertia J1 and angular velocity ω 1 with elastic transmission
can be connected to the motor by formulating the load with a port with the motor speed
ω m as the input variable, and the load torque TL as the output variable. This is done by
the load model
J1 ω̇ 1 = TL − T1 (4.326)
θ̇1 = ω1 (4.327)
TL = D1 (ω m − ω 1 ) + K1 (θm − θ1 ) (4.328)
188 CHAPTER 4. HYDRAULIC MOTORS
Ji ω̇ i = Ti−1 − Ti (4.329)
θ̇i = ωi (4.330)
Ti = Di (ω i−1 − ω i ) + Ki (θi−1 − θi ) (4.331)
with port variables Ti−1 and ω i−1 at the input and Ti and ω i at the output.
Example 73 Consider the connection of a load with inertia J1 with a stiff connection
to the motor so that the load has the same shaft speed as the motor. Then there would
not be an extra state because of the load, and the load is included in the model by adding
the load inertia to the motor inertia in the equation of motion for the motor shaft, which
gives
(Jm + J1 ) ω̇ m = −Bm ω m + Dm pm − TL (4.332)
and
qA = qa − qc , qB = qd − qb (4.334)
where xv is an input to the model.
4.7. OBJECT ORIENTED SIMULATION MODELS 189
The pressures pA is found from the pipe model that is given by the mass balance
VA
ṗA = qA − q1 (4.335)
β
Note that there is no model for pipe B because pipe B is connected to the outlet chamber
of the motor so that pB = p2 . Instead, the volume of pipe B is included in the chamber
volume of chamber 2 in the motor.
The volumetric flow q1 is found from the flow characteristic of the the balance valve,
which is q
Cd xbv1 b 2 (p1 − pA ) pA > p1
q1 = qρ (4.336)
−Cd Ac 2 (pA − p1 ) p1 < pA
ρ
Example 74 If a balance valve had been added at the outlet port of the motor, then
pressure pB would have to be computed from a line model
VB
ṗB = q2 − qB (4.340)
β
and the mass balance of chamber 2 of the motor would have been
V20 − A2 xp
ṗ2 = −Cim (p2 − p1 ) − Cem p2 + A2 ẋp − q2 (4.341)
β
The flow q2 would then be found from the balance valve characteristic of the balance valve
at port 2 as q
−Cd xbv2 b 2 (p2 − pB ) pB > p2
q2 = q ρ (4.342)
Cd Ac 2 (pB − p2 ) p2 < pB
ρ
Friction
5.1 Introduction
5.1.1 Background
Friction is the tangential reaction force between two surfaces in contact. The friction
force is dependent on a number of factors, such as contact geometry, properties of the
surface materials, displacement, relative velocity and lubrications. Friction is a highly
complex phenomenon, composed of several physical phenomena in combination. As a
result of this, models of friction are to a large extent empirical, which means that the
models are constructed in order to reproduce effects observed in experiments. On the
other hand, some of the dynamic friction models aim at modelling the physics behind
the phenomenon.
A macroscopic smooth surface is far from smooth when viewed at a microscopical
scale. The small features of the surface are called asperities. When two surfaces are
brought into contact, the true contact occur between the asperities in what is called
asperity junctions. An example of this is shown in Figure 5.1. In engineering materials,
the slope of the asperities are typical in the range 5◦ − 10◦ , and the width is typical
10 µm. When two bodies in contact are brought into relative motion by an external
force, the asperities will behave like springs, and there will be an elastic deformation of
the asperities. This motion is referred to as pre-sliding displacement or the Dahl effect.
Asperity
junctions
Asperities
Figure 5.1: The asperities and junctions of two bodies in contact, viewed at a microscop-
ical scale
191
192 CHAPTER 5. FRICTION
II. Boundary lubrication For very low velocities, no fluid lubrication occur, and the
friction is dominated by shear forces in the solid boundary film.
IV. Full fluid lubrication A lubricant film thicker than the size of the asperities is
maintained, and no solid contact occurs. The friction is purely viscous.
The resulting map is referred to as the generalized Stribeck curve, which is shown in
Figure 5.2. Static friction models will represent these regimes to a varying extent. A
selection of static friction models that are commonly used is shown in Figure 5.3.
Ff = Fc sgn(v), v 6= 0 (5.3)
where the Coulomb force Fc is given by
Fc = µFN (5.4)
Here µ is the friction coefficient and FN is the load. Equation (5.4) can be derived as
follows. It is assumed that there is no contamination, such as lubrication, of the contact
surfaces. The friction is then referred to as dry friction. In this context friction can
5.2. STATIC FRICTION MODELS 193
Regime I. No sliding.
Elastic deformation
F
lubrication
lubrication
Figure 5.2: The generalized Stribeck curve, showing friction as a function of velocity for
low velocities, (Armstrong-Hélouvry et al. 1994).
F F F
a) b) c)
v v v
F F F
d) e) f)
v v v
be defined as the shear strength of the asperity junction areas, and the friction force is
proportional to the true area of contact Ac
Ff = Ac fs (5.5)
where fs is the shear force per unit area, a constant material property. The true area of
contact Ac can be found from
FN
Ac = (5.6)
py
where FN is the load, and py is the yield pressure, a constant material property. Com-
bining (5.6) with (5.5) gives
FN
Ff = fs = µFN (5.7)
py
where the friction coefficient µ is found as µ = fs /py , and thus (5.4) holds. From
the derivation, it is seen that Ac is cancelled out of the expression, and so friction is
independent of contact area.
According to Armstrong-Hélouvry et al. (1994), Fc is also dependent on lubricant
viscosity and contact geometry. The nature of Coulomb friction was known to Leonardo
Da Vinci, and his results were further developed by Coulomb. The friction force given by
(5.3) is not necessary symmetric in v, that is, Ff may take different values for different
directions of the velocity.
Static friction
Static friction is also known as stiction and models the fact that in some cases the friction
force is larger in magnitude for zero velocity than for a non-zero velocity. According to
the stiction model the system sticks if the velocity is zero and |Ff | < Fs , and it breaks
away if |Ff | = Fs where Fs > Fc is the stiction force, which is larger in magnitude than
the Coulomb force Fc .
During a pre-sliding displacement, some motion is possible even when a mechanism
is stuck in static friction. If the applied force returns to zero, the position returns to its
initial value, possibly after a transient of pre-sliding displacement.
Viscous friction
Viscous friction is present in fluid lubricated contacts between solids. The concept of vis-
cous friction was first introduced by Reynolds(1886). A viscous friction model takes into
account that due to hydrodynamic effects, the friction force depends on the magnitude
of the velocity, and not only its direction. The usual linear model is given by
Ff v = Fv v (5.8)
for modeling the same effect. It is important to notice that models such as (5.10) or (5.11)
are not based on the physics of the phenomenon, but is rather a curve fit to experimental
data as shown in Figures 5.3 d) and f).
Fs
4 Fv
3
2 Fc
Friction force F 0
-1
-2
-3
-4
-5
-5 -4 -3 -2 -1 0 1 2 3 4 5
Velocity v
The Stribeck effect can also be included using (5.11), which gives (Hess and Soom 1990)
à !
(Fs − Fc )
F = Fc + sgn(v) + Fv v (5.13)
1 + (v/vs )2
1. They are dependent on the detection of zero velocity, as the model rely on switching
at zero velocity.
2. They do not describe all observed dynamic effects, such as pre-sliding displacement,
varying break-away force and frictional lag..
The zero velocity problem can be handled by a static model known as the Karnopp
model, Karnopp (1985), where a zero velocity interval, |v| < η is used. Outside this
interval,that is for |v| ≥ η, friction force is the usual function of velocity, but within the
interval, the velocity is considered to be zero and friction is a function of other forces in
the system: ½
Ff (v) , |v| ≥ η
Ff (v, F ) = (5.14)
Ff (F ) , |v| < η
where F represents the sum of other forces in the system and η > 0 is the small constant
defining the Karnopp zero interval. This is advantageous in simulations, but the zero
interval does not agree with real friction, and the model strongly depends on the rest of
the system through Ff (F ). A plot of the static Karnopp model is shown in Figure 5.3 f).
5.2. STATIC FRICTION MODELS 197
F (x) = σ 0 x, (5.15)
where µ ¶
td
Fs (γ, td ) = Fs,a + Fs,∞ − Fs,a (5.17)
td + γ
when sliding. Fs,a is the Stribeck friction at the end of the previous sliding period and td
is the dwell time, the time in stick. Although the Armstrong 7-parameter model describes
more phenomena than the classical models, it still requires switching between different
equations. The problems with static friction models in connection with simulation and
control systems design has led to the use of dynamic friction models for high precision
friction modeling.
mv̇ = Fa − Ff (5.19)
In this formulation the friction force is a function of the velocity. Note, however, that
this model is undefined for zero velocity, so there is a need for refining the model. This is
done in Karnopp’s model by observing that the physical behavior of the system at zero
velocity is that the velocity remains equal to zero as long as the force Fa is less than Fc
in magnitude. This can be written
Combining this with the equation of motion we see that Ff = Fa when v = 0 and
|Fa | ≤ Fc . Thus, for zero velocity, the friction force is a function of the force acting on
the mass. Define the saturation function sat(x, S) so that sat(x, S) = x when |x| ≤ S
and sat(x, S) = Ssgn(x) when |x| ≥ S.
Note that the computational input of the Karnopp model at the input port is Fa
when v = 0 and |Fa | ≤ Fc , and that the computational input changes to v when the
condition does no longer hold.
in MATLAB and Simulink. This method is used in friction models in Modelica, where
the computational inputs are switched at zero velocity.
Alternatively, a dead-zone around zero velocity can be used where the velocity is
treated as is it were zero in the computation of the friction force. Then the friction
model (5.22 will be modified to
½
sat(Fa , Fc ) when |v| ≤ δ
Ff = (5.24)
Fc sgn(v) else
where the magnitude δ of the dead-zone will have to be selected depending on the size
of the time-step, and on the maximum acceleration that can be expected in the system.
The model (5.24) is straightforward to implement in MATLAB and Simulink. If the
friction model is used in an observer in a control system , then the time-step will have to
be fixed, and a dead-zone must be used. It is clear that the introduction of a dead-zone
will be an approximation that will introduce some error. However, the performance of
this solution is vastly superior to the naive implementation in (5.18) of the signum term,
and Karnopp’s model should be the standard way of modeling friction unless dynamic
phenomena like pre-sliding and frictional hysteresis are the dominant physical effects.
A plot of the static model (5.13) is shown in Figure 5.5, and as can be seen Ff (v) is
located in the first and third quadrants, that is Ff (v) ∈ sector[0, ∞). Moreover, by
studying Figure 5.5, it can be seen that
Calculating the power Ff (v)v for a static friction model where Ff (v) satisfies (5.26), and
integrating, we get
Z T Z T
Ff (v)vdt > k1 v 2 dt, where 0 < k1 ≤ Fv (5.27)
0 0
It follows from (5.27), that the system with input v and output Ff is passive. This
result can be generalized to any sector nonlinearity. Karnopp’s model is identical to the
RT
static models except at zero velocity. Therefore the integral 0 Ff (v)vdt will be the
same as for the static methods. This implies that Karnopp’s model is passive. When the
dead-zone is included passivity cannot be established.
200 CHAPTER 5. FRICTION
dF dF dx
= (5.29)
dt dx dt
is found. For small displacements the friction is determined by the pre-sliding elastic
deformation of the asperities. This can be modeled as a linear spring:
x ¿ 1 ⇒ |F | = |σx| ¿ Fc (5.30)
with σ being the spring stiffness. For large displacements, the model should behave like
a Coulomb model. Dahl (1976) found that a model that satisfies this is given by
¯ ¯α µ ¶
dF ¯ F dx ¯¯ F dx
¯
= σ ¯1 − sgn ¯ sgn 1 − sgn
dx Fc dt Fc dt
µ ¶α µ ¶
F dx α+1 F dx
= σ 1 − sgn sgn 1 − sgn (5.31)
Fc dt Fc dt
³ ´
By using the fact that F < Fc it follows that sgn 1 − FFc sgn dxdt > 0, and (5.31) simplifies
to µ ¶α
dF F dx
= σ 1 − sgn (5.32)
dx Fc dt
The constant α depends on the material of the solid, α ≥ 1 describe ductile type mate-
rials, while α < 1 describes brittle type materials. Applications of the model, however,
typically employ α = 1, so that
µ ¶
dF F dx
= σ 1 − sgn (5.33)
dx Fc dt
dx
Fss = Fc sgn = Fc sgn(v) (5.34)
dt
5.3. DYNAMIC FRICTION MODELS 201
which can be compared to (5.3). The Dahl model includes the phenomena Coulomb
friction and pre-sliding displacement. From (5.33) it is seen that for small displacements
the friction force can be approximated by F ≈ σx, which is the model of a linear spring
with σ being the spring stiffness. For large displacements the friction for can be approx-
imated by F ≈ Fc as for a static Coulomb model. However, as the model (5.33) is rate
independent, it is not capable of describing such phenomena as Stribeck-effect.
Combination of (5.29) and (5.33) then leads to the following result
This gives µ ¶
Fc σ
− ln σ − F = x + C 0 (5.37)
σ Fc
where C 0 is a constant of integration, and where it has been assumed that F < Fc . Solving
for F we find that
Fc C 00 − Fσ x
F = Fc − e c
σ
where C 00 is another constant. Finally, by using the fact that F (0) = 0, we find that C 00 =
σ, and consequently Dahl’s friction model for forward speed can be written in the form
³ σ
´
F = Fc 1 − e− Fc x (5.38)
202 CHAPTER 5. FRICTION
Fc
2
x 0
1
Friction force F 0
-1
x 0
-2
F c
-3
0 1 2 3 4 5 6 7
Displacement x
Figure 5.6: The Dahl friction model for positive and negative velocity.
1 F 2 |v|
V̇ = F Ḟ = F v − (5.40)
σ0 Fc
It is seen that for the Dahl model the system with input v and output F is passive.
Figure 5.7: The asperity junctions of two bodies in contact are modeled as elastic bristles.
For simplicity, only the upper body is moving in this figure, and the bristles of the lower
body are assumed rigid.
other the strain in the bond increases and the bristles acts as springs giving rise to the
friction force. The force is given by
N
X
F = σ 0 (xi − bi ) (5.41)
i=1
where N is the number of bristles, σ 0 is the stiffness of the bristles, xi is the relative
position of the bristle and bi is the location where a bond was formed. In simulations, a
bond will snap when |xi − bi | = δ s , and then a new will be formed at a random location
relative to the previous location. The complexity of this model increases with N . The
stiffness of the bristles σ 0 can be made velocity dependent. An interesting property of
this model is that it attempts to capture the random nature of friction. However, it is
inefficient in simulations due to its complexity. Also it may give rise to oscillatory motion
in stick due to the lack of damping. The LuGre (Lund-Grenoble ) model (Canudas de
Wit, Olsson, Åström and Lischinsky 1995) is based on the same idea as the bristle
model, but the friction force is generated by a dynamic equation reminiscent of the Dahl
model describing the average deflection of the bristles, thereby reducing the complexity
introduced by the sum in (5.41).
The following property of the model is noted: It is seen from (5.42) that the model
for z can be written
|v|
ż = [g(v)sgn(v) − σ 0 z] (5.45)
g(v)
From this formulation it is seen that if the initial value of z satisfies |σ 0 z(0)| ≤ gmax ,
where gmax is the maximum value of g(v), then the absolute value of the state z(t) is
upper bounded according to
|σ0 z(t)| ≤ gmax (5.46)
It is also noted that
Fc ≤ σ 0 g(v) ≤ Fs (5.47)
It is seen that the stationary solution of (5.42) is
This shows that the therm σ2 v in (5.44) will tend to represent stiction and the Stribeck
effect, while σ2 v term will represent viscous friction. The is characterized by the six
parameters σ 0 , σ 1 , σ 2 , vs , Fs and Fc . By comparing the LuGre model with the Dahl
model as given by (5.35) it is clear that the LuGre model is a generalization of the Dahl
model, where the Dahl model appears in the case that σ 0 z = F , σ 1 = σ 2 = 0 and
g(v) = Fc . The LuGre model has the potential of being more accurate than the Dahl
model as it includes the Stribeck effect, and as it may represent frictional lag. As with
the Dahl model the LuGre model may drift in the sticking region.
The first term on the right side corresponds to the Dahl part of the LuGre model. We
find that this term is not problematic as
Z T Z T µ ¶
|v|
σ 0 vzdt = σ 0 z ż + σ0 z dt
0 0 g(v)
Z T
σ0 £ 2 2
¤ |v|
= z (T ) − z (0) + z2 σ0 dt
2 0 g(v)
σ0
≥ − z 2 (0) (5.50)
2
The second term on the right side of (5.49) is somewhat more involved. We find that
Z T µ ¶ Z T µ ¶
dz |v|
v σ1 + σ 2 v dt = v (σ1 + σ 2 ) v − σ 1 σ 0 z dt (5.51)
0 dt 0 g(v)
Insertion of the maximum and minimum values of g according to (5.47) leads to the
conclusion that the LuGre model is passive if
Fc
σ1 ≤ σ2 (5.54)
Fs − Fc
In (Barabanov and Ortega 2000) it was shown that this is a necessary and sufficient
condition for passivity from v to F .
dz
F = σ0 z + σ1 + σ2 v (5.56)
dt
and the term α(z, v), which is the new feature of the model when compared to LuGre,
is used to render true stiction. The piecewise continuous function α(z, v) is defined as
0 |z| ≤ zb
0 < α < 1 zb < |z| < zmax (v) , sgn(v) = sgn(z)
α(z, v) = , (5.57)
1 |z| ≥ zmax (v)
0 , sgn(v) 6= sgn(z)
where
g(v)
0 < zb < zmax (v) = , ∀v ∈ R. (5.58)
σ0
An example of the term α(z, v) is
0 |z| ≤ zb
µ ³
z +z
´¶
z− max2 b
1 1 , sgn(v) = sgn(z)
α(z, v) = 2 sin π zmax −zb + 2 zb < |z| < zmax (v)
1 |z| ≥ zmax (v)
0 , sgn(v) 6= sgn(z)
x = z + w.
is decomposed into its elastic and plastic (inelastic) components z and w. Stiction cor-
responds to the existence of a breakaway displacement zb > 0 such that for |z| ≤ zb all
motion of the friction interface consists entirely of elastic displacement. In this context,
206 CHAPTER 5. FRICTION
Dynamics
207
Chapter 6
6.1 Introduction
Rigid body dynamics is important for a wide range of control applications, and is essential
in robot control, ship control, the control of aircraft and satellites, and vehicle control
in automotive systems. The field of rigid body dynamics is old and is very rich in
results. Important results date back to Newton in the 17th century, Euler in the 18th
century and Lagrange, Hamilton and Rodrigues in the 19th century. Because of the
development in control applications like robotics, aerospace, and the development in
numerical simulation, the selection of topics and method to be presented in rigid body
dynamics has developed quite a lot the last two decades, and this text attempts to reflect
this change. The material is based on general texts like (Kane and Levinson 1985) and
(Robertson and Schwertassek 1988), texts on spacecraft dynamics like (Kane, Likins and
Levinson 1983) and (Hughes 1986), and robotics books like (Spong and Vidyasagar 1989)
and (Sciavicco and Siciliano 2000).
6.2 Vectors
6.2.1 Vector description
Forces, torques, velocities and accelerations are well-known entities that can be described
by vectors. A vector u can be described by its magnitude |u| and its direction. Note that
x3
a 3
a2 x2
a1
x1
209
210 CHAPTER 6. RIGID BODY KINEMATICS
n
v
u
this description of a vector does not rely on the definition of any coordinate frame. In
this respect the description may be said to be coordinate-free. Alternatively, a Cartesian
coordinate frame can be introduced, and the vector can be described in terms of its
components in the Cartesian coordinate frame. Let the Cartesian coordinate frame a
be defined by three orthogonal unit vectors a1 , a2 and a3 that are unit vectors along
the x1 , x2 , x3 axes of a (Figure 6.1). Then the vector u can be expressed as a linear
combination of the orthogonal unit vectors a1 , a2 and a3 by
u = u1 a1 + u2 a2 + u3 a3 (6.1)
where
ui = u · ai , i ∈ {1, 2, 3} (6.2)
are the unique components or coordinates of u in a. A related description of the vector is
the coordinate vector form where the coordinates of the vector are written as a column
vector
u1
u = u2 (6.3)
u3
where it is used that ai · aj = δ ij which is equal to unity when i = j and zero otherwise.
6.2. VECTORS 211
We sum up this result with the following three equivalent representations of the vector
cross product:
The vector cross product has the following three equivalent representations:
3 X
X 3 X
3
w = u × v ⇔ wi = εijk uj vk ⇔ w = u× v (6.15)
i=1 j=1 k=1
and
a1 × a2 = a3 , a1 × a3 = −a2 (6.17)
a2 × a3 = a1 , a2 × a1 = −a3 (6.18)
a3 × a1 = a2 , a3 × a2 = −a1 (6.19)
Example 77 The relation between the components of the skew symmetric form u× and
the vector form of u can be expressed in terms of the permutation symbol as
¡ ×¢
u ik = εijk uj (6.20)
1 ¡ ¢
uj = εijk u× ik (6.21)
2
Example 78 For three arbitrary vectors a, b, c the vector cross product satisfies
a × (b × c) = ba · c − a · bc (6.22)
This can be shown by calculation of the components on both sides. Let a, b, and c be the
coordinate representations of a, b and c in some coordinate frame. The coordinate form
of (6.22) is
a× b× c = baT c − aT bc = (baT − aT bI)c (6.23)
which implies
a× b× = baT − aT bI (6.24)
In particular we note that
a× a× = aaT − aT aI. (6.25)
Example 80 Let a, b and c be three arbitrary vectors. The Jacobi identity is written
a × (b × c) + b × (c × a) + c × (a × b) = 0 (6.28)
ba · c − a · bc + cb · a − b · ca + ac · b − c · ab = 0 (6.29)
a× b× c + b× c× a + c× a× b = 0 (6.30)
(a × b) × c = a × (b × c) − b × (a × c) (6.31)
Example 82 The following problem is investigated: To what extent can the vector v be
determined when
w =u×v (6.34)
and w and u are given? In coordinate form this is written
w = u× v (6.35)
The skew symmetric matrix u× is singular, which is obvious from the identity u × u = 0
which implies that u× u = 0. This means that it is not possible to solve for v. However,
it is possible to find two equations for v. First, it is clear that w · v = 0, which means
that v is in the plane orthogonal to w. Second, it is found that
w |w|
w= sin θ|u||v| ⇒ |v| = (6.36)
|w| |u| sin θ
This shows that if the angle θ between u and v is selected to be some value, then the
length of v is given by (6.36).
6.3 Dyadics
6.3.1 Introduction
The idea of using vectors in mathematical modelling of physical systems is well known.
Also the use of column vectors to represent vectors is easy to accept. In analogy with
this it turns out that certain matrices can be the representation of physical quantities
described by pairs of vectors. Such matrices play an important role in rigid body dy-
namics and fluid mechanics, and it is worthwhile to invest some time in developing the
required formalism.
214 CHAPTER 6. RIGID BODY KINEMATICS
where M = {mij } is the inertia matrix of the rigid body about its center of mass. The
first formulation gives the relation between the column vectors h and ω, and the other
formulation presents the relation between the generic components hi and ω j . At this
stage one might wonder: Is there a corresponding equation for the relation between h
and ω in coordinate-free form? This turns out to be the case, but to be able to do this
we need to introduce the concept of a dyadic, which is the sum of pairs of vectors. We
define the inertia dyadic by
X3 X3
M := mij ai aj (6.40)
i=1 j=1
Note that ai aj is a pair of vectors which should not be confused with the scalar product
ai · aj . Consider the following calculation:
3 X
X 3 3
X
M ·ω = mij ai aj · ω k ak
i=1 j=1 k=1
3 X
X 3 X
3
= mij ai (aj · ω k ak )
i=1 j=1 k=1
3 X
X 3
= mij ω j ai (6.41)
i=1 j=1
Here we have used the result aj · ak = δ jk . Comparing with (6.37) and (6.39) we see that
this implies that
h=M ·ω (6.42)
which is the relation between h and ω in vector notation. This result is equivalent to the
expressions in (6.39). We note that the dyadic M represents the same physical quantity
as the inertial matrix M and the components mij . We conclude that:
6.3. DYADICS 215
The angular momentum vector h can be expressed by the angular velocity vector ω with
the three equivalent formulations
3
X
h=M ·ω ⇔ h = Mω ⇔ hi = mij ω j (6.43)
j=1
where M is the inertia dyadic and M is the inertia matrix, which is the matrix represen-
tation of the inertia dyadic.
where
dij = ai · D · aj (6.45)
are the components of the dyadic D in frame a. The matrix
D = {dij } (6.46)
is said to be the the matrix representation of the dyadic D in frame a. Scalar premul-
tiplication with a vector, that is the scalar product of the vector u with the dyadic D
gives a vector according to
3
X 3 X
X 3
w = u·D = uk ak · dij ai aj
k=1 i=1 j=1
3 X
X 3
= dij ui aj (6.47)
i=1 j=1
Scalar postmultiplication with a vector, which is the scalar product of a dyadic with a
vector gives the vector
3 X
X 3 3
X
z = D·u= dij ai aj · uk ak (6.48)
i=1 j=1 k=1
3 X
X 3
= dij uj ai (6.49)
i=1 j=1
w =u·D ⇔ wT = uT D (6.50)
z =D·u ⇔ z = Du (6.51)
216 CHAPTER 6. RIGID BODY KINEMATICS
where δ ij is equal to unity when i = j, and zero otherwise. This implies that for any
vector u
I ·u=u·I =u (6.53)
and for any dyadic D we have
I ·D =D·I =D (6.54)
The equivalent matrix form of these equations are
¡ ¢T
Iu = uT I = u (6.55)
ID = DI = D (6.56)
K = kkT (6.63)
6.3. DYADICS 217
3
X 3 X
X 3 X
3 3 X
X 3 X
3
u · v× = up ap · εijk vj ai ak = εijk ak ui vj (6.68)
p=1 i=1 j=1 k=1 i=1 j=1 k=1
X 3 X
3 X 3 3 X
X 3 X
3
= εkij ak ui vj = εijk ai uj vk = u × v (6.69)
i=1 j=1 k=1 i=1 j=1 k=1
The skew symmetric form used in the coordinate vector form is consistent with (6.64) as
¡ ¢T ¡ ¢T
u× v = − v× u = v× u = uT v× (6.70)
This shows that the matrix representation of cross product dyadic u× is the skew sym-
metric form u× .
Example 86 The dyadic form of the triple cross product (6.22) is
h i
a× · b× · c = ba − (a · bI) · c (6.71)
and it follows that
a× · b× = ba − a · bI (6.72)
In particular, we note that
a× · a× = aa − a · aI (6.73)
Example 87 The triple scalar product satisfies
³ ´
d × a · w = d · (a × w)
za zb
b3
b2
3
a yb
b1
xb
2
a ya
a1
xa
where
via = v · ai (6.78)
are the coordinates of v in a, and
vib = v · bi (6.79)
are the coordinates of v in b. To distinguish the column vectors of coordinates in frame
a from the column vector of coordinates in frame b we write
a b
v1 v1
va = v2a and vb = v2b (6.80)
v3a v3b
where superscript a denotes that the vector is given by the the coordinates in a, and the
superscript b denotes that the vector is given by the coordinates in b.
To find the relation between the coordinate vectors va and vb in frames a and b the
following calculation is used:
va = Rab vb (6.82)
where
Rab = {ai · bj } (6.83)
is called the rotation matrix from a to b. The elements rij = ai · bj of the rotation matrix
Rab are called the direction cosines.
Consider a vector p with coordinate vector pa in frame a. Define the vector q defined
by its coordinate vector
qa = Rab pa (6.89)
Note that the vector q is defined by the vector p and the rotation matrix Rab . The
coordinate vector qb in b is according to the usual coordinate transformation rule
which means that the coordinates of q in b are equal to the coordinates of p in a. This
is the second result: The rotation matrix from a to b rotates the vector p to the vector
q so that qb = pa .
220 CHAPTER 6. RIGID BODY KINEMATICS
1. Let the vector v have coordinate vector vb in b and coordinate vector va in a. Then
the rotation matrix Rab transforms the coordinate vector in b to the coordinate
vector in a according to
va = Rab vb (6.91)
In this equation Rab acts as a coordinate transformation matrix.
2. The vector p with coordinate vector pa in a is rotated to the vector q with coordi-
nate vector qb = pa by
qa = Rab pa (6.92)
In this equation Rab acts as a rotation matrix.
As a special case of this the rotation matrix rotates the orthogonal unit vectors
a1 , a2 , a3 in a to the orthogonal unit vectors b1 , b2 , b3 in b which is seen from
1 0 0
aa1 = bb1 = 0 , aa2 = bb2 = 1 and aa3 = bb3 = 0 (6.93)
0 0 1
Moreover, from bai = Rab aai it follows that the columns of the rotation matrix are the
coordinate vectors bai of bi in frame a, that is
¡ ¢
Rab = ba1 ba2 ba3 (6.94)
det Rab = r11 (r22 r33 − r32 r23 ) + r21 (r32 r13 − r12 r33 ) + r31 (r12 r23 − r22 r13 )
h i
= (ba1 )T (ba2 )× ba3 = (ba1 )T ba1 = 1
where it is used that (ba2 )× ba3 = ba1 , and that ba1 is a unit vector. We have then shown
the fourth result: The rotation matrix has a determinant equal to unity, that is
Finally, the set SO(3) is defined. We have established that the rotation matrix
is orthogonal and has a determinant equal to unity. The set of all matrices that are
orthogonal and with a determinant equal to unity is denoted by SO(3), that is,
Here R3×3 is the set of all 3 × 3 matrices with real elements. A matrix R is a rotation
matrix if and only if it is an element of the set SO(3).
b3
a3
b2
a2
to b and to a is given by
vb = Rbc vc
va = Rac vc
The rotation matrix of a composite rotation is the product of the rotation matrices:
This shows that the rotation matrix for the composite rotation Rac is simply the
product of the rotation matrices Rab from a to b and Rbc from b to c. It is straightforward
to extend this result to the composite rotation of three or more rotations. In the case of
three rotations we have
Rad = Rab Rbc Rcd (6.97)
a1 · b2 = a1 · b3 = a2 · b1 = a3 · b1 = 0 (6.98)
a2 · b2 = cos φ, a3 · b3 = cos φ (6.99)
a3 · b2 = sin φ, a2 · b3 = − sin φ (6.100)
222 CHAPTER 6. RIGID BODY KINEMATICS
In the same way we can find the elements of the matrices Ry (θ) and Rz (ψ). This results
in
1 0 0
Rx (φ) = 0 cos φ − sin φ (6.101)
0 sin φ cos φ
cos θ 0 sin θ
Ry (θ) = 0 1 0 (6.102)
− sin θ 0 cos θ
cos ψ − sin ψ 0
Rz (ψ) = sin ψ cos ψ 0 (6.103)
0 0 1
where daij are the components in frame a and dbpq are the components in frame b. The
matrix representation in the two frames are denoted
Da = {daij }, Db = {dbij } (6.105)
Let the vector z be given by
z =D·u (6.106)
Then, in frames a and b this may be written in matrix form as
za = Da ua , zb = Db ub (6.107)
We then find that
Da ua = za = Rab zb = Rab Db ub = Rab Db Rba ua (6.108)
and, since ua is arbitrary, this implies that
An important result in rigid body dynamics is that when frame b is fixed in the rigid body,
and therefore moves with the rigid boy, then Mb is a constant matrix. In contrast to this,
the matrix representation Ma in a stationary coordinate frame a will be given by
Example 89 The relation between the skew symmetric forms of a vector is given by
¡ b ¢× b × ×
u v = wb = Rba wa = Rba (ua ) va = Rba (ua ) Rab vb (6.113)
that is, the skew symmetric form of the vector ua transforms to frame b by a similarity
transformation. This is a consequence of the fact that (ua )× is the matrix representation
of the dyadic u× .
The position and orientation of frame b relative to frame a is given by the homogeneous
transformation matrix µ a ¶
a Rb raab
Tb = ∈ SE(3) (6.115)
0T 1
Here the set SE(3) is the Special Euclidean Group of dimension 3 defined by
½ µ ¶ ¾
R r
SE(3) = T|T= , R ∈ SO(3), r ∈ R3 (6.116)
0T 1
za
zb
yb
ya
xa
xb
matrix gives six constraints on the elements of the matrix, so that there are only three
independent parameters that describes the rotation matrix. Therefore, it is of great
interest to investigate if it is possible to find three parameters that give a parameterization
of the rotation matrix.
A widely used set of parameters for the rotation matrix is the Euler angles. In this
description the rotation matrix is given as a composite rotation of selected combinations
of rotations about the x, y and z axes. There are many possible permutations of x, y and
z rotations, and a description of this is given in (Kane et al. 1983). Here we will present
the two sets of Euler angles that are the most often seen, namely the roll-pitch-yaw
angles, and the classical Euler angles.
6.5.2 Roll-pitch-yaw
The Euler angles of the roll-pitch yaw type are commonly used to describe the motion of
rigid bodies that move freely, like aeroplanes, spacecraft, ships and underwater vehicles.
The rotation from a to b is described as a rotation ψ about the za axis, then a rotation θ
about the current (rotated) y axis, and finally a rotation φ about the current (rotated)
x axis as shown in Figure 6.5. The resulting rotation matrix is
za
zb
yb
ya
xa
xb
of rotation that avoid these problems, and that are well suited for simulation as well as
for controller design and analysis. On background of this it may be argued that Euler
angles have been over-emphasized in the dynamics literature. In the following we will
study the angle-axis parametrization of the rotation, which is a very useful tool in the
development of kinematic models and equations of motion for use in control systems.
L
p
q
k
d2
d1
c1
c2
and
q = xd1 + y d2 + z k (6.132)
The unit vectors d1 and d2 can be written
where
Rk,θ = cos θI + sin θk× + (1 − cos θ)k k (6.139)
is the rotation dyadic of the angle-axis description. Now, recall that q is obtained by
rotating p according to qa = Rba pa , which in combination with (6.138) implies that the
rotation matrix Rba is the matrix representation of the rotation dyadic Rk,θ in a. This
leads to the result
The rotation matrix Rab can be described as a rotation by an angle θ about a unit vector
k where Rab is given by
Using the standard transformation rule and the identities (ka )× ka = 0 and (ka )T ka =
1 gives
ka = Rab kb = kb (6.141)
which shows that the rotation vector k has the same coordinates in a and b.
Example 91 Inserting ka = (kx ky kz )T we get
kx2 vθ + cθ kx ky vθ − kz sθ kx kz vθ + ky sθ
Rb = kx ky vθ + kz sθ
a
ky2 vθ + cθ ky kz vθ − kx sθ (6.142)
kx kz vθ − ky sθ ky kz vθ + kx sθ kz2 vθ + cθ
where the notation sθ = sin θ, cθ = cos θ and vθ = 1−cθ is used to simplify the expression.
Example 92 Suppose that the rotation axis is given by k = a3 , which means that ka =
(0, 0, 1)T . Then the matrix representation of Rk,θ in a is
cos θ − sin θ 0
Rab = sin θ cos θ 0 = Rz,θ (6.143)
0 0 1
which is to be expected as this is a rotation by an angle θ about the z axis.
Example 93 As Rk,θ is a dyadic and k = c3 , it follows from the transformation rule
(6.109) that
Rab = Rac Rz,θ Rca (6.144)
dRk,θ
= k× cos θ + k× k× sin θ (6.149)
dθ
Using (6.27) we find that
as Rk,θ (θ = 0) = I.
1 2 1
exp(A) = I + A + A + A3 . . . (6.153)
2! 3!
The result (6.152) can be derived directly from (6.147). First we use (6.27) to establish
the identity
(k× )2n+1 = (−1)n k× (6.154)
by induction. This is done by noting that (6.27) implies that (6.154) is true for n = 1,
and moreover, for n = 1, 2, . . . we have
(k× )2n+1 = (−1)n k× ⇒ (k× )2(n+1)+1 = (−1)n k× (k× )2 = (−1)n (−1)k× . (6.155)
Then we may evaluate exp[k× θ] directly from the definition (6.153), and find that
θ2 θ3 θ4 θ5 θ6
exp[k× θ] = I + k× θ + (k× )2 + (k× )3 + (k× )4 + (k× )5 + (k× )6 . . .
2! 3! 4! 5! 6!
2 3 4 5 6
θ θ θ θ θ
= I + k× [θ + k× ] + (k× )3 [ + k× ] + (k× )5 [ + k× ] . . .
2! 3! 4! 5! 6!
2 3 4 5 6
θ θ θ θ θ
= I + k× [θ + k× ] − k× [ + k× ] + k× [ + k× ] . . .
2! 3! 4! 5! 6!
3 5 2 4 6
θ θ θ θ θ
= I + k× [θ − + . . .] − (k)2 [ − + . . .]
3! 5! 2! 4! 6!
¡ ¢ 2
= I + k× sin θ + k× (1 − cos θ) (6.156)
A given rotation will correspond to two sets of Euler parameters (η, ) and (−η, − ) with
opposite signs as
Re (−η, −²) = Re (η, ²) (6.167)
The inverse of Re (η, ) given by
6.7.2 Quaternions
The vector µ ¶
η
p= (6.170)
²
of Euler parameters can be treated as a unit quaternion vector. This makes it possible
to introduce a wealth of techniques and analysis tool from the theory of quaternions.
In the following, the necessary background on quaternions will be presented, and this
will be specialized to unit quaternions representing a rotation matrix through its Euler
parameters.
A quaternion is represented by a vector
µ ¶
α
q= (6.171)
β
where α1 , α2 ∈ R and β1 , β 2 ∈ R3 .
The matrix F(q) represents quaternion pre-multiplication with q in the sense that for
any u ∈ R4
q ⊗ u = F(q)u (6.176)
while E(q) represents quaternion post-multiplication with q in the sense that
u ⊗ q = E(q)u (6.177)
6.7. EULER PARAMETERS 233
Example 100 The concept of quaternions was introduced by Hamilton who got the idea
on the 16th of October 1843 while he was walking with his wife to the Royal Irish Academy
(der Waerden 1976). In Hamilton’s formulation the quaternion was written
q = α + iβ 1 + jβ 2 + kβ 3 (6.178)
i2 = j 2 = k2 = −1 (6.179)
q1 = α1 + iβ 11 + jβ 12 + kβ 13 (6.181)
q2 = α2 + iβ 21 + jβ 22 + kβ 23 (6.182)
q1 q2 = (α1 + iβ 11 + jβ 12 + kβ 13 ) (α2 + iβ 21 + jβ 22 + kβ 23 )
= α1 α2 − β 11 β 21 − β 12 β 22 − β 13 β 23
+i (α1 β 21 + α2 β 11 + β 12 β 23 − β 13 β 22 )
+j (α1 β 22 + α2 β 12 + β 13 β 21 − β 11 β 23 )
+k (α1 β 23 + α2 β 13 + β 11 β 22 − β 12 β 21 ) (6.183)
q = q1 q2 (6.184)
where
q = α + iβ 1 + jβ 2 + kβ 3 (6.185)
corresponds to the quaternion vector q = q1 ⊗ q2 as defined in (6.172).
Comparing these results we find that the Euler parameters η, ² corresponding to the
composite rotation R is given by
p = p1 ⊗ p2 (6.205)
which can also be written
η = η1 η 2 − ²T1 ²2 (6.206)
² = η 1 ²2 + η 2 ²1 + ²×
1 ²2 (6.207)
236 CHAPTER 6. RIGID BODY KINEMATICS
Example 104 Let F(·) and E(·) be the matrices corresponding to pre-multiplication and
post-multiplication, respectively, as defined in (6.174) and (6.175) Then
µ ¶ µ ¶
0 0
=p⊗ ⊗ p̄ (6.212)
Rv v
can be written µ ¶ µ ¶ µ ¶
0 0 0
= F(p) ⊗ p̄ = F(p)E(p̄) (6.213)
Rv v v
This leads to one more formula for the rotation matrix:
¡ ¢¡ ¢T
R = −² ηI + ²× −² ηI − ²× (6.214)
In addition, η 2 + 2
1 + 2
2 + 2
3 = 1. The following notation is introduced to simplify the
algorithms:
z0 η
z1 1
z=
z2 := 2 2 (6.216)
z3 3
that appear from the diagonal elements of R, while the off-diagonal terms give the
equations
1. Find the largest element in {r00 , r11 , r22 , r33 }. This element is denoted rii .
2. Compute p
|zi | = 1 + 2rii − T (6.226)
3. Determine the sign of zi from some criterion, like continuity of solution, or η > 0.
4. Find the remaining zj from the three equations out of (6.223—6.225) that have as
the left side zj zi for all j 6= i. For example, if z0 was found under step 2 and 3,
then the remaining zj are found from
Note that this algorithm avoids division by zero as the division is done with the zi
that has the largest absolute value.
Example 105 In robot control the desired orientation of the robot hand may be specified
to be ¡ ¢
Rd = nd sd ad ∈ SO(3) (6.236)
Suppose that the actual orientation of the robot hand is
¡ ¢
R = n s a ∈ SO(3) (6.237)
where n is the normal vector, s is the slide vector and a is the approach vector of the
hand (Spong and Vidyasagar 1989), (Sciavicco and Siciliano 2000). Then the deviation
of R from Rd is given by the rotation matrix Re = {r̃ij } which is defined by
e := RRTd
R ⇒ e d
R = RR (6.238)
Using the definition of the vector cross product the Euler rotation vector e
e corresponding
to the deviation Re can be written
1 ×
e
e= (n n + s× ×
d s + ad a) (6.240)
2 d
1 = η 2 + ²T ² = η 2 (1 + ρT ρ) (6.243)
which implies
1
η2 = (6.244)
1 + ρT ρ
6.8. ANGULAR VELOCITY 239
Then
2
R=I+ [ρ× + ρ× ρ× ] (6.245)
1 + ρT ρ
is found from (6.166). We note that there are no trigonometric terms in (6.245).
The Euler-Rodrigues parameters can be found from the rotation matrix using
r32 − r23
² e 1 r13 − r31
ρ= = 2 = (6.246)
η 2η TraceR + 1 r −r
21 12
and that
cay(kθ) ≈ Rk,θ , θ small (6.252)
rotation matrix can be described by three independent variables, and this indicates that
there might be some entity that represents the time derivative of the rotation matrix
using three parameters. We will in the following analyze this problem, and arrive at the
definition of the angular velocity vector ω, which represents the time derivative of the
rotation matrix.
6.8.2 Definition
The rotation matrix Rab is orthogonal and satisfies
d £ a a T¤
Rb (Rb ) = Ṙab (Rab )T + Rab (Ṙab )T = 0 (6.254)
dt
From this equation it is seen that the matrix Ṙab (Rab )T is skew symmetric. Now, any skew
symmetric 3 × 3 matrix can be seen as the skew symmetric form of a column vector. This
means that it is possible to define a vector so that its skew symmetric form is equal to
Ṙab (Rab )T . It is quite remarkable that this vector can be given a physical interpretation,
and that it is of fundamental importance in dynamics.
Let the vector ω ab be defined by requiring that its coordinate form ω aab in frame a satisfies
The vector ω ab is said to be the angular velocity vector of frame b relative to frame a.
A kinematic differential equation for the rotation matrix Rab appears from the defini-
tion of the angular velocity by post-multiplication of (6.255) with Rab . Moreover, using
the coordinate transformation rule (ω aab )× = Rab (ω bab )× Rba for the skew symmetric form
of a vector an alternative formulation of the kinematic differential equation is found.
The kinematic differential equation of the rotation matrix is given by the two alternative
forms
Ṙab = (ω aab )× Rab (6.256)
Ṙab = Rab (ω bab )× (6.257)
From the definitions it is clear that ω x (φ̇) is the angular velocity of a rotation by an
angular rate φ̇ about the x axis, ω y (θ̇) is the angular velocity of a rotation by an angular
rate θ̇ about the y axis, and ω z (ψ̇) is the angular velocity of a rotation by an angular
rate ψ̇ about the z axis. From (6.101) we find that
h i× 0 0 0 1 0 0
ω x (φ̇) = φ̇ 0 − sin φ − cos φ 0 cos φ sin φ (6.261)
0 cos φ − sin φ 0 − sin φ cos φ
0 0 0
= 0 0 −φ̇ (6.262)
0 φ̇ 0
h i× h i×
In the same way we may compute ω y (θ̇) and ω z (ψ̇) . This results in
φ̇ 0 0
ω x (φ̇) = 0 , ω y (θ̇) = θ̇ , and ω z (ψ̇) = 0 (6.263)
0 0 ψ̇
Consider the angle-axis parameterization when k = ka is a constant vector and
Rab = Rk,θ = I + k× sin θ + k× k× (1 − cos θ) (6.264)
Then the angular velocity is
¡ ¢¡ ¢
(ω aab )× = θ̇ k× cos θ + k× k× sin θ I − k× sin θ + k× k× (1 − cos θ)
£
= θ̇ k× cos θ + k× k× sin θ − k× k× cos θ sin θ + k× sin2 θ
¡ ¢ ¤
−k× cos θ − cos2 θ + k× k× cos θ sin θ − k× k× sin θ
= θ̇k× (6.265)
This shows that:
For a simple rotation, the angular velocity vector ω ab is along the axis of rotation k, and
is given by
ω ab = θ̇k (6.266)
This gives an intuitively appealing interpretation of the angular velocity. If the axis
of rotation is not constant, then the expressions become somewhat more involved.
This implies that the angular velocities ω ab , ω bc and ω cd can be added vectorially.
The angular velocity of the composite rotation matrix Rad = Rab Rbc Rcd is the sum of the
angular velocities according to
ω ad = ω ab + ω bc + ω cd (6.269)
Example 106 In a gimbal system for inertial navigation the rotation matrix from the
vehicle frame b to the instrumented platform frame p will be
The relation between the time derivative in frame a and the time derivative in frame
b is found by differentiating the equation
ua = Rab ub (6.273)
which gives
u̇a = Rab u̇b + Ṙab ub (6.274)
Insertion of Ṙab = Rab (ω bab )× gives the relation
£ ¤
u̇a = Rab u̇b + (ω bab )× ub (6.275)
where it is assumed that u = ub1 b1 + ub2 b2 + ub3 b3 . The corresponding column vector
representation is a b
u̇1 u̇1
u̇a = u̇a2 , u̇b = u̇b2 (6.278)
u̇a3 u̇b3
From (6.275) we find that
a b
d d
u = u + ω ab × u (6.279)
dt dt
where
a
d
u = u̇a1 a1 + u̇a2 a2 + u̇a3 a3 (6.280)
dt
b
d
u = u̇b1 b1 + u̇b2 b2 + u̇b3 b3 (6.281)
dt
Example 107 In the same way partial differentiation with respect to some variable q in
frame a and b is defined by
a
∂u ∂ua1 ∂ua ∂ua
: = a1 + 2 a2 + 3 a3 (6.282)
∂q ∂q ∂q ∂q
b b b
∂u ∂u1 ∂u ∂ub
: = b1 + 2 b2 + 3 b3 (6.283)
∂q ∂q ∂q ∂q
Example 108 An alternative definition of the angular velocity vector is used in (Kane
and Levinson 1985):
à ! à ! à !
a a a
db2 db3 db1
ω ab = b1 · b3 + b2 · b1 + b3 · b2 (6.284)
dt dt dt
Here b1 , b2 , b3 are the orthogonal unit vectors of the frame b. We will now show that this
is in agreement by our definition (6.255). From (6.94) we have
¡ ¢
Rab = ba1 ba2 ba3 (6.285)
and from the definition of ω bab in (6.255) we get
0 baT a
1 ḃ2 baT a
1 ḃ3
b × T
(ω ab ) = R Ṙ = aT
b2 ḃ1 a
0 baT a
2 ḃ3 (6.286)
baT
3 ḃa
1 baT a
3 ḃ2 0
Before proceeding we show that this matrix is skew symmetric. We note that ba1 , ba2
d
and ba3 are orthogonal. Then baT a aT a aT a aT a
1 b2 = 0 and dt (b1 b2 ) = ḃ1 b2 + b1 ḃ2 = 0, which
implies that b1 ḃ2 = −b2 ḃ1 . In the same way it is found that b2 ḃ3 = −baT
aT a aT a aT a a
3 ḃ2 and
aT a aT a
b3 ḃ1 = −b1 ḃ3 , and the right side in (6.286) is seen to be skew symmetric. We write
ω bab in its vector form, and express the scalar products in terms of coordinate-free vectors
to get
aT a a
b3 ḃ2 b3 · ddtb2
ω bab = baT a = a
1 ḃ3 b1 · ddtb3 (6.287)
aT a a
b2 ḃ1 db1
b2 · dt
244 CHAPTER 6. RIGID BODY KINEMATICS
We see that this is indeed the coordinate form of the definition (6.284) of (Kane and
Levinson 1985).
e a := RRTd
R ⇒ e a Rd
R=R (6.288)
We see that the rotation matrix R is described as the composite rotation defined by the
e a and Rd . To make this clear we introduce the intermediate frame c
rotation matrices R
so that
Re a = Rac , Rd = Rcb (6.289)
and
d e
Ra = Ṙac = (ω aac )× Rac (6.290)
dt
Ṙd = Ṙcb = Rcb (ω bcb )× (6.291)
e a := ω aac , ω bd := ω bcb
ω a = ω aab , ω (6.292)
d e e a , Ṙd = Rd (ω b )×
Ṙ = (ω a )× R, ω a )× R
Ra = (e d (6.293)
dt
6.9. KINEMATIC DIFFERENTIAL EQUATIONS 245
It follows from
ω aab = ω aac + ω acb (6.294)
a
that ωe = ω a − ω ad , and we may sum up that the kinematic differential equations for the
attitude deviation is
e a := RRTd
R (6.295)
ea
ω = ω a − ω ad (6.296)
d e ea
Ra ω a )× R
= (e (6.297)
dt
Ṙd = (ω ad )× Rd (6.299)
Then, by introducing an intermediate frame as in the case above, we find that the kine-
matic differential equations referred to the b frame is
e b := RTd R
R (6.300)
eb
ω = ω b − ω bd (6.301)
d e e b (e b ×
Rb = R ω ) (6.302)
dt
which is the twist vector in the b frame. The twist vector w is a six-dimensional vector
containing the velocity and the angular velocity. In analogy with the angular velocity
¡ ¢×
ω bab and its matrix form ω bab , the twist vector w has a matrix form in the set se(3)
which is µ ¶
(ω bab )× vab
b
ŵ = ∈ se(3) (6.306)
0T 0
Example 109 The transformation rule for a twist vector is not as straightforward as for
the angular velocity vector. This is seen in the time derivative of Tab when it expressed
in the a frame:
µ ¶
a (ω aab )× Rab vab
a
Ṫb =
0T 0
µ a ×
¶µ a ¶
(ω ab ) vab − (ω aab )× raab
a
Rb raab
= (6.308)
0T 0 0T 1
a
The physical interpretation of the velocity term vab −(ω aab )× raab is not as obvious as when
the coordinates of the b frame is used. A geometric interpretation is given in (Murray
et al. 1994).
From (6.269) we have that the angular velocity of d relative to a is the sum of the angular
velocities resulting from each of the three simple rotations due to ψ, θ and φ:
ω ad = ω ab + ω bc + ω cd (6.311)
and
cos θ sin φ sin θ cos φ sin θ
1
φ̇ = Ed (φ)−1 ω dad = 0 cos φ cos θ − sin φ cos θ ω dad (6.318)
cos θ
0 sin φ cos φ
Let ai be the orthogonal unit vectors of the a frame, bi be the unit vectors of the b
frame, and let ci be the orthogonal unit vectors of the c frame. Then the roll-pitch-yaw
description gives the angular velocity ω ad as a sum of an angular velocity ω ab along a3 ,
an angular velocity ω bc along b2 , and an angular velocity ω cd along c1 . The physical
interpretation of the singularity of Ea (φ) and Ed (φ) at cos θ = 0 is due to the fact that
when cos θ = 0, then the rotation vectors a3 and c1 align so that both ω ab and ω cd are
along the a3 vector while ω bc is along the b2 vector. This means that it is not possible
to describe an angular velocity along a3 × b2 when cos θ = 0. This is the Euler-angle
singularity, which is a singularity due to the mathematical representation of the rotation
matrix.
Ṙ = (ω a )× R = R(ω b )× (6.319)
248 CHAPTER 6. RIGID BODY KINEMATICS
The derivation is based on the coordinate transformation rule using the quaternion
product. For an arbitrary vector u ∈ R3 we have
µ ¶ µ ¶
0 0
=p⊗ ⊗ p̄ (6.320)
Ru u
We take the time derivative of both sides and get
µ ¶ µ ¶ µ ¶ µ ¶ µ ¶
0 0 0 0 0
+ = ṗ ⊗ ⊗ p̄ + p ⊗ ⊗ p̄ + p ⊗ ⊗ p̄˙ (6.321)
Ṙu Ru̇ u u̇ u
Then, because the transformation rule in (6.320) is valid for any vector it is also valid
for u̇. This implies that
µ ¶ µ ¶ µ ¶
0 0 0
= ṗ ⊗ ⊗ p̄ + p ⊗ ⊗ p̄˙
Ṙu u u
µ ¶ µ ¶
0 0
= ṗ ⊗ p̄ ⊗ p ⊗ ⊗ p̄ − p ⊗ ⊗ p̄ ⊗ ṗ ⊗ p̄
u u
µ ¶ µ ¶
0 0
= (ṗ ⊗ p̄) ⊗ − ⊗ (ṗ ⊗ p̄)
Ru Ru
µ ¶
0
= 2 × (6.322)
(η ²̇ − η̇² + ²× ²̇) Ru
where we have used (6.197), (6.191), (6.193), (6.194) and (6.173). From Ṙ = (ω a )× R
we have µ ¶ µ ¶
0 0
= (6.323)
Ṙu (ω a )× Ru
Comparing this with (6.322) we find that the angular velocity ω a is given by
ω a = 2[η ²̇ − η̇² + ²× ²̇] (6.324)
From (6.194) it is seen that this can be written in quaternion form, and this leads to the
result
Here the transformation rule (6.320) has been used, and the kinematic differential
equations appear by postmultiplication with p for the expression in the a frame, and by
premultiplication with p for the expression in the b frame.
The component form of these last four equations gives the result
ωb = 2[η ²̇ − η̇² − ²× ²̇] (6.327)
ωa = 2[η ²̇ − η̇² + ²× ²̇] (6.328)
6.9. KINEMATIC DIFFERENTIAL EQUATIONS 249
1
η̇ = − ²T ω b (6.329)
2
1
²̇ = [ηI + ²× ]ω b (6.330)
2
and
1
η̇ = − ²T ω a (6.331)
2
1
²̇ = [ηI − ²× ]ω a (6.332)
2
Example 110 From (6.174), (6.175) and (6.329—6.332) it is seen that the kinematic
differential equations can be written in vector form as
µ Ã ¡ ¢T !
T ¶
1 0 − (ω a ) 1 0 − ωb
ṗ = × p= ¡ ¢× p (6.333)
2 ω a (ω a ) 2 ωb − ωb
or µ ¶µ ¶ µ ¶µ ¶
1 η −²T 0 1 η −²T 0
ṗ = = (6.334)
2 ² ηI + ²× ωa 2 ² ηI − ²× ωa
This shows that if p is initialized as a unit vector, then it will remain a unit vector, as
should be expected. Numerical integration of the quaternion vector p from the kinematic
differential equation will introduce numerical errors that will cause the length of p to
deviate from unity. To compensate for such errors a normalization term is added to the
kinematic differential equation. This can be done with the following modification of the
kinematic differential equation, which should be used in numerical integration:
µ ¶µ ¶
1 η −²T 0 λ
ṗ = × a + (1 − pT p)p (6.336)
2 ² ηI + ² ω 2
Here λ is a positive gain. Then
d ¡ T ¢ λ
p p = (1 − pT p)pT p (6.337)
dt 2
We see that this will give the desired result as pT p will increase whenever pT p <
1, and pT p will decrease whenever pT p > 1. When pT p = 1 the usual kinematic
differential equations are recovered. Linearization about pT p = 1 gives ė = −λe where
e = 1−pT p. This means that the normalization converges with a time constant T = λ−1 .
A Simulink toolbox has implemented this algorithm with λ = 100, which means that the
normalization converges with a time constant of 0.01 s.
Another alternative is to normalize directly after each time step using the normaliza-
tion assignment
p
p:= p (6.338)
pT p
250 CHAPTER 6. RIGID BODY KINEMATICS
1
R= [2I + 2ρ× + 2ρρT − (1 + ρT ρ)I] (6.353)
1 + ρT ρ
1 + ρT ρ
ρ̇ = (R + I) ω b (6.355)
4
We recall from (6.169) that
TraceR + 1 = 4η 2 (6.356)
and, using (6.244), we arrive at
1
ρ̇ = (R + I) ω b (6.357)
TraceR + 1
∂Vx
V̇x = ẋ = xT v (6.358)
∂x
so that the system with input v and output x is clearly passive. It is interesting to
investigate if similar results can be established for rotational dynamics.
The starting point for such an investigation (Egeland and Godhavn 1994) is the
differential equation
1
η̇ = − ²T ω (6.359)
2
¯ ¯
where |η| = ¯cos θ ¯ ≤ 1. Define
2
V = 2 (1 − η) ≥ 0 (6.360)
The time derivative for solutions of the kinematic differential equations of the Euler
parameters is
V̇ = −2η̇ = ²T ω (6.361)
It follows that the kinematic system with input ω and output ² is passive.
At this stage it is not very difficult to extend this result to other kinematic represen-
tations based on the Euler parameters. First we note that if we multiply the equation
for η̇ by η, we get
1 1
η η̇ = − η²T ω = − eT ω (6.362)
2 4
where e = 2η² is the Euler rotation vector. We are then lead to the function
¡ ¢
Ve = 2 1 − η 2 ≥ 0 (6.363)
252 CHAPTER 6. RIGID BODY KINEMATICS
²T ² + (1 − η)2 = ²T ² + η 2 − 2η + 1 = 2 (1 − η) = V (6.368)
and that ¡ ¢
2²T ² = 2 1 − η 2 = Ve (6.369)
Mω̇ + ω × Mω = τ (6.370)
where M is a constant, symmetric and positive definite matrix, and where the input is
selected to be
τ = −Kd ω − kp ² (6.371)
where Kd is a constant, symmetric and positive definite matrix, and kp is a positive
constant. The energy function
1 T
V = ω Mω + 2kp (1 − η) ≥ 0 (6.372)
2
has time derivative
¡ ¢
V̇ = ω T −ω × Mω − Kd ω − kp + kp ²T ω
= −ω T Kd ω (6.373)
along the solutions of the system. This means that the energy of the system decreases
whenever ω 6= 0. For further details see (Wen and Kreutz-Delgado 1991), where a cross-
term was added to the energy function, and (Egeland and Godhavn 1994).
θ̇ = kT ω (6.374)
Combining this with the kinematic differential equations of the Euler parameters, we get
µ ¶
1£ ×
¤ 1 θ θ
ηI + ² ω = cos θ̇k+ sin k̇
2 2 2 2
which gives
θ ³ ´
2 sin k̇ = η I − kkT ω + ²× ω
2
θ³ ´ θ
= cos I − kkT ω+ sin k× ω
2 2
Then the kinematic differential equation for k is found using k× k× = kkT −I. Whenever
sin (θ/2) 6= 0 the result is
· ¸
1 × × × θ
k̇ = k −k k cot ω (6.375)
2 2
The equations (6.374) and (6.375) have a singularity at θ = 0, which is in agreement
with the fact that k is undefined for a zero rotation θ = 0.
f2 C
f1
f3
In aerospace, automotive steering and ship control the desired trajectory of the system
may be given as a curve in a fixed frame i. The control deviations from the desired curve
to the actual configuration of the system can then be calculated in the Serret-Frenet
frame f . This frame has axes along the tangent, the normal and the binormal of the
curve as shown in Figure 6.8. We will develop the equations for this frame in this section.
254 CHAPTER 6. RIGID BODY KINEMATICS
We let the curve C be given by r (s) where s is the length along the curve. We define
the unit tangent
i
dr
f1 = (6.376)
ds
The principal unit normal of the curve is defined by the unit vector
1 i df1
f2 = (6.377)
κ ds
where ¯ ¯
¯ i df ¯ ¯¯ i d2 r ¯¯
¯ 1¯ ¯ ¯
κ=¯ ¯= (6.378)
¯ ds ¯ ¯ ds2 ¯
is the curvature of the curve. Finally the unit binormal vector is defined by the unit
vector
f3 = f1 × f2 (6.379)
so that f1 , f2 , f3 forms a set of orthogonal unit vectors. The plane defined by f1 and f2
is called the osculating plane, the plane defined by f2 and f3 called the normal plane,
while the plane defined by f3 and f1 is called the rectifying plane.
From f3 · f3 = 1 it follows that
d ³ ´ i
df3
0= f3 · f3 = 2 · f3 (6.380)
ds ds
while (6.377) and f3 · f2 = 0 implies that
i
df1
f3 · = f3 · κf2 = 0 (6.381)
ds
Then, from f3 · f1 = 0 it follows that
d ³ ´ i df
3
i
df3
0= f3 · f1 = · f1 + f3 · κf2 = · f1 (6.382)
ds ds ds
From (6.380) and (6.382) it is seen that i df3 /ds is along f2 . This makes it possible to
write
i
df3
= τ f2 (6.383)
ds
where
i
df3
τ = f2 · (6.384)
ds
is the torsion of the curve. From f2 = f3 × f1 we find that
i i i
df2 df3 df1
= × f1 + f3 × = τ f2 × f1 + f3 × κf2 = −τ f3 − κf1 (6.385)
ds ds ds
The angular velocity ω if of the Serret-Frenet frame f relative to the frame i is seen from
(6.284) to be
à ! à ! à !
i
df2 i
df3 i
df1 ³ ´
ω if = f3 · f1 + f1 · f2 + f2 · f3 = ṡ τ f1 + κf3 (6.386)
dt dt dt
The unit vectors f1 , f2 , f3 of the Serret-Frenet frame satisfies the kinematic differential
equations
i i i
df1 df2 df3
= κf2 , = −κf1 − τ f3 , = −τ f2 (6.387)
ds ds ds
where κ is the curvature and τ is the torsion of the curve. The angular velocity ω if of
the Serret-Frenet frame f relative to the frame i, and the velocity vf of the origin of
frame f are given by ³ ´
ω if = ṡ τ f1 + κf3 , vf = ṡf1 (6.388)
rbf = y f2 + z f3 (6.389)
or in other words, the frame f is placed so that the origin of frame b is in the normal
plane of f . Then the velocity of the origin of b is
i
d
vb = vf + rbf
dt
f
d
= vf + rbf + ω if × rbf (6.390)
dt
which in coordinate form in frame f gives
ṡ 0 0 −ṡκ 0 0
vbf = 0 + ẏ + ṡκ 0 −ṡτ y (6.391)
0 ż 0 ṡτ 0 z
This gives the following relation between the time derivatives ṡ, ẏ, ż of the parameters
s, y, z and the body velocity vbb
ṡ − ṡκy
ẏ − ṡτ z = Rf vbb (6.392)
b
ż + ṡτ y
while the relative angular velocity between the frames b and f is given by
ṡτ
ω fbf = ω fif − ω fib = 0 − Rfb ω bib (6.393)
ṡκ
Stella Polaris
ie
ie t
ye
xi yi
xe
Aries Point
Figure 6.9: The earth-centered star-fixed frame i and the earth-centered earth-fixed frame
e.
ze
N
E
D
L
ye
l
xe
Figure 6.10: The local horizontal frame n with axes N, E, D pointing north, east and
down.
6.11.3 Acceleration
An accelerometer measures the specific force
i 2
d
f= r − g0
dt2
where g0 is the acceleration of gravity. The gravitational field g of the earth is the
combined effect of the acceleration of gravity and the centripetal acceleration due to the
rotation of the earth:
g = g0 − ω ie × (ω ie × r)
The velocity
e i
d d
v := r = r − ω ie × r (6.394)
dt dt
is defined as the time derivative of the position vector in the earth frame. Note that v
i
is not defined as dtd r. In navigation algorithms the time derivative of the velocity v in
the geographic frame is needed. This is the position vector r differentiated first in the e
frame and then in the n frame. This gives
n i
d d
v = v − ω in × v
dt dt µ ¶
i
d id
= r − ω ie × r − ω in × v
dt dt
i 2 i i
d d d
= 2
r − ω ie × r − ω ie × r − ω in × v
dt dt dt
i 2
d
= r − (ω ie + ω in ) × v − ω ie × (ω ie × r)
dt2
i 2
d
= r − (2ω ie + ω en ) × v − ω ie × (ω ie × r) (6.395)
dt2
where it is used that ω ie is constant in the i frame, and that ω in = ω ie +ω en . The specific
force f is therefore
n
d
f= v + (2ω ie + ω en ) × v − g
dt
n
In the n frame the velocity v is found to be given by L, l, h and their derivatives:
vN (re + h) L̇
vn = vE = (re + h) l˙ cos L
vD −ḣ
where h is the height above the surface of the earth. The vector of gravity is assumed to
be
gn = (0, 0, g)T
Then
³ ´
l˙ + 2ω ie vE sin L − L̇vD
fN v̇N ³ ´ 0
f n = fE = v̇E + − l˙ + 2ω ie (vN sin L + vD cos L) − 0 (6.396)
fD v̇D ³ ´ g
l˙ + 2ω ie vE cos L + L̇vN
zi
o
r
zb
p
ro yb
rp
xb
yi
xi
Figure 6.11: Rigid body b with the fixed frame b and the fixed points o and p.
The configuration of a rigid body defines the position of all points in the rigid body.
For a rigid body the configuration can be specified in terms of the position ro of one
fixed point in the rigid body, and the rotation matrix Rib from a reference frame i to
a body-fixed frame b. Then the position of any point p in the rigid body, which is not
necessarily fixed in the rigid body, is given by
rp = ro + r (6.397)
as shown in Figure 6.11.
Here r is the vector from o to p with coordinate vector rb in the b frame. This vector
is given in the i frame by
ri = Rib rb (6.398)
6.12.2 Velocity
The frame i is assumed to be an inertial frame which is also referred to as a Newtonian
frame. The velocities of o and p are given by
i i
d d
vo := ro , vp := rp (6.399)
dt dt
From (6.397) and the rule for differentiation in moving frames it is seen that the velocity
of p can be expressed as
b
d
vp = vo + r + ω ib × r (6.400)
dt
6.12.3 Acceleration
The acceleration vectors are defined by
i 2 i 2
d d
ap := 2
rp , ao := 2 ro (6.401)
dt dt
260 CHAPTER 6. RIGID BODY KINEMATICS
b 2
d
ap = ao + r
|{z} |{z} dt 2
| {z }
Acceleration Acceleration
Second derivative
of p of o
of r in b
b
d
+ 2ω ib × r + αib × r + ω ib × (ω ib × r) (6.405)
| {z } | {z }
| {z dt }
Transversal Centripetal
Coriolis
acceleration acceleration
acceleration
b b 2 b
d d d
ap = vo + ω ib × vo + 2 r + 2ω ib × r + αib × r + ω ib × (ω ib × r) (6.407)
dt dt dt
Note the difference between the term ω ib × vo which is related to the velocity of o,
b
and the Coriolis acceleration 2ω ib × dtd r which is related to the motion of p in the b frame
relative to o.
If the point p is fixed in the body b, then the vector r is constant in frame b so that
b i
d d
r = 0 ⇒ r = ω ib × r, r fixed in b (6.408)
dt dt
6.13. THE CENTER OF MASS 261
while the acceleration ac of the center of mass is found in the same way. We conclude
that
262 CHAPTER 6. RIGID BODY KINEMATICS
zi
dm
r zb
c
rp yb
rc
xb
yi
xi
The motion of the mass center in the rigid body b satisfies the equations
Z Z Z
mrc = rp dm, mvc = vp dm, mac = ap dm (6.419)
b b b
Chapter 7
Newton-Euler equations of
motion
7.1 Introduction
The development of the equations of motions for rigid bodies and systems of rigid bodies
is the topic of this chapter. The equations of motion are differential equations for the
velocity and angular velocity. The derivations in this chapter are based on Newton’s
law and its extension to rotational dynamics, which is usually attributed to Euler. This
provides the motivation for the term Newton-Euler equation of motion. The derivations
rely on vector operations. The presentation starts with some results on forces and torques
on rigid bodies. Then the basic Newton-Euler equations of motion are presented and used
to derive the equations of motion for the ball-and-beam system, the Furuta pendulum
and the inverted pendulum. Then the principle of virtual work is presented, and its use is
demonstrated for multi-body systems. The use of recursive computations in manipulator
dynamics is also discussed.
nF
X
(r)
FS = Fj (7.1)
j=1
263
264 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
F
r
line of action
Figure 7.1: A force F acting on a rigid body. The line of action of the force is indicated
as a dashed line, and the distance r from a point P is shown.
where rP j is the position vector from P to an arbitrary point on the line of action of
(r)
Fj . Note that in this description the resultant FS is a sum of forces, and can not be
considered to be a force with a line of action. Note in particular that the resultant force
does not appear in the expression for the moment NS/P . The moment NS/Q about some
other point Q is found from
nF
X nF
X
NS/Q = rQj × Fj = (rP j + rQP ) × Fj
j=1 j=1
nF
X nF
X
= rP j × Fj + rQP × Fj (7.3)
j=1 j=1
The moment NS/Q of the set S about a point Q is the moment NS/P of the set S about
(r)
the point P plus the moment about Q that would have resulted if the resultant FS had
line of action through P :
(r)
NS/Q = NS/P + rQP × FS (7.4)
This result is straightforward to apply, however, the resultant force does not have a
(r)
line of action, so the procedure of pretending that FS has its line of action through
P is not completely satisfying. Therefore we will follow the approach of (Kane and
Levinson 1985) and introduce an equivalent representation with a bound vector and a
torque. To do this it is necessary to introduce the concept of a torque.
7.2. FORCES AND TORQUES 265
7.2.2 Torque
(r)
A couple is a set C of forces with zero resultant force, that is FC = 0. From (7.4) it
is seen that this implies that NC/P = NC/Q , which means that the moment of a couple
will be the same about any point, and it is therefore meaningful to define the moment of
the couple without reference to any point.
(r)
The torque TC is defined as the moment of the couple C. The resultant FC of a couple
is by definition zero. Therefore, the moment of the couple C is the same about any point,
which means that
TC := NC/P = NC/Q (7.5)
for arbitrary points Q and P .
Example 114 Consider a couple with two forces F1 and F2 that have zero resultant
force, which implies F2 = −F1 . Define the position vector r21 between an arbitrary point
on the line of action of F2 and the line of action of F1 . The torque T of the couple, which
is the moment of the two forces about an arbitrary point P , is then found from
We see that the torque does not depend on the selection of the point P .
Example 115 In this example we will derive force and torque expressions for a satellite
with six gas jet actuators and three momentum wheels. The gas jet actuators set up
forces Fj , and the momentum wheels set up torques Tj . The resultant force and the total
moment about the center of mass are then
6
X 3
X 6
X
F (r) = Fj , Nc = Tj + rj × Fj (7.7)
j=1 j=1 j=1
In the control of the attitude of the satellite it would make sense to arrange the gas jet
actuators in pairs that produce torques in the form of couples. This is done by requiring
F1 = −F4 , F2 = −F5 , F3 = −F6 , r1 = −r4 , r2 = −r5 and r3 = −r6 . This implies
that the resultant force is zero, that is, F (r) = 0. Therefore, the set of forces constitute
a couple, and because of this the moment about the center of mass is actually a torque
Tc = Nc given by
X3 X3
Tc = Tj + 2rj × Fj (7.8)
j=1 j=1
To see that the sets S and Σ will be equivalent we observe that the set Σ will have
(r) (r)
resultant FΣ = FΣ = FS , and the moments about an arbitrary point Q will be equal,
which is confirmed by comparing the expression for NS/Q in (7.4) with the moment NΣ/Q ,
which is the torque TΣ plus the moment of FΣ about Q, that is,
The main difference between the two equivalent representations S and Σ is that when
S is used the resultant is not a true force vector as it is not a bound vector, and the
additional rule (7.4) must be used to find the moment about some other point Q. In
contrast to this, when the set Σ is used, the force FΣ can be treated as a force vector and
the torque TΣ can be treated as a torque, and hence the usual definition of a moment
about a point can be used to calculate the moment about a point Q.
The interpretation of this is that the gravity forces gdm will set up a moment equal to the
moment of the resultant gravity force G would give if G had line of action through the
center of mass. For this reason the center of mass is also called the center of gravity. In
this connection it may be argued that the concept of a center of mass is more fundamental
than a center of gravity which requires the presence of a field of gravity. From (7.4) it
follows that the moment of gravity about the center of mass is zero, that is, NG/c = 0.
The resultant forces acting on a body b will be
nF
X
(r)
Fb =G+ Fj (7.13)
j=1
7.2. FORCES AND TORQUES 267
where Fj are nF contact forces acting on the body. The moment on the body b about
its center of mass c is
nF
X
Nb/c = Tb + rcj × Fj (7.14)
j=1
where rcj = rF j − rc is the vector from the center of mass c to the line of action of the
forces Fj , and Tb is the contact torque due to couples acting the body. Typically this
would be motor torques. There is no moment from gravity as the moment is about the
center of mass. The moment about some other point o is found from the rule (7.4), which
gives
(r)
Nb/o = Nb/c + rg × Fb (7.15)
where
rg := roc (7.16)
Equivalent descriptions of the forces and moments on a body b are (Kane and Levinson
1985)
(r)
1. The resultant force Fb without specification of line of action, the moment Nb/c
about the center of mass, and, in addition, the rule (7.15) for calculating the
moment about some other point o.
(r)
2. The force Fbc = Fb with line of action through the center of mass c in combination
with the torque Tbc = Nb/c .
(r)
3. The force Fbo = Fb with line of action through the point o in combination with
the torque Tbo = Nb/o . Then Fbo and Tbo can be found from Fbc and Tbc with
The resultant force and the moment are represented using Descriptions 2 and 3 is used
in the software package Autolev for multibody simulation based on Kane’s formulation
of the equations of motion.
Example 116 Suppose that Description 2 is used, and that Fbc and Tbc are given. Then
the moment on b about a point o is found from
If Description 3 is used and Fbo and Tbo are given, then the moment on b about c is found
from
Nb/c = Tbo − rg × Fbo (7.20)
268 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
Nk/kc = Tk−1,k + Tk+1,k + (rk−1 − rkc ) × Fk−1,k + (rk − rkc ) × Fk+1,k (7.22)
with line of action through the center of mass, and the torque
To calculate the moment Nk/k−1 on link k about the point k − 1 with position vector
rk−1 , it is used that the force Fkc has line of action through c, and the the moment is
found to be the torque Tkc plus the moment of Fkc about k − 1, which gives
We may check that this makes sense by inserting of the expressions for Tkc and Fkc ,
which gives
where F (r) is the resultant force on the system of particles, and ac is the acceleration of
the center of mass.
The angular momentum of particle k about the center of mass is
zi
m
F
rp
yi
xi
where vk is the velocity of particle k and rc is the position of the center of mass. With
reference to frame i, the time derivative of hk/c is
i
d
hk/c = (vk − vc ) × mk vk + rck × mk ak
dt
= −vc × mk vk + rck × mk ak (7.28)
is the angular momentum of the system about the center of mass, and
N
X
Nc = rck × Fk (7.31)
k=1
is the moment of the forces about the center of mass. This means that the time derivative
of the angular momentum about the center of mass is equal to the moment of the forces
about the center of mass.
set with a force Fbc with line of action through the center of mass and magnitude equal
to the resultant force, and a torque Tbc = Nb/c that equals the moment about the center
of the mass. The equations of motion for a rigid body are then found from (7.26, 7.29)
to be
r = rp − rc (7.35)
is the position of the mass element relative to the center of mass. Using vp = vc + ω ib × r,
this can be written
Z Z
hb/c = rdm × vc + r × (ω ib × r)dm
Zb b
= r × (ω ib × r)dm
b
Z
= − r × (r × ω ib )dm (7.36)
b
where we have used (6.417). By introducing the dyadic representation of the vector cross
product we may write this in the form
Z Z
hb/c = − r× · (r× · ω ib )dm = − r× · r× dm · ω ib (7.37)
b b
When referenced to the center of mass the equation of motion for a rigid body can be
written
dm
r r´
c o
rg
A mixed formulation of the equations of motion where the force and torque are referenced
to the point o and the acceleration and inertia dyadics are referenced to the mass center
is given by
Then the force equation can be referenced to the point o by combining (7.32) and
(6.410). This gives
The torque equation involves the angular momentum about c, while we would like to
have an expression involving the angular momentum about o, which is given by
Z
hb/o = r 0 × vp dm (7.47)
b
where
rp = ro + r 0 (7.48)
vp = vo + ω ib × r 0 (7.49)
272 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
Note that Mb/o is constant in frame b. Time differentiation with respect to reference to
frame i gives
i
d d³ b ´
hb/o = (vc − vo ) × mvo + rg × mao + Mb/o · ω ib + ω ib × (Mb/o · ω ib )
dt dt
= vc × mvo + rg × mao + Mb/o · αib + ω ib × (Mb/o · ω ib ) (7.52)
We may also express the angular momentum about o with the angular momentum
about c by combining (7.34), (7.47) and r 0 = r + rg . This gives
Z Z
hb/o = (r + rg ) × vp dm = hb/c + rg × vp dm (7.53)
b b
= hb/c + rg × mvc (7.54)
With reference to a point o the equation of motion for a rigid body can be written
Example 117 Consider a rigid body with a fixed coordinate frame b with orthogonal unit
vectors b1 , b2 and b3 that coincide with the main axes of inertia of the body b. Then the
inertia dyadic is
Mb/c = m11 b1 b1 + m22 b2 b2 + m33 b3 b3 . (7.63)
where m11 , m22 and m33 are constants. The angular velocity is written
ω ib = ω 1 b1 + ω 2 b2 + ω 3 b3 (7.64)
Insertion of vp = vc + ω ib × r gives
Z
1 1
K= mvc 2 + (ω ib × r) · (ω ib × r)dm (7.68)
2 2 b
R
as vc · ω ib × b
rdm = 0. The last term on the right side is simplified using
Z Z
1 1
(ω ib × r) · (ω ib × r)dm = − (ω ib × r) · (r × ω ib )dm
2 b 2 b
Z
1
= − ω ib · r× · r× · ω ib dm
2 b
Z
1
= − ω ib · r× · r× dm · ω ib
2 b
1
= ω ib · Mb/c · ω ib (7.69)
2
This leads to the following expression for the kinetic energy:
1 1
K= mvc 2 + ω ib · Mb/c · ω ib (7.70)
2 2
274 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
Example 119 Using (7.49) the kinetic energy is found from the computation
Z
1
K = vp · vp dm
2 b
µ Z ¶ Z
1 0 1
= mvo · vo + vo · ω ib × r dm + (ω ib × r 0 ) · (ω ib × r 0 )dm
2 b 2 b
1 1
= mvo · vo + vo · (ω ib × mrg ) + ω ib · Mb/o · ω ib (7.71)
2 2
to have the form
1 1
K = mvo · vo − vo · mrg× · ω ib + ω ib · Mb/o · ω ib (7.72)
2 2
o c
l
2 l xb
in the body-fixed frame b. Let rb = (x, y, z)T . The the inertia matrix is then found to be
2
Z y + z2 −xy −xz
Mbb/c = −xy x2 + z 2 −yz dm (7.83)
b −xz −yz x + y2
2
Under the assumption that the b frame is fixed in the body b, the inertia matrix Mbb/c
in the b frame is a constant matrix. In frame i we have Mib/c = Rib Mbb/c Rbi which will
not be constant if frame b is rotating relative to frame i.
The inertia dyadic of b about o is related to the inertia dyadic of b about c according to
h i
Mb/o = Mb/c − mrg × rg × = Mb/c + m (rg · rg )I − rg rg (7.84)
Example 121 A slender beam has length and mass m. A coordinate frame b is fixed
in the beam with the x axis in the length axis of the beam as shown in Figure 7.4. The
mass element is set to be dm = (m/ )dx. The inertia matrix about the center of mass is
0 0 0
2
Mbb/c = 0 m12 0 (7.86)
m 2
0 0 12
276 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
The inertia matrix about the endpoint o of the beam is found from the parallel axes
theorem to be
0 0 0 µ ¶2 m( 2 )2 0 0 0 0 0
2 2
b
Mb/o = m
0 12 0 +m I− 0 0 0 = 0 m
0
2 3
m 2 0 0 0 m 2
0 0 12 0 0 3
Example 122 The kinetic energy of a rigid body can be expressed with reference to a
point o by
1 ¡ b ¢T b 1 ¡ b ¢T b
K = m vc vc + ω Mb/c ω bib
2 2 ib
1 ¡ b ¢T ¡ b ¢ 1 ¡ b ¢T b
= m vo + (ω bib )× rbg vo + (ω bib )× rbg + ω Mb/c ω bib
2 2 ib
1 ¡ b ¢T b ¡ ¢T ¡ ¢T
= m vc vc + m vob (rbg )×T ω bib + m (ω bib )× rbg vob
2
1 ¡ ¢T ³ b ¡ ¢× ¡ b ¢× ´ b
+ ω bib Mb/c − m rbg rg ω ib
2 Ã
µ b ¶T ¡ ¢×T ! µ ¶
1 vo mI m rbg vob
= ¡ ¢ × (7.87)
2 ω bib m rbg Mbb/o ω bib
when the description is referenced to a fixed point o in the body. In the derivation the
T T
rules a× b = −b× a and (a× b) c = (c× b) a are used.
µ ¶µ ¶ Ã ! µ ¶
mI 0 abc 0
¡ b ¢× b Fbbc
+ = (7.90)
0 Mbb/c αbib ω ib Mb/c ω bib Tbb/c
b
d
In view of ac = dt vc + ω ib × vc the equations of motion can be written
b
d
Fbc = m vc + mω ib × vc (7.91)
dt
Tbc = Mb/c · αib + ω ib × (Mb/c · ω ib ) (7.92)
or
7.3. NEWTON-EULER EQUATIONS FOR RIGID BODIES 277
µ ¶µ ¶ Ã ¡ ¢× ! µ ¶
mI 0 v̇cb m ω bib vcb Fbbc
+ ¡ b ¢× b = (7.93)
0 Mbb/c αbib ω ib Mb/c ω bib Tbbc
In the special case where o is the center of mass, then rg = 0, and the result is the same
as in (7.91, 7.92).
The coordinate form in the b frame is written in matrix form as
µ ¶µ ¶ Ã ¡ ¢× ! µ ¶
mI m(rbg )×T abo m(ω bib )× ω bib rbg Fbbo
+ = (7.96)
m(rbg )× Mbb/o αbib (ω bib )× Mbb/o ω bib Tbbo
Here it is used that a × b = −b × a for any two vectors a and b, and that (·)× =
T
− [(·)× ] . Note that the leading matrix on the left side is symmetric and positive definite.
This matrix can be regarded as a mass matrix.
An alternative formulation is
·b ¸
d
Fbo = m vo + ω ib × vo + αib × rg + ω ib × (ω ib × rg ) (7.97)
dt
b
d
Tbo = mrg × vo + mrg × (ω ib × vo ) + Mb/o · αib + ω ib × (Mb/o · ω ib ) (7.98)
dt
with matrix form
µ ¶µ ¶ µ £ ¤ ¶ µ b ¶
mI m(rbg )×T v̇ob m(ω bib )× (ω bib )× rbg + vob Fbo
+ =
m(rbg )× Mbb/o αbib (ω bib )× Mbb/o ω bib + m(rbg )× (ω bib )× vob Tbbo
The torque Tbbc = (T1 , T2 , T3 )T is acting on the body. The torque law is then
i i ³ ´ bd ³ ´ ³ ´
d d
Tbc = hb/c = Mb/c · ω ib = Mb/c · ω ib + ω ib × Mb/c · ω ib (7.101)
dt dt dt
The inertia dyadic is constant in the b frame, therefore
³ ´
Mb/c · αib + ω ib × Mb/c · ω ib = Tbc (7.102)
g R
m
b 1 z b ,b 3
b2
yb
xb
In this section we will derive the equations of motion for a ball-and-beam system with
a ball that rolls in a track on a beam. To do this we start with the kinematics of the
system, and then combine the equations of motion for the ball and for the beam. We
fix a coordinate system b in the beam so that the xb axis is along the track, and the zb
axis is along the motor shaft. The orthogonal unit vectors b1 , b2 , b3 are placed along the
xb , yb , zb axes. According to (6.103) the scalar products of the unit vectors of frames n
and b are related by
n1 · b1 = cos θ, n1 · b2 = − sin θ (7.107)
n2 · b1 = sin θ, n2 · b2 = cos θ (7.108)
n3 · b1 = n3 · b2 = 0, n3 · b3 = 1 (7.109)
which implies that
n1 = cos θb1 − sin θb2 (7.110)
n2 = sin θb1 + cos θb2 , (7.111)
n3 = b3 (7.112)
7.4. EXAMPLE: BALL AND BEAM DYNAMICS 279
We note that
r2 = xb1 − Rb2 .
The velocity is
b
d ³ ´ ³ ´
v2 = r + ω 1 × r = ẋb1 + θ̇b3 × xb1 − Rb2 = ẋ + θ̇R b1 + θ̇xb2 , (7.115)
dt
and the acceleration is
b
d
a2 = v2 + ω 1 × v2
dt
³ ´ ³ ´ h³ ´ i
= ẍ + θ̈R b1 + θ̈x + θ̇ẋ b2 + θ̇b3 × ẋ + θ̇R b1 + θ̇xb2
³ 2
´ ³ 2
´
= ẍ + θ̈R − θ̇ x b1 + θ̈x + 2θ̇ẋ + θ̇ R b2 . (7.116)
It follows that the ball rolls along the track with an angular velocity given by
µ ¶
ẋ
ω 2 = θ̇ + b3 (7.117)
R
It is noted that the contact torque between the ball and the beam is zero.
The angular momentum equation for the ball is (7.32)
n
µ ¶
d ẍ
T2c = J2 ω 2 = J2 θ̈ + b3 (7.121)
dt R
280 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
about the contact point between the ball and the beam in the equation of motion. The
reason for this is that the unknown constraint force Fx will not show up in the torque
in this case. From (7.45) the moment N2/o and the torque T2c are related through the
expression ³ ´
N2/o = T2c + −Rb2 × m2 a (7.123)
which gives
µ ¶ ³ ´
ẍ 2
m2 Rg sin θ = J2 θ̈ + + m2 R ẍ + θ̈R − θ̇ x (7.124)
R
µ ¶
¡ ¢ J2 2
= J2 + m2 R2 θ̈ + + m2 R ẍ − m2 Rxθ̇ (7.125)
R
This is written
¡ ¢ 1 ¡ ¢ 2
J2 + m2 R2 θ̈ + J2 + m2 R2 ẍ = m2 Rxθ̇ + Rm2 g sin θ (7.126)
R
By inserting the value of J2 from (7.118), we get
¡ ¢ 7
J2 + m2 R2 = m2 R2 (7.127)
5
The Newton’s law for the ball is
m2 a2 = F + G2 (7.128)
In the yb direction this gives
³ 2
´
m2 θ̈x + 2θ̇ẋ + θ̇ R = Fy + m2 g cos θ (7.129)
To proceed an expression for the contact force Fy from the beam on the ball is needed.
This can be found from the equation of motion for the beam. The contact force from
the ball on the beam in the yb direction is −Fy . In the equation of motion for the beam
this gives
J1 θ̈b3 = xb1 × (−Fy b2 ) + T b3 (7.130)
which leads to
J1 θ̈ = −xFy + T (7.131)
This equation is combined with (7.129), and the result is
¡ ¢ 2
J1 + m2 x2 θ̈ = T + m2 gx cos θ − 2m2 xθ̇ẋ − m2 θ̇ xR (7.132)
where T is the motor torque and Fy is the contact force in the yb direction.
Example 123 The rate of change of the energy of the ball and beam system will be equal
to the power θ̇T supplied by the torque T . If the model does not satisfy this condition,
then the model is not correct, which provides us with a method to check the validity of
the model. The total energy of the system is
1 1 1
V = J1 ω 1 · ω 1 + J2 ω 2 · ω 2 + m2 v2 · v2 + m2 g (−x sin θ + R cos θ)
2 2 2
µ ¶2 µ³ ´2 ³ ´2 ¶
1 2 1 ẋ 1
= J1 θ̇ + J2 θ̇ + + m2 ẋ + θ̇R + θ̇x
2 2 R 2
+m2 g (−x sin θ + R cos θ) (7.135)
The time derivative along the solutions of the system is
µ ¶ µ ¶ ³ ´ ³ ´
ẋ ẍ
V̇ = θ̇J1 θ̈ + θ̇ + J2 θ̈ + + ẋ + θ̇R m2 ẍ + θ̈R
R R
³ ´
+θ̇xm2 θ̈x + θ̇xm2 θ̇ẋ − m2 g ẋ sin θ + xθ̇ cos θ + Rθ̇ sin θ
µ ¶ µ ¶
¡ ¢ ẋ ¡ ¢ ẍ 2
= θ̇ J1 + m2 x2 θ̈ + θ̇ + J2 + m2 R2 θ̈ + + m2 xẋθ̇
R R
³ ´
−m2 g ẋ sin θ + xθ̇ cos θ + Rθ̇ sin θ
= θ̇T (7.136)
This result shows that the model is consistent with the energy flow in the system.
Example 124 Insertion of ω 2 = θ̇ + ẋ/R gives a diagonal mass matrix:
¡ ¢ 2
J1 + m2 x2 θ̈ = T + m2 gx cos θ − 2m2 xθ̇ẋ − m2 θ̇ xR (7.137)
7 2
m2 R2 ω̇ 2 = Rm2 θ̇ x + Rm2 g sin θ (7.138)
5
Example 125 If the radius of the ball becomes small, that is, when R → 0, then the
model becomes
¡ ¢
J1 + mvx2 θ̈ = T + m2 gx cos θ − 2mvxθ̇ẋ (7.139)
7 2
m2 ẍ = m2 θ̇ x + m2 g sin θ (7.140)
5
Example 126 Linearization about θ̇ = 0, θ = 0, ẋ = 0 and x = 0 gives
J1 θ̈ = T + m2 gx (7.141)
5
ẍ = gθ (7.142)
7
which gives
d4 1 5 g
x= m2 gx + T (7.143)
dt4 J1 7 J1
mp
p
mv
m
mb at the end of a massless rod of length Lb . The angle of the pendulum is denoted θb ,
which is zero at the upright position.
To derive the equations of motion for the system we will first describe the kinematics
of the system by assigning coordinate frames n and b to describe the motion of the cart
and the pendulum, and then derive kinematic equations for the unit vectors of frames
n and b. A non-moving coordinate frame n is defined with unit vector n1 along the
motion of the cart, with n2 in the vertical downwards direction and n3 along the axis of
rotation. A frame b is fixed to the pendulum. The rotation matrix is Rnb = Rz,θb which
is a rotation by an angle θb about the axis defined by n3 = b3 . The angular velocity of
the pendulum is ω b = θ̇b n3 = θ̇b b3 . The relation between the unit vectors in frames n
and b is as given in Section 7.4.
The next step in the derivation of the equations of motion is to derive kinematic
equations for position, velocity and acceleration. The position of the point mass m1 is
rb = xn1 − Lb b2 (7.144)
At this stage, the kinematic model has been established, and the equations of motion
can be derived. This is done by combining Newton’s law for the point mass and for the
cart, and with the torque law for the pendulum. Newton’s law for the point mass gives
mb ab = Fb + mgn2 (7.147)
mv ẍ = F − Fb · n1 (7.149)
The torque law for the pendulum about the connection point is according to (7.45)
³ ´
−Lb b2 × mb gn2 = −Lb b2 × mb ẍn1 + θ̈b Lb b1 − θ̇b Lb b2 (7.151)
where rg = −Lb b2 in the notation of (7.45). The component of this equation in the n3
direction is
mb Lb g sin θb = mb Lb ẍ cos θb + mb L2b θ̈b (7.152)
The model for the cart and pendulum has then been found to be
2
(mv + mb )ẍ + mb Lb θ̈b cos θb = mb θ̇b Lb sin θb + F (7.153)
mb L2b θ̈b + mb Lb ẍ cos θb = mb Lb g sin θb (7.154)
Example 127 The rate of change of the energy in the system is equal to the power F ẋ
supplied by the external force F . We will now check if the model is consistent with this
observation. The total energy of the system is
1 1
V = mv ẋ2 + mb vb · vb + mb gLb cos θb
2 2
1 1 2
= mv ẋ2 + mb (ẋ2 + 2Lb cos θb ẋθ̇b + θ̇b L2b ) + mb gLb cos θb (7.155)
2 2
The time derivative of the energy along the solutions of the system is
h i ³ ´
V̇ = ẋ (mv + mb )ẍ + mb Lb cos θb θ̈b + θ̇b mb L2b θ̈b + mb Lb cos θb ẍ
2
−Lb mb sin θb ẋθ̇b − mb gLb θ̇b sin θb
³ 2
´ 2
= ẋ mb θ̇b Lb sin θb + F + θ̇b mb Lb g sin θb − Lb mb sin θb ẋθ̇b − mb gLb θ̇b sin θb
= F ẋ (7.156)
This shows that the model is consistent with the energy flow of the system.
Next we combine the cart and pendulum model with the motor model. The cart is
controlled with a current controlled DC motor with dynamics given by
Jm θ̈m = KT u − TL (7.157)
where θm is the motor angle, u is the input, KT is the torque constant, Jm is the inertial
of the motor, and TL is the load torque from the cart. The motor is connected to the cart
with a string that runs over a pulley fixed to the motor axis. The radius of the pulley is
r, and it follows that
TL = rF, ẋ = rθ̇m (7.158)
284 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
which gives
Jm KT
ẍ = u−F (7.159)
r2 r
It is observed that the cart and pendulum is driven by the motor through a port with
effort F and and flow ẋ. The effort F is input to the cart and pendulum model, and the
flow ẋ is output. At the same time the motor model has input F and output ẋ. This
means that the inputs and the outputs of the port interconnection are incompatible, so
that the equations must be combined by adding equations (7.153) and (7.159). This gives
2 KT
(m + mb )ẍ + mb Lb cos θb θ̈b − mb θ̇b Lb sin θb = u (7.160)
r
where m = mv + Jm /r2 .
mc
c
b mb
mv
m
A double pendulum system is obtained by adding one more pendulum to the cart
and pendulum system as shown in Figure 7.7. The variables of the second pendulum are
denoted with a subscript c. The position of the point mass mc of the second pendulum
is
rc = xn1 − Lc c2 (7.163)
The velocity is
vc = ẋn1 + θ̇c Lc c1 (7.164)
7.6. EXAMPLE: THE FURUTA PENDULUM 285
and acceleration is
2
ac = ẍn1 + θ̈c Lc1 + θ̇c Lc c2 (7.165)
Newton’s law for the point mass of the second pendulum gives
³ 2
´
mc ẍ + θ̈c Lc cos θc − θ̇c Lc sin θc = Fc · n1 (7.166)
Newton’s law for the cart is modified by one additional term, which is due to the contact
force from the second pendulum. This gives
mv ẍ = F − Fb · n1 − Fc · n1 (7.167)
The torque law for the second pendulum about the connection point is
and the unit vectors of frame b and frame c have direction cosines
It is noted that
c3
m
c2
c1
n3
n1 L2
n2 1 2
b3
L1
T
b2
b1
Figure 7.8: Coordinate frames n, b and c used in the description of the Furuta pendulum.
and that
b1 × c3 = − cos θ2 c2 (7.181)
b3 × c1 = cos θ2 c2 , b3 × c2 = − cos θ2 c1 − sin θ2 c3 , b3 × c3 = sin θ2 c2 (7.182)
The acceleration of gravity is g = −gn3 . The first link is rotated with angular velocity
ω 1 = θ̇1 b3 (7.183)
which gives
³ 2
´
a = −L1 θ̈1 b1 + L2 θ̈1 sin θ2 + 2L2 θ̇1 θ̇2 cos θ2 − L1 θ̇1 b2
³ 2
´ ³ 2 2
´
+ L2 θ̈2 − L2 θ̇1 sin θ2 cos θ2 c1 − L2 θ̇1 sin2 θ2 + L2 θ̇2 c3 (7.186)
The kinematic equations have now been established, and we will develop the equations
of motion. Newton’s law for the mass gives
F = ma
where F is the force on link 2 from link 1. The the torque law for the first angle is
L2 c3 × (−mg b3 ) = L2 c3 × ma (7.190)
which is simplified to
2
L2 mg sin θ2 = mL22 θ̈2 − mL1 L2 cos θ2 θ̈1 − mL22 θ̇1 sin θ2 cos θ2 (7.192)
Example 128 The derivation of the dynamic model of the Furuta pendulum is quite
complicated, and it is important to check for errors in the model. This can be done by
investigating if the model satisfies the energy flow requirement that the time derivative
of the total energy is equal to the power θ̇1 T supplied by the motor torque T . The total
energy is the kinetic energy of the first rotational link, the kinetic energy of the mass,
and the potential energy due to gravity. This gives
1 2 1
V = J1 θ̇1 + mv · v + mgL2 cos θ2
2 2
1 2 1 ³ 2 2 2 2
´
= J1 θ̇1 + m L1 θ̇1 + L22 sin2 θ2 θ̇1 + L22 θ̇2 − 2L1 L2 θ̇1 θ̇2 cos θ2 + mgL2 cos θ2
2 2
1 2 1 2
= (J1 + mL21 + mL22 sin2 θ2 )θ̇1 + mL22 θ̇2
2 2
−mL1 L2 θ̇1 θ̇2 cos θ2 + mgL2 cos θ2 (7.195)
This shows that the model is consistent with the energy flow dynamics.
• In the design of a robot control system we are interested in the motor torques
required for a desired acceleration. In the mechanical design of a robot it is different,
then it is important that the forces of constraint that appear in the bearings of the
joints are within acceptable limits so that the joint is not damaged. Note that as
long as the robot joints are intact, the forces of constraint are not relevant in the
control systems design.
7.7. PRINCIPLE OF VIRTUAL WORK 289
• In speed control of a train the control problem is to set up an engine force that
give a desired acceleration. The mechanical design problem is to ensure that the
tracks and the wheels can support the forces of constraint, which in this case are
the forces required to keep the train on the track.
• For a football player the motion control problem is to use the muscles of the leg
to set up active forces that result in a desired motion. For the knee the muscles
will provide the active forces that rotate the knee about its axis of rotation. The
forces of constraint will keep the knee join together so that is not damaged. As
long as the joint is strong enough, the football player need not be concerned about
the forces of constraint.
From this we get the idea that in the design of control systems we need not know the
forces of constraint to get the solutions we are seeking. It turns out that it may be quite
complicated to derive the forces of constraint, and therefore it seems to be attractive
to find a way to eliminate the forces of constraint from the equations of motion. The
principle of virtual work is a tool that allows us to do this, but first we have to introduce
generalized coordinates and the concept of virtual displacements.
d2 (r)
mk rk = Fk (7.198)
dt2
Note that all differentiations of vectors are done in the Newtonian frame i in this section.
Adding over all particles gives
N
X N
X (r)
d2
mk 2
rk = Fk (7.199)
dt
k=1 k=1
rk = rk [q(t), t] (7.200)
Then the variables q1 , . . . , qn are called the generalized coordinates of the system. If
n is the minimum number of generalized coordinates that define the configuration of
the system, then q1 , . . . , qn will in addition be termed the minimal coordinates. The
n-dimensional space described by the generalized coordinates is called the configuration
space of the system.
The velocity of particle k can be expressed in terms of the generalized coordinates
according to
Xn
d ∂rk ∂rk
vk = rk = q̇i + (7.201)
dt i=1
∂qi ∂t
290 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
Example 129 For later use we note that (7.201) implies that partial differentiation of
vk with respect to q̇i gives
∂vk ∂rk
= (7.202)
∂ q̇i ∂qi
Moreover, we find that by interchanging derivation with respect to qi and t that
where δqi is the virtual displacement in the generalized coordinate qi . If the time deriva-
tives q̇i of the generalized coordinates are independent, then the virtual displacements
δqi are linearly independent, and there are n independent virtual displacements δrk , and
the system is said to have n degrees of freedom.
If there is a linear constraint on the generalized velocities q̇i given by
A(q)q̇ = 0 (7.205)
A(q)δq = 0 (7.206)
where δq = (δq1 , . . . , δqn )T . If the null-space of A(q) has dimension ndof ≤ n, which
means that there are ndof independent generalized velocities q̇i , then there are ndof
independent virtual displacements δrk and the system is said to have ndof degrees of
freedom.
(c)
Here Fk is the force of constraint acting on particle k. Then the resultant force on
particle k is given by
(r) (c)
Fk = Fk + Fk (7.208)
7.7. PRINCIPLE OF VIRTUAL WORK 291
k
F c
F k
Constraint
Actuators d System d
r
dt k
r
dt k
mechanism
Figure 7.9: A mechanical system is driven by actuators that set up active forces Fk acting
on the system. In addition there is a constraint mechanism that set up constraint forces
(c)
Fk that ensures that the system does not break in parts. It simplifies the equation of
motion greatly if the forces of constraint are formulated so that they do not influence on
the action of the active forces, which is achieved by the principle of virtual work. The
forces of constraint can then be eliminated from the equations of motion.
which is called d’Alembert’s principle. Note that the only forces appearing in this for-
mulation are the externally applied forces Fk .
If we insert the expression for δrk from (7.204) and change the order of the summation,
we find that
Xn N
X µ ¶
∂rk d2 rk
δqi · mk 2 − Fk = 0 (7.211)
i=1
∂qi dt
k=1
If the virtual displacements δqi in the generalized coordinates are independent, then
d’Alembert’s principle can be written
N
X µ ¶
∂rk d2 rk
· mk 2 − Fk = 0 (7.212)
∂qi dt
k=1
Example 130 A train is running along a railway. The generalized coordinate of the
292 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
r
t
c
F k
q
r
v
rq,t r
q
q i i
Figure 7.10: Train running along a track r (q, t) where the track has a velocity ∂r/∂t
due to the rotation of the earth. The virtual displacement δr is along the track, and the
force of constraint F(c) is perpedicular to the track in accordance with the principle of
virtual work.
train is the position coordinate along the railway track, which is denoted q. The position
of the train in a Newtonian coordinate frame is r (q, t), and the velocity of the train is
dr ∂r ∂r
v= = q̇ + (7.213)
dt ∂q ∂t
Here the first term on the right side is due to the motion along the track, and the other
term is due to the rotation of the earth. The virtual displacement of the train is defined
as
∂r
δr = δq (7.214)
∂q
which is a vector tangent to the track. The train is subjected to the resultant force
F (r) =F + F (c) where F (c) is the constraint force that keeps the train on the track, and
F is the motor and braking force that controls the velocity of the train. The principle of
virtual work then simply states that
δr · F (c) = 0 (7.215)
The physical interpretation of this is that F (c) is normal to the track because δr is tangent
to the track. This is illustrated in Figure 7.10.
Example 131 In coordinate form we have
δrk = Jk δq (7.216)
The principle of virtual work states that for all δq we have
N
X N
X
(c) (c)
0= δrTk Fk T
= δq JTk Fk (7.217)
k=1 k=1
7.8. PRINCIPLE OF VIRTUAL WORK FOR A RIGID BODY 293
(c)
This means that the constraint force Fk satisfies
N
X (c)
JTk Fk = 0 (7.218)
k=1
(c)
which shows that Fk is in the null-space of JT , while the active force Fk is the part of
(r) (c)
the resultant force Fk = Fk + Fk that is in the range space of Jk . Extensive treatment
of null-spaces and range space is found in (Strang 1988).
where
∂rc ∂vc ∂ω ib
vc,j = = , ω ib,j = (7.222)
∂qj ∂ q̇j ∂ q̇j
Following the terminology of (Kane and Levinson 1985), vc,j is called partial velocity
j and ω ib,j is called partial angular velocity j. The virtual displacements may then be
defined by
n
X
δrc = vc,j δqj (7.223)
j=1
Xn
σ ib = ω ib,j δqj (7.224)
j=1
294 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
Example 132 If the configuration is given partly in terms of a rotation matrix, then it
may not be convenient to use generalized coordinates. In this case the use of generalized
velocities uj will serve our purpose. Then the velocity and angular velocity is given by
n
X
vc = vc,j uj + vt (7.225)
j=1
Xn
ω ib = ω ib,j uj + ω t (7.226)
j=1
where the partial velocities and the partial angular velocities are given by
∂vc ∂ω ib
vc,j = , ω ib,j = (7.227)
∂uj ∂uj
Example 133 In a description using the velocity vo of a point o in the rigid body the
partial velocities vo,j = ∂vo /∂ q̇j will be needed in the virtual displacements
n
X
δro = vo,j δ q̇j (7.230)
j=1
of the point o. The virtual displacements in rotation are the same as when the velocity
of the center of mass is used.
where F (r) is the resultant force on the body b, and Nb/c is the moment on the body b
about the center of the mass. As usual we will represent F (r) and Nb/c by the equivalent
description where Fbc is a force vector equal to the resultant force and that has line of
action through the center of mass, and Tbc is a torque that is equal to the moment of the
forces about the center of mass. The power supplied to a rigid body is then given by
(a) (c)
The force Fbc is given as a sum of an active force Fbc and a constraint force Fbc , and in
(a)
the same way the torque Tbc is the sum of an active torque Fbc and a constraint torque
(c)
Tbc . This is written
(a) (c) (a) (c)
Fbc = Fbc + Fbc , Tbc = Tbc + Tbc (7.233)
(c)
According to the principle of virtual work the force of constraint Fbc and the torque of
(c)
constraint Tbc on a rigid body satisfy
(c) (c)
δrc · Fbc + σ ib · Tbc = 0 (7.234)
where δrc and σ ib are the virtual displacements defined by (7.223 and (7.224).
The equations of motion for the rigid body can then be written
(a) (c)
mk ack − Fkc − Fkc = 0 (7.238)
(a) (c)
Mk/c · α0k + ω 0k × (Mk/c · ω 0k ) − Tkc − Tkc = 0 (7.239)
for body k.
The power supplied to the multi-body system from the forces Fkc and torques Tkc is
n ³
X ´
P = vck · Fkc + ω 0k · Tkc (7.241)
k=1
where the result is obtained by summing up the power supplied to each rigid body.
According to the principle of virtual work the forces and torques of constraint satisfy
n ³
X ´
(c) (c)
δrck · Fkc + σ 0k · Tkc = 0 (7.242)
k=1
From this result it is seen that the forces and torques of constraint can be eliminated by
summing up the equations (7.240) for all k, which gives
n h
X ³ ´ ³ ´i
(a) (a)
δrck · mk ack − Fkc + σ 0k · Mk/c · α0k + ω 0k × (Mk/c · ω 0k ) − Tkc =0
k=1
Insertion of the expression for the virtual displacements δrck and σ 0k from (7.236) gives
n h
X ³ ´ ³ ´i
(a) (a)
vck,j · mk ack − Fkc + ω 0k,j · Mk/c · α0k + ω 0k × (Mk/c · ω 0k ) − Tkc δqj = 0
k=1
Note that this is a sum over the bodies numbered by k, while the index j of the generalized
coordinate is held constant. To complete the derivation we define the generalized forces
n
X (a) (a)
τj = vck,j · Fkc + ω 0k,j · Tkc (7.243)
k=1
and note that the variations δqj of the generalized coordinates are assumed to be arbi-
trary. Then the following result appears:
7.9. MULTI-BODY DYNAMICS AND VIRTUAL WORK 297
The equations of motion for a multi-body system with generalized coordinates qj can be
written
n h
X ³ ´i
vck,j · mk ack + ω 0k,j · Mk/c · α0k + ω 0k × (Mk/c · ω 0k ) = τ j (7.244)
k=1
where n
X (a) (a)
τj = vck,j · Fkc + ω 0k,j · Tkc (7.245)
k=1
The force and torque are written as the sum of the active and constraint part according
(a) (c) (a) (c)
to Fbo = Fbo + Fbo and Tbo = Tbo + Tbo . Again the constrain force and torque is
eliminated with the principle of virtual work, which gives
n h
X ³ ´ ³
(a)
δrok · mk ack − Fko + σ0k · rgk × mk aok + Mk/o · α0k
k=1
´i
(a)
+ω 0k × (Mk/o · ω 0k ) − Tko ) = 0 (7.248)
n
X (a) (a)
τj = vok,j · Fko + ω 0k,j · Tko (7.249)
k=1
The equations of motion for a multi-body system with generalized coordinates qj can be
written
n h
X ³
vok,j · mk aok + ω 0k,j · rgk × mk aok + Mk/o · α0k
k=1
´i
+ω 0k × (Mk/o · ω 0k ) = τj (7.250)
where n
X (a) (a)
τj = vok,j · Fko + ω 0k,j · Tko (7.251)
k=1
Example 134 A simple example is presented to illustrate the use of the equation of
motion in the form (7.250). It is clear that this formulation is overly complicated for
298 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
this system, however, it may be a worthwhile exercise to understand the concept of this
section. Consider a thin beam with homogeneous mass distribution and length L. The
end of the beam denoted o. The beam is driven by a motor that is attached at o and
rotates the beam by a angle θ and acts with a torque T = τ b3 on the beam. The velocity
of o is zero. A frame b is fixed to the beam so that b1 is along the length of the beam,
and b3 is the axis of rotation of the motor. A fixed frame i has axes that coincide with
the axes of b when θ = 0. The rotation matrix, the angular velocity and the angular
acceleration from i to b are
The position of the point o is ro = 0, and it follows that vo = 0 and ao = 0. The inertia
dyadic about o is
mL2 ³ ´
Mo = b2 b2 + b3 b3 (7.253)
3
The angle θ is selected as the generalized coordinate of the system. The associated general
force is τ . Then
vo,1 = 0, ω ib,1 = b3 (7.254)
The principle of virtual work gives
³ ´
0 = ω ib,1 · Mo · αib + ω ib × (Mo · ω ib ) − T (7.255)
mL2
θ̈ = τ (7.257)
3
ω1 = θ̇b3 (7.258)
b3
ω2 = θ̇b3 + ẋ (7.259)
³ R ´
v2 = θ̇ Rb1 + xb2 + ẋb1 (7.260)
7.9. MULTI-BODY DYNAMICS AND VIRTUAL WORK 299
α1 = θ̈b3 (7.262)
µ ¶
ẍ
α2 = θ̈ + b3 (7.263)
R
The partial angular velocities and partial velocities are then found to be
The forces and torques acting on the beam and ball are represented by the forces and
torques
F1 = 0 (7.267)
F2 = Fx b1 + Fy b2 + m2 gn2 (7.268)
T1/c = T b3 + xb1 × (−F ) = T b3 − xFy b3 (7.269)
T2/c = Rb2 × F2 = −RFx b3 (7.270)
Here the constraint forces Fx and Fy should have been left out according to the procedure
of the virtual work, however, but we keep them in the derivation to see that they are
actually cancelled.
The equation of motion (7.244) gives
v2,1 · m2 a2 + ω 1,1 · M1/c · α1 + ω 2,1 · M2/c · α2 = v2,1 · F2 + ω 1,1 · T1/c + ω 2,1 · T2/c
v2,2 · m2 a2 + ω 2,2 · M2/c · α2 = v2,2 · F2 + ω 2,2 · T2/c
which give
³ ´ ³³ 2
´ ³ 2
´ ´
Rb1 + xb2 · m2 ẍ + θ̈R − θ̇ x b1 + θ̈x + 2θ̇ẋ + θ̇ R b2
µ ¶
ẍ
+b3 · J1 θ̈b3 + b3 · J2 θ̈ + b3
R
³ ´ ³ ´ ³ ´
= Rb1 + xb2 · Fx b1 + Fy b2 + m2 gn2 + b3 · T b3 − xFy b3 − b3 · RFx b3
and
³³ ´ ³ ´ ´ b µ ¶
2 2 3 ẍ
b1 · m2 ẍ + θ̈R − θ̇ x b1 + θ̈x + 2θ̇ẋ + θ̇ R b2 + · J2 θ̈ + b3
R R
³ ´ b ³ ´
3
= b1 · Fx b1 + Fy b2 + m2 gn2 + · −RFx b3
R
300 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
Note that at this point the forces of constraint Fx and Fy are eliminated from the
equations. Evaluation of the scalar products gives
³ 2
´ ³ 2
´
Rm2 ẍ + θ̈R − θ̇ x + xm2 θ̈x + 2θ̇ẋ + θ̇ R
µ ¶
ẍ
+J1 θ̈ + J2 θ̈ + = m2 g (R sin θ + x cos θ) + T
R
and ³ ´ J µ ¶
2 2 ẍ
m2 ẍ + θ̈R − θ̇ x + θ̈ + = m2 g sin θ
R R
By rearranging the equations we find that
This model is found to be equivalent to the model (7.133, 7.134) derived with the
Newton-Euler method as (7.272) is equal to (7.134), and (7.271) is obtained by adding
7.134 to (7.133).
The force of the cart is F n1 , while the force on the pendulum is the gravity force mb gn2 .
The pendulum is assumed to be made with a massless rod and a point mass, and it
follows that the inertia dyadic is zero.
The nonzero partial velocities and partial angular velocities are
where we have left out the force of constraint Fb that would have been cancelled anyway
if it had been included. By evaluating the scalar products, we find that the equations of
motion are given by
2
(mv + mb ) ẍ + mb Lb cos θb θ̈b − mb Lb sin θb θ̇b = F (7.281)
mb Lb cos θb ẍ + mb L2b θ̈b = mb Lb g sin θb (7.282)
The gravity force on the second pendulum is mc gn2 . The nonzero partial velocities and
partial angular velocities are
and the equations of motion are found by evaluation of the scalar products to be
ω1 = θ̇1 b3 (7.295)
ω2 = θ̇1 b3 + θ̇2 c2 (7.296)
ac1 = 0 (7.297)
³ 2
´
ac2 = −L1 θ̈1 b1 + L2 θ̈1 sin θ2 + 2L2 θ̇1 θ̇2 cos θ2 − L1 θ̇1 b2
³ 2
´ ³ 2 2
´
+ L2 θ̈2 − L2 θ̇1 sin θ2 cos θ2 c1 − L2 θ̇1 sin2 θ2 + L2 θ̇2 c3 (7.298)
The inertia dyadics are M1/c = J1 (n2 n2 + n3 n3 ) and Mc2 = 0. Then Kane’s equations
of motion give
³ ´
vc2,1 · m2 ac2 + ω 1,1 · M1/c · α1 = τ1 (7.301)
vc2,2 · m2 ac2 = vc2,2 · (−m2 gn3 ) (7.302)
These two equations are identical to equations (7.187) and (7.190) that were used in the
development of the model with the Newton-Euler approach. The rest of the derivation
is therefore as in Section 7.6.
and
c2
q2
b1
b2
c1
a2
a1
q1
x
ω1 = q̇1 k1 (7.307)
ω2 = (q̇1 + q̇2 ) k2 (7.308)
α1 = q̈1 k1 (7.309)
α2 = (q̈1 + q̈2 ) k2 (7.310)
This gives the following partial velocities and partial angular velocities:
The mass of link 1 is m1 , the mass of link 2 is m2 , and the inertia dyadics about the
centers of mass are
³ ´
vc2,2 · m2 ac2 + ω 2,2 · M2/c · α2 + ω 2 × (M2/c · ω 2 ) = τ 2 (7.322)
This gives
³ ´
Lc1 j1 · m1 q̈1 Lc1 j1 − q̇12 Lc1 i1
³ ´ ³
+ L1 j1 + Lc2 j2 · m2 q̈1 L1 j1 + (q̈1 + q̈2 ) Lc2 j2
´
−q̇12 L1 i1 − (q̇1 + q̇2 )2 Lc2 i2
³ ´
2
Lc2 j2 · m2 q̈1 L1 j1 + (q̈1 + q̈2 ) Lc2 j2 − q̇12 L1 i1 − (q̇1 + q̇2 ) Lc2 i2
angular velocities and the angular accelerations are as in the previous section. The
velocity of the origin of frame 1 and 2 are given by
vo1 = 0 (7.327)
vo2 = q̇1 L1 j1 (7.328)
This gives the following partial velocities and partial angular velocities:
ao1 = 0 (7.331)
ao2 = q̈1 L1 j1 + q̇1 L1 ω 1 × j1
= q̈1 L1 j1 − q̇12 L1 i1 (7.332)
The inertia dyadic about the origins are found from the parallel axes theorem (7.84) to
be
¡ ¢ ¡ ¢
M1/o = I1x i1 i1 + I1y + m1 L2c1 j1 j1 + I1z + m1 L2c1 k1 k1 (7.333)
¡ 2
¢ ¡ 2
¢
M2/o = I2x i2 i2 + I2y + m2 Lc2 j2 j2 + I2z + m2 Lc2 k2 k2 (7.334)
vo2,1 · m2 ac2
³ ´
+ω 1,1 · M1/o · α1 + ω 1 × (M1/o · ω 1 )
³ ´
+ω 2,1 · rg2 × mao2 + M2/o · α2 + ω 2 × (M2/o · ω 2 ) = τ 1 (7.335)
³ ´
ω 2,2 · rg2 × ma2 + M2/o · α2 + ω 2 × (M2/o · ω 2 ) = τ 2 (7.336)
which gives
³ ´
L1 j1 · m2 q̈1 L1 j1 + (q̈1 + q̈2 ) Lc2 j2 − q̇12 L1 i1 − (q̇1 + q̇2 )2 Lc2 i2
¡ ¢ ³ ´
+ I1z + m1 L2c1 q̈1 + k2 · Lc2 i2 × m2 q̈1 L1 j1 − q̇12 L1 i1
¡ ¢
+ I2z + m2 L2c2 (q̈1 + q̈2 ) = τ 1 (7.337)
³ ´ ¡ ¢
k2 · Lc2 i2 × m2 q̈1 L1 j1 − q̇12 L1 i1 + I2z + m2 L2c2 (q̈1 + q̈2 ) k2 = τ 2 (7.338)
and finally the equations of motions are found to be
¡ ¢
I1z + I2z + m1 L2c1 + m2 L2c2 + m2 L21 + 2m2 L1 Lc2 cos q2 q̈1
¡ ¢
+ I2z + m2 L2c2 + m2 L1 Lc2 cos q2 q̈2
£ ¤
−m2 L1 Lc2 sin q2 2q̇1 q̇2 + q̇22 = τ 1 (7.339)
¡ ¢
[I2z + m2 (L2c2 + L1 Lc2 cos q2 )]q̈1 + I2z + m2 L2c2 q̈2 + m2 L1 Lc2 sin q2 q̇12 = τ 2 (7.340)
This is the same result as the result of the previous section.
306 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
K1 = τ 1 − τ 2 , K2 = τ 2 (7.342)
The equations of motion for the two link manipulator are then
ω1 = u1 k1 (7.346)
ω2 = u2 k2 (7.347)
Following the method of (Kane and Levinson 1983) we introduce intermediate variables
Zi for simplifying the derivation. The velocities are written
vc1 = Z1 u1 j1 (7.348)
vc2 = Z2 u1 j1 + Z3 u2 j2 (7.349)
and
vc1 = Z4 j1 (7.350)
vc2 = Z5 j1 + Z6 j2 (7.351)
Z4 = u1 Z1 , Z5 = u1 Z2 , Z6 = u2 Z3 (7.353)
7.9. MULTI-BODY DYNAMICS AND VIRTUAL WORK 307
The nonzero partial velocities and partial angular velocities with respect to u1 and u2
are
vc1,u1 = Z1 j1 , vc2,u1 = Z2 j1 , ω 1,u1 = k1 (7.354)
vc2,u2 = Z3 j2 , ω 2,u2 = k2 (7.355)
The angular accelerations are
α1 = u̇1 k1 (7.356)
α2 = u̇2 k2 (7.357)
and the accelerations of the centers of mass are found to be
ac1 = Z1 u̇1 j1 + Z1 u1 ω 1 × j1
= Z1 u̇1 j1 − Z1 u21 i1 (7.358)
ac2 = Z2 u̇1 j1 + Z3 u̇2 j2 + Z2 u1 ω 1 × j1 + Z3 u2 ω 2 × j2
= Z2 u̇1 j1 + Z3 u̇2 j2 − Z2 u21 i1 − Z3 u22 i2 (7.359)
Then the equation of motion (7.344) and (7.345) are found to be
³ ´
K1 = Z1 j1 · m1 Z1 u̇1 j1 − Z1 u21 i1 (7.360)
³ ´ ³ ´
+ Z2 j1 + Z3 j2 · m2 Z2 u̇1 j1 + Z3 u̇2 j2 − Z2 u21 i1 − Z3 u22 i2 (7.361)
where µ ¶ µ ¶−1
Y11 Y12 X11 X12
= (7.376)
Y21 Y22 X21 X22
Example 135 Insertion of the Zi and Xij constants gives the equations of motion on
the form
¡ ¢
m1 L2c1 + m2 L21 + I1z u̇1 + (m2 L1 Lc2 cos q1 ) u̇2
−m2 L1 Lc2 sin q1 u22 = K1 (7.377)
¡ ¢
m2 L1 Lc2 cos q1 u̇1 + m2 L2c2 + I2z u̇2 + m2 L1 Lc2 sin q1 u21 = K2 (7.378)
A change of variables by insertion of (7.341) and (7.342), and the addition of the second
equation to the first equation gives the equations of motion as given by (7.325) and
(7.326). Note that the equations of motion have a simpler form when the variables uj
and Kj are used.
where Jk (q) is the Jacobian of link k. The virtual displacements of rigid body k are
given by µ ¶
δrk
= Jk (q) δq. (7.381)
σk
Note that the velocities q̇j are assumed to be independent, and this implies that the
virtual displacements δqj are arbitrary.
The principle of virtual work can be written
n µ
X ¶T µ ¶ Xn µ ¶
δrk (Fkk )(c) T T (Fkk )(c)
0= = δq Jk (7.382)
σk (Tkkc )(c) (Tkkc )(c)
k=1 k=1
which are the joint torque in the case of rotary joints. Then the equation of motion can
be written à !
Xn
makck
T
Jk ¡ ¢× =τ (7.385)
Mkk/c αk0k + ω k0k Mkk/c ω k0k
k=1
From this equation it is possible to see that row j of the equations of motion is the sum
of the projections of the equations of motion for link k along column j of the Jacobian
Jk .
where dj is the position of the origin of frame k, k ≥ 1, relative to the origin of frame 0,
and dk,kc is the position of the center of mass of link k relative to the origin of frame k.
The generalized speed vector and the generalized force vector are defined by
vc0 = u1 i0 + u2 j0 + u3 k0 (7.387)
ω ik = u4 i0 + u5 j0 + u6 k0 (7.388)
uk+6 = q̇k (7.389)
F0c = F1 i0 + F2 j0 + F3 k0 (7.390)
T0c = F4 i0 + F5 j0 + F6 k0 (7.391)
Fk+6 = τk (7.392)
The partial velocities vck,j and partial angular velocities ω ik,j are then defined by
12
X 12
X
vck = vck,j uj , ω ik = ω ik,j uj (7.393)
k=0 k=0
310 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
y k1 yk
x k1 d k1,k
k xk
d k1,kc
d k,kc
k
z k1
zk k1 k1
Note that this formulation allows us to develop the equations of motion without intro-
ducing generalized coordinates in the form of Euler angles for the spacecraft.
Recursive Newton-Euler:
Initialization: ω 00 = 0, α00 = 0, a00 = − g0 where g0 is the acceleration of gravity.
Outwards recursion (k = 1 . . . 6):
³ ´
ω kk = Rkk−1 ω k−1 k−1 + zθ̇ k (7.395)
h ¡ k−1 ¢× i
αkk = Rkk−1 αk−1 k−1 + ω k−1 zθ̇k + zθ̈k (7.396)
akk = Rkk−1 ak−1
k−1
¡ k ¢× k ¡ ¢× ¡ k ¢× k
+ αk dk−1,k + ω kk ω k dk−1,k (7.397)
ω kk = Rkk−1 ω k−1
k−1 (7.403)
αkk = Rkk−1 αk−1
k−1 (7.404)
¡ k ¢× k
akk = Rkk−1 (ak−1 ¨
k−1 + zdk ) + αk dk−1,k
¡ k ¢× ¡ k ¢× k ¡ k ¢× k
+ ωk ωk dk−1,k + 2 ω k Rk−1 zd˙k (7.405)
7.10.2 Simulation
The recursive Newton-Euler scheme computes the required generalized forces τ (t) when
q(t), q̇(t) and q̈(t) are given. In contrast to this the simulation problem is to calculate the
state vector given by [q(t), q̇(t)] when the initial state [q(0), q̇(0)] and the generalized
forces τ (t) are given. This is done by numerical integration of the acceleration q̈(t).
Therefore, in the simulation of manipulator dynamics the acceleration q̈(t) must be
312 CHAPTER 7. NEWTON-EULER EQUATIONS OF MOTION
computed when [q(t), q̇(t)] and τ (t) are given. In the following a method based on the
use of the recursive Newton-Euler algorithm to establish the model in the Lagrangian
form. This is a convenient solution when the RNE algorithm is available.
The simulation problem involves the computation of q̈ given q, q̇ and τ . This can
be done using recursive Newton-Euler with the method of Walker and Orin (Walker and
Orin 1982), (Sciavicco and Siciliano 2000). The method is based on the fact that the
equation of motion for a manipulator can be written
mj = RNE(q, 0, ej ) (7.409)
We see that the RNE (·) function is used n + 1 times, and that a Gaussian elimination
is required to compute q̈. This means that the computational requirements for the
simulation is higher than for the inverse dynamics problem.
Chapter 8
Analytical mechanics
8.1 Introduction
The term analytical mechanics was introduced by Lagrange with his work Mécanique
Analytique which was published in 1788. In this work Lagrange emphasized the use of
algebraic operations in the derivation and analysis of equations of motion as opposed to
the earlier works of Newton and Euler which relied on vector operations. In our presen-
tation of analytical mechanics we will first explore Lagrangian dynamics, which is based
on the use of generalized coordinates, generalized forces and energy functions. Then we
will present a related formulation based on the Euler-Poincaré equation, where dynam-
ics on SO(3) and SE(3) can be described using energy functions without the reliance
on generalized coordinates. Finally the extended Hamilton’s principle and Hamilton’s
equations of motion will be presented. These methods are energy-based, and quite useful
as they provide a systematic way of deriving energy functions that are potential Lya-
punov function candidates. Moreover, Hamilton’s principle and Hamilton’s equations of
motion provide the basis for the Hamilton-Jacobi equation which is important in opti-
mal control theory. The material in this chapter is based on classical texts on dynamics
like (Goldstein 1980) and (Lovelock and Rund 1989), more recent text on dynamics
like (Arnold 1989) and (Marsden and Ratiu 1994), and robotics books like (Spong and
Vidyasagar 1989), (Sciavicco and Siciliano 2000) and (Murray et al. 1994). The results
that will be presented in this chapter are well established in the dynamics literature.
However, a control engineer will have to consult a great number of books, some of which
are quite advanced, to find the selection of analysis tools that will be presented here. Note
that although some of the material may seem to be abstract at a first reading, the meth-
ods are of great use in practical controller design and analysis, and in the development
of simulation systems.
313
314 CHAPTER 8. ANALYTICAL MECHANICS
native way of deriving the equations of motion is to use Lagrange’s formulation which is
based on algebraic operations on energy expressions using generalized coordinates and
generalized forces. Lagrange’s formulation may be better suited to derive results re-
lated to energy conservation and passivity, as it is based on the expressions for kinetic
and potential energy. This is becoming even more important in control theory as many
new controller designs are energy-based using Lyapunov designs or passivity (Slotine
1991), (Krstić, Kanellakopoulos and Kokotović 1995), (Khalil 1996), (Arimoto 1996),
(Sepulchre, Janković and Kokotović 1997), (Lozano et al. 2000). Well-known examples
in robotics is the independent-joint controller (Takegaki and Arimoto 1981), and the
adaptive tracking controller (Slotine and Li 1988), and related results have appeared in
other applications like attitude control (Wen and Kreutz-Delgado 1991) and vibration
damping (Kelkar and Joshi 1996). It is therefore of great interest to study Lagrange’s
equation of motion and related concepts of analytical dynamics for use in controller
design and analysis.
We find that
ÃN ! N N
∂T ∂ X1 X ∂vk X ∂rk
= mk vk · vk = · mk vk = · mk vk (8.3)
∂ q̇i ∂ q̇i 2 ∂ q̇i ∂qi
k=1 k=1 k=1
ÃN ! N N
∂T ∂ X1 X ∂vk X d ∂rk
= mk vk · vk = · mk vk = · mk vk (8.4)
∂qi ∂qi 2 ∂qi dt ∂qi
k=1 k=1 k=1
where (7.202) and (7.203) are used. The following calculation can then be done:
XN µ ¶ X N µ ¶
d ∂T d ∂rk d ∂rk ∂rk
= · mk vk = · mk vk + · mk ak
dt ∂ q̇i dt ∂qi dt ∂qi ∂qi
k=1 k=1
N
X
∂T ∂rk
= + · mk ak (8.5)
∂qi ∂qi
k=1
8.2. LAGRANGIAN DYNAMICS 315
Then, under the assumption that the time derivatives q̇i of the generalized coordinates
are independent, the virtual displacements δqi are arbitrary, and it follows that
µ ¶
d ∂T ∂T
− = Qi (8.9)
dt ∂ q̇i ∂qi
The generalized force Qi is assumed to be given by a conservative force −∂U/∂qi due to
a potential U = U (q) plus the generalized actuator force τ i . This is written
∂U
Qi = − + τi (8.10)
∂qi
Then the equation of motion becomes
µ ¶
d ∂T ∂T ∂U
− + = τi (8.11)
dt ∂ q̇i ∂qi ∂qi
From this result, Lagrange’s equation of motion is found:
Example 136 For use in the part on Hamiltonian dynamics we derive the following
result: Time differentiation of the Lagrangian gives
dL (q, q̇, t) ∂L (q, q̇, t) ∂L (q, q̇, t) ∂L (q, q̇, t)
= q̇ + q̈ +
dt ∂q ∂ q̇ ∂t
µ ¶
d ∂L (q, q̇, t) ∂L (q, q̇, t) ∂L (q, q̇, t)
= − τ T q̇ + q̈ + (8.14)
dt ∂ q̇ ∂ q̇ ∂t
where Lagrange’s equation of motion (8.13) has been inserted. This gives
µ ¶
dL (q, q̇, t) d ∂L (q, q̇, t) ∂L (q, q̇, t)
= q̇ + − τ T q̇ (8.15)
dt dt ∂ q̇ ∂t
316 CHAPTER 8. ANALYTICAL MECHANICS
l g
q
This shows that the product Qi q̇i between the generalized force Qi and the generalized
speed q̇i has dimension power. This means that a system with two degrees of freedom
with q1 = x is a position and q2 = θ is an angle, then Q1 must be a force and Q2 must
be a torque.
8.2.4 Pendulum
A mathematical pendulum is a mass point of mass m in the gravity field which is con-
nected by a massless rod of length L to a frictionless joint with angle q. The pendulum
is shown in Figure 8.1. The kinetic energy is
1 1
T = mv 2 = m 2 q̇ 2 (8.17)
2 2
The potential energy is
U = mg (1 − cos q) (8.18)
The resulting Lagrangian is
1 2 2
L= m q̇ − mg (1 − cos q) (8.19)
2
and the equation of motion is
d ¡ 2 ¢
m q̇ + mg sin q = 0 (8.20)
dt
which gives r
g
q̈ + ω 20 sin q = 0, ω0 = (8.21)
8.2. LAGRANGIAN DYNAMICS 317
µ ¶
d ∂L ∂L
− = mL22 θ̈2 − mL1 L2 θ̈1 cos θ2 + mL1 L2 θ̇1 θ̇2 sin θ2
dt ∂ θ̇2 ∂θ2
2
−mL22 sin θ2 cos θ2 θ̇1 − mL1 L2 θ̇1 θ̇2 sin θ2
−mgL2 sin θ2 (8.44)
This result is in agreement with the result derived with the Newton-Euler approach.
The Lagrange derivation is much simpler for this system.
8.2. LAGRANGIAN DYNAMICS 319
8.2.8 Manipulator
In this section we will derive the Lagrangian equations of motion for a manipulator
(Spong and Vidyasagar 1989), (Sciavicco and Siciliano 2000). The manipulator has n
links which are rigid bodies. The links are assumed to be connected with rotary joints
of one degree of freedom. The joint angle of joint i is denoted qi . The joint angles are
the generalized coordinates of the manipulator. The vector of generalized coordinates is
T
denoted q = (q1 . . . qn ) . At each joint there is a motor torque τ i which are the input
T
generalized forces. The vector of generalized forces is denoted τ = (τ 1 . . . τ n ) .
The kinetic energy of link i is
1 i T i 1
Ti = mi (vci ) (vci ) + (ω i0i )T Mici ω i0i (8.47)
2 2
i
where mi is the mass, vci is the velocity of the center of mass, ω i0i is the angular velocity,
i i
and Mci is the inertia matrix around the center of mass. The velocity vci and the angular
i
velocity ω 0i are linear combinations of the time derivatives of the generalized coordinates,
and we may write
i
X
i i
vci = vci,j (q) q̇j = Jvci (q) q̇ (8.48)
j=1
i
X
ω i0i = ω i0i,j (q) q̇j = Jω0i (q) q̇ (8.49)
j=1
1 T Xh i
n
T = q̇ mi JTvci (q) Jvci (q) +JTωi (q) Mici Jω0i (q) (8.51)
2 i=1
This shows that the kinetic energy of the manipulator can be written as the quadratic
form
1
T = q̇T M (q) q̇ (8.52)
2
where the n × n mass matrix M (q) given by
n
X £ ¤
M (q) = mi JTvci (q) Jvci (q) + JTω0i (q) Mici Jω0i (q) (8.53)
i=1
is symmetric. Moreover, the kinetic energy is nonnegative, which implies that M (q) is
positive definite. The potential energy is due to the gravity potential, and is written
n
X n
X
U (q) = Ui (q) = mi gT rci (q) (8.54)
i=1 i=1
where M (q) = MT (q) is positive definite and g (q) is the gradient of the gravity poten-
tial. The matrix C (q, q̇) can be selected to be
( n )
X
C (q, q̇) = {ckj } = cijk q̇i (8.57)
i=1
where µ ¶
1 ∂mkj ∂mik ∂mij
cijk := + − (8.58)
2 ∂qi ∂qj ∂qk
are the Christoffel symbols of the first kind. In this case the matrix Ṁ − 2C is skew
symmetric.
We find that
n n
d ∂L d 1 X 1X
= mkj q̇j + mik q̇i
dt ∂ q̇k dt 2 j=1 2 i=1
Xn n n µ ¶
1 X X ∂mkj ∂mik
= mkj (q) q̈j + + q̇i q̇j (8.61)
j=1
2 i=1 j=1 ∂qi ∂qj
and that
n n
∂L 1 X X ∂mij ∂U
= q̇i q̇j − (8.62)
∂qk 2 i=1 j=1 ∂qk ∂qk
where cijk are the Christoffel symbols of the first kind as defined by (8.58), and
∂U
gk := (8.64)
∂qk
8.2. LAGRANGIAN DYNAMICS 321
N = Ṁ − 2C (8.67)
This implies
nkj = −njk (8.70)
which shows that N is skew symmetric.
The time derivative along the solutions of the system is found by inserting the equation
of motion (8.56) and (8.66). This gives
1 T
Ė(q) = q̇T [−C (q, q̇) q̇ − g (q) + τ ] + q̇T Ṁ (q) q̇ + g (q) q̇
2
1 h i
= q̇T τ + q̇T T Ṁ (q) −2C (q, q̇) q̇ (8.72)
2
If there is a constant Umin so that the potential energy is lower bounded according to
U ≥ Umin , then the storage function V = T + U − Umin ≥ 0 will have time derivative
V = q̇T τ (8.74)
along the solutions of the system. This implies that the manipulator dynamics (8.56)
with input τ and output q̇ is passive.
∂L ∂T ∂U
= − = − (m1 Lc1 + m2 L1 ) g cos q1 − m2 Lc2 g cos(q1 + q2 ) (8.83)
∂q1 ∂q1 ∂q1
∂L ∂T ∂U 1 ∂m11 2 ∂m21
= − = q̇ + q̇1 q̇2 − m2 gLc2 g cos(q1 + q2 ) (8.84)
∂q2 ∂q2 ∂q2 2 ∂q2 1 ∂q2
The equations of motion are then found from (8.13) to be
µ ¶ µ ¶
∂m11 ∂m12 ∂U
m11 q̈1 + m12 q̈2 + q̇2 q̇1 + q̇2 q̇2 + = τ 1 (8.85)
∂q2 ∂q2 ∂q1
µ ¶
∂m21 1 ∂m11 2 ∂m21 ∂U
m21 q̈1 + m22 q̈2 + q̇2 q̇1 − q̇ − q̇1 q̇2 + = τ 2 (8.86)
∂q2 2 ∂q2 1 ∂q2 ∂q2
which gives the equations of motion in the form
¡ ¡ ¢¢
I1z + I2z + m1 L2c1 + m2 L21 + L2c2 + 2L1 Lc2 cos q2 q̈1
¡ ¢
+ I2z + m2 L2c2 + m2 L1 Lc2 cos q2 q̈2
¡ ¢
−m2 L1 Lc2 sin q2 2q̇1 q̇2 + q̇22
+ (m1 Lc1 + m2 L1 ) g cos q1 + m2 Lc2 g cos(q1 + q2 ) = τ 1 (8.87)
8.2. LAGRANGIAN DYNAMICS 323
¡ ¢ ¡ ¢
I2z + m2 L2c2 + m2 L1 Lc2 cos q2 q̈1 + I2z + m2 L2c2 q̈2
+m2 L1 Lc2 q̇12 sin q2 + m2 Lc2 g cos(q1 + q2 ) = τ 2 (8.88)
as this gives
T
KT φ̇ = τ A−1 Aq̇ = τ T q̇ (8.91)
Note that φ̇1 = ω 1 and φ̇2 = ω 2 .
With the new set of generalized coordinates the kinetic energy is
1 T 1 T 1 T
T = q̇ M(q)q̇ = φ̇ A−T M(q)A−1 φ̇ = φ̇ D(φ)φ̇ (8.92)
2 2 2
where the mass matrix D(φ) = {dij (φ)} corresponding to the new coordinates φ is found
to be
µ ¶µ ¶µ ¶
1 −1 m11 m12 1 0
D(φ) = A−T M(q)A−1 =
0 1 m21 m22 −1 1
µ ¶
m11 − 2m12 + m22 m12 − m22
= (8.93)
m12 − m22 m22
which gives
µ ¶
I1z + m1 L2c1 + m2 L21 m2 L1 Lc2 cos (φ2 − φ1 )
D(φ) = (8.94)
m2 L1 Lc2 cos (φ2 − φ1 ) I2z + m2 L2c2
to be
¡ ¢
I1z + m1 L2c1 + m2 L21 φ̈1 + m2 L1 Lc2 cos (φ2 − φ1 ) φ̈2
2
−m2 L1 Lc2 sin (φ2 − φ1 ) φ̇2 + (m1 Lc1 + m2 L1 ) g cos φ1 = K1 (8.95)
¡ ¢
m2 L1 Lc2 cos (φ2 − φ1 ) φ̈1 + I2z + m2 L2c2 φ̈2
2
+m2 L1 Lc2 sin (φ2 − φ1 ) φ̇1 + m2 Lc2 g cos(φ2 ) = K2 (8.96)
324 CHAPTER 8. ANALYTICAL MECHANICS
∂f ∂f ∂f
df = dx1 + dx2 + dx3 (8.102)
∂x1 ∂x2 ∂x3
and locate the stationary points as the points where df = 0. In mechanical systems it
is customary to associate the differentials dxi with the actual infinitesimal change of
the variables xi , and in accordance with this df denotes the infinitesimal change in the
function f due to the infinitesimal change dxi . The time derivative of f is found by
dividing with dt, giving
df ∂f ∂f ∂f
= ẋ1 + ẋ2 + ẋ3 (8.103)
dt ∂x1 ∂x2 ∂x3
where ẋi = dxdt are the velocities.
i
∂f ∂f ∂f
δf = δx1 + δx2 + δx3 (8.104)
∂x1 ∂x2 ∂x3
which reflects an infinitesimal change in f due to the mathematical experiment δxi
without any change being done in the variables xi . Stationary values are then found
when δf = 0, as would be expected. This distinction between the operator d and δ may
seem strange at first, but it turns out that this provides us with a number of very useful
techniques for analysis of mechanical systems. Prominent examples of such techniques
are d’Alembert’s principle and Hamilton’s principle. Extensive discussion on the concept
of variations in dynamics is found in (Lanczos 1986).
Consider a continuous and differentiable function f (x). Define the perturbed function
fx, fx
f df
dx
The difference between df and δf (x), which are both infinitesimal changes in f , is clear
in this case as df is the infinitesimal change in the function f (x) due to an infinitesimal
change dx, while δf (x) is the infinitesimal change due to the infinitesimal changes in
f (x) to f (x, ) for the same x. This is shown in Figure 8.2.
Using the definition (8.106) it is straightforward to establish several results for the
variation of a function. The variation of the derivative of the function is found from the
derivative of f (x, α). Consider the function
f 0 (x, α) = f 0 (x) + αφ0 (x) (8.107)
0
where (·) denotes the derivative with respect to x. The variation is
¯
df 0 (x, α) ¯¯
δf 0 (x) = = φ0 (x) (8.108)
dα ¯α=0
We see that · ¸
d d
[δf (x)] = δ f (x) (8.109)
dx dx
that is, the derivative of the variation is equal to the variation of the derivative.
The variation of the definite integral
Z b
I= f (x)dx (8.110)
a
which shows that the variation of the integral is equal to the integral of the variation.
We sum up that
8.3. CALCULUS OF VARIATIONS 327
The variation operation commutes with differentiation and integration in the sense that
· ¸
d d
[δf (x)] = δ f (x) (8.113)
dx dx
Z b Z b
δ f (x, α)dx = δf (x)dx (8.114)
a a
where
dy
y = y(x), y0 = (8.116)
dx
with boundary conditions
y(a) = ya , y(b) = yb (8.117)
At this point this is a purely mathematical exercise without any physical interpretation.
The integral I will depend on the curve that is defined by the function y = y(x). We
want to find the path where the integral has a stationary value with respect to curves
that result from infinitesimal changes in the function y(x). To this end we define the
function
y(x, α) = y(x) + αφ(x) (8.118)
where φ(x) is an arbitrary function that vanishes at the end-points, that is, φ(a) = φ(b) =
0. The variation in y is then defined as
¯
dy(x, α) ¯¯
δy(x) = = φ(x) (8.119)
dα ¯α=0
where
¯
d ¯
0
δf [y(x), y (x), x] = f [y(x, ), y (x, ), x]¯¯
0
dα α=0
∂f ∂f 0
= δy + 0 δy (8.122)
∂y ∂y
This gives
Z b µ ¶
∂f ∂f
δI = δy + 0 δy 0 dx (8.123)
a ∂y ∂y
Then the standard technique is to use partial integration of the second term in the
integrand. We see that
Z µ ¶ ¯b Z µ ¶ Z µ ¶
b
∂f 0 ∂f ¯ b
d ∂f b
d ∂f
δy dx = δy ¯¯ − δydx = − δydx (8.124)
a ∂y 0 ∂y 0 a a dx ∂y 0 a dx ∂y 0
Since δy(x) is arbitrary for all x, we see that δI = 0 implies the Euler-Lagrange equation
µ ¶
d ∂f ∂f
− =0 (8.126)
dx ∂y 0 ∂y
We will now derive the relation between the variation δω × of the angular velocity
ω = RT Ṙ and σ × = RT δR. First we note that since RT R = I we have
×
¡ ¢ ¡ ¢ ¡ ¢
0 = δI = δ RT R = δ RT R + RT δR ⇒δ RT = −RT δRRT (8.133)
and
d × d ¡ T¢ d T
σ = R δR + RT (δR) = −RT ṘR δR + RT δ Ṙ = −ω × σ × +RT δ Ṙ
dt dt dt
This gives
d × × d ¡ ¢×
δω × = σ + ω× σ× − σ× ω = σ× + ω× σ (8.135)
dt dt
where (6.33) is used. The vector form of this is
d
δω = σ + ω×σ (8.136)
dt
To sum up:
δR = Rσ × (8.137)
where σ × is the skew symmetric form of a vector σ in body coordinates. The variation
of the angular velocity in body coordinates is
d
δω = σ + ω×σ (8.138)
dt
Example 137 The time derivative of the rotation matrix R at the identity I is
¯
dR ¯¯
= ω × ∈ so(3) (8.139)
dt ¯R=I
The set so (3) of skew symmetric matrices is the Lie algebra of SO(3). Thus the matrix
forms ω × and σ × are both in the Lie algebra so (3). The Lie bracket in so (3) is (Arnold
1989), (Marsden and Ratiu 1994), (Murray et al. 1994)
£ × ×¤ × ¡ ¢×
ω , σ := ω × σ × − σ × ω = ω × σ (8.140)
330 CHAPTER 8. ANALYTICAL MECHANICS
adω = ω × (8.142)
which gives
d
δω = σ + adω σ (8.143)
dt
Ṫ = Tŵ (8.145)
where µ ¶
ω× v
ŵ = (8.146)
0 0
T
is the 4 × 4 matrix representation of the vector w = (v , ω T )T .
The variation of T is µ ¶
δR δr
δT = (8.147)
0 0
This can be written
δT = Tη̂ (8.148)
where µ ¶
σ× δr
η̂ = (8.149)
0 0
is the matrix form of the vector η= (δrT , σ T )T .
In analogy with the derivation for SO(3) we find that
¡ ¢ −1 −1 −1 −1
δ ŵ = δ T−1 Ṫ + T δ Ṫ = −T δTT−1 Ṫ + T δ Ṫ = −η̂ŵ + T δ Ṫ
and
d d ¡ −1 ¢ d −1 −1
η̂ = T δT + T−1 (δT) = −T−1 ṪT δT + T−1 δ Ṫ = −ŵη̂ + T δ Ṫ
dt dt dt
and we may conclude that the variation of the six-dimensional velocity vector w is related
to the time derivative of the variation η by
d
δ ŵ = η̂ + ŵη̂ − η̂ ŵ (8.150)
dt
8.4. THE ADJOINT FORMULATION 331
d
δw = η + adw η (8.153)
dt
δT = Tη̂ (8.154)
where the vector η is in body coordinates. Then the variation of the velocity w in body
coordinates is
d
δw = η + adw η (8.155)
dt
8.4.2 Rotations
The configuration in SO(3) is given by R ∈ SO(3). The time derivative is Ṙ = Rω × =
Ω× R where Ω = Rω. The skew-symmetric forms of ω and Ω are related by
Ω× = Rω × RT (8.159)
The mapping from ω to Ω can also be written in terms of vectors in the adjoint repre-
sentation
Ω = AdR ω (8.160)
where the matrix AdR is the adjoint transformation on SO(3). It is clear that
AdR = R (8.161)
Consider a vector v in the moving coordinate frame, and let V = Rv be the vector in
the fixed frame. Then
V× = Rv× RT , V = AdR v (8.162)
The time derivative is
µ ×¶
dV× dv ×
= R RT + Ṙv RT + Rv× ṘT
dt dt
µ ×¶
dv
= R RT + Rω × v× RT − Rv× ω × ṘT
dt
µ ×¶
dv ¡ ¢
= R RT + R ω × v× − v× ω × ṘT
dt
µ ×¶
dv £ ¤
= R RT + R ω × , v× ṘT (8.163)
dt
where £ × ×¤ ¡ ¢×
ω , v = ω × v× − v × ω × = ω × v (8.164)
which is the Lie bracket on SO(3). In vector form the equation (8.163) is written
dV dv
=R + Rω × v (8.165)
dt dt
However, time differentiation of V = AdR v gives
dV dv d (AdR )
= AdR + v (8.166)
dt dt dt
which implies
d (AdR )
= Rω × = AdR ω × (8.167)
dt
We now define the operator adω according to
d (AdR )
= AdR adω (8.168)
dt
and it follows that in SO(3) we have
adω = ω × (8.169)
This implies that £ ¤
(adω v)× = ω × , v× (8.170)
× ×
which means that adω v is a vector representation of the Lie bracket [ω , v ] . Intuitively
we can think of adω v as the rate of change in v due to the motion due to the angular
velocity ω, which is the directional derivative of v in the direction of ω.
8.4. THE ADJOINT FORMULATION 333
The derivative of T is
µ ¶ µ ¶µ ¶
Rω × Rv R r ω× v
Ṫ = = = Tŵ (8.176)
0 0 0 1 0 0
or µ ¶ µ ¶µ ¶
Ω× R v Ω× V+r× Ω R r
Ṫ = = = ŴT (8.177)
0 0 0 0 0 1
We see that
Ŵ = TŵT−1 (8.178)
In vector form we get
W = AdT w (8.179)
where the adjoint transformation on SE(3) is given by
µ ¶
R r× R
AdT = (8.180)
0 R
with inverse µ ¶
−1 RT −RT r×
(AdT ) = (8.181)
0 RT
The time derivative of AdT is
µ × ¶
d Rω ×
Rv× + r Rω ×
(AdT ) =
dt Rω ×0
µ ¶ µ ¶
R r× R ω × v×
=
0 R 0 ω×
= AdT adw (8.182)
We see that µ ¶
ω× v×
adw = (8.184)
0 ω×
Let w be an a six dimensional vector, and let W = AdT w. Then
Ŵ = TŵT−1 (8.185)
dŴ dŵ −1 −1 −1
= Ṫ T + ṪŵT + TŵṪ
dt dt
dŵ −1
= Ṫ T + TûŵT−1 − TŵûT−1
dt
dŵ −1
= Ṫ T + T (ûŵ − ŵû) T−1
dt
dŵ −1
= Ṫ T + T [û, ŵ] T−1 (8.186)
dt
where
[û, ŵ] = ûŵ − ŵû (8.187)
is the Lie bracket in se(3). In adjoint form the time derivative is
µ ¶
dW dW
= AdT + adu w (8.188)
dt dt
\
adu w= [û, ŵ] (8.189)
As in SO(3) we see that adu w is a vector form of the Lie bracket [û, ŵ] . Much in the
same way as in SO(3) the intuitive interpretation of adu w is that it is the rate of change
in w due to the motion induced by the velocity vector u.
¡ ¢T
Remark 3 The physical interpretation of U = AdT u where u = v ω is not quite
straightforward. However, this is not a problem as this vector, which is called the spatial
¡ ¢T
velocity vector, is not widely used. We see from U = Rv−Ω× r Rω that the
velocity Rv−Ω× r is the velocity of a point of the rigid body which is at the origin of
the fixed frame. The angular velocity is simply the angular velocity of the rigid body in
the coordinates of the fixed frame.
The virtual displacement of the mass element dm is denoted δr. We take the scalar
product between the virtual displacement δr and Newton’s law, and integrate the result
over the rigid body. This gives the following equation of motion:
Z ³ ´T
r̈dm − df −df (c) δr = 0 (8.191)
b
To simplify the expression the product rule for differentiation is used to arrive at
Z Z Z Z
d d
r̈T dmδr = ṙT dmδr− ṙT dmδ ṙ = ṙT dmδr−δT (8.195)
b dt b b dt b
This results in the equation of motion in the form
Z Z ³ ´T
d
ṙT dmδr − δT − Wδ − df (c) δr = 0 (8.196)
dt b b
R ¡ ¢T
Suppose that T = T (u), Wδ = τ T ξ and that b df (c) δr = 0. Then δT = (∂T /∂u) δu,
and the equation of motion is found to be
µ ¶
d ∂T ∂T ³ ´
ξ− δu − ξ̇ − τ T ξ = 0 (8.201)
dt ∂u ∂u
The equation of motion (8.200) was presented in (Bremer 1988) where it was termed
a central equation as it forms a basis from which related results like Lagrange’s equation
of motion, Hamel-Boltzmann’s equation and the Euler-Poincaré equation can be derived
with a reasonable effort. In the following we will use the equation of motion in the form
(8.201) to derive the Euler-Poincaré equation in SO(3) and SE(3).
Example 138 It is noted that if generalized coordinates are available so that u = q̇,
then the usual equations
∂r ∂r ∂r
ṙ = q̇+ , δr = δq (8.202)
∂q ∂t ∂q
are recovered in place of (8.197) and (8.198). Moreover, if T = T (q, q̇), Wδ = τ T ξ and
R ¡ (c) ¢T
b
df δr = 0, then ξ = δq and
∂T ∂T
δT = δq+ δ q̇ (8.203)
∂q ∂ q̇
This gives the familiar result
· µ ¶ ¸T
d ∂T ∂T
− −τ δq = 0 (8.204)
dt ∂ q̇ ∂q
which gives Lagrange’s equation of motion if the elements of δq are independent.
If the rigid body undergoes a free rotation, then the components of σ are independent.
This leads to:
which is given in the body-fixed frame b, and which has a 4 × 4 matrix form ŵ = T−1 Ṫ.
The associated variation vector is η which is defined by its 4 × 4 matrix form η̂= T−1 δT
To find an expression for the kinetic energy we need to find expressions for
∂ ṙ ∂ ṙ
ṙ = w, δr = η (8.213)
∂w ∂w
¡ ¢
This is found by observing that the velocity ṙ of the mass element is ṙ = R vpb + ω b× rbpm
where r = rp + rpm and ṙp = Rvbp . This gives
∂ ṙ ³ ´
= R I ... −rb× (8.214)
∂w pq
1 T b
= w Dp w (8.217)
2
338 CHAPTER 8. ANALYTICAL MECHANICS
where
µ R b× ¶ µ ¶
R mI −R r dm mI mrb×
Dbp = b×
b pq
b× b× = b×
g
(8.218)
r
b pq
dm − r r
b pq pq
dm −mrg Mbp
For a free-floating rigid body the principle of virtual work states that the forces of con-
straint does no virtual work, that is,
Z ³ ´T
df (c) δr = 0 (8.219)
b
Kirchhoff’s equations of motion are important in the modeling of ship motion, where
also the added inertia effects may be represented in this setting (Lamb 1945), (Sagatun
and Fossen 1991), (Leonard 1997), (Fossen 2002).
8.5. THE EULER-POINCARÉ EQUATION 339
Example 139 If it is been assumed that P is the center of mass of the rigid body, then
µ ¶T µ ¶
∂T mvcb
= (8.227)
∂w Mbc ω bc
and the equations of motion are found to be
mv̇b + ω b× mvcb = Fb (8.228)
Mbc ω̇ b + ω b× Mbc ω b = Lbc (8.229)
where bk denotes body k. Therefore the forces of constraint can be eliminated by summing
up the equations of motions in the form (8.200). This gives
Xn · µ ¶ Z ³ ´T ¸
d ∂Tk
ηk − δTk − Wkδ − df (c) δr = 0 (8.232)
dt ∂wk b
k=1
If we proceed as for the free-floating rigid body, but keep the virtual displacement η k in
the expression we arrive at
Xn · µ ¶¸
T
k
mk v̇kc + ω k×
k mk vkck
− Fkk
0 = ηk
Mkk ω̇ kk + ω k× k k
k Mk ω k − Lk
k
k=1
à !T µ
Xn k
∂vkp k k× k k
¶
η T ∂u
m v̇
k kc + ω k m v
k kc − Fk
= (8.234)
∂ω k
k Mk ω̇ kk + ω k× k k
k Mk ω k − Lkc
k=1 ∂u
340 CHAPTER 8. ANALYTICAL MECHANICS
We note that Fkk is the applied force to body k, and Lkc is the applied torque to body
k around point center of mass of body k, and that the forces of constraint has been
eliminated in the derivation. This form of the equation of motion was called the Newton-
Euler equation of motion with eliminated constraint forces in (Bremer 1988). Written out
in component form it was called Kane’s equation of motion in (Kane and Levinson 1985).
fδ is defined by
where the function W
Xn µ ¶
f ∂U
Wδ = τj − δqj = Wδ − δU (8.238)
j=1
∂qj
Here
n
X
Wδ = τ j δqj (8.239)
j=1
8.6. HAMILTON’S PRINCIPLE 341
Xn
∂U
δU = δqj (8.240)
j=1
∂qj
This result in combination with (8.236) and (8.237) leads to the equation
N
X
fδ − d
δT − W (mk vk · δrk ) = 0 (8.243)
dt
k=1
A critical observation for the next step in the derivation is the fact that if rk (t1 ) and
rk (t2 ) are fixed, then
Z ¯t=t2
N
t2 X
d
N
X ¯
¯
(mk vk · δrk ) dt = (mk vk · δrk )¯ =0 (8.244)
t1 dt ¯
k=1 k=1 t=t1
This means that we can eliminate the last term of (8.243) by integrating the expression
in (8.243) from t1 to t2 . The leads to the following result:
fδ = Wδ − δU , or, alternatively, by
where the endpoints are fixed and W
Z t2
(δL + Wδ ) dt = 0 (8.246)
t1
considered for the trajectory C, where ψ(t) is an arbitrary function. The boundary con-
ditions imply that ψ(t1 ) = ψ(t2 ) = 0. The corresponding variation δL in the Lagrangian
is µ ¶
∂L ∂L ∂L ∂L
δL = δq+ δ q̇ = ψ+ ψ̇ (8.247)
∂q ∂ q̇ ∂q ∂ q̇
The extended Hamilton principle (8.246) gives
Z t2 Z t2 µ ¶
∂L ∂L
(δL + Wδ ) dt = ψ+ ψ̇ + τ T ψ dt = 0 (8.248)
t1 t1 ∂q ∂ q̇
Partial integration gives
Z t2 · ¸t2 Z t2 µ ¶ Z t2 µ ¶
∂L ∂L d ∂L d ∂L
ψ̇dt = ψ − ψdt = − ψdt (8.249)
t1 ∂ q̇ ∂ q̇ t1 t1 dt ∂ q̇ t1 dt ∂ q̇
where it is used that ψ(t1 ) = ψ(t2 ) = 0. The variation of the integral is then found to
be Z t2 · µ ¶ ¸
∂L d ∂L
− + τ T ψdt = 0 (8.250)
t1 ∂q dt ∂ q̇
Since ψ(t) is arbitrary, this implies that
µ ¶T µ ¶T
d ∂L ∂L
− =τ (8.251)
dt ∂ q̇ ∂q
which is Lagrange’s equation of motion.
where (8.138) and partial integration was used. Then as the components σ are indepen-
dent, Hamilton’s extended principle (8.245) gives the following result
Mω̇+ω × Mω = τ (8.260)
δw = η̇ + adw η (8.263)
η(t1 ) = η (t2 ) = 0 (8.264)
344 CHAPTER 8. ANALYTICAL MECHANICS
The equation of motion for rigid motion can be written in the form of a Euler-Poincaré
equation as
µ ¶T µ ¶T
d ∂T T ∂T
− adw =τ (8.267)
dt ∂w ∂w
where µ ¶
ω× v×
adw = (8.268)
0 ω×
T T
The Euler-Poincaré equation with τ = (F , LT ) gives the equations
µ ¶T µ ¶T
d ∂T ∂T
+ ω× = F (8.269)
dt ∂v ∂v
µ ¶T µ ¶T µ ¶T
d ∂T × ∂T × ∂T
+v +ω = L (8.270)
dt ∂ω ∂v ∂ω
where T̂ dx is the kinetic energy of the the length element dx of the beam. The potential
energy is
Z L
U (t) = Û [w (x, t) , w0 (x, t) , w00 (x, t)] dx (8.272)
0
where Û dx is the potential energy of the length element dx. The Lagrangian can then
be defined as
Z L
L(t) = L̂ [w (x, t) , w0 (x, t) , w00 (x, t) , ẇ (x, t) , ẇ0 (x, t)] dx (8.273)
0
8.7. LAGRANGIAN DYNAMICS FOR PDE’S 345
and the virtual work from nonconservative forces on the beam is therefore
Z L
Wδ (t) = Ŵδ (x, t)dx (8.275)
0
∂ L̂ ∂ L̂ ∂ L̂ ∂ L̂ ∂ L̂
δ L̂ = δw + 0
δw0 + 00
δw00 + δ ẇ + δ ẇ0 (8.277)
∂w ∂w ∂w ∂ ẇ ∂ ẇ0
and the extended Hamilton principle is therefore
Z t2 Z L Ã !
∂ L̂ ∂ L̂ 0 ∂ L̂ 00 ∂ L̂ ∂ L̂ 0
δw + δw + δw + δ ẇ + δ ẇ + f (x, t)δw(x, t) dxdt = 0
t1 0 ∂w ∂w0 ∂w00 ∂ ẇ ∂ ẇ0
As δw and δw0 are arbitrary for t1 < t < t2 this implies the Lagrangian equation of
motion in the form
à ! à ! à ! à !
∂ L̂ ∂ ∂ L̂ ∂2 ∂ L̂ ∂ ∂ L̂ ∂2 ∂ L̂
− + 2 − + + f (x, t) = 0 (8.279)
∂w ∂x ∂w0 ∂x ∂w00 ∂t ∂ ẇ ∂x∂t ∂ ẇ0
Example 140 To reach the result (8.278) the following partial integrations are used.
Z ¯L Z Ã !
L
∂ L̂ ∂ L̂ ¯ L
∂ ∂ L̂
¯
δw0 dx = δw¯ − δwdx
0 ∂w0 ∂w0 ¯ 0 ∂x ∂w0
0
Z L ¯L Ã ! ¯L Z Ã !
∂ L̂ ∂ L̂ ¯ ∂ ∂ L̂ ¯ L
∂ 2
∂ L̂
¯ ¯
δw00 dx = δw0 ¯ − δw¯ + δwdx
0 ∂w
00 ∂w00 ¯ ∂x ∂w00 ¯ 0 ∂x
2 ∂w00
0 0
Z t2 Z t2 Ã !
∂ L̂ ∂ ∂ L̂
δ ẇdx = − δwdx
t1 ∂ ẇ t1 ∂t ∂ ẇ
¯L Z Ã !
Z t2 Z L Z t2 ¯ L
∂ L̂ ∂ L̂ δ ẇ¯¯ − ∂ ∂ L̂
δ ẇ0 dxdt = δ ẇdx dt
t1 0 ∂ ẇ0 t1 ∂ ẇ 0 ¯ 0 ∂x ∂ ẇ0
0
¯L Z Ã !
Z t2 ¯ L 2
= ∂ ∂ L̂ δw¯¯ − ∂ ∂ L̂
δwdx dt
t1 ∂t ∂ ẇ 0 ¯ 0 ∂x∂t ∂ ẇ0
0
which is evaluated to be
00
ρ(x)ẅ(x, t) + [EI(x)w00 (x)] = f (8.284)
∂L(q, q̇, t) T
p(q, q̇, t) = (8.292)
∂ q̇
We note that Lagrange’s equation of motion can be written
T
∂L(q, q̇, t)
ṗ(q, q̇, t) − =τ (8.293)
∂q
To define the Hamiltonian H from the Lagrangian L a change of variables from the
Lagrangian variables (q, q̇) to the Hamiltonian variables (q, p) is required. The velocity
vector q̇ is then regarded to be a function
q̇ = φ (q, p, t) (8.294)
where the definition (8.292) has been used. It follows from the definition (8.292) of the
momentum vector that
∂H(q, p, t)
= φT (8.296)
∂p
∂H(q, p, t) ∂L(q, φ, t)
= − (8.297)
∂q ∂q
∂H(q, p, t) ∂L(q, φ, t)
= − (8.298)
∂t ∂t
Insertion of Lagrange’s equation of motion and q̇ = φ (q, p, t) leads to the result:
∂H(q, p, t) T
q̇ = (8.299)
∂p
∂H(q, p, t) T
ṗ = − +τ (8.300)
∂q
The time derivative of the Hamiltonian is found from the chain rule to be
dH ∂H ∂H ∂H
= ṗ+ q̇+ (8.301)
dt ∂p ∂q ∂t
By inserting Hamilton’s equations of motion (8.299) and (8.300) we find that
à !
dH T ∂H T ∂H ∂H ∂H
= q̇ − +τ + q̇+ = q̇T τ + (8.302)
dt ∂q ∂q ∂t ∂t
If the Hamiltonian does not depend on time t, that is, if H = H(q, p), and if the system
is unactuated so that τ = 0, then
dH(q, p)
=0 (8.304)
dt
dh(q, q̇)
=0 (8.315)
dt
which means that the Lagrangian has the same numerical value after the change in
generalized coordinates. The momentum vector is
where Φ = Q̇. We see that the Lagrangian and the canonical momentum vector has
the same numerical value after a change of coordinates, while the numerical value of the
energy function and the Hamiltonian changes when the coordinate is changed from q to
Q.
v = ω c Rc1 + q̇ (8.330)
where c1 is the unit vector along the tangent of the nominal orbit. The kinetic energy
may be written
1 1
Tq = mq̇T q̇+ω c RcT1 q̇+ mω 2c R2 (8.331)
2 2
With these variables the energy function is
1
hq (q, q̇) = mq̇T q̇+Ua (q) (8.332)
2
where
m 1
Ua (q) = µ − mω 2c R2 (8.333)
|R + q| 2
is the apparent potential.
Next, suppose that the Hamiltonian is bounded from below, which means that there is a
constant H0 so that H ≥ H0 . Then it is possible to define a nonnegative storage function
V = H − H0 so that the time derivative of V along the solution of the system is
V̇ = q̇T τ (8.335)
From the results of Section 2.4.14 we see that this leads to the following conclusion:
If the Hamiltonian does not depend on time t, and if there is a constant H0 so that
H(q, p) ≥ H0 , then the system given by Hamilton’s equation of motion (8.299, 8.300) is
passive with input τ and output q̇, and V = H − H0 is a storage function.
Example 142 Suppose that the Lagrangian L does not depend on time t. Then it is seen
from (8.298) and the definition (8.305) of the energy function h that the Hamiltonian H
and the energy function h will not depend on t: This gives
dH(q, p) dh(q, q̇)
= = q̇T τ (8.336)
dt dt
If the actuator force is set to zero, then this implies that H(q, p) and h(q, q̇) are constants
for solutions of the system. In the terminology of Hamiltonian dynamics H and h are
said to be invariants of motion.
Example 143 Suppose that (8.336) holds. Velocity feedback in the form τ = −K q̇ will
then lead to
dH(q, p) dh(q, q̇)
= = −K q̇T q̇ ≤ 0 (8.337)
dt dt
which means that the energy h(q, q̇) = H(q, p) will be nonincreasing, and that the energy
will decrease whenever the velocity is nonzero.
where M is symmetric and positive definite, which implies that M is nonsingular, and
where Ṁ − 2C is skew symmetric. The Lagrangian is
1 T
L= q̇ M (q) q̇ − U (q) (8.339)
2
and the momentum vector is
T
∂L(q, q̇, t)
p= = M (q) q̇ (8.340)
∂ q̇
As M is nonsingular the velocity can be written
q̇ = M (q)−1 p (8.341)
which simplifies to
1 T
H(q, p) = p M (q)−1 p + U (q) (8.343)
2
where the first term is the kinetic energy. Then, if U (q) is lower bounded, passivity of
the manipulator dynamics with input τ and output q̇ can be concluded from the general
result in Section 8.9.1. This agrees with the passivity analysis based on the Lagrangian
dynamics in Section 8.2.9. Note that it is easier to establish passivity from τ to q̇ in the
Hamiltonian formulation as it is only necessary to check that H does not depend on t
and that U is lower bounded.
a1 = ω × (ω × R1 ) = ω 2 x1 b1 (8.345)
2
a2 = ω × (ω × R2 ) = −ω x2 b1 (8.346)
Balance between the centrifugal forces and the gravitational forces imply that
m1 m2
k2 = m1 x1 ω 2 = m2 x2 ω 2 (8.347)
L2
From this we get Kepler’s third law:
k2 M
ω2 = (8.348)
L3
where M = m1 + m2 .
354 CHAPTER 8. ANALYTICAL MECHANICS
The satellite moves in the rotating gravitational field set up by the earth and the
moon. The position of the satellite is
r = xb1 + y b2 (8.349)
the velocity is
d b ³ ´
v= r + ω ib × r = ẋb1 + ẏ b2 + ω xb2 − y b1 (8.350)
dt
and from (6.405) the acceleration is
b 2 b
d d
a = 2
r + 2ω ib × r + αib × r + ω ib × (ω ib × r)
dt dt
³ ´ ³ ´
= ẍb1 + ÿ b2 + 2ω ẋb2 − ẏ b1 − ω 2 xb1 + y b2 (8.351)
The gravitational force on the satellite is the sum of the gravitational forces from the
earth and the moon, which gives
m1 m3 h i m2 m3 h i
F3 = −k 2 3 (x + x1 ) b1 + y b2 − k2 (x − x2 ) b 1 + y b 2 (8.352)
r1 r23
where q q
2 2
r1 = (x + x1 ) + y 2 , r2 = (x − x2 ) + y 2 (8.353)
Newton’s law in the x and y directions gives
· ¸
m1 m2
ẍ − 2ω ẏ − ω 2 x = −k2 (x + x 1 ) + (x − x2 ) (8.354)
r3 r23
µ 1 ¶
m1 m2
ÿ + 2ω ẋ − ω 2 y = −k2 + 3 (8.355)
r13 r2
This model is normalized by introducing
x y
ξ = , η = , τ = ωt (8.356)
L L
r1 r2
ρ1 = , ρ2 = (8.357)
L L
m1 x2 m2 x1
µ1 = = , µ2 = = (8.358)
M L M L
This gives the normalized model for the restricted three-body problem:
· ¸
d2 ξ dη µ1 (ξ + µ2 ) µ2 (ξ − µ1 )
−2 −ξ = − + (8.359)
dτ 2 dτ ρ31 ρ32
2
µ ¶
d η dξ µ1 η µ2 η
+2 −η = − + 3 (8.360)
dτ 2 dτ ρ31 ρ2
A constant energy function of the system is found from the kinetic energy
1
T = m3 v · v
2
1 h ³ ´i h ³ ´i
= m3 ẋb1 + ẏ b2 + ω xb2 − y b1 · ẋb1 + ẏ b2 + ω xb2 − y b1
2
1 ¡ ¢ 1 ¡ ¢
= m3 ẋ2 + ẏ 2 + m3 ω (−ẋy + ẏx) + m3 ω 2 x2 + y 2 (8.361)
|2 {z } | {z } |2 {z }
T1
T2 T0
8.9. CONTROL ASPECTS 355
Here ω ib is the angular velocity of frame b relative to frame i, αib is the angular acceler-
ation, and τ c is the actuator torque.
A satellite moving in a circular orbit will have velocity v = ω c Rc c1 where
r
µ
ωc = (8.366)
Rc3
is the orbital frequency in the sense that T = 2π/ω c is the period of one orbit. In passing
we mention that this equation and the fact that the radius of the earth is 6,378 km
make it possible to compute the altitude of geostationary orbits as 35,863 km, because
this gives an orbital period of 24 hours. Also a low earth orbit with altitude 1,200 km
corresponds to a radius Rc = 7578 km and an orbital period of 109 min.
The kinetic energy of the satellite is
1 1
Ti = ω ib · Mc · ω ib + mω 2c Rc2 (8.367)
2 2
while the potential energy is
µm
U =− (8.368)
Rc
Then the energy function
hi = Ti2 − Ti0 + U
1 1 µm
= ω ib · Mc · ω ib − mω 2c Rc2 − (8.369)
2 2 Rc
356 CHAPTER 8. ANALYTICAL MECHANICS
is constant as long as the system is not actuated. The last two terms are constants, so
that the function
1
Vi = ω ib · Mc · ω ib (8.370)
2
will be a constant for the unactuated system.
The description based on the angular velocity ω ib gives the rotation of the satellite
relative to a star-fixed coordinate frame i. For the stabilization of the attitude in an orbit
it is better to study the dynamics in terms of the angular velocity ω cb of the satellite
relative to the orbit frame. The change of variables is done using
ω ib = ω cb + ω ic (8.371)
= ω cb + ω c c2 (8.372)
This gives the expression
1 1 1
Tc = ω cb · Mc · ω cb + ω c ω cb · Mc · c2 + ω 2c c2 · Mc · c2 + mω 2c Rc2 (8.373)
2 2 2
for the kinetic energy. Then the energy function, which is found from
hc = Tc2 − Tc0 + U (8.374)
1 1 1 µm
= ω cb · Mc · ω cb − ω 2c c2 · Mc · c2 − mω 2c Rc2 − (8.375)
2 2 2 Rc
is constant for the unactuated satellite. The last two terms on the right side are constants,
and this shows that
1 1
Vc = ω cb · Mc · ω cb − ω 2c c2 · Mc · c2 (8.376)
2 2
is a constant function for the unactuated satellite.
where r = R − Rc is the vector from the center of mass to the mass element dm. The
gravitational potential is Z
dm
U = −µ (8.379)
b R
The expressions for the gravity gradient gc and the gravitational potential are difficult to
use in their present form, but can be approximated with more suitable expressions using
the binomial series à !
1 1 r · Rc
= 3 1 − 3 2 + ... (8.380)
R3 Rc Rc
8.9. CONTROL ASPECTS 357
and à !
1 1 r · Rc 1 r 2 3 (r · Rc )2
= 1− − + + ... (8.381)
R Rc Rc2 2 Rc2 2 Rc4
It is found that
Z Z
c3 × rrdm · c3 = c3 × r2 Idm · c3 + c3 × Mc · c3 (8.384)
b b
Z
= c3 × c3 r2 dm + c3 × Mc · c3 = c3 × Mc · c3 (8.385)
b
which gives
gc = 3ω 2c c3 × Mc · c3 (8.386)
The equation of motion can then be written
³ ´
Mc · αib + ω ib × Mc · ω ib = 3ω 2c c3 × Mc · c3 + τ c (8.387)
ω cb = ω ib − ω ic (8.394)
= ω ib − ω c c2 (8.395)
h = T2 − T0 + U
1 3 1 1
= ω cb · Mc · ω cb + ω 2c c3 · Mc · c3 − ω 2c c2 · Mc · c2 + U0 − mω 2c Rc2
2 2 2 2
Again, the last two terms of the energy function are constants, and it follows that the
function
1 3 1
Vc = ω cb · Mc · ω cb + ω 2c c3 · Mc · c3 − ω 2c c2 · Mc · c2 (8.397)
2 2 2
is a constant for the unactuated system.
The function Vc was used for Lyapunov analysis of gravity gradient stabilization of
a satellite in (Hughes 1986). What can be learned from this example is that nontrivial
energy functions for Lyapunov analysis can be derived using Hamilton theory, and in
particular, that this approach offer a systematic way of changing coordinates in the
description.
∂L (q, q̇, t) T
p= (8.398)
∂ q̇
be given. Suppose that the velocity can be given by the function
q̇ = φ (q, p, t) (8.399)
The action integral A(C) as defined in Section 8.6.4 satisfies δA(C) = 0 for a tra-
jectory C with fixed end points, and this implies Lagrange’s equation of motion. We
8.10. THE HAMILTON-JACOBI EQUATION 359
introduce a function S(q, t), which is yet to be specified, and define the alternative La-
grangian function
dS(q, t)
L∗ (q, q̇, t) = L (q, q̇, t) − (8.401)
dt
From the chain rule it follows that
dS ∂S ∂S
= + q̇ (8.402)
dt ∂t ∂q
Define the alternative action integral A∗ (C) by
Z t2 Z t2 µ ¶ Z t2 Z t2
∗ ∗ dS
A (C) = L dt = L− dt = Ldt − dS (8.403)
t1 t1 dt t1 t1
∂L∗ T
=0 (8.409)
∂ q̇
360 CHAPTER 8. ANALYTICAL MECHANICS
This gives
∂L∗ T ∂L T ∂S T ∂S T
0= = − =p− (8.410)
∂ q̇ ∂ q̇ ∂q ∂q
which implies that
∂S
p= (8.411)
∂q
on the geodesic field. Moreover, from (8.402) and (8.408) it follows that
dS ∂S
L [q, ψ (q, t) , t] = = + pT ψ (q, t) (8.412)
dt ∂t
This can be combined with
H(q, p, t) = pT ψ (q, t) −L (q, q̇, t) (8.413)
and the following result is found:
∂S(q, t) T
p(q, t) = (8.414)
∂q
Mechanical vibrations
9.1 Introduction
Active damping of mechanical vibrations has been important for space structures where
there is little damping and where the structures are designed for low weight. As new
inexpensive sensors and actuators are becoming available, active vibration damping is
being more used also in civil engineering, crane systems, and transportation. In this
chapter vibration models will be developed for the string model and the Euler Bernoulli
beam model. These models represent important properties that are seen for models of
mechanical vibrations. Models are developed using assumed modes, mostly in the form of
orthogonal modes, and finite-element models. The Galerkin method is used to illustrate
similarities between the assumed mode method and the finite-element approach. Also
irrational transfer functions are derived, and examples with positive realness and non-
minimum phase dynamics are discussed. The chapter starts with systems with lumped
components, and progresses with distributed parameter models.
Elastic systems consisting of rigid bodies connected with springs and dampers are
described by ordinary differential equations, and are said to be lumped parameter sys-
tems. In contrast to this, systems with elastic bodies are described by partial differential
equations, and are said to be distributed parameter systems. In this chapter we will first
present results on elastic systems with lumped parameters and then proceed with results
on distributed parameter systems.
Energy considerations and passivity properties are important in the analysis and
controller design for elastic systems with distributed parameters. We will see that if
the applied force at a point is the input, and the velocity at the same point is the
output, then the input and output are said to be collocated, and the system is passive.
A system where force is input and velocity is output will not be passive if the input
and output are noncollocated , that is, if the velocity is not measured at the point where
the force is applied. Such systems may even be nonminimum phase, which may cause
severe restrictions on the performance of the closed loop system. In this section we will
study these phenomena closer. The material is adopted from (Meirovitch 1967), (Weaver,
Timoshenko and Young 1990) and (Rao 1990).
361
362 CHAPTER 9. MECHANICAL VIBRATIONS
K
m1 F
x0
D x1
Figure 9.1: Mechanical two-port of the hybrid type with inputs ẋ0 and F .
The equation of motion for a mass m that is connected to a point x0 with a spring
with stiffness K and a damper with coefficient D is given by
Here x is the position of the mass, and F is a force acting on the mass. The system
is shown in Figure 9.1. In the following this simple system will be used as a building
block in some of the models in this section. In this connection it is useful to have
a two-port description of the system where one port has input ẋ0 and output F0 =
D(ẋ − ẋ0 ) + K(x − x0 ), and the other port has input F and output ẋ. This will be
termed a hybrid formulation as one port has the force as output, and the other has
velocity as output. The ports are therefore compatible for a serial interconnection.
K1
F1 m1 m2 F2
x1 D1 x2
Figure 9.2: Mechanical two-port of the displacement type with inpouts F1 and F2 .
Another possible building block for models of lumped elastic systems is two masses
connected by a spring and a damper. The system has two masses m1 and m2 connected
by a spring K1 and a damper D1 . An externally applied force F1 is acting on mass m1 ,
and a force F2 is acting on m2 . The position of mass i is denoted xi . The system is
shown in Figure 9.2, and the equations of motion for the system are
where x = (x1 , x2 )T , F = (F1 , F2 )T , and the mass matrix M, the damping matrix D
and the stiffness matrix K are given by
µ ¶ µ ¶ µ ¶
m1 0 D1 −D1 K1 −K1
M= , D= , K= (9.5)
0 m2 −D1 D1 −K1 K1
In a network setting the system described by (9.2) and (9.3) is a two-port where port
1 has input F1 and output ẋ1 , and port 2 has input force F2 and output ẋ2 . This type
of two-port will be said to be in a displacement formulation as both ports have force as
input and velocity as output.
Example 145 The ports of a displacement two-port are compatible with connections to
springs and dampers, which have velocity as input and force as output. To demonstrate
this we consider the case where mass m1 is connected to a fixed point with a spring K0
and a damper D0 , and mass m2 is connected to a fixed point with a spring K2 and a
damper D2 . This means that the input port is connected to the one-port
F1 = − (K0 x1 + D0 ẋ1 ) (9.6)
and that the output port is connected to the one-port
F2 = − (K2 x2 + D2 ẋ2 ) (9.7)
Then the damping and stiffness matrices for the interconnected system is obtained by
inserting F1 and F2 into (9.2) and (9.3) which gives
µ ¶ µ ¶
D0 + D1 −D1 K0 + K1 −K1
D= , K= (9.8)
−D1 D1 + D2 −K1 K1 + K2
The
P4 time derivative of the energy for the solutions of the system will be the power
i=1 τ i vi supplied by the inputs τ i minus the power dissipated in the dampers. This is
written
X4 X3
1 1
V̇ = τ i vi − Di (ẋi − ẋi+1 ) − D0 ẋ20 − D4 ẋ24 (9.37)
i=1 i=1
2 2
Suppose that τ 2 = τ 3 = τ 4 = 0. Then the system with input τ 1 and output v1 will be
passive.
wx, t
dx x
x 0 x L
f P dP
d
dx
P
A stretched string with tension P is fixed at x = 0 and x = L (Figure 9.3). The string
is supposed to have small transverse displacements w(x, t), and is excited by a transverse
force f (x, t). The equation of motion for a differential element of the string as shown in
Figure 9.4 is
∂2w
ρdx 2 = (P + dP ) sin(θ + dθ) − P sin θ + f dx (9.38)
∂t
where ρdx is the mass of the element, and θ is the slope of the string. Division with dx
leads to the partial differential equation
∂2w ∂
ρ = (P sin θ) + f (9.39)
∂t2 ∂x
For small angles we may approximate the sine function by
∂w
sin θ = (9.40)
∂x
which gives µ ¶
∂2w ∂ ∂w
ρ 2
= P +f (9.41)
∂t ∂x ∂x
If the tension is constant along the string, then P is a constant and the model is
∂2w ∂2w
ρ = P +f (9.42)
∂t2 ∂x2
The homogeneous form
∂2w ∂2w
2
= c2 2 (9.43)
∂t ∂x
of (9.42) is called the wave equation where
s
P
c= (9.44)
ρ
Note that the shape functions are orthogonal in the sense that
Z L
ρφj (x)φk (x)dx = δ jk (9.52)
0
x
h
-2 -1 0 1 2
Due to the orthogonality of the shape functions and the derivatives this simplifies to
Z L
q̈i (t) + ω 2i qi (t) = φi (x)f (x, t)dx (9.56)
0
We see that if φi (xF ) = 0 for some k, then the force F (t) will have no influence on qi (t).
In control terminology, this means that qi is not controllable when F is the control input.
that are shown in Figure 9.5 are used, and the solution is approximated by
N
X
w(x, t) = qj (t)ψ j (x) (9.59)
j=1
Note that
ψ j (xk ) = δ jk (9.60)
which implies that the displacement at node k is given by
We insert the approximation into the wave equation (9.42) and get
N
X £ ¤
ρq̈j (t)ψ j (x) − P qj (t)ψ 00j (x) = f (x, t) (9.62)
k=1
We apply Galerkin’s method, which in this case involves the multiplication with ψ i (x)
and integration over the interval. This gives
Z L N
X Z L
£ 00
¤
ψ i (x) ρq̈j (t)ψ j (x) − P qj (t)ψ j (x) dx = ψ i (x)f (x, t)dx (9.63)
0 k=1 0
Mq̈ + Kq = F (9.65)
Me q̈e + Ke qe = Fe (9.73)
where µ ¶ µ ¶
qe1 Fe1
qe = , Fe = (9.74)
qe2 Fe2
µ ¶ µ ¶
ρh 2 1 P 1 −1
Me = , Ke = (9.75)
6 1 2 h −1 1
This procedure can be repeated to assemble more elements. For 5 nodes the mass
and stiffness matrix will be
2 1 0 0 0 1 −1 0 0 0
1 4 1 0 0 −1 2 −1 0 0
ρh
0 1 4 1 0 , K = P 0
M= −1 2 −1 0 (9.82)
6
0 0 1 4 1
h
0 0 −1 2 −1
0 0 0 1 2 0 0 0 −1 2
9.4. NONLINEAR STRING DYNAMICS 371
Example 147 The mass matrix as given by (9.66) is tridiagonal. It is called the con-
sistent mass matrix as it is derived using the shape functions. It is possible to have a
simpler model by using a lumped mass model where the mass is lumped at the nodes. This
leads to a diagonal mass matrix, which is called the nonconsistent mass matrix. In the
case of 5 nodes the nonconsistent mass matrix is
1
2 0 0 0 0
0 1 0 0 0
ρ
M= 2 0 0 1 0 0 (9.83)
h
0 0 0 1 0
0 0 0 0 12
Then the model Mq̈ + Kq = F describes the dynamics of a mass spring damper arrange-
ment consisting of N masses that are interconnected by springs in a serial arrangement.
When the consistent mass matrix is used there will in general be spring connections be-
tween all masses.
t n
Depth controllers Lead-in
cable
In this section the equation of motion for a towed marine cable will be presented. The
derivation relies results that will be presented in Section 10.2. In particular this involves
the definition of the material derivative D/Dt and the concept of material coordinates.
Towed marine cables are used in marine seismic operation to map oil and gas reservoirs
in an arrangement as indicated in Figure 9.6 Moreover, the model that will be presented
is also valid for the dynamics of anchor lines.
The position of a point on a cable is described by the spatial length p to the point
along the stretched cable, by the material length s to the point along the undeformed
cable, and the spatial position r(s, t) given in a spatial frame (x, y, z). The length p is
referred to as the length in spatial coordinates, while the length s is said to be the length
in material coordinates. The displacement of a point from its undeformed position is
denoted u = p − s. The material strain η is defined by
du dp dp
η= = −1⇒ =η+1 (9.86)
ds ds ds
We consider the cable element from s to s+ds of the unstretched cable. We call this a
material cable element as it contains the same material points as the cable is moved and
stretched. In the stretched case this cable element is from p to p + dp. The material cable
element is of constant length ds in material coordinates, and of length dp = (1 + η)ds in
spatial coordinates. The unit tangent vector of the stretched cable is
∂r ∂r ds 1 ∂r
t= = = (9.87)
dp ds dp 1 + η ∂s
As the tangent is a unit vector it can be written
¯ ¯−1
∂r ¯¯ ∂r ¯¯
t= (9.88)
ds ¯ ∂s ¯
This shows that the material strain η is given by
¯ ¯
¯ ∂r ¯
η = ¯¯ ¯¯ − 1 (9.89)
∂s
The volume of a material cable element is A0 ds = Adp where A0 is the cross section
of the unstretched cable, and A is the cross section of the stretched cable. The mass of
a material cable element is constant and is given by dm = ρ0 ds where ρ0 is the mass
per unit length of the unstretched cable. A detailed discussion on material and spatial
coordinates for this problem is found in (Lin and Segel 1974). The velocity v(s, t) and
the acceleration a(s, t) of a point on the cable are given by
Dr(s, t) ∂r(s, t) Dv(s, t) ∂ 2 r(s, t)
v(s, t) = = , a(s, t) = = (9.90)
Dt ∂t Dt ∂t2
The equation of motion for the material cable element ds is given by
D Dv ∂ 2 r(s, t)
(vρ0 ds) = ρ0 ds = ρ0 ds = (P +dP )t(t, s+ds)−P t(t, s)+f (t, s)dp (9.91)
Dt Dt ∂t2
where it is used that ρ0 ds is a constant. Here P is the tension, t is the tangent vector
along the cable, and f is the force per unit length of the stretched cable. Dividing by ds
we get
∂ 2 r(s, t) ∂ dp
ρ0 2
= (P t) + f (9.92)
∂t ∂s ds
9.5. EULER BERNOULLI BEAM 373
According to Hooke’s law the tension in the cable is P = EA0 η where E is the Young’s
modulus, and A0 is the cross section of the unstretched cable. The force due to the
tension P in the cable can be separated into a force along the tangent t and one force
orthogonal to the tangent according to
∂ 2 r(s, t) ∂P ∂t dp ∂η ∂t dp dp
ρ0 2
= t+P +f = EA0 t + P +f (9.93)
∂t ∂s ∂s ds ∂s ∂p ds ds
This gives
∂ 2 r(s, t) ∂2u ∂t
ρ0 = EA0 t + P (1 + η) + f (1 + η) (9.94)
∂t2 ∂s2 ∂p
Example 148 In (Aamo and Fossen 2000) the formulation
µ ¶
∂2r ∂ η ∂r
ρ0 2 = EA0 + f (1 + η) (9.95)
∂t ∂s 1 + η ∂s
due to (Triantafyllou 1990) was used to develop a finite-element model of anchor lines
for moored offshore vessels using Galerkin’s method with
N
X
r(t, s) = qk (t)ψ k (s) (9.96)
k=1
The shape functions ψ k (s) were selected as the hat functions shown in Figure 9.5.
w
x
L
where f is the external force per unit length of the beam. We see that the moment of
inertia is set to zero in the moment equation. This is due to the assumption that the
374 CHAPTER 9. MECHANICAL VIBRATIONS
f
M dM
V
w V dV
M
x
x dx
beam is slender. A more elaborate model for thick beams is the Timoshenko beam which
includes a nonzero moment of inertia. Division of the equations by dx leads to
∂V ∂2w
− +f = ρ (9.99)
∂x ∂t2
∂M
= V (9.100)
∂x
Combining these two equations we get
∂2M ∂2w
− + f = ρ (9.101)
∂x2 ∂t2
For the Euler Bernoulli beam the bending moment is given by the constitutive equation
∂2w
M (x, t) = EI(x) (9.102)
∂x2
where E is Young’s modulus, and I(x) is the moment of inertia about the y axis. It is
noted that (9.102) implies that the shear force is
∂3w
V = EI(x) (9.103)
∂x3
Combination of (9.101) and (9.102) gives the partial differential equation
· ¸
∂ 2 w(x, t) ∂2 ∂ 2 w(x, t)
ρ(x) + EI(x) = f (x, t) (9.104)
∂t2 ∂x2 ∂x2
For the case where the moment of inertia I(x) is a constant and the external force f (x, t)
is zero the following result is obtained:
∂2w ∂4w
2
+ c2 4 = 0 (9.105)
∂t ∂x
where
EI
c2 = (9.106)
ρ
9.5. EULER BERNOULLI BEAM 375
Typical boundary conditions for the Euler Bernoulli beam as shown in Figure 9.9 are:
1. A clamped end is defined to have zero elastic deformation and zero elastic angle.
This means that
∂w
w = 0 and =0 (9.107)
∂x
2. A free end has zero bending moment and zero shear force. From (9.102) and (9.103)
this is seen to imply that
∂2w ∂3w
= 0 and =0 (9.108)
∂x2 ∂x3
3. A pinned end has zero elastic deformation and zero bending moment, so that
∂2w
w = 0 and =0 (9.109)
∂x2
4. An end with a point mass m will have zero bending moment, and a shear force
∂2w
V =m (9.110)
∂t2
This gives the boundary conditions
∂2w ∂3w ∂2w
= 0 and EI = m (9.111)
∂x2 ∂x3 ∂t2
5. An end point clamped to a rigid body with mass m and moment of inertia J will
have a shear force and bending moment given by
∂2w ∂ 2 ∂w
V =m 2
, M = −J 2 (9.112)
∂t ∂t ∂x
From (9.102) and (9.103) this is seen to imply that
9.5.3 Energy
For an Euler Bernoulli beam the kinetic energy is
Z
1 L
T = ρ(x)ẇ2 dx (9.114)
2 0
while the potential energy is
Z L
1
U= EI(x)(w00 )2 dx (9.115)
2 0
and the time derivative of the energy along the solutions of the system is found to be
Z L
Ẇ = (ẇρẅ + w00 EI ẇ00 ) dx
0
Z L
= EI (−ẇw0000 + ẇf + w00 ẇ00 ) dx
0
Z L
L
= − ẇEIw000 |0 + EI (ẇf + ẇ0 w000 + w00 ẇ00 ) dx
0
Z L
L L
= − ẇEIw000 |0 + ẇ 0
EIw00 |0 + EI (ẇf − ẇ00 w00 + w00 ẇ00 ) dx
0
Z L
L
= − ẇV |L 0
0 + ẇ M |0 + EI ẇf dx (9.117)
0
For a given set of boundary conditions there will be a set of shape functions φi (x) with
associated constants β i and natural frequencies ω i = cβ 2i so that the solution is given by
∞
X
w(x, t) = φi (x)qi (t) (9.132)
i=1
378 CHAPTER 9. MECHANICAL VIBRATIONS
The boundary conditions on the deflection w(x, t) imply the boundary conditions
given in Table 9.1 on the shape functions. Given the boundary conditions, the constants
Ci are found by formulating equations for the boundary conditions according to
Bc = 0 (9.135)
where c = (C1 , C2 , C3 , C4 )T . Then, to have nontrivial solutions for the constants in the
vector c, it is necessary that
det B = 0 (9.136)
Nontrivial solutions are found when det Bcf = 0, which occurs when
This transcendental equation holds for infinitely many discrete values of β, and must
be solved numerically. The solutions are denoted β i , and for each β i there corresponds
resonance frequency ω i = β 2i c in agreement with (9.125), and a set of constants C1i ,
9.5. EULER BERNOULLI BEAM 379
C2i , C3i , C4i , and one shape function φi (x). We note from the first and second row of
(9.139) that the constants are related by C3i = −C1i and C4i = −C2i , and that the third
and fourth row of (9.139) implies that C2i can be expressed by C1i according to
cos β i L + cosh β i L
C2i = αi C1i where αi = (9.141)
sin β i L + sinh β i L
Numerical values for the first modes are tabulated in textbooks like (Rao 1990), and
for the first three modes we have
In this example
ω2 β2
= 22 = 6.25
ω1 β1
Numerical values for β are tabulated in many textbooks on vibrations for simple cases
like pinned-pinned, free-free, fixed-fixed, fixed-free, fixed-pinned, and pinned-free.
The characteristic equation for different beams are given in Table 9.2.
380 CHAPTER 9. MECHANICAL VIBRATIONS
m2
m1
J1
x
0 L
J1 4 0 m1 4
φ00 (0) = − β φ (0), φ000 (0) = − β φ(0) (9.149)
ρ ρ
m2 4
φ00 (L) = 0, φ000 (L) = − β φ(L) (9.150)
ρ
In the study of satellite dynamics the concept of constrained modes are often used.
These are the modes that occur when the satellite is assumed to have infinite inertia and
mass. Therefore the constrained modes for this antenna is found when m1 and J are
assumed to approach infinity. The condition for nontrivial solutions in this case is
m2
1 + cos β cosh β + (cos β − sin β sinh β ) = 0 (9.153)
ρ
In contrast to this the unconstrained modes are the modes are found for finite m1
and J. For a small satellite we assume that m1 =78 kg, J = 4 kg m2 , = 6 m, m2 = 4
kg, EI = 28.69 N·m2 (10,000 lbf ·inch2 ), ρ = 1 kg/6 m = 0.17 kg/m. Then the numerical
values were found for the constrained case and the unconstrained case using Maple. The
results are shown in Table 9.3. It was found that the spacecraft with gravity boom will
have resonances with periods 41.0 s, 1.14 s, 0.34 s,. . . The computations based on the
assumption of constrained modes predicts periods 20.2 s, 1.10 s, 0.34 s. It is seen that
the lowest natural frequency computed for the constrained modes is a factor of 2 greater
than the natural frequency associated with the unconstrained mode for this example.
9.5. EULER BERNOULLI BEAM 381
Table 9.3: Natural frequencies for satellite antenna using constrained modes and uncon-
strained modes.
φ0000 4
i (x) = β i φi (x) (9.155)
The solutions φi (x) are called the eigenfunctions (9.124), and the associated values λi =
β 4i are the eigenvalues of the system. It is assumed in the following that the eigenvalues
are distinct. Note that for each eigenfunction φi (x) there is one natural frequency
ω i = cβ 2i (9.156)
The integral on the left side can also be evaluated by partial integration twice to be
Z Z
¯ ¯
φi (x)φ0000
j (x)dx = φi (x)φ000
j (x) ¯ − φ0
i (x)φ00
j (x) ¯ + φ00i (x)φ00j (x)dx (9.158)
0 0
0 0
Usually the eigenfunctions are normalized so that the following result is valid:
The eigenfunctions of (9.124) are orthogonal shape functions in the sense that they satisfy
Z
ρφi (x)φj (x)dx = δ ij (9.165)
0
At this point Galerkin’s method is used. This involves the multiplication of equation
(9.170) with φi (x) and the integration of the result over the interval x ∈ [0, ]. This gives
Z ∞
X Z
φi (x) ρφj (x)dx[ω 2j qj (t) + q̈j (t)] = φj (x)δ(x − xu )dxu(t) (9.171)
0 j=1 0
R
For any function f (x) the Dirac delta gives 0 f (x)δ(x − xu )dx = f (xu ). This together
with the orthogonality of the eigenfunctions, see (9.165), lead to
φi (xu )
qi (s) = u(s) (9.173)
ω 2i + s2
We assume that the measurement y(t) is the velocity ẇ(xy , t) of the elastic deflection
at position xy , that is,
y(t) = ẇ(xy , t) (9.174)
Then the measurement can be written
∞
X
y(t) = q̇i (t)φi (xy ) (9.175)
i=1
1. If input and output are collocated, which is the case whenever xu = xy = x0 , then
the transfer function from u to y is passive because
∞
Y (s) X sφ2i (x0 )
= (9.177)
U (s) ω 2 + s2
i=1 i
4. If φi (xy ) = 0, then mode i will not be noticeable in the measurement y. This means
that mode i is not observable from the measurement y.
and
results, which is passive. Note that the complex conjugated zeros at s = ±j57.4 is located
between the poles in s = ±j12.8 and s = ±j80.1. A simple P controller
u = −Kp y (9.182)
will give stability, with a power dissipation of u(t)y(t) = −Kp y(t)2 . The gain Kp is only
limited by noise, quantization and discretization effects.
Next noncollocation is tried with xu = 0.5 m and xy = 2 m. Then
This transfer function has a zero in the right half plane at s = 47.6. This limits the
bandwidth of the system. Alternatively, we see that the transfer function is the sum of
two transfer functions that are not very different, except that they have opposite signs.
Thus if a P controller is used in a negative feedback, this will give stabilization and power
dissipation for mode 1, while it will give destabilization and added power to mode 2. In
fact the only possibility for stabilization is that the mode with positive feedback has gain
less that unity which ensures stability according to Bode-Nyquist stability theory.
9.6. FINITE ELEMENT MODEL OF EULER BERNOULLI BEAM 385
9.6.1 Introduction
An alternative technique for analyzing the Euler Bernoulli beam is to use the finite-
element method. The finite-element method can be seen as a model formulation based
on the Galerkin method, where special set of shape functions are used. The characteristic
feature of the finite-element method is that the shape functions are locally defined in the
sense that they are nonzero only in short intervals of the beam. This is in contrast to the
orthogonal shape functions, which are global function on the beam. An alternative way
of seeing the finite-element method is that the beam is divided into beam elements. The
equations of motion are then derived for the beam element using a cubic shape function,
and then the beam model is obtained by connecting the beam element models using
multiport techniques. The presentation that follows will focus on the formulation using
beam elements, but the Galerkin point of view will also be presented.
In a finite-element model of an Euler Bernoulli beam the basic building block of the
model is a beam element of length h. The element is defined for the interval 0 ≤ x ≤ h.
At x = 0 the shear force is V1 and the bending moment is M1 , the elastic displacement
is w1 , and the elastic angle is w10 . This can be seen as one port with effort V1 and flow
ẇ1 , and one port with effort M1 and flow ẇ10 . At x = h the shear force is V2 , the bending
moment is M2 , the elastic deflection is w2 , and the elastic angle is this is w20 . This is
described as a port with effort V2 and flow ẇ2 , and one port with effort M2 and flow ẇ20 .
The usual finite-element model of the Euler Bernoulli beam is based on the displacement
formulation where the inputs to the model are the forces and torques, and the outputs
are the displacements and the displacement angles. In the multiport terminology this is
an admittance model where the efforts are input and the flows are outputs.
The displacement in the element is modeled as the cubic expression
The motivation for using this expression is that in the stationary case the displacement
satisfies w0000 = 0, which has solution (9.184). The generalized coordinates ai (t) of the
beam element are defined as
4
X
w(x, t) = αi (x)ai (t) (9.187)
i=1
386 CHAPTER 9. MECHANICAL VIBRATIONS
These cubic shape functions are called the Hermitian shape functions.
Galerkin’s method for the beam element leads to
Me ä + Ke a = f (9.192)
Example 150 To simplify the model the mass is sometimes lumped to have a diagonal
mass matrix (Rao 1990). For translational degrees of freedom this is simply done by
lumping all mass at the nodes, while for rotational inertia the inertia can be computed
by having uniform mass distribution for half a beam on each side of the node. This gives
in this example
1 0 0 0
2
ρh h
0 12 0 0
Me = (9.196)
2 0 0 1 0
2
0 0 0 h12
which is the lumped mass matrix.
of constraints to hold the two element together, and the equations of motion for elements
k and k + 1 are given by
ak,1 ak,1 fk,1
d2 a ak,2 fk,2
Me 2 k,2 + Ke = (c) (9.197)
dt ak,3 ak,3 fk,3 + f3
ak,4 ak,4 (c)
fk,4 + f4
(c)
ak+1,1 ak+1,1 fk+1,1 − f3
d2 a ak+1,2
= fk+1,2 − f4
(c)
Me 2 k+1,2 + Ke (9.198)
dt ak+1,3 ak+1,3 fk+1,3
ak+1,4 ak+1,4 fk+1,4
These forces and torques of constraint are eliminated by adding rows 3 and 4 of element
k to rows 1 and 2 of element k + 1. This gives the model
Mq̈ + Kq = u (9.199)
where q = (ak,1 , ak,2 , ak+1,1 , ak+1,2 , ak+1,3 , ak+1,4 ). The mass matrix is obtained from
µ ¶ µ ¶
Me 04,2 02,2 02,4
M= + (9.200)
02,4 02,2 04,2 Me
d2
M̄ ā + K̄ā = f̄ (9.202)
dt2
ā = (a1 , . . . , ap )T (9.203)
M̄ = block diag(Me1 , . . . , Mep ), K̄ = block diag(Ke1 , . . . , Kep ) (9.204)
where the connection of the elements is obtained by requiring
ā = Cq, u = CT f̄ (9.205)
where
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
C=
(9.206)
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
when N = 2. Then the mass matrix and the stiffness matrix are found from
to be
m11 m12 m13 m14 0 0
m21 m22 m23 m24 0 0
m31 m32 m33 + m11 m34 + m12 m13 m14
M=
(9.208)
m41 m42 m43 + m21 m44 + m22 m23 m24
0 0 m31 m32 m33 m34
0 0 m41 m42 m43 m44
k11 k12 k13 k14 0 0
k21 k22 k23 k24 0 0
k31 k32 k33 + k11 k34 + k12 k13 k14
K=
(9.209)
k41 k42 k43 + k21 k44 + k22 k23 k24
0 0 k31 k32 k33 k34
0 0 k41 k42 k43 k44
and the resulting model is
Mq̈ + Kq = u (9.210)
where the generalized coordinates are q = (a1,1 , a1,2 , . . . , aN,1 , aN,2 )T and the mode shape
vector is ψ =(ψ 1,1 , ψ 1,2 , . . . , ψ N,1 , ψ N,2 )T . The shape functions αj,1 (x) and αj,2 (x) for
the Euler Bernoulli beam are selected in agreement with (9.188—9.191) as the Hermitian
shape functions
(x−xi )2 3
1−3 2 + 2 (x−x3 i ) , xi ≤ x ≤ xi+1
i i
2 3
αi,1 (x) =
3 (x−x2 i−1 ) − 2 (x−x3 i−1 ) , xi−1 ≤ x ≤ xi (9.213)
i−1 i−1
0 otherwise
2 3
(x−xi )
+ (x−x2 i ) , xi ≤ x ≤ xi+1
x−2 i i
2
αi,2 (x) = (x−xi−1 ) (x−xi−1 )3 (9.214)
− + 2 , xi−1 ≤ x ≤ xi
i−1 i−1
0, otherwise
1.2
1 ψ
1
0.8
0.6
0.4
0.2
ψ
2
-0.2
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
This gives the following physical interpretation of the generalized coordinates q2k−1 =
ak,1 (t) and q2k = ak,2 (t):
In the Galerkin method the equation of motion is premultiplied by ψ i (x) and integrated
over the interval x ∈ [0, ]. This gives the expression
Z 2N
X Z
ψ i (x) [ρc2 qj (t)ψ 0000
j (x) + ρq̈j (t)ψ j (x)]dx = ψ i (x)b(x)u(t)dx (9.220)
0 i=1 0
then
N
"Z Z # Z
X
ρψ i (x)ψ j (x)dxq̈i (t) + c2
ρψ 00i (x)ψ 00j (x)dxqj (t) = ψ i (x)b(x)dxu(t)
i=1 0 0 0
Mq̈ + Kq = bu (9.223)
Here q = (q1 , . . . , q2N ) T is the vector of generalized coordinates, M = {mij } is the mass
matrix and K = {kij} is the stiffness matrix, and b = (b1 , . . . , bN ) T with elements given
by
Z
mij = ρψ j (x)ψ i (x)dx (9.224)
0
Z
kij = c2 ρψ 00j (x)ψ 00i (x)dx (9.225)
0
Z
bi = ψ j (x)b(x)dx (9.226)
0
Note that
1. The mass matrix M and the stiffness matrix K are symmetric. Moreover, the M
and K matrices will typically be positive definite.
2. If the orthogonal mode shapes are used, then the mass matrix M and the stiffness
matrix K will be diagonal matrices.
w x
m
Tm
Motor
In this section we will study the dynamics of an Euler Bernoulli beam that is rotated
by a motor. This can be seen as a simplified model of a robotic joint with an elastic link.
The motor has moment of inertia Jm and joint angle θm , and the Euler Bernoulli beam
9.7. MOTOR AND EULER BERNOULLI BEAM 391
has length as shown in Figure 9.12. The position of a point x along the beam is given
by
η(x, t) = xθm (t) + w(x, t) (9.227)
where η(x, t) is the arc length from the reference position along a circle of radius x, and
w(x, t) is the elastic deflection.
For this system the dynamics are the same as for the usual Euler Bernoulli model,
except that the acceleration is ∂ 2 η/∂t2 in place of ∂ 2 w/∂t2 . This gives
∂4w ∂2η
c2 4
(x, t) + 2 (x, t) = 0 (9.228)
∂x ∂t
The equation of motion for the motor shaft can be found from
where Z
h(t) = Jm θ̇m + [xθ̇m + ẇ(x, t)]ρxdx (9.230)
0
is the angular momentum of the motor and beam. The equation of motion is found to
be Z
Jt θ̈m (t) + ρxẇ(x, t)dx = Tm (t) (9.231)
0
where Z
Jt = Jm + ρx2 dx (9.232)
0
is the total inertia seen from the motor.
where φj (x) is a set of shape functions. Typically, the orthogonal shape functions may be
available from previous analysis, or even from textbooks, and a widely used method is to
approximate the solution by assuming that the orthogonal modes of the beam itself is a
sufficiently accurate approximation in (9.233). To demonstrate how this can be done we
will use the orthogonal shape functions φj (x) of a pinned Euler Bernoulli beam, which
is an accurate approximation if the inertia of the motor is large compared to the inertia
of the beam.
The angular momentum of the motor axis and beam is
Z X∞
h(t) = Jm θ̇m + [xθ̇m + φj (x)q̇j (t)]ρxdx (9.234)
0 j=1
where Z
hj = ρφj (x)xdx (9.236)
0
is the angular momentum coefficient for mode shape j.
Insertion of (9.227) and (9.233) into (9.228) gives
∞
X
[c2 φ0000
j (x)qj (t) + φj (x)q̈j (t)] + xθ̈ m (t) = 0 (9.237)
j=1
As the mode shapes φj are eigenfunctions that satisfy (9.124), this can be written
∞
X
φj (x)[ω 2j qj (t) + q̈j (t)] + xθ̈m (t) = 0 (9.238)
i=1
where the natural frequencies are given by ω 2j = c2 β 4j . Finally, we may find the differential
equations for the generalized coordinates qi by multiplying with φi (x) and integrating
over the interval x ∈ [0, ]. This gives
Z X∞
ρφi (x) φj (x)[ω 2j qj (t) + q̈j (t)] + xθ̈m (t) dx = 0 (9.239)
0
j=1
Then, by accounting for the orthogonality of the shape functions as expressed in (9.165)
we arrive at the differential equations
where i has been inserted for j, and the angular momentum coefficients hi are given by
Z
hi = ρφi (x)xdx (9.241)
0
This type of model formulation is used to simulate the dynamics of flexible antennas
mounted on satellites (Hughes 1974).
where ψ j (x) are the Hermitian shape functions used in the finite-element method. The
partial differential equation (9.228) is then approximated by
where Z
Jt = Jm + ρx2 dx (9.247)
0
is the total inertia seen from the motor, and
Z
hj = ρψ j (x)xdx (9.248)
0
w 2 ,V 2
Figure 9.13: Clamped beam with excitation force V2 and deflection w2 on the tip.
∂4 s2
4
w(x, s) + 2 w(x, s) = 0 (9.252)
∂x c
Define the complex variable γ(s) by the relation
s2
γ4 = − (9.253)
c2
Then the Laplace transformation of the partial differential equation (9.266) gives the
ordinary differential equation
∂4
w(x, s) − γ 4 w(x, s) = 0 (9.254)
∂x4
The solution to the Laplace transformed model (9.254) is
For the clamped-free beam the boundary conditions imply that w1 = 0, w10 = θ1 = 0, and
that M2 and V2 are functions of time only. This means that w1 , θ1 , M2 and V2 should
be considered as input to the system, whereas w2 , θ2 , M1 and V1 can be considered as
outputs of the system dynamics. Note that it is critical in the method that is presented
here that the appropriate variables are selected as inputs and outputs. From (9.255—
9.258) we find that the input variables can be expressed in terms of the constant Ci
as
w1 (s) 1 0 1 0 C1
1
θ (s) 0 1 0 1 C2
1γ 1
γ 2 EI M2 (s) = − cos γL − sin γL cosh γL sinh γL C3 (9.259)
1 sin γL − cos γL sinh γL cosh γL C4
γ 3 EI V2 (s)
| {z } | {z } | {z }
u(s) G(s) c
9.8. IRRATIONAL TRANSFER FUNCTIONS FOR BEAM DYNAMICS 395
Then, as G(s) is nonsingular, we can find the transfer function matrix H(s) from the
expression
y(s) = H(s)u(s) = K(s)G(s)−1 u(s) (9.261)
where u(s), y(s), G(s), and K(s) are defined in (9.259) and (9.260). Using a symbolic
program like MATLAB or MAPLE, we find that the transfer function from the tip force
V2 to the tip deflection w2 is given by
w2 (s) 1 cos γL sinh γL − sin γL cosh γL
= 3 (9.262)
V2 (s) γ EI 1 + cos γL cosh γL
The singularities of the transfer function are found by equating the denominator to zero.
This gives
1 + cos γL cosh γL = 0 (9.263)
which is the characteristic equation for the clamped-free beam. This means that the
natural frequencies of the irrational transfer functions are given by the natural frequencies
found from the analysis based on the orthogonal mode shapes. This makes sense, as both
methods are exact. The zeros of the transfer function are found from
which is the characteristic equation for the clamped-pinned beam. This can be explained
as the dynamics associated with the zeros gives small amplification from the force V2 (s)
to the deflection w2 (s). The clamped-pinned beam has zero deflection w2 (s), and it
seems reasonable that this is reflected in the location of the zeros.
∂4 1 ∂2
4
η(x, t) + 2 2 η(x, t) = 0 (9.266)
∂x c ∂t
which is the same as for the beam model. The position variable and the angles at the
end-points are given by
while the shear forces and moments at the end-points are given by
1 1
V1 (s) = η 000 (0, s), V2 (s) = η 000 (L, s) (9.269)
EI EI
1 1
M1 (s) = η 00 (0, s), M2 (s) = η 00 (L, s) (9.270)
EI EI
The beam is pinned to the motor at x = 0 and is free at x = L, which leads to the
boundary conditions
η(0, t) = η 00 (L, t) = η 000 (L, t) = 0 (9.271)
1
η 00 (0, t) = M1 (t) = TL (t) (9.272)
EI
where TL (t) is the torque from the motor shaft on the beam.
We will now develop a transfer function model of the form y(s) = H(s)u(s) of the
motor and beam. First we have to select the input and output variables of the model.
The input and output variables are η1 , η 2 , θ1 , θ2 , V1 , V2 , M1 and M2 . The boundary
conditions (9.271) and (9.272) imply that η 1 , M2 and V2 are zero, and that M1 is a
function of time only. Therefore these variables must be in the input vector u of the
transfer function model. The remaining four variables η 2 , θ1 , θ2 , and V1 are in the
output vector y.
The partial differential equation (9.266) for η is the same as the partial differential
equation (9.105) for w. Therefore, the solution η(x, s) and its derivatives with respect to
x will be given by (9.255—9.258), and the input and output variables can be expressed by
1
γ 2 EI M1 (s) −1 0 1 0 C1
η 1 (s) 1 0 1 0 C2
= (9.273)
γ 3 EI V2 (s) sin γL
1
− cos γL sinh γL cosh γL C3
1 − cos γL − sin γL cosh γL sinh γL C4
γ 2 EI M2 (s)
| {z } | {z } | {z }
u(s) K(s) c
and
1
γ θ 1 (s) 0 1 0 1 C1
η (s) cos γL sin γL cosh γL sinh γL C2
1 2
γ θ2 (s) = − sin γL cos γL sinh γL cosh γL C3 (9.274)
1 0 −1 0 1 C4
γ 3 EI V1 (s)
| {z } | {z }| {z }
y(s) G(s) c
The matrix G(s) is nonsingular, we can find the transfer function matrix H(s) from the
expression
y(s) = H(s)c(s) = K(s)G(s)−1 u(s) (9.275)
where u(s), y(s), G(s), and K(s) are defined in (9.259) and (9.260). Using a symbolic
program like MATLAB or MAPLE, we find that the transfer function from the moment
to the angle at x = 0 is given by
θ1 1 1 + cos γL cosh γL
(s) = (9.276)
M1 EI γ (sin γL cosh γL − cos γL sinh γL)
The zeros and the singularities are easily found for this transfer function as the numerator
is equal to zero whenever the characteristic equation for the clamped-free beam is satis-
fied, whereas the denominator is zero when the characteristic equation of the pinned-free
9.8. IRRATIONAL TRANSFER FUNCTIONS FOR BEAM DYNAMICS 397
Zeros Singularities
s s
γL c/L2 γL c/L2
1.875104 ±j3.516 0 ±0 (9.277)
4.694091 ±j22.034 3.926602 ±j15.418
7.854757 ±61.697 7.068583 ±j49.964
10.995541 ±j120.9019 10.210176 ±j104.2477
Table 9.4: The first zeros and singularities for the transfer function from M1 (s) to θ1 (s).
beam is satisfied. These solutions are tabulated in standard textbooks like (Rao 1990).
Then the zeros and singularities are given by Table 9.4.
The singularities and zeros are along the imaginary axis as shown in Figure 9.14.
This agrees with the fact that the transfer function sθ1 /M1 is positive real, which can
be shown from energy arguments. The transfer function from the moment at x = 0 to
Figure 9.14: Singularities and zeros for the transfer function from the motor torque to
M1 the motor angle θ1 . The singularities are marked with crosses, and the zeros are
marked with circles.
Zeros Singularities
s s
γL c/L2 γL c/L2
2.365 (1 + j) ±11.1865 0 ±0 (9.279)
5.498 (1 + j) ± 60.4560 3.926602 ±j15.418
8.639 (1 + j) ±149.2646 7.068583 ±j49.964
Table 9.5: The first zeros and singularities for the transfer function from the motor torque
M1 (s) to tip position η 2 (s) .
Figure 9.15: Singularities and zeros of the transfer function from the motor torque M1
to the end-point position η 2 . The singularities are marked with crosses, and the zeros
are marked with circles.
Part IV
Balance equations
399
Chapter 10
Kinematics of Flow
10.1 Introduction
Balance equations are differential equations that are derived from conservation laws for
control volumes. The conservation laws include the conservation of mass, momentum,
angular momentum, and energy. Fluid flow phenomena are important in the derivation of
the balance laws of this chapter, and therefore the presentation starts with the kinematics
of fluid flow. Then the transport theorem is presented, and it is shown how the transport
theorem can be used to derive balance equations for typical control volumes. Balance
equations for mass, momentum, angular momentum and energy are then developed using
the mathematical tools presented in the first part of the chapter.
10.2 Kinematics
10.2.1 The material derivative
Let x1 , x2 , x3 be the coordinates of a Cartesian frame with with orthogonal unit vectors
a1 , a2 , a3 . A scalar function φ = φ(t, x1 , x2 , x3 ) of time and position is called a scalar
field. The time derivative of a scalar field φ is, according to the usual definition of the
derivative,
dφ ∂φ ∂φ dx1 ∂φ dx2 ∂φ dx3
= + + +
dt ∂t ∂x1 dt ∂x2 dt ∂x3 dt
T
We will also be dealing with vector fields u = u(t, x1 , x2 , x3 ) where u = (u1 , u2 , u3 ) . The
time derivative of a vector field u is
du ∂u ∂u dx1 ∂u dx2 ∂u dx3
= + + +
dt ∂t ∂x1 dt ∂x2 dt ∂x3 dt
The time derivative dφ dt of the scalar field φ clearly depends on the time derivatives
ẋi = dx
dt
i
of the position coordinates xi . This means that it must be specified for which
time function x(t) the derivative is taken. Two cases are common: One is the spatial
derivative which is the derivative at a specific point x = x0 where x0 is a constant vector.
Then the position coordinates xi are constants, and
¯
dφ ¯¯ ∂φ
¯ =
dt x=x0 ∂t
401
402 CHAPTER 10. KINEMATICS OF FLOW
x3 ux,t
v
x, t
xt
x2
x1
The other usual case is the material derivative, which is the time derivative when follow-
T
ing a particular particle of the fluid. Then ẋ = v, where v = (v1 , v2 , v3 ) is the velocity
of the fluid. The material derivative is widely used, and this motivates the introduction
of the notation ¯ ¯
Dφ dφ ¯¯ Du du ¯¯
:= , :=
Dt dt ¯ẋ=v Vt dt ¯ẋ=v
When the vector operator ∇ is applied to a scalar field φ, we get the gradient vector
∂φ ∂φ ∂φ
∇φ = a1 + a2 + a3 (10.3)
∂x1 ∂x2 ∂x3
10.2. KINEMATICS 403
It follows that
∂φ
∂x1
½ ¾
∂φ T ∂uj
∇φ = ∂x2 , ∇u = (10.5)
∂φ ∂xi
∂x3
The material derivative of a scalar field φ and a vector field u can be written
Dφ ∂φ Du ∂u
:= + vT ∇φ, := + vT ∇u (10.9)
Dt ∂t Dt ∂t
or, alternatively, in vector form as
Dφ ∂φ Du ∂u
= + v · ∇φ, = + v · ∇u (10.10)
Dt ∂t Dt ∂t
10.2.3 Divergence
The divergence of a vector field u = u1 a1 + u2 a2 + u3 a3 is the scalar
∂u1 ∂u2 ∂u3
∇ · u= ∇T u = + + (10.11)
∂x1 ∂x2 ∂x3
The divergence appears in many results. In particular, its usefulness is due to the diver-
gence theorem:
The Divergence Theorem: Consider a volume V with a closed surface ∂V and an outwards
pointing surface normal n, where n is a unit vector. Let dV be a volume element and
dA a surface element. Then, for any vector field u = u (x) we have
ZZ ZZZ
u · ndA = ∇ · udV (10.12)
∂V (t) V (t)
404 CHAPTER 10. KINEMATICS OF FLOW
x3
u
n
x2
x1
Figure 10.2: Volume V with outwards pointing surface normal n and the vector u.
The first component of this vector equation follows from the divergence theorem by letting
u=φa1 , and the second and third element is found in a similar way.
10.2.4 Curl
The curl of a vector u = u (x) is the vector
¯ ¯
¯ a1 a2 a3 ¯ X3 X 3
¯ ∂ ¯ ∂uk
¯ ∂
∇ × u = ¯ ∂x1 ∂x2 ∂x ∂ ¯= εijk ai (10.16)
3 ¯ ∂xj
¯ u1 u2 u3 ¯ i=1 j=1
where ∇× is the skew symmetric form of ∇. The curl of a vector is used in Stokes’
Theorem:
10.2. KINEMATICS 405
x3 u n
ds
S
x2
x1
Figure 10.3: Surface S with surface normal n and tangential differential vector ds along
the closed boundary ∂S.
Stokes’ Theorem: Consider a surface S with a boundary ∂S, which is a closed curve.
Let ds be the differential position increment which is tangent to the curve ∂S. Let dA
be an area element on the surface, and let n be a surface normal so that the direction
of ds corresponds to a counter-clockwise rotation around n. Then for any vector field
u = u(x) we have I ZZ ³ ´
u·ds= ∇ × u · ndA
∂S S
We see from Stokes’ Theorem that if the surface S is taken to be dA, then
I ³ ´
1
u·ds= ∇ × u · n (10.18)
dA ∂S
This is equivalent to the existence of a scalar function ψ(x) called the potential of u (x),
so that u(x) =∇ψ(x). This is shown in basic textbooks on vector analysis. Here we just
comment that this is a consequence of the result
Z x2
ψ(x2 )−ψ(x1 ) = ∇ψ(x)·ds (10.20)
x1
Example 153 The skew symmetric form of the column vector form ∇× u is found to be
½ ¾
¡ × ¢× ∂ui ∂uj
∇ u = − (10.21)
∂xj ∂xi
406 CHAPTER 10. KINEMATICS OF FLOW
3
x3 t
2
t0 1
particle
motion
x2
x1
Figure 10.4: The spatial coordinate frame (x1 , x2 , x3 ) and the material coordinate frame
(ξ 1 , ξ 2 , ξ 3 ). At time t0 the two frames coincide, then the matrial frame moves with the
particles of the fluid so that each particle has the same coordinates ξ 1 , ξ 2 , ξ 3 for all t.
Example 154 The following results can be verified on the component level:
³ ´
∇· ∇×u = 0 (10.22)
³ ´
∇ × ∇φ = 0 (10.23)
³ ´
∇ × (φu) = ∇φ × u + φ∇ × u (10.24)
1 ³ ´ ³ ´
(u · u) = u·∇ u+u× ∇×u (10.25)
2 ³ ´ ³ ´
2
∇ u = ∇ ∇·u −∇× ∇×u (10.26)
x3
Vt
Vt 0
x2
x1
Figure 10.5: Material control volume containing the same set of particles for all t. The
material volume V moves along with the particles of the fluid, and may be deformed and
stretched.
x3 n
dA
v
V
x2
x1
Figure 10.6: Material control volume V where the change in volume due to the velocity
v of a surface element dA is indicated.
constant, while the volume and the surface may change with the flow. Such a control
volume will be called a material control volume. An area element dA(t) of the surface
∂V (t) of V (t) moves with the velocity v. Therefore, the motion of the area element dA
results in a change of volume with a rate v · ndA where n is the outwards surface normal
at dA. Integrating over the whole surface ∂V (t) of the control volume results in
ZZ
DV
= v · ndA (10.28)
Dt ∂V (t)
It is seen that if the divergence ∇ · v is negative for all of V (t), then the time derivative
dV (t)
dt will be negative and the control volume will contract and become smaller in size.
408 CHAPTER 10. KINEMATICS OF FLOW
Likewise, if the divergence is positive for all V (t), the control volume will expand. An
interesting result appears if the control volume is taken to be a infinitesimal material
volume element dV (t) which is an infinitesimal volume element containing the same
particles as the fluid flows. Then the divergence ∇ · v can be taken to be a constant over
the control volume, and the time derivative of dV is the material derivative. Then the
divergence theorem gives the following result:
D (dV ) ³ ´
= ∇ · v dV (10.30)
Dt
This shows that the material volume element will diverge if the divergence of velocity is
positive, and that it will contract is the divergence is negative.
dV 1
V̂ := = (10.31)
dm ρ
which is widely used in thermodynamics. Here dV is the volume of the mass element dm,
and ρ is the density. The material derivative of V̂ becomes
³ ´
µ ¶ ∇ · v dV ³ ´
DV̂ D dV 1 D (dV )
= = = = ∇ · v V̂ (10.32)
Dt Dt dm dm Dt dm
To compute the expressions for the divergence and the curl we need some intermediate
results, namely expressions for the divergence and curl of the unit vectors ji . We do this
by introducing a potential given by φ = y1 with gradient
j1
∇y1 = (10.44)
h1
³ ´ ³ ´
Then from the identity ∇× ∇φ = ∇ × ∇ φ = 0 we get
à ! µ ¶
³ ´ j1 1 1 ³ ´
0 = ∇ × ∇y1 = ∇ × =∇ × j1 + ∇ × j1 (10.45)
h1 h1 h1
410 CHAPTER 10. KINEMATICS OF FLOW
The curl of j2 and j3 is found in the same way, and following expressions for the curl of
the unit vectors result:
j2 ∂h1 j3 ∂h1
∇ × j1 = − (10.47)
h1 h3 ∂y3 h1 h2 ∂y2
j3 ∂h2 j1 ∂h2
∇ × j2 = − (10.48)
h2 h1 ∂y1 h2 h3 ∂y3
j1 ∂h3 j2 ∂h3
∇ × j3 = − (10.49)
h3 h2 ∂y2 h3 h1 ∂y1
The divergence of j2 and j3 is found in the same way, and we can conclude that
1 ∂ (h2 h3 )
∇ · j1 = (10.51)
h1 h2 h3 ∂y1
1 ∂ (h3 h1 )
∇ · j2 = (10.52)
h1 h2 h3 ∂y2
1 ∂ (h1 h2 )
∇ · j3 = (10.53)
h1 h2 h3 ∂y3
2
We also present the result for the Laplacian ∇ φ of a scalar field φ, which is found by
2
letting u = ∇φ. Then ∇ φ = ∇ · u, and it is seen that
· µ ¶ µ ¶ µ ¶¸
2 1 ∂ ∂φ h2 h3 ∂ ∂φ h3 h1 ∂ ∂φ h1 h2
∇ φ= + + (10.56)
h1 h2 h3 ∂y1 ∂y1 h1 ∂y2 ∂y2 h2 ∂y3 ∂y3 h3
Example 156 For spherical coordinates (r, φ, θ) the orthogonal unit vectors jr , jφ , jθ
form a right handed system, and we have hr = 1, hφ = r and hθ = r sin φ. The vector u
is written
u = ur jr + uφ jφ + uθ jθ (10.57)
while the gradient of a scalar field ψ is
∂ψ 1 ∂ψ jθ ∂ψ
∇ψ = jr + jφ + (10.58)
∂r r ∂φ r sin φ ∂θ
u = ur jr + uθ jθ + uz jz (10.61)
To proceed we need the Laplacian of the components in the cylindrical coordinate system,
which are given by
à !
2
³ ´ ∂ 2 vr 1 ∂ 2 vr ∂vr ∂ jr ∂ 2 jr ∂ 2 vr 1 ∂vr
∇ vr jr = 2
jr + 2 2 jr + 2 + vr 2 + jr + jr
∂r r ∂θ ∂θ ∂θ ∂θ ∂z 2 r ∂r
µ 2 ¶
∂ vr 1 ∂ 2 vr ∂ 2 vr 1 ∂vr vr 2 ∂vr
= + + + − jr + 2 jθ (10.78)
∂r2 r2 ∂θ2 ∂z 2 r ∂r r2 r ∂θ
à !
2
³ ´ ∂ 2 vθ 1 ∂ 2 vθ ∂vθ ∂ jθ ∂ 2 jθ
∇ vθ jθ = jθ + 2 jθ + 2 + vθ 2 jθ
∂r2 r ∂θ2 ∂θ ∂θ ∂θ
µ 2 2 2
¶
∂ vθ 1 ∂ vθ ∂ vθ 1 ∂vθ vθ 2 ∂vθ
= 2
+ 2 2 + 2
+ − 2 jθ − 2 jr (10.79)
∂r r ∂θ ∂z r ∂r r r ∂θ
2
³ ´ ∂ 2 vz 1 ∂ 2 vz ∂ 2 vz 1 ∂vz
∇ vz jz = 2
j z + 2 2 jz + 2
jz + jz
∂r r ∂θ ∂z r ∂r
10.4. REYNOLDS’ TRANSPORT THEOREM 413
This leads to the following expression for the Laplacian of the velocity in cylindrical
coordinates:
µ 2 ¶
2 ∂ vr 1 ∂ 2 vr ∂ 2 vr 1 ∂vr 2 ∂vθ vr
∇ v = + 2 + + − 2 − 2 jr
∂r2 r ∂θ2 ∂z 2 r ∂r r ∂θ r
µ 2 2 2
¶
∂ vθ 1 ∂ vθ ∂ vθ 1 ∂vθ 2 ∂vr vθ
+ + 2 + + + 2 − 2 jθ
∂r2 r ∂θ2 ∂z 2 r ∂r r ∂θ r
µ 2 2 2
¶
∂ vz 1 ∂ vz ∂ vz 1 ∂vz
+ + 2 + + jz (10.80)
∂r2 r ∂θ2 ∂z 2 r ∂r
and the time derivative of φ(x, t). The boundary of Vc (t) is denoted ∂Vc (t), and the
velocity of a point on the boundary ∂Vc (t) is denoted vc . We recall the following standard
result from calculus:
Z Z b(t)
d b(t) ∂f (x, t) db da
f (x, t)dx = dx + f (b, t) − f (a, t) . (10.82)
dt a(t) a(t) ∂t dt dt
In analogy with this, the time derivative of the integral in (10.81) is equal to the vol-
ume integral of the time derivative of the integrand, and one term due to the changing
boundary of the volume Vc (t).
The last term can be explained as follows: The volume element dA on the surface
∂Vc (t) has velocity vc , and the rate of change of the integral due to this is φvc · ndA
where n is the outwards unit normal of the surface. Integration over the whole surface
gives the total rate of change due to the change in the volume Vc (t).
414 CHAPTER 10. KINEMATICS OF FLOW
To avoid the need to explain whether the volume is material or not, we define the notation
ZZZ ZZZ ZZ
D ∂φ(x, t)
φ(x, t)dV := dV + φv · ndA (10.85)
Dt V V ∂t ∂V
Note that in this notation, the volume V need not be a material volume, it is merely
assumed that some material volume Vm (t) coincides with V at time t.
The result can be further developed by applying the divergence theorem to the last
term on the right side of (10.85), and by using (10.10) and (10.15):
Reynolds’ transport theorem for a material volume coinciding with V at time t is given
in material form as
ZZZ ZZZ · ³ ´¸
D Dφ(x, t)
φ(x, t)dV = + φ ∇ · v dV (10.86)
Dt V V Dt
For a general control volume Vc (t) where a point on the surface has velocity vc the
transport theorem gives
ZZZ ZZZ ZZ
d D
φ(x, t)dV = φ(x, t)dV − φ (v − vc ) · ndA (10.88)
dt Vc Dt Vc ∂Vc
10.4. REYNOLDS’ TRANSPORT THEOREM 415
as there is no term due to a changing boundary. Combining this with (10.85) we find:
.
416 CHAPTER 10. KINEMATICS OF FLOW
Chapter 11
where ρ is the fluid density. This means that principle of mass conservation can be
expressed in the form ZZZ
D
ρdV = 0 (11.2)
Dt V
Dρ ³ ´
+ ρ ∇·v =0 (11.5)
Dt
|{z} | {z }
rate of change of rate of change of density
density in material due to divergence of
volume element material volume element
417
418 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
Example 157 It is possible to derive the divergence form of the continuity equation from
the material form using ³ ´
∇ · (ρv) = ∇ρ · v + ρ(∇ · v) (11.7)
and the definition of the material derivative.
Using the principle of mass conservation as expressed in (11.2) we arrive at the result
ZZZ ZZ
d
ρdV = − ρ (v − vc ) · ndA (11.10)
dt Vc ∂Vc
This equation states that the time derivative of the mass in Vc is equal to the net mass
flow into the control volume, which makes sense. We denote the mass flow into the
volume by w1 = ρq1 , and the mass flow out of the volume by w2 = ρq2 , where q1 and q2
are the corresponding volumetric flows. Then the mass balance can be written
d
(ρVc ) = w1 − w2 = ρ(q1 − q2 ) (11.13)
dt
Moreover, assume that the density ρ is the same all over the control volume. The fluid
is assumed to be compressible with bulk modulus β so that
dρ dp ρ
= ⇒ ρ̇ = ṗ (11.14)
ρ β β
Then the mass balance of a control volume Vc with compressible fluid with bulk modulus
β can be written
Vc
ṗ + V̇c = q1 − q2 (11.15)
β
If the velocity varies over the cross section of the pipe, then the mass flow is
ZZ Z
w=− ρv · ndA = ρ vdA = ρv̄A (11.17)
∂Vc
Example 158 We consider gas of density ρ in a fixed volume V shown in Figure 11.1
with inlet through a pipe of cross section A1 and outlet through a pipe of cross section
A2 . We suppose that ρ is constant over the fixed volume V , while the density is ρ1 at the
inlet. We assume that the velocity in the inlet pipe is in the x direction and of magnitude
420 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
A1 V, A2
w1 w2
Figure 11.1: Volume V with mass flow w1 into the wolume and w2 out of the volume.
v1 . In the same way, the velocity in the outlet pipe is assumed to be in the x direction
and of magnitude v2 . The velocity is assumed to be constant over the cross section of the
pipe. Then the balance equation of mass is
dρ
V = A1 ρ1 v̄1 − A2 ρv̄2 (11.20)
dt
which may also be written
dm
= w1 − w2 . (11.21)
dt
Here m = ρV is the mass contained in the volume, w1 = A1 ρ1 v1 is the mass flow into
the volume, and w2 = A2 ρ2 v2 is the mass flow out of the volume.
Example 159 Water of constant density ρ is flowing into a tank of cross section A with
mass flow w1 and flows out with mass flow w2 . The water level is h. The mass balance
is
d
(ρAh) = w1 − w2 (11.22)
dt
which can be written
1
ḣ = (w1 − w2 ) (11.23)
ρA
The continuity equation in combination with the transport theorem gives the result
ZZZ ZZZ
D Dφ
ρφdV = ρ dV (11.26)
Dt V V Dt
By comparing this with (11.24) and accounting for the fact that the volume V is arbitrary,
it is found that
Dφ ∂ (ρφ)
ρ = + ∇ · (ρφv) (11.27)
Dt ∂t
Note that the last term on the right hand side of (11.27) is a divergence term. The
importance of this is made clear by integrating the equation over a volume V and using
the divergence theorem. This gives
ZZZ ZZZ ZZ
Dφ ∂ (ρφ)
ρ dV = dV + ρφ (v · n) dA (11.28)
V Dt V ∂t ∂V
where V can be any volume, and n is the outwards pointing surface normal. We see that
the first term on the right side is the rate of change of the quantity of ρφ in the volume,
while the second term on the right side is the flow of ρφ into the volume over the volume
boundary.
We note that φ may be the component of a vector u, that is, φ = ui which leads to
the following vector equations
The continuity equation and the transport theorem for a vector u gives the results
ZZZ ZZZ
D Du
ρudV = ρ dV (11.29)
Dt V V Dt
and
Du ∂ (ρu)
ρ = + ∇ · (ρvu) (11.30)
Dt ∂t
The last term in (11.30) is verified in a Cartesian coordinate system with orthogonal
unit vectors ai with the following computation:
X ∂ X X X ∂
∇ · (ρvu) = ak · ρ vj aj ui ai = (ρvj ui ) ai (11.31)
∂xk j i i
∂xj
k
This result has a nice structure, and the terms on the right side has the same physical
interpretation as in the scalar case.
Finally we note that from the expressions in (10.10) of the material derivative, the
following alternative expressions are obtained
422 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
µ ¶
∂ (ρφ) Dφ ∂φ
+ ∇ · (ρφv) = ρ =ρ + v · ∇φ (11.33)
∂t Dt ∂t
µ ¶
∂ (ρu) Du ∂u
+ ∇ · (ρvu) = ρ =ρ + v · ∇u (11.34)
∂t Dt ∂t
where ν kj Jj is the rate of production of component k per unit volume in reaction j. Using
the transport theorem, this gives
ZZZ · ¸ Xr ZZZ
∂ρk
+ ∇ · (ρk vk ) dV = ν kj Jj dV (11.36)
V ∂t j=i V
X r
∂ρk
+ ∇ · (ρk vk ) = ν kj Jj (11.37)
∂t j=i
Then, by adding the continuity equations of all components the continuity equation
∂ρ
+ ∇ · (ρv) = 0 (11.39)
∂t
where ρ is the total density
n
X
ρ= ρk (11.40)
k=1
and v is the barycentric velocity, which is defined as the velocity of the center of mass
n
X ρk vk
v:= (11.41)
ρ
k=1
11.2. THE MOMENTUM BALANCE 423
jk = ρk (vk − v) (11.45)
and, accounting for (10.15), we find the following result:
Dρk ³ ´ X r
= −ρk ∇ · v − ∇ · jk + ν kj Jj (11.46)
Dt j=i
while from (11.39) and (11.42) the continuity equation for the total density is
Dρ ³ ´
+ρ ∇·v =0 (11.47)
Dt
which is found by inserting ρk = ρck in the continuity equation (11.46) for component k
and then use (11.47).
x3
n
tn
x2
x1
Figure 11.2: The stress vector in an inviscid fluid is parallel to the surface normal.
where dF is the force acting on the differential volume dV . Note that the material
derivative is used, as Newton’s law applies to a material volume element. The mass ρdV
of the particles in the material volume element is constant, and it follows that
D D Dv Dv
(ρvdV ) = (ρdV ) v + ρ dV = ρ dV (11.51)
Dt Dt Dt Dt
We may therefore write Newton’s law in the form
Dv
ρ dV = dF (11.52)
Dt
The force dF denotes the total force on the volume element, which is the mass force plus
the surface force. When this is integrated over the material volume V we get
ZZZ ZZZ
Dv
ρ dV = dF = F (r) (11.53)
V Dt V
where F (r) is the resultant force acting on the volume V . The surface forces cancel out
inside the volume due to Newton’s third law of action and reaction. This is referred to
as the principle of local equilibrium of the stresses. Because of this the total force F (r)
is given by the sum of surface forces acting on ∂V plus the mass force on the volume.
Assume that the fluid is inviscid in which case the only surface forces are the pressure
forces. This gives
ZZ ZZZ
F (r) = − pndA + ρf dV (11.54)
∂V V
where ρf is the mass force, and −pndA is the surface force in the form of pressure forces.
The divergence theorem and (10.13) then gives
ZZZ ZZZ ³ ´
Dv
ρ dV = −∇p + ρf dV (11.55)
V Dt V
∂ (ρv)
+ ∇ · (ρvv) = −∇p + ρf (11.57)
∂t
and the formulation ³ ´
∂v
ρ + ρ v · ∇ v = −∇p + ρf (11.58)
∂t
Example 161 We consider the one-dimensional case where the velocity is v in the x
direction. Then, if the pressure gradient is zero, the mass forces are zero, and ρ is a
constant, Euler’s equation as given by (11.58) gives
∂v ∂v
+v =0 (11.59)
∂t ∂x
which is known as Burger’s equation (Evans 1998). This simple equation is interesting
as it may have analytical solutions that can be used to check the accuracy of numerical
solution techniques, and it may exhibit shocks where the velocity gradient approaches
infinity.
where v is the velocity of the fluid and vc is the velocity of the surface ∂Vc of the control
volume. Combining these two equations with (11.53) we get
ZZZ ZZ
d (r)
ρvdV = F
|{z} − ρv (v − vc ) · ndA (11.62)
dt V ∂Vc
| {zc } resultant force
| {z }
rate of change on fluid in net increase of
of momentum control momentum
in control volume by convection
volume
Example 162 For the system in Example 158 the momentum conservation in the x
direction gives
ZZZ
d
vρdV = F + p1 A1 − p2 A2 + v1 w1 − v2 w2 (11.63)
dt V
426 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
where F is the force in the x direction acting on the gas from the tank, p1 A1 is the force
due to pressure on the inlet, and p2 A2 is the force due to pressure at the outlet. It is
assumed that the velocity is constant over the cross section.
A1
n A2
n
Pump
w w
We consider a waterjet (Figure 11.3) where water enter through the intake which is
a pipe with cross section A1 , and flows out through an outlet pipe of cross section A2 .
A pump is used to force the water through the waterjet. The water flows axially in the
pipes with velocity v =v1 i = −v1 n at the inlet and v =v2 i = v2 n at the outlet where i
is the unit vector in the x direction. Stationary conditions are assumed. Moreover, the
water is assumed to be incompressible, so that the mass flow in is equal to the mass flow
out. Then the continuity equation gives
where w is the mass flow. We assume that the pressure forces over the cross sections A1
and A2 of the pipes can be left out. Then the momentum equation in the x direction
gives
F + v1 A1 ρv1 − v2 ρA2 v2 = 0. (11.65)
We define the thrust T of the waterjet as the force from the fluid on the casing. The
thrust is given by T = −F , and we get the result
µ ¶
A2
T =− 1− wv2 ≈ −wv2 (11.66)
A1
where it is assumed that A2 ¿ A1 . We see that if the outlet area is much smaller than
the inlet area, then the thrust is equal to mass flow times outlet velocity, and that the
thrust is directed in the opposite direction of the flow through the waterjet. Suppose that
the outlet cross section is reduced. Then if the pump is sufficiently powerful so that the
mass flow w is unchanged, then v2 = w/ (A2 ρ) will increase, and the thrust T ≈ −wv2
will increase in magnitude.
w
m ,T
Here the mass m and the momentum p = mv of the sand are conserved quantities. The
balance equation for the mass is
d
m = w − we , (11.67)
dt
while the balance equation for the momentum is
d
(mv) = −vwe + F (11.68)
dt
Here F is the force from the conveyor belt on the sand. The equation of motion for the
belt is
J ω̇ m = T − F r (11.69)
where J is the inertia experienced by the motor. The equation of motion can be expressed
in terms of the velocity to give
J 1
v̇ = T − F. (11.70)
r2 r
The momentum equation gives
and insertion of the mass balance and the equation of motion gives
µ ¶
J 1
m + 2 v̇ = T − vw (11.72)
r r
The results seem reasonable as the belt is slowed down when sand with zero horizontal
velocity falls down on the belt.
Suppose that the fluid is incompressible so that ρ is a constant. Moreover, assume that
the mass force is the gradient f = −∇(gz) of the gravitational potential gz, where z is
the coordinate in the vertical upwards direction. As ∇ × v = 0 there will be a velocity
potential φ so that v = ∇φ. Then Euler’s equation can be written as the gradient
equation · ¸
∂φ 1 2 p
∇ + v + gz + =0 (11.75)
∂t 2 ρ
where it is used that ρ is a constant for incompressible fluids. This implies that
∂φ 1 2 p
+ v + + gz = constant (11.76)
∂t 2 ρ
which is the irrotational Bernoulli equation. In the stationary case we then have
1¡ 2 ¢ (p2 − p1 )
v2 − v12 + + (z2 − z1 ) g = 0 (11.77)
2 ρ
for irrotational flow of an inviscid and incompressible fluid.
Example 163 The velocity term can be expressed using the gradient of the velocity po-
tential, which gives
∂φ 1 ³ ´ p
+ ∇φ · ∇φ + + gz = constant (11.78)
∂t 2 ρ
To proceed we need to eliminate the term v × (∇ × v). There are two ways to do this
that give interesting results (White 1999). The first approach, which was discussed in
the previous section, is to require that ∇ × v=0, which is the case for irrotational flow.
The second approach, which will be investigated here, is to integrate the expression on
the left hand side of (11.79) along a streamline.
Consider the following integral form of the Euler equation (11.79):
Z · µ ¶ ³ ´ ¸
∂v 1 2 1
+∇· v − v × ∇ × v − f + ∇p · dx=0 (11.80)
∂t 2 ρ
where the differential dx is parallel to the velocity and satisfies dx/dt = v. Then
³ ´
v × ∇ × v · dx= 0 (11.81)
We assume that f = −ga3 , and denote the vertical coordinate z = x3 , and write |dx| =
ds. This gives Z 2 Z 2 µ ¶ Z 2 Z 2
∂ |v| 1 2 dp
ds + d v + gdz + =0 (11.83)
1 ∂t 1 2 1 1 ρ
11.2. THE MOMENTUM BALANCE 429
x3 z
v
g
dx
xt
1 2
streamline
x2
x1
Figure 11.5: Streamline x(t) with two points 1 and 2 on the streamline.
where 1 and 2 denotes two points on the same streamline. Two of the integrals are exact,
and we find that
Z 2 Z 2
∂ |v| 1¡ 2 2
¢ dp
ds + v2 − v1 + + g (z2 − z1 ) =0 (11.84)
1 ∂t 2 1 ρ
which is Bernoulli’s equation for frictionless flow along a streamline. Under stationary
conditions ∂ |v| /∂t = 0, and
Z 2
1¡ 2 ¢ dp
v2 − v12 + + (z2 − z1 ) g = 0 (11.85)
2 1 ρ
A
q q dq
, p
x x dx
where v̄ is the average velocity. The mass balance is taken for the fixed differential control
volume Adx from x to x + dx. The mass flow into the volume is w at x, while the mass
flow out of the volume is w + dw at x + dx. The mass balance is then found from (11.18)
to be
∂ρ
Adx = w − (w + dw) = −dw
∂t
Dividing by Adx we get
∂ρ 1 ∂w
=− (11.88)
∂t A ∂x
A change of variables from density ρ to pressure p is achieved in the mass balance using
the constitutive equation dp = (β/ρ)dρ where β is the bulk modulus of the fluid. This
gives
∂p β ∂w
=−
∂t ρA ∂x
The momentum equation is found from (11.63) to be
Z Z
∂ 2
£ ¡ ¢¤
(ρv̄) Adx = Ap − A(p + dp) + ρv dA − ρv 2 + d ρv 2 dA − F dx (11.89)
∂t A A
We will assume that the average velocity v̄ is close to zero, so that the second term on
the right side can be set to zero. The model becomes
∂p β ∂w
= − (11.91)
∂t ρA ∂x
∂w ∂p
= −A −F (11.92)
∂t ∂x
These equations are usually formulated in terms of the pressure p and the volumetric
flow q by treating the density as a constant ρ0 so that w = ρ0 q.
11.2. THE MOMENTUM BALANCE 431
v1
v2
p 1 ,A 1 p 2 ,A 2
Figure 11.7: Incompressible fluid flowing through a pipe of cross section A1 with a
restriction with cross section A2 .
∂p β ∂q
= − (11.93)
∂t A ∂x
∂q A ∂p F
= − − (11.94)
∂t ρ0 ∂x ρ0
1 2 p1 1 p2
v1 + = v22 + (11.96)
2 ρ 2 ρ
which gives
" µ ¶2 #
ρ¡ 2 2
¢ ρ A2
p1 − p2 = v − v1 = 1− v22
2 2 2 A1
" µ ¶2 # 2
A2 ρq2
= 1− (11.97)
A1 2A2
t ,T t
h q
pp +
Ap A
Figure 11.8:
Frictionless and incompressible flow through a restriction A2 in a pipe with cross section
A1 is given by v
u 2 (p − p )
q = A2 u
1 2
t ³ ´2 (11.98)
ρ
1− A A1
2
This expression (11.98) is adjusted with the discharge coefficient Cd to account for the
effect that the cross section of the flow will be somewhat smaller than the cross section
A2 of the restriction. This gives
v
u 2 (p − p )
q = Cd A2 u
1 2
t ³ ´2 (11.100)
ρ A2
1 − A1
At very low flow rates the friction will be the dominating physical phenomenon. Then
Bernoulli’s equation is no longer valid, and the flow becomes linear in the pressure dif-
ference. This is discussed in Section 4.2.2.
where we have used (11.102). We note that the control device can be connected to a
particular pipe by inserting the transfer function Hpq (s) of the pipe.
434 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
The shaft torque Tt for an impulse turbine with a Pelton wheel is given by (White
1999) µ 2 ¶
q
Tt = 2rt ρq(v − rt ω t ) = 2rt ρ − qrt ω t (11.106)
A
where rt is the radius of the wheel. We will treat the shaft speed ω t as a constant in the
linearization of the shaft torque. Linearization of the turbine torque equation (11.106)
will then give µ ¶
q02 A0
∆T = 2rt ρ 2 β ∆q − ∆A (11.107)
A0 q0
where
rt ω t0 A0
β =2−
q0
is a constant of linearization. The transfer function from the control input A to the
turbine torque is then found to be
µ ¶
∆Tt q2 A0
(s) = 2rt ρ 02 β HqA (s) − 1 (11.108)
∆A A0 q0
Insertion of HqA (s) from (11.105) gives
∆Tt q02 β 1
(s) = 2rt ρ 2 A20
− 1
∆A A0 α 1 +
αρq0 Hpq (s)
and some algebra leads to the transfer function in the form (Hutarew 1969), (Ervik 1971)
A2
∆Tt 2rt ρ q02 1 − γ αρq00 Hpq
(s) = (11.109)
∆A γ A20 1 + A20 Hpq
αρq0
where mgh is the constant gravity force in the flow direction that acts on the water in
the pipe, p0 is the constant ambient pressure, and pp is the pressure at the end of the
pipe. Laplace transformation leads to the pipe transfer function
−∆pp ρLs
Hpq (s) := (s) = (11.111)
∆q Ap
11.2. THE MOMENTUM BALANCE 435
Note that the negative pressure is used in the definition of the transfer function Hpq (s)
to achieve a transfer function with a positive gain. The transfer function HqA (s) can
then be found from (11.105) to be
q0 1
HqA (s) =
αA0 1 + µ T2r s
where we have defined the time constant Tr and the nondimensional flow constant µ by
LA20 qmax q0
Tr = 2 , µ= (11.112)
αq02 Ap qmax
The transfer functions for the complete system is found from (11.109) to be
¡ ¢
∆Tt 2 rt ρq02 1 − γµ T2r s
(s) = ¡ ¢ (11.113)
∆A γ A20 1 + µ T2r s
∆Tt rt ρq02 (1 − Tr s)
(s) = ¡ ¢ (11.114)
∆A A20 1 + T2r s
Example 164 Francis or Kaplan type turbines are reaction turbines that are driven by
power transfer from the water flow. The shaft torque is
P
Tf t = (11.115)
ωt
where µ ¶
1 2 ρ q3
P = qρ v = (11.116)
2 2 A2
is the power supplied to the turbine. Linearization of the power expression gives
µ ¶
ρ q02 q0
∆P = 3∆q − 2 ∆A (11.117)
2 A20 A0
Then the transfer function from A to P can be found from
µ ¶
∆P ρ q02 q0
(s) = 3HqA (s) − 2
∆A 2 A20 A0
∆P ρq 3 (1 − µTr s)
(s) = 30 ¡ ¢ (11.118)
∆A A0 1 + µ T2r s
L, A
v P
Figure 11.9: The waterhammer effect occurs when the pipe is suddenly closed at P .
The waterhammer effect (Merritt 1967), (Holmboe and Rouleau 1967) occurs when
fluid is flowing through a pipe, and the pipe is suddenly closed for example by a valve
(Figure 11.9). A fluid with velocity v and density ρ flowing in a pipe of length L and
cross section A will have a kinetic energy
1
K= ρV v 2 (11.121)
2
where V = LA is the volume of the fluid. We note that for a material volume V of a set
of particle with mass m and density ρ = m/V the volume differential is
µ ¶
m m mρ V
dV = d = − 2 dρ = − 2 dp = − dp (11.122)
ρ ρ ρ β β
Then it follows that if the fluid is instantaneously stopped the kinetic energy K will give
an increase ∆P due to compression, which is given by
Z 2 Z 2
V 1V ¡ 2 ¢
∆P = − pdV = p dp = p2 − p21 (11.123)
1 1 β 2β
where p1 is the pressure just before the pipe is closed, and p2 is the pressure just after
the pipe is closed. From K = ∆P the pressure increase is seen to be
q
p22 − p21 = ρcv (11.124)
11.3. ANGULAR MOMENTUM BALANCE 437
p
where c = β/ρ is the sonic speed. In the case that the initial pressure p1 is small, this
is approximated by
p2 = ρcv (11.125)
Pa
Example 165 For water c = 1500 m/s and ρ = 103 kg/m3 , and p2 = 1.5 · 106 m/s · v, or
atm
p2 = 15 m/s ·v, so that 5 m/s gives a pressure rise of 75 bar. For hydraulic fluids c = 1250
atm
m/s and ρ = 800 kg/m3 which gives p2 = 10 m/s · v so that 5 m/s gives a pressure rise of
50 bar.
where ZZZ
No = r × dF (11.128)
V
er e r 2
r 1
r1
r2
+
fluid enters in the center, and flows through an arrangement of radial blades with inner
blade tips at a radius r1 and outer blade tips at a radius r2 . We define a frame with
orthogonal unit vectors er , eθ , ez where er is in the radial direction, eθ in the tangential
direction, and ez is along the pump axis. We note that the inner tip speed of the blades
is U1 = r1 ωeθ while the outer tip speed of the blades is U2 = r2 ωeθ . We will assume that
the fluid flow is constant and with a mass flow
where b is the width of the pump, v1r is the radial fluid velocity at the blade inlet, and
v2r is the radial fluid velocity at the blade outlet. We will consider the moment about
the pump axis, which means that the point o is in the center of the pump, so that we
have r1 = r1 er at the blade inlet and r2 = r2 er at the outlet. The fluid velocity at the
blade inlet is denoted v1 and the velocity at the blade outlet is denoted v2 where
w w
v1 = er + r1 ωeθ , v2 = er + r2 ωeθ (11.132)
2πr1 b 2πr2 b
This gives
r1 × v1 = r12 ωez , r2 × v2 = r22 ωez (11.133)
The control volume Vc is taken to be the volume between the blade inlet and the blade
outlet. This is a volume that is fixed in space, so that vc = 0. The outwards pointing
surface normal is n = −eθ at the inlet and n = eθ at the outlet. The angular momentum
balance (11.130) gives
ZZZ
∂ ¡ 2 ¢ ¡ ¢
ρr ωez dV + w r22 ω − r12 ω ez = Tp (11.134)
Vc ∂t
11.3. ANGULAR MOMENTUM BALANCE 439
where
πbρ ¡ 4 ¢ mf ¡ 2 ¢
Jf = r2 − r14 = r1 + r22 (11.136)
2 2
¡ ¢
is the moment of inertia due to the fluid, and mf = πbρ r22 − r12 is the mass of the fluid
in Vc . We see that the stationary shaft torque needed to pump a mass flow of w is
¡ ¢
Tp = wω r22 − r12 (11.137)
We get
r1 × v1 = r1 v1t ez , r2 × v2 = r2 v2t ez (11.140)
Then, proceeding as in the previous section, we get the shaft power
A turbine is a device where a fluid delivers power to the turbine shaft by changing
the momentum of the fluid. This means that a turbine converts kinetic energy in a fluid
to mechanical energy in the form of rotational energy of the shaft. We note that for the
centrifugal pump the shaft torque T is zero when the shaft speed ω is zero. This shows
that the centrifugal pump with radial blades cannot be used as a turbine.
We define W1 and W2 by
v1 = U1 + W1 , v2 = U2 + W2 (11.144)
select the inlet blade angle β 1 so that the inlet flow will be along the blade at the inlet,
so that W1 will have direction given by β 1 . Then
will be the tangential fluid velocities relative to the blades. We will consider the situation
when there is no pre-whirl, which means that the tangential speed at the blade inlet is
zero. Then
v1r
v1t = 0 ⇒ tan β 1 = (11.147)
U1
and the torque is found to be
Suppose that the pump is delivering an incompressible fluid to a pipe of cross section
A and length L. The velocity at the inlet of the pipe is denoted v, and it is assumed that
the mass flow is
w = ρAv (11.149)
The equation of motion for the fluid is
where Fout is the force acting at the pipe outlet. We assume that the shaft power T ω
is converted to kinetic power F v for the fluid in the pump so that T ω = F v. Then the
force F at the inlet of the pipe is found to be
µ ¶
ω ω Av
F = T = ρA T = ρAωr2 ωr2 − cotanβ 2 (11.151)
v w 2πr2 b
ρA2 ω
ρALv̇ = ρAω 2 r22 − v cotanβ 2 − Fout (11.152)
2πb
The force consist of a term that is proportional to ω 2 which can be considered as the
forcing term. In addition there is the second term on the right side of (11.152) which is
proportional to the outlet fluid velocity v. If β 2 > 90◦ , which is the case if the blade have
a backsweep at the outlet, then the velocity term will have the same effect as viscous
friction, and has a stabilizing effect. However, if the blades are swept forward, then
β 2 > 90◦ , and the second term on the right side of (11.152) will give the same effect as
a positive velocity feedback, which may cause the system to be unstable.
Example 166 The pump delivers an incompressible fluid through a pipe of cross section
A to a basin. The fluid level in the basin is√denoted h. Water flows out of the basin
through at throttle with mass flow wt (h) = C h. The model for the system is
A g r2 ω 2
v̇ = − ωcotanβ 2 v − h + 2 (11.153)
2πbL L L
A 1
ḣ = v− wt (h) (11.154)
Ab Ab ρ
11.4. THE ENERGY BALANCE 441
where the pump velocity ω 2 is considered to be the control input. This can be achieved by
velocity control of the motor driving the pump. Linearization gives
v̇ = a11 v + a12 h + bω 2 (11.155)
ḣ = a21 v + a22 h (11.156)
and the characteristic equation of the linearized system is found to be
λ2 − (a11 + a22 ) λ − a12 a21 = 0 (11.157)
Stability results whenever
A 1 dwt
a11 + a22 = − ωcotanβ 2 − <0 (11.158)
2πbL Ab ρ dh
which is the case if
2πbLω dwt
cotanβ 2 < − (11.159)
ρAAb dh
This means that if the blade outlets are backswept so that cotanβ 2 ≥ 0, then the system
will be stable. Forward swept blade outlets may cause instability depending on the system
parameters.
Example 167 Under stationary conditions is may be assumed that the mechanical power
T ω from the shaft is converted to power F v supplied to the fluid, so that
ω
F = T (11.160)
v
In transients there will be energy loss until the stationary flow pattern is established. It is
reasonable to assume that these transient flow will last for at least the time time it takes
a fluid particle to flow through the pump, and in some cases up to 5 times of this time.
Then a reasonable model for the transients in the shaft torque is
1 ³ω ´
Ḟ = T −F (11.161)
αTtrans v
where Ttrans can be taken to be the transport time of a fluid particle through the pump,
and α is in the range from 1 to 5.
The material time derivative of the total energy in a volume V is equal to the net rate of
energy supplied to the volume. Suppose that the net supplied energy is the sum of the
heat flow into the volume due to the heat flux density jQ plus the power added from the
pressure force −pn acting on the surface. This is written
ZZZ ZZ ZZ
D
ρedV = − pv · ndA − jQ · ndA (11.164)
Dt V ∂V ∂V
The volume V is arbitrary, and it follows from the divergence theorem that
µ ¶
D 1 2
ρ u+ v +φ =− ∇ · (pv) − ∇ · jQ (11.165)
Dt 2 | {z } | {z }
| {z }
pressure work heat
rate of change
on the surface of conduction
in internal, kinetic
the volume element
and potential energy
for material
volume element
The divergence form is found by changing the left hand side as follows:
De ∂
ρ = (ρe) + ∇ · (ρev) (11.166)
Dt ∂t
If we leave out the potential energy, then (11.163) can be used to express the energy
equation in the form
µ ¶
D 1 2
ρ v +u = − ∇ · (pv) − ∇ · jQ
Dt 2 | {z } | {z }
| {z }
pressure work heat
rate of change
on the surface of conduction
in internal and
the volume element
kinetic energy
for material
volume element
+ ρv · f (11.167)
| {z }
work of body
forces on volume
element
Example 168 If the pressure is constant over the volume, then the pressure work can
be written ZZ ZZ
DV
pv · ndA = p v · ndA = p (11.168)
∂V ∂V Dt
which means that the pressure work is equal to the pressure times the time derivative of
the material volume.
where the first term on the right side is the convected energy plus the pressure work on
the volume. At this stage it is useful to introduce the specific enthalpy h which is defined
by
p
h=u+ (11.171)
ρ
Then the energy balance can be written
ZZZ µ ¶ ZZ µ ¶
d 1 1 2
ρ u + v 2 + φ dV = − ρ h+ v + φ v · ndA
dt V 2 2
| {z } | ∂V {z }
rate of change convected enthalpy,
of energy kinetic energy and
in fixed volume potential energy
ZZ
− jQ · ndA (11.172)
∂V
| {z }
heat
conduction
Note that in the convection term the enthalpy h enters in place of the internal energy u
as the pressure work is included in the convection term.
Example 169 Suppose that the specific energy of the system in Example 158 is simply
e = u, which means that the kinetic and potential energy can be neglected. Moreover,
suppose that there is no heat flow into the volume, that is, jQ = 0, that there is no mass
or energy generation in the volume, and that ρ and u are constants over the volume.
Then the energy balance is
d
V (uρ) = u1 A1 ρ1 v1 − uA2 ρv2 + p1 A1 v1 − pA2 v2 (11.173)
dt
which gives
d
E = h1 w1 − hw2 (11.174)
dt
where we used E = mu where m = ρV , and where we have used the enthalpy h = u+p/ρ.
We may obtain an equation for the specific internal energy u by expanding the left side.
This gives
mu̇ + ṁu = h1 w1 − hw2 . (11.175)
Combining this with the mass balance
ṁ = w1 − w2 (11.176)
we get a differential equation for the specific internal energy in the form
Steam in
Fluid
inlet
Instantaneous
liquid level
Condensate out
which gives
w1 w2 p
u̇ = (h1 − u) − (11.178)
m mρ
We will later see that this leads to a differential equation for the temperature by using
h = cp T and u = cv T .
Example 170 This example and the next example are adopted from (Bird, Stewart and
Lightfoot 1960, p. 473). A cylindrical tank with cross section A is filled with a liquid with
a mass flow w (Figure 11.11). The volume of the liquid in the tank is V = Az where z
is the height of the liquid surface. The liquid in the tank is heated with a coil filled with
steam of temperature Ts . The heat transfer coefficient per length unit of the coil from the
coil to the liquid is G. The tank is stirred so that the temperature of the liquid in the tank
is uniform. The energy of the liquid is supposed to be u = cp T . The mass and energy
balances are
d
(ρV ) = w (11.179)
dt
d
(ρuV ) = wu1 + Gz (Ts − T ) . (11.180)
dt
The first term on the right side of the energy balance is the convected internal energy,
while the second term is a heat conduction term as in the general expression (11.172).
The energy balance can be written out as
µ ¶
d dT
ρV cp T + ρV cp = wcp T1 + Gz (Ts − T ) . (11.181)
dt dt
w2
P T, ,V
T 1 ,w 1
From equation (11.164) we have the following expression for the material derivative of
the energy: ZZZ ZZ ZZ
D
ρedV = − pv · ndA − jQ · ndA (11.189)
Dt Vc ∂Vc ∂Vc
446 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
The first term on the right side is the convected energy plus the pressure work on the
volume. The specific enthalpy h = u + p/ρ is inserted. Then the energy balance can be
written
ZZZ µ ¶ ZZ µ ¶
d 1 2 1 2
ρ u + v + φ dV = − ρ h + v + φ (v − vc ) · ndA
dt Vc 2 ∂Vc 2
| {z } | {z }
rate of change convected enthalpy,
of energy kinetic energy and
in control volume potential energy
ZZ ZZ
− pvc · ndA − jQ · ndA (11.191)
∂Vc ∂Vc
| {z } | {z }
pressure work heat
due to change in conduction
control volume
Note that the velocity in the convection term is v − vc which is the particle velocity
relative to the surface of the control volume Vc .
Example 172 If the pressure is constant over the volume then the pressure work on the
surface of the control volume can be written
ZZ ZZ
pvc · ndA = p vc · ndA = pV̇c (11.192)
∂Vc ∂Vc
jQ = −α∇(ρcp T ) (11.193)
where the α is the thermal diffusivity in m2 /s. The energy balance is simply
∂u
ρ = −∇ · jQ (11.194)
∂t
which in combination with Fourier’s law with constant α and ρ gives
∂T
− α∇2 T = 0 (11.195)
∂t
∂ 2 T (x, s) s
2
− T (x, s) = 0 (11.198)
∂x α
which has the solution
µr ¶ µr ¶
s s
T (x, s) = A cosh x + B sinh x (11.199)
α α
with derivative
r µr ¶ r µr ¶
∂T (x, s) s s s s
=A sinh x +B cosh x (11.200)
∂x α α α α
The transfer function from the heat flux to the temperature at x = L is found to be
¡p s ¢
T (L, s) cosh αL
= ps ¡p s
¢ (11.203)
u(s) α sinh αL
Zeros Singularities
p ps
L αs L2 αs L α L2 αs
1. 570 8 −2. 467 4 0 0
(11.206)
4. 712 4 −22. 207 3. 141 6 −9. 869 6
7. 854 0 −61.685 6. 283 2 −39. 478
10.995541 −120.9019 9. 424 8 −88. 826
Table 11.1: Singularites for the one-dimensional heat equation when the beam is insulated
at x = 0, and the heat flux is controlled at x = L.
Example 173 The heat equation is studied for the bar of the previous example, but the
boundary condition at x = L is changed so that the bar is in contact with a reservoir with
temperature u, which is the control input. The heat-transfer coefficient is β. Then the
boundary conditions are changed to
∂T (0, t) ∂T (L, t)
= 0, = β[u − T (L, t)] (11.207)
∂x ∂x
The boundary condition at x = 0 gives B = 0, while the boundary condition at x = L in
combination with (11.199) gives
r µr ¶ · µr ¶¸
s s s
A sinh L = β u(s) − A cosh L
α α α
This implies that
β
A = ps ¡p s ¢ ¡p s ¢ u(s) (11.208)
α sinh α L + β cosh αL
and insertion in (11.199) gives the transfer function
¡p s ¢
T (L, s) cosh L
= 1ps ¡p s ¢ α ¡p s ¢ (11.209)
u(s) β α sinh α L + cosh αL
for doing vector operations at the component level. We will see in the following that
tensor notation is of particular use in connection with the computation of gradients and
divergence of complicated vector expressions. All tensors in the following are Cartesian.
Let a be a Cartesian frame with orthogonal unit vectors a1 , a2 , a3 and let u be a vector
and D be a dyadic given by
3
X 3 X
X 3
u= ui ai , D = dij ai aj (11.210)
i=1 i=1 j=1
We introduce the summation convention where the summation symbol may be left
out when it is summed over a repeated index in a product as in the scalar product
3
X
ui vi := ui vi = uT v (11.211)
i=1
∂φ ∂vi
φ,i := and vi,j := (11.214)
∂xi ∂xj
∂ ³ T ´
3
X 3
X
vj,ji := vj,ji = ∇ v and vi,jj := vi,jj = ∇2 vi (11.216)
j=1
∂xi j=1
450 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
while the scalar product between the v and the gradient of a scalar ψ can be written
3
X
v · ∇ψ = vi ψ ,i = vi ψ ,i (11.220)
i=1
where ∇2 = ∇ · ∇= ∂x
∂ ∂
i ∂xi
is the Laplacian operator.
Example 178 The scalar ∇·(φu), which is the divergence of the vector φu can be written
in tensor notation as (φui ),i . From the usual rule for the differentiation of products it
follows that
(φui ),i = φ,i ui + φui,i (11.225)
which is the tensor form of (10.15).
11.5. VISCOUS FLOW 451
where
1
eij := (vi,j + vj,i ) (11.233)
2
is the symmetric rate of strain tensor , which is also called the deformation tensor, and
1
Ωij := (vi,j − vj,i ) (11.234)
2
is the skew-symmetric part of the velocity gradient tensor.
x3 v0
x
p vp
x
o
x2
x1
Figure 11.13: Rigid body with velocity vo of point o and angular velocity ω.
where r = x − ro . The velocity gradient ∇v which describes the velocity variations over
the rigid body is
∇v = ∇vo + ∇ (ω × r) = ω × ∇r = ω × ∇x = ω × · ∇x = ω × · I
= ω× (11.242)
Here we have used the fact that vo , ro and ω are functions of time only, and that
∇r = ∇x = I. We see that for rigid-body motion the velocity gradient tensor is skew
symmetric and given by
∇v = ω × (11.243)
This means that for rigid body motion we have
Ω = ω× , eij = 0 (11.244)
The opposite is also true: If the rate of strain tensor eij is zero, then the motion is a
rigid body motion. From this we conclude that a nonzero rate of strain tensor eij is a
measure of how much the velocity field differs from rigid body motion, and in this sense
eij is related to the rate of deformation of the fluid.
11.5. VISCOUS FLOW 453
n
tn T
x3
n
x2
x1
Figure 11.14: Volume V with surface normal n and stress vector t(n) .
Example 181 We recognize 2Ω in (11.236) as the skew symmetric form of the curl
vector ∇× v as given in (10.21). This means that
¡ × ¢×
∇ v =2Ω (11.245)
From this and (11.244) we conclude that for rigid body motion we have
∇ × v = 2ω (11.246)
and ³ ´×
∇×v = 2∇v (11.247)
t(n) = n · T
where T is the dyadic form of the the stress tensor Tij . We note that the corresponding
matrix representation is T = {Tij }. By convention, the element Tij denotes the contact
force in the j direction exerted on a plane with surface normal in the i direction.
It is not straightforward to handle divergence terms involving the stress tensor in
vector form. Because of this we use the more powerful tensor notation in component
form, where the summation convention is used. Then, component i of the stress vector
t(n) is written
t(n)i = Tji nj (11.248)
where the summation over j is implied by the summation convention. The divergence
theorem (11.221) leads to the equation
ZZ ZZZ
Tji nj dA = Tji,j dV (11.249)
∂V V
454 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
T = −pI + τ (11.252)
where p is the pressure and τ is the viscous stress tensor . We note that the equivalent
tensor form is
Tij = −pδ ij + τ ij (11.253)
where δ ij is the Kronecker delta which is given by δ ii = 1 and δ ij = 0 for i 6= j. From
we find that
∇ · T = −∇p + ∇ · τ (11.255)
and we may use (11.251) to establish the following useful relation:
ZZ ZZZ ³ ´
t(n) dA = −∇p + ∇ · τ dV (11.256)
∂V V
Example 182 We note that the matrix form of the main equations of this section is
given by
T = −pI + τ (11.258)
³ ´T ³ ´T
∇T T = −∇p + ∇T τ (11.259)
and ZZ ZZZ · ³ ´T ¸
T
t(n) dA = −∇p + ∇ τ dV (11.260)
∂V V
Remark 4 Some authors use T = −pI − τ , which means that they use the opposite sign
for the viscous stress tensor.
and by combining this with the momentum balance (11.53) the result is
ZZZ ZZZ ³ ´
Dv
ρ dV = ∇ · T + ρf dV (11.263)
V Dt V
Dvi
ρ = Tji,j + ρfi (11.264)
Dt
Dv
ρ = ∇ · T + ρf (11.265)
Dt
which is stated both in component and vector form.
We express the stress tensor in terms of the pressure p and the viscous stress tensor
τ ij as given in (11.253).
Cauchy’s equation of motion for a fluid with viscosity is given in tensor form and vector
form as
Dvi
ρ = −p,i + τ ji,j + ρfi (11.266)
Dt
Dv
ρ = −∇p + ∇ · τ + ρf (11.267)
Dt
Cauchy’s equation of motion can be written in divergence form by inserting (11.30). This
gives
∂ (ρv)
+ ∇ · (ρvv) = − ∇p + ∇ · τ + ρf (11.268)
∂t
Dv1 ∂p ∂τ 11 ∂τ 21 ∂τ 31
ρ = − + + + + ρf1 (11.269)
Dt ∂x1 ∂x1 ∂x2 ∂x3
Dv2 ∂p ∂τ 12 ∂τ 22 ∂τ 32
ρ = − + + + + ρf2 (11.270)
Dt ∂x2 ∂x1 ∂x2 ∂x3
Dv3 ∂p ∂τ 13 ∂τ 23 ∂τ 33
ρ = − + + + + ρf3 (11.271)
Dt ∂x3 ∂x1 ∂x2 ∂x3
X n
Dv
ρ =∇·T + ρk fk (11.272)
Dt
k=1
We see that the only difference from a single-component fluid is in the term related to
the mass forces fk .
456 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
where λ and µ are the Lamé coefficients, and E=eij ai aj is the rate of strain tensor
defined by (11.233).
Example 185 Let the velocity field be given by v = (cx22 , 0, 0)T , or equivalently, by
v = cx22 a1 (11.279)
where a1 , a2 , a3 are orthogonal unit vectors along the x1 , x2 , x3 axes of a Cartesian co-
ordinate frame. The position is given by x = (x1 , x2 , x3 )T . Then the velocity gradient
tensor is
µ ¶
∂ ∂ ∂
∇v = a1 + a2 + a3 cx22 a1
∂x1 ∂x2 ∂x3
= 2cx2 a2 a1 (11.280)
11.5. VISCOUS FLOW 457
The deformation tensor is the symmetric part of the velocity gradient tensor and is given
by
E = cx2 a2 a1 + cx2 a1 a2 (11.281)
The divergence is found to be
∇·v =0 (11.282)
while the Laplacian is
µ ¶
2 ∂2 ∂2 ∂2
∇ v= 2 + 2+ 2 cx22 a1 = 2ca1 (11.283)
∂x1 ∂x2 ∂x3
Then the viscous stress tensor is
τ = 2µcx2 a2 a1 + 2µcx2 a1 a2 (11.284)
We see that the term ∇ · τ in the equation of motion is given by
2
∇ · τ = µ∇ v = 2µca1 (11.285)
Consider the surface with the surface normal n = a2 . Then the stress vector on that
surface is
t(n) = n · τ = 2µcx2 a1 (11.286)
The stress vector is seen to be in the direction of the flow.
Example 186 It is common practice to use an assumption due to Stokes, which involves
setting the relation between the Lamé coefficients so that
2
λ+ µ=0 (11.287)
3
We will explain the motivation for this relation. Denote the mean of the diagonal terms
of the stress tensor Tij by −p̄. By noting that the divergence is related to the diagonal
terms of the rate of strain tensor according to
∇ · v=vk,k = ekk (11.288)
we find that
1 2
−p̄ :=
Tii = −p + (λ + µ)ekk (11.289)
3 3
The reasoning that leads to (11.287) starts with the observation that for incompressible
fluids ekk = 0, which implies that p̄ = p. If it is assumed that (11.287) is valid, then
p̄ = p also for compressible fluids. More details on this is found in (Aris 1989).
Example 187 The constitutive equation for a Newtonian fluid originates from three
assumptions (Aris 1989): First it is assumed that the stress tensor is linear in the velocity
gradient tensor, which means that the viscous stress tensor can be written
τ ij = Nijkl vk,l (11.290)
for some four-dimensional tensor Nijkl . Second, it is assumed that Nijkl is isentropic.
This implies that Nijkl can be expressed in terms of the Lamé parameters λ, µ and κ as
Nijkl = λδ ij δ kl + µ(δ ik δ jl + δ il δ jk ) + κ(δ ik δ jl − δ il δ jk ) (11.291)
Third, symmetry is assumed in the sense that τ ij = τ ji , which implies that κ = 0. This
gives the constitutive equation for a Newtonian fluid as
λδ ij δ kl + µ(δ ik δ jl + δ il δ jk )vk,l = λδ ij vk,k + µ(vi,j + vj,i ) (11.292)
458 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
Dv1 ∂p ∂ ³ ´ ³ 2 ´
ρ = − + (λ + µ) ∇ · v + µ ∇ v + ρf1 (11.295)
Dt ∂x1 ∂x1
Dv2 ∂p ∂ ³ ´ ³ 2 ´
ρ = − + (λ + µ) ∇ · v + µ ∇ v + ρf2 (11.296)
Dt ∂x2 ∂x2
Dv3 ∂p ∂ ³ ´ ³ 2 ´
ρ = − + (λ + µ) ∇ · v + µ ∇ v + ρf3 (11.297)
Dt ∂x3 ∂x3
The divergence form of momentum equations for a Newtonian fluid is found to be
∂ (ρv) ³ ´ 2
+ ∇ · (ρvv) = −∇p + (λ + µ)∇ ∇ · v + µ∇ v + ρf (11.298)
∂t
or, in tensor form,
∂ (ρvi )
+ (ρvi vj ),j = −p,i + (λ + µ)vk,ki + µvi,jj + ρfi (11.299)
∂t
In the incompressible case the divergence of the velocity is zero, and the equation of
motion is found by inserting ∇ · v = 0 into (11.293). This leads to the Navier-Stokes
equation.
Dvi
ρ = −p,i + µvi,jj + ρfi (11.301)
Dt
The Euler equation for inviscid flow appears by setting the viscous forces to zero by
inserting µ = 0. Control of the Navier-Stokes equation is treated in great detail in
(Aamo and Krstić 2003).
11.5. VISCOUS FLOW 459
Dv ³ ´ ³ ´
ρ = −∇p + (λ + 2µ)∇ ∇ · v − µ∇ × ∇ × v + ρf (11.303)
Dt
of the momentum equations for a Newtonian fluid. It is interesting to note how the
divergence ∇ · v and the curl ∇ × v of the velocity appear in the two terms due to the
stress tensor. If the fluid is incompressible, then the divergence term is zero, and if there
is potential flow, then the curl term is zero.
Dv 2
ρ = −∇p + µ∇ v + ρf (11.304)
Dt
of (11.300) where
v = vr jr + vθ jθ + vz jz (11.305)
and
∂ jθ ∂ ∂
∇ = jr + + jz (11.306)
∂r r ∂θ ∂z
This results in
∂vr ∂vr vθ ∂vr ∂vr v2 1 ∂p
+ vr + + vz − θ =−
∂t ∂r r ∂θ ∂z r ρ ∂r
µ ¶
µ ∂ 2 vr 1 ∂ 2 vr ∂ 2 vr 1 ∂vr 2 ∂vθ vr
+ + + + − − (11.307)
ρ ∂r2 r2 ∂θ2 ∂z 2 r ∂r r2 ∂θ r2
∂vθ ∂vθ vθ ∂vθ ∂vθ vr vθ 1 ∂p
+ vr + + vz + =−
∂t ∂r r ∂θ ∂z r ρr ∂θ
µ ¶
µ ∂ 2 vθ 1 ∂ 2 vθ ∂ 2 vθ 1 ∂vθ 2 ∂vr vθ
+ + 2 + + + 2 − 2 (11.308)
ρ ∂r2 r ∂θ2 ∂z 2 r ∂r r ∂θ r
∂vz ∂vz vθ ∂vz ∂vz 1 ∂p
+ vr + + vz =−
∂t ∂r r ∂θ ∂z ρ ∂z
µ 2 2 2
¶
µ ∂ vz 1 ∂ vz ∂ vz 1 ∂vz
+ + 2 + + (11.309)
ρ ∂r2 r ∂θ2 ∂z 2 r ∂r
Further details on the systematic derivation of these equations are found in (Aris 1989)
where also results for spherical coordinates are presented.
Dv∗ U 2 ∗ ∗ ρU
2
2 U U
ρ ∗
= −∇ p + µ (∇∗ ) v∗ 2 + ρf ∗ 2 (11.311)
Dt L L L L
which simplifies to
Dv∗ 1 2
∗
= −∇∗ p∗ + f ∗ + (∇∗ ) v∗ (11.312)
Dt Re
where Re is the Reynolds number given by
UL
Re = (11.313)
ν
and
µ
ν= (11.314)
ρ
is the kinematic viscosity. It is seen from (11.312) that the Reynolds number indicates
the relative importance of viscosity compared to inertial forces.
In the last term on the right hand side we have interchanged the i and j index, which is
possible as the term is a scalar, so that vi τ ji,j = τ ij,i vj .
From the product rule of differentiation of products it is straightforward to verify the
expression
(τ ij vj ),i = τ ij,i vj + τ ij vj,i (11.318)
The vector form of (11.318) is not quite as simple to derive, but we state the result,
which is ³ ´ ³ ´
∇ · (τ · v) = v · ∇ · τ + τ : ∇v (11.319)
where : is the double dot product defined for four vectors u, v, w, z by
uv : wz = (u · w) (v · z) (11.320)
For matrix representations D = {dij } and E = {eij } the double dot product is defined
in the same way as the scalar D : E =dij eij .
11.5. VISCOUS FLOW 461
where at least the second term on the right side is not obvious in a derivation based on
the use of the matrix notation.
Combination of (11.319) and (11.316) gives the following result:
Using the divergence theorem we find that the integral for of the equation for kinetic
energy is
ZZZ ZZZ h ³ ´ ³ ´i ZZ
D ρ 2
v dV = ρv · f + p ∇ · v − τ : ∇v dV + v·(−pn + n · τ ) dA
Dt Vc 2 Vc ∂Vc
Example 190 Still another expression for the left hand side of (11.326) is found from
(11.24): µ ¶ · µ ¶ µ ¶ ¸
D 1 2 ∂ 1 2 1 2
ρ v =ρ v +∇· v v (11.327)
Dt 2 ∂t 2 2
´ 191 For a Newtonian fluid the stress tensor is symmetric, and the term τ :
Example
³
T
∇v = τ : E is found to be positive from the calculation
³ ´ ³ ´
τ : ∇v = λ ∇ · v I : E + 2µE : E
= λ (eii )2 + 2µeij eij (11.328)
³ ´
which clearly shows that τ : ∇v ≥ 0.
462 CHAPTER 11. MASS, MOMENTUM AND ENERGY BALANCES
Example 192 Let the velocity field be given by v = (cx22 , 0, 0)T , or equivalently, by
v = cx22 a1 (11.329)
where a1 , a2 , a3 are orthogonal unit vectors along the x1 , x2 , x3 axes of a Cartesian coor-
dinate frame. The position is given by x = (x1 , x2 , x3 )T . Then the deformation tensor
is
E = cx2 a2 a1 + cx2 a1 a2 (11.330)
irreversible conversion to internal energy is found from (11.328) to be
³ ´
τ : ∇v = λ (eii )2 + 2µeij eij = 4µc2 x22 (11.331)
which clearly is nonnegative. The viscous work on the surface corresponds to the diver-
gence term
µ ¶
∂ ∂ ∂
∇ · (τ · v) = a1 + a2 + a3 · (2µcx2 a2 a1 + 2µcx2 a1 a2 ) · cx22 a1
∂x1 ∂x2 ∂x3
µ ¶
∂ ∂ ∂
= a1 + a2 + a3 · 2µc2 x32 a2
∂x1 ∂x2 ∂x3
= 6µc2 x22 (11.332)
The volume V is arbitrary, and it follows from the divergence theorem that
µ ¶
De 1
ρ u + v2 + φ = − ∇ · (pv) + ∇ · (τ · v) − ∇ · jQ
Dt 2 | {z } | {z } | {z }
| {z }
pressure work viscous work heat
rate of change
on the surface of on the surface of conduction
in internal, kinetic
the volume element the volume element
and potential energy
for material
volume element
11.5. VISCOUS FLOW 463
Example 194 The equation for the internal energy is found by subtracting (11.326)
from this equation, which gives
Du ³ ´ ³ ´
ρ =− p ∇·v + τ : ∇v − ∇ · jQ (11.337)
Dt}
| {z | {z } | {z } | {z }
rate of change reversible irreversible viscous heat
in internal energy conversion conversion to conduction
for material to internal internal energy
volume element energy
Note that in the convection term the enthalpy h enters in place of the internal energy u
as the pressure work is included in the convection term.
where the first term on the right side is the convected energy plus the pressure work on
the volume. Insertion of h = u + p/ρ gives
ZZZ ZZ µ ¶
d 1
ρ (e) dV =− ρ h + v 2 + φ (v − vc ) · ndA
dt Vc ∂Vc 2
| {z } | {z }
rate of change convected enthalpy,
of energy kinetic energy and
in control volume potential energy
ZZ ZZ ZZ
− pvc · ndA + v · (τ · n) dA − jQ · ndA (11.343)
∂Vc ∂Vc ∂Vc
| {z } | {z } | {z }
pressure work viscous work heat
due to change in on volume surface conduction
control volume
Note that the velocity in the convection term is v − vc which is the particle velocity
relative to the surface of the control volume Vc .
Chapter 12
Gas dynamics
12.1 Introduction
The balance equations must be combined with thermodynamic results in the modeling
of systems where gas flow plays an important part. This is the case in the modeling of
engines, gas turbines and compressors, and for pipeline dynamics in the production and
transport of oil and gas. Engines, turbines and compressors are designed so that losses
due to viscosity and heat conduction are kept at a minimum. It will be shown in the
following that such losses will be associated with the generation of entropy in the system.
Because of this a well designed and optimized system will typically have gas dynamics that
are close to isentropic. On background of this observation the concept of isentropic gas
dynamics will be developed in the beginning of this chapter, and the results on isentropic
gas dynamics will be used to formulate balance equations for important systems with gas
dynamics.
12.2.2 Enthalpy
Enthalpy appears in convection terms in the energy balance to account for the convection
of internal energy plus pressure work. This is seen in Example 169 and in equation
465
466 CHAPTER 12. GAS DYNAMICS
(11.343). The specific enthalpy is of great importance in gas flow problems where both
internal energy and pressure work appear. This is the case in the modeling of compressors
and turbines used in turbochargers, jet engines and power plants, and in the description
of pipelines for gas transport. Note that enthalpy is not a conserved quantity.
The inverse of density ρ appears in many equations, and it is customary to define the
specific volume V̂ as volume per mass unit, which is the inverse of density. In accordance
with the notation used for other specific quantities, we would have liked to use v for
specific volume, but we already used v for velocity. Therefore we use the notation
1
V̂ = (12.4)
ρ
The specific enthalpy is defined by
h = u + pV̂ (12.5)
Example 195 For an ideal gas we have the following useful expressions:
cp
R cp − cv cv −1
= = = κ − 1, ideal gas (12.15)
cv cv 1
and cp
R cp − cv cv −1 κ−1
= = cp = , ideal gas (12.16)
cp cp cv
κ
12.2.4 Entropy
The concept of entropy provides us with a number of useful modeling tools for thermody-
namic systems. The reason for this is that in engines, turbines and compressors, entropy
can be seen as a book-keeping tool for certain energy-loss phenomena. In particular, if a
component is designed so that no entropy is being generated in connection with gas flow,
then this means that there is no energy loss due to viscosity or heat conduction. This
will be highly desirable for most system components as this will typically imply that the
thermal efficiency is high. If a process is designed so that no entropy is being generated,
then the process is said to be isentropic. The design of systems that are isentropic or
close to isentropic will therefore be the goal of the mechanical design. Then, as a suc-
cessful design will be isentropic or close to isentropic, it can often be assumed in the
development of the dynamic modeling that the gas flow is isentropic. This is very useful
in the development of the balance equations. It is interesting to note that in this context,
the important question for the control engineer is whether entropy is being generated or
not, while the absolute value of the entropy is not an issue. Therefore, we will describe
entropy in terms of its differential, and we will not be concerned about its absolute value.
The entropy of a mass element dm is called the specific entropy and is denoted s.
T ds = du + pdV̂ (12.17)
Combination of this definition and (12.6) gives the following alternative expression:
T ds = dh − V̂ dp (12.18)
Ds Du DV̂
T = +p (12.19)
Dt Dt Dt
468 CHAPTER 12. GAS DYNAMICS
An illustration of the different phenomena is given in Figure 12.1. The heat generation
τ : (∇v) due to viscous dissipation of mechanical energy will always be positive. Moreover,
it has been established that the heat flow will always have a negative component along
the temperature gradient. These two results are summed up as
³ ´
τ : ∇v ≥0, jQ · ∇T ≤ 0 (12.24)
Using the inequalities of (12.24) we then get the Clausius-Duhem inequality (Lin and
Segel 1974) which we state both in differential and integral form:
à !
Ds jQ
ρ ≥ −∇ · (12.25)
Dt T
ZZZ ZZ Ã !
D jQ
ρsdV ≥ − · ndA (12.26)
Dt V ∂V T
The Clausius-Duhem inequality is often referred to as the second law of thermodynamics.
Note, however, that a more precise formulation of the second law of thermodynamics is
either of the equations (12.22) or (12.23) together with (12.24).
12.2. ENERGY, ENTHALPY AND ENTROPY 469
j Q V, ,s
T
j Q
1
:
v
T
T T2
Figure 12.1: The rate of change of entropy in the material control volume V depends on
the entropy flow jQ /T into the material volume due to heat flow over the boundary, and
on the internal entropy production terms −jTQ ∇T /T 2 and τ : ∇vT /T , where the first
term is related to temperature gradients and heat flow, and the second term is due to
velocity gradients in combination with viscosity.
V, ,s
T
j Q
v
:
T T2
Figure 12.2: Isolated tank of volume V . The internal entropy production terms are
indicated.
Example 196 Consider a constant control volume V (Figure 12.2) filled with gas and
with no exchange of gas with the outside. The walls of the volume are assumed to be
isolated so that there is no heat conduction over the boundary ∂V . Then (12.26) give
ZZZ
D
ρsdV ≥ 0 (12.27)
Dt V
which shows that the total entropy is constant or increasing. This result can be made
more precise by using equation (12.23) which gives
ZZZ ZZZ ZZZ
D 1 1 ³ ´
ρsdV = − 2
j Q · ∇T dV + τ : ∇v dV (12.28)
Dt V V T V T
We see from this equation and (12.24) that the entropy of the gas in an isolated tank
with no gas exchange with the outside cannot decrease, and that the entropy will increase
if there are either temperature gradients ∇T , or velocity gradients ∇v.
470 CHAPTER 12. GAS DYNAMICS
wi wo
V
, V
m, T
jQ
Figure 12.3: Cylinder with variable volume V due to a moving piston. The inlet mass
flow in wi , the outlet massflow is wo , and the heat flow into the volume is jQ .
jQ = −k∇T (12.29)
the heat flow is proportional to the negative temperature gradient. This gives
³ ´2
jQ · ∇T = −k ∇T (12.30)
dm
cv T + mcv Ṫ = cp Ti wi − cp T wo − pAẋ + jQ (12.33)
dt
12.2. ENERGY, ENTHALPY AND ENTROPY 471
which leads to
Finally, it is noted that for an ideal gas, pV = mRT , and therefore pA = mRT /x.
Insertion of this and the use of (12.15) leads to the energy balance in the form
κwi wi + (κ − 1) wo ẋ 1
Ṫ = Ti − T − (κ − 1) T + jQ (12.36)
m m x mcv
dU
= hi wi − hwo − pAẋ + jQ (12.38)
dt
and we get
1 ³ ´
ṗV + pV̇ = hi wi − hwo − pAẋ + jQ (12.39)
κ−1
which is simplified to
We introduce the input volumetric flow qi = V̂i wi and the output volumetric flow qo =
V̂ wo and get the expression
qo qi ẋ jQ
ṗ = −κ p + κ pi − κ p + (κ − 1) . (12.43)
V V x V
Example 198 An alternative way of writing this is
V pi (κ − 1)
ṗ = −qo + qi − Aẋ + jQ (12.44)
κp p κp
mp ẍp = pA − FL (12.45)
where FL is the load force. Suppose that the piston is connected to a crankshaft with
a rod, and that the kinematic relation between the piston velocity ẋ and the crankshaft
velocity ω cs is given by
ẋ = r(θcs )ω cs (12.46)
where θcs is the crankshaft angle. Then the equation of motion for the crankshaft is
J ω̇ cs = F r(θ) − TL (12.47)
where TL is the load torque. The crankshaft is a mechanical two-port where one port
has input F and output ω cs , and one port with input TL and output ω cs .
Flexibility in the crankshaft can easily be included. This is done by inserting an
elastic transmission and an inertia which is modelled as a mechanical two-port given by
J1 ω̇ 1 = TL − T1 (12.48)
TL = D1 (ω m − ω 1 ) + K1 (θm − θ1 ) . (12.49)
where ω 1 is the shaft speed of the load shaft. This means that the transmission is
modelled as a torsional spring with spring constant K1 in parallel with a torsional damper
with damping coefficient D1 . The input port has effort TL and flow ω m , while the output
port has effort T1 and flow ω 1 .
du = −pdV̂ (12.50)
dh = V̂ dp (12.51)
For gases that satisfy the ideal gas law pV̂ = RT , this can be written
RT
cv (T )dT = − dV̂ (12.52)
V̂
RT
cp (T )dT = dp (12.53)
p
which leads to
dT R dV̂
= − (12.54)
T cv (T ) V̂
dT R dp
= (12.55)
T cp (T ) p
12.3. ISENTROPIC CONDITIONS 473
In view of (12.15) and (12.16) this gives the differential isentropic relations
dT dV̂
= − [κ(T ) − 1] (12.56)
T V̂
dT κ(T ) − 1 dp
= (12.57)
T κ(T ) p
dp dV̂
= −κ(T ) (12.58)
p V̂
dx dy ¡ ¢a
= a ⇒ ln x = a ln y + C1 ⇒ eln x = C eln y (12.59)
x y
⇒ x = Cy a (12.60)
Thus, if x1 = Cy1a is one solution, then the constant c is found from C = x1 /y1a , and any
solution x2 = Cy2a must satisfy
µ ¶a
x2 y2
= (12.61)
x1 y1
A reasonable assumption is that κ is a constant. Then we see from this derivation
that (12.56, 12.57, 12.58) leads to the isentropic relations
à !κ−1
T1 V̂2
= (12.62)
T2 V̂1
µ ¶ κ−1
T1 p1 κ
= (12.63)
T2 p2
à !κ
p1 V̂2
= (12.64)
p2 V̂1
dρ dV̂
=− (12.65)
ρ V̂
dp = c2 dρ (12.67)
√
where c = κRT , which we will see is the speed of sound.
474 CHAPTER 12. GAS DYNAMICS
Example 200 The mass balance of a gas flowing through a fixed volume V with mass
flow win into the volume and mass flow wout out of the volume is
V ρ̇ = win − wout (12.68)
where ρ is the density of the gas. If the gas is ideal and the conditions are isentropic,
then (12.67) applies, and the mass balance becomes
V
ṗ = win − wout (12.69)
c2
The energy balance (12.36) satisfies this equation if the heat flux jQ is zero, and the tem-
perature of the mass flow into the volume has the same temperature as the temperature
in the volume.
dp = κRT dρ (12.79)
This gives
∂p
= −κRT ∇ · (ρv) (12.80)
∂t
³ ´
Linearization around ρ0 , T0 , v0 = 0 gives
∂p
= −c2 ρ0 ∇ · v (12.81)
∂t
∂v
ρ0 = −∇p (12.82)
∂t
where c2 = κRT0 . Then, time differentiation of the linearized pressure equation gives
∂2p ∂ ³ ´
= −c2 ρ0 ∇·v
∂t2 ∂t
∂v
= −c2 ∇ · ρ0
∂t
Insertion of the linearized velocity equation gives the wave equation
∂2p 2
2
= c2 ∇ p (12.83)
∂t
√
where c = κRT0 .
d’Alembert’s solution of the wave equation (12.83) (Kreyszig 1979) is in the form
where f (x + ct) + g (x − ct) are required to satisfy initial conditions and boundary con-
ditions. To verify that this is a solution to the wave equation we calculate
∂2
[f (x + ct) + g (x − ct)] = c2 [f 00 (x + ct) + g 00 (x − ct)] (12.85)
∂t2
and
∂2
[f (x + ct) + g (x − ct)] = f 00 (x + ct) + g 00 (x − ct) (12.86)
∂x2
The function f (x + ct) can be interpreted as a wave that goes in the negative x direction
with velocity −c, while g(x − ct) can be interpreted as a wave moving in the positive x
direction
√ with velocity c. From this we can conclude that the speed of sound is equal
to c = κRT . For air at 15 degrees Centigrade this gives 340 m/s, which agrees with
experimental data.
Example 201 In the works of Sir Isaac Newton the speed of sound was derived under
conditions that correspond to isothermal conditions. For ideal gases this gives dp = RT dρ
and the wave equation becomes
∂2p 2
2
= c̄2 ∇ p (12.87)
∂t
√
The speed of sound according to this result is c̄ = RT , which for air at 15 degrees
Centigrade gives 287 m/s. This was is not in agreement with what was observed in
experiments.
L, A
V
w
p RT
A Helmholtz resonator is a pipe of length L and cross section A which is open at one
end, and which is connected to a volume V , called the plenum, at the other end. This
is shown in Figure 12.4. It is assumed that the compressibility effects in the pipe are
negligible, which means that it is assumed that the pressure p and the mass flow w do
not vary along the pipe. Further, it is assumed that the velocity in the plenum can be
approximated by zero. This means
√ that the conditions in the plenum are isentropic. This
implies dp = c2 dρ where c = κRT is the sonic speed. The dynamics of the Helmholtz
12.4. ACOUSTIC RESONANCES IN PIPES 477
resonator is derived from the mass balance of the plenum and the momentum balance of
the pipe. The model is found to be
V dp
= w (12.88)
c2 dt
dw
L = −pA (12.89)
dt
The model can be further developed by differentiating the mass balance with respect
to time, and by inserting the momentum balance. This gives
d2 p
+ ω 2H p = 0 (12.90)
dt2
Here ω H is the Helmholtz frequency defined by
r
A
ωH = c (12.91)
VL
Example 202 Consider a Helmholtz resonator with a pressurizing device on the input
that supplies air at a mass flow w with a pressure p1 = p1 (w). In addition, air is flowing
out of the plenum with mass flow w2 = w2 (p). The model is then
dp c2
= [w − w2 (p)] (12.92)
dt V
dw A
= [p1 (w) − p] (12.93)
dt L
Linearization gives
d∆p c2 c2 dw2
= ∆w − ∆p (12.94)
dt V V dp
d∆w A A dp1
= − ∆p + ∆w (12.95)
dt L L dw
For simplicity it is assumed that dw2 /dp ≈ 0. Then the characteristic equation is
A dp1
λ2 − λ + ω 2H = 0 (12.96)
L dw
It is clear that the system will be stable if dp1 /dw ≤ 0. Therefore, if p1 (w) has a positive
slope, then the system becomes unstable (Figure 12.5).
p1
w
Unstable Stable
region region
Figure 12.5: Pressure p1 as a function of massflow w. The unstable and stable regions
are indicated.
q(0, s) = q( , s) = 0 (12.101)
which means that the pipe is closed at both ends. The impedances at the two ends are
defined by p(0, s) = z1 (s)q(0, s) and p( , s) = z2 (s)q( , s). The boundary conditions then
correspond to impedances z1 = ∞ and z2 = ∞. This leads to g1 = g2 = 1 and b1 = a1 ,
a2 = b2 , which gives
a1 (s) = exp (−2T s) a1 (s) (12.102)
or
[1 − exp (−2T s)] a1 (s) = 0 (12.103)
It is straightforward to check that the solution is the same if the pipe is open at both
ends. This system has singularities whenever
p 0 ,T 0 v
p, T,A Outlet
v0 0
Throat
Figure 12.6: Isentropic gas flow from stagnation state p0 , T0 and velocity v0 = 0 through
a restriction with throat cross section A. The throat states are denoted p and T, and the
velocity at the throat is denoted v.
can then be used to find the following expression for isentropic flow of an ideal gas:
√ µ ¶(κ+1)/2(κ−1) µ ¶(κ+1)/2κ
w κRT0 T p
= κM = κM (12.125)
Ap0 T0 p0
v2 M 2 c2 M 2 κRT
cp T0 = cp T + = cp T + = cp T + (12.126)
2 2 2
where T0 is the stagnation temperature at the inlet, T is the temperature at the throat,
while v is the velocity at the throat. Using R/cp = (κ − 1)/κ, the energy equation can
be written in the form
T0 κ−1 2
=1+ M (12.127)
T 2
or, equivalently,
· µ ¶¸1/2 ( "µ ¶
(κ−1)/κ
#)1/2
2 T0 2 p0
M= −1 = −1 (12.128)
κ−1 T κ−1 p
Insertion of this expression for M in equation (12.125) for mass flow then leads to
√ µ ¶(κ+1)/2κ ( "µ ¶
(κ−1)/κ
#)1/2
w κRT0 p 2 p0
=κ −1
Ap0 p0 κ−1 p
By straightforward operations this can be rearranged into the well-known expressions for
isentropic nozzle flow of an ideal gas.
We note that this expressions are valid for M ≤ 1. Sonic flow occurs when M = 1.
It is seen from (12.127) that if κ = 1.4 this corresponds to
¯ µ ¶ κ−1
κ
p ¯¯ 2
= = 0.52828 (12.130)
p0 ¯sonic κ+1
Insulation
Nozzle
V
A
T, p,
The example of this section is adopted from (Bird et al. 1960, p. 480). A fluid
is contained in an insulated tank of volume V as shown in Figure 12.7. The gas is
discharged with mass flow w through a small nozzle with opening area A. The nozzle
flow is assumed to be isentropic from the stagnation state T, p, ρ in the tank to the throat
state Ta , pa , ρa at the outlet of the nozzle. The throat state is set equal to the ambient
state of the surrounding air, and the throat area is set to be the area A of the nozzle
(Heywood 1988).
The mass balance is
dm
= −w (12.132)
dt
The energy of the gas is assumed to be equal to the internal energy U = ρuV where u is
the specific internal energy. The energy balance is then
d p
(mu) = −wu − w = −wh (12.133)
dt ρ
where h = u + p/ρ is the specific enthalpy. Using the product rule for differentiation and
mass balance we get
pw
u̇ = − (12.134)
ρm
Finally, we assume that u = cv T and that the ideal gas law p = ρRT is valid. Then the
model can be written
ṁ = −w (12.135)
w
Ṫ = − (κ − 1) T (12.136)
m
12.5. GAS FLOW 483
where κ > 1 and the mass flow is found from the nozzle flow equation to be
µ ¶1/κ ( " µ ¶(κ−1)/κ #) 12
Ap pa 2 pa
w= √ κ 1− (12.137)
κRT p κ−1 p
and the throat pressure pa is the ambient pressure, and the stagnation pressure p is found
from the ideal gas law to be
mRT
p= . (12.138)
V
From the model it is clear that the time derivatives of mass m and temperature T
will be less than or equal to zero.
This result has interesting implications if we consider speeds close to the sonic speed.
Then the Mach number is close to zero, and in particular, at sonic speed M = 1, and
1 − M 2 = 0. This gives
v2,2 + v3,3 = 0 · v1,1 (12.150)
This is satisfied in a flow field where v2 = v3 = 0, which is the case if all particles flow
along the x1 axis. However, if M → 1 when v2,2 + v3,3 6= 0, then v1,1 → ∞. This
means that the model consisting of the Euler equation and the continuity equation has
a singularity at M = 1. This agrees with experimental evidence which shows that if the
Mach number M approaches unity when there are disturbances in the flow patterns so
that v2,2 +v3,3 6= 0, then a large gradients in density and velocity occur, and this is called
a shock . In a shock the assumption of isentropic conditions are no longer valid as there
will be significant viscous energy dissipation, and (12.67) will no longer be valid.
Chapter 13
Compressor dynamics
13.1 Introduction
13.1.1 Compressors
Compressors are used in a wide variety of applications. These includes turbojet engines
used in aerospace propulsion, power generation using industrial gas turbines, turbocharg-
ing of internal combustion engines, pressurization of gas and fluids in the process indus-
try, transport of fluids in pipelines and so on. Compressors can be divided into four
general types: reciprocating, rotary, centrifugal and axial. Some authors use the term
radial compressor when referring to a centrifugal compressor. Reciprocating and rotary
compressors work by the principle of reducing the volume of the gas, and will not be
considered further in this work. Centrifugal and axial compressors, also known as tur-
bocompressors or continuous flow compressors, work by the principle of accelerating the
fluid to a high velocity and then converting this kinetic energy into potential energy by
decelerating the gas in diverging channels. In axial compressors the deceleration takes
place in the stator blade passages, and in centrifugal compressors it takes place in the
diffuser. The increase in potential energy of the fluid is manifested by a pressure rise.
This conversion can be explained from Bernoulli’s equation (11.86), which is written:
p1 C2 p2 C22
+ 1 + gz1 = + + gz2 (13.1)
ρ 2 ρ 2
Here p is the pressure, ρ is the density of the fluid, C is the velocity of the fluid and gz
the potential energy per unit mass. Subscripts 1 and 2 denotes properties before and
after deceleration, respectively. The equation is a special case of the law of conservation
of energy developed for flowing fluids. Bernoulli’s equation states that the sum of kinetic
2
energy C2 , potential energy gz and pressure head pρ at one set of conditions is equal
to their sum at another set of conditions. Hence, decrease in kinetic energy implies an
increase in potential energy and pressure. One obvious difference between the two types
of turbocompressors is that, in axial compressors, the flow leaves the compressor in the
axial direction, whereas in centrifugal compressors, the flows leaves the compressor in a
direction perpendicular to the axis of the rotating shaft. Axial compressors can accept
higher mass flow rates than centrifugal compressors for a given frontal area. This is
one reason for axial compressors dominance in jet engines, where frontal area is of great
485
486 CHAPTER 13. COMPRESSOR DYNAMICS
importance. Another reason for this is that for gas turbines, or jet engines, specific
fuel consumption decreases with increasing pressure ratio. The axial compressor, using
multiple stages, can achieve higher pressure ratio and efficiency than the centrifugal.
1. Traditionally, surge and rotating stall have been avoided by using control systems
that prevent the operating point of the compressions system to enter the unstable
regime to the left of the surge line, that is the stability boundary.
about half the pressure rise occurs in the impeller and half in the diffuser. As no work
is done on the fluid in the diffuser, all the energy is supplied to the fluid in the impeller,
thus the energy transfer from the shaft power to the fluid energy will be determined by
the conditions at the inlet and outlet of the impeller.
It is more difficult to obtain efficient deceleration of flow than it is to obtain efficient
acceleration. If divergence in the diffuser is too rapid, the fluid will tend to break away
from the walls of the diverging passage, reverse its direction and flow back in the direction
of the pressure gradient. This may lead to the formation of eddies with consequent
transfer of some kinetic energy into internal energy and a reduction of useful pressure
rise. On the other hand, a small angle of divergence will lead to a long diffuser and high
losses due to friction. In order to carry out the diffusion in as short a length as possible,
the air leaving the impeller may be divided into a number of separate diverging passages
separated by fixed diffuser vanes, resulting in a vaned diffuser. However, in industrial
applications where size may be of secondary importance a vaneless diffuser may have the
economic advantage as it is much cheaper to manufacture than the vaned diffuser. A
vaneless diffuser is a simple annular channel, and is therefore also known as an annular
diffuser, in which the radial velocity component is reduced by area increase and the
tangential velocity component by the requirement of constant fluid angular momentum.
If the disadvantage of the annular diffuser is its bulk, the advantage is its wide range of
operation. A vaned diffuser may have a higher peak efficiency than an annular diffuser,
but its mass flow range is considerable less because of early stall of the diffuser vanes.
We consider a compressor driven by a drive torque τ d . The compressor is modeled as
a momentum source in a duct of length L and cross section A. The duct is connected to
a plenum, which is a volume V . The gas flows from the duct into the plenum, and then
out of the plenum through a throttle. This is illustrated in Figure 13.4. The momentum
delivered to the gas is the ideal momentum from the rotor minus momentum loss due to
incidence loss and fluid friction loss. The usual Greitzer surge model (Greitzer 1976) for
this system is derived from the mass balance of the plenum and the momentum equation
of the duct.
J ω̇ = τ d − τ c (13.2)
where J is the inertia of the compressor shaft and compressor wheel, ω is the angular
velocity of the shaft, τ d is the drive torque of the motor, and τ c is the compressor torque,
which is the torque acting on the compressor shaft from the rotor blades. The compressor
torque is equal to the rate of change of angular momentum
τ c = w(r2 Cθ2 − r1 Cθ1 ) (13.3)
where w is the mass flow, Cθ1 is the tangential velocity of the fluid at the rotor inlet
and Cθ2 is the tangential fluid velocity at the rotor outlet. The radius at the inlet is r1
and the rotor radius at the outlet is denoted r2 , as shown in Figure 13.2. Assuming no
pre-whirl, an assumption that is met in e.g. most turbocharges, we have that Cθ1 = 0,
and the torque becomes
τ c = wr2 Cθ2 (13.4)
488 CHAPTER 13. COMPRESSOR DYNAMICS
compressor
Motor
d c
For backswept blades, we see from the velocity triangle in Figure 13.3 that
U2 = r2 ω (13.6)
is the flow coefficient, and β 2b is the blade angle at the impeller tip. The function
In the case of radial vanes β 2b = 90◦ we have that cot β 2b = 0 and µ = 1. Backwards
swept blades have β 2b < 90◦ in which case µ decreases with increasing flow coefficient
φ. In practice the energy transfer coefficient is slightly less than the ideal value, and we
may write
µ (φ) = σ (1 − φ cot β 2b ) (13.10)
where σ is the slip factor, which is slightly less than unity. A usual approximation is the
Stanitz slip factor:
2
σ ≈1− (13.11)
N
where N is the number of blades.
13.2. CENTRIFUGAL COMPRESSORS 489
C2
C 2 C r2
r1
Vanes
r2
Impeller
Figure 13.2: The rotating impeller viewed face-on. Note the radial vanes.
w = ρAC (13.12)
where ρ is the density in the duct, A is the constant cross section of the duct, and C is
the velocity of the fluid in the duct, which is assumed to be constant along the duct.
where ρp is the density in the plenum, w is the mass flow from the duct into the plenum,
and wt (pp ) throttle mass flow going out of the plenum. Suppose that the gas in the
plenum is ideal and isentropic. Following the derivation leading to equation (12.67), we
then have
dpp = c2p dρp
where the sonic velocity in the plenum is given by
p
cp = κRTp
U 2 r2
W2 C r2
C 2 = W2 + U 2
2b
C 2
r2
Figure 13.3: Velocity triangle at the impeller exit. Note the backswept vanes.
Compressor Plenum
Vp
Duct
p 01 pp
p 02 A w w t (p p )
Tp
L Throttle
Figure 13.4: Compression system consisting of compressor, duct, plenum volume and
throttle.
c2p
ṗp = [w − wt (pp )] (13.14)
Vp
In Greitzer’s original derivation of this model, it is assumed that cp ≈ c01 , where c01 is
the sonic velocity at ambient conditions. This is equivalent to assume Tp ≈ T01 .
to zero, the static pressure at the outlet of the diffuser will be approximately equal to
the stagnation pressure at the outlet of the impeller. Therefore, the pressure at the inlet
of the duct is set to the stagnation pressure at the outlet of the impeller.
The momentum equation of the duct is then
d
(md C) = Ap02 (w, ω) − App (13.15)
dt
where
md = LAρ (13.16)
is the mass in the duct, L is the duct length, p02 (w, ω) is the stagnation pressure at the
outlet of the compressor rotor which is assumed to be equal to the static pressure at
the inlet of the duct, and pp is the plenum pressure. The velocity C of the fluid can be
written
q w
C= = (13.17)
A ρA
where q is the duct volume flow. By combining (13.15), (13.16) and (13.17), we get the
momentum equation for the duct written as a differential equation in mass flow.
p 02
h
2
h 02
p 01
2s
h 02s
h 01
1
so that ∆h02s is the change in specific stagnation enthalpy that contributes to the accel-
eration of the gas in the duct.
The mechanical power transferred from the shaft to the gas is
P = τ cω
As there is no energy storage in the gas in the impeller, the power transferred from the
rotor to the gas is equal to the rate of stagnation enthalpy increase
P = w∆h02
of the fluid, where ∆h02 is the increase in specific stagnation enthalpy. By using (13.3),
this gives
w∆h02 = P = τ c ω = w(U2 Cθ2 − U1 Cθ1 ) (13.21)
which is known as Euler’s pump equation. Alternatively, we can use (13.9) and it follows
that
w∆h02 = P = τ c ω = wµ (φ) r22 ω 2 (13.22)
and
τ cω
∆h02 (ω, C) = = µ (φ) r22 ω 2 (13.23)
w
In off-design operation of the compressor there will be a mismatch between the fixed
blade angle β 1b and the direction of the gas stream β 1 . The loss associated with this is
termed the incidence loss. The incidence loss ∆hi , expressed as a change of enthalpy, is
determined according to the so-called NASA model of (Futral and Wasserbauer 1965).
It is assumed that ∆hi is equal to a reduction in kinetic energy corresponding to an
instantaneous change in fluid velocity at the blade inlet such that the axial velocity is
unchanged, while the tangential velocity is changed to accommodate the fixed blade angle
β 1b . The difference between the flow angle and the blade angle,
β i = β 1b − β 1
13.3. COMPRESSOR CHARACTERISTIC 493
Inducer blade
C 1
U1
1b
1
C a1
i C1
W1 W 1b
1
W 1
Figure 13.6: Velocity triangles at the inducer. Section through inducer at radius r1 .
is called the incidence angle. The velocity of the incoming gas relative to the inducer is
termed W1 . Thus, with Cθ1 = 0, we get from the triangles of Figure 13.6
1 2
∆hi = W
2 θ1
1
= (U1 − cot β 1b Ca1 )2
2
µ ¶2
r12 A
= ω − cot β 1b v
2 A1 r1
r12 2
= (ω − αw) (13.24)
2
where U1 = r1 ω is the rotor blade speed, Ca1 = C (A/A1 ) is the axial velocity at the
blade inlet, ρ1 is the density at the blade inlet which is considered to be a constant, and
A
α = cot β 1b (13.25)
A1 r1
In order to calculate the friction loss, we treat the flow passages in the impeller as
pipes with circular cross section. The friction loss is then modelled as
2
l W1b
∆hf = Ch
D 2
where Ch is the surface friction loss coefficient, l is the mean channel length and D is the
mean hydraulic diameter. The hydraulic diameter for a pipe of non-circular cross section
can be calculated as
4A
D=
a
where A is the cross sectional area and a is the length of the wetted perimeter. Using
Figure 13.6, the friction loss can now be shown to be given by
∆hf = kf w2 (13.26)
where
Ch l
kf =
2Dρ21 A21 sin2 β 1b
494 CHAPTER 13. COMPRESSOR DYNAMICS
is a constant. Combining (13.23), (13.20), (13.24) and (13.26) results in the enthalpy
transfer
r2 2
∆h02s (ω, w) = σr22 ω 2 − 1 (ω − αw) − kf w2 (13.27)
2
The stagnation pressure ratio is given by the stagnation temperature ratio of the
isentropic process 1 → 2s according to
µ ¶ κ−1
κ
p02 p02s T02s
= = (13.28)
p01 p01 T01
From (12.63) and (13.27) we find the expression for the pressure ratio
µ ¶ κ
p02 ∆h02s κ−1
Ψc (w, ω) = = 1+ (13.30)
p01 cp T01
à r2 2
! κ−1
κ
σr22 ω 2 − 21 (ω − αv) − kf w2
Ψc (w, ω) = 1+ (13.31)
cp T01
such that
p02 (w, ω) = Ψc (w, ω)p01 (13.32)
Inserting (13.32) into (13.18) gives the momentum balance
õ ¶ κ !
A ∆h02s κ−1
ẇ = 1+ p01 − pp (13.33)
L cp T01
or
A
ẇ = (Ψc (w, ω)p01 − pp )
L
From (13.2), (13.14) and (13.33), the resulting compressor model is found to be
c2p
ṗp = (w − wt ) (13.34)
Vp
à r12 2
! κ−1
κ
L µr2 ω 2 − (ω − αw) − kf w2
ẇ = 1+ 2 2
p01 − pp (13.35)
A cp T01
J ω̇ = τ d − wr22 µω (13.36)
that is transferred from the compressor blades to the fluid. Thus, if we let 1 denote the
impeller inlet and 2 denote the impeller outlet we have
When the mass flow tends to zero it seems reasonable to assume that the increase in static
enthalpy is continuous at w = 0. Moreover, at zero mass flow through the compressor
we may assume that Cθ1 = U1 and Cθ2 = U2 . This gives the following increase in static
enthalpy for zero mass flow:
¡ ¢
∆h0s = h20 − h10 = U22 − U12 = ω 2 r22 − r12 (13.40)
where r2 is the radius of the impeller outlet and r1 is the radius of the impeller inlet.
The associated pressure rise for the compressor at zero mass flow is
µ ¶ κ Ã ¡ ¢ ! κ−1
κ
where the ideal gas law has been used together with cp = Rκ/ (κ − 1).
Example 203 By combining (13.37) and (13.39), the increase in enthalpy as opposed
to stagnation enthalpy is found from
µ ¶ µ ¶
1 2 1 2
h1 + C1 − U1 Cθ1 w = h2 + C − U2 Cθ2 w. (13.42)
2 2 2
Ci2 = Cθi
2 2
+ Cri = Ui2 + 2Ui Wθi + Wθi
2 2
+ Wri = Ui2 + 2Ui Wθi + Wi2 (13.44)
1 1
Ii = hi + Wi2 − Ui2 (13.46)
2 2
496 CHAPTER 13. COMPRESSOR DYNAMICS
is unchanged over the impeller. We may then compute the change in enthalpy at zero
mass flow by assuming continuity when w → 0. At zero mass flow we have Ci = Ui at
the inlet and at the outlet, and therefore Wi = 0. It follows that the increase in enthalpy
over the impeller at zero mass flow is
1¡ 2 ¢ ω2 ¡ 2 ¢
h2 − h1 = U2 − U12 = r − r12 (13.47)
2 2 2
where r2 is the radius of the impeller outlet and r1 is the radius of the impeller inlet. As
1¡ 2 ¢
h20 − h10 = h2 − h1 + C2 − C12 (13.48)
2
this is consistent with the result for the stagnation enthalpy with C1 = U1 and C2 = U2 .
Assuming isentropic pressure rise,
µ ¶ κ
p02 ∆h κ−1
Ψc (w, ω) = = 1+ , w > 0. (13.49)
p01 cp T01
holds, for details see (Gravdahl, Egeland and Vatland 2001), and by combining (13.46)
and (13.49), we get at zero mass flow
µ ¶ κ
π 2 N 2 (D22 − D12 ) κ−1
Ψc (0, N ) = Ψo = 1 + , (13.50)
2cp T01
where N = 2πω is the rotational speed in revolutions per second.
Remark 5 Close to zero mass flow there may be high incidence losses in the diffuser so
that the fluid is not slowed down isentropically, and the kinetic energy is not recovered as
a pressure rise. Therefore, the pressure at the inlet of the duct may be set to the static
pressure at the outlet of the impeller, in which case the pressure rise is
µ ¶ κ Ã ¡ ¢ ! κ−1
κ
ρω 2 rdV (13.52)
Integrating this gives the centrifugal loading at r = r2 for zero mass flow:
Z r2
1 ¡ ¢
ρω 2 rdr = ρ1 ω 2 r22 − r12 (13.53)
r1 2
were the density has been approximated by ρ = ρ1 . Then the increase in static pressure
at zero mass flow is
1 ¡ ¢
p2 ≈ p1 + ρ1 ω 2 r22 − r12 (13.54)
2
and the pressure rise in terms of static pressure is
¡ ¢
p2 ρ1 ω 2 r22 − r12
=1+ (13.55)
p1 2p1
This expression for the pressure rise is approximately equal to the expression (13.51) for
a small pressure rise.
13.4. COMPRESSOR SURGE 497
c
Radial vanes 2 2
Backswep
t vanes
2
where the expression for ∆h02s (ω, w) from (13.27) has been used. Equation (13.62)
clearly shows that the compressor characteristic is a function of the flow coefficient φ
when ∆T02s is small. The characteristic is plotted in Figure 13.7.
1 2 dψ c2p
ρU ω H = ρAU [φ − φt (ψ)] (13.63)
2 dξ Vp
dφ 1 2 1 1
U ωH L = U ψ c (φ) − ρU 2 ψ (13.64)
dξ 2 2 ρ
is Greitzer’s B-parameter.
13.4.2 Linearization
Linearization of the Greitzer model (13.65)-(13.66) gives
µ ¶ µ 1 1 ¶µ ¶
d ψ − Bg B ψ
= t (13.70)
dξ φ −B Bgc φ
where µ ¶−1
∂ψ c ∂φt
gc = , gt = (13.71)
∂φ ∂ψ
are the slopes of the compressor characteristic and the throttle characteristic in a φ, ψ
diagram. The characteristic equation is
µ ¶ µ ¶
1 gc
λ2 + − Bgc λ + 1 − =0 (13.72)
Bgt gt
and the system is seen to be stable if
1
gc < (13.73)
B 2 gt
and
gc < gt (13.74)
¡ 2 ¢−1
The case gc > B gt is usually referred to as a dynamic instability, while the case
gc < gt is called a static instability. We consider a situation where the slope gc of the
compressor characteristic increases from some negative value. We see that if B becomes
small, then a larger gc is tolerated before the dynamic instability is encountered. If B
becomes sufficiently small, that is if B < gt−1 , then the static instability will occur before
the dynamic instability.
Example 207 At the top of the compressor characteristic we have gc = 0, and the
characteristic equation becomes
1
λ2 + λ+1=0 (13.75)
Bgt
This corresponds to a normalized undamped natural frequency ω ∗0 = 1. We recall that
the normalized time variable ξ = tω H is scaled with the Helmholtz frequency, and the
corresponding undamped natural frequency is found to be
ξ
ω 0 = ω ∗0= ωH (13.76)
t
We see that the undamped natural frequency for an equilibrium point at the top of the
compressor characteristic is the Helmholtz frequency ω H .
500 CHAPTER 13. COMPRESSOR DYNAMICS
Example 208 We now assume that there is a valve at the compressor outlet. The valve
characteristic is v
u 2ρ (p − p )
ẇ = CD A2 u
1 2
t ³ ´2 (13.77)
1− A 2
A1
The plenum volume in this case is small, and we may assume that B < gt−1 . Then the
stability requirement is
gc < gt (13.78)
that is, the static instability must be avoided.
Example 209 If the compressor delivers gas to a pipeline the plenum volume is Vp → ∞
and it follows that B → ∞. In this case ψ will be a constant, and the system is described
by the first order model
dφ
= B [ψ c (φ) − ψ] (13.79)
dξ
This model is stable whenever
gc < 0 (13.80)
This means that a compressor connected to a pipeline is stable as long as the compressor
characteristic has a negative slope.
where (13.81) is the pressure dynamics, and (13.82) is the mass flow dynamics. The
throttle flow φt (ψ) is given as p
φt (ψ) = γ t ψ (13.83)
Consider the positive function
µ ¶
1 1
V = V1 + V2 = Bψ + φ2 2
(13.84)
2 B
dV1
= ψφ − ψφt (ψ) (13.85)
dξ
which implies that the system with φ as input and ψ as output has certain passivity
RT
properties depending on the value of the term 0 ψφt (ψ) dξ. The throttle in a compres-
sion system is a passive component, and from (13.83) it can be seen that a coefficient κ1
can always be chosen sufficiently small such that the throttle characteristic satisfies the
condition
ψφt (ψ) ≥ κ1 ψ 2 (13.86)
We now find that Z Z
T T
ψφdξ > −V1 (0) + κ1 ψ 2 dξ (13.87)
0 0
dV2
= φψ c (φ) − ψφ (13.88)
dξ
Following the same procedure as above, we find that
Z T Z T
−ψφdξ = V2 (T ) − V2 (0) + φψ c (φ) dξ
0 0
Z T
> −V2 (0) + φψ c (φ) dξ (13.89)
0
and the passivity properties of the system with input −ψ and output φ depends on the
RT
value of the term 0 φψ c (φ) dtξ. For operating points where the slope of the compressor
characteristic is negative, the sector condition
φψ c (φ) ≥ κ2 φ2
and it follows that the mass flow dynamics are (strictly) passive. This leads us to the
known result that the feedback interconnection of the two systems, that is the Greitzer
model, is a passive system when the operating point is located on a part of the compressor
characteristic with negative slope.
In the case where the operating point is not located in an area of negative slope,
that is the system is in an unstable (surge) condition, we still have that the pressure
dynamics are passive according to (13.87). The flow dynamics are now not passive
according to (13.90), but if it is possible to manipulate, through some external actuator,
the compressor characteristic ψ c (φ), (13.89) can be used for controller design. This
approach was taken in (Gravdahl and Egeland 1998) using a close coupled valve for
active surge control, and in (Gravdahl and Egeland 2002) using the drive itself.
of this measured characteristic in the model of the system. In this example it is shown
how to use a polynomial approximation. The solid circles in Figure 13.8 are points read
from an actual compressor map for a centrifugal compressor used in pipeline natural gas
transport in the North Sea in Norway. It is to be noted that points near the stonewall
area of the measured characteristic were not used. In that area choking is the dominant
effect, and this is not taken into account in the modeling. Also, in order to ensure that
the approximated constant speed lines do not cross each other in the negative flow area,
one point for negative flow was chosen for each speed line. The zero flow pressure rise for
each speed as calculated by (13.50), and the dotted lines are the third order polynomial
approximations of the speed lines at five different speeds.
5.5
500/s
4.5
460/s
3.5
400/s
3
2.5 340/s
2
300/s
1.5
1
-2 0 2 4 6 8 10
Figure 13.8: The measured speed lines (solid lines) and the polynomial approximations
(dashed lines).
The approximations are calculated using the Matlab function polyfit, and for the
five chosen speed lines, results are:
Ψc (w, 300) = 1.6024 − 0.0625w + 0.1668w2 − 0.0441w3 ,
Ψc (w, 340) = 1.8291 − 0.0966w + 0.1825w2 − 0.0304w3 ,
Ψc (w, 400) = 2.2511 − 0.1443w + 0.1908w2 − 0.0240w3 ,
Ψc (w, 460) = 2.8092 − 0.1658w + 0.1783w2 − 0.0177w3 ,
Ψc (w, 500) = 3.2699 − 0.2051w + 0.1744w2 − 0.0147w3 .
A compressor map is also continuous in the rotational speed, as can be seen from (13.30),
so in order to simulate the system, there is a need for making the approximated map also
continuous in rotational speed. For this reason, the coefficients of the third order poly-
nomials in are chosen to be functions of rotational speed. The polynomial approximation
for each speed line can be written as
Ψc (w, N ) = c0 (N ) + c1 (N ) w + c2 (N ) w2 + c3 (N ) w3 ,
where the functions
ci (N ) = ci0 + ci1 N + ci2 N 2 + ci3 N 3
13.4. COMPRESSOR SURGE 503
are calculated by using polynomial approximation yet again. In Figure 13.9, the polyno-
mial coefficients of the five polynomials are plotted as a function of rotational speed. As
can be seen, a fairly good fit can be made with third order.
-0.01 0.195
0.19
-0.02
0.185
c 2 (N)
c3 (N)
-0.03 0.18
0.175
-0.04
0.17
-0.05 0.165
300 350 400 450 500 300 350 400 450 500
N [1/s] N [1/s]
0.1 3.5
0 3
c 1 (N)
-0.1 c 0 (N)2.5
-0.2 2
-0.3 1.5
300 350 400 450 500 300 350 400 450 500
N [1/s] N [1/s]
Figure 13.9: The coefficients ci as functions of speed N (solid lines), and their polynomial
approximations (dashed lines).
Remark 7 For the presentation of compressor characteristics which describe the sta-
tionary performance of compressors another normalization is often used. This is based
on using the Mach number to represent flow and blade velocity. We introduce as nondi-
mensional variables the Mach numbers
C U
MC = , MU = (13.91)
c0 c0
where p
c0 = κRT0 (13.92)
2
c
and T0 = T + 2 is the stagnation temperature. Then, using w = ρAC, we find that
√
C w wRT0 ρ0 ρ0 w RT0
MC = = √ = √ = √ (13.93)
c0 ρA κRT0 Ap0 κRT0 ρ ρ κ Ap0
and that
U ωr 1 ωr
MU = =√ =√ √ (13.94)
c0 κRT0 κ RT0
For plotting of compressor characteristics the following dimensionless variables are used:
The corrected mass flow √
√ w RT
κMC = (13.95)
Ap
504 CHAPTER 13. COMPRESSOR DYNAMICS
wr
Recycle line
w1
wf V 1 ,p 1 ,T 1 V 2 ,p 2 ,T 2 wt
Q1 , d Q2
Compressor
Drive
c
w1
Figure 13.10: A centrifugal compressor with drive unit, upstream volume, downstream
volume and recycle line.
A model of this system can be found by calculating the mass balances for the two
volumes, calculating the momentum balance of the downstream compressor duct, and
calculating the torque balance of the shaft:
c201
ṗ1 = (wf − w1 + wr ) (13.97a)
V1
c201
ṗ2 = (w1 − wr − wt ) (13.97b)
V2
A
ẇ1 = (Ψc (w1 , ω)p1 − p2 ) (13.97c)
Lc
1
ω̇ = (τ d − τ c ) , (13.97d)
J
where, p1 is the pressure in the upstream volume V1 , p2 is the pressure in the downstream
volume V2 , wf is the feed mass flow, w1 is the mass flow through the compressor, wr is
the recycle mass flow, wt is the throttle flow, Ψc (w1 , ω) is the compressor characteristic,
ω is the rotational speed of the compressor, τ d is the drive torque, τ c is the compressor
torque, J is the inertia of all rotating equipment, c01 is the sonic velocity at ambient
conditions.
The mass flow through the recycle valve is given as
p
wr = kr ∆pr , (13.98)
13.4. COMPRESSOR SURGE 505
ṁ = win − wout
d X
U= wi hi − Q,
dt i
Simulation
507
Chapter 14
Simulation
14.1 Introduction
14.1.1 The use of simulation in automatic control
Simulation of dynamic processes involves the numerical solution of differential equations
which are normally in the form of initial value problems. The numerical schemes that
are used for this are called numerical integrators. There is a large literature on numerical
integrators (Hairer, Nørsett and Wanner 1993), (Hairer and Wanner 1996), (Lambert
1991), (Shampine 1994), and a wide range of methods are available. These methods have
different properties and the selection of which method to use depends on the properties of
the system to be simulated. In this chapter a range of numerical integrators are presented
and analyzed, and it is attempted to give some advice on how a suitable method can be
selected for important dynamic systems.
Simulation plays an important part in the design, maintenance and upgrading of
control systems. Dynamic systems to be controlled are usually described by differential
equations or transfer functions, and simulation is used to check the qualitative behavior
of the system for typical parameter values and for expected modes of operation. When a
controller is designed for a system it is usual practice to test the controller in simulations
before implementing it. This allows for rapid changes and correction of errors before the
system is designed. Also it is important that procedures for handling of discrete events
and errors can be tested. For systems where a controller has already been developed,
quantitative aspects of simulation is important for the fine tuning of controller parameters
and the redesign of the system to be controlled.
An example where this is useful is in the development of industrial robots. In appli-
cations like spot welding in car production lines there are ever-increasing demands on the
robot to finish spot welding tasks faster while maintaining the weld quality specifications.
Then, simulation must be used to improve controller parameters, to try out friction com-
pensation, and to improve the mechanical construction so that elastic deformations can
be reduced. The alternative to using simulation would be iterative mechanical redesign
which is costly and time consuming.
In car engines new regulations of emissions are enforced, and there is a demand for
engines that are lighter, that use less fuel and that pollute less. The introduction of new
electronic control systems is necessary to achieve this. Car manufacturers use simulation
systems to reduce mechanical vibrations, to shape the combustion chamber for efficient
combustion of the fuel, to reduce the formation of pollutants, to optimize electronic
509
510 CHAPTER 14. SIMULATION
controls for components like fuel injectors, turbochargers, and valves for exhaust gas
recycling. Also in the design and testing of control systems for ABS brakes simulation is
an indispensable tool.
For ship control systems there are large costs involved in commissioning of control
systems, which involves installation and calibration. Moreover, a typical situation is that
there is very little time available for the control engineer to commission the controllers
before the ship is to be set into commercial operation. By use of simulation the time for
commissioning can be reduced significantly, and this may be a decisive factor to make
control systems commercially attractive for the marine industry.
The last few years new and powerful tools have been made available for simulation
which makes it much easier to run simulations than what have been the case. Also
simulation tools and control systems development tool have been integrated, and the
role of simulation in automatic control is becoming even more important than it used to
be. Still, it is important to know the properties of the numerical schemes that are used
so that the results can be interpreted in the right way.
In the following, three examples are presented where the dynamics of systems with-
out controllers are presented. Simulation of the dynamics of these systems reveals the
qualitative properties of the systems, and this is useful a starting point for designing
controllers. MATLAB code is included for two of the examples to make it easy for the
reader to simulate the systems with MATLAB or SIMULINK.
0.8
0.7
0.6
0.5
0.4
Φ, Ψ, J
0.3
0.2
0.1
-0.1
-0.2
0 10 20 30 40 50 60 70 80 90 100
Time
Figure 14.2: Simulation of rotating stall. Φ, Ψ and J are plotted with dashed solid and
dash-dotted lines respectively.
1.2
0.8
Φ, Ψ
0.6
0.4
0.2
0 5 10 15 20 25 30 35
Time
4
2
J
0
0 5 10 15 20 25 30 35
Time
Figure 14.3: Simulation of surge. Φ, Ψ and J are plotted with dashed solid and dash-
dotted lines respectively.
512 CHAPTER 14. SIMULATION
where fuel is added. The gas expands and drives the turbine which delivers the required
power to the compressor over a shaft. The thrust force comes from the mass flow through
the restriction behind the turbine, and in modern jet from a fan that is driven by the
turbine If the jet-stream of another aeroplane meets the intake, or if the aspect angle of
the aeroplane becomes too large there will be a severe disturbance in the fluid flow at
the compressor inlet. This may cause the mass flow through the compressor to become
smaller than a critical value given by the surge line, and the engine will enter one of two
unstable operating modes known as surge and rotating stall. Surge is an axisymmetric
pulsation of the flow through the compressor, while rotating stall is an instability where
the circumferential flow pattern is disturbed. If the engine enters rotating stall it will
be necessary to shut down the engine, which may lead to the plane falling out of the
sky. These physical phenomena are described by the Moore-Greitzer model (Moore
and Greitzer 1986) that describes the transients in an axial compression system like an
aircraft jet engine. Based on this model a number of control systems have been designed
to stabilize surge and stall. This is discussed in (Gravdahl and Egeland 1999). In the
model the turbine is modeled as a throttle and the combustion chamber is called the
plenum. The model consists of three nonlinear differential equations, and the states are
plenum pressure, mass flow and rotating stall amplitude. The rotating stall amplitude
is a measure of the unstable non-axisymmetric flow disturbance. All states have been
made normalized. The Moore-Greitzer model is written
1 ³ √ ´
Ψ̇ = Φ − γ T Ψ (14.1)
4lc B 2
à µ ¶µ ¶ µ ¶3 !
H Ψ − ψ c0 3 Φ J 1 Φ
Φ̇ = − +1+ −1 1− − −1 (14.2)
lc H 2 W 2 2 W
à µ ¶2 !
˙ Φ J
J =J 1− −1 − σ (14.3)
W 4
where Ψ is the nondimensional plenum pressure (pressure divided by density and the
square of compressor rotational speed), Φ is the average mass flow coefficient (axial flow
velocity divided by compressor rotational speed), and J is the squared amplitude of
rotating stall amplitude. The constant lc is the total length of the compressor and duct,
Ac is the cross sectional flow area, γ T is a parameter proportional to the throttle opening,
and H, W , ψ c0 and σ are constants describing the compressor. Finally,
r
U Vp
B= (14.4)
2c Ac lc
is Greitzer’s B-parameter, where U is the tangential speed of the compressor, c is the
speed of sound, Vp is the plenum volume, and Ac is the cross sectional flow area.
Numerical values for a laboratory compression system in unstable operation is H =
0.18, W = 0.25, ψ c0 = 0.30, σ = 0.38, γ T = 0.5 and lc = 2. Initial conditions that
correspond to a stable operating point are given by Ψ(0) = Φ(0) = 0.6, J(0) = 0.1. By
setting the B-parameter at B = 0.1, the engine will go into rotating stall, and by setting
the B-parameter at B = 1, the engine will start to surge.
The model (14.1)-(14.3) can be simulated in SIMULINK under MATLAB by imple-
menting the following SIMULINK s-function:
function [sys,x0] = MooreGreitzer(t,x,u,flag)
H=0.18;
14.1. INTRODUCTION 513
W=0.25;
l_c=2;
psi_co=0.30;
s=0.38;
if flag == 1,
%return state derivatives
gamma_T=u(1);
B=u(2);
sys(1)=1/(4*l_c*B^2)*(x(2)-gamma_T*sqrt(x(1)));
sys(2)=H/l_c*(-(x(1)-psi_co)/H+1+1.5*(x(2)/W-1)*(1-0.5*x(3))
-0.5*(x(2)/W-1)^3);
sys(3)=x(3)*(1-(x(2)/W-1)^2-x(3)/4)*s;
elseif flag == 0,
% return initial conditions
sys=[3;0;3;2;0;0];
x0=[0.6;0.6;0.1];
elseif flag == 3,
% return outputs
sys=[x(1) x(2) x(3)];
else
sys = [];
end
The model may now be simulated in SIMULINK by making a block diagram as shown
in Figure 14.1. The simulation result for both rotating stall and surge is shown in Figures
14.2 and 14.3.
ẋ = vx (14.5)
ẏ = vy (14.6)
m1 (x + m2 ) m2 (x − m1 )
v̇x = 2vy + x − − (14.7)
r13 r23
m1 y m2 y
v̇y = −2vx + y − 3 − 3 (14.8)
r1 r2
where
q
r1 = (x + m2 )2 + y 2 (14.9)
q
r2 = (x − m1 )2 + y 2 (14.10)
m1 + m2 = 1 (14.11)
514 CHAPTER 14. SIMULATION
Table 14.1: Initial conditions and periode T for three periodic orbit of the resticted
three-body problem.
Here x and y are the position coordinates of the satellite, vx is the velocity in the x
direction and vy is the velocity in the y direction. The mass of the earth is m1 and the
mass of the moon is m2 . The acceleration terms are due to the gravitational field, and
Coriolis and centrifugal effects due to the rotation of the earth-moon system. The energy
function of the system is given by
1¡ 2 ¢ m1 m2
h= v + vy2 − x2 − y 2 − − (14.12)
2 x r1 r2
and the conservation of energy implies that h is a constant during the motion of the
system. This can be used to check the accuracy of computed solutions.
We would like to compute the solution of the differential equation using a numerical
scheme. Several periodic orbits have been found for this system that can be used to check
the accuracy of numerical integrators (Hairer and Wanner 1996), (Shampine et al. 1997).
It turns out that the solution is very sensitive close to the moon at (x, y) = (1, 0), and
close to the earth at (x, y) = (0, 0). As a consequence of this, a standard fixed step
integrator will be useless for the integration of this system. The widely used Euler’s
method give large errors even with 24000 time steps per orbit, and even the fourth order
Runge-Kutta method RK4 gives significant errors with 6000 time steps. The parameters
describing three periodic orbits are given in Table 14.1.
The solutions were computed with the ode45 function in MATLAB with a relative
tolerance of 10−6 . The computation of the first orbit took 697 steps for Orbit 1, 621
steps for Orbit 2, and 601 steps for orbit 3. The results for the computation of two orbits
are shown in Figures 14.4—14.6. Note that the integration is sufficiently accurate for the
two orbits to coincide.The code for generating the plots is the MATLAB script
tf1=17.0652165601579625588917206249; %Periode
14.1. INTRODUCTION 515
1.5
0.5
-0.5
-1
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
1.5
0.5
-0.5
-1
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
1.5
0.5
-0.5
-1
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
tf2=11.124340337266085134999734047;
tf3=6.192169333131963970674;
x0=0.994; x03=1.2; y0=0; vx0=0.0; %Initial conditions
vy01=-2.00158510637908252240537862224;
vy02=-2.0317326295573368357302057924;
vy03=-1.04935750983031990726;
N=1; %Number of orbits
options = odeset(’RelTol’,1e-6);
[t,y] = ode45(’OrbitODEEq’,[0 N*tf1],[x0 0 0 vy01],options);
plot(y(:,1),y(:,2),0,0,’.’,1,0,’.’);
axis([-1.5 1.5 -1.5 1.5]); grid; size(t) %number of steps
options = odeset(’RelTol’,1e-6);
[t,y] = ode45(’OrbitODEEq’,[0 N*tf2],[x0 0 0 vy02],options);
figure; plot(y(:,1),y(:,2),0,0,’.’,1,0,’.’);
axis([-1.5 1.5 -1.5 1.5]);grid; size(t) %number of steps
options = odeset(’RelTol’,1e-6);
[t,y] = ode45(’OrbitODEEq2’,[0 N*tf3],[x03; 0; 0; vy03],options);
figure; plot(y(:,1),y(:,2),0,0,’.’,1,0,’.’);
axis([-1.5 1.5 -1.5 1.5]); grid; size(t) %number of steps
m2 = 0.012277471;
m1 = 1 - m2;
r13 = (((y(1) + m2)^2 + y(2)^2) ^1.5);
r23 = (((y(1) - m1)^2 + y(2)^2) ^1.5);
dydt = [ y(3)
y(4)
(2*y(4) + y(1) - m1*((y(1)+m2)/r13)...
- m2*((y(1)-m1)/r23))
(-2*y(3) + y(2) - m1*(y(2)/r13)...
- m2*(y(2)/r23)) ];
The function OrbitODEEq2 is identical to OrbitODEEq except for the numerical value
of m2 .
A → B (slow)
B+B → B+C (very fast)
B+C → A+C (fast)
The solution of these equations can be computed numerically. This is a difficult system,
however, to integrate, as it has both very fast and slow dynamics. Because of this,
the process has been used as a benchmark for testing the performance of numerical
integrators.
14.2 Preliminaries
14.2.1 Notation
We will investigate the problem of computing a numerical solution to the initial value
problem
ẏ = f (y,t), y(t0 ) = y0 (14.14)
The system has the exact solution y(t), and we would like to compute a numeric solution
which approximates the exact solution with satisfactory accuracy. This will be done
with a time step h so that the solution is computed for (t0 , t1 , . . . , tn , . . . , tN ) where
tn+1 − tn = h. The numerical solution at time tn is denoted yn , while the exact solution
at time tn is denoted y(tn ).
The local error en+1 is the is the difference of the computed solution yn+1 from the local
solution yL (tn ; tn+1 ) at time tn+1 :
The global error En+1 is the error in the computed solution yn+1 relative to the exact
solution y(tn+1 ) at time tn+1 :
The local error en+1 is the error in the solution resulting from the computation from
time tn to tn+1 .The global error En+1 is the error in the solution resulting from the
computation from initial time t0 to tn+1 .
where φ(·) is given by the particular numerical method that is used. We would like our
method to give a small error in some sense when the time step is small. One way of
characterizing different methods is the concept of the order of the method. We say that
the method is of order p if p is the smallest integer so that
Here we have used the order notation O (·) (Lin and Segel 1974). The function φ(x)
satisfies
φ(x) = O[ψ(x)] (14.20)
if there exists a constant C > 0 so that
Example 210 The expression φ(x) = O (xm ) implies that there exists a C > 0 so
that |φ(x)| ≤ C |xm |. Moreover, if C > 0, then Chm = O(hm ), which is implied by
|Chm | ≤ C |hm |.
To investigate the order of a method it is useful to develop the Taylor series expansion
of yL (tn ; tn+1 ) around yn . The Taylor series is given by
where tn ≤ τ ≤ tn+1 . As the local error is en+1 = yn+1 − yL (tn ; tn+1 ), and we arrive at
the following result
hp dp−1 f (yn , tn )
yn+1 = yn + hf (yn , t) + . . . + + O(hp+1 ) (14.23)
p! dtp−1
Analysis of the global error is somewhat more complicated. However, we state without
further analysis that for one-step methods the global error is En+1 = O(hp ).
14.2.4 Linearization
The stability and performance of a one-step method for the numerical integration of
(14.14) can be investigated in terms of the linearized system equations, and in this
section we will see how this can be done. The basic idea is to apply a one-step method
to the linearized system. From basic systems theory it is known that the dynamics of a
linearized system is to a large extent determined by the location of the eigenvalues of the
Jacobian matrix. In the same way, the performance of a one-step method applied to a
linear system can be described by the eigenvalues of the Jacobian in terms of the stability
function of the method. We will first establish the necessary mathematical background
for this.
14.2. PRELIMINARIES 519
Suppose that there is a function R(s), which will be called the stability function, so
that the one-step method gives the numerical solution
(qi )n+1 = R(hλi )(qi )n (14.31)
when applied to (14.29). Then
d
X
∆yn = Rn (hλi )(qi )0 mi (14.32)
i=1
The numerical solution ∆yn of the linearized system (14.27) is stable if the magnitude
of the stability function is less than or equal to unity for all the eigenvalues, that is, if
|R(hλi )| ≤ 1, i = 1, . . . , d (14.33)
ẏ1 = y2 (14.34)
ẏ2 = −γy13 − cy2 (14.35)
which has eigenvalues λ1 = 0 and λ2 = −c. The linearization around a solution y1∗ (t),
y2∗ (t) is
µ ¶ µ ¶µ ¶
∆ẏ1 0 1 ∆y1
= 2 (14.37)
∆ẏ2 −3γ (y1∗ ) −c ∆y2
which gives
r³ ´
c c 2
λ=− ± − 3γ (y1∗ )2 (14.39)
2 2
¡ ¢2
which implies that Re[λ] ≤ 0. We see that for large |y1∗ |, that is when 3γ (y1∗ )2 À 2c ,
then the system becomes oscillatory, while for small |y1∗ | the system is overdamped.
ẏ = λy (14.40)
where R(hλ) is the stability function for the method. Stability of the numerical scheme
is ensured if the difference equation satisfies
This gives conditions on the time-step h and the location of the eigenvalue λ for the
numerical solution to be stable.
14.3. EULER METHODS 521
y n+1
k1 yL (t)
yn
t
tn t n+1
The linear stability of Euler’s method can be investigated with the scalar test system
ẏ = λy (14.45)
R(hλ) = 1 + hλ (14.47)
This is the case if hλ is inside the circle of radius one around −1. For real eigenvalues λ
stability is ensured when
2
− ≤λ≤0 (14.49)
h
or, equivalently,
2
h≤− (14.50)
λ
The region of stability is shown in Figure 14.14.
522 CHAPTER 14. SIMULATION
1.5
h=2.2
0.5 exp(-t)
h=1.5
h= 0.5
0
-0.5 h=2.0
-1
-1.5
0 1 2 3 4 5 6 7 8
Figure 14.8: Calculated solutions for the system ẏ = −y with Euler’s method for four
different time steps h. The exact solution exp(−t) is shown for comparison.
ẏ = −βy 3 (14.52)
ẏ = 0 (14.54)
that is, the test system ẏ = λy with λ = 0. This is stable for all time steps h.
ẏ = −αy (14.57)
14.3. EULER METHODS 523
A largeh |y ∗ | requiresia small h for the stability condition to hold. Here, the eigenvalue is
λ = − α + 3β (y ∗ )2 , and the stability condition for the linearized system is
2
h≤ 2 (14.59)
α + 3β (y ∗ )
To apply Euler’s method, the system must first be brought into the form (14.14). This
can be done by defining y1 = x and y2 = ẋ. This gives
ẏ1 = y2 (14.61)
ẏ2 = F (y1 , y2 ) (14.62)
k1 = f (yn , tn ) (14.65)
k2 = f (yn + hk1 , tn + h) (14.66)
h
yn+1 = yn + (k1 + k2 ) (14.67)
2
To find the order of this method a Taylor series expansion around (yn , tn ) is used. The
Taylor series of k2 is
df h2 d2 f
k2 = f (yn , tn ) + h (yn , tn ) + (yn , tn ) + O(h3 ) (14.68)
dt 2 dt2
This gives the Taylor series
h2 df h3 d2 f
yn+1 = yn + hf (yn , tn ) + (yn , tn ) + (yn , tn ) + O(h4 ) (14.69)
2 dt 4 dt2
The first two terms coincide with the Taylor series expansion of the local solution
yL (tn ; tn+1 ), and the remaining terms are O(h3 ). Comparison with (14.23) leads to
the conclusion that the improved Euler’s method is of order p = 2.
524 CHAPTER 14. SIMULATION
To investigate stability of the method, we apply the method to the test equation
ẏ = λy
This results in
k1 = λyn
k2 = λ (1 + hλ) yn
à !
2
(hλ)
yn+1 = 1 + hλ + yn
2
On the real axis this corresponds to −2/h ≤ λ ≤ 0. The region of stability is shown in
Figure 14.14
ẏ = −αy 3 (14.70)
k1 = −αyn3 (14.71)
3
k2 = −α (yn + hk1 ) (14.72)
h
yn+1 = yn + (k1 + k2 ) (14.73)
2
Example 217 Consider the second order system
which is set in standard form by using y1 = x and y2 = ẋ. Then the differential equation
is written µ ¶ µ ¶
ẏ1 y2
= (14.75)
ẏ2 −γ(y1 )y1 − cy2
The improved Euler’s method gives the integration algorithm
µ ¶ µ ¶
k1,1 y2,n
= (14.76)
k1,2 −γ(y1,n )y1,n − cy2,n
µ ¶ µ ¶
k2,1 y2,n + hk1,2
= (14.77)
k2,2 −γ(y1,n + hk1,1 )(y1,n + hk1,1 ) − c (y2,n + hk1,2 )
h
y1,n+1 = y1,n + (k1,1 + k2,1 ) (14.78)
2
h
y2,n+1 = y2,n + (k1,2 + k2,2 ) (14.79)
2
14.3. EULER METHODS 525
k1 k2
y L (t n)
y n+1
k2
yn
tn t n+1
t
¡ h ¢2
h df d2 f
k2 = f (yn , tn ) + (yn , tn ) + 2
(yn , tn ) + O(h3 ) (14.83)
2 dt 2 dt2
which gives
h2 df h3 d2 f
yn+1 = yn + hf (yn , tn ) + (yn , tn ) + (yn , tn ) + O(h4 ) (14.84)
2 dt 8 dt2
The method is seen to be of order p = 2.
Application of the method to the test systems ẏ = λy gives
µ ¶
h
k2 = λ 1 + λ yn
2
à !
(hλ)2
yn+1 = 1 + hλ + yn
2
which leads to the same stability conditions as for the improved Euler method.
526 CHAPTER 14. SIMULATION
ẏ = f (y, t) (14.85)
is given by
i−1
X
ki = f (yn + h aij kj , tn + ci h), i = 1, . . . , σ
j=1
σ
X
yn+1 = yn + h bj kj
j=1
k1 = f (yn , tn ) (14.86)
k2 = f (yn + ha21 k1 , tn + c2 h) (14.87)
k3 = f (yn + h (a31 k1 + a32 k2 ) , tn + c3 h) (14.88)
..
. (14.89)
kσ = f (yn + h (aσ1 k1 + . . . + aσ,σ−1 kσ−1 ) , tn + cσ h) (14.90)
yn+1 = yn + h(b1 k1 + . . . + bσ kσ ) (14.91)
The equations for k1 , . . . , kσ are called the stage computations. The interpolation pa-
rameters ci , i ∈ {2, . . . , σ} are in the range 0 ≤ ci ≤ 1 and form an increasing sequence,
that is, 0 ≤ c1 ≤ . . . ≤ cσ ≤ 1. The weighting parameters at stage i are denoted
aij , i ∈ {2, . . . , σ}, j ∈ {1, . . . , i − 1}, and satisfy the normalization condition
i−1
X
aij = ci ≤ 1 (14.92)
j=1
In the same way 4 conditions can be found for σ = p = 3, while 8 conditions can be
found for σ = p = 4.
For higher order methods there are certain lower bounds for how many stages that
are needed (Hairer et al. 1993). For order 5 ≤ p ≤ 6, an explicit Runge-Kutta method
must have σ ≥ p + 1 stages. For order p = 7, an explicit Runge-Kutta method must have
σ ≥ p + 2 stages, while to achieve order p ≥ 8, a method with at least σ ≥ p + 3 stages.
0
1 1
1 1
2 2
0
1 1
2 2
0 1
0
1 1
3 3
2 2
3 0 3
1 3
4 0 4
0
1 1
2 2
1 1
2 0 2
1 0 0 1
1 2 2 1
6 6 6 6
m g
p=k ρκ
is filled with air and has a piston of mass m = 200 kg that compresses the air. The
density of the air inside the cylinder is
ma ma
ρ= = (14.97)
Va Ax
where ma is the mass and Va = Ax is the volume of the air. The air is assumed to be
isentropic which implies that the pressure inside the cylinder is
µ ¶κ ³ x ´κ
ρ 0
p = p0 = p0 (14.98)
ρ0 x
where κ = 1.4 and p0 = 2 · 105 N/m2 is the pressure corresponding to a piston position
x0 = 1 m, and the density ρ0 := ma / (Ax0 ) . The total force acting on the piston is
gravity and pressure forces:
³ x ´κ
0
F = −mg + Ap = −mg + Ap0 (14.99)
x
where g = 10 m/s2 . Inserting the numerical values we see that mg = Ap0 , which implies
that when x = x0 the force is F = 0 and the system is at an equilibrium at x = x0 . The
equation of motion can then be written
£ ¤
ẍ + g 1 − x−κ = 0 (14.100)
Euler's method
2.5
2
Position
1.5
RK4
0.5
0
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.11: Position of piston integrated with Euler’s method with h = 0.005 s and
with RK4 with h = 0.1 s.
where µ ¶ µ ¶
x−1 0 1
∆y = , J= ∗ −(κ+1) (14.103)
v −gκ (x ) 0
The eigenvalues of the linearization are found to be
q
λ1,2 = ±jω 0 , ω 0 = gκ (x∗ )−(κ+1) (14.104)
1 1
E= p0 Ax−(κ−1) + mgx + mv 2 (14.106)
κ−1 2
The total energy has its minimum value at the equilibrium state were the energy is
1
Emin = p0 A + mg = 7000 J (14.107)
κ−1
The system was simulated with Euler’s method with time step h = 0.005, and with the
fourth order RK4 method with time step h = 0.1. The result is shown in Figure 14.11.The
solution computed with Euler’s method was unstable even with the very short time step
of 0.005, while the solution with RK4 was stable with a time step that was 20 times larger
than for the Euler solution. To check the accuracy of the solutions the total energy was
computed for the numerical solutions. For the exact solution the total energy will be
constant as there is no energy loss terms in the equation of motion. The solution from
14.4. EXPLICIT RUNGE-KUTTA METHODS 531
9000
8800
8600
8400
Total energy
Euler's method
8200
8000
7800
RK4
7600
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.12: Total energy of solutions computed with Euler’s method and RK4. It is
seen that Euler’s method increases the energy in the system, while RK4 gives a slight
decrease in energy.
Euler’s method gave a steady increase in energy which is not in agreement with the
physics of the system is it has no energy source. The RK4 solution gave a slight decrease
in energy, which means that the RK4 introduced some damping in the system. The
results are shown in Figure 14.12.
The system has eigenvalues ±jω 0 on the imaginary axis, and the stability limit for
RK4 is then h = 2.83/ω 0 , which can be seen from Figure 14.14. As the largest eigenvalue
occurs for ω 0 = 4.3 this indicates that the stability limit would be hmin = 0.65 s. In
simulations it turned out that a slightly smaller value, h = 0.52 s was the stability limit
for this trajectory. This is demonstrated in Figure 14.13. The difference between the
theoretical value and the value found in simulations should be due to the system being
nonlinear.
ẏ = λy
gives
k1 = λyn
..
.
kσ = λ [yn + h (aσ1 k1 + . . . + aσ,σ−1 kσ−1 )]
yn+1 = yn + h (b1 k1 + . . . + bσ kσ )
532 CHAPTER 14. SIMULATION
2.5
h=0.521
2
Position
1.5
0.5 h=0.5
h=0.1
0
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.13: Simulation of peumatic spring usning RK4 for three different step lengths.
T T
In vector notation with κ = (k1 , k2, . . . , kσ ) and 1 = (1, 1, . . . , 1) this can be written
Here κ can be solved from (14.108) and inserted into (14.109), which gives
Then µ ¶
1 + λh2
λh
2
(λh)2
RE (hλ) = det = 1 + λh + (14.113)
− λh
2 1 + λh
2 2
We see that RE (hλ) is a polynomial in hλ of order 2 which is equal to the number of
stages.
Next we will comment on explicit Runge-Kutta methods where the number of stages
equals the order of the method. The local solution yL (tn ; tn+1 ) starting from yL (tn ; tn ) =
yn is given by
yL (tn ; tn+1 ) = eλh yn
A Taylor series expansion of the local solution is therefore
" #
2 3
(hλ) (hλ)
yL (tn ; tn+1 ) = 1 + hλ + + + . . . yn (14.114)
2! 3!
It follows that the stability function for a explicit method of order p satisfies
2 p
(hλ) (hλ)
RE (λh) = 1 + hλ + + ... + + O(hp+1 ) (14.116)
2! p!
The stability function of an explicit Runge-Kutta method with σ stages is a polynomial
in λh of degree less than or equal to the number of stages σ. If the method is of σ = p ≤ 4
stages the stability function must have exactly p terms, and this is only possible if
2 p
(hλ) (hλ)
RE (λh) = 1 + hλ + + ... + when p = σ
2! p!
(λh)2
R(λh) = 1 + λh +
2
which coincides with the Taylor series expansion with two terms. This agrees with the
fact that the method has 2 stages and is of order 2.
534 CHAPTER 14. SIMULATION
Figure 14.14: Regions of stability in s = hλ for the test system ẏ = λy for the explicit
Runge-Kutta methods. ERK(1): Euler’s method, ERK(2): The modified and the im-
proved Euler method, ERK(3): Heun’s third order method, and ERK(4): The fourth
order Rung-Kutta method RK4.
From the definition we see that in an FSAL method gives some savings in computa-
tions as
knσ = kn+1
1 (14.118)
where knσ denotes the last stage in the calculation of yn+1 , and kn+11 denotes the first
stage in the computation of yn+2 . This is the reason for calling such methods First Same
As Last, which is abbreviated to FSAL. In an FSAL method the weighting vector b is
equal to the last row in the stage matrix A.
ẏ = f (y, t) (14.119)
is given by
Figure 14.15: The shaded area shows where the implicit Euler method is stable as a
function of the complex variable s = λh.
k1 = f (yn , tn ) (14.126)
· ¸
h
k2 = f yn + (k1 + k2 ) , tn + h (14.127)
2
h
yn+1 = yn + (k1 + k2 ) (14.128)
2
which is a Lobatto IIIA method of order 2. The Butcher array is
0 0 0
1 1
1 2 2
1 1
2 2
Figure 14.16: The shaded area shows where the trapezoidal rule is stable as a function
of the complex variable s = λh.
note that the equation for yn+1 gives hk1 = yn+1 − yn . Inserting this into the stage
computation gives
· ¸
1 h
yn+1 − yn = hf yn + (yn+1 − yn ) , tn +
2 2
which is simplifies to the following scheme
µ ¶
yn + yn+1 h
yn+1 = yn + hf , tn + (14.134)
2 2
which is called the implicit mid-point rule.
From (14.134) we find that the stability function for the implicit mid-point rule is
hλ
1+ 2
R(λh) = hλ
(14.135)
1− 2
which is identical to the stability function for the trapezoidal rule. Therefore the stability
properties of the two methods are the same for linear time-invariant systems. However it
turns out that for nonlinear systems the implicit mid-point rule has much better stability
properties, as will be seen in the following sections.
0 0 0
1 θ 1−θ
θ 1−θ
As for the trapezoidal rule, the second stage can be written k2 = f (yn+1 , tn+1 ) . Then
the expression for yn+1 can be rewritten in the form
as for explicit methods, where the notation is defined in connection with equations
(14.108) and (14.109). From (14.110) and (14.111) we may conclude as follows:
The stability function for an implicit Runge-Kutta method is given by the two alternative
expressions h i
−1
R(hλ) = 1 + λhbT (I − hλA) 1 (14.142)
h ³ ´i
det I − λh A − 1bT
R(hλ) = (14.143)
det (I − λhA)
From (14.143) it is seen that the stability function for an implicit Runge-Kutta method
is a rational expression in s = λh. We will see in the following that certain properties of
the implicit methods will depend on the degree of the numerator and denominator poly-
nomials in the stability function. In particular it will be shown that the most important
implicit methods have stability functions R(s) given by Padé approximations of es , and
that interesting conclusions can be drawn from this fact. However, first we will present
some implicit methods and a case study.
1 1
2 2
1
0 0 0
1 1
1 2 2
1 1
2 2
540 CHAPTER 14. SIMULATION
2.5
2
Position
1.5
0.5
0
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.17: Position of piston computed with the implicit Runge-Kutta methods Gauss
of order 2, Radau IIA of order 3, Lobatto IIIC of order 2 and the implicit Euler method.
To study how Runge-Kutta methods work for stiff oscillatory systems the pneumatic
spring system was modified to include a mechanical resonance in the mass as shown
14.5. IMPLICIT RUNGE-KUTTA METHODS 541
7900
Gauss, 2
7800
7700
Radau IIA, 3
7600
Lobatto IIIC, 2
7500
Total energy
7400
7200
7100
7000
Equilibrium energy level
6900
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.18: Total energy for the pneumatic system when the solution is computed with
the implicit Runge-Kutta methods. The energy oscillates around the correct value for
the Gauss of order 2, while the energy is numerically dissipated with the methods Radau
IIA of order 3, Lobatto IIIC of order 2 and the implicit Euler method.
in Figure 14.19. This was done by splitting the mass m = 200 kg into two masses
m1 = m2 = 100 kg, which are connected by a spring with stiffness K = m1 ω 22 /2 with
axis along the vertical axis. The position of m1 is denoted x1 and the position of m2 is
denoted x2 . The coordinate x2 is given an offset so that x1 = x2 when the spring force
is zero. The equilibrium energy of this system with two degrees of freedom is the same
as for the one degree of freedom system studied above. The equations of motion are
µ ¶
m −κ ω2
ẍ1 + g 1 − x1 + 2 (x1 − x2 ) = 0 (14.144)
m1 2
ω2
ẍ2 + g + 2 (x2 − x1 ) = 0 (14.145)
2
x1 v1
v1 m −κ
−g(1 − m x ) −
ω 22
y=
f = 2 (x1 − x2 )
x2 ,
1 (14.146)
v2
v2 ω2
−g − 22 (x2 − x1 )
where vi = ẋi is the velocity of the piston. We see that the system has an equilibrium
at x∗1 = 1, v1∗ = 0, x∗2 = 1 − m ∗ ∗
K where ẍi = 0. Linearization around x1 , x2 gives
2
x
m2
K
g
m1
p=k ρκ
Figure 14.19: Pneumatic spring with mechanical resonance in load. The x coordinate of
mass m2 is given an offset so that x1 = x2 when the spring is unloaded.
where
x1 − x∗1 0 1 0 0
m
−g m κ (x∗ −(κ−1)
) −
ω 22
0
ω 22
0
v1
∆y =
x2 − x∗2 , J = 1 2 2
(14.148)
0 0 0 1
v2 ω22 ω2
2 0 − 22 0
This means that the system has the eigenvalues at ±j3.7 as the pneumatic spring, and
in addition a new set of eigenvalues have been introduced at ±j1000.
The system was simulated with RK4 with a time step h = 0.0005 s, where the step
size was selected so that hω 2 = 0.5. The simulation result as shown in Figure 14.20
is fairly accurate, but it is seen from Figure 14.21 that the high frequency motion is
damped out even though there is no damping in the system. The phenomenon is clearly
seen from the plot of the total energy in Figure 14.22 where it is seen that the energy
converges to the energy level of the slow dynamics corresponding to λ1,2 = ±j3.7, which
is the energy that is obtained if x1 = x2 .
The system was then simulated with the implicit methods Gauss of order 2 and
Lobatto IIIC of order 2 with a time step h = 0.05. This gives Nyquist frequency ω N =
π/0.05 = 62.8 rad/s, so that the resonance at 1000 rad/s is well above the Nyquist
frequency. The solution of the Gauss method, which is shown in Figure 14.23 gave no
damping, but the aliasing effect moved the energy of the fast dynamics associated with
the eigenvalues ±j1000 to oscillations with frequency lower than the Nyquist frequency.
This gave a beat phenomenon which is clearly seen in Figure 14.24, while it is seen from
Figure 14.25 that the total energy is constant for the Gauss solution. The Lobatto IIIC
solution gave quick damping of the fast dynamics, and a slight damping of the slow
dynamics. It is seen from Figure 14.25 that the energy associated with the fast dynamics
is dissipated in one step, and the total energy remains on the level of the energy associated
with the slow dynamics.
14.5. IMPLICIT RUNGE-KUTTA METHODS 543
1.25
1.2
1.15
1.05
0.95
0.9
0.85
0.8
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.20: Position of the two masses computed with RK4 with time step h = 0.0005
s.
0.01
0.008
0.006
0.004
Position difference, RK4 solution
0.002
-0.002
-0.004
-0.006
-0.008
-0.01
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.21: Offset equilibrium for the spring between masses one and two computed
with RK4 with h = 0.0005 s. The oscillation is seen to be lightly damped by the
integration method.
544 CHAPTER 14. SIMULATION
10000
9000
8500
Total energy of RK4 solution
Total energy
8000
7500
Total energy of slow dynamics
7000
Equilibrium energy
6500
6000
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.22: Total energy corresponding to the numerical solution computed with RK4
with h = 0.0005 s. It is seen that the energy related to the fast dynamics is slowly
damped out.
λ = σ + jω (14.151)
where σ is the real part and jω is the imaginary part. It is assumed that ω < π/h, that
is, ω is assumed to be less that the Nyquist frequency π/h. The local solution of the test
system is
yL (tn ; tn+1 ) = eλh yn
Consider a system ẏ = µy, which has the local solution
The two systems will give the same local solutions at tn+1 whenever eλh = eµh which is
implied by ³
π π´
µ = λ + j2k = σ + j ω + 2k , k = 0, ±1, ±2, . . . (14.153)
h h
If
π
µ = λ + 2kj , k = ±1, ±2, . . . (14.154)
h
then the system ẏ = µy where Im (λ) > π/h will have the same solution as the system
ẏ = λy where Im (λ) < π/h. This phenomenon is called aliasing.
1.25
Lobatto IIIC, 2 Gauss, 2
1.2
1.15
1.1
1.05
Position
0.95
0.9
0.85
0.8
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.23: Position of the two masses computed with a Gauss method of order 2 and
a Lobatto IIIC method of order 3. The time step was h = 0.05 with both methods.
0.015
Gauss, 2
0.01
0.005
Positon difference
-0.005
-0.01
Lobatto IIIC, 2
-0.015
0 1 2 3 4 5 6 7 8 9 10
Time
Figure 14.24: Offset in position between the two masses calculated with Gauss order 2
and Lobatto IIIC order 2 with h = 0.05 s. The Gauss method gave no damping, but
the energy of the fast dynamics was shifted to frequencies below the Nyquist frequency
ω N = 62.8 rad/s. The Lobatto method damped out the fast dynamics in one step.
546 CHAPTER 14. SIMULATION
10000
Gauss, 2
9500
9000
8500
Total energy
8000 Lobatto IIIC, 2
7500
Total energy of slow dynamics
7000
Equilibrium energy
6500
6000
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time
Figure 14.25: Total energy corresponding to the numerical solution of Gauss order 2 and
Lobatto IIIC order 2. The Gauss method gave a constant total energy in agreement with
the exact solution, while the Lobatto method damped out the energy associated witht
the fast dynamics.
useful property for an integration method if the method was stable for all stable test
systems. This property is called A-stability.
Integration methods that are A-stable will be stable also for systems with very fast
dynamics which in this context are systems that have dynamics which is significantly
faster that the time step h of the integration method. In particular, aliasing can be
problematic for A-stable methods, as high frequency oscillations will appear in the com-
puted solution as an oscillation with frequency below the Nyquist frequency π/h. As the
integration cannot give an accurate computation of such fast dynamics, it may be useful
that the method damp out the fast dynamics. This is the case for L-stable integration
methods.
Example 221 We note that explicit Runge-Kutta methods have stability functions
h ³ ´i
RE (λh) = det I − λh A − 1bT (14.155)
It is clear that |RE (λh)| → ∞ whenever |λ| → ∞, and it follows that an explicit Runge-
Kutta method cannot be A-stable.
(14.110) can be used also for implicit Runge-Kutta methods. Suppose that A is non-
singular, and consider the case where λh tends to infinity. Then if the limit R(∞) :=
lims→∞ R(s) exists, it is given by
h i
−1
R(∞) = lim 1 + sbT (I − sA) 1
s→∞
h i
−1
= lim 1 − sbT (sA) 1
s→∞
= 1 − bT A−1 1 (14.156)
then the weighting vector b is equal to the last row in the stage matrix A. This gives
b = AT eσ (14.158)
Moreover, from (14.159) we may conclude that a stiffly accurate method will damp
out dynamics corresponding to eigenvalues λi that are large in the sense that |λi h| are
much larger that unity. Consider the case where a stiffly accurate method is applied to a
stiff system, and the time step h is selected in the dynamic range of the slow dynamics.
Then the fast dynamics will have eigenvalues so that |λi h| À 1. The fast dynamics will
therefore be damped out, and the solution will mainly correspond to the slow dynamics.
In particular, if there is an eigenvalue λj so that |λj h| → ∞, then the dynamics associated
with this eigenvalue will be damped to zero.
Example 222 It is clear that a Gauss method cannot be stiffly accurate as for these
methods |R(jω)| = 1 for all ω.
The last row in A is equal to bT , but the matrix A is singular. Thus the method is not
stiffly accurate. This agrees with the fact that the stability function is
R(s) = 1 + sbT (I − sA)−1 1
" Ã !µ ¶#
s ¡ ¢ 1 0 1
= 1+ 1 1 s
1
2 2
1− 2s 1− 2s 1
s
1+ 2
= s
1− 2
k
0 1 2 3
s2 s2 s3
0 1 1+s 1+s+ 2! 1+s+ 2! + 3!
1 1+ 12 s 1+ 23 s+ 16 s2 1+ 34 s+ 14 s2 + 24
1 3
s
m 1 1−s 1− 12 s 1− 13 s 1− 14 s
1 2 3 2 1 3
1 1+ 13 s 1+ 12 s+ 12 s 1+ 35 s+ 20 s + 60 s
2 2
1− 23 s+ 16 s2 1− 12 s+ 121 2
s 1− 25 s+ 201 2
s
1−s+ s2!
1 2 2 3
1 1+ 14 s 1+ 25 s+ 20 s 1+ s2 + s10 + 120
s
3 2 3
1− 34 s+ 14 s2 − 24
1 3
s 1− 35 s+ 20
3 2
s − 601 3
s 2 s3
1−s+ s2! − s3! 1− s2 + s10 − 120
k
Table 14.2: The Padé approximations Pm (s) for m, n = 0, 1, 2, 3
k
0 1 2 3
0 Euler’s method Mod. Euler Heun’s, 3
m 1 Radau, 1 Gauss, 2, Trapez.
2 Lobatto IIIC, 2 Radau, 3 Gauss, 4
3 Lobatto IIIC, 4 Radau, 5 Gauss, 6
k
Table 14.3: Methods that have Pade approximations Pm (s) as stability functions.
where m ≤ σ and k ≤ σ.
One particular rational approximation of the exponential function is the Padé ap-
proximation (Golub and van Loan 1989).
k
The Padé approximation Pm (s) of the exponential function es is a rational function of s
with a numerator of degree k and a denominator of degree m. The Padé approximation
k
Pm (s) of es is the rational approximation of es which has the highest order in s when
the numerator is of order k and the denominator is of order m.
k
The Padé approximation Pm (s) is given by
k Qmk (s)
Pm (s) = (14.163)
Qkm (−s)
where
Xk
k! (m + k − i)! si
Qmk (s) = 1 + (14.164)
i=1
(k − i)! (m + k)! i!
1 + 12 s s2 s3
= 1 + s + + + O(s4 )
1 − 12 s 2 4
s3
where the error is 6 + O(s4 ).
This is derived using order stars in (Hairer and Wanner 1996). Moreover, in relation to
k
L-stability it is interesting to study Pm (jω). From Table 14.2 it is seen that the Padé
approximations where the degree of the numerator polynomial equals the denominator
polynomials satisfy
m
|Pm (jω)| = 1, for all ω (14.166)
whereas for Padé approximations where the degree of the numerator polynomial is less
than the degree of the denominator polynomials we have
k
|Pm (jω)| → 0, when ω → ∞ for m > k (14.167)
is L-stable.
Example 226 The Gauss methods, including the implicit mid-point rule, the Lobatto
IIIA, including the trapezoidal rule, and the Lobatto IIIB have stability functions
m
R(s) = Pm (s) (14.170)
Example 227 Radau methods and Lobatto IIIC methods have stability functions
k
R(s) = Pm (s), k <m≤k+2 (14.171)
-1
-2
-3
-4
-5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time
where R(s) appear in yn+1 = R(λh)yn when the method is applied to the test equation
ẏ = λy. To study the performance of Runge-Kutta methods it is of interest to plot |R(s)|
as a function of the complex variable s. One approach to this is to plot the order stars of
a method (Hairer and Wanner 1996), which are contour plots of |R(s)/es in the complex
plane. We will follow a different approach in the following where we plot the magnitude of
R(s) for the imaginary axis s = jω, and for s = σ for −∞ < σ ≤ 0 which is the negative
part of the real axis. We note that for s = λh the Nyquist frequency is found at s = ±jπ.
The absolute value |R(jω)| of the stability function evaluated on the imaginary axis is
shown for explicit Runge-Kutta methods in Figure 14.28, and for implicit Runge-Kutta
552 CHAPTER 14. SIMULATION
-1
-2
-3
-4
-5
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time
methods in Figure 14.29. The absolute value of the stability function evaluated on the
negative part of the real axis is shown in Figures 14.30 and 14.31.
A special case occurs when R(λh) has a zero, that is, when there is a λz (h) so that
R(λz h) = 0. This results in a dead-beat response
In this section we will take a closer look at the stability functions for the Runge-Kutta
methods that have the Padé approximations as their stability functions. To simplify
notation we use s = λh. The explicit methods of order p ≤ 4 with σ = p stages have
stability functions
1+s when p = 1
s2
1+s+ 2 when p = 2
R(s) = Pp0 (s) = s2 s3
1 + s + + when p = 3
2
2 3 6 4
1 + s + s2 + s6 + 24 s
when p = 4
s1 = −1 when p = 1
s1,2 = −1 ± j when p = 2
s1,2 = −0.7020 ± j1.8073, s3 = −1.5961 when p = 3
s1,2 = −0.2706 ± j2.5048, s3,4 = −1.7294 ± j0.8890 when p = 4
To study the performance of the method when the test equation has a pole λ = jω on
the imaginary axis we insert s = jω in the stability function and get R(jω). It is seen
that for all the explicit Runge-Kutta methods, |R(jω)| → ∞ when ω → ∞.
14.6. STABILITY OF RUNGE-KUTTA METHODS 553
2
10
RK4
Improved
Euler
1
10 Heun Euler's method
Gain of stability function R(s)
0
10
π
-1
10
-1 0 1 2
10 10 10 10
Frequency
Figure 14.28: Stability function R(jω) of explicit Runge-Kutta methods evaluated for
λh = jω. The Nyquist frequency ω N is plotted at ω N h = π.
1
10
0 π
10
Gain of stabiltiy function R(s)
−1
10 R7
L2 L4 R3 R5
−2
10
−1 0 1 2
10 10 10 10
Frequency
Figure 14.29: Stability function R(jω) of implicit Runge-Kutta methods evaluated for
λh = jω. The Nyquist frequency ω N is plotted at ω N h = π. The methods are seen to
damp out frequency components over the Nyquist frequency. The Radau methods have
a roll-off of -1, and the Lobatto IIIC methods have a roll-off of -2.
554 CHAPTER 14. SIMULATION
2
10
1
10
Gain of stability function R(s)
0 π
10
Heun
RK4
-1
10 Euler's
method
exp(-s)
Impr.
Euler
-2
10
-2 -1 0 1 2
10 10 10 10 10
-s on real axis
Figure 14.30: Absolute value of stability function |R(−s)| of explicit Runge-Kutta meth-
ods evaluated for λh = −s. The exact value exp(−s) is plotted for comparison.
1
10
0 π
10
Gain of stability function R(s)
Gauss
-1
10
Radau
-2
10
Lobatto
exp(-s)
-3
10
-1 0 1 2 3
10 10 10 10 10
-s on real axis
Figure 14.31: Absolute value of stability function |R(−s)| of implicit Runge-Kutta meth-
ods evaluated for λh = −s. The exact value exp(−s) is plotted for comparison. The
Radau and Lobatto IIIC have a roll-off for −s large, while |R(−s)| → 1 when −s → ∞
for the Gauss methods.
14.6. STABILITY OF RUNGE-KUTTA METHODS 555
s1 = −2 when σ = 1
s1,2 = −3 ± j1.7321 when σ = 2
s1,2 = −3.6778 ± j3.5088, s3 = −4.6444 when σ = 3
It is quite interesting to study the stability function of Gauss methods for s = jω. Then,
for p = 1 we see that ¯ ¯
¯ 1 + 12 jω ¯
|R(jω)| = ¯¯ ¯=1
1 − 1 jω ¯ 2
There is no zero in R(s) for σ = 1, while there is a zero in s = −3 for σ = 2. For Radau
IIA with σ = 1 ½
1 when ω ¿ ω R1
|R(jω)| = 1
ω when ω À ω R2
The Lobatto IIIC methods of order p = 2σ − 2 have stability functions
( 1
2 when σ = 2
σ−2 1−s+ s2!
R(s) = Pσ (s) = 1
1−s+ 1 s2 − 1 s3
when σ = 3
2 6
For σ = 2 we have ½
1 when ω ¿ ω L1
|R(jω)| = 1
ω2 when ω À ω L2
14.6.8 AN-stability
Before we turn our attention to the nonlinear stability analysis of Runge-Kutta methods
we will present an intermediate result on linear time-varying systems. In this connection
the linear time-varying test system
ẏ = λ(t)y
will be used. The exact solution for linear time-varying test system satisfies
·Z tn+1 ¸
y(tn+1 ) = y(tn )exp λ(t)dt
tn
556 CHAPTER 14. SIMULATION
It is clear that the system is stable in the sense that |y(tn+1 )| ≤ |y(tn )| if Re [λ(t)] ≤ 0
for all t ∈ [tn , tn+1 ].
An implicit Runge-Kutta method for this system can be written
κ = Λ (1yn + hAκ) (14.173)
yn+1 = yn + hbT κ (14.174)
where κ = (k1 . . . kσ )T and 1 = (1 . . . 1)T and
Λ =diag (λ1 , . . . , λσ ) , λi = λ(tn + ci h) (14.175)
−1
Equation (14.173) gives κ = (1 − hΛA) Λ1yn , and insertion into (14.174) gives
yn+1 = RAN (hΛ)yn
where we have defined the stability function
−1
RAN (hΛ) = 1 + bT (I − hΛA) hΛ1 (14.176)
It is seen that if λ2 = 0 and λ1 is large, then |RAN (hΛ)| > 1, and the method is not AN
stable.
Example 229 Cramer’s rule can be used to find the function RAN (hΛ) defined in
(14.176) in the same way as the stability function R(hλ). This gives
h i
det I − (A − 1bT )hΛ
RAN (hΛ) = (14.178)
det (I − AhΛ)
In Lobatto IIIA the first row of A and the last row of A − 1bT have only zeros. This
means that the numerator of RAN (hΛ) is not a function of λσ , and the denominator of
RAN (hΛ) is not a function of λ1 . This means that if λ2 = . . . = λσ = 0, then |RAN (hΛ)|
can be made arbitrarily large by selecting a large |λ1 | . This means that Lobatto IIIA is
not AN-stable.
Example 230 In Lobatto IIIB the last column of A and the first column of A − 1bT
have only zeros. This means that the numerator of RAN (hΛ) is not a function of λ1 ,
and the denominator of RAN (hΛ) is not a function of λσ . This means that if λ1 = . . . =
λσ−1 = 0, then |RAN (hΛ)| can be made arbitrarily large by selecting a large |λσ | . This
means that Lobatto IIIB is not AN-stable.
14.6. STABILITY OF RUNGE-KUTTA METHODS 557
14.6.9 B-stability
Using the concept of B-stability it is possible to analyze the stability of Runge-Kutta
methods for contracting nonlinear systems. For such systems we will see that the stability
of Runge-Kutta methods can be studied in terms of a simple algebraic condition on the
Runge-Kutta parameters A and b.
Consider the nonlinear systems
ẏ = f (y, t) (14.179)
Suppose that the system is contracting, which means that there exists a positive definite
symmetric matrix P and a constant γ ≥ 0 so that
e )T P [f (y, t) − f (e
(y − y e)T P (y − y
y, t)] ≤ −γ (y − y e) , e
∀y, y
e )T [f (y, t) − f (e
(y − y e )T (y − y
y, t)] ≤ −γ (y − y e)
and that a numerical solution is computed using a Runge-Kutta method. Then, if the
computed solutions yn+1 starting from yn and yen+1 starting from y
en satisfies the con-
dition
en+1 k ≤ kyn − y
kyn+1 − y en k
then the Runge-Kutta method is said to be B-stable.
ẏ = λ(t)y (14.181)
558 CHAPTER 14. SIMULATION
1
V = (y − ỹ)2 ⇒ V̇ = (y − ỹ)λ(t)(y − ỹ) (14.182)
2
It follows that if Re λ(t) ≤ 0 for all t, then the linear time invariant test equation (14.181)
is contracting. Therefore, if a B-stable method is used the numerical solutions will satisfy
|yn+1 − ỹn+1 | ≤ |yn − ỹn |. As ỹ(t) = 0 is a solution it follows that a B-stable method will
also be AN-stable. We may then conclude that
c A
bT
This is shown as follows (Hairer et al. 1993): First we make a change of variables in
the Runge-Kutta methods and write
σ
X
Yi = yn + h aij f (Yj , tn + cj h) , i = 1, . . . , σ (14.186)
j=1
Xσ
yn+1 = yn + h bi f (Yi , tn + ci h) (14.187)
i=1
14.6. STABILITY OF RUNGE-KUTTA METHODS 559
en by
Then we denote the differences between the two solutions yn and y
∆yn en , ∆yn+1 = yn+1 − y
= yn − y ei
en+1 , ∆Yi = Yi − Y
h ³ ´i
∆fi = h f (Yi , tn + ci h) − f Ye i , tn + ci h
e i is a vector corresponding to
where Yi is a vector corresponding to the vector yn , and Y
en . Subtraction of the Runge-Kutta equations for the solution y
the vector y en from the
equations of yn gives
σ
X
∆Yi = ∆yn + aij ∆fj
j=1
Xσ
∆yn+1 = ∆yn + bi ∆fi
i=1
Then, we have
σ
X
T T
(∆yn+1 ) ∆yn+1 = (∆yn ) ∆yn + 2 bi (∆fi )T ∆yn
i=1
σ X
X σ
+ bi bj (∆fi )T ∆fj
i=1 j=1
σ
X σ
X
T T
= (∆yn ) ∆yn + 2 bi (∆fi ) ∆Yi − aij ∆fj
i=1 j=1
σ X
X σ
+ bi bj (∆fi )T ∆fj
i=1 j=1
σ
X
T T
= (∆yn ) ∆yn + 2 bi (∆fi ) ∆Yi
i=1
σ X
X σ
T
− mij (∆fi ) ∆fj (14.188)
i=1 j=1
Table 14.4: Order and stability properties for some important Runge-Kutta methods.
b
c b
A
b
bT
bn . Then the
of order pb = p + 1. The computation of the value at tn+1 starts with yn = y
14.7. AUTOMATIC ADJUSTMENT OF STEP SIZE 561
bn+1 + b
yL (tn ; tn+1 ) = yn+1 + en+1 = y en+1
where en+1 = O(hp+1 ) is the local error in the computation of yn+1 , and b
en+1 = O(hp+2 )
is the local error in the computation of ybn+1 . Because b
en+1 is of higher order in h than
en+1 , we can find an estimate of en+1 from
The step size can then be adjusted to achieve a specified accuracy in the local error en+1 .
The estimated local error en+1 is an estimate of the local error of the lower order
solution yn+1 . However, the solution ybn+1 is more accurate, so it makes more sense to
use ybn+1 as a starting point for the next time step. The use of y
bn+1 instead of yn+1 is
called local extrapolation, and is normally used. When local extrapolation is used then
yn+1 will be used to denote the high order solution, while ybn+1 denotes the embedded
low order solution.
To make the computations efficient, the two methods are usually designed so that
c =b
c and A =A.b Then the stage computations will be the same in both methods, and
b is said to be an embedded solution in this case.
need only be done once. The solution y
The algorithm is
k1 = f (yn , tn ) (14.191)
..
. (14.192)
kσ = f (yn + h (aσ1 k1 + . . . + aσ,σ−1 kσ−1 ) , tn + cσ h) (14.193)
yn+1 = yn + h(b1 k1 + . . . + bσ kσ ) (14.194)
bn+1
y = yn + h(bb1 k1 + . . . + bbσ kσ ) (14.195)
en+1 bn+1 − yn+1
= y (14.196)
c A
y bT
b
y bT
b
e ET
b − b.
where E = b
Runge-Kutta-Fehlberg 4(5) is a method where y is computed with order p = 4 using
b is of order p = 5 and is computed using six stages.
five stages. The embedded solution y
The method is optimized for accuracy in the fourth order solution yn+1 . The method is
562 CHAPTER 14. SIMULATION
0
1 1
4 4
3 3 9
8 32 32
12 1932
13 2197 − 7200
2197
7296
2197
439 3680 845
1 216 −8 513 − 4104
1 8
2 − 27 2 − 3544
2565
1859
4104 − 11
40
25 1408 2197
y 216 0 2565 4104 − 15
16 6656 28561 9 2
yb 135 0 12825 56430 − 50 55
1 128 2197 1 2
∆e 360 0 − 4275 − 75240 50 55
0
1 1
5 5
3 3 9
10 40 40
4 44
5 45 − 56
15
32
9
8 19372
9 6561 − 25360
2187
64448
6561 - 212
729
9017
1 3168 − 355
33
46732
5247
49
176
5103
− 18656
35 500 125
1 384 0 1113 192 − 2187
6784
11
84
35 500 125
y 384 0 1113 192 − 2187
6784
11
84
5179 7571 393 92097 187 1
yb 57600 0 16695 640 − 339200 2100 40
71 71 71 17253 22 1
∆e 57600 0 − 16695 1920 − 339200 525 − 40
0
1 1
2 2
3 3
4 0 4
2 1 4
1 9 3 9
21 1 3 1
y 72 4 9 8
2 1 4
yb 9 3 9
5 1 1
∆e − 72 12 9 − 18
14.8. IMPLEMENTATION ASPECTS 563
1
ln hnew = ln h − (ln εn+1 − ln etol ) (14.198)
p+1
This can be compared with an incremental form of a PI controller
h
un+1 = un − Kp (en − en−1 ) − Kp en (14.199)
Ti
One may compare the adjustment formula with an I controller. Proportional action is
included using
h
ln hnew = ln h − Kp (ln εn+1 − ln εn ) − Kp (ln εn+1 − ln etol ) (14.200)
Ti
which gives the adjustment formula
µ ¶Kp Th µ ¶Kp
etol i εn
hnew = h (14.201)
εn+1 εn+1
which is simplified to
³ ´
µ ¶Kp 1+ Th µ ¶Kp
etol i εn
hnew = h (14.202)
εn+1 etol
yn+1 = yn + d1 z1 + . . . + dσ zσ (14.204)
where
(d1 , . . . , dσ ) = (b1 , . . . , bσ ) A−1 (14.205)
In particular, if aσi = bi then
yn+1 = yn + zσ (14.206)
is the Jacobian evaluated at (yn , tn ). The initial value for the iterations is Z0 = 0.
To solve for Zi+1 , a Gaussian elimination is used where the LU decomposition of H is
needed. The reason for using the approximation of a constant J is that this makes it
possible to use only one LU decomposition at each time step. Details on how to do the
Gaussian elimination is given in (Golub and van Loan 1989) where also algorithms are
included.
In some situations it is not sufficient to have the function values only at the time-steps.
The reason for this is that for some systems it is very important to detect the exact
time of certain events. In particular this is important for systems with discontinuities
in f (y,t). In addition it may be desirable to have function values between the timesteps
for plotting. The solution to this problem is to use an interpolation scheme where an
interpolation yn (α) is computed so that
This can be done by using the original stage computations of the Runge-Kutta method,
possibly with some additional stages, and then interpolating the solution by interpolat-
ing the weighting factors bj . The resulting scheme is called a continuous Runge-Kutta
method .
∗
The dense outputs are of order p∗ if yn (α)−yL (tn ; tn +αh) = O(hp +1
), where yL (tn ; tn +
αh) is the local solution starting at yL (tn ; tn ) = yn .
For the Dormand-Prince 5(4) method, which is the numerical integration method of
the ode45 in MATLAB, a dense output with order 4 can be computed with the original
stage computations using Hermite interpolation (Dormand and Prince 1986), (Hairer
566 CHAPTER 14. SIMULATION
et al. 1993). The weighting factors of the method are given by the Hermite polynomials.
Note that bj (0) = 0, and that bj (1) = bj , where bj are the coefficients of the fifth order
solution in the Dormand-Prince 5(4) method. It is therefore clear that yn (0) = yn
and yn (1) = yn+1 . In addition, it can be shown that the time derivatives of the dense
solutions satisfy ẏn (0) = hf (yn , tn ) and ẏn (1) = f (yn+1 , tn+1 ). This means that the
dense outputs and their derivatives are continuous at the time-steps tn .
g(y,t) = 0 (14.220)
The event can then be detected by computing the numerical solution yn and for each
step check if there is a change of sign from g(yn ,tn ) to g(yn+1 ,tn+1 ). If there is a change
in sign, then the dense output yn (α) is used to find the time of event by solving
Example 233 One example of this is in robotics where the equation of motion is of the
form
M(q)q̈ + C (q, q̇) q̇ + g(q) = τ
where q is the vector of generalized coordinates and τ is the vector of input general-
ized forces. The matrix M, which is called the inertia matrix is positive definite and
symmetric. The system can be written
µ ¶
I 0
u̇ = φ(u)
0 M(q)
where µ ¶ µ ¶
q q̇
u= , φ(u) =
q̇ −C (q, q̇) q̇ − g(q) + τ
The system could have been written in the form that has been used so far, that is,
µ ¶
q̇
ẏ = f (y) = −1
M (q) [−C (q, q̇) q̇ − g(q) + τ ]
Then the evaluation of f (y) would involve a computationally expensive Gauss elimination.
Therefore it is advantageous to leave the system in the form (14.222) and do a slight
modification to the Runge-Kutta algorithm.
14.9 Invariants
14.9.1 Introduction
The material presented on linear and quadratic invariants in this section is based on
(Hairer 1999), while the section of Hamiltonian systems is based on (Sanz-Serna and
Calvo 1994) and (Hairer 1999).
that
wT ki = 0 (14.226)
and
σ
X
wT yn+1 = wT yn + h bj wT kj = wT yn (14.227)
j=1
We see that linear invariants will be conserved when the solution is computed with
any Runge-Kutta method.
∂V (y)
V̇ (y) := ẏ = yT Pf (y, t) (14.234)
∂y
then for the quadratic function V (y) = (1/2)yT Py with time derivative V̇ (y) along the
solutions of the system, the following result apply:
σ
X
V (yn+1 ) = V (yn ) + 2 bi V̇ (Yi ) (14.236)
i=1
where Yi is the function value for y corresponding to stage i as defined in (14.186). This
means that if bi ≥ 0, then
where equations (14.186) and (14.187) are used, and the calculation is done along the
lines of (14.188). The computed solution yn+1 will then result in an increasing V (yn+1 )
if V [y (t)] is increasing for the exact solution y (t), it will result in an invariant V (yn+1 )
if V [y (t)] is an invariant, and it will give a decreasing V (yn+1 ) if V [y (t)] is a decreasing
function for the exact solution.
Method eigenvalues of M
Implicit Euler 1
Gauss order 2 (Implicit midpoint rule) 0
Gauss methods of any order 0, . . . , 0
Radau IA order 3 0, 0.1250
Radau IIA order 3 0, 0.5
Lobatto IIIA order 2 (Trapezoidal rule) −0.25, 0.25
Lobatto IIIB order 2 −0.25, 0.25
Lobatto IIIC order 2 0, 0.5
and (gi )k is element k of the vector gi . As it is assumed that V̇ (y) = 0, ∀y, it follows
from (14.241) that
Xd
T
yn+1 Pyn+1 = ynT Pyn − h2 vkT Mvk
k=1
We recall that a quadratic form can be expressed in term of the eigenvalues of the matrix
according to
X σ
vkT Mvk = λi (M) α2k (14.244)
i=1
where the scalars α2kdepend on M and vk . Therefore the quadratic form is positive if all
the eigenvalues λi (M) of M are positive, the quadratic form is zero if all the eigenvalues
are zero, and the quadratic form is negative if all the eigenvalues are negative. We
conclude that
Let V be the quadratic function V = (1/2)yT Py with symmetric and positive P, and
let λi (M) be an eigenvalue of M = {mij }, where mij is defined in (14.235). Then
Table 14.5 shows the eigenvalues of M for some implicit Runge-Kutta methods, while
Table 14.6. shows the eigenvalues for some explicit methods. The eigenvalues were
computed using the Symbolic Math Toolbox in MATLAB using a script like the one
shown below which computes the eigenvalues for the Lobatto IIIC method.
syms A b M;
A=[1 -1; 1 1]/2;
b=[1 1]’/2;
14.9. INVARIANTS 571
Method eigenvalues of M
Euler’s method −1
Improved Euler −0.5, 0
Modified Euler −1.2, 0.2
Heun’s method of order 3 −0.89, −0.06, 0.3
RK4 −0.27, −0.1, 0, 0.1
M=diag(b)*A+A’*diag(b)-b*b’
eig(M)
Example 235 In the description of rigid body motion the rotation can be described using
Euler parameters µ ¶
η
y= (14.248)
²
where η = cos θ2 , ² = ksin θ2 , and k is a unit vector has the quadratic invariant
yT y = 1 (14.249)
These parameters are used e.g. in strap-down inertial navigation systems. The Euler
parameters satisfy the differential equation
µ ¶ µ ¶
η̇ 1 ωT ²
= (14.250)
²̇ 2 ηω + S (²) ω
where S (²) is the skew-symmetric form of ² and ω is the angular velocity vector of the
rigid body. The invariant yT y = 1 will hold when the system is integrated with a Runge-
Kutta method with mij = bi aij + bj aji − bi bj = 0. In applications it is usual to integrate
with an explicit method and a projection
y
y := (14.251)
|y|
are in the phase space Ω ⊂ R2d , that is (p, q) ∈ Ω ⊂ R2d . The Hamiltonian system of
differential equations with Hamiltonian H is given by
dpi ∂H dqi ∂H
=− , = , i = 1, . . . , d
dt ∂qi dt ∂pi
We note that H = H (p, q) , which means that the Hamiltonian is not a function of
time, then the Hamiltonian is an invariant of the Hamiltonian system, which is seen from
∂H dpi ∂H dqi
Ḣ = + =0 (14.253)
∂pi dt ∂qi dt
We define µ ¶
p
y=
q
Then the Hamiltonian system can be written
d
y = J−1 ∇H
dt
where µ ¶ µ ¶
0 I 0 −I
J= , J−1 = JT =
−I 0 I 0
is a skew-symmetric matrix and à !
∂
∂p
∇= ∂
∂q
divẏ = ∇T J−1 ∇H = 0
Xd µ ¶ X d µ ¶
∂ dpi ∂ dqi ∂2H ∂2H
divẏ = + = − + =0
i=1
∂pi dt ∂qi dt i=1
∂qi ∂pi ∂pi ∂qi
Let y = y(t) be the state of a Hamiltonian system at time t, and let y∗ = y(t∗ ) be
the state at time t∗ . Then a fundamental property of Hamiltonian systems is that
µ ¶T µ ¶
∂y∗ ∂y∗
J =J (14.254)
∂y ∂y
where µ ¶ Ã !
∂p∗ ∂p∗
∂y∗ ∂p ∂q
= ∂q∗ ∂q∗ (14.255)
∂y ∂p ∂q
q̇ = p, ṗ = −ω 20 q (14.256)
We see that
Ḣ = pṗ + ω 20 q q̇ = −ω 20 qp + ω 20 qp = 0 (14.258)
Then, as H is a quadratic invariant for this system, it follows that a Runge-Kutta method
satisfying
T
M =diag (b) A + AT diag(b) − bb = 0
will result in
Hn+1 = Hn (14.259)
Consider the sensitivity function
∂y(t)
Ψ(t) := (14.260)
∂y0
which gives the sensitivity of the true solution y (t) with respect to the initial condition
y (0) = y0 . We see that Ψ ∈ R2d×2d . The time derivative of the sensitivity when the
system evolves is found from the computation
µ ¶
d d ∂y(t) ∂ dy(t) ∂f (t) ∂f (t) ∂y(t)
Ψ(t) = = = = (14.261)
dt dt ∂y0 ∂y0 dt ∂y0 ∂y(t) ∂y0
to be
∂f
Ψ̇ =
Ψ (14.262)
∂y
If a Runge-Kutta method is applied to this equation, the computational scheme is given
by
∂f
K1 = (Ψn + h (a11 K1 + . . . + a1σ Kσ ) , tn + c1 h) (14.263)
∂y
..
. (14.264)
∂f
Kσ = (Ψn + h (aσ1 K1 + . . . + aσσ Kσ ) , tn + cσ h) (14.265)
∂y0
Ψn+1 = Ψn + h(b1 K1 + . . . + bσ Kσ ) (14.266)
where Ki , i = 1, . . . , σ are matrices of the same dimension as Ψ. Suppose that the same
Runge-Kutta method is applied to the system ẏ = f (y, t) , and that the solution at time
tn+1 is computed to be yn+1 . Then the sensitivity of the computed solution is found to
be given by
µ ¶
∂k1 ∂f ∂yn ∂k1 ∂kσ
= ( + h a11 + . . . + a1σ , tn + c1 h) (14.267)
∂y0 ∂y ∂y0 ∂y0 ∂y0
..
. (14.268)
µ ¶
∂kσ ∂f ∂yn ∂k1 ∂kσ
= ( + h aσ1 + . . . + aσσ , tn + cσ h) (14.269)
∂y0 ∂y ∂y0 ∂y0 ∂y0
µ ¶
∂yn+1 ∂yn ∂k1 ∂kσ
= + h b1 + . . . + bσ (14.270)
∂y0 ∂y0 ∂y0 ∂y0
Comparison with (14.263—14.266) shows that
∂yn+1
= Ψn+1 (14.271)
∂y0
574 CHAPTER 14. SIMULATION
as
V (Ψ) = ΨT JΨ = J (14.275)
holds for the exact solution, which shows that V (Ψ) is a quadratic invariant.
This means that for a Runge-Kutta method with mij = 0, which is the case for the
Gauss methods, the numerically computed solution will be symplectic, and hence it must
be the solution of a Hamiltonian system with a Hamiltonian that we denote H ∗ . For small
time-steps and a smooth Hamiltonian H, the Hamiltonian system described by H ∗ will
have solutions that are close to the solutions of the Hamiltonian system described by H.
From Tables 14.5 and 14.6 we may conclude that the quadratic invariant V (Ψ) will
decrease for methods like Radau IA, Radau IIA, and Lobatto IIIC, while it will increase
for methods like Euler’s method, Modified Euler, and improved Euler. For methods like
Lobatto IIIA, Lobatto IIIB, Heun’s method of order 3, and RK4 the invariant V (Ψ) may
decrease or increase.
ẏ = f (y, t) (14.276)
where J is the Jacobian given by J =∂f (yn , tn )/∂y, the interpolation constants satisfy
P
ci = i−1
j=1 aij as for the Runge-Kutta methods, and
i
X
ρi = ρij
j=1
The first term on the right side of the stage computations has the same form as the
stage in an explicit Runge-Kutta method. A linearized term is added to the stage, which
14.10. ROSENBROCK METHODS 575
makes the method implicit. However, while a Newton search is required at each time step
to compute the stages in an implicit Runge-Kutta method, the stage computations in a
Rosenbrock method can be done without iterations according to the formula
i−1
X
Vi ki = f (yn + h aij kj , tn + ci h)
j=1
i−1
X
+hJ ρij kj + ρi hḟ (yn , tn ) (14.277)
j=1
where
Vi = I−hρii J
is a nonsingular matrix for a sufficiently small time step h.
For the test equation
ẏ = λy
a Rosenbrock method gives
κ = λ (1yn + hλ(A + R)κ)
yn+1 = yn + hbT κ
where κ = (k1 . . . kσ )T , 1 = (1 . . . 1)T and R = {ρij }.
It is seen that Rosenbrock methods can have the same type of stability function as an
implicit Runge-Kutta method of the diagonally implicit type, which are implicit method
with aij = 0 for i > j. The main advantage with Rosenbrock methods is that they can
be used for stiff systems without Newton iterations in the stage computations.
A second order method with L-stability developed by Wolfbrandt is given by
Vk1 = f (yn )
2 4
Vk2 = f (yn + hk1 ) − √ hJk1
3 3(2 + 2)
h
yn+1 = yn + (k1 + 3k2 )
4
where
1
√ hJ
V = I−
2+ 2
A modified second order Rosenbrock method with step size control is given by
Vk1 = f (yn , tn ) + hρḟ (yn , tn )
µ ¶
h h
Vk2 = f (yn , tn ) + f yn + k1 , tn + − k1 + hρḟ (yn , tn )
2 2
yn+1 = yn + hk2
1
V = I − hρJ, ρ = √
2+ 2
576 CHAPTER 14. SIMULATION
as a starting point. The idea is to calculate a numerical solution from the approximation
Z tn+1
yn+1 = yn + P(t)dt
tn
∇yn = yn − yn−1
14.11. MULTISTEP METHODS 577
0.5
-0.5
-1
-1.5
0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5
P(t) f n-2
f n+1-q f n-1 fn
fn+2-q
yn+1-yn
where Z 1
α(α + 1) . . . (α + m − 1)
γm = dα
0 m!
It can be shown that γ m can be found recursively from the recurrence equation
1 1
γ m + γ m−1 + . . . + γ =1
2 m+1 0
The numerical values for γ m are found from the recurrence equation to be
m 0 1 2 3 4
1 5 3 251
γm 1 2 12 8 720
The numerical algorithms are found by inserting the expression for the backwards
difference operator. The algorithms are
yn+1 = yn + hfn
µ ¶
3 1
yn+1 = yn + h fn − fn−1
2 2
µ ¶
23 4 5
yn+1 = yn + h fn − fn−1 + fn−2
12 3 12
µ ¶
55 59 37 9
yn+1 = yn + h fn − fn−1 + fn−2 − fn−3
24 24 24 24
We see that the first order explicit Adams method is Euler’s method.
where Z 1
(α − 1)α(α + 1) . . . (α + m − 2)
γ ∗m = dα
0 m!
Numerical values are
m 0 1 2 3 4
γ ∗m 1 − 12 1
− 12 1
− 24 19
− 720
14.11. MULTISTEP METHODS 579
yn+1 -y n
In this method, the numerical solution at tn+1 is generated by requiring the polynomial
P(t) to satisfy
Ṗ(tn+1 ) = f (yn+1 , tn+1 )
as shown in Figure 14.35. This is done with the Newton interpolating polynomial
à q
!
X (α − 1)α(α + 1) . . . (α + m − 2) m
P(tn + αh) = 1+ ∇ yn+1
m=1
m!
From
¯ Xq ¯
d ¯ d (α − 1)α(α + 1) . . . (α + m − 2) ¯¯
P(tn + αh)¯¯ = ¯ ∇m yn+1
dα α=1 m=1
dα m! α=1
Xq
1 m
= ∇ yn+1
m=1
m
Xq
1 m
∇ yn+1 = hf (yn+1 , tn+1 )
m=1
m
14.11. MULTISTEP METHODS 581
yn+1 − yn = hfn+1
3 1
yn+1 − 2yn + yn−1 = hfn+1
2 2
11 3 1
yn+1 − 3yn + yn−1 − yn−2 = hfn+1
6 2 3
25 4 1
yn+1 − 4yn + 3yn−1 − yn−2 + yn−3 = hfn+1
12 3 4
137 10 5 1
yn+1 − 5yn + 5yn−1 − yn−2 + yn−3 − yn−4 = hfn+1
60 3 4 5
147 15 20 15 6 1
yn+1 − 6yn + yn−1 − yn−2 + yn−3 − yn−4 + yn−5 = hfn+1
60 2 3 4 5 6
In this case the first order method is the implicit Euler method.
A variant of the BDF method is the NDF method (Numerical Differentiation Formu-
las) (Shampine and Reichelt 1997) where an additional term is introduced as follows
q q
à q
!
X 1 m X 1 X
m
∇ yn+1 = hf (tn+1 , yn+1 ) + κ yn+1 − ∇ yn
m=1
m m=1
m m=0
where z is the complex z transform variable, and y(z) is the z transform of the numerical
solution yn+1 . Equivalently, this is written
[N (z) − hλD(z)] y(z) = 0 (14.283)
The stability of the method can then be investigated by studying the roots of the char-
acteristic equation
N (z) − hλD(z) = 0
582 CHAPTER 14. SIMULATION
which implies stability of the multistep method if the roots are inside the unit circle.
Also the location of the continuous time poles λ can be found as a function of z from
N (z)
hλ =
D(z)
This equation makes it possible to find the poles λ that correspond to the limit of
stability for the multistep method. The stability limit occurs when |z| = 1, which can
be parameterized by z = ejω , −π ≤ ω ≤ π. Then the limit of stability in the s plane is
found by plotting
N (ejθ )
hλ = , −π ≤ θ ≤ π (14.284)
D(ejθ )
This gives
z−1
hλ = Pq−1
γ m (1 − z −1 )m
m=0
The regions of stability for methods of order 1 to 4 were computed as in (14.284), and
are shown in Figure 14.36. For implicit Adams methods the z transform gives
q
X
zy(z) = y(z) + hλ γ ∗m (1 − z −1 )m zy(z)
m=0
which gives
1 − z −1
hλ = Pq ∗ −1 )m
m=0 γ m (1 − z
The stability regions can then be plotted as in equation (14.284). This gives the stability
regions shown in Figure 14.37. In the PECE Adams method the solution ybn+1 of the
explicit Adams method is inserted for yn+1 on the right hand side of the implicit method.
© £ ¤ ª
zy(z) = y(z) + hλ γ ∗0 zb
y (z) + γ ∗1 [zb
y (z) − y(z)] + γ ∗2 zby (z) − 2y(z) + z −1 y(z) + . . .
After some calculation it can be established that hλ satisfies the second order equation
A (hλ)2 + Bhλ + C = 0
à q
! " q−1 #
X X
A = γ ∗m γ m (1 − z −1 m
)
m=0 m=0
q
X q
X
B = (1 − z) γ ∗m +z γ ∗m (1 − z −1 )m
m=0 m=0
C = 1−z
14.11. MULTISTEP METHODS 583
Figure 14.36: The stability regions of the explicit Adams (Adams-Bashforth) methods
of order 1 to 4. We recognize the stability area of AB(1) as that of Euler’s method.
Xq
1
(1 − z −1 )m y(z) = hλy(z)
m=1
m
The stability areas are found by plotting hλ for z = ejθ , −π ≤ θ ≤ π, and are shown in
Figure 14.38. It is seen that both the first order and the second order BDF are stable
for ẏ = λy whenever Re(λ) ≤ 0.
then the dynamics of y(z) have a pole in the z plane at z = zp . If zp = 0, then this gives
a one-step reset response where yn+1 = 0. If zp = 1, then we have the dynamics of an
integrator where yn+1 = yn .
584 CHAPTER 14. SIMULATION
Figure 14.38: Stability areas for BDF methods of order 1 to 6. We note that BDF1 is
the implicit Euler method.
14.12. DIFFERENTIAL-ALGEBRAIC EQUATIONS 585
It is seen that for s = 0 both methods have one pole which is at z = 1. Moreover, when
|s| → ∞, the explicit method has poles defined by
q
X
γ m (1 − z −1 )m = 0
m=1
Clearly, at least one of the poles for |s| → ∞ is at z = 1, which is also the case for the
implicit methods. This means that high frequency modes are not damped out in the
Adams methods.
where it is seen that when λh → ∞ the dynamics tend to z q y(z) = 0 which is q poles
at the origin of the z plane. This means that dynamics corresponding to λh À 1 are
damped out, and because of this the BDF methods are well suited for stiff systems. The
standard MATLAB integrator for stiff systems is ode15s which is a variable order BDF
solver (Shampine and Reichelt 1997).
where y, f ∈Rd1 and z, g ∈Rd2 . Then the system can be written in the form
ẏ = f (y, z) (14.291)
ż = g(y, z) (14.292)
It is seen that if 6= 0 then the system is of order d, and is described by the differential
equations above, while for = 0 the system is of order d1 and is described by the
differential-algebraic equation
ẏ = f (y, z) (14.293)
0 = g(y, z) (14.294)
If
½ ¾
∂g(y, z) ∂gi
=
∂z ∂zj
z = z(y)
The system (14.295) can be solved with any numerical integration scheme, and the alge-
braic condition is automatically satisfied.
However, in some cases it is desirable to leave the system in the original form and
let tend to zero. in particular, this is done if there is no explicit solution z = z(y)
available, or that the system is in the form Mu̇ = φ(u) where M is possibly nonsingular.
The system
Mu̇ = φ(u)
σ
X
Yi = yn + h aij f (Yj , Zj )
j=1
Xσ
Zi = zn + h aij g(Yj , Zj )
j=1
σ
X
yn+1 = yn + h bi f (Yi , Zi )
i=1
Xσ
zn+1 = zn + h bi g(Yi , Zi )
i=1
We will now show how this scheme can be reformulated so that the equation for zn+1
does not include . This is done by solving g(Yj , Zj ) from the equation for Zi , which
gives
σ
X
hg(Yj , Zj ) = ω ij (Zi − zn )
j=1
where A−1 = Ω = {ω ij }. This expression is inserted into the equation for zn+1 , and
the result is
σ
X σ
X
zn+1 = zn + bi ω ij (Zi − zn )
i=1 j=1
σ X
X σ σ X
X σ
= 1 − bi ω ij zn + bi ω ij Zi
i=1 j=1 i=1 j=1
We note that may be cancelled from this equation, and recall from (14.156) that
σ X
X σ
T −1
R(∞) = 1 − b A 1 =1 − bi ω ij (14.296)
i=1 j=1
σ X
X σ
zn+1 = R(∞)zn + bi ω ij Zi
i=1 j=1
588 CHAPTER 14. SIMULATION
which can be used to compute zn+1 , and we get a reformulation of the Runge-Kutta
method in the form
σ
X
Yi = yn + h aij f (Yj , Zj )
j=1
Xσ
Zi = zn + h aij g(Yj , Zj )
j=1
σ
X
yn+1 = yn + h bi f (Yi , Zi )
i=1
σ X
X σ
zn+1 = R(∞)zn + bi ω ij Zi
i=1 j=1
Note that only appears in the equation for Zi . If we let go to zero, the Runge-Kutta
method becomes
σ
X
Yi = yn + h aij f (Yj , Zj )
j=1
σ
X
0 = aij g(Yj , Zj )
j=1
σ
X
yn+1 = yn + h bi f (Yi , Zi )
i=1
σ X
X σ
zn+1 = R(∞)zn + bi ω ij Zi
i=1 j=1
The following observations for the case = 0 are important. At each stage the algebraic
equation g(Yj , Zj ) = 0 is satisfied because A is nonsingular. The algebraic condition is
not necessarily satisfied for zn+1 . If R(∞) = 0, we get
σ X
X σ
zn+1 = bi ω ij Zi
i=1 j=1
g(yn+1 , zn+1 ) = 0
are not necessarily satisfied. However, if the method is stiffly accurate, that is, if it has a
nonsingular A matrix and the last row of A equals bT , then yn+1 = Yσ and zn+1 = Zσ ,
and as g(Yσ , Zσ ) = 0 it follows that g(yn+1 , zn+1 ) = 0.
To conclude: Suppose that a stiffly accurate Runge-Kutta method is used to solve
(14.291,14.292) for = 0. Then the computed solution will be the same as if the Runge-
Kutta method was applied to the system ẏ = f [y, z(y)]. The same method can be used
for an arbitrarily small .
14.12. DIFFERENTIAL-ALGEBRAIC EQUATIONS 589
Also in this case the algebraic condition is satisfied for the stages, and also for yn+1 if a
stiffly accurate method is used.
ẏ = f (t, y)
ẏ = f (y, z)
0 = g(y, z)
where µ ¶ µ ¶
y f
= u, =φ
z g
Then, BDF and NDF gives
q
X
αq yn+m−q = hf (yn+1 , zn+1 )
m=1
0 = hg(yn+1 , zn+1 )
15.1 Introduction
As shown in Chapter 10, models from fluid mechanics and thermodynamics often involve
partial differential equations. In particular this applies to the transport equations and
the Navier-Stokes equations. These equations cannot be solved analytically except in
special cases and there is a need for finding approximate solutions. Computational fluid
dynamics (CFD) is the collection of tools and methods used for solving this through sim-
ulation. CFD covers both mathematical modelling of the application at hand, methods
of discretization, numerical grid generation and methods of solving the sets of nonlinear
algebraic equations arising from the discretization. CFD methods can be divided into
at least three groups by the method of discretization. These three are finite difference,
finite volume and finite element methods. Due to its simplicity and the fact that the
approximation terms can be given a physical interpretation, we will in the following use
the finite volume method to compute approximate numerical solutions to some important
types of fluid dynamic problems.
The finite volume method uses the integral form of the balance equations as its
starting point. The solution domain is divided into a finite number of control volumes
(CV), and the conservation equations are applied too each CV. At the centroid of each
CV lies a computational node at which the variables are to be calculated. Interpolation
of the nodal vales of neighboring nodes are used at the CV surfaces. This finally results in
an algebraic equation for each node, in which a number of neighbor node values appear,
and a system of equations can now be found. The size of this system depends on the
size of the domain and the grid spacing, but a system of one million equations is not
uncommon. The finite volume method always yields systems with equations with a large
number of zero entries. The structure of the equations depend on the differencing scheme
used, but in most cases a diagonal structure is ensured. This can be exploited by the
solution technique, and iterative methods are often used. Further details on CFD are
found in (Patankar 1980), (Anderson 1995), (Ferziger and Perić 1999) and (Versteeg and
Malalasekera 1995)
591
592 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
conserved quantity like mass, momentum or energy. The balance equation for a conserved
quantity φ is written
∂ (ρφ)
+ ∇T (ρφv) = ∇T (Γ∇φ) + Sφ (15.1)
| ∂t
{z } | {z } | {z } |{z}
Net rate of flow rate of change rate of change
rate of change
of φ out of spatial of φ due to of φ due to
of φ of spatial
fluid element diffusion sources
fluid element
µZ Z Z ¶ ZZ ZZ ZZZ
∂ T T
ρφdV + n (ρφv) dA = n (Γ∇φ) dA + Sφ dV
∂t
| {zV } | ∂V
{z } | ∂V
{z } | V
{z }
rate of change Net rate of change Net rate of change Net rate of
of φ of φ due to convection of φ due to diffusion creation of φ
across the boundaries across the boundaries
which describes the conservation of a fluid property for a finite size control volume V .
In steady state problems, the rate of change term is zero, which leads to the integrated
form of the steady state transport equation:
ZZ ZZ ZZZ
nT (ρφv) dA = nT (Γ∇φ) dA + Sφ dV
∂V ∂V V
Z µZ Z Z ¶ Z ZZ
∂
ρφdV dt + nT (ρφv) dAdt
∂t V ∂V
Z ZZ Z ZZZ
T
= n (Γ∇φ) dAdt + Sφ dV dt
∂V V
15.3 Classification
Classification of partial differential equations is an important concept for solving such
equations. Different methods can be developed for different types of equations such that
15.3. CLASSIFICATION 593
distinct properties of the equations can be utilized. The governing partial differential
equations of fluid dynamics as derived in Chapter 10 are quasi linear. This means that
the highest order derivatives occur linearly, they appear by themselves, multiplied with
coefficients which are functions of the dependent variables. It is useful to examine the
mathematical properties of such equations, as any numerical solution of the equations
should exhibit the property of obeying the general mathematical properties of the gov-
erning equations. We will establish a classification of three types of differential equations:
elliptic, hyperbolic and parabolic — all three of which are encountered in fluid dynamics.
P
bon
dar
y co
ndi
tio n
s
initial conditions
calculated from the values of u and v on Σ. Equations (15.2) to (15.5) can be written as
a linear system in the four unknowns ∂u ∂u ∂v ∂v
∂x , ∂y , ∂x and ∂y :
∂u
a1 b1 c1 d1 ∂x f1
a2 b2 c2 d2 ∂u f2
∂y = (15.6)
dx dy 0 0 ∂v du
∂x
0 0 dx dy ∂v dv
∂y
| {z }
A
If u and v are known in P , then ai , bi , ci , di and fi are also known, and if Σ is known
then dx and dy are known. Moreover, if u and v are known on Σ, then du and dv are
known. A unique solution for the four partial derivatives will then exist if and only if
det A 6= 0, .and the directional derivatives will have the same values above and below
Σ. If on the other hand det A = 0, (15.6) will have multiple solutions, and the partial
derivative might be discontinuous over Σ. The characteristic equation of the system is
found by setting det A = 0 :
¯ ¯
¯ a1 b1 c1 d1 ¯
¯ ¯
¯ a2 b2 c2 d2 ¯
¯ ¯=0
¯ dx dy 0 0 ¯¯
¯
¯ 0 0 dx dy ¯
⇓
(a1 c2 − a2 c1 ) (dy)2 − (a1 d2 − a2 d1 + b1 c2 − b2 c1 ) dxdy + (b1 d2 − b2 d1 ) (dx)2 = 0
⇓
µ ¶2
dy dy
(a1 c2 − a2 c1 ) − (a1 d2 − a2 d1 + b1 c2 − b2 c1 ) + (b1 d2 − b2 d1 ) = 0 (15.7)
dx dx
The directions given by (15.7) are called characteristic directions, and a curve, plane or
hyperplane of points where (15.7) is satisfied, is called a characteristic. The characteristic
directions can be real and distinct, real and coinciding or imaginary dependent on the
discriminant
being positive, zero or negative. If D > 0, two distinct characteristic lines exist through
each point in the xy-plane, and the system (15.2)-(15.3) is called hyperbolic, if D = 0 one
characteristic line exist through each point in the xy-plane, and the system (15.2)-(15.3)
is called parabolic, and if D < 0 the characteristic lines are imaginary, and the system is
called elliptic.
Alternatively, consider the second order equation
of u, ∂u
∂x and
∂u
∂y on Σ. Using the same argument leading to (15.6) we have
µ ¶
∂u ∂2u ∂2u
d = dx + dy (15.9)
∂x ∂x2 ∂x∂y
µ ¶
∂u ∂2u ∂2u
d = dx + 2 dy (15.10)
∂y ∂y∂x ∂y
⇓
µ ¶2
dy dy
a −b +c=0 (15.11)
dx dx
Based on (15.11), equation (15.8) will be hyperbolic if b2 −4ac > 0, parabolic if b2 −4ac =
0 and elliptic if b2 − 4ac < 0.
Remark 8 Notice that the classification of the PDE (15.8), is dependent only on the
coefficients of the second order derivatives.
We will now review some characteristic properties for each type of equation.
∂2u ∂2u
2
− c2s 2 = 0 (15.12)
∂t ∂x
596 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
a P
Domain of
dependence
Region of
influence
and the equation is hyperbolic. To find the characteristics, we now select dx/dt so that
µ ¶2
dx dx
a −b +c=0 (15.13)
dt dt
which is the characteristic equation, see (15.11). The characteristic directions are given
by p
dx 0 ± 0 + 4 · 1 · c2s
= = ±cs
dt 2·1
We conclude that the second order wave equation has two real characteristics.
Region of
influence
Domain of
dependence
x
a b
D = b2 − 4ac = 0
Bo
a un
dar
y con
Domain of dit
dependence ion
sk
P now
n
b
Bou Region of
nd ary influence
con
diti
on sk
now d
n
c
x
b c
Region of
influence
P
a d
x
Figure 15.5: Domain and boundaries for an elliptic equation in two dimensions.
governed by elliptic equations include steady, subsonic, inviscid flow and incompressible
inviscid flow.
Example 239 The Laplace equation which e.g. describes steady state conductive heat
transfer is a typical example of an elliptic equation. In two dimensions we have
∇2 φ = 0 (15.18)
∂2φ ∂2φ
+ 2 = 0
∂x2 ∂y
D = b2 − 4ac = −4,
15.4. DIFFUSION 599
We will now present and apply the finite volume method of CFD to a number of well
known problems of increasing complexity.
15.4 Diffusion
15.4.1 Introduction
We start by considering the simplest possible transport process: pure diffusion in steady
state, which is governed by the equation
∇T (Γ∇φ) + Sφ =0 (15.22)
| {z } |{z}
rate of change rate of change
of φ due to of φ due to
diffusion sources
and can be found by deleting the two terms on the left hand side of (15.1).
where Γ is called the diffusion coefficient, and S is the source term. Boundary conditions
φA = cA and φB = cB where cA and cB are constants are provided. This process will
be used to illustrate the three basic steps grid generation, discretization, solution of
equations, in the finite volume method.
Grid generation In the finite volume method we want to divide the domain into dis-
crete control volumes. A number of nodal points are placed between the boundaries A
and B. Each node is placed in the center of its control volume, such that the control vol-
ume surfaces are positioned mid-way between the nodes. This arrangement is illustrated
in Figure 15.6, and it is further detailed in Figure 15.7. The general node is named P ,
600 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
and its adjacent nodes W (west) and E (east), respectively. Lower case letters w and e
are used for the boundaries. The distance between P and E is termed δxP E , with other
distances labeled in a similar manner, see Figure 15.7. Notice that the control volume
width is given by ∆x = δxwe . In two and three dimensions, the notation is extended
with the points N (north), S (south), T (top) and B (bottom) and corresponding lower
case letters for the boundaries.
Nodes
P
W E
A B
Control volume
boundaries
Control volume
δxWP δxPE
δxwP δxPe
W P e E
∆x=δxwe
Figure 15.7: Labeling of nodes and distances in the finitie volume method.
and evaluate at the east and west surfaces of the control volume we get
µ ¶ µ ¶
dφ dφ
ΓA − ΓA + S∆V = 0 (15.24)
dx e dx w
where A is the cross-sectional area of the control volume face, ∆V is the volume, and S
is average value of S over the control volume. Notice that this discretized equation has
15.4. DIFFUSION 601
a clear physical interpretation. It states that the diffusive flux of φ leaving the e surface
minus diffusive flux of φ entering through the w surface is equal to the generation of
φ inside the control volume. This is in fact one of the most attractive features of this
method. The resulting solution would imply that the integral conservation of quantities
such as mass, temperature and energy is exactly satisfied over any group of control
volumes. This holds for any number of grid points, and even coarse grid solutions exhibit
exact integral balances. We will now use the central difference to evaluate the value of
the diffusion coefficient Γ and the gradient dφ dx at the interfaces of the volume:
ΓW + ΓP
Γw = (15.25)
2
ΓP + ΓE
Γe = (15.26)
2
such that the diffusive terms in (15.24) can be evaluated as
µ ¶
dφ φ − φW
ΓA = Γw Aw P (15.27)
dx w δxW P
µ ¶
dφ φE − φP
ΓA = Γe Ae (15.28)
dx e δxP E
The source term may be a function of φ, and in such cases it may be linearized as
S∆V = Su + Sp φP . (15.29)
or
aP φP = aW φW + aE φE + Su (15.30)
By substituting
µ ¶
∂φ φE − φP
Γe Ae = Γe Ae
∂x δxP E
µ ¶e
∂φ φ − φW
Γw Aw = Γw Aw P
∂x δxW P
µ ¶w
∂φ φ − φP
Γn An = Γn An N
∂y δyP N
µ ¶n
∂φ φ − φS
Γs As = Γs As P
∂y s δySP
or
aP φP = aW φW + aE φE + aS φS + aN φN + Su (15.33)
aP φP = aW φW + aE φE + aS φS + aN φN + aB φB + aT φT + Su
where
aW aE aS aN aB aT aP
Γw Aw Γe Ae Γs As Γn An Γb Ab Γt At
δxW P δxP E δySP δyP N δzBP δzP T aW + aE + aS + aN + aB + aT − Sp
15.5. SOLUTION OF EQUATIONS 603
aW aE aP Sp Su
kA kA
δx δx aW + aE − Sp 0 qAδx
aW aE aP Sp Su
kA
0 δx aW + aE − Sp - 2kA
δx qAδx + 2kA
δx TA
Using numerical values, we get the following coefficients for all the nodes:
Node aW aE Su Sp aP
1 0 125 4000 + 250TA −250 375
2 125 125 4000 0 250
3 125 125 4000 0 250
4 125 125 4000 0 250
5 125 0 4000 + 250TB −250 375
The matrix of coefficients is seen to be tridiagonal, which is generally the case in problems
like this. The system can be found to have the solution
T1 150
T2 218
T3 = 254
T4 258
T5 230
which can be found by using an appropriate technique for solving systems of ordinary
algebraic equations. Particularly well suited is the TDMA (tridiagonal matrix algorithm)
or Thomas algorithm, which can be applied iteratively.
For CFD problems this is of limited value as the governing equations often are nonlin-
ear, and in that case stability and consistency are necessary, but not sufficient conditions
for convergence. (Patankar 1980) presented rules which yields robust finite volume cal-
culations schemes. Robust schemes has three properties: conservativeness, boundedness
15.7. FINITE VOLUME METHOD FOR DIFFUSION DYNAMICS 605
and transportiveness. As we shall see, these concepts are designed into finite volume
schemes, and they are according to (Versteeg and Malalasekera 1995) commonly ac-
cepted as alternatives for the more mathematically rigorous concepts of convergence,
consistency and stability. Stability will be studied in some more detail in section 15.10.
where a0P is the net coefficient for the central node P , that is
a0P = aP − SP
P
and |anb | is the net coefficient for all the neighboring nodes. Another criterion
for boundedness is that all coefficients of the discretized equation have the same
sign. Physically, this implies that the increase of φ in one node should result in an
increase of φ in the neighboring nodes.
• Transportiveness: Define the Peclet number as
F ρu
Pe = =
D Γ/δx
The Peclet number P e is a measure of the relative strength of diffusion and con-
vection, and the terms F and D will be further treated in Section 15.8. For pure
diffusion we have P e = 0, and for pure convection we have P e = ∞.
where ρ is the density (assumed constant), c is the specific heat of the material and k
is the thermal conductivity. As seen in Section 15.3.2 this problem is parabolic in time,
and we will solve it by marching in time from an initial distribution of temperature T .
606 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
¡ ¢ ¡ ¢
aP TPn+1 n+1
= aW (1 − θ) TW n
+ θTW + aE (1 − θ) TEn+1 + θTEn (15.40)
¡ ¢
+ a0P − θaW − θaE TPn + S∆x
where
aP = (1 − θ) (aW + aE ) + a0P
∆x
a0P = ρc
∆t
kw
aW =
δxW P
ke
aE =
δxP E
15.7. FINITE VOLUME METHOD FOR DIFFUSION DYNAMICS 607
We have now arrived at a discretized version of (15.36), and we will review three different
schemes given by the theta method.
Euler (θ = 1)
In the Euler method, or explicit scheme, θ = 1, and the source term is linearized as
S∆x = Su + SP TPn
¡ ¢
aP TPn+1 = aW TW
n
+ aE TEn + a0P − aW − aE + SP TPn + Su (15.41)
where
aP = a0P (15.42)
∆x
a0P = ρc
∆t
kw
aW =
δxW P
ke
aE =
δxP E
For this method to be stable, all coefficients in the discretized equation (15.41) need to
be positive. This is satisfied if a0P − aW − aE > 0. When assuming uniform grid spacing
δxP E = δxW P = ∆x and constant k = ke = kw , this can be written
2
(∆x)
∆t < ρc (15.43)
2k
This sets a maximum limit on the time step size ∆t, and reduction of ∆x to improve
spatial accuracy forces us to chose a much smaller time step in order to ensure stability.
Crank-Nicolson (θ = 12 )
1
In the Crank-Nicolson method, θ = 2 and the source term is linearized as
TPn + TPn+1
S∆x = Su + SP
2
The discretized heat transfer equation is
n+1 µ ¶
n
TW + TW TEn + TEn+1 aW aE SP
aP TPn+1 = aW + aE 0
+ aP − − + TPn + Su
2 2 2 2 2
608 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
where
1 SP
aP = (aW + aE ) + a0P −
2 2
∆x
a0P = ρc
∆t
kw
aW =
δxW P
ke
aE =
δxP E
Again, all coefficients in the discretized equation must be positive, which is satisfied if
(∆x)2
∆t < ρc
k
Implicit Euler (θ = 0)
In the implicit Euler scheme, θ = 0 and the source term is linearized as
S∆x = Su + SP TPn+1
aP TPn+1 = aW TW
n+1
+ aE TEn+1 + a0P TPn + Su
where
aP = aW + aE + a0P − SP
∆x
a0P = ρc
∆t
kw
aW =
δxW P
ke
aE =
δxP E
As all coefficients in the discretized equation are positive, the method is unconditionally
stable. CFD computations for two- and three-dimensional transient diffusion can be done
using the same methods as in this section.
Example 240 Simulation of temperature control using the Finite Volume CFD
method
Consider an insulated rod equipped with a heating element at the east end as depicted in
Figure 15.8. The one dimensional transient heat conduction equation is
µ ¶
∂T ∂ ∂T
ρc = k +S
∂t ∂x ∂x
15.7. FINITE VOLUME METHOD FOR DIFFUSION DYNAMICS 609
Figure 15.8: Temperature control of a rod. A heating element at the east end is controlled
with feedback from the temperature at the middle of the rod. The rest of the rod is
insulated.
where ρc = 107 JK/m3 , k = 10 WK/m, and length L = 0.02 m. Initially T (x, 0) = 300 K.
The insulated west end implies the boundary condition ∂T ∂x (t, 0) = 0. We will use a P
controller to control the power S of the heating element which is located at the east end
(x = L). Temperature will be measured at the middle of the rod so that the source term
will be given by
S = kp (Tref − Tmeas )
where kp > 0 is the controller gain Tref is the temperature set point and Tmeas is the
temperature measurement. We use the Euler method for time discretization and divide
the spatial domain into five control volumes such that ∆x = 0.004 m. The computational
grid will be similar to the one used in Section 15.5.1. By using equation (15.40), we find
for node 1 µ n+1 ¶
TP − TPn k
ρc ∆x = (T n − TPn )
∆t ∆x E
The discretized equations for node 2,3 and 4 are given by (15.41) and (15.42), and for
node 5 we find
µ n+1 ¶
TP − TPn k
ρc ∆x = kp (Tref − T3n ) − (T n − TW
n
)
∆t ∆x P
where Tmeas = T3 has been used as the measurement is made at the middle. The time
step ∆t must satisfy (15.43), which leads to ∆t < 8.We chose ∆t = 2. Using numerical
values, it can be shown that the equation for each node is given by
Notice that due to measurement and control not being collocated, the introduction of T3 in
the equation for node 5 breaks the tridiagonal structure of the equations. The equation set
(15.44) was solved numerically using MATLAB. The result is plotted in Figure 15.9. As
can be seen, the desired temperature is reached throughout the rod, which is not surprising
due to the insulation.
The equation set in the example was evaluated with the following MATLAB script.
kp=50; % Controller gain
T_ref=400; % Desired temperature
610 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
550
500
Temperature [K]
450
400
350
300
5
4 150
3 100
2 50
1 0
Node #
time [s]
∂ (ρφ)
+ ∇T (ρuφ) = ∇T (Γ∇φ) + Sφ (15.45)
| ∂t
{z } | {z } | {z } |{z}
Net rate of flow rate of change rate of change
rate of change
of φ out of of φ due to of φ due to
of φ of
fluid element diffusion sources
fluid element
where ρ is the density, u is the flow velocity vector and Γ is the diffusion coefficient.
15.8. FINITE VOLUMES FOR CONVECTION-DIFFUSION 611
δxWP δxPE
δxwP δxPe
uw ue
W P e E
∆x=δxwe
Figure 15.10: Control volume for 1D convection and diffusion. ue is the flow velocity
entering the CV, and uw is the flow velocity leaving the CV.
where u is the x component of the flow velocity vector.Using the same methodology as
in Section 15.7, integration of (15.46) over the control volume in Figure 15.10 gives
Z µ ¶ µ ¶
∂ dφ dφ
(ρφ) dV + (ρAuφ)e − (ρAuφ)w = ΓA − ΓA (15.47)
∆V ∂t dx e dx w
µ ¶ µ ¶
∂φ dφ dφ
ρ ∆V + (ρAuφ)e − (ρAuφ)w = ΓA − ΓA (15.48)
∂t dx e dx w
We now define the convection and diffusion terms
F = ρu
Γ
D =
δx
so that
Fw = (ρu)w , Fe = (ρu)e
Γw Γe
Dw = ,D=
δxW P δxP E
We choose here to use the implicit Euler scheme of Section 15.7 for integration, but other
schemes might just as well be used. Linearizing the source term as
S∆V = Su + SP φn+1
P
Central difference
One alternative is to use the central difference to approximate the convection terms. By
substituting
φP + φE
φe =
2
φW + φP
φw =
2
into (15.49) and rearranging, we get
µ µ ¶ µ ¶ ¶
ρ∆V Fw Fe
+ Dw + + De − + (Fe − Fw ) − SP φn+1
P
∆t 2 2
µ ¶ µ ¶
ρ∆V n Fw Fe
= φ + Dw + φn+1
W + De − φn+1 + Su
∆t P 2 2 E
or
aP φn+1
P = a0P φnP + aW φn+1 n+1
W + aE φE + Su
and we have the same type of discretized equation that we derived for the pure diffusion
problems. Regarding conservativeness, it can easily be shown that fluxes of the type
(φ −φi )
Γ i+1∆x will cancel out in pairs, leaving only the fluxes at the boundaries, and thus
the central differencing scheme is conservative. For a flow that is governed by (15.49)
and simultaneously satisfies continuity, that is
Fe − Fw = 0
it follows that, a0P = aW + aE + a0P . The Scarborough criterion can then be calculated as
P ¯ ¯
|anb | |aW | + |aE | + ¯a0P ¯
=
|a0P | |aW + aE + a0P |
and it can be seen that the conditions of (15.35) are satisfied. As aE = De − F2e ,
this coefficient can be negative if convection is sufficiently strong. Provided all other
coefficients are positive, this will violate the requirement for boundedness. Moreover
Fe Fe
aE > 0 =⇒ De − > 0 =⇒ = P ee < 2
2 De
This means that the central differencing scheme in this case will produce bounded solu-
tions only if the Peclet number satisfies P ee < 2. Regarding transportiveness, the scheme
does not recognize the direction of the flow, and would not be useful for high P e.The
central difference scheme is accurate to second-order.
φw = φW and φe = φP .
15.8. FINITE VOLUMES FOR CONVECTION-DIFFUSION 613
aP φn+1
P = a0P φnP + aW φn+1 n+1
W + aE φE
where
aP = a0P + aW + aE + (Fe − Fw )
ρ∆V
a0P =
∆t
aW = Dw + max(Fw , 0)
aE = De + max(0, −Fe )
The upwind scheme is conservative, the fact that aP = aW + aE implies that the Scar-
borough criterion is met. Also, all the coefficient are positive, and transportiveness is
built into the formulation. The upwind scheme is accurate to first order.
aP φn+1
P = a0P φnP + aW φn+1 n+1
W + aE φE
with
aP = a0P + aW + aE + (Fe − Fw )
ρ∆V
a0P =
∆t µ µ ¶ ¶
Fw
aw = max Fw , Dw + ,0
2
µ µ ¶ ¶
Fe
aw = max −Fe , De − ,0
2
614 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
aP φn+1
P = a0P φnP + aW φn+1 n+1
W + aE φE + aW W φn+1 n+1
W W + aEE φEE
where
µ ¶ µ ¶
∂ (ρu) ∂ ¡ 2¢ ∂ ∂ ∂u ∂ ∂u ∂p
+ ρu + (ρuv) = µ + µ − + Su (15.52)
∂t ∂x ∂y ∂x ∂x ∂y ∂y ∂x
µ ¶ µ ¶
∂ (ρv) ∂ ∂ ¡ 2¢ ∂ ∂v ∂ ∂v ∂p
+ (ρuv) + ρv = µ + µ − + Sv (15.53)
∂t ∂x ∂y ∂x ∂x ∂y ∂y ∂y
These equations can be shown to be parabolic. The velocity also satisfy the continuity
equation
15.9. PRESSURE-VELOCITY COUPLING 615
∂ ∂
(ρu) + (ρv) = 0 (15.54)
∂x ∂y
which is elliptic. The incompressible Navier-Stokes equations can be obtained from the
compressible form simply by setting constant density ρ, which would lead us to believe
that the equations can be solved numerically by using one of the previous mentioned
techniques. This is unfortunately not the case. (Anderson 1995) cites a result where an
approximate stability criterion for an explicit Navier-Stokes solution is shown to be
1
∆t ≤ q
2 2
|u| /∆x + |v| /∆y + a 1/ (∆x) + 1/ (∆y)
where α is the sonic velocity. For a compressible flow a is finite, and it is possible to
find a finite ∆t to guarantee stability of the solution. However, for an incompressible
flow, the sonic velocity is theoretically infinite, and we would get ∆t = 0. Consequently,
another method has to be found. In addition to the equations (15.52), (15.53) and (15.54)
being nonlinear, another difficulty in solving this problem is the presence of the pressure
∂p ∂p
gradient terms ∂x and ∂y . As can be seen we have no differential equation for ∂p∂t . We
also recognize that a consequence of the system (15.52)-(15.54) being a parabolic-elliptic,
we have no transient term in (15.54). It is interesting to compare this to a system of
differential-algebraic equations (DAE).
Example 241 The, checkerboard pressure field of Figure 15.11 is highly irregular. Let us
examine how this is represented in the discretized momentum equations. If the pressure
drop across the CV is obtained by linear interpolation, we have in the x direction:
pW + pP pP + pE pW − pE
pw − pe = − =
2 2 2
616 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
which implies
∂p pw − pe pW − pE 100 − 100
= = = =0 (15.56)
∂x δx 2δx 2δx
and similarly in the y direction
∂p pN − pS 100 − 100
= = =0 (15.57)
∂y 2δy 2δy
We see that the value at the node P is cancelled out and not used in either of the cal-
culations (15.56) or (15.57). This means that the pressure differences are calculated for
alternate nodes, and not for adjacent ones. This might reduce the accuracy of the solu-
tion. However this is not the main problem: far more serious is the fact that a pressure
field like the one in Figure 15.11 results in all the discretized gradients being zero at the
nodal point. As a result, this pressure field would give the same momentum source as a
uniform field.
Remark 10 The problem described in Example 241 does not occur if the flow is com-
pressible. The term ∂ρ
∂t in the continuity equation (15.55) would damp out the checker-
board pattern.
It is clear from the Example 241 that if velocities are defined at the scalar grid
nodes, the pressure gradients are not properly represented in the discretized momentum
equations. A remedy for this is the staggered grid. The idea is to evaluate velocities
on another grid than all the other variables. Pressure, temperature etc. are calculated
at the ordinary nodal points, but velocities are calculated at the CV faces between the
nodal points. A 2D staggered grid is shown in Figure 15.12. The x direction velocity u is
calculated at the faces that are normal to the x direction, and the y direction velocity v is
calculated at the faces that are normal to the y direction. The staggered grid arrangement
solves the problem of the checkerboard pressure field. Alternatively, (Anderson 1995),
suggest to use another approximation when calculating the pressure differences in (15.56)
and (15.57). The upwind scheme might be one such scheme.
Remark 11 Although example 241 illustrates that the staggered grid solves the problem
of the checkerboard pressure field, it is rather unrealistic because it contains a nonphysical
15.9. PRESSURE-VELOCITY COUPLING 617
pressure field. The main advantage of the staggered grid is in fact that it allows for the
pressure difference between two adjacent grid points to be the driving force for the velocity
component located between these grid points.
n
P
w e
s
Figure 15.12: A staggered two dimensional grid. The u’s are stored at the −→, the v’s
at the ↑ and other variables φ at the •.
P e E
A staggered control volume for the momentum equation (15.52) is shown in Figure
15.13. As can be seen, the pressure difference pP −pE can be used to calculate the pressure
force acting on the control volume for the velocity u. Using similar techniques as in the
previous sections, the discretized transient momentum equation in the x direction on the
staggered grid can be written in the form
X
ae un+1
e = anb unnb + a0e une + b + (pnP − pnE ) Ae (15.58)
where
∆Vu
Au =
∆x
and b is a collection of other source terms than the pressure gradient. In (15.58), inte-
gration with respect to time has been carried out by an explicit scheme such as the Euler
method. The values of the coefficients a0e , ae and anb may be calculated by any of the
618 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
where
∆Vv
An =
∆y
The extension to the z direction in a 3D problem is trivial.
Remark 12 Notice that the term (pP − pE ) Au in (15.58) is the pressure force acting
on the u control volume. This is physically correct and would not be possible without the
staggered grid.
n+1
where the notation (u∗ )e is used for expressing the velocity u∗ at position e and
time n + 1. Similar equations is solved for v ∗ and w∗ . Now we define the correction p0 as
p = p∗ + p0
u = u∗ + u0 , v = v ∗ + v 0 , w = w∗ + w0
This is the main approximation of the SIMPLE algorithm and it results in the velocity-
correction formula
n+1 ¡ n n¢
(u0 )e = de (p0 )P − (p0 )E
¡ n n¢
un+1
e = (u∗ )n+1
e + de (p0 )P − (p0 )E (15.62)
15.9. PRESSURE-VELOCITY COUPLING 619
where
Ae
de = ,
ae
and ae = f (∆t; ∆x) depending on the numerical scheme used. The reason behind the
approximation (15.61) is that we want to derive a equation for pressure correction p0 .
We construct a formula for p0 that ensures convergence of the velocity field to a solution
that satisfies continuity. As p0 is a numerical artifice, and there is no reason to expect
that the formula for predicting p0 from one step to the next is physical correct. The
approximation is analyzed in (Patankar 1980) and (Anderson 1995).
The above procedure can also be carried out in the y direction, which would lead to
the velocity-correction formula
n+1 ¡ n n¢
vnn+1 = (v ∗ )n + dn (p0 )P − (p0 )N (15.63)
We will now use the continuity equation (15.54) as a pressure correction equation. In-
tegrating the continuity equation over the control volume centered at P and using the
central difference for discretizing in x and y directions, we get
un+1
e − un+1
w un+1 − un+1
ρ +ρ n s
=0 (15.64)
∆x ∆y
when evaluating the time invariant equation at time t + ∆t. Inserting (15.62) and (15.63)
into (15.64) it follows that
n n n n n
aP (p0 )P = aE (p0 )E + aW (p0 )W + aN (p0 )N + aS (p0 )S + b0 (15.65)
where the term
(u∗ )n+1 − (u∗ )n+1 (u∗ )n+1 − (u∗ )n+1
b0 = e w
+ n s
∆x ∆y
is the continuity imbalance arising from the incorrect velocity field, and
dw + de dn + ds dw de ds dn
aP = + , aW = − , aE = − , aS = − , aN = −
∆x ∆y ∆x ∆x ∆y ∆y
The complete SIMPLE algorithm will now be stated for all three dimension.
1. Guess the pressure field p∗
2. Solve the momentum equations for u∗ , v ∗ , w∗
3. Solve the pressure correction equation for p0
4. Calculate p and u, v, w from p∗ and u∗ , v ∗ , w∗
5. Solve the discretized equations for all other φ.(If a φ does not influence the flow
field it is better to calculate it after the flow field calculations have converged)
6. If the solutions has converged: end, otherwise set p∗ = p, and start over from step
2.
Remark 13 The term semi-implicit in the name of the algorithm stems from the approx-
imation (15.61). Without the approximation, the complete pressure correction field would
have been coupled in one equation, giving a fully implicit equation. The approximation
allows the pressure correction equation (15.65) to include terms only from the neighbor
nodes, and it was termed only as semi-implicit by (Patankar and Spalding 1972).
Refinements to the SIMPLE algorithm in terms of computations effort and stability
have produced algorithms such as SIMPLER, SIMPLEC and PISO. For an overview
consult (Versteeg and Malalasekera 1995).
620 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
and unstable otherwise. How to represent the error ε is shown in the example below.
TPn+1 − TPn n
α (TW − 2TPn + TEn )
= (15.68)
∆t (∆x)2
Let D be the exact solution of the difference equation (15.68), and N be the numerical
solution. The error, is defined as
ε = N − D ⇒ N = D + ε.
√
where i = −1,
2π
km =
λ
is the wave number and m is to be determined. It is assumed that the length of the
domain on which the equation is solved is L. By using N + 1 grid points, we have that
L
∆x =
N
The smallest allowable wavelength in the Fourier series (15.71) is
2L
λmin =
N
which is the wavelength of a sine (or cosine) function having all three zeros in adjacent
gridpoints. Thus the highest wave number in the series is
2π 2π N
km,max = =
λmin L 2
N/2 N/2
X X
ikm x
ε(x, t) = Am (t)e = Am (t) (cos km x + i sin km x)
m=1 m=1
where µ ¶
2π
km = m
L
It is further assumed that the amplitude Am varies with time as Am (t) = eat ,where a is
a constant. This implies
N/2
X
ε(x, t) = eat eikm x
m=1
ea(t+∆t) eikm x − eat eikm x eat eikm (x+∆x) − 2eat eikm x + eat eikm (x−∆x)
= 2
α∆t (∆x)
which is simplified to
α∆t ¡ ikm ∆x ¢
ea∆t = 1+ 2 e + e−ikm ∆x − 2
(∆x)
2α∆t
= 1+ (cos (km ∆x) − 1)
(∆x)2
µ ¶
4α∆t 2 km ∆x
= 1− 2 sin (15.73)
(∆x) 2
622 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
is known as the amplification factor. The condition G ≤ 1 has two solutions, where the
first is trivial, and the other leads to
µ ¶
4α∆t 2 km ∆x
1− 2 sin ≥ −1
(∆x) 2
which is simplified to
α∆t 1
2 ≤
(∆x) 2
which is the stability requirement for the difference equation (15.68) to be stable.
The exact form of the stability criterion G ≤ 1 depends on the form of the difference
equation, that is both the original PDE and the discretization methods used. This is
illustrated in the next example.
Example 243 Given the partial differential equation for one dimensional convection (or
the one dimensional wave equation)
∂φ ∂φ
+c =0
∂t ∂x
∂φ ∂φ
Using a forward difference for ∂t and Upwind difference for ∂x :
εn+1
G = P
= eat
εnP
= (1 − C) + Ceat eikm ∆x
= 1 − C (1 − cos km ∆x) − iC sin km ∆x
The above is an example of a more general stability result known as the Courant-
Friedrichs-Lewy (CFL) condition. This condition, that is
∆t
C=c ≤1 (15.75)
∆x
applies generally to explicit schemes for hyperbolic equations. Physically, the CFL condi-
tion indicates that for stability, a particle of fluid should not travel more than one spatial
step-size ∆x in one time step ∆t.
The CFL condition is also the stability condition for the second order wave equation
∂2u 2
2∂ u
− c =0 (15.76)
∂t2 ∂x2
studied in Example 237. There is a connection between the characteristic lines of a
hyperbolic equation and the CFL condition. The following presentation is based on
(Anderson 1995). The characteristic lines
½
ct (right-running)
x=
−ct (left-running)
for (15.76) are plotted in Figure 15.14. In both figures 15.14 a) and b) point b is the
intersection of the right-running characteristic through grid-point W and the left-running
characteristic through grid point E. This point also has a connection to the CFL condi-
tion. Let ∆tC=1 denote the value of ∆t given by (15.75) when C = 1, that is
∆x
∆tC=1 =
c
In Figure 15.14 a) and b) ∆tC=1 is exactly the distance between point P and point b given
by the intersection of the characteristics. Now, study Figure 15.14 a) and assume C < 1.
Then, ∆tC<1 < ∆tC=1 . Let point d correspond to the grid point directly above point P
existing at time t+∆tC<1 . Since properties at point d are calculated numerically from the
difference equation using information at grid points E and W , the numerical domain for
point d is the triangle adc. The numerical domain is denoted Dn . The analytical domain
for d is the shaded area defined by the characteristics through d. The analytical domain
624 CHAPTER 15. COMPUTATIONAL FLUID DYNAMICS
is denoted Da . Note that in this case, the numerical domain contains the analytical
domain.
Now, consider Figure 15.14 b). Then C > 1 and ∆tC>1 > ∆tC=1 . Let point d
correspond to the grid point directly above point P existing at time t+∆tC>1 . As before,
the numerical domain in this case is the triangle adc, and the analytical domain is defined
by the characteristics through d. Note that in this case, the numerical domain does not
contain all of the analytical domain. The case in 15.14 b) considered an unstable solution
as C > 1, and we can now state the following interpretation of the CFL condition: For
stability, the numerical domain must include all of the analytical domain, that is
Da ⊂ Dn
Figure 15.14 a) can also illustrate accuracy. The analytical domain for point d is the
shaded triangle. Note however, that the numerical grid points E and W are outside the
domain of dependence of d and should therefore theoretically not influence the properties
at d. On the other hand, the numerical calculation of the properties at d takes information
from E and W into account. This leads to inaccurate results as there is a mismatch
between the domain of dependence and the actual numerical data used. In view of
accuracy it is therefore desirable to have the Courant number as close as possible to
unity.
15.10. VON NEUMAN STABILITY METHOD 625
d Da
t C1
x
ct
t C1
c
Dn
x
t
a c
t
W P E
x
x
(a)
t
Dn
b
x
t C1
ct
c
t
x
t C1 Da
a c
t
e W P E f
x
x
(b)
Aamo, O. and Fossen, T.: 2000, Finite element modelling of mooring lines, Mathematics
and Computers in Simulation 53, 415 — 422.
Aamo, O. and Krstić, M.: 2003, Flow Control by Feedback. Stabilization and Mixing,
Springer-Verlag, London.
Anderson, B. and Moore, J.: 1989, Optimal Control. Linear Quadratic Methods, Prentice-
Hall, Englewood Cliffs.
Anderson, B. and Vongpanitlerd, S.: 1973, Network Analysis and Synthesis, Prentice-
Hall, Englewood Cliffs, New Jersey.
Antsaklis, P. and Michel, A.: 1997, Linear Systems, McGraw-Hill, New York.
Aris, R.: 1989, Vectors, tensors, and the basic equations of fluid mechanics, Dover Pub-
lications, New York.
Armstrong-Hélouvry, B.: 1990, Stick-slip arising from stribeck friction, Proceedings of the
1990 International conference on robotics and automation, Cincinatti, OH, pp. 1377—
1382.
Armstrong-Hélouvry, B., Dupont, P. and Canudas de Wit, C.: 1994, A survey of models,
analysis tools and compensation methods for the control of machines with friction,
Automatica 30(7), 1083—1138.
Arnold, V.: 1989, Mathematical Methods of Classical Mechanics, 2nd edn, Springer-
Verlag, New York.
Aström, K. and Furuta, K.: 2000, Swinging up a pendulum by energy control, Automatica
36(2), 287—295.
Barabanov, N. and Ortega, R.: 2000, Necessary and sufficient conditions for passivity of
the LuGre friction model, IEEE Transactions on Automatic Control 45(4), 830—832.
Bathe, K.-J.: 1996, Finite Element Procedures, Prentice-Hall, Englewood Cliffs, New
Jersey.
627
628 BIBLIOGRAPHY
Bird, R., Stewart, W. and Lightfoot, E.: 1960, Transport Phenomena, John Wiley, New
York.
Blanke, M.: 1981, Ship Propulsion Losses Related to Automatic Steering and Prime
Mover Control, PhD thesis, Danmarks tekniske højskole.
Bremer, H.: 1988, über eine zentralgleichung in der dynamik, Z. angew. Math. Mech.
68, 307—311.
Canudas de Wit, C., Olsson, H., Åström, K. and Lischinsky, P.: 1995, A new model
for control of systems with friction, IEEE Transactions on Automatic Control
40(3), 419—424.
Chen, C.: 1999, Linear System Theory and Design, Oxford University Press, Oxford.
Cohen, H., Rogers, G. and Saravanamuttoo, H.: 1996, Gas turbine theory, 4th edn,
Longman, Essex.
Crandall, S., Karnopp, D., E.F. Kurtz, J. and Pridmore-Brown, D.: 1968, Dynamics of
Mechanical and Electromechanical Systems, McGraw-Hill, New York.
Cumpsty, N.: 1989, Compressor Aerodynamics, Longman.
Dahl, P.: 1968, A solid friction model, Technical Report TOR-0158(3107-18)-1, The
Aerospace corporation, El Segundo, Calif. 90245.
Dahl, P.: 1976, Solid friction damping of mechanical vibrations, AIAA Journal
14(12), 1675—1682.
de Groot, S. and Mazur, P.: 1984, Non-Equilibrium Thermodynamics, Dover Publica-
tions, New York.
der Waerden, B. V.: 1976, Hamilton’s discovery of the quaternions, Mathematics Maga-
zine 5, 227 — 234.
Dorf, R. and Bishop, R.: 2000, Modern Control Systems, 9th edn, Addison-Wesley,
Reading, Massachusetts.
Dormand, J. and Prince, P.: 1986, Runge-kutta triplets, Comp. and Maths. with Applc.
12A, 1007—1017.
Dupont, P., Hayward, V., Armstrong, B. and Altpeter, F.: 2002, Single state elastoplastic
friction models, IEEE Transactions Automatic Control 47(5), 787 —792.
Egeland, O. and Godhavn, J.-M.: 1994, Passivity-based attitude control of a rigid space-
craft, IEEE Transactions on Automatic Control 39, 842—846.
Ellman, A. and Piché, R.: 1999, A two regime orifice flow formula for numerical simula-
tion, Journal of Dynamic Systems, Measurement, and Control 121(4), 721 — 724.
Ervik, M.: 1971, Regulatorer for Vannkraft Makiner, Universitetsforlaget, Oslo.
Evans, L.: 1998, Partial Differential Equations, Graduate Studies in Mathematics, Amer-
ican Mathematical Society, Providence, Rhode Island.
Farell, J. and Barth, M.: 1999, The Global Positioning System and Inertial Navigation,
McGraw-Hill, New York.
BIBLIOGRAPHY 629
Ferziger, J. and Perić, M.: 1999, Computational Methods for Fluid Dynamics, second
edn, Springer Verlag, Heidelberg.
Fitzgerald, A., Kingsley, C. and Umans, S.: 1983, Electric Machinery, 4th edn, McGraw-
Hill, New York.
Fossen, T.: 1994, Guidance and Control of Ocean Vehicles, John Wiley & Sons, Chich-
ester.
Fossen, T.: 2002, Marine Control Systems: Guidance, Navigation and Control of Ships,
Rigs and Underwater Vehicles, Marine Cybernetics, Trondheim, Norway.
Fuller, C., Elliott, S. and Nilsen, P.: 1996, Active Control of Vibration, Academic Press,
London.
Futral, S. and Wasserbauer, C.: 1965, Off design performance prediction with experi-
mental verification for a radial-inflow turbine, Technical Report TN D-2621, NASA.
Gavronski, W., Beech-Brandt, J., Ahlstrom, H. and Manieri, E.: 2000, Torque-bias
profile for improved tracking of deep space network antennas, IEEE Antennas and
Propagation magazine 42, 35 — 45.
Gevarter, W.: 1970, Basic relations for control of flexible vehicles, AIAA Journal
8(4), 666 — 672.
Golub, G. and van Loan, C.: 1989, Matrix computations, 2nd edn, The John Hopkins
University Press, Baltimore, Maryland.
Goodson, R. and Leonard, R.: 1972, A survey of modeling techniques for fluid line
transients, Trans. of the ASME. Journal of Basic Engineering. pp. 474 —482.
Gravdahl, J. and Egeland, O.: 1998, Two results on compressor surge control with
disturbance rejection, Proceedings of the 37th IEEE Conference on Decision and
Control. To appear.
Gravdahl, J. and Egeland, O.: 1999, Compressor surge and rotating stall: modeling and
control, Advances in Industrial Control, Springer-Verlag, London.
Gravdahl, J. and Egeland, O.: 2002, Drive torque actuation in active surge control of
centrifugal compressors, Automatica 38(11), 1881—1893.
Gravdahl, J., Egeland, O. and Vatland, S.: 2001, Active surge control of centrifugal
compressors using drive torque, Proceedings of 40th IEEE Conference on Decision
and Control, pp. 1286 —1291.
Greitzer, E.: 1976, Surge and Rotating stall in axial flow compressors, Part I: Theoretical
compression system model, Journal of Engineering for Power 98, 190—198.
Haessig, Jr., D. and Friedland, B.: 1991, On the modeling and simulation of friction,
ASME J. of Dynamic Systems, Measurement and Control 113, 354—362.
Hairer, E., Nørsett, S. and Wanner, G.: 1993, Solving ordinary differential equations I:
Nonstiff problems, 2nd edn, Springer-Verlag Berlin.
Hairer, E. and Wanner, G.: 1996, Solving ordinary differential equations II: Stiff and
differential-algebraic problems, 2nd edn, Springer-Verlag Berlin.
Hess, D. and Soom, A.: 1990, Friction at a lubricated line contact operating at oscillating
sliding velocities, ASME Journal of Tribology 112(1), 147—152.
Holmboe, E. and Rouleau, W.: 1967, The effect of viscous shear on transients in liquid
lines, Journal of Basic Engineering, Trans. ASME, Series D 89, 174 — 180.
Hughes, P.: 1974, Dynamics of flexible space vehicles with active attitude control, Ce-
lestial Mechanics 9, 21—39.
Hughes, P.: 1986, Spacecraft Attitude Dynamics, John Wiley, New York.
Isidori, A.: 1989, Nonlinear Control Systems, 2nd. edn, Springer-Verlag, Berlin.
Joshi, S.: 1989, Control of Large Flexible Space Structures, Vol. 131 of Lecture Notes in
Control and Information Science, Springer-Verlag, Berlin.
Kane, T. and Levinson, D.: 1983, The use of Kane’s dynamical equations in robotics,
Int. J. Robotics Research 2, 3—21.
Kane, T. and Levinson, D.: 1985, Dynamics: Theory and Applications, McGraw-Hill,
New York.
Kane, T., Likins, P. and Levinson, D.: 1983, Spacecraft Dynamics, McGraw-Hill, New
York.
Karnopp, D., Margolis, D. and Rosenberg, R.: 2000, System Dynamics. Modeling and
Simulation of Mechatronic Systems, 3rd. edn, Wiley-Interscience, New York.
Kelkar, A. and Joshi, S.: 1996, Control of Nonlinear Multibody Flexible Space Structures,
Springer-Verlag, London.
Kelly, R., Carelli, R. and Ortega, R.: 1989, Adaptive motion control design of
robot manipulators: An input-output approach, International Journal of Control
50(6), 2563—2581.
Kiencke, U. and Nielsen, L.: 2000, Automotive Control Systems for Engine, Driveline,
and Vehicle, Springer, Berlin.
Kreyszig, E.: 1979, Advanced Engineering Mathematics, 4th edn, Wiley, New York.
Kristiansen, E.: 2000, Energy-based observer design for manipulators with flexible links,
Master’s thesis, Norwegian University of Science and Technology.
Krstić, M., Kanellakopoulos, I. and Kokotović, P.: 1995, Nonlinear and Adaptive Control
Design, Wiley, New York.
Kuo, B.: 1995, Automatic Control Systems, 7th edn, Prentice-Hall, Englewood Cliffs,
New Jersey.
Lambert, J.: 1991, Numerical methods for ordinary differential equations. The initial
value problem, John Wiley, Chichester.
Lanczos, C.: 1986, The Variational Principles of Mechanics, Dover Publications, New
York.
Leonard, B.: 1979, A stable and accurate convective modelling procedure based on
quadratic upstream interpolation, Computer Methods in Applied Mechanics and En-
gineering 19(1), 59—98.
Leonard, N.: 1997, Stability of bottom-heavy underwater vehicle, Automatica 33(3), 331—
346.
Leonhard, W.: 1996, Control of Electrical Drives, 2nd edn, Springer, Berlin.
Lewis, D. and Simo, J.: 1994, Conserving algorithms for the dynamics of hamiltonian
systems on lie groups, J. Nonlinear Science 4, 253 — 299.
Lin, C. and Segel, L.: 1974, Mathematics applied to deterministic problems in the natural
sciences, Macmillan, New York.
Lohmiller, W. and Slotine, J.: 1998, On contraction analysis for nonlinear systems,
Automatica 34, pp. 683—696.
Lovelock, D. and Rund, H.: 1989, Tensors, Differential Forms, and Variational Princi-
ples, Dover Publications, New York.
Lozano, R., Brogliato, B., Egeland, O. and Maschke, B.: 2000, Dissipative Systems
Analysis and Control. Theory and Applications, Springer-Verlag, London.
Luh, J., Walker, M. and Paul, R.: 1980, On-line computational scheme for mechanical
manipulators, ASME J. Dynamic Syst., Meas., Contr. pp. 69—76.
Mäkinen, J., Piché, R. and Ellman, A.: 2000, Fluid transmission line modeling using
a variational method, J. Dynamic Systems, Measurement, and Control 122, 153 —
162.
Marsden, J. and Ratiu, T.: 1994, Introduction to Mechanics and Symmetry, Springer-
Verlag, New York.
632 BIBLIOGRAPHY
Meirovitch, L.: 1980, Computational Methods in Structural Dynamics, Sijthoff & Noord-
hoff, Alphen aan den Rijn, The Netherlands.
Merritt, H.: 1967, Hydraulic Control Systems, John Wiley, New York.
Mohan, N., Undeland, T. and Robbins, W.: 1989, Power Electronics: Converters, Ap-
plications and Design, John Wiley, New York.
Moore, F. and Greitzer, E.: 1986, A theory of post-stall transients in a axial compressor
systems: Part I—Development of equations, Journal of Engineering for Gas Turbines
and Power 108, 68—76.
Murray, R., Li, Z. and Sastry, S.: 1994, A Mathematical Introduction to Robotic Manip-
ulation, CRC Press, Boca Raton.
Nicklasson, P.: 1996, Passivity-based control of electric machines, PhD thesis, Norwegian
Institute of Technology, Dept of Engineering Cybernetics.
Niemeyer, G. and Slotine, J.: 1991, Stable adaptive teleoperation, IEEE J. Oceanic
Engineering 16(1).
Nijmeijer, H. and der Schaft, A. V.: 1990, Nonlinear Dynamical Control Systems,
Springer-Verlag, Berlin.
Ortega, R., Loria, A., Nicklasson, P. and Sira-Ramirez, H.: 1998, Passivity-Based Control
of Euler-Lagrange Systems: Mechanical, Electrical and Electromechanical Applica-
tions, Springer-Verlag.
Patankar, S.: 1980, Numerical Heat Transfer and Fluid Flow, Hemisphere Publishing
Corporation.
Patankar, S. and Spalding, D.: 1972, A calculation procedure for heat, mass and mo-
mentum transfer in three-dimensional parabolic flows, Int. J. Heat Mass Transfer
15, 1787—1806.
Pazy, A.: 1983, Semigroups of Linear Operators and Applications to Partial Differential
Equations, Vol. 44 of Applied Mathematical Sciences, Springer-Verlag, New York.
Piché, R. and Ellman, A.: 1996, A Fluid Transmission Line Model for Use with ODE
Simulators, Research Studies Press, Somerset, England, pp. 221 — 236.
Rugh, W.: 1996, Linear System Theory, 2nd edn, Prentice-Hall, Englewood Cliffs.
Sagatun, S. and Fossen, T. I.: 1991, Lagrangian formulation of underwater vehicles’
dynamics, Proc. IEEE Int. Conf. Systems, Man and Cybernetics, pp. 1029—1034.
Samson, C., Borgne, M. L. and Espiau, B.: 1991, Robot Control: The Task Function
Approach, Vol. 22 of Oxford Engineering Science Series, Oxford University Press,
Oxford.
Sanz-Serna, J. and Calvo, M.: 1994, Numerical Hamiltonian problems, Chapman and
Hall, London.
Scarborough, J.: 1966, Numerical Mathematical Analysis, sixth edn, John Hopkins Press,
Baltimore.
Sciavicco, L. and Siciliano, B.: 2000, Modeling and Control of Robot Manipulators,
Springer-Verlag, London berlin Heidelberg.
Sepulchre, R., Janković, M. and Kokotović, P.: 1997, Contructive Nonlinear Control,
Springer-Verlag, London.
Shahruz, S.: 1999, Boundary control of kirchhoff’s non-linear string, Int. Journal of
Control 72(6), 560 — 563.
Shampine, L.: 1994, Numerical Solution of Ordinary Differential Equations, Chapman
and Hall, New York.
Shampine, L., Allen, R. and Preuss, S.: 1997, Fundamentals of numerical computing,
John Wiley, New York.
Shampine, L. and Reichelt, M. W.: 1997, The matlab ode suite, SIAM Journal on
Scientific Computing 18(1). also in MATLAB Helpdesk, Online Manuals (in PDF).
Shepperd, S.: 1978, Quaternion from rotation matrix, J. Guidance and Control 1, 223—
224.
Skogestad, S. and Postlethwaite, I.: 1996, Multivariable Feedback Control. Analysis and
Design, John Wiley, Chichester.
Slotine, J.: 1991, Applied Nonlinear Control, Prentice-Hall, Englewood Cliffs, New Jersey.
Slotine, J. and Li, W.: 1988, Adaptive manipulator control: A case study, IEEE Trans-
actions on Automatic Control 33, 995—1003.
Spong, M. and Vidyasagar, M.: 1989, Robot Dynamics and Control, John Wiley, New
York.
Stecki, J. and Davis, D.: 1986a, Fluid transmission lines - distributed parameter models.
part 1: A review of the state of the art, Proc. Instn. Mech. Engrs. 200, 215 — 228.
Stecki, J. and Davis, D.: 1986b, Fluid transmission lines - distributed parameter models.
part 2: Comparison of models, Proc. Instn. Mech. Eng. 200, 229 — 236.
Strang, G.: 1988, Linear Algebra and its Applications, Saunders.
Stribeck, R.: 1902, Die wesentlichen Eigenschaften der Gleit- und Rollenlager, Zeitschrift
des Vereines Deutcher Ingenieure 46(39), 1432—37.
634 BIBLIOGRAPHY
635
636 INDEX
Electric, 33
Hydraulic, 73
Lossless, 38
Transportiveness, 605
Trapezoidal rule, 537, 539, 547, 550, 556
Twist vector, 246
Zero at infinity, 11
Zero crossing, 566