Vous êtes sur la page 1sur 250

Dynamical Systems for Creative Technology has primarily been developed with the Creative

Dynamical Systems

Dynamical Systems
Technology students at the University of Twente in mind. The book gives a concise description
of the physical properties of electrical, mechanical and hydraulic systems. Emphasis is placed

for Creative Technology


on modelling the dynamical properties of these systems. By using a system's approach it is
shown that a limited number of mathematical formulas suffices to describe the basic
properties of all of these systems. Mathematical functions such as integration and
differentiation are introduced and directly related to physical phenomena. A more abstract
description helps to systematically analyse these systems and supports the modelling process.
Job van Amerongen
The book helps to understand the behaviour of technical and non-technical systems in
general. Emphasis is on making realistic models of physical systems, which can be applied in
animations or games. In terms of a dynamical model there is little difference between the
C
suspension system of a car and the motions of a flower in the wind. It is shown that all these Se T
systems share the same basic properties, which allows the use of analogon models. A more 1 R
1 J
abstract domain-independent description helps to better understand the dynamic behaviour 0
I
and allows for modifications of the system in the domain that is most easily accessible. C
1
1 R J
The last chapters give an introduction to the role of feedback in dynamical systems. Examples I
are shown by applying these concepts to electronic simulation models with operational 0
amplifiers. Feedback control systems are briefly introduced as a means to change the
1 C J
dynamical properties of a system by means of appropriate software. I
1
0 R
Extensive use is made of the modelling and simulation programme 20-sim. Exercises stimulate
exploration of the programme and experimenting with the models. The exercises are intended 1
I C J
to raise questions rather than being classroom problems with a straightforward solution. The
0 1
book is also a good background for 20-sim users who want to understand more of the R
underlying principles of 20-sim. I 1
C
J
0 1
R
Se

Job van Amerongen


Job van Amerongen is professor in Control Engineering at the University of Twente. He has
been teaching various courses on control engineering. He is author of three courses on
modelling and simulation and control engineering of the Open university in the Netherlands.
He has been active in research on adaptive control systems applied to adaptive autopilots
and rudder-roll stabilisation for ships. He is one of the pioneers of mechatronics. The
mechatronic design philosophy, i.e. ‘the optimal and integrated design of a physical system
together with its embedded control system’ forms the basis for this book as well.

achterkant 18,5 cm + 1,5 mm voor de lijm = 18,65 voorkant 18,5 cm + 1,5 mm voor de lijm = 18,65
rug 15 mm
Dynamical Systems
for
Creative Technology
Job van Amerongen
© 2010
ii

The text was prepared with LATEX in the Fourier font.

All IPMs, block diagrams, bond graphs and plots in this book have been made with
20-sim® .

Additional information, in the form of models and movies, can be found at


http://www.controllab.nl/en/books/dynsys.html

© Job van Amerongen, 2010


All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or
transmitted in any form, or by any means, electronic, mechanical, photocopying, recording or otherwise,
without prior permission, in writing, from the author.

ISBN: 978-90-79499-07-6
Title: Dynamical Systems for Creative Technology
Author: Amerongen, J. van
Publisher: Controllab Products B.V., Enschede
Printed by: Asbreuk, Enschede
Contents

Preface vii

1 The concept of systems 1


1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Definition of ‘system’ . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 System boundary and elementary systems . . . . . . . . . . . . . . . . . 6
1.2.1 Relations between subsystems and elementary systems . . . . . 6
1.2.2 Interaction, feedback, most systems in nature . . . . . . . . . . . 7
1.3 Dynamical systems and Creative Technology . . . . . . . . . . . . . . . . 9
1.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.2 Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.3 Understand devices like a Segway . . . . . . . . . . . . . . . . . . 10

2 Dynamical Systems 13
2.1 Effects of actions only observable after some time . . . . . . . . . . . . . 13
2.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1.2 Tax measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.1.3 Pig cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.1.4 Foxes and Rabbits . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.1.5 Bank account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.1.6 Water Vessel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.1.7 Similarities between these systems . . . . . . . . . . . . . . . . . 22
2.1.8 Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.2 The role of feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.2.1 Positive feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.2.2 Negative feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.2.3 Mechanical and electrical systems . . . . . . . . . . . . . . . . . . 25

3 Integrators in dynamical systems 27


3.1 Physical meaning of integration in the time domain . . . . . . . . . . . 27
3.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.1.2 Hydraulic systems: water tank . . . . . . . . . . . . . . . . . . . . 27
3.1.3 Mechanical systems: spring and mass . . . . . . . . . . . . . . . . 29
3.1.4 Electrical systems: capacitor and inductance . . . . . . . . . . . 31
3.1.5 Initial conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.2 Inverse operation: differentiation . . . . . . . . . . . . . . . . . . . . . . 33
3.2.1 Differential operator to represent a differentiator . . . . . . . . . 34
3.3 Differential equations and transfer functions . . . . . . . . . . . . . . . . 34
3.3.1 First-order linear system . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4 Overview of the different domains . . . . . . . . . . . . . . . . . . . . . . 38

iii
iv CONTENTS

4 Ideal physical models 39


4.1 Basic physical phenomena . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2 Ideal Physical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2.2 Mechanical systems . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.2.3 Simulations of mechanical systems with IPM’s . . . . . . . . . . . 46
4.2.4 Electrical systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.2.5 Simulations of electrical systems with 20-sim . . . . . . . . . . . 50

5 Numerical simulation 53
5.1 The need for numerical simulation . . . . . . . . . . . . . . . . . . . . . 53
5.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.2 Numerical integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.2.1 Difference versus differential equations . . . . . . . . . . . . . . . 59
5.2.2 Euler integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.2.3 Tustin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.2.4 More advanced methods . . . . . . . . . . . . . . . . . . . . . . . 65
5.2.5 Sorting the equations . . . . . . . . . . . . . . . . . . . . . . . . . 65
5.2.6 Accuracy versus efficiency . . . . . . . . . . . . . . . . . . . . . . . 66

6 Electrical Circuits 69
6.1 Elementary models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.1.2 Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
6.1.3 Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.2 Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.2.1 Kirchhoff’s laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
6.2.2 Concept of impedance . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.2.3 Electrical networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
6.3 Computations versus simulations . . . . . . . . . . . . . . . . . . . . . . 87
6.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

7 Mechanical Systems 91
7.1 Elementary models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
7.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
7.1.2 Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7.1.3 Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.2 Computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
7.2.1 Impedances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
7.2.2 D’Alembert’s law . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
7.3 Mechanical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.3.1 Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
7.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
CONTENTS v

8 Domain Independent Descriptions 107


8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
8.1.1 Analogies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
8.2 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.2.1 Power ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
8.2.2 Graphical representation with power bonds . . . . . . . . . . . . 110
8.2.3 Signals versus power-port connections . . . . . . . . . . . . . . . 113
8.3 Transducers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
8.3.1 DC-motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
8.3.2 Tacho generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
8.3.3 Potentiometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
8.3.4 Other transducers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

9 Bond graphs 121


9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
9.2 Junctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
9.3 Bilateral signal flows and causality . . . . . . . . . . . . . . . . . . . . . . 124
9.4 Deriving equations from a causal bond graph . . . . . . . . . . . . . . . 129
9.5 Causality assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
9.5.1 Causal conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
9.5.2 Causality assignment in 20-sim . . . . . . . . . . . . . . . . . . . . 135
9.5.3 Summary of this chapter . . . . . . . . . . . . . . . . . . . . . . . . 136

10 Review of Chapters 1-9 139


10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
10.2 System descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
10.2.1 (Causal) Relation diagrams . . . . . . . . . . . . . . . . . . . . . . 141
10.2.2 Ideal Physical Models . . . . . . . . . . . . . . . . . . . . . . . . . 143
10.2.3 Bond graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
10.2.4 Block diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
10.3 Physical domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
10.3.1 Electrical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
10.3.2 Mechanical Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 157
10.3.3 Hydraulic Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
10.3.4 Thermal Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
10.4 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
10.4.1 Preparing models for simulation . . . . . . . . . . . . . . . . . . . 164
10.4.2 Deriving equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
10.5 To conclude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

11 Feedback Control Systems 169


11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
11.2 Feedback as a property of the system . . . . . . . . . . . . . . . . . . . . 172
11.2.1 Biological and environmental systems . . . . . . . . . . . . . . . 172
11.3 Feedback as a tool for changing a system’s behaviour . . . . . . . . . . . 174
11.4 Basic properties of feedback systems . . . . . . . . . . . . . . . . . . . . 179
vi CONTENTS

11.4.1 Feedback of first-order systems . . . . . . . . . . . . . . . . . . . . 180


11.4.2 Feedback of second-order systems . . . . . . . . . . . . . . . . . . 183
11.4.3 Feedback of third-order systems . . . . . . . . . . . . . . . . . . . 185
11.4.4 PID-control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
11.4.5 Control of unstable systems . . . . . . . . . . . . . . . . . . . . . . 187
11.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

12 Operational amplifiers 193


12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
12.2 Ideal operational amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . 195
12.2.1 Operational amplifiers with impedances . . . . . . . . . . . . . . 199
12.2.2 Analogue simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 202
12.2.3 Multiple views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
12.2.4 Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

13 Embedded control systems 209


13.1 Computers used as controllers . . . . . . . . . . . . . . . . . . . . . . . . 209
13.2 Digital control of continuous-time systems . . . . . . . . . . . . . . . . . 210
13.2.1 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
13.2.2 AD- and DA-conversion . . . . . . . . . . . . . . . . . . . . . . . . 212
13.3 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
13.4 Theoretical limits of the sampling frequency . . . . . . . . . . . . . . . . 218
13.4.1 Noise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
13.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

A Tables and symbols 225


A.1 Formulas for several physical domains . . . . . . . . . . . . . . . . . . . 225
A.2 Icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
A.2.1 Electrical domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
A.2.2 Mechanical domain (translation) . . . . . . . . . . . . . . . . . . 227
A.2.3 Mechanical domain (rotation) . . . . . . . . . . . . . . . . . . . . 228
A.3 Causality assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
A.4 Summary of formulas and representations . . . . . . . . . . . . . . . . . 231
A.5 Blockdiagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
A.6 Operational amplifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Preface

Dynamical Systems for Creative Technology gives a concise description of the phys-
ical properties of electrical, mechanical and hydraulic systems. Emphasis is placed
on modelling the dynamical properties of these systems. By using a system’s ap-
proach it is shown that a limited number of mathematical formulas suffices to de-
scribe the basic properties of all of these systems. Mathematical functions such
as integration and differentiation are introduced and directly related to real world
phenomena, ranging from pure technical systems, to motions of flowers or social
systems. More abstract descriptions help to systematically analyse these systems
and support the modelling process. The cover reveals this idea by giving a num-
ber of representations of the same phenomenon. In terms of a dynamical model
there is little difference between the suspension system of a car and the motions of
a flower in the wind.
The first chapters deal with describing basic systems in the hydraulic, electri-
cal and mechanical domain. Mathematical and simulation tools are introduced
and used to analyse such systems. Next, it is shown that all these systems share
the same basic properties, which allows the use of analogon models. A more ab-
stract domain-independent description helps to better understand the dynamic
behaviour and allows for modifications of the system in the domain that is most
easily accessible.
The last chapters deal with the role of feedback in dynamical systems. Examples
are shown by applying these concepts to electronic simulation models with oper-
ational amplifiers. Feedback control systems are briefly introduced as a means to
change the dynamical properties of a system.
In the text and exercises extensive use is made of the modelling and simulation
programme 20-sim. This programme supports all the models used in this course,
especially icon-based physical models. The exercises stimulate exploration of the
programme and experimenting with the models. The exercises are intended to raise
questions rather than being classroom problems with a straightforward solution.
I would like to acknowledge the comments on draft versions of this book. Sev-
eral people contributed to improvements but the help of my wife Gerda, daughter
Renée and Christian Kleijn is especially acknowledged. Comments of the readers
are welcome too: feedback is a good principle to reduce errors and realise a good
result.

Job van Amerongen


J.vanAmerongen@utwente.nl
November 2010

vii
viii PREFACE
1
The word system is regularly used in everyday life
and with many different meanings. In this chapter
we will consider several technical and
non-technical systems and give a definition.

The concept of systems

After studying this chapter you are expected to be able to

– explain the notion of a ‘system’


– divide a complex system into subsystems
– determine the system boundary and define the environment of the system
– identify the relations and interactions between the subsystems
– recognise elementary subsystems.

1.1 Introduction
The word ‘system’ has many different meanings in everyday life, although it is sel-
dom well defined. This course deals with the description of systems, making a
‘model’ of a system and analysing the behaviour of systems. Special focus will be
on so called dynamical systems. These are systems where the effect of a certain ac-
tion only becomes visible, or reaches a steady state, after some time. An example is,
for instance, a central heating system. If you set a higher temperature at the ther-
mostat, it is only after some time that the radiators heat up and it takes even longer
before the room gets warmer and finally reaches a constant temperature (the steady
state). There are many more examples of such systems. Tax measures often only
have observable effects some time after the measures were taken. In an economi-
cal crisis some of the effects only become apparent long after the crisis has started.
In electrical circuits or mechanical systems dynamical effects are also important.
If you want to create a realistic computer game, these effects should be well under-
stood.

Exercise 1.1
Describe some more systems where there is a cause and effect and where the effect is only
observed after some delay.

1
2 CHAPTER 1. THE CONCEPT OF SYSTEMS

1.1.1 Definition of ‘system’


The Webster dictionary gives several definitions of systems:

– a regularly interacting or interdependent group of items forming a unified whole <a


number system>
– a group of interacting bodies under the influence of related forces <a gravitational
system>
– an assemblage of substances that is in or tends to equilibrium <a thermodynamic
system>
– a group of body organs that together perform one or more vital functions <the
digestive system>
– the body considered as a functional unit
– a group of related natural objects or forces <a river system>
– a group of devices or artificial objects or an organization forming a network esp. for
distributing something or serving a common purpose <a telephone system> <a
heating system> <a highway system> <a data processing system>
– a major division of rocks usually larger than a series and including all formed
during a period or era
– a form of social, economic, or political organization or practice <the capitalist
system>
– an organized set of doctrines, ideas, or principles usually intended to explain the
arrangement or working of a systematic whole <the Newtonian system of
mechanics>
– a manner of classifying, symbolizing, or schematizing <a taxonomic system> <the
decimal system>

1.1.2 Modelling
It will be clear from the list above that one thing all these definitions have in com-
mon, is that a system has some complexity and that it consists of several parts or
components that interact with each other. Therefore, we will use the following defi-
nition of a system:

system A system is an interacting or interdependent group of items forming a


coherent whole

and of a system’s approach:

system’s A system’s approach means that we consider all interacting items in a


approach
holistic view
1.1. INTRODUCTION 3

A holistic view implies that we consider all aspects that are important. This in-
cludes the effects that may become relevant later in time or at other places. Con-
sidering the complete life cycle of a product is an example of such an approach.
The cost and environmental impact of a product is not only related to the produc-
tion and use of a product, but also to its disassembly or environmental impact (e.g.
if the product ends its life in the trash bin).
The before-mentioned central heating system is an obvious example of a system.
A central heating system is a real physical system. However, as soon as we try to
describe it, we are forced to make a simplified description of the system. We often
call this a model. The process that leads to such a description is called modelling.

A model is a simplified description of a system, just complex enough model


to describe or study the phenomena that are relevant for our problem
context.

Likewise an MP3-player or an economical system can be considered from a sys-


tem’s point of view. We will analyse this in a little more detail. This will demonstrate
that there is not a unique description of a system, but that the description depends
on the context.

MP3-player

An MP3-player can be considered as a ‘system’, because it consists of a number of


elements that only together give the MP3-player its functionality. It consists of a
case with a display and buttons to control the player. Inside are the electronics,
memory and batteries. An industrial designer will consider the MP3-player as a
device that should look pretty, should have a small size and weight, and which can
easily be controlled by the user. An electrical engineer will consider the device as
an electronic system, where low power consumption and reliable components
are the main concern. A programmer will consider it as a very simple computer
where efficient code is necessary in order to fit into the limited amount of mem-
ory that is allocated for the programming. On a higher level all of these subsystems
should be considered simultaneously in order to come to an attractive, useful and
environmental-friendly device that can be sold for a competitive price. Adding
extra storage for the music will increase the price and will probably endanger the
commercial success of the product. The subsystems cannot be seen independently
of each other. If it is desired to replace the mechanical buttons by a touch screen,
some mechanical and electronic components become obsolete, but additional soft-
ware is needed to handle the commands on the screen.
4 CHAPTER 1. THE CONCEPT OF SYSTEMS

Water clock

A system that shows several of the effects mentioned here is a water clock, used al-
most 3500 years ago in ancient Egypt. The basic principle is illustrated in figure 1.1.

time
B

F IGURE 1.1 Simplified diagram of a water clock

Tanks A and B together act as source of constant water pressure. Together they can
be seen as equivalent to the cistern of a toilet. Tank A is the water supply. This could
be a river, a large vessel filled with water or just a tap. This supply should never be
empty. But because the level in the vessel may vary, the pressure at the outlet in the
bottom is not constant over time. On the contrary, the level in tank B is kept con-
stant by means of a floater. When the water level in tank B drops, because of water
flowing out of tank B at the bottom, the floater opens the outlet of tank A and so
automatically fills tank B to the level where the ‘valve’ is closed again. The floater,
which measures the water level and opens the valve if the water level is not at its
correct value, ‘controls’ the water level in tank B , such that it remains at a constant
value. We call such a system a ‘level control system’.

Exercise 1.2
When the level in tank B is constant, the level in tank C can be used (by means of the
floater and the scale) as a measure of time. Explain why.

causal relation This can be drawn schematically in a so-called causal relation diagram (figure 1.2).
diagram
The direction of the arrows in the diagram indicates the cause-and-effect relations.
When the level in tank B decreases (the cause) the effect is that the floater comes in
a lower position. The lower position of the floater is the cause that the valve opens
(the effect). In this case the plus signs indicate that this flow increases the level in
the tank while the minus signs indicate an outgoing flow.
environment In the right part of figure 1.2 we model a part of the system as the environment,
because we are not interested in further study of the level in tank A. Only the vari-
able pressure at the bottom of this tank is relevant for the rest of the system.
1.1. INTRODUCTION 5

F IGURE 1.2 Causal relation diagram of the control system implemented with
tank A and B.
Left: tank A as a part of the system.
Right: tank A not modelled because it is seen as a variable pressure
supply and part of the environment.

Exercise 1.3
The system in the right part of figure 1.2 is in fact nothing else than the ‘level control sys-
tem’ of the cistern of a toilet. After flushing the toilet a floater opens the tap and closes the
tap again when the cistern is fully filled. Have a look at this system at home and identify
the different elements (if it is not a modern built-in system). The practical implementa-
tion is often not as straightforward as the simple system discussed here, but in principle it
will be similar.

Because of this ‘control system’ the water level in tank B is constant and thus also
the water pressure at the outlet of tank B . This results in a constant flow of water
out of tank B into tank C . The height of the floater in tank C , which can be con-
nected with a readout is proportional with time and can thus be used as a clock.
This causal relation diagram shows the relations between the different elements
of the system. It also makes clear that the behaviour of some elements depend on
the elements themselves. For instance, the level in tank B is influenced by itself
because the amount of water flowing out of tank B depends on the level in tank B .
(Although as long as the level of tank B is kept constant you probably do not realise
6 CHAPTER 1. THE CONCEPT OF SYSTEMS

feedback this dependency.) Such a dependency is called feedback. Another feedback loop is
present because the level in tank B influences the position of the floater, which by
controlling the flow of water into tank B , also influences the level of water in tank
B . This latter feedback was intentionally added in order to keep the level in tank
feedback control B constant. This results in a feedback control structure. Feedback structures are
present everywhere in nature, in biological systems and in social systems. Often
they are inherently present and not recognised as such. When we add a feedback
loop to keep certain quantities constant (e.g. the temperature in all systems with a
thermostat) or to prescribe certain motions (e.g. the movements of a robot), we talk
control system about a control system.

1.2 System boundary and elementary systems


There are different ways to look at a system. Parts, which we consider as irrelevant
are certainly not part of the system. In many cases there are influences from ’out-
side’ on the system. In figure 1.2 the level in tank A is determined by a waterflow
that is not directly related to other parts of the system and certainly not influenced
by other parts of the system. The model is simplified if we consider the varying wa-
ter level in the tank as an environmental quantity. We can model this by means of a
signal that represents the water pressure at the ‘valve’. Then we do not have to de-
scribe or analyse this part of the system further. Only the result, an unknown and
variable input signal, remains. This implies that tank A is considered to be outside
environment the system boundary and as part of the environment. We can leave out the details
and consider only the relevant variable, the pressure at the bottom of tank A. Such
input signal a signal is seen as an input signal. In a similar way there are signals going out of the
output signal system to the environment. Such signals are referred to as output signals. In this
example the output signal is the level in tank C , which is a measure of the time.

1.2.1 Relations between subsystems and elementary systems


The system in figure 1.2 was split into several subsystems. We considered the tanks,
subsystem the floater and the effective opening of tank A as subsystems. The subsystems in-
teract with each other because they are connected to each other. In the case of fig-
ure 1.2 the interactions are clearly cause and effect relations. The pressure in tank
A determines via the opening at the bottom the flow of water into tank B . If we had
not implemented the floater, the water level in tank B would have no influence on
this flow. Similarly the water level in tank C does not influence the flow out of tank
B . When such ‘actions’ do not invoke any reaction we can indicate the direction of
these interactions with a simple arrow. There are also many systems where each
action also causes a reaction, as we will see later.
We can continue splitting subsystems into more detailed subsystems until we
have subsystems that are so simple they cannot be split anymore. Such subsys-
tems can e.g. be described by a very simple and elementary relation between the
elementary input and output variable. These subsystems are called elementary systems. If, in
system
1.2. SYSTEM BOUNDARY AND ELEMENTARY SYSTEMS 7

another context, the subsystem could be split further it is no longer an elementary


subsystem. Tank C can be considered as an elementary system. It only collects the
incoming flow. If this flow ϕi n is constant the volume V of water in the tank will
continuously increase:
V = ϕi n t (1.1)

The change in the volume in [m 3 ] is thus the product of the constant incoming flow ϕi n
in [m 3 s −1 ] times the time in [s ]. These dimensions help to check if the formula is right:
the volume is [m 3 ]=[m 3 s −1 ] · [s]

The subsystem ‘tank B ’ is not an elementary subsystem. Because of the leakage the
volume not just depends on the incoming flow. The outgoing flow depends on the
level in the tank and thus on the volume of water in tank B . The simple eq. 1.1 is
thus not applicable. We should also ‘model’ the opening in the bottom of tank B ,
which determines the water flow out of this tank.

1.2.2 Interaction, feedback, most systems in nature


The world would be simple if it only consisted of elementary systems that did not
interact with each other. However, interacting elementary systems form more com-
plex subsystems and so on. Analysing and describing the relevant phenomena in
such a system leads to a model of the system. So far we did this only qualitatively,
but if we know how to describe the elementary systems and the interconnections
with formulas and parameters, such a model can be used to compute and thus pre-
dict or analyse the behaviour of a system. Models are widely used to design techni-
cal systems, to make predictions of the weather or the economy as well as in train-
ing simulators and games.

Forms of interaction

In a system, which consists of several subsystems, there are various forms of inter-
action. Figure 1.3 gives an overview of different possibilities.

F IGURE 1.3 Different forms of interaction in a system


8 CHAPTER 1. THE CONCEPT OF SYSTEMS

We see three subsystems separated by the dashed line from the environment.
The input signal (a) represents a known or measurable signal from the environ-
ment that influences the system. The output signal ( f ) is a signal that can be ob-
served in the environment. The signals (b, c, d , e) cannot be observed in the envi-
ronment, otherwise these would be output signals as well. The disturbance signal
(g ) is an input signal that is not easily measurable or unknown. It represents all the
unknown or unmeasurable inputs of the system. Signals (b) and (c) are internal
interconnections, which connect the subsystems 1 and 2 and 2 and 3 respectively.
Signals (d ) and (e) are feedback signals because due to these signals, feedback loops
are created. For instance, the feedback signal (d ) indicates that the signals in sub-
system 2 depend on themselves. And because of the feedback signal (e) also the
signals in subsystem 3 depend on themselves, although this is a more complex rela-
tion: through subsystems 1 and 2. The same holds of course for subsystems 1 and 2
because all the subsystems are part of the feedback loop.

Exercise 1.4
When you are exercising or do some heavy work, your body gets warm. In order to prevent
that the body becomes overheated, you will start to sweat. Depending on the humidity of
the air this will cool down the body. Make a causal relation diagram that describes this
process. There are many more of such feedback mechanisms in the human body. Identify
and describe a few more.

Pure signals and bilateral interaction

In figure 1.3 the interaction from one subsystem to the other is realised by directed
edge edges. The arrows at the end of the edges indicate the direction of the information
flow. This implies in the example of figure 1.4 that subsystem 1 (the sound ampli-
fier) influences the sound in the room through the behaviour of subsystem 2 (the
room acoustics). In general the acoustics of the room do not influence the be-
haviour of the sound amplifier and certainly not the CD or the MP3-player memory
itself.

F IGURE 1.4 A sound amplification system: unilateral interaction

There are also many systems where the action of one subsystem leads to a reaction
of the other subsystem. In that case we could use two arrows, or just a single edge
bilateral without any arrows. An example of such a system with bilateral interaction is the
interaction
mass spring system of figure 1.5. When the mass moves the length of the spring
changes and thus the force, which the spring exerts on the mass. This force changes
the acceleration, speed and position of the mass. The changing position of the mass
1.3. DYNAMICAL SYSTEMS AND CREATIVE TECHNOLOGY 9

changes again the length of the spring and thus the force, which the spring exerts
on the mass. Although the mass and the spring can be considered as elementary
subsystems or submodels, their behaviour can only be studied in combination.
We cannot decide here what is action or reaction. Therefore, we could use an edge
without any arrows to connect the two subsystems.

F IGURE 1.5 3 models showing the bilateral interaction in a system with a mass
and spring hanging on the ceiling.
a) iconic diagram,
b) causal relation diagram,
c) a-causal model

Diagrams with only directed edges, such as figure 1.3 and figure 1.4 are called
causal relation diagrams, because the signals (edges) in these systems indicate a
cause and effect relation between the subsystems. Figure 1.5b also represents a
causal relation diagram, because it indicates the influence of the spring position or
spring force on the mass as well as the influence of the mass velocity on the change
in the spring position. Figure 1.5c gives the same relations but now without choos-
ing what we consider as cause and effect. We call such a model an a-causal model. a-causal
Such models are appropriate for most physical systems.

1.3 Dynamical systems and Creative Technology


1.3.1 Introduction
There are several reasons why the knowledge you will gain from this course is needed
if you want to achieve results in the areas covered by creative technology: new me-
dia and smart technology. As an example let us first have a look at computer games.
In computer games all kinds of phenomena from real life have to be animated or
simulated. Whether it is a bouncing ball, a car that accelerates or decelerates or
even crashes, or flowers that move in the wind, all kinds of physical phenomena
play a role. Understanding these phenomena is essential to make the motions ap-
pear realistic. This requires some basic knowledge of mechanical systems and how
such systems behave when they interact with the environment. Nowadays there
are many good software tools that help to make models of such systems. Still, a ba-
sic understanding of the physics and mathematics behind it is essential to make
10 CHAPTER 1. THE CONCEPT OF SYSTEMS

proper use of such systems. Throughout this course we will give examples of such
systems, show how these can be computed with spreadsheets, with special sim-
ulation software, or by programming these systems yourself. As such, this course
relates to the course motion and modelling, which goes into more detail on the
mathematics behind the systems we will discuss here, and courses on program-
ming, where the examples of this course are used to illustrate programming.

1.3.2 Electronics
In many situations we want to make interactive games, interactive media or smart
systems that interact with the environment. This is where the virtual world and the
real world meet. Besides software, hardware is needed for telecommunication, in-
terface electronics, and so on. This course is the basis for introductory courses on
electronics and wireless communications and control systems.

1.3.3 Understand devices like a Segway


Electronics and software penetrate into all kinds of systems, which until recently
were of a pure mechanical nature or even non-existent. The addition of intelligence
to such mechanical systems enables the construction of completely new devices,
which often perform better and are less expensive than older solutions. In order
to come to optimal solutions it is essential that such systems are designed from a
systems point of view.
This implies that rather than designing different subsystems in succession, the
system is considered as a whole. Let us consider the design of an electrical vehicle
that is able to transport a person with a speed equal to a bicycle. In contrast to the
bicycle, we want the system to be stable under all circumstances, also at zero speed.
When we search for a solution in the mechanical domain, we more or less automat-
ically come to a vehicle with three or four wheels. A device with one or two wheels
is unstable, certainly when it is not moving. It would be an attractive device, how-
ever, because it can be made smaller and probably more manoeuvrable.
A standing human being is not very stable either as we can see with young kids.
Constant control actions are needed to stay upright and not fall down. A sensor in
the inner ear determines differences with respect to the equilibrium position and
steers muscles to make the necessary corrections in the position.
What if we were to copy this idea into our vehicle design. Something has to be
added that would always stabilise the vehicle. This requires an automatic control
system just as in the case of the human equilibrium. When the vehicle is equipped
with appropriate sensors, ’brains’ and actuators it will be able to actively stabilise
itself under all conditions. This could result in a vehicle such as the two-wheeled
self-balancing ‘Segway’ (figure 1.6). In order to develop such a system and to under-
stand the electronics and, even more important, the control algorithms needed to
stabilise the system, first of all a good understanding of the dynamic behaviour of
all the components in the system is needed.
1.3. DYNAMICAL SYSTEMS AND CREATIVE TECHNOLOGY 11

F IGURE 1.6
Segway
(photo: Jan Hesselink)
12 CHAPTER 1. THE CONCEPT OF SYSTEMS
2
A basic property of dynamical systems is that their
behaviour depends on what happened in the past.
We could observe the system at fixed time
intervals, e.g. every month, or in a more
continuous way. We will see examples of both
classes of systems.

Dynamical Systems

After studying this chapter you are expected to be able to

– identify the dynamic properties of real-life and physical systems


– identify feedback loops in such systems
– explain the effects of positive and negative feedback
– explain the role of continuous and discrete-time storage elements in such systems
– compose simple dynamic systems of these subsystems.

2.1 Effects of actions only observable after some time


2.1.1 Introduction
Often people who have to take decisions have little or no idea of the effect of their
measures over a longer time period. They expect a certain effect of the measures
they take, but forget, or are simply not able to understand, that a different outcome
may be observed in the long run. This is not only true in social systems. Such time-
dependent effects are also present in technical systems. In order to get insight into
these effects, it is important that all effects are identified and that the relations are
well described. ‘Well described’ means that we describe such, sometimes complex,
systems as dynamical systems. This implies that we do not only look at the imme-
diate effect –the static relation– between two quantities in the model, but also pay
attention to how these effects evolve in time.

2.1.2 Tax measures


Suppose the government wants to raise taxes. If, at the same time, they have the
goal that people should smoke less, it seems attractive to increase the taxes on to-
bacco and cigarettes. However, these two goals cannot be met simultaneously. If
the effect of the tax increase on the smoking habits of people is small, the goal of
more tax income for the government is realised. However, if the price increase of

13
14 CHAPTER 2. DYNAMICAL SYSTEMS

cigarettes is so high that people really refrain from smoking, the total amount of
taxes may even be lower than it was before the tax measure.
Sometimes people just go on buying products whatever the price may be. In
economics this is referred to as the price elasticity (See e.g. wikipedia: The demand
price elasticity for a product is relatively inelastic when the change in quantity demanded is less
than change in price. Goods and services for which no substitutes exist are gener-
ally inelastic.) If demand varies a lot as a function of the price the elasticity is said to
be high.
However, the reality is more complex. Because of the increase in tobacco prices
many people might decide to quit smoking. The measure seems thus to be suc-
cessful. But many addicted smokers will relapse and go back to their bad habits
again after some time. In that case, the tax income will increase after some time. In
model order to predict what will happen in the long run, a good model of this economic
phenomena should be available. Depending on what the real goal is: getting more
money from smokers or increasing the health of the population, decisions of the
most adequate price increase could be made with such a model.

Exercise 2.5
Make a causal relation diagram of the system that describes the phenomena discussed
here.

2.1.3 Pig cycle


A well known example of a dynamical system is the so-called ‘pig cycle’ or ‘pork
cycle’. Farmers who raise pigs will expand their activities when they can make a lot
of money with the pigs. If the prices are low they will be much less enthusiastic to
do so. When all farmers respond to the good prices by producing more pigs, after
about 4 months a lot of pigs are born. When they have grown enough there will be
a large supply of pigs, resulting in price drops (the elasticity is rather high here).
Farmers will decide that the pig business is not so good and will stop producing
pigs. After some time, prices will be sky high again, because the demand is higher
than the supply. Based on such primary reactions prices will heavily fluctuate and
so will the economic activity in the pig industry.
Example
Figure 2.1 demonstrates this behaviour. When the supply (number of pigs ready to
be sold) is low, the prices are high and all farmers start breeding. But it takes a while
before the pigs grow up. Because of the increased supplies the prices drop, farmers
reduce the breeding, and so on...

We see this in many other economic systems. People tend to buy stocks when they
have performed well recently. The increasing demand leads to higher prices, at-
tracting more people to the stock market. When big investors cash their profit,
prices start dropping and more and more people sell their stocks.
2.1. EFFECTS OF ACTIONS ONLY OBSERVABLE AFTER SOME TIME 15

400 pigs

300

200

100

400 price

300

200

100

400 breeding

300

200

100

0 5 10 15 20 25 30
time {months}

F IGURE 2.1 Production and prices vary periodically in the ’pig cycle’

Exercise 2.6
Think of other systems that show such a behaviour. Also try to identify the elements in
such a system. Draw a causal relation diagram.

2.1.4 Foxes and Rabbits


A classical example of a (dynamical) ecological system is a prey/predator system of
foxes and rabbits. The growth of the rabbit population is determined by the amount
of food available to the rabbits as well as their birth rate. The population decreases
because rabbits die due to illnesses or because they are eaten by foxes. In a simi-
lar way the population of foxes expands when there are enough rabbits to be eaten
and shrinks because foxes die. In order to study this system we can make a simpli-
fied model. We consider the population of rabbits R k in month k. This population model
is equal to the population one month earlier (R k−1 )), increased with the newly born
rabbits and decreased by the number of rabbits that die due to lack of food and by
meeting foxes. We assume that the newborns are proportional to the number of
rabbits in the last month (aR k−1 ). We assume that there are two reasons why rab-
bits die. The first reason is that there is not enough food. When there are only a few
rabbits, lack of food is hardly an issue. When there are more rabbits the competi-
tion for food increases more than proportional to the number of rabbits. Therefore,
we assume (rather arbitrarily) that this relation can be described as a quadratic re-
2
lation: bR k−1 . The second reason is that they are eaten by foxes. The number of
rabbits eaten by a fox is proportional with the number of foxes and the number of
rabbits cR k−1 F k−1 .
16 CHAPTER 2. DYNAMICAL SYSTEMS

We assume that the newborn foxes are proportional with the number of foxes
and their food supply (i.e. the number of rabbits) eR k−1 F k−1 . We will not use the
shortage of food in the mortality rate of the foxes, but simply assume that the num-
ber of foxes that die is proportional to their number −d F k−1 .

Exercise 2.7
Make a causal relation diagram of the system that describes the phenomena discussed
here. Make use of the symbols in the description given so far. This will help to derive the
equations necessary to simulate the system.

From a causal relation diagram with enough detailed information, we can easily
derive the two equations that describe this system. The population of rabbits can
then be described by the equation:

2
R k = R k−1 + aR k−1 − bR k−1 − cR k−1 F k−1 (2.1)
or by computing one step ahead:

R k+1 = R k + aR k − bR k2 − cR k F k (2.2)
Similarly the population of foxes can be described as:

F k+1 = F k − d F k + eR k F k (2.3)

because we assumed that the population of foxes decreases proportional to the


number of foxes (d F k ) and the population grows because foxes eat rabbits (eR k F k ).
There are various ways to simulate such a system. In figure 2.2 and figure 2.3 a
We use here spreadsheet was used with the following numerical values:
rather arbitrary
symbols
a = 0.4
a, b, c, d , e for the
constants in the b = 0.001
equations. R
relates to the c = 0.01 (2.4)
rabbits, F to the
d = 0.1
foxes and k to the
discrete moments e = 0.002
in time.
Simulation programs like 20-sim and Simulink can be used as well. And of course
such a model could also be programmed in programming languages, such as ‘Pro-
cessing’.

Exercise 2.8
Of course these results depend on the parameters used. Make a simulation model yourself
in an environment of your choice, play with the parameters and try to interpret the results.
2.1. EFFECTS OF ACTIONS ONLY OBSERVABLE AFTER SOME TIME 17

200
R
180
F
160

140

120

100

80

60

40

20

0
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61

F IGURE 2.2 Number of foxes F and rabbits R as a function of time (60 months)

foxes
100 versus
rabbits
80

60

40

30

20

10

0
0 50 100 150 200

F IGURE 2.3 Number of foxes F as a function of the number of rabbits R


(60 months)

2.1.5 Bank account


Another simple example of a dynamic system is a bank account. If we assume that
there are no deposits or withdrawals made then the amount of money in the ac-
count grows continuously, because of the daily or annual interest. Let the interest
of, say 5%, be computed annually. After n years the account holds 1.05n times as exponential
growth
much money as in year 1. This is called exponential growth. Exponential growth is
the result of positive feedback . Exponential growth is observed in many systems. It positive feedback
has been observed in the world’s oil consumption (for several years the consump-
tion increased with x% per year), population (y% population increase per year) etc.
This mechanism is also present in the term R k = aR k−1 in the example of foxes and
rabbits. In such processes the exponential growth comes to a halt, because other
mechanisms, like too little food for the growing population, epidemics or the influ-
ence of predators. This leads to negative feedback loops. When the net result of the negative
feedback
positive and negative feedback loops is zero, the system is in equilibrium.
18 CHAPTER 2. DYNAMICAL SYSTEMS

In the example of the bank account we observe another mechanism as well: The
account can also grow because of deposits. This growth is not dependent on the
amount of money in the bank account, but only on ‘external’ factors. The same
holds for the withdrawals. This can be expressed in a causal relation diagram (See
figure 2.4)

wcth MOI WC'l 1 (w)

ciepo~it{ d) +
----
h~
. ~ ac~~
-4­

F IGURE 2.4 The balance of the bank account increases due to interest and de-
posits, and decreases due to withdrawals

The balance B of the bank account, depends thus on the interest α, the deposits
d and the withdrawals w, according to eq. 2.5. The terms d k and w k can be seen as
input external inputs of the system.

B k+1 = B k + αB k + d k − w k (2.5)
This can be written as
B k+1 = (1 + α)B k + d k − w k (2.6)
or

B k+1 = (1 + α)B k + u k (2.7)


where u k = d k − w k represents the external inputs. We see that the new total bal-
ance (B k+1 ) is equal to the previous balance (B k ) plus the annual interest (αB k ) –a
term, which depends on the previous balance– plus the net result of deposits and
withdrawals, the external inputs (u k ).

2.1.6 Water Vessel


In chapter 1 we considered a water clock. This water clock consisted of three tanks.
We saw that the volume V (t ) as a function of time of tank C changed according to
eq. 1.1:
2.1. EFFECTS OF ACTIONS ONLY OBSERVABLE AFTER SOME TIME 19

V (t ) = ϕt (2.8)
or in words: when the flow into the tank is constant, the volume V (t ) is found by
multiplying this flow (in [m 3 /s]) with the time t [s]. A more precise formulation is

V (t ) = ϕt + V (0) (2.9)
where V (0) is the volume of water in the tank at t = 0, at the start of our observa-
tions..
We could consider this water tank in a similar way as the systems of the bank
account or the fox and rabbit populations, by only describing the observations at
certain time intervals ∆T e.g. every second. In that case the volume in the tank is
described as:

V (k + 1) = V (k) + ϕ ∆T (2.10)
Let us generalise this a bit and consider the situation that the net incoming flow is
not constant. Then we get the equation:

V (k + 1) = V (k) + ϕ(k) ∆T (2.11)


This could also be written by summing up the changes in the volume from t = 0
until t = kT , using the sum symbol :
P
sum

k
ϕ(i ) ∆T + V (0)
X
V (k) = (2.12)
i =0

In the case of the bank account such a description is the most appropriate. How-
ever, in the case of the water vessel, we are dealing with a continuous time process.
Changes happen continuously, at infinitesimal small time intervals. Therefore a de-
scription as in eq. 2.8 is more natural. But this equation is only valid if the flow ϕ is
constant. In the case of a constant flow eq. 2.12 simplifies to:

k
(ϕ ∆T ) + V (0)
X
V (k) = (2.13)
i =0

or, because also ∆T is constant

V (k + 1) = ϕ ∆T + V (k) (2.14)
In general a description for non-constant flows (ϕ = ϕ(t )) is more interesting. This
can be obtained by considering eq. 2.12 for infinitesimal small time intervals ∆T . To
indicate that ∆T is very small, we write dt instead of ∆TR. Simultaneously we change
the sum symbol , by a stylised S, the integral symbol .
P
integral

Z T
V (T ) = (ϕ(t ) dt ) + V (0) (2.15)
t =0
20 CHAPTER 2. DYNAMICAL SYSTEMS

This can be illustrated with figure 2.5. In this figure we see at the left a causal rela-
tion diagram with the input signal ϕi n and the output signal V . Because eq. 2.15
gives a more quantitative description, we can also represent this in the form of a so
block diagram called block diagram. This block diagram is drawn at the right of figure 2.5. Such a
block diagram can be directly simulated with 20-sim.

tank

F IGURE 2.5 A water tank modelled as an integrator

The block diagram of figure 2.5 is in fact a graphical representation of eq. 2.15. Or in
words: the output signal V is the integral (contents of the block) of the input signal ϕ.
Note that the initial condition (V (0)) is assumed to be zero in this block diagram.

In high school mathematics integration is often treated in a very abstract way. Mostly
integrals of the form f (x)d x are considered. Of course x can be any variable. In dy-
R
namical systems we always consider systems where the behaviour as a function of time is
important. In such a system integration over a time interval (or in the case of discrete sys-
tems, summation) is almost always present. This is not only true for the water vessel, but
also when we want to describe mechanical systems with masses and springs, or electrical
networks with capacitors and inductors. Integration or summation is thus not just ‘com-
puting the surface under a curve’. It is directly related to phenomena like the growth of a
bank account (by adding the annual interests, deposits and withdrawals in a summation)
or the increasing volume in a tank by integrating (summing over infinitesimal small time
intervals) the net incoming flow.

So far we only considered a simple water vessel with just an incoming flow. In terms
of a system description this incoming flow is the input signal and the volume of
water in the tank the output signal. Let us now consider a tank with no input, but
with a small hole in the bottom. The amount of water that flows out of the tank,
ϕout , depends on the size of the hole and is proportional to the pressure p at the
bottom of the tank.
ϕout = c hole p (2.16)
where c depends on the size of the hole. Often we use the inverse of c hole , the resis-
tance r . A small hole has a large resistance, a large hole forms a small resistance.
1
ϕout = p (2.17)
r
The water pressure p is proportional to the height of the water in the tank. This can
be expressed as:
p = c1 h (2.18)
where c 1 depends on the density of the fluid. In a cylindrical tank the height h in
[m] is equal to the volume V in [m 3 ] divided by the bottom surface of the tank A in
[m 2 ]:
V
h= (2.19)
A
2.1. EFFECTS OF ACTIONS ONLY OBSERVABLE AFTER SOME TIME 21

and thus
V
p = c1 (2.20)
A
If A is large, a large volume can be buffered with a low height and thus a low pres-
sure at the bottom. Therefore, the most systematic way to represent the relation
between pressure and volume is:

c1 1
p= V= V (2.21)
A c
where c = A/c 1 is the ‘buffering capacity ’ of the tank. With eq. 2.17 and eq. 2.21 we buffering
capacity
see that the outgoing flow is proportional to the volume:

1 1
ϕout = p= V (2.22)
r rc
When we substitute eq. 2.22 into eq. 2.15 we find (taking into account that ϕout is an
outgoing flow:
Z T Z T 1
V (T ) = − ϕout (t ) dt + V (0) = − V (t ) dt + V (0) (2.23)
t =0 t =0 r c

tank

leakage

F IGURE 2.6 A leaking water tank modelled as an integrator with feedback

This can be illustrated with figure 2.6. In this figure we see at the left a causal rela-
tion diagram. This indicates that the volume of water in the tank depends on itself
because the outgoing flow depends on the size of the hole and, via the pressure at
the bottom of the tank, also on the volume of water. The dotted input signal ϕin
indicates that also in this case there can be constant or variable flow from the ‘en-
vironment’ into the tank. The block diagram at the right shows that the volume in
the tank is the integration of the sum of all flows. The − sign at the summer is due
to the fact that the outgoing flow reduces the volume. The latter representation is
probably the clearest way to indicate that leakage can be seen as negative feedback. negative
The volume in the tank is the integration of the sum of all incoming flows minus the feedback
sum of all outgoing flows.
Of course we can also make a model of the leaking water tank with the volume as
‘output’. That results in the block diagram of figure 2.7.
22 CHAPTER 2. DYNAMICAL SYSTEMS

tank

1
rc
leakage

F IGURE 2.7 A leaking water tank with the volume V as ‘output’

Exercise 2.9
Try to make a graph of the volume of the tank as a function of time. Assume that the
incoming flow ϕin = 0 and let V (0) be 10 liter. The size of the hole is such that there would
be a constant outgoing flow of 10[l /s] if the volume in the tank would be a constant 10
liter.

Exercise 2.10
Simulate this system with 20-sim. Instructions how to do this can be found in the tutorial
at: http://www.controllab.nl/en/books/dynsys.html Use the numerical values of exercise
2.9. Also simulate the system when there is, in addition to the leakage, a constant incom-
ing flow of 5[l /s]. Always try to predict the result, before you simulate!

2.1.7 Similarities between these systems


When we compare the properties of the three systems considered in this section,
we notice that although they are of a very different nature, on the level of equations,
they have a lot in common. In all these examples we are talking about dynamical
systems; systems where the present state depends on the history.
The number of rabbits depends on the number of rabbits one month earlier. The
feedback population grows because young rabbits are born (positive feedback) and decreases
because of limited availability of food and because they are eaten by foxes (negative
feedback).
The amount of money on the savings account depends on the amount of money
one day, one month or one year earlier. It grows because of the daily, monthly or
annual interest (positive feedback). Extra deposits and withdrawals change the
money in the account as well, but they are, as long as the account is not negative,
not influenced by the amount of money in the account. Deposits and withdrawals
input signal can thus be modelled as input signals.
Typical in these two systems is that they are described at fixed, discrete, time
discrete system intervals. These systems are therefore referred to as discrete systems .
If we observe the water tank at discrete finite time intervals, the water level is
determined by the level one time step ago, by the outgoing flow, which is depen-
dent of the water level (feedback) and by the incoming flow (input signal). When we
observe this system continuously, the summation changes into an integration and
2.1. EFFECTS OF ACTIONS ONLY OBSERVABLE AFTER SOME TIME 23

the water level is determined by the level at t = 0 plus the integral of the sum of the
outgoing flow, which is dependent of the water level (feedback) and the incoming
flow (input signal). Systems described in such a continuous time form, are called
continuous-time systems . continuous-time
system
A typical property of these systems is the memory function. This memory deter-
mines the (time-dependent) state of the system: the number of foxes and rabbits at state
a certain moment, the water level in the vessel, and the amount of money in a bank
account. In the continuous time system the memory has the form of an integrator. integrator
Output values of the integrators can be used as the state variables of a system. The
state of the integrator x(T ) at time T is completely determined by the state x(0) at
t = 0 plus the integration of all its inputs over the time interval from t = 0 to t = T :
Z T
x(T ) = u(t ) dt + x(0) (2.24) u and x are often
0 used when we do
not consider a
For a discrete system this equation can be written as: specific physical
domain. In that
iX
=k case x is the state
x(k) = u(i ) ∆T + x(0) (2.25) variable and u is
i =0 the input signal.

In a discrete-time system the state is determined by the state at t = 0 (i = 0) plus the


sum of all inputs, multiplied with ∆T , over the discrete time intervals from i = 0 to
i = k. (Compare eq. 2.13-eq. 2.15). The discrete-time equivalent of the integrator is
thus a summer. summer

Exercise 2.11
The system of foxes and rabbits could also be described as a continuous time system.
Use eq. 2.1-eq. 2.4 to make a block diagram of this system with integrators. Simulate the
system with 20-sim.

2.1.8 Storage
There is another way of looking at the summers and integrators. The tank can be
seen as a buffer, which stores water. In a similar way we can see a bank account buffer
as a buffer of money and at the same time as a memory. When there are no inputs
to the buffer and there is no feedback, the amount of money in the bank account
or the volume of water in the tank remains constant. It depends upon the type of
system what the best view is. For physical systems there is also a direct relation to
the storage of energy. The reservoir at a hydro-electric power plant can be seen as
a large water tank. The (potential) energy in such a reservoir is proportional to the
water level and can be used to drive a water turbine to produce electrical energy.
Electrical energy can be stored in a battery. A spring and a flying wheel (rotating
mass) can be used to store mechanical energy. In the next chapters we will use this
to describe mechanical and electrical systems.
24 CHAPTER 2. DYNAMICAL SYSTEMS

Exercise 2.12
Driving a car over a bumpy road sometimes leads to annoying vibrations in the car body.
Consider these vibrations from the point of view of energy buffers.

2.2 The role of feedback


In the preceding sections we have seen several examples of dynamical systems.
Due to the presence of buffers in the form of energy-storage elements or memories,
these systems show a behaviour that changes as a function of time. However, a sys-
tem consisting of only a single integrator or summer always has a constant output.
Systems show more ‘interesting’ behaviour when feedback loops are present. Such
feedback loops can be very simple, as in the case of the water vessel, or more com-
plex, as in the case of the system of foxes and rabbits. Feedback can be positive or
negative. It can be present because of the structure of the system itself or because
we add feedback in the form of an automatic control system (like the stabilising
feedback in the Segway in section 1.3.3).

2.2.1 Positive feedback


We have already seen several systems where positive feedback was present. The an-
nual interest based on the balance of the bank account is a positive feedback mech-
anism. The balance will grow exponentially. For instance, with an annual interest of
4% the balance will double approximately every 17.5 years. A similar effect would
be seen in the population of rabbits if there would be no food limitations or foxes
and if the birth rate would be larger than the death rate. Although this is different
for the bank account, in most systems a dominant positive feedback is undesirable
exponential because this leads to an exponential growth of certain signals. In most cases, how-
growth
ever, there will be negative feedback mechanisms as well, which will prevent these
signals from becoming infinitely large.

2.2.2 Negative feedback


We have seen negative feedback in the example of foxes and rabbits and in the wa-
ter tank example. The leakage in the water tank could be modelled as a negative
feedback signal. When there was no external supply of water, the water level in the
tank dropped to zero after some time. When there was an external supply of water,
the level reached a steady state after some time. It appeared that the graphs had the
same shape for all kinds of constant inputs. Such graphs, which show how a system
goes from equilibrium (or ‘steady’) state to another, are called transient responses
transient or transients. When the size of the hole, which determines the leakage, changes, the
shape of the transient behaviour changes as well. Apparently the combination of
the tank and the leakage (the integrator and the negative feedback) together deter-
mine the behaviour of the system. Because the leakage was supposed to be propor-
2.2. THE ROLE OF FEEDBACK 25

tional to the level of the water in the tank, the feedback gain could be modelled as a
constant gain (1/r ) (figure 2.6).
The negative feedback in the foxes and rabbits model is a bit more complex. In
this model rabbits die due to lack of food and because they are eaten by foxes. The
death rate due to lack of food has a quadratic dependency of the number of rabbits.
This implies a non-linear feedback mechanism. Also the multiplications in the non-linear
terms R k F k lead to a non-linear feedback.

In a linear system or in a linear relation the following holds: linear system

y = f (x) implies that f (αx) = αy ,

and if f (x 1 ) = y 1 and f (x 2 ) = y 2 this implies that f (x 1 + x 2 ) = y 1 + y 2 .

In a non-linear system these relations are not satisfied. For instance:

if y = x 2 it follows that αy 6= (αx)2 = α2 x 2 ,

and if x 1 = 2 and x 2 = 3 it follows that 22 + 32 6= 52 .

2.2.3 Mechanical and electrical systems


We will see in the next chapters that mechanical and electrical systems can be de-
scribed in a similar way. Springs and masses can store energy and as we will see,
they too can be modelled as integrators. Friction is a phenomenon, equivalent to
leakage in the water tank, which tends to bring the system to a steady state situa-
tion where velocities are constant or zero. In electrical circuits capacitors and in-
ductances are the elements that can store energy. Here, resistors are the equivalent
of leakage or friction. Mechanical and electrical systems will be analysed in more
detail in the next chapters.
26 CHAPTER 2. DYNAMICAL SYSTEMS
3
Integrators play a dominant role in dynamical
systems: all dynamical systems contain one or
more integrators. Transfer functions and
differential equations allow us to perform
computations with relative ease.

Integrators in dynamical systems

After studying this chapter you are expected to be able to

– understand the role of integrators in dynamical systems


– describe the relation between several physical phenomena and their model as an
integrator
– model masses, springs, capacitors and inductances
– describe a simple system with differential equations and transfer functions

3.1 Physical meaning of integration in the time domain


3.1.1 Introduction
We have seen that in various processes integrators ( ) and summers ( ) play an im-
R P

portant role. They can be seen as buffers (storages of money or water) or as mem-
ory elements. So far we have seen an example of an integrator in a tank, which
stores water (eq. 2.15). Similar processes can be observed in other physical do-
mains, e.g. in mechanical and electrical systems. In this chapter we will introduce
the role of integrators in mechanical and electrical systems. Later on we will study
such systems in more detail.
This chapter also introduces you to describing dynamic systems with simple
formulas. This enables us to make compact descriptions and to do some compu-
tations. In addition, simulation will remain an important tool for describing these
systems.

3.1.2 Hydraulic systems: water tank


We have seen in eq. 2.15 that the volume of water in a water tank can be described
by:
Z T
V (T ) = ϕ(t ) dt + V (0) (3.1)
¡ ¢
t =0
In words: the volume V (T ) is equal to the integral from 0 to T of the total flow ϕ(t )
into the tank plus the volume V (0) at t = 0. The integral represents the sum of all

27
28 CHAPTER 3. INTEGRATORS IN DYNAMICAL SYSTEMS

the infinitesimal small volumes dV in the time interval from t = 0 to t = T , where


dV = d ϕ(t ) dt and where d ϕ(t ) dt is the product of ϕ and t during the infinitesimal
time interval d t . This change of the volume, increases or decreases the volume in
the tank V (0) at t = 0. Often we are only interested in the changes of the volume as
opposite to the total amount. In that case and to simplify the notation, we assume
that the volume of water V (0) at t = 0 is equal to 0. The term V (0) can then be omit-
ted. We can further generalise eq. 3.1 by always considering a time interval from
t = 0 to any t .
Z t
Because we now
use t to indicate V= ϕ(τ) dτ (3.2)
τ=0
the boundary of
the integration In that case we usually also omit the borders of the integration:
interval, we use Z
the Greek variable
τ in ϕ(τ) and dτ.
V = ϕ dt (3.3)

Equation 3.3 states that a water tank can be considered as an integrator that inte-
grates the net water flow ϕ(t ) (the result of incoming and outgoing water flows) into
a volume of water V (t ), stored in the tank. This was even more explicitly described
in the form of the block diagram of figure 2.5, repeated in figure 3.1.

tank

F IGURE 3.1 A water tank modelled as an integrator

In addition to storage, we have earlier seen that there can be leakage. In eq. 2.17 we
The flow is described the leakage of water from the tank (the flow ϕout ):
commonly
indicated with ϕ, 1
the Greek ϕout = p (3.4)
r
equivalent of the
roman letter f . where p was the pressure at the location of the leakage that is related to the volume
(V ) of fluid in the tank
1
p= V (3.5)
c
p is pressure, The resulting formulas for the water tank are summarised in table 3.1.
ϕ is flow,
c is a constant
TABLE 3.1 Formulas for a water tank
storage leakage

1
p= ϕ dt ϕout = r1 p
R
c

In the rest of this chapter we will see that we can find similar formulas for phe-
nomena in other physical domains, e.g. in mechanical and electrical systems.
3.1. PHYSICAL MEANING OF INTEGRATION IN THE TIME DOMAIN 29

3.1.3 Mechanical systems: spring and mass


Although it may not be obvious at first sight, components in mechanical systems
can also be described with formulas containing an integrator. To illustrate this, we
will analyse the basic equations that describe a spring and a mass.
A spring is generally described by Hooke’s law, which gives the relation between Hooke’s law
the force (F ) acting on a spring and the deformation of the spring, the change in
length (x):
F = kx (3.6)
in which the constant k is the spring constant. Hooke’s law can of course also be spring constant
formulated as:

1
x= F, or: x = cF (3.7)
k
in which c = 1/k is called the compliance. compliance
Another important element in mechanical systems is the mass. The behaviour of mass
a mass is described by Newton’s law. It’s most well-known form is: Newton’s law

F = ma (3.8)

in which a is the acceleration of the mass. Of course this can also be written as:
1
a= F (3.9)
m
In addition to the position (x) and the acceleration (a), the velocity (v) is a relevant
variable in mechanical systems. These three variables are related to each other. An
accelerating car will go faster and faster and will thus change its position increas-
ingly fast.
Example
For a car that drives at a constant velocity, the position is proportional to the time
and the velocity. The relation between the position x and the velocity v is thus
given by:
x(t ) = v t (3.10)

If the velocity is not constant we need an integral to describe this relation, equiv-
alent to the transfer from eq. 2.9 into eq. 2.15. Thus
Z T
x(T ) = v(t ) dt + x(0) (3.11)
t =0

or in a simplified form, disregarding the initial conditions and the boundaries of the
integration: Z
x= v dt (3.12)
30 CHAPTER 3. INTEGRATORS IN DYNAMICAL SYSTEMS

In a similar way we can derive the relation between the acceleration and the ve-
locity. When the acceleration is constant, the velocity increases proportional to the
time:
v(t ) = at (3.13)
If the acceleration is not constant we need an integral to describe this relation,
equivalent to the transfer from eq. 3.10 into 3.11. Thus
Z T
v(T ) = a(t ) dt + v(0) (3.14)
t =0

or, equivalent to eq. 3.12 Z


v= a dt (3.15)

Hooke’s law and Newton’s law in integral form

When we substitute eq. 3.7 into 3.12 we find an integral form of Hooke’s law:
1
Z
F= v dt (3.16)
c
Similarly, by substituting eq. 3.9 into 3.15, Newton’s law can be rewritten as:

1
Z
v= F dt (3.17)
m
This is summarised in table 3.2. The formulas in the first row are in most commonly
Compare, for used forms. Later it will become clear that the formulas in the second row, will help
instance, the to systematically describe physical phenomena in different domains.
formula for the
spring in table 3.2
with the formula TABLE 3.2 Formulas for a spring and a mass
for the storage (p )
in table 3.1. spring mass
1 1
F = kx or F = cx F = ma or a = mF

F = 1c v dt v=m 1
F dt
R R

Notice that in the case of a spring, the force F can be written as the integral of
the velocity v, and that in the case of a mass the velocity v can be written as the
integral of F . We see that the formulas for the mass and the spring are thus each
others reciprocal.
R In the case of the spring the force F is proportional to the inte-
grated velocity Rv dt . In the case of the mass the velocity v is proportional to the
integrated force F dt .

In eq. 3.17 we assume that the mass is constant. In most cases this is a valid assumption. But if we
consider a rocket, this is not true. While accelerating, the rocket consumes fuel and becomes lighter. In
that case eq. 3.17 should be rewritten as:
1
Z · ¸
v= F (t ) dt (3.18)
m(t )
3.1. PHYSICAL MEANING OF INTEGRATION IN THE TIME DOMAIN 31

Exercise 3.13
Explain why we generally use eq. 3.17 instead of eq. 3.18 when we consider the acceleration of a car instead of a
rocket.

3.1.4 Electrical systems: capacitor and inductance


Basic elements in electrical systems are the resistor, capacitor and inductance. With
these three basic elements we can build electrical networks. We will discuss the
resistor later and first describe the capacitor and the inductance.

Capacitor

A capacitor can be seen as a battery. It can store electrical energy. A battery or ca- capacitor
pacitor is charged by a current. Later on it can discharge when powering devices
such as a mobile phone or iPod. In its most basic form the electrical charge of the
battery q is proportional with the time that the battery is being charged and the
current i :
q = it (3.19)
Again, when i is not constant, we need an integral to properly describe the charging
process:
Z T
q(T ) = i (t ) dt (3.20)
t =0
or in the simplified form: Z
q(t ) = i dt (3.21)

Depending upon the capacity C of the battery (or capacitor), the voltage u will in- capacity C
crease proportional with the electrical charge:

1 1
Z
u = q, or u = i dt (3.22)
C C

Inductance

Electrical inductance is a property that belongs to a coil, often with a core of ferro- inductance
magnetic material. Such a coil can be used to create an electromagnet and as such
it is used in all kinds of electrical motors. When a current flows through this coil a
magnetic flux, Φ, builds up in the coil. When the coil has n windings the so-called magnetic flux
flux linkage, λ is equal to the product of the number of windings and the magnetic flux linkage
flux:

λ = nΦ (3.23)
The voltage over the coil is determined by variations in the magnetic flux:

∆Φ ∆λ
u=n = (3.24)
∆T ∆T
32 CHAPTER 3. INTEGRATORS IN DYNAMICAL SYSTEMS

or

∆λ = u∆T (3.25)
Like in chapter 2 (see eq. 2.14 and eq. 2.15), we can write this as:
Z
λ = u dt (3.26)

The flux linkage is also proportional with the current flowing through the coil.

1
i ∝ nΦ or i = nΦ (3.27)
L
self inductance L L is the so called self inductance L of the coil.


L= (3.28)
i
From eq. 3.28 and eq. 3.23 follows the relation between the current, i , and the flux
linkage, λ; and after substituting eq. 3.26 the relation between the current, i , through
the coil and the voltage, u, over the coil.

1 1
Z
i = λ, or i= u dt (3.29)
L L
The equations for the capacitor and inductance are summarised in table 3.3. We
see that the formulas for the capacitor and the inductor are each others reciprocal.
In
R the case of the capacitor the voltage u is proportional to the integrated current
i dt . InR the case of the inductance the current i is proportional to the integrated
voltage u dt .

TABLE 3.3 Formulas for a capacitor and inductance


capacitor inductance

u = C1 q i = L1 λ

u = C1 i dt i = L1 λ dt
R R

3.1.5 Initial conditions


So far we have disregarded the initial conditions of integrals. The initial condition
represents the starting values of the integrator. If we want to study, for instance,
the change in length of a spring (∆x) in the time interval from t = 0 to t = T , this
change is given by integrating the velocity. The absolute length of the spring at t =
T is given by adding this change in length, ∆x to the length x(0) at t = 0. The length
initial condition x(0) at t = 0 is called the initial condition of the integrator. The initial condition is
state also the state of the integrator at t = 0.
3.2. INVERSE OPERATION: DIFFERENTIATION 33

Z T
x(T ) = v(t ) dt + x(0) (3.30)
t =0

Similarly we could say that the charge of a battery q(0) at t = T is equal to the charge
at t = 0 plus the charge added in the interval from t = 0 to t = T :
Z T
q(T ) = i (t ) dt + q(0) (3.31)
t =0

3.2 Inverse operation: differentiation


equations 3.30 and 3.31 give the relation between v and x and i and q in the form of
an integration. We could also consider the inverse operation, differentiation. When
we consider the change in position (∆x) in a small time interval ∆T from t = 0 to
t = T , we can assume that the velocity is constant in this time interval and equal to
v(0). This allows us to rewrite eq. 3.30 as:

x(∆T ) = v(0)∆T + x(0) (3.32)

or, more general,


x(T + ∆T ) = v(T )∆T + x(T ) (3.33)
This can be rewritten as
x(T + ∆T ) − x(T ) = v(T )∆T (3.34)
or
∆x x(T + ∆T ) − x(T )
= = v(T ) (3.35)
∆T ∆T
where ∆x is the change in length in the time interval from t = T until t = T + ∆T .
For infinitesimal small time intervals ∆T eq. 3.35 is written as
dx(t )
= v(t ) (3.36)
dt
or shorter
dx
v= (3.37)
dt
This equation can be seen as the inverse form of eq. 3.30
Z T
x(T ) = v(t ) dt + x(0)
t =0

This inverse process is called differentiation. We say that v(t ) is the derivative of differentiation
x(t ). Both equations describe the same relation, eq. 3.30 in integral form and eq. 3.36 derivative
in derivative form. In the derivative form we do not have to bother about initial
conditions. But for modelling and simulation, we prefer the integral form.
In eq. 3.15 we saw that the velocity v can be written as the integral of the acceler-
ation a. This implies that we can write a as the derivative of v.
dv
a= (3.38)
dt
34 CHAPTER 3. INTEGRATORS IN DYNAMICAL SYSTEMS

When we substitute eq. 3.37 in eq. 3.38 we get

d ( dx
dt )
a= (3.39)
dt
which is written as
d 2x
a= (3.40)
dt 2
second derivative We say that a is the second derivative of x.

3.2.1 Differential operator to represent a differentiator


There is another way of representing an integrator or differentiator. We introduce
Laplace operator the Laplace operator s as a short way to describe the process of differentation:

d.
s= (3.41)
dt
This notation has a good theoretical background in the form of the Laplace trans-
differential formation. But for our purposes we can see s as a just a differential operator. For
operator
now it suffices to simply introduce the notation. We will later discover the advan-
tages of this notation. With the Laplace operator we can write eq. 3.37 as

v = sx (3.42)

and eq. 3.40 as


a = s2x (3.43)
Because differentiation and integration are inverse operations, we can use s also
to represent an integration. It follows directly from eq. 3.42 that

1
x= v (3.44)
s

3.3 Differential equations and transfer functions


3.3.1 First-order linear system
We have already Let us consider a carton of wine (figure 3.2). Such boxes have a tap, which easily al-
seen a similar lows you to fill a glass with wine. As we have seen before, the outgoing flow depends
situation in the
leaking water tank on the level of the remaining wine in the tank. We want to describe the flow of wine
in chapter 2 from the tank as a function of time.
(figure 2.6). Therefore, we examine the equations that describe such a system. The volume of
wine in the box is described by
Z
V (t ) = −ϕout dt + V (0) (3.45)
3.3. DIFFERENTIAL EQUATIONS AND TRANSFER FUNCTIONS 35

F IGURE 3.2 A box of wine emptying in a glass

The flow out of the box is proportional to the pressure p at the outlet. This pressure
is again proportional to the height of the wine in the box and thus also to the vol-
ume of the wine. This implies that eq. 3.45 can be rewritten as
1
Z
p(t ) = −ϕout dt + p(0) (3.46)
c
For the outgoing flow we can write
1
ϕout (t ) = p(t ) (3.47)
r
We have already seen that we can represent these equations in a block diagram that
can be simulated with 20-sim (figure 3.3). See figure 2.6.

wine box

leakage

F IGURE 3.3 A box with wine, modelled as an integrator with


(negative) feedback

Another way to represent this system, is in the form of a differential equation. As the differential
name suggest, this implies that we write eq. 3.46 in derivative form, and combine it equation
with eq. 3.47 into one single equation. The derivative form of eq. 3.46 is
dp 1
= − ϕout (3.48)
dt c
36 CHAPTER 3. INTEGRATORS IN DYNAMICAL SYSTEMS

Substituting eq. 3.47 into 3.48 yields


dp 1
+ p =0 (3.49)
dt rc
first-order This is a so-called first-order differential equation. Linear first-order differential
differential
equation
equations can also be solved analytically. For more details we refer to the mathe-
matics courses. Here we will mainly use simulation to solve differential equations.
The solution of eq. 3.49 is
p(t ) = p(0)e −t /r c (3.50)
This can be verified by substituting this solution in eq. 3.49.
dp 1 1 1
+ p = − p(0)e −(r c)t + p(0)e −(r c)t = 0 (3.51)
dt rc rc rc
The pressure in the box (and thus the outgoing flow), according to eq. 3.50 has the shape
as in figure 3.4

p(0)

0
0 1 2 3 4 5 6 7 8 9 10
time {s}

F IGURE 3.4 Pressure at the outlet of the box as a function of time

Exercise 3.14
Simulate the system of figure 3.3 (or eq. 3.49) in 20-sim, using the following parameters
for a square box:

- volume of wine in the tank V (0) = 3 [liter] = 3000 [cm3 ]


- surface of the bottom of the box A = 100 [cm2 ]. This implies that the height of the
wine in a full box is 30 cm and the pressure p(0) = 3 [k Pa]
- c = 1 [m3 Pa−1 ]
- r = 100 [Pa s m−3 ]

Now we will make a small change to the system. Instead of only an outgoing flow,
we also consider a (constant) incoming flow such that

ϕtot = ϕin − ϕout (t ) (3.52)


3.3. DIFFERENTIAL EQUATIONS AND TRANSFER FUNCTIONS 37

This implies that


dp 1 1
= ϕtot = (ϕin − ϕout (t )) (3.53)
dt c c
or
dp 1
= (ϕin − ϕout ) (3.54)
dt c
or
dp 1 1
+ p = ϕin (3.55)
dt rc c
With the differential operator s this can be written as

1 1
sp + p = ϕin (3.56)
rc c
Instead of a differential equation, we now have a simple algebraic equation. One of
the consequences is that we can manipulate this equation as if s were just a simple
parameter like r or c. This implies that we can rewrite eq. 3.56 as

1 1
(s + )p = ϕi n (3.57)
rc c
or
p 1/c r
= = (3.58)
ϕin s + r1c r cs + 1
We say that
1/c r
H (s) = , or H (s) = (3.59)
s + r1c r cs + 1

is the transfer function from the incoming flow ϕin to the pressure p. With this transfer function
transfer function we can draw a block diagram of this system with only one single
block (figure 3.5). Of course we could also consider the transfer function from the
incoming flow to the volume. This yields:

V rc
H (s) = = (3.60)
ϕin r c s + 1

tank leaking tank

leakage

F IGURE 3.5 Water tank with an incoming and outgoing flow. Left, according to
eq. 3.54, right according to eq. 3.58
38 CHAPTER 3. INTEGRATORS IN DYNAMICAL SYSTEMS

Exercise 3.15
Simulate the left block diagram of figure 3.5 in 20-sim, using the following parameters:

- volume of water in the tank at t = 0, V (0) = 0 [m3 ]


- r = 50 [m2 s−1 ]
- incoming flow ϕi n = 1 [liter s−1 ]= 1000 [cm3 s−1 ]

Plot the volume V as a function of time. Do also a multirun simulation where r varies in
10 steps between 10 and 500. Explain the results.

3.4 Overview of the different domains


Table 3.4 summarises the formulas we have found so far for the different physical
domains. The table also suggests that we are still missing a number of formulas.

TABLE 3.4 Formulas for several physical domains


domain behaviours

mechanical spring:R ............................. mass: R


F = 1c v dt ............................. v=m1
F dt
electrical capacitor: ............................. inductance:
u = C1 i dt i = L1 u dt
R R
.............................
hydraulical tank: R resistance: .............................
p = 1c ϕ dt p =rϕ .............................

Exercise 3.16
Try to detect the missing behaviours. The symmetry in the table should be helpful to find
the right formulas and from these formulas the behaviours that they describe.

In the next chapters we will analyse the different physical domains in more detail
and consider more complex systems.
4
A complex system can be split into interacting
subsystems or interacting submodels. This
process stops when the submodels cannot be split
any further. In physical systems these elementary
submodels describe a basic physical behaviour.
From these elementary submodels we can build
more complex ‘ideal physical models’ or IPM’s.

Ideal physical models

After studying this chapter you are expected to be able to

– identify basic physical phenoma in mechanical, electrical and hydraulic systems


– make real physical components from elementary subsystems
– compose simple dynamic systems from these components
– simulate such systems in the time domain

4.1 Basic physical phenomena


4.1.1 Introduction
We saw in table 3.4 that there were three table entries not yet filled with formulas.
This table is repeated in table 4.1:

TABLE 4.1 Formulas for several physical domains


domain behaviours
mechanical spring:R mass: R
F = 1c v dt v=m1
F dt
electrical capacitor: inductance:
u = C1 i dt i = L1 u dt
R R

hydraulical tank: R resistance:


p = 1c ϕ dt p =rϕ

Let us first try to find the missing entry for the mechanical domain. We reconsider
the situation of an accelerating car. In its most simple form we could model the car
as just a mass. If the motor of the car would deliver a constant force, we see that
according to the formula for the mass

1
Z
v= F dt ,
m

39
40 CHAPTER 4. IDEAL PHYSICAL MODELS

which simplifies in the case of a constant force into

F
v= t,
m
the speed would increase constantly as a function of time. With a large mass it in-
creases more slowly, but if we wait long enough, the speed will increase to infin-
ity. We know that this is not true in practice. We can, therefore, conclude that our
model is too simple and needs to be extended. What we are missing is the resis-
drag tance due to the air (called the drag) and the resistance due to the contact between
rolling resistance the tires and the road: the rolling resistance. In the case of air drag, the force F d
needed to overcome the drag is proportional to the frontal area of the car, A, the
drag coefficient aerodynamic shape of the car, expressed in the so-called drag coefficient C w and the
square of the speed, v 2 :

F d ∝ AC w v 2 (4.1)

Equation 4.1 explains why high-speed cars, such as sport cars and Formula 1 cars have
their typical shape. By giving the car a small frontal area, A , and rounded forms (leading
to a small C w value), the air drag is minimised. But the drag is still proportional to the
square of the speed and thus a quadratically increasing force is needed to maintain this
speed. In situations where the power source is limited, reduction of A and C w can lead to
extreme design shapes, such as those of the vehicles used in the bi-annual solar challenge
contest in Australia (figure 4.1).

F IGURE 4.1 21Revolution: the 2009 version of the solar car of students of the
UT and Saxion
4.1. BASIC PHYSICAL PHENOMENA 41

A more simple form of this phenomenon is viscous friction. Viscous friction is the viscous friction
drag an object experiences when it moves in a fluid at low speeds. In this case there
is a simple linear relation between the speed and the force.

F = fv v (4.2)

where f v is the viscous friction coefficient. We could have predicted this relation by
looking at the formula for the hydraulic resistance in table 4.1. This equation gave a
relation between the pressure p and the flow ϕ. Equation 4.2 gives a similar relation
between the force F and the velocity v. In general, friction is a more complex and
non-linear relation between F and v. We could, for instance, write eq. 4.1 as

F d = f d (v)v (4.3)

where the friction coefficient f d (v) indicates that the friction is a function of v. But
in all cases there is no integrator present in the equation (in contrast with the for-
mulas that give the relation between the force and the velocity for a mass and a
spring).
Next we will consider the missing formula for the electrical domain. Based on
the friction and resistance formulas for the mechanical and hydraulic domain we
can already predict that there will be a relation of the form

u = Ri (4.4)

This is the well known Ohm’s law that gives the relation between the voltage u, the Ohm’s law
current i and the electrical resistance R. Electrical resistance is present in all elec- electrical
resistance
trical circuits, for instance in an incandescent lamp. Due to the resistance in the
filament of the bulb the current lets the filament heat up, until it is white-hot.
Example
Equation 4.4 can easily be verified with a simple experiment (figure 4.2). If we con-

F IGURE 4.2 Bulbs connected to a battery

nect a small bulb to a battery, the bulb will start glowing. If we put a second, similar
bulb in series with the first one, the resistance will double and because the voltage
42 CHAPTER 4. IDEAL PHYSICAL MODELS

of the battery may be considered as being constant, the current will be half the cur-
rent compared with the case of only one bulb. As a result both lamps will be less
bright.

Exercise 4.17
Suppose we have a second battery at our disposal. How should we connect the two bat-
teries and lamps to let the lamps glow at full brightness again?

The last empty element in the table is the hydraulic equivalent of the mechanical
hydraulic inertia mass and the electrical inductance. This element is called the hydraulic inertia.
Hydraulic inertia is visible in the effect that is known as ‘water hammer’. Water
water hammer hammer can be observed when water is flowing through a long pipe and the flow
at the end of the pipe is suddenly cut off. Due to the inertia of the water mass the
flow tries to continue. The sudden change in the flow leads to large pressures in the
pipes and large forces on the piping. As a result you will hear a sound as if an ham-
mer hits the pipe. We can express the hydraulic inertia in derivative form as

p=I (4.5)
dt
where I has the dimension [kg m−4 ]. The same formula in integral form is
1
Z
ϕ= p dt (4.6)
I
Now that we have discussed all the missing elements, we are ready to complete ta-
ble 4.1. This results in table 4.2.

TABLE 4.2 Formulas for several physical domains


domain behaviours
mechanical spring:R friction: mass: R
F = 1c v dt F=fv v=m1
F dt
electrical capacitor: resistor: inductance:
u = C1 i dt u = Ri i = L1 u dt
R R

hydraulical tank: R resistance: inertia:R


p = 1c ϕ dt p =rϕ ϕ = 1I p dt

From table 4.2 we can derive table 4.3 by explicitly considering the physical quan-
tities represented by the integrators in table 4.2. Most of the time not all of these
domains are considered simultaneously. This allows us to use similar symbols for
different quantities, rather than choosing distinct symbols for all quantities. We
use the symbols that are most common in the different domains. Therefore, you
should always be aware of the domain you are working in: the mechanical impulse
p should not be confused with the hydraulic pressure, also denoted with the sym-
bol p.
4.2. IDEAL PHYSICAL MODELS 43

TABLE 4.3 Physical quantities represented by the integrators

domain behaviours
mechanical spring: position mass: mechanical impulse
p
F = xc x = v dt v=m p = F dt
R R

electrical capacitor: electric charge inductance: magnetic flux


q
u=C q = i dt i = λL λ = u dt
R R

hydraulical tank: volume inertia: hydraulic impulse


p = Vc V = ϕ dt ϕ = ΓI Γ = p dt
R R

4.2 Ideal Physical Models


4.2.1 Introduction
tables 4.2 and 4.3 give a number of ‘elementary properties’ or ‘elementary behaviours’
for the mechanical, electrical and hydraulic domains. These properties are present
in the real world, but seldom in a pure form. If we consider a large block of rubber
it has a certain weight. It thus has the properties of a mass. But the block of rubber
can also be compressed or stretched. Thus it also has the behaviour of a spring. In
addition, if we stretch the rubber block and remove the stretching force, the block
will go back to its original form. Due to internal friction in the rubber, the motion
will dampen out rapidly. The rubber block thus also shows the behaviour of fric-
tion.
We call such a real world ‘object’ a component. In most cases the component, if component
seen as a system, can be split into interconnected subsystems. Depending on the
desired level of detail, we can split these subsystems further. At the lowest level
these subsystems may have the properties of the elementary behaviours listed in elementary
physical models
table 4.2. We call such elementary subsystems elementary physical models or el-
ements. A model that is solely built of such elementary models is called an Ideal Ideal Physical
Model (IPM)
Physical Model, or IPM.
The same holds for electrical systems. The component ‘battery’ can be mod-
elled as an ideal capacitor with an ideal resistor in parallel. Due to this resistor the
battery will slowly discharge. The better the quality of the battery, the less it will dis-
charge and the more it approaches the element capacitor. In general components
found in electrical systems, such as capacitors, self inductances in the form of coils,
and resistors, are more close to ideal physical elements than components present in
mechanical systems (masses, springs and dampers).

The component capacitor will always have some internal electrical resistance and induc-
tance. However, the property capacitance is dominant. But a spring can hardly be made
without having a certain mass. If this mass is small compared with other relevant masses
in the system such a spring can still be modelled as an ideal spring.

One important assumption we make when modelling a complex dynamic system,


is that the dominant physical behaviour can be represented by a limited number of
44 CHAPTER 4. IDEAL PHYSICAL MODELS

lumped- interconnected ideal physical elements. Such a model is called a lumped-parameter


parameter model
model, because the properties of the model are lumped together into a finite num-
ber of parameters belonging to ideal physical elements. In the following we will use
this lumped parameter approach for all our models.

This lumped-parameter approach works well for many systems but it may not be the best
approach for mechanical systems that exhibit a lot of flexibility. If, for instance, we want
to study the forces in the wing of an airplane due to bending, much more detailed models
finite-elements are needed. Such models are based on a so-called finite-elements analysis. Finite-element
analysis models of mechanical systems consist of a very large number of interconnected mass-
spring-damper systems. Due to this level of detail they are able to give a detailed map of
the stresses affecting the airplane wing.

In order to graphically represent ideal physical models, we will define symbols


(icons) for the elementary models. With these icons we can represent the IPM’s in
iconic diagram the form of an iconic diagram.

4.2.2 Mechanical systems


The elementary models in the mechanical domain of table 4.2 belong to transla-
tional motions. (Later we will also consider rotational motions.) Elementary models
are a mass, a spring and damping or friction. In addition, we model the fixed world.
translation icons This is a reference with velocity zero. We will use the icons of figure 4.3 to represent
these elements.

spring damper mass fixed world

friction

F IGURE 4.3 Icons of elementary submodels in the translation domain

By connecting these elements we can make a model of a mechanical system. Be-


cause each of these elements is well described by the equations in table 4.2, we can
derive the equation(s) that describe the behaviour of such a system. As an example
mass-spring- we consider the mass-spring-damper system of figure 4.4.
damper system
This system can be seen as a mass that is connected to the ceiling by a spring-damper
combination. Each of the icons represents an elementary model and is thus de-
scribed by one of the equations of table 4.2. The fixed world has a velocity equal to
zero. The mass, as well as the lower ends of spring and damper have a velocity v.
When v = 0, the system is at rest: the velocity and acceleration are both equal to
static zero and in this static equilibrium state the gravity force will be compensated by the
equilibrium
force of the spring. When the system is not at rest, the sum of all forces is still equal
4.2. IDEAL PHYSICAL MODELS 45

FixedWorld

Spring Damper

Mass
m

F mg

F IGURE 4.4 Mass-spring-damper system

to zero, while a, v and x vary constantly. This is called a dynamic equilibrium . The dynamic
equilibrium
equation, which describes this ‘equilibrium’ is called the equation of motion. In
order to find this equation we consider the forces related to the elements:

spring: F = 1c x = 1c v dt
R

damper: F = f v
mass: F = ma = m ddtv
gravity force: F = F g = mg

When we define a downwards velocity or force as positive, then a positive velocity


or position of the mass results in counteracting forces of the spring and the damper.
This implies that in the equilibrium situation holds Note that in the
case that a and v
dv 1
Z
are equal to zero
m +fv+ v dt = F g (4.7) eq. 4.7 describes
dt c
the static
The mix of a derivative term and an integral term in one equation is not very com- equilibrium.

mon. Therefore we simplify things by using the variable x instead of v. This yields

d 2x dx 1
m 2
+f + x = Fg (4.8)
dt dt c
This is a second-order differential equation. There are a few software packages avail- second-order
differential
able, which allow the user to draw icon-based models like the one in figure 4.4 by equation
means of a graph editor. The software then automatically derives equations and
simulates the system. One of these programs is 20-sim developed at the University
of Twente. In the absence of such programming aids, we can always simulate the
system with the aid of the differential equation. Converting the differential equa-
tion into a block diagram may be helpful in order to achieve this. We rewrite eq. 4.8
into
d 2 x Fg 1 dx 1
· ¸
= − f + x (4.9)
dt 2 m m dt c
46 CHAPTER 4. IDEAL PHYSICAL MODELS

We start making the block diagram by drawing two integrator blocks, which give the
d 2x dx
relation between a = ,v= and x (figure 4.5).
dt 2 dt

F IGURE 4.5 Relation between a, v and x, represented by two integrators

The last two terms in eq. 4.9 represent the friction force and the force due to the
spring, respectively. When we take the signs of eq. 4.9 into account, we can add
these forces to the blockdiagram. This results in figure 4.6.

+
_

+
+

F IGURE 4.6 Second-order mass-spring-damper system represented by a block


diagram

Exercise 4.18
Simulate this system in 20-sim. Use the following parameters:

m: 1 kg
f : 1 N m−1 s2
c: 0.1 m N−1
Fg 10 N

For relatively simple systems deriving a block diagram in this way is rather straight-
forward. Later we will see how this can also be done for more complex systems.

4.2.3 Simulations of mechanical systems with IPM’s


Rather than deriving and drawing a block diagram we can directly draw the IPM us-
ing the graphical editor of 20-sim. As an example we will simulate the mass-spring-
damper system of the previous example again. We use the elements present in the
iconic diagram library for the mechanical translation domain.
4.2. IDEAL PHYSICAL MODELS 47

Exercise 4.19
Use the graph editor of 20-sim to draw the graph of the mass-spring-damper system of
figure 4.4. Examine the underlying equations of the icons by double clicking each icon.
The system will start moving because of the presence of the gravity force F g and comes
to rest in the static equilibrium (figure 4.7 right). When we want to study motions around
this equilibrium, we could disregard the gravity force and choose proper initial conditions
(e.g. an extension of the spring x(0) at t = 0) (figure 4.7 left). In that case eq. 4.9 changes
into
d 2x 1 dx 1
· ¸
= − f + x (4.10)
dt 2 m dt c
Simulate both systems and compare the results with the result in exercise 4.18. Use the
same parameters as in the previous example.

FixedWorld FixedWorld

Spring Damper Spring Damper

Mass Mass
m m

F mg

F IGURE 4.7 IPM of a mass-spring-damper System with 20-sim icons.


Left: with x(0) 6= 0 and no external force.
Right with the gravity force acting on the system and x(0) = 0.

If the simulations in exercise 4.18 and exercise 4.19 were performed correctly, both
simulations should have delivered the same response. One could ask why one of
the two representations is not enough. There are several reasons to use both and, as
we will later see, other, additional representations. First, each representation gives a
different view of the systems and by using multiple views, we see or reveal different multiple views
properties of the system. Block diagrams are more abstract than IPMs, but block
diagrams unambiguously represent the underlying equations. They are a graphical
representation of the differential equation and are, in principle, domain indepen-
dent. In contrast, symbols for IPMs are less well defined and although a good IPM
models the relevant properties of the system, the underlying equations are not nec-
essarily unambiguous. In general the modelling process starts with identifying the
major and relevant properties of a system and sketching a causal relation diagram
48 CHAPTER 4. IDEAL PHYSICAL MODELS

and/or an IPM. This IPM can be directly simulated and be used e.g to predict the
behaviour of the system. When we want to perform computations with the system,
or design a controller, we need to derive a differential equation (or transfer function
or block diagram).

Exercise 4.20
Mass-spring-damper systems, like the one in exercise 4.19 can be seen in many mechani-
cal systems. Find some examples of such systems.

So far we have only considered translations in the mechanical domain. Besides


translations, rotations play also a roll. The basic formulas for the rotation motions
are given in table 4.4, together with the equivalent formulas for the translation do-
main. T [N m] is the torque, ω [rad s−1 ] is the angular velocity and J [N m2 ] is the
moment of moment of inertia, also called mass moment of inertia or angular mass.
inertia
TABLE 4.4 Formulas for translation and rotation

domain behaviours
translation spring:R friction: mass: R
F = 1c v dt F=fv v=m1
F dt
rotation springR friction momentR of inertia
T = 1c ω dt T =fω ω = 1J T dt

rotation icons In figure 4.8 icons for the mechanical rotation domain are given. They are quite
similar to the translation icons. For the spring we often use the same icon as in the
translation domain. However, an icon in the form of a spiral, which emphasises the
rotational motion is also given.

spring damper moment of fixed world


inertia

spring friction

F IGURE 4.8 Icons of elementary submodels in the rotation domain

4.2.4 Electrical systems


The icons of the electrical elements are much more standardised than those in
the mechanical domain. With these icons we can draw an electrical diagram from
which we could derive a differential equation, which can eventually be simulated,
4.2. IDEAL PHYSICAL MODELS 49

after first converting it into a block diagram. The iconic diagram can also be simu-
lated directly when it is drawn in the graph editor of 20-sim. The basic icons for the
electrical domain are given in figure 4.9. Besides the capacitor, resistor and induc-
tance, we introduce the elementary submodel ground, which represents a reference ground
voltage equal to zero.

Capacitor Resistor Inductance Ground

F IGURE 4.9 Icons of elementary submodels in the electrical domain

As an example we consider the electrical circuit of figure 4.10. Each element in this
circuit is characterised by a voltage over the terminals of the element and a current
that flows through the elements. In the circuit of figure 4.10, the current is the same
through all the elements. In order to derive the differential equation, we must de-
fine what we consider as a positive voltage. These positive voltages are defined in
figure 4.10. With these sign definitions we can see that the sum of the voltages over
the capacitor, the inductance and the resistor is equal to zero.

+ --
i Inductor +
--
Capacitor Resistor
+
--

Ground

F IGURE 4.10 Electrical circuit with a capacitor, resistor and inductance

uc + uL + uR = 0 (4.11)
or
1 di
Z
i dt + L +iR = 0 (4.12)
C dt
When we differentiate the left and right-hand sides of eq. 4.12 we can rewrite this
into an equation with only differentiations:

d 2i d i 1
L + R+ i =0 (4.13)
dt 2 dt C
or
d 2i 1 di 1
· ¸
= − R + i (4.14)
dt 2 L dt C
50 CHAPTER 4. IDEAL PHYSICAL MODELS

This equation has the same form (with different symbols) as eq. 4.10 in the me-
chanical domain. The behaviour of this system will thus be the same, if we observe
equivalent signals.

4.2.5 Simulations of electrical systems with 20-sim


The equivalence between eq. 4.9 and 4.14 suggests that we will not see any sur-
prising new plots when we simulate the system of figure 4.10. We could modify the
block diagram of figure 4.6 by replacing the mechanical parameter blocks by their
electrical equivalents. But it is more interesting to rerun the simulations with the
IPM. In the next exercises we will again consider the situation where one of the el-
ements has an initial condition and the situation that there is an ‘external’ source
voltage / current element. For electrical systems these sources are a voltage source and a current
source
source. An ideal voltage source has a constant voltage, not influenced by the prop-
erties of the rest of the system. Similarly, an ideal current source delivers a constant
current to the circuit, not influenced by the properties of the rest of the system. Fig-
ure 4.11 gives the icons for these sources. The +-sign indicates the positive pole of
the voltage source, the arrow the direction of positive current.

Voltage source Current source

F IGURE 4.11 Icons of a voltage source and a current source

Exercise 4.21
Use the graph editor of 20-sim to draw the graph of the electrical circuit of figure 4.10.
Examine the underlying equations of the icons by double clicking each icon. Give the
capacitor an initial condition q(0) at t = 0. Examine with the aid of table 4.2 and table 4.3
the equivalence between the mechanical and electrical domain elements and choose the
parameters for the capacitor, inductance and resistor such that both systems show the
same behaviour. (Plot the voltage over the capacitor.)

Exercise 4.22
Use the graph editor of 20-sim to change the electrical circuit of figure 4.10 into the circuit
of figure 4.12. Make the initial condition of the capacitor equal to q(0) = 0. Choose the
parameters for the capacitor, inductance and resistor equal to the previous exercise and
let the voltage source have an output of 1 [V]. Simulate the system and plot the voltage
over the capacitor.
4.2. IDEAL PHYSICAL MODELS 51

Capacitor Inductor

Resistor
DC_power_supply

Ground

F IGURE 4.12 Electrical circuit with a capacitor, inductance and resistor


connected to a voltage source
52 CHAPTER 4. IDEAL PHYSICAL MODELS
5
The use of models is essential for the design of
engineering systems. Models can be scale
models, analogon models or digital simulation
models. Here we will see why the latter are
becoming more and more important and learn how
to use such models.

Numerical simulation

After studying this chapter you are expected to understand

– the importance of numerical simulation


– the relation between continuous-time systems and discrete time approximations
– how to use Euler integration as an approximation of the exact-solution
– the relation between step size and accuracy

5.1 The need for numerical simulation


5.1.1 Introduction
The use of models is essential during the design of all kinds of systems. By using
a model, the properties of a system can be analysed and improved before the real
system is being built. Another reason can be that a model allows experiments to
be done that would never be possible in real life. Here we will briefly discuss three
types of models: scale models, analogon models and digital simulation models. We
will see that digital simulations are of growing importance. In the previous chapters
we have already carried out several (digital) simulations. We assumed that (if the
models were correctly implemented) all results were correct. We did not bother
at all about accuracy issues or adjusting the tool to the specific problem we were
investigating. But without knowing what is exactly happening in the simulation,
this is not without risk. As a user you must be aware that a simulation can produce
completely erroneous results. You should know how to check the occurrence of
such a situation and know which measures can be taken to come to a correct result.

Scale models

Scale models are (mostly) smaller versions of constructions like a ship or an air-
plane. Before ships are built, their hydrodynamic properties are investigated in
towing tanks (figure 5.1). The experiments should help to design a more fuel-efficient towing tank
ship and to make it seaworthy. For similar reasons airplane models are extensively
tested in wind tunnels (figure 5.2). wind tunnel

53
54 CHAPTER 5. NUMERICAL SIMULATION

F IGURE 5.1 Scale model in a towing tank


(photo Marin: http://www.marin.nl/web/Facilities-Tools/Basins/Deep-Water-Towing-Tank.htm)

F IGURE 5.2 Scale model in a wind tunnel


(photo German-Dutch Wind Tunnels: http://www.dnw.aero/home.aspx)

These scale models are very expensive to make. One of the reasons is that the en-
vironment does not scale down with the model. Water and air flows have quite dif-
ferent properties with respect to the scale model than with respect to the real ship
or aircraft. Therefore, scale models should e.g. have an extremely smooth surface.
As a result, scale models require a lot of skilled manufacturing. Once ready, they
can not easily be changed anymore. In addition, towing tanks and wind tunnels
are huge and expensive constructions. And although also the possible experiments
are limited, scale models are still frequently used, because the experiments provide
information, which cannot easily be obtained otherwise.
5.1. THE NEED FOR NUMERICAL SIMULATION 55

Not all desirable scenarios are possible. Because the space in a towing tank or wind tun-
nel is limited, experiments always have to take place in a confined space. It is, for in-
stance, impossible to do long experiments with a high acceleration.

Analogon models

Another approach to testing a system’s behaviour before a real system is available, is


the use of analogon models. Although simulations with a digital computer have
almost completely taken over the simulation of dynamical systems, we still pay
attention to analogon models, because such models emphasise that similar be-
haviour can be realised in various domains. As a result the underlying differential
equations are the same. In the preceding chapters we have already seen that the
behaviour of hydraulic, mechanical and electrical systems can be completely sim-
ilar. This implies that we could use a water tank to ‘model’ the behaviour of a ca-
pacitor. We have also seen that a capacitor and a spring are in the same column in
table 4.2. Thus they can also be used as each other’s, or the water tank’s, analogon.
In addition, we could select the parameters in the models such that the shape of We could, for
the responses remains the same, but with a different time scale. This allows to carry instance, simulate
the behaviour of a
out analogue simulations at a different time scale than the orginal system and in process during
another, probably more convenient domain. Simulating an electrical circuit with several hours in a
water tanks, long pipes and valves may be instructive for educational purposes. But few seconds.
this is not very practical. The other way around is much more attractive: an elec-
trical circuit could simulate a hydraulic or mechanical system. This has resulted
in so-called analogue computers. An example is the AD4 computer from Applied analogue
computer
Dynamics (figure 5.3). This analogue computer was used in computer centres of
universities in the early 1970’s.

The AD4 had a total of 288 transistor-based amplifiers and was able to simulate systems
with 64 integrators, 48 summers, 144 inverters and 256 parameters. It cost a fortune: 5
Me in euros of 1970. Today this would translate to 30 Me. Simulations were made by
hard wiring the different electrical components. Because the computer was too expensive
to be used for one simulation only, the wiring (‘programming’) was done with so called
patch boards (figure 5.4). These could be connected to the computer to carry out the patch board
simulation. The ‘programming’ could thus be done off-line. For the price of the patch
board alone you could buy yourself a decent car! More information can be found e.g. at
http://www.adi.com/pdfs/Howe2June05.pdf.

Digital simulation

Because of the very high price of analogue computers and the vulnerability of the
wiring of the patch boards they became obsolete in the late 1970’s. Digital hard-
ware rapidly became more powerful and less expensive. This stimulated the de-
velopment of digital simulation software. One of the first simulation programmes
was THTSIM, which was developed at the Technische Hogeschool Twente, which THTSIM
later became the University of Twente. It got to be used world wide and became
known as TUTSIM. The program 20-sim is more or less an up-to-date successor
of TUTSIM. Another well known simulation program is Simulink, which is part of TUTSIM
56 CHAPTER 5. NUMERICAL SIMULATION

F IGURE 5.3 AD4 - analogue computer


(photo: http://dcoward.best.vwh.net/analog/)

F IGURE 5.4 patch board - analogue computer


(photo: http://www.vaxman.de/analog%95computing/spiral/digital%95control.jpg)
5.1. THE NEED FOR NUMERICAL SIMULATION 57

Matlab. With digital computer simulations we (mostly) want to simulate a contin-


uous-time system in the discrete-time domain.
Let us reconsider eq. 3.50. This equation described the pressure of the wine in a
wine box.
p(t ) = p(0)e −t /r c = p(0)e −t /τ (5.1)

It is a continuous-time equation, which can be used to compute this pressure at


any time t . When we compute eq. 5.1 on a digital computer, we have to do that at
specific moments in time, say at t = T . This results in one specific value p(T ):

p(T ) = p(0)e −T /τ (5.2)

i.e. the value of p(T ) at time T . Of course we can do a series of computations at


small time intervals ∆T , and so approximate the continuous-time signal, but the
result remains a series of numbers at discrete time intervals. Such a computation
could, for instance, be done with a spreadsheet program. Under the assumption
that e −T /τ can be computed exactly, the numerical values at these discrete times
will be exact.
However, such an approach requires that we first find a formula, like eq. 5.1,
which describes the behaviour of the system as a function of time. For the simple
case of the pressure in a wine box, this does not pose much of a problem and eq. 5.1
will suffice. But for more complex systems this is not a feasible approach.
Equation 5.1 was found as the solution of a simple differential equation. For more com-
plex systems such analytical solutions are not so easy to find. Numerical simulation on a
digital computer solves the differential equation numerically.

Figure 3.3, repeated in figure 5.5 showed that we can also represent the system with
a block diagram and use it to simulate the system, apparently without writing it in
the form of eq. 5.1 or eq. 5.2.

wine box

leakage

F IGURE 5.5 A wine box modelled as an integrator with (negative) feedback

Because the integrator in this block diagram is a typical continuous-time element,


we need to translate it into discrete time, if we want to compute it on a digital com-
puter. This process is called numerical integration. Numerical integration is the numerical
integration
basis of simulations with a digital computer. We can always represent a dynamical
system as one or more algebraic equations and one or more integrators. The equa- algebraic
equations
tions follow directly from figure 5.5. The integration is given by
58 CHAPTER 5. NUMERICAL SIMULATION

Z
V = V (0) + ϕ dt (5.3)

or, without initial condition: Z


V= ϕ dt (5.4)

and the algebraic equation is


11
ϕ=− V (5.5)
r c
Similarly the equations corresponding to figure 4.6 can be written with two integra-
tions
Z
x = v dt (5.6)
Z
v = a dt (5.7)

and one algebraic equation:


1
µ ¶
a =− x+f v (5.8)
c
Equations like eq. 5.8 are no problem at all for a digital computer. Thus if we can
find a proper formula for the integration we are able to simulate the system on a
digital computer.

5.2 Numerical integration


In section 2.1.6 we made the step from a summer to an integrator. Here we will do
the opposite and show how an integrator can be simulated in discrete time. In fig-
ure 5.5 the input of the integrator is the net flow ϕ(t ) and the output of the integra-
tor is the volume of wine in the box V (t ).
Z
V (t ) = V (0) + ϕ(t ) dt (5.9)

In a more general, domain-independent form this can be written as


Z
x(t ) = x(0) + u(t ) dt (5.10)

When we consider a small, finite, time step ∆T we find


Z T +∆T
x(T + ∆T ) = x(T ) + u(t ) dt (5.11)
T

When we assume that u(t ) = u(T ) is constant in this time interval, the integration
simplifies into the product of u(T ) and ∆T

x(T + ∆T ) = x(T ) + u(T )∆T (5.12)


5.2. NUMERICAL INTEGRATION 59

Equation 5.11 exactly computes the value of x(T + ∆T ). Equation 5.12 only gives an
exact solution if u(t ) is indeed constant in this time interval. If u(t ) is not constant,
this integration is best approximated if the time intervals ∆T are chosen very small.
The penalty is, of course, that many more computations have to be done.
When we integrate over more than one time interval, starting at t = 0, we find:

x(T ) = x(0) + u(T )∆T (5.13)


x(2T ) = x(1) + u(2T )∆T (5.14)

or
2
X
x(2) = x(0) + u(1T )∆T + u(2T )∆T = x(0) + u(nT )∆T (5.15)
i =0

When we ‘integrate’ over n time intervals, starting at t = 0, we find


n
X
x(nT ) = x(0) + u(nT )∆T (5.16)
i =0

Equation 5.16 is the discrete equivalent of eq. 5.10.

5.2.1 Difference versus differential equations


In Section 3.3 we have seen that we can write a dynamic system in the form of a dif-
ferential equation. This differential equation could be written in the form of a trans-
fer function by replacing the differentiations by s, or the integrations by 1s . Equa-
tion 5.10 could be written as a differential equation as well:

dx(t ) X (s) 1
Z
x(t ) = u(t ) dt → = u(t ) → s X (s) = U (s) → = (5.17)
dt U (s) s

Note that we used lower-case symbols for the time-dependent signals and capital
letters when we use the notation with s to emphasise that we applied the transfor-
mation. Alternatively, if there is no risk of confusion, we simply write X instead of
X (s).
In a similar way we can describe discrete-time systems by so-called difference difference
equations
equations. Equation 5.12 is an example of a difference equation. Mostly we use a
slightly alternative notation.

x((k + 1)T ) = x(k(T )) + u(k(T ))∆T (5.18)

or shorter
x(k + 1) = x(k) + u(k)∆T (5.19)
Finally, in such equations ∆T is often replaced by T , where T = ∆T should not be
confused with T in the previous formulas.

x(k + 1) = x(k) + u(k)T (5.20)


60 CHAPTER 5. NUMERICAL SIMULATION

discrete transfer We can convert eq. 5.20 into a transfer function by introducing the delay operator
function
z −1 .
delay operator
z −1
X (k − 1) → z −1 X (k) (5.21)
The inverse operation yields
X (k + 1) → z X (k) (5.22)
With this delay operator we can write eq. 5.20 as:

z X (k) = X (k) +U (k)T (5.23)

The operator z can, just like the Laplace operator s be handled as an ordinary coef-
ficient. Equation 5.23 can thus be written as

X (k) T
(z − 1)X (k) = U (k)T → = (5.24)
U (k) z − 1

5.2.2 Euler integration


Equation 5.12 or eq. 5.20 is known as the Euler integration. Equation 5.24 is the
transfer function of the Euler integration. It is the simplest form of numerical in-
tegration and you will therefore use it often if you have to program these equations
yourself. We could have derived these equations in a different way, by converting
the continuous-time differentiation into a discrete form, instead of converting the
integrator. In eq. 3.35 and eq. 3.36 we saw that ddtx for very small time increments
∆T can be approximated by

d x ∆x x(k) − x(k − 1)
≈ = (5.25)
dt ∆T ∆T

With the aid of the delay operator z −1 and again replacing ∆T with T we can write
the right-hand side as
1 − z −1 z −1
X (k) = X (k) (5.26)
T zT
In the case that ddtx = u(t ) this leads to the transfer function for the discrete differen-
tiation of eq. 5.27.
U (k) z − 1
= (5.27)
X (k) zT
This differentiation is referred to as the backward Euler differentiation. The inverse
backward Euler operation is called the backward Euler integration with the transfer function
integration
X (k) zT
= (5.28)
U (k) z − 1

We could also write eq. 5.25 as

∆x x(k + 1) − x(k)
= u(k) = (5.29)
∆T ∆T
5.2. NUMERICAL INTEGRATION 61

In this case we use in fact future information (from t = (k + 1)T ) to compute the
derivative at t = kT . Therefore, this differentiation is referred to as the forward Eu-
ler differentiation. The corresponding transfer function is forward Euler
differentiation
U (k) z − 1
= (5.30)
X (k) T

The transfer function for the forward Euler integration is again the inverse forward Euler
integration
X (k) T
= (5.31)
U (k) z − 1

We will use these formulas to investigate the accuracy of the Euler integrations.
There are at least three ways of doing this.

1. Compare the ‘exact’ solution, using formulas like eq. 5.1 with the numerical
integration. This could, for instance, be done with the aid of a spreadsheet

2. Compare the numerical Euler methods in simulations with different values of


the computation step size T

3. Compare simulations of the discrete system (with different values of T ) with a


good numerical simulation (that is one, that uses a more advanced
algorithm) that well approximates the exact solution.

In order to investigate option 1 and 3 we need the proper formulas and block
diagrams. The forward Euler integration according to eq. 5.31 can be written as

(z − 1)X (k) = T U (k) (5.32)

or
x(k + 1) = x(k) + Tu(k) (5.33)
If we only want to use previous values of x we write this equation as

x(k) = x(k − 1) + Tu(k − 1) (5.34)

The delay operator z −1 represents one time step (T ) delay. We can represent that in
a block diagram with a block with transfer function z −1 . With the aid of this block
we can draw the block diagram of figure 5.6. The output x(k) is the one step delayed
sum x(k) + Tu(k). The forward Euler integrator is thus realised by a summer in se- forward Euler
integrator
ries with a ‘gain’ equal to the computation step size T .
The backward Euler integration according to eq. 5.28 can be written as

(z − 1)X (k) = zT U (k) (5.35)

or
x(k + 1) = x(k) + Tu(k + 1) (5.36)
62 CHAPTER 5. NUMERICAL SIMULATION

discrete integrator / summer

F IGURE 5.6 Forward Euler integration

discrete integrator / summer

F IGURE 5.7 Backward Euler integration

If we only want to use previous values of x we write this equation as

x(k) = x(k − 1) + Tu(k) (5.37)

backward Euler The backward Euler integrator can be represented with the block diagram of fig-
integrator
ure 5.7. Note that in this case the input of the z −1 -block is the output of the integra-
tor. This implies that we can redraw the block diagram as in figure 5.8.
In the next exercises we will compare the accuracy of the Euler integrations. Just
an integrator is too simple a system. Therefore, we consider a simple first-order
system, according to the block diagram of figure 5.9.
This system can be described with a differential equation
dx dx
= −x → +x =0 (5.38)
dt dt
The solution of this differential equation is

x(t ) = x(0)e −t (5.39)

The discrete version of figure 5.9 is obtained by substituting the integrator by one
of the integrators of the figures 5.6-5.8. This results in figure 5.10 for the case of the
forward Euler integrator and in figure 5.11 for the backward version.
Exercise 5.23
In this exercise we apply the above-mentioned method 1 to see how well the Euler inte-
grations are able to compute correct values. Use eq. 5.39, eq. 5.34 and eq. 5.37 in a spread-
sheet to evaluate the performance of the two Euler methods. Use different computation
intervals T . Note that from figure 5.10 and figure 5.11 it follows that u(k) = −x(k). Make a
graph of the results.
5.2. NUMERICAL INTEGRATION 63

discrete integrator / summer

F IGURE 5.8 Other realisation of the backward Euler integration of figure 5.7

F IGURE 5.9 Continuous-time first-order system

You will have noticed that the backward integration formulas do not run without
problems in a spreadsheet. Closer examination of figure 5.11 reveals why. In this
case the signal x(k) is needed (via u(k)) to compute x(k). There is no z −1 block in
between. A closed loop without any delay element is called an algebraic loop. This algebraic loop
can be dealt with by using more complex algorithms that predict x(k), based on
older values only by means of an iteration procedure. iteration

Exercise 5.24
Next we evaluate the second method with 20-sim. Draw figure 5.9 in the graph editor of
20-sim. As a default 20-sim uses the so-called Backward Differentiation Formula (BDF).
With the standard settings for this system the graph produced by the BDF method will
have very small errors. This graph can be used as a reference. Use a gain (K ) block to
realise the block with the time step T . Change this block, by replacing the statement

output = K ∗ input; (5.40)

with
output = sampletime ∗ input; (5.41)
The parameter sampletime can be given a value in the discrete-time tab of the simulation
properties menu (parameter: Discrete Time Interval). Change the integration method in
forward and backward Euler and compare the results. Do not clear the graphs in between!
You will see that 20-sim has no problems with the algebraic loop introduced by the back-
ward Euler integration. This is because 20-sim has an algebraic loop solver.

We could also run the exact solution of eq. 5.39 together with the two systems based
on the Euler integration.
64 CHAPTER 5. NUMERICAL SIMULATION

discrete integrator / summer

+
_
+

F IGURE 5.10 Discrete version of the first-order system with forward Euler
integration

discrete integrator / summer

+
_
+

F IGURE 5.11 Discrete version of the first-order system with backward Euler
integration

Exercise 5.25
Draw the systems of figure 5.9, figure 5.10 and figure 5.11 together in the graph editor. Use
the (default) BDF method as integration method. The blocks T can be made by modifying
the gain block by replacing the gain parameter K with the 20-sim system variable sample-
time. Compare the responses for x(t ) and x(k) for sampletimes T of 0.5, 0.2, 0.2 and 0.01
seconds. Save the model for reuse in a next exercise.

5.2.3 Tustin
From the exercises we see that both forms of the Euler integration suffer from a
limited accuracy. One changes too fast and the other one too slow. The method of
Tustin Tustin uses this observation by taking the average of the two Euler methods. When
we add the two Euler equations (eq. 5.34 and eq. 5.37), we find

x(k) = x(k − 1) + Tu(k − 1)


x(k) = x(k − 1) + Tu(k)
+ (5.42)
2x(k) = 2x(k − 1) + T [u(k) + u(k − 1)]
5.2. NUMERICAL INTEGRATION 65

x(k) can thus be written as:


u(k) + u(k − 1)
x(k) = x(k − 1) + T (5.43)
2
This formula is known as the Tustin integration. The Tustin integration is also known
as the trapezium rule. Because we observed that of the two versions of the Euler in- trapezium rule
tegration one was too fast and the other too slow, it may be expected that the Tustin
integration will give a more accurate result, as it will be in between the Euler inte-
gration results.

Exercise 5.26
Expand exercise 5.23-exercise 5.25 with the Tustin integration. Note that the Tustin inte-
gration is not in the list of integration methods of 20-sim. It is available under the back-
ward Euler integration by drawing a slider to the position trapezium. The Tustin integra-
tion can be realised in the expanded version of exercise 5.25, by averaging the values of
the two Euler integrations.

Because the Tustin integration uses both the forward and backward Euler integra-
tion, an iteration for computing x(k) from previous values only, is needed here as
well.

5.2.4 More advanced methods


Most simulation programs offer more sophisticated algorithms as well. These more
complex methods interpolate the values between the intervals k − 1 and k in var-
ious ways. Among these more advanced methods are Runge-Kutta2 and Runge-
Kutta4, and Runge-Kutta-Fehlberg. The latter method uses a variable interval ∆T .
∆T is chosen small when there are large variations in the system and ∆T is chosen
large when there are only small or no changes. When selecting a variable step size
method, a maximum error has to be specified and the initial and maximum step
sizes can be chosen. The basic algorithm in 20-sim is the BDF (backward differenti- BDF
backward
ation formula) method. In many cases this can be used with its default settings. But differentiation
keep in mind that there is no method that is the best for all situations. formula
When using simulations you should always be aware of the fact that you are
working with an approximation. The approximation is only good if the relation
between ∆T and the dynamics of the system is well chosen. To get an idea we will
have a look at the consequences of this choice.

5.2.5 Sorting the equations


When we use simulation software a lot of work is automatically done by the pro-
gram. In 20-sim we can use an iconic diagram to describe a physical system. The
equations will be automatically generated by the program and even models that
could give problems with other programs probably produce a correct result. Pro-
grams that use block diagrams as input require more manual work. The iconic dia-
gram has to be converted into a differential equation and then into a block diagram
66 CHAPTER 5. NUMERICAL SIMULATION

or directly into a block diagram. The program still will take care for converting this
input into a series of integral and algebraic equations, which can be computed dur-
ing the simulation. When you want to run such a simulation outside a simulation
program, this last step requires manual work as well by combining the algebraic
equations and the integration methods into proper code. The equations must be
sorting sorted such that only old values are used to compute the values of the variables at
the next time step.

5.2.6 Accuracy versus efficiency


In general complex algorithms give a better performance with respect to accuracy
and computation time than more simple methods. For fixed-step methods, such
as Euler, there is direct relation between ∆T , the dynamics of the simulated system
and the accuracy. It is obvious that if the dynamics are so fast that the transient is
over in, for instance, 1 second, a computation step size of 1 or even 0.5 seconds will
give a wrong or at least very inaccurate result. In such a situation a step size be-
tween 0.01 and 0.1 seconds seems more appropriate. Because of their complexity,
complex methods need more computations per time step. However, they allow for a
larger step size. Therefore, the more complex algorithm may achieve a better, more
accurate, result with the same computational effort, or be faster for the same accu-
racy.
Even modern computers do their computations with a limited accuracy. Each
computation will suffer from small errors. If you do many computations by select-
ing a very small step size, these inaccuracies may become larger than the gain by
taking smaller time steps.
Nowadays computers are so fast that for simple problems computation time and
accuracy is not so much an issue. But for large simulations or low-level program-
ming in microprocessors this remains something that should be carefully looked at.
rule of thumb for As a rule of thumb, the step size can be chosen as follows:
time step
– start the simulations with a step size that, given the dynamics of the problem under
study, is certainly small enough
– increase the step size (e.g. with a factor 10) until you see clear differences between
the more accurate result and the faster result
– then you are one step too far. Thus go back to the previous step size
– you could fine tune the step size by continuing this procedure with a smaller
increase of the step size.

We will study the relation between step size, accuracy and computation time in a
few exercises.

Exercise 5.27
We reconsider the system of figure 4.4. We will simulate this system with the parameters
of exercise 4.18.
Compare the results of simulations with the Euler and the BDF method with respect to the
number of calculations, the computation time and the achieved accuracy.
5.2. NUMERICAL INTEGRATION 67

FixedWorld

Spring Damper

Mass
m

F mg

F IGURE 5.12 Mass-spring-damper system

Exercise 5.28
In figure 4.6 this system was converted into a block diagram (figure 5.13). By replacing
the integrators in this block diagram with the discrete integrators of figure 5.6, simulation
equations can be derived. Do this and simulate this system, either in a spreadsheet or in
or a programme, e.g. Processing.

+
_

+
+

F IGURE 5.13 Second-order mass-spring-damper system represented by a block


diagram

Exercise 5.29
By using the equation editor of 20-sim instead of the graph editor the differential or dif-
ference equations of this system can also be used as an input format. Do this for the
differential as well as for the difference equations and simulate the system.
68 CHAPTER 5. NUMERICAL SIMULATION
6
Concepts of electrical systems are useful for
understanding all dynamical systems.

Electrical Circuits

After studying this chapter you are expected to know

– the major properties of passive electrical elements: capacitors, inductances,


resistors and transformers
– the major properties of electrical components, which represent real voltage and
current sources
– the concept of impedance
– how to represent electrical elements and components as an impedance
– the laws of Ohm and Kirchhoff
– how to apply these laws to compute the transfer function of an electrical circuit.

6.1 Elementary models


6.1.1 Introduction
In the previous sections we have used three basic elements of electrical circuits:
capacitors, resistors and inductances. In the simulations another element already
sneaked in: a voltage source. In this chapter we will first introduce a few additional
elements of electrical systems. Simulating circuits with these elements is not differ-
ent from what we have seen before.
Often it is desirable to perform some computations with these circuits as well.
We will see that these computations help to gain insight in the dynamic behaviour
of the system. Electrical network theory is well developed and forms the basis for all
computations with electrical circuits. Because of the analogies on a ‘system level’
between elements in different physical domains, these concepts are also applicable
to the other domains.

69
70 CHAPTER 6. ELECTRICAL CIRCUITS

6.1.2 Elements
Capacitor, resistor and inductance

The basic equations for elementary capacitors, resistors and inductances were first
introduced in table 4.2 and they are repeated in table 6.1. Here we will take a closer
look at these elements and discuss a number of additional properties.

TABLE 6.1 Elements in the electrical domain

q = charge capacitor resistor inductance


λ = flux linkage 1 1
u= i dt u = Ri i= u dt
R R
Φ = magnetic flux C L

q = i dt λ = u dt
R R

nΦ = u dt
R

Let us first reconsider the capacitor. We have seen that a capacitor is charged by a
current: q = i dt . A battery is in essence a capacitor as well. A capacitor is thus
R

electrical energy able to store electrical energy. Electrical energy is stored by loading the capacitor
and delivered, e.g. to a lamp, by unloading the capacitor. We have seen in figure 4.2
that a lamp gives more light when the current flowing through the lamp is larger. In
that case more energy is drawn from the battery. With a constant voltage of the bat-
tery (u) and a twice as big a current (i ), the decrease of the energy stored in the bat-
power tery will be twice as big. We call this change in the stored energy power. The power
in Watts, P [W] or [J s−1 ] is thus equal to

P = ui (6.1)

The total amount of energy E [W s] or [J], delivered by the battery to the lamp over
time is Z Z
E= P dt = ui dt (6.2)

The energy consumption of electrical appliances or light bulbs is determined by the


power of the appliance in Watts multiplied by the time they are in use. Modern LED
lamps are typically in the range of 1-10 Watt. The electricity bill is in kW h. 200 hours use
of a 5 W led lamp consumes 1 kWh. A similar amount of energy is needed to fully charge
the batteries of a Segway (figure 1.6), good for a ride of 40 km under average conditions.

A capacitor (and the related component battery) can thus store electrical energy in
the form of an electrical charge. In a similar way inductors, in the form of coils, can
flux linkage store electrical energy in the form of the flux linkage (λ). In contrast, resistors can-
not store energy. They dissipate electrical energy by converting it into light (a lamp)
(ir)reversible or heat. This process is irreversible. The power flow to a capacitor and inductor is
process
reversible: a capacitor can be loaded and unloaded. For the ideal capacitor, which is
the ideal element described by the equations in table 6.1, loading and unloading is
a process without any energy loss.
6.1. ELEMENTARY MODELS 71

Transformer

An inductance can be realised as a ferromagnetic (iron) core with a number of


windings around it. From the formulas of the inductance in table 6.1 we can derive
that:
dΦ u
= (6.3)
dt n
When the inductance is connected to an alternating voltage source, e.g. a 50 Hz
sinusoidal power outlet, the change in the magnetic flux in the inductor is thus pro-
portional to u/n. If we wind another coil around the same core (figure 6.1) with a
different number of windings (n 2 ), for this secondary coil the same relation holds:

u2 d Φ
= (6.4)
n2 dt
The primary coil with n 1 windings and connected to voltage u 1 (corresponding to
n and u in eq. 6.3)) results thus in a changing flux d Φ/ dt that in its turn induces a
secondary voltage u 2 . When we combine eq. 6.3 and eq. 6.4 we find

u2 d Φ u1 u2 n2
= = or = (6.5)
n2 dt n1 u1 n1
equations 6.3-6.5 describe the ideal physical model of the element transformer. transformer

Primary Secondary
current (i1) current (i 2 )

Primary Secondary
voltage voltage
(u 1) (u 2)

Primary Secondary
windings windings
n 1 turns n 2 turns

F IGURE 6.1 Transformer with primary and secondary windings


source: Wikipedia

Transformers are used in many electric devices as well as in the power grid to trans-
form high voltages (e.g. 380 kV) to lower distribution voltages and finally to the 230
V, delivered to homes. Although nowadays ‘switched power supplies’ are more com-
mon, they could also be used in power supplies of computers and chargers of lap-
tops and mobile phones. In that case the 230 V of the power outlet is transformed
(‘stepped down’) to a lower voltage. The DC-output of the power supply or charger
is obtained after rectification. rectification
Real transformers may have windings with an electrical resistance R and there
may be magnetic losses as well. But for the ideal element transformer the power
72 CHAPTER 6. ELECTRICAL CIRCUITS

that goes in the transformer at the primary windings, is without losses available
at the secondary windings. When we connect the primary windings to a voltage
source and the secondary windings to a resistor a current will flow through the sec-
ondary windings and the resistor. The power at the primary windings will thus be
equal to the power at the secondary windings

u2 i 1
P = u1 i 1 = u2 i 2 or = (6.6)
u1 i 2

The equations of the transformer can thus be summarised as:

u2 n2 i 2 n1
= and = (6.7)
u1 n1 i 1 n2

transformation The ratio n 1 /n 2 is called the transformation ratio, indicated with the symbol n. The
ratio
icon for the ideal physical element transformer is given in figure 6.2. Because the
transformer has two electrical connections with a plus and minus pole at the pri-
mary windings and a plus and minus pole at the secondary windings, we say that
two-port element this element has two ports or that a transformer is a two-port element.

F IGURE 6.2 i1 i2
Icon of a transformer + +

u1 u2

_ _

Gyrator

A dual of an We could also think of another two-port electrical element, which is a kind of ‘dual’
element, is an of the transformer. This element is the gyrator. The gyrator will later be used, among
element with
reciprocal others, as a transducer between different physical domains. Although an electric
properties. gyrator is not available as a simple physical component, it could be made electroni-
cally. An ideal gyrator is described by the equations

u2 = r i 1
u1 = r i 2 (6.8)

The gyrator thus relates the secondary current to the primary voltage through the
gyration ratio gyration ratio, r and vice versa. The symbol for a gyrator is given in figure 6.3

6.1.3 Sources
A ‘source’ element has already been used a few times, without extensively discussing
its properties (See section 4.2.5 and figure 4.11). Here we will take a closer look at
voltage source the voltage source and the current source. An ideal voltage source is an element
6.1. ELEMENTARY MODELS 73

F IGURE 6.3 i1 i2
Icon of a gyrator + +

u1 u2

_ _

that delivers a constant voltage. This voltage is not influenced by other elements
that may be connected to the voltage source. In other words, such an ideal voltage
source can deliver an arbitrary large current. And, because the power P = ui , it is a
source of unlimited power. A 230 V power outlet approaches such an ideal source.
Because the voltage of a power outlet is a 50 Hz alternating voltage, this is in fact a
modulated voltage source: a voltage source where the output voltage is ‘modulated’, modulated
voltage source
by an external sinusoidal signal. A 230 V power outlet approaches an ideal source
more than a battery, because when a battery is connected to a number of appli-
ances or lamps, the voltage at its terminals obviously drops as we have seen in the
situation of figure 4.2. The reason that the voltage of a voltage source in the form of
a battery drops at higher loads is the internal resistance of the battery. A ‘real’ bat-
tery connected to a load in the form of a resistor can be represented with the circuit
of figure 6.4.

Exercise 6.30
From a safety point of view a power outlet that can deliver unlimited power is less ideal.
Which measure is taken to prevent the risks of shortcutting the circuit. What is done to
prevent that humans become part of the electrical circuit?

F IGURE 6.4
Battery: voltage source with internal
resistance R_internal

VoltageSource u battery R_load

Battery

Ground

Exercise 6.31
Simulate the system of figure 6.4 with 20-sim and do a multirun experiment. Let R load be
1Ω and let R internal vary from 0.1 to 1Ω. Plot the voltage over R load .

We can verify the simulations of exercise 6.31 with some simple computations. The
resistance of two resistors in series is equal to the sum of the two resistances. There-
74 CHAPTER 6. ELECTRICAL CIRCUITS

fore, the current that flows through the circuit is


u source
i= (6.9)
R internal + R load

The voltage over the load is the real voltage supplied by this battery with internal
resistance
u battery = R load i (6.10)
If u source = 1.5 V, R load is 1Ω and R internal = 0.1Ω, the current is

1.5
i= [A] (6.11)
1.1
u battery is thus
1.5
u battery = 1 = 1.36 [V] (6.12)
1.1
With an internal resistance of 1Ω we find
1.5
u battery = 1 = 0.75 [V] (6.13)
2
We thus see that if the load is in the same order of magnitude as the internal re-
sistance, the voltage at the terminals of the battery drops to 50% of the voltage in
the unloaded situation. If the internal resistance is negligible compared with R load ,
u battery is (almost) equal to 1.5 [V].
(modulated) The other electrical source element is a current source. An ideal current source is
current source
an element that delivers a constant current. In case of a modulated current source
this current is again determined by an external signal generator. For the ideal ele-
ment the output current is not influenced by other elements that may be connected
to the current source. ‘Real’ current sources will be less ideal. This is again due to
an internal resistance. In the case of a current source, an internal resistance as in
figure 6.4 would not influence the current at the terminals of the current source.
The internal resistance would heat up, but will not influence the current, because
this is, by definition constant. This is different when we place the internal resistor in
parallel with the current source (figure 6.5).

F IGURE 6.5
Current source with internal
resistance
R_internal R_load
CurrentSource

‘real’ current source


Ground
6.1. ELEMENTARY MODELS 75

Exercise 6.32
Simulate this system with 20-sim and do a multirun experiment. Let R load be 1Ω and let
R internal vary from 1 to 10Ω. Plot the current through, and the voltage over R load . Explain
the differences between this simulation and the one in exercise 6.31.

We can do some computations here as well. Therefore, it is necessary that we first


know how to deal with two resistors in parallel. Let us suppose that R load = 1 and
R internal = 9. The major part of the total current, i , will then flow through R load , Compare this with
because R load is a much smaller resistance. It is not surprising that in this case the a small and a
large outlet in a
current through R internal is 9 times smaller than the current through R load . If the water tank. The
1 9
total current is i the currents are i 1 = 10 i and i 2 = 10 i . This can be generalised to larger one is a
arbitrary values of R internal = R 1 and R load = R 2 . (See figure 6.6.) smaller restriction
and most of the
water will flow
F IGURE 6.6 i through this
Two resistors in parallel + opening.
i1 i2

u
R1 R2

For arbitrary values of R 1 and R 2 we find:

R2 R1
i1 = i and i 2 = i (6.14)
R1 + R2 R1 + R2
The voltage over R 1 is equal to

R2
u = R1 i 1 = R1 i (6.15)
R1 + R2
The same holds of course for the voltage over R 2 , which must be equal to the volt-
age over R 1 :

R1
u = R2 i 2 = R2 i (6.16)
R1 + R2
The total resistance seen by the current source is thus

u R1 R2
R tot = = (6.17)
i R1 + R2
Let us go back to the problem of exercise 6.32. If the current of the current source is
1 A, R load = 1 and R internal = 1, the voltage over the resistors is equal to

1·1
u= 1 = 0.5 [V] (6.18)
1+1
When R internal = 10 this voltage is
76 CHAPTER 6. ELECTRICAL CIRCUITS

10 · 1
u= 1 = 0.9 [V] (6.19)
10 + 1
For R internal = 1 the current through R load , and thus the current at the terminals of
the ‘real’ current source, is

R internal 1
i load = 1= 1 = 0.5 [A] (6.20)
R internal + R load 1+1
For R internal = 10 the current through R load , and thus the current at the terminals of
the ‘real’ current source, is

R internal 1
i load = 10 = 1 = 0.9 [A] (6.21)
R internal + R load 10 + 1
From these examples we can conclude that

ideal voltage – an ideal voltage source must have an internal resistance of zero
source
ideal current – an ideal current source must have an infinitely large internal resistance.
source

6.2 Computations
Although simulations can provide a quick answer in many situations, calculations
of voltages and currents in a circuit can contribute to insight in what you are doing.
Without such knowledge, simulations alone easily become trial and error with-
out any notion of the direction in which you might find a solution. We have al-
ready seen this in the previous section. The formulas, obtained by applying Ohm’s
law, make clear what the conditions are for real sources in order to be almost ideal
sources. Before deriving some general rules, which will enable us to perform com-
putations even in complex systems, let us consider two more examples of relatively
simple electrical circuits (see figure 6.7).

a b

R R R3
+ 1 + 1
u R2 R3 u R2 R4

F IGURE 6.7 Two circuits

We use the Let us first consider the circuit on the left of figure 6.7a. It consists of a resistor
symbol || to R 1 in series with the parallel combination of R 2 and R 3 (R 2 || R 3 ). In order to find the
indicate two
elements in total current delivered by the voltage source we start with computing the resistance
parallel. of this network.
6.2. COMPUTATIONS 77

R2 R3 R1 R2 + R1 R3 + R2 R3
R tot = R 1 + = (6.22)
R2 + R3 R2 + R3
The current flowing through R 1 and through the parallel combination R 2 || R 3 is
thus

u R2 + R3
i= = u (6.23)
R tot R 1 R 2 + R 1 R 3 + R 2 R 3
The current flowing through R 3 is:

R2 R2 R2 + R3
i R3 = i= u (6.24)
R2 + R3 R2 + R3 R1 R2 + R1 R3 + R2 R3
and the voltage over R 3 is

R2
u R3 = R 3 i R3 = R 3 u (6.25)
R1 R2 + R1 R3 + R2 R3
We could write this as

u R3 R2 R3
= HR3 = (6.26)
u R1 R2 + R1 R3 + R2 R3
We call HR3 the transfer function from u to u R3 . transfer function

Another way of finding u R3 is by realising that the voltages over R 2 and R 3 are the same.
The parallel combination of R 2 and R 3 can be replaced by the resistance R 23

R2 R3
R 23 = (6.27)
R2 + R3
The current through R 1 and R 23 is then

u R2 + R3
i= = u (6.28)
R2 R3 R1 R2 + R1 R3 + R2 R3
R1 +
R2 + R3
with

R2 R3 R2 R3 R2 + R3
u R3 = u R23 = i= u (6.29)
R2 + R3 R2 + R3 R1 R2 + R1 R3 + R2 R3
This is equal to eq. 6.25:

R2 R3
u R3 = u (6.30)
R1 R2 + R1 R3 + R2 R3

The circuit at the right in figure 6.7b can be analysed in a similar way. The most
easy way is of course to introduce a new resistance R 5 = R 3 + R 4 . The circuit is then
again similar to the circuit on the left.

Exercise 6.33
Compute the voltage u R4 in the circuit on the right of figure 6.7.
78 CHAPTER 6. ELECTRICAL CIRCUITS

6.2.1 Kirchhoff’s laws


When circuits become increasingly more complex the computations we have car-
ried out so far will also become more difficult, because they were not very system-
atically derived. The laws of Kirchhoff provide a method for computing transfer
functions in networks of any complexity. Before presenting these laws we need to
introduce a few definitions.

The point in an electric circuit where two or more elements are con-
node nected is called a node. In figure 6.8 n 1 , n 2 and n 3 are nodes.

path A path in an electric circuit is formed by a number of interconnected


circuit elements. When the path begins and ends in the same node,
closed path or without passing any node more than once, we call such a path a closed
loop
path or loop. In figure 6.8 L 1 and L 2 are loops.

The definition of We redraw figure 6.5 and indicate the directions of what we call a positive cur-
what we call rent. We also indicate what we call a positive voltage by means of plus and minus
positive is up to
the user. The only signs at the terminals of the elements. The result is shown in figure 6.8
important thing is
that we indeed
define what we
consider positive.

F IGURE 6.8 The circuit with 2 closed paths and 2 nodes

Because a node cannot store energy it is obvious that all the currents that flow to
the node, must immediately leave the node. In other words, the sum of all currents
at a node is always zero. More precisely formulated, this leads to:

Kirchhoff ’s Kirchhoff ’s current law: The algebraic sum of all the currents at any
current law
node in a circuit equals zero. See figure 6.9.

The term algebraic means that we have to take the signs of the currents into ac-
count.
In the previous examples we have already seen that the voltage of the voltage source
is equal to the voltage over the load. In other words, the sum of all voltages in such a
closed loop is equal to zero. Or more precise:
6.2. COMPUTATIONS 79

F IGURE 6.9 i2
i1
Kirchhoff’s current law. Here all positive currents
flow to the node. This implies that some of the cur- ij
rents must be negative for the sum to be zero.

in

Kirchhoff ’s voltage law: The algebraic sum of all the voltages at any Kirchhoff ’s
voltage law
closed path in a circuit equals zero. See figure 6.10.

Again, the term algebraic means that we have to take the orientation of the voltages orientation =
into account: if the current through a resistor flows from + to −, u = i R (e.g. R 2 in definition of what
is considered a
figure 6.8), otherwise u = −i R (e.g. R 1 in figure 6.8). positive voltage.

F IGURE 6.10 + u2 _ uj _
+
Kirchhoff’s voltage law

+ R Rj +
1
u1 Rn un
_ _

With the aid of the two laws of Kirchhoff and the law of Ohm, we can try to com-
pute the transfer of eq. 6.26) again. Applying Kirchhoff’s current law to the circuit of
figure 6.8 yields:
i1 + i2 + i3 = 0 (6.31)
Applying Kirchhoff’s voltage law to the two loops in figure 6.8 yields:

u − (−i 1 R 1 ) − i 2 R 2 = 0 (6.32)
and

i 2 R2 − i 3 R3 = 0 (6.33)
From eq. 6.32 it follows

−u + i 2 R 2
i1 = (6.34)
R1
From eq. 6.33) it follows

i 3 R3
i2 = (6.35)
R2
Substituting eq. 6.35 into 6.34 yields

u R2 R3
i1 = − + i3 (6.36)
R1 R1 R2
80 CHAPTER 6. ELECTRICAL CIRCUITS

Now we have all currents written as a function of i 3 . Substituting eq. 6.35 and eq. 6.36
into eq. 6.31 yields

u R2 R3 R3
− + i3 + i3 + i3 = 0 (6.37)
R1 R1 R2 R2
or

u R2 R3 + R1 R3 + R1 R2
− + i3 = 0 (6.38)
R1 R1 R2
This can be written as:

u R2 R3 + R1 R3 + R1 R2
= i3 (6.39)
R1 R1 R2
i 3 can thus be written as

R2
i3 = u (6.40)
R2 R3 + R1 R3 + R1 R2
and

R2 R3
u3 = u (6.41)
R2 R3 + R1 R3 + R1 R2
This expression is equal to eq. 6.25. It may seem that it requires more work to find
the solution in this way than it did before. But the advantage is that now all the
currents in the circuit are written as a function of i 3 . By multiplying the currents
i 1 and i 2 with R 1 and R 2 we can now easily find u 1 and u 2 as well. In addition, we
can apply this approach to much more complex systems as well. We will always find
a number of equations equal to the number of unknowns. And because this is a sys-
tematic procedure, using clearly defined laws, it can be automated as well.

6.2.2 Concept of impedance


So far we have only considered electrical networks consisting of sources and resis-
tors. It would be nice if we could also perform calculations with networks contain-
ing the elements capacitor and inductance. In section 3.2.1 we have introduced the
Laplace or Laplace or differential operator s. Using this operator we were able to write differen-
differential
operator
tial equations as algebraic equations. Of course we can do this for single elements
as well. Once the equations for a capacitor and inductor are written in such an alge-
braic form, we can, for instance, use Ohm’s law to determine the relation between
u and i for these elements. This leads to a kind of generalised resistor element. We
refer to such an element as an impedance. When working with impedances in elec-
trical networks, it is common to use upper-case characters for the signals, like U
instead of u and I instead of i .
We have seen that a capacitor can be described, in derivative form, by the equa-
tion
du
i =C (6.42)
dt
6.2. COMPUTATIONS 81

d
Replacing with s yields
dt
I = C sU (6.43)
According to Ohm’s law we find

U 1
= (6.44)
I sC

The term 1/sC , the ratio between U and I , is the impedance of a capacitor denoted impedance of a
capacitor
as ZC .

1
ZC = (6.45)
sC
In a similar way we can find the impedance of an inductor

di
u=L → U = L sI (6.46)
dt
According to Ohm’s law we find

U
= sL (6.47)
I
We call this ratio the impedance of an inductor and denote this as ZL . impedance of an
inductor
ZL = sL (6.48)

Of course a resistor can also be seen as an impedance impedance of a


resistor

ZR = R (6.49)
Calculation of transfer functions in systems with all three kinds of these electrical
elements is now easy, because they can all be described as impedances.

6.2.3 Electrical networks


As an example we will have a look at a few electrical networks. The first network we
consider is the RC-network given in figure 6.11. This is a so-called low-pass network. low-pass
network
Later on we will see that such a network, for instance, can be used to reduce the
higher tones in an audio signal.

F IGURE 6.11
RC network R
u C
82 CHAPTER 6. ELECTRICAL CIRCUITS

Applying the voltage law of Kirchhoff and using the impedances ZR and ZC we can
write the equation for the current i in this circuit.

U U
U − ZR I − ZC I = 0 → I= = (6.50)
ZR + ZC 1
R+
sC
This can be written as

sC
I= U (6.51)
sRC + 1
The voltage UC over the capacitor is:

1 sC 1
UC = ZC I = U → UC = U (6.52)
sC sRC + 1 sRC + 1

When we consider Uin = U as the input signal and Uout = UC as the output signal
we get figure 6.12. The circuit within the dotted box can be seen as a component,
low-pass filter consisting of two ideal elements. The component can be used as a low-pass filter.

F IGURE 6.12
RC network as low-pass filter
component R
U Uin C Uout

From eq. 6.52 it follows that the transfer function of this filter is

Uout 1
Hfilter = = (6.53)
Uin sRC + 1
When we reconsider eq. 6.52 we see that we can easily write the differential equa-
tion of this system by replacing s with ddt. . This leads to the equation

d uC
RC + uC = u (6.54)
dt
and when u = 0 to

d uC
RC + uC = 0 (6.55)
dt
We have already seen a differential equation like eq. 6.55 in eq. 3.50. The solution is
thus

uC (t ) = u c (0)e −t /RC (6.56)

The response of eq. 6.56 for u = 0 and uC (0) = 1 is given in figure 6.13.
6.2. COMPUTATIONS 83

UC
U_out {V}
1V

0.63 V

0.5 V

0.37 V
0

time {s}

F IGURE 6.13 Response for u = 0. At t = τ, uC = 0.37uC (0)

When t = RC the exponent of the exponential function is −1. The value of


e −1 = 0.37. We call τ = RC the time constant of this first-order system. At t = τ the time constant
transient is at 37% of its initial value. In other words at t = τ, 63% of the total change (τ)
from 1[V] to 0[V] has been realised. This can be verified with the simulations of ex-
ercise 6.34.

Exercise 6.34
Simulate this system in 20-sim. Use a modulated voltage source instead of an ordinary
voltage source and connect this source with a Signal generator-pulse block. The pulse
realises in fact switching on and off of the voltage source. This should lead to the diagram
of figure 6.14.

F IGURE 6.14
RC network with a pulse R
input signal u C

Pulse

Plot the output of the filter (the voltage over the capacitor) for different values of R and C .
Select a proper value for the stop time of the pulse. Explain your results. Note that both in
the case of switching the voltage source on and off, the transient is within 37% of its final
value, τ seconds after the switch. This observation can be used to find the solution for the
differential equation 6.54.

These observations are of course valid for all systems with a transfer function of the
form

Uout K
H= = (6.57)
Uin sτ + 1
84 CHAPTER 6. ELECTRICAL CIRCUITS

The solution always has the shape of an exponential function. Without an input
and an initial condition Uout (0) the response starts at Uout (0) and goes exponen-
tially to the final value 0. After τ seconds the value of Uout is at 37% of its initial
value. When there is no initial value Uout (0) and Uin is switched from 0 to 1 at t = 0,
the response reaches 63% of its final value after τ seconds. The final value is in this
gain case K Uin . K is called the gain of this system. This is summarised in figure 6.15.
Note that the tangent at the start of the responses, intersects with the final value at
t = τ.

U_out {V}
U_in {V}
1K

0.63 K
0.5 K

0.37 K

0 2 4 6 8 10 12 14
time {s}

F IGURE 6.15 RC network as low-pass filter component

The response makes clear that quick changes, like a sudden step change at the in-
put are not visible at the output of this network. More slow or ‘constant’ signals, are
completely visible at the output. Quick changes correspond to high-frequency sig-
nals. Slow changes correspond to low-frequency signals. The low-pass character of
this filter becomes even more clear when we examine the behaviour of the filter for
sinusoidal signals of different frequencies.
In figure 6.16 the response of this network to a so-called frequency sweep sig-
nal is given. This is a sinusoidal signal u(t ) = sin(ωt ) where ω starts at a frequency
equal to 0 and ends with a frequency of, say, 1000 rad/s. We see that the lower fre-
quencies come out of the network undisturbed, but at higher frequencies the volt-
age over the capacitor becomes smaller and smaller. If we would put such a net-
work in an audio signal the higher tones will be weakened or ‘filtered out’. There-
low-pass filter fore, such a network acts as a low-pass filter.
Exercise 6.35
We examine this further by using a sinus as input. Choose R = 1Ω, C = 1F and select for the
frequency of ω values of 0.1, 1 and 10. Observe the reduction in amplitude of the output
signal and also the delay between the input and the output for the different frequencies.
6.2. COMPUTATIONS 85

model
1
u_C {V}

0.5

-0.5

u_source {V}

0.5

-0.5

-1
0 50 100 150 200 250 300
time {s}

F IGURE 6.16 Response of an RC network to a sweep input signal

The second network we consider is the RLC-network of figure 6.17. RLC-network

F IGURE 6.17
RLC network L R
Modulated C
Voltage
Step Source

Using impedances it is straightforward to compute the transfer function from the


input voltage Uin (the voltage from the modulated voltage source) to Uout (the volt-
age over the capacitor). We just follow the same procedure as in the first-order case.

Uin Uin
Uin − ZL − ZR I − ZC I = 0 → I= = (6.58)
ZL + ZR + ZC 1
sL + R +
sC
This can be written as:

sC
I= Uin (6.59)
s 2 LC + sRC + 1
and thus for the output voltage Uout

1 sC 1
Uout = Uin = 2 Uin (6.60)
sC s 2 LC + sRC + 1 s LC + sRC + 1
Because of the term s 2 this is a second-order system. We can simulate the system second-order
system
and analyse its behaviour.
86 CHAPTER 6. ELECTRICAL CIRCUITS

Exercise 6.36
Simulate the system in 20-sim and plot the voltage over the capacitor. Perform a multiple
run with a parameter sweep. Let R vary between 0.1 and 10. Start with the following
parameters

L = 1H
R = 1Ω
C = 0.01F

In the next experiment set R to 1 again. Let C vary between 0.01 and 1. In the last experi-
ment we use R = 1 and C = 0.01 and we let L vary between 1 and 100.
damping You will observe that one of the parameters only influences the damping of the system.
overshoot The amount of damping determines the amount of overshoot of the response and deter-
mines how fast the sinusoidal component of the transient signal dies out. Another param-
eter influences the frequency of the sinusoidal variations of the output signal. The third
parameter influences both, damping and frequency. Try to relate these variations to the
coefficients in eq. 6.59.

You will have observed that variations in R only influence the damping of the sys-
tem. Apparently the coefficient RC in eq. 6.59 relates to the damping. Changes in
C and L influence both the damping and the frequency of the transient response.
These observations have lead to a standard form for second-order transfer func-
tions:

1 ω2n
H= 2
= (6.61)
s 2ζ s + 2ζωn s + ω2n
2
2
+ s +1
ωn ωn
From eq. 6.60 and (6.61 it follows that

1 1
ω2n = → ωn = p
LC LC
r
2ζ 1 C
= RC → ζ = R
ωn 2 L

When ζ > 1 there will be no oscillatory response or overshoot. For ζ < 1 there will
be overshoot and an oscillatory response. The damping will be smaller when ζ is
damping ratio: ζ closer to 0. For ζ = 0 the response will be a pure sinusoidal signal. ζ is called the
natural damping ratio. The parameter ωn is called the natural frequency because this is the
frequency: ωn
frequency of oscillation of the system (for ζ = 0) even if there are no external signals
exciting the system. Just an initial condition is enough.

Mechanical vibrations of the housing of a computer or in a car are also the result of
second-order systems with a low damping ratio.
6.3. COMPUTATIONS VERSUS SIMULATIONS 87

6.3 Computations versus simulations


These last two examples demonstrate that writing a system in a standard form
helps to reveal the dynamic properties of the system without having to run simu-
lations or perform difficult computations. It helps to understand the dynamic be-
haviour and can indicate directions for changing the system if another behaviour is
desired. Of course for more complex systems, simulation remains a powerful tool.
For understanding the behaviour of a system it helps if you can choose from
several descriptions. Each description will reveal other properties. If we describe
a system with an IPM, the domain properties are clearly visible, but experience is
needed to see that a mass-spring-damper combination has the same behaviour
as an RLC network. When we describe these systems with differential equations
or transfer functions the common properties become more clear, while, with pa-
rameters still related to the physical elements, the relation with the physical do-
main is still present. If we further abstract the description into the forms of eq. 6.57
and eq. 6.61, the relation with physics is almost lost, but dynamical properties are
clearly revealed.
Example
20-sim has an option to automatically derive a transfer function from an IPM. Take,
for example, the system of figure 6.17. Choose under ‘Tools’ the option ‘Frequency
domain toolbox’ and then ‘Model Linearization’. After choosing the desired input
and output signal, the transfer function is computed (symbolically). This implies
that the parameters of the physical system are still directly related to the numerical
values in the transfer function and can be altered. In the resulting ‘Linear Systems
Editor’ window it is possible, among others, to directly compute the step response
from the transfer function of the system.

6.4 Summary
In figure 6.18 all the electrical elements treated in this chapter are given. In addition
the formulas describing the relation between the voltage v and the current i are
given. For the capacitor and the inductance the formulas are given in integral form.
When these elements are used in a simulation the integral form is preferred. For
the resistor the relation is given as u − i R = 0. This is to emphasise that Ohm’s law,
like all the other formulas, gives a relation between u, i and R rather than indicating
that u depends on i (by writing u = i R) or vice versa (by writing i = Ru ).
In this chapter the concept of impedance was also introduced. This enables easily
deriving of the transfer functions. We saw that first- and second-order systems can
be written in a standard form. For first-order systems the standard form is:

K
H= (6.62)
sτ + 1
where τ determines the slope of the response at t = 0 and the value where the re-
sponse has changed 63%. The gain K determines (in the case of a step change at gain K
88 CHAPTER 6. ELECTRICAL CIRCUITS

capacitor resistor inductance ground

i1 i2 i1 i2
+ + + +

u1 u2 u1 u2

_ _ _ _

voltage source current source transformer gyrator

F IGURE 6.18 Electrical elements: icons and equations

the input) the final value of the response (the steady state value) (figure 6.19).
For a second-order system (figure 6.20) the standard form is

K K ω2n
H= = (6.63)
s2 2ζ s 2 + 2ζωn s + ω2n
+ s +1
ω2n ωn
where K is again the system gain, ζ the damping ratio and ωn the natural frequency
of the system, i.e. the frequency of the oscillation if ζ = 0.
6.4. SUMMARY 89

0.63 K

0.5 K

0
0 1 2 3 4 5 6 7 8 9 10
time [s]

F IGURE 6.19 First-order step response

output 1
1.5 K
overshoot output 2

0.5 K

0
0 1 2 3 4 5 6 7 8 9 10
time [s]

F IGURE 6.20 Second-order step responses for equal values of ωn


The blue curve (2) has a large overshoot and low damping ratio ζ
The red curve (1) has a small overshoot and high damping ratio ζ
90 CHAPTER 6. ELECTRICAL CIRCUITS
7
Mechanical systems can be analysed using the
same concepts as those applied towards electrical
systems. In mechanical systems we can
distinguish the rotation and the translation domain.

Mechanical Systems

After studying this chapter you are expected to know

– the major properties of mechanical elements: springs, masses, friction and


damping and mechanical transformers
– mechanical sources
– the concept of impedance
– how to represent mechanical elements and components as an impedance
– the mechanical equivalent of the Kirchhoff’s voltage law
– how to compute the transfer function of a mechanical system.

7.1 Elementary models


7.1.1 Introduction
In this chapter we will follow the same steps as in the previous chapter. We will
summarise the mechanical components that were introduced before. Next we will
add a few more elements that allow us to model mechanical systems. Up till now
we mainly considered mechanical systems in the translation domain. Here we will
pay attention to rotational motions as well.
We start with the mechanical elements of table 4.4. These elements are sum-
marised in table 7.1. In addition to the elements for the translation domain, ele-
ments for the rotation domain are given. In the rotation domain, T [N m] denotes
the torque, ω [rad s−1 ] the angular velocity and ϕ [rad] the angle of rotation. J is the torque
moment of inertia [N m2 ]. angular velocity
In electrical systems the power P flowing into an element was defined as the
product of the voltage u over and the current i through this element: P = ui [W].
For mechanical systems the (mechanical) power flowing into an element is power

P = F v [W] (7.1)

91
92 CHAPTER 7. MECHANICAL SYSTEMS

TABLE 7.1 Elements in the mechanical domain


domain behaviours
translation spring friction mass
1 1
F= v dt F=fv v= F dt
R R
Rc m
x = v dt p = mv
1 1
F= cx = kx v= mp

rotation spring friction moment of inertia


1
T= ω dt F =fω ω = 1J T dt
R R
c
ϕ = ω dt p = Jω
R

T = 1c ϕ = kϕ ω = 1J p

Note that the dimension of power is always [W], irrespective of the domain. Power
is a domain independent quantity. From eq. 7.1 we can derive the energy stored in
the mechanical storage elements. By definition the energy is
Z Z
E = P dt = F v dt (7.2)

This implies for a moving mass:

dv
Z Z
E kin is the kinetic
energy of a mass
E kin = m v dt = m v dv (7.3)
dt
kinetic energy The kinetic energy can thus be written as

1
E kin = mv 2 (7.4)
2
The equivalent formula for the rotation domain is:

1 2
E kin = Jω (7.5)
2
potential energy Besides kinetic energy which depends on the velocity, a mass can have potential
of a mass
energy due to gravity. With g being the acceleration of gravity, the (constant) gravity
force is equal to F = mg . The potential energy due to gravity is thus:
Z
E pot is the
potential energy
E pot = mg v dt = mg x (7.6)

where x is the height above a reference plane (x = 0) in which the potential energy
is 0 because this is the lowest point the mass can fall to.
k = 1/c [N/m] is A spring can also store potential energy. With F = kx the potential energy of a
the stiffness of a spring is
spring. c [m/N] is
dx
Z Z Z
the compliance. E pot = F v dt = kx dt = k x dx (7.7)
dt
7.1. ELEMENTARY MODELS 93

The potential energy of a spring is thus: potential energy


of a spring
1
E pot = kx 2 (7.8)
2
The equivalent formula for the rotation domain (rotation spring) is:
1
E pot = kϕ2 (7.9)
2
Exercise 7.37
Find examples of systems that store the potential energy of a spring and the kinetic energy
of a rotating mass.

7.1.2 Elements
Besides masses (inertias), springs and dampers or friction, there are a few more el-
ements often seen in mechanical systems. Mechanical equivalents of the electrical
transformer are a gear train and a lever. A gear train transforms torque and angular
velocity from the input axis to the output axis. A lever does the same for transla-
tional motions. A gear wheel-chain combination (e.g. on a bicycle) or a belt-pulley belt-pulley
combination transforms an angular velocity into a linear velocity or vice versa. Two
of these transformers can be combined into a pulley-belt-pulley transformer (fig-
ure 7.1).

F IGURE 7.1 Two pulleys with a belt: pulley-belt-pulley transformer

The first belt-pulley combination transforms an angular velocity into a linear veloc-
ity of the belt, the second belt-pulley combination transforms the linear velocity of
the belt back to an angular velocity. The total effect is similar to a gear train. When
the two belt-pulley combinations share the same angular velocity, it can be used
as a transformer of linear velocities. Some basic realisations of gears and transmis-
sions are given in figure 7.2. A gear can be realised by means of two toothed wheels gear
with different diameters. The teeth of the first gear engage with the teeth of the sec-
ond one so that the rotary movement of the first gear is transmitted to the next.
94 CHAPTER 7. MECHANICAL SYSTEMS

The transmission ratio is determined by the ratio of the numbers of teeth of both
wheels. If the primary gear wheel has n 1 teeth and the secondary one has n 2 teeth,
the transmission ratio is −n 1 /n 2 . Therefore, the following relations hold:

Rotation transformers n
r1 r2
n1 1

n2

Gear Gear train Pulley-Belt-Pulley

Translation transformers
l2 r1 r2
l1 l1

l2

Levers Belt-Pulley-Belt

F IGURE 7.2 Gears and levers

n1 1
ω2 = − ω1 = − ω1
n2 n
(7.10)
n2
T2 = − T1 = −nT1
n1

When more gears are added we can get rid of the minus sign. In the 20-sim library
transmission such a gear train is called a transmission, described by the equations
(rotation)
1
ω2 = ω1
n (7.11)
T2 = nT1
transmission where n is the total transmission ratio.
ratio
In the translation domain we find levers with similar properties as a two-wheel
lever gear. Such a lever rotates around a pivot, anywhere between the points where the
gear is connected to other elements. Therefore, the force and velocity change sign.

l1 1
v2 = − v1 = − v1
l2 n
(7.12)
l2
F 2 = − F 1 = −nF 1
l1

where l 1 and l 2 are the distances to the turning point of the primary and secondary
connection points respectively.

Exercise 7.38
Give an example of such a system.
7.1. ELEMENTARY MODELS 95

If the pivot is at one end of the rod, the sign does not change and we obtain equa-
tions equivalent to those of the rotation domain. This yields the formulas for the
transmission in the translation domain transmission
(translation)
l1 1
v2 = v1 = v1
l2 n
(7.13)
l2
F 2 = F 1 = nF 1
l1

The belt-pulley combination is an example of a transformer that transforms mo- belt-pulley


tions from the translation to the rotation domain and vice versa. This transforma-
tion is described by the equations:

v =rω
(7.14)
T =rF
where r is the radius of the pulley. If there is a second belt-pulley combination con-
nected to the first one by the belt we get the equations

1
v 1 = r 1 ω1 and ω2 = v1
r2
(7.15)
1
F1 = T1 and T2 = r 2 F 2
r1

For the total transfer thus holds


r1
ω2 = v1
r2
r2 (7.16)
T2 = T1
r1

7.1.3 Sources
In the electrical domain there were two kinds of sources i.e. (modulated) voltage
and (modulated) current sources. Therefore, in the mechanical domain we expect
similarly, two kinds of sources in the rotation domain and two kinds of sources in
the translation domain. In the translation domain there are (modulated) force and (modulated)
force and velocity
(modulated) velocity sources. Both of these sources can have the fixed world as a sources
reference (see the first two columns of figure 7.3). The fixed world represents a con-
stant, mostly zero, velocity. In addition, a force or a velocity source can be placed
in between two objects. In figure 7.3 we have introduced a special IPM symbol for
these sources. See the third column of figure 7.3. An example of a force source with
respect to the fixed world is the gravity force. An example of a torque source with
respect to the fixed world is an electromotor.
96 CHAPTER 7. MECHANICAL SYSTEMS

rotation domain
T T T

torque source modulated torque sources

  

velocity source modulated velocity sources

translation domain
F F F

force source modulated force sources

v v v

velocity source modulated velocity sources

F IGURE 7.3 Mechanical sources

7.2 Computations
7.2.1 Impedances
Sometimes we In the mechanical domain we define the impedance of an element as the transfer
use ‘transfer’, as a Z = F /v or Z = T /ω. This implies for a spring
short form of
‘transfer function’. 1 1
Z
F= v dt → Z = (7.17)
c sc
and for a mass
dv
F =m → Z = ms (7.18)
dt
and for a friction or damper element

F=fv → Z=f (7.19)


Once each object is described by an impedance, we can start with computations of
transfer functions.

7.2.2 D’Alembert’s law


The mechanical equivalent of Kirchhoff’s voltage law is d’ Alembert’s law. It can be
seen as another formulation of Newton’s law (see eq. 3.8). In its most well-known
Newton’s law form Newton’s law is written as:
d (v)
F = ma = m (7.20)
dt
7.2. COMPUTATIONS 97

or, in a more general form:


d (mv)
F= (7.21)
dt
In a (dynamic) equilibrium situation (where the sum of all forces is equal to zero)
one could say that there is a reaction force of the body (− d (mv)
d t ) which is equal to action =
all the other forces: – reaction

X d (mv) X d (mv)
F =− or F+ =0 (7.22)
dt dt
Equation 7.22 is used in d’ Alembert’s law: d’ Alembert’s law

The algebraic sum of all forces acting on an object in a mechanical sys-


tem and the time derivative of the impulse of the object ( d (mv)
d t ) equals
zero.

A (constant) mass has one single velocity if connected to other objects. According
to d’ Alembert’s law:
dv X
m + F all forces = 0 (7.23)
dt
or
1 X
Z
v =− F all forces dt (7.24)
m

A spring can be connected to the fixed world and to a mass, or to two different
masses (one at both ends), having different velocities. The force on a spring is de-
termined by the positions (integrated velocities) at both ends of the spring.

1 1
Z
F spring = (x 1 − x 2 ) or F spring = (v 1 − v 2 ) dt (7.25)
c c

The force on a damper is also determined by the relative velocity (i.e. the velocity
difference) between both ends of the damper.

F damper = f (v 1 − v 2 ) (7.26)

As an example we reconsider the mass-spring-damper system of figure 4.4. We as-


sume, for the moment that there is no gravity force.
The node where the mass, spring and damper are connected to each other has a
velocity v 1 and the node where the spring and damper are connected to the fixed
world has a velocity v 0 . The fixed world is by definition a reference with a velocity
equal to 0, thus v 0 = 0. According to d’ Alembert’s law the sum of the forces at the
node with velocity v 1 is:
F mass + F spring + F damper = 0 (7.27)
Using the notation with impedances it follows that

1
msv 1 + (v 1 − v 0 ) + f (v 1 − v 0 ) = 0 (7.28)
cs
98 CHAPTER 7. MECHANICAL SYSTEMS

FixedWorld

Spring Damper

+
Mass
m

F IGURE 7.4 Mass-spring-damper system

and because v 0 = 0
1
msv 1 + v1 + f v1 = 0 (7.29)
cs
To write this equation in the form of a standard differential equation instead of a
mix of integral and differential elements, we use x 1 instead of v 1 as the variable of
interest. Because v 1 = dx 1 / dt we replace v 1 with sx 1 .

1
ms 2 x 1 + x 1 + f sx 1 = 0 (7.30)
c
This leads to the differential equation we have seen before, e.g. in eq. 4.8.

d 2 x1 d x1 1
m 2
+f + x1 = 0 (7.31)
dt dt c
When there is an external force acting on the mass we could rewrite eq. 7.29 as

1
ms 2 x 1 + x 1 + f sx 1 = F external (7.32)
c
This can be written in the form of a transfer function
X1 1
H= = (7.33)
F external ms 2 + f s + 1c

or
X1 c
H= = (7.34)
F external mc s 2 + f c s + 1
This is a similar form as the one we saw in eq. 6.60 that could be written in the stan-
dard form (eq. 6.61)

K ω2n
H= =K (7.35)
s2 2ζ s 2 + 2ζωn s + ω2n
2
+ s +1
ωn ωn
7.3. MECHANICAL SYSTEMS 99

From eq. 7.34 and eq. 7.35 it follows that

1 1
ω2n = → ωn = p (7.36)
mc mc

2ζ 1 c
r
= f c → ζ= f (7.37)
ωn 2 m

When ζ > 1 there will be no oscillatory response or overshoot. For ζ < 1 there damping ratio: ζ
will be overshoot and an oscillatory response. The damping will be smaller when
ζ is closer to 0. For ζ = 0 the response will be a pure sinusoidal signal. ζ is called
the damping ratio and ωn is called the natural frequency. The natural frequency is natural
p frequency: ωn
proportional with the inverse of mc. The damping ratio is proportional with the
p
damping or friction coefficient f , with c, the square root of the compliance and
with the inverse of the square root of the mass, p1m .

7.3 Mechanical Systems


When we expand figure 7.4 with a second mass-spring-damper system we get fig-
ure 7.5. Mass m 1 has velocity v 1 . This velocity is in common with the lower termi-

FixedWorld

Spring Damper
1 1

m1 Mass1
+

Spring Damper2
2

m2 Mass2

F IGURE 7.5 Two connected mass-spring-damper systems

nals of Spring1 and Damper1 and with the upper terminals of Spring2 and Damper2 .
Mass m 2 has a velocity v 2 and shares this velocity with the lower terminals of Spring2
and Damper2 . We can thus write the equations:

F mass2 + F spring2 + F damper2 = 0 (7.38)


100 CHAPTER 7. MECHANICAL SYSTEMS

and
F mass1 + F spring1 + F damper1 − F spring2 − F damper2 = 0 (7.39)
The minus sign is due the fact that positive forces and velocities are directed down-
wards (by choice/definition, see the arrow in figure 7.5).
From eq. 7.38 it follows:

1
m 2 sv 2 + (v 2 − v 1 ) + f 2 (v 2 − v 1 ) = 0 (7.40)
sc 2

This can be written as


1 1
µ ¶
v2 = − + f 2 (v 2 − v 1 ) (7.41)
m 2 s sc 2
By substituting
v3 = v2 − v1 (7.42)
we find for the velocity of mass m 2

1 1
µ ¶
v2 = − + f2 v3 (7.43)
m 2 s sc 2

From eq. 7.39 it follows

1 1
m 1 sv 1 + v1 + f1 v1 − (v 2 − v 1 ) − f 2 (v 2 − v 1 ) = 0 (7.44)
sc 1 sc 2

After substitution of eq. 7.42 we find for the velocity of mass m 1

1 1 1
· µ ¶ µ ¶ ¸
v1 = − + f1 v1 + + f2 v3 (7.45)
m1 s sc 1 sc 2

The equations 7.42, 7.43 and 7.45 give a complete description of this system. We
could convert these equations into a set of two coupled differential equations. The
most convenient form for a differential equation is obtained again if we use posi-
tions x instead of velocities v.

d 2 x2 dx 3 1
µ ¶
m2 + f2 + x3 = 0
dt 2 dt c2
2
(7.46)
d x1 dx 1 1 dx 3 1
µ ¶
m1 + f1 + x1 − f 2 + x3 = 0
dt 2 dt c1 dt c2
with x 3 = x 2 − x 1 .
We see that the spring-damper combination that connects m 1 and m 2 is present
in the equation for x 3 as well as in the equation for x 1 . This can be clarified with
a block diagram. From eq. 7.46 it follows that there are two coupled second-order
differential equations. The total system is thus a fourth-order system. This implies
that we need four integrators to represent such a system in a block diagram.
7.3. MECHANICAL SYSTEMS 101

This block diagram is most easily constructed by rewriting eq. 7.43 and eq. 7.45
as
1 1
µ ¶
sv 2 = − + f2 v3
m 2 sc 2
(7.47)
1 1 1
· µ ¶ µ ¶ ¸
sv 1 = − + f1 v1 + + f2 v3
m1 sc 1 sc 2
This leads to the block diagram of figure 7.6

spring damper
combination 1
f1

1 
c1
spring1

sv v
1 1  1
m1
m
1
F v
21 1

spring damper
combination 2
f2
v
3
1 
c2
spring2

sv v
1 2 2
m2
 v
2

m
F 2
31

F IGURE 7.6 Two connected mass-spring-damper systems

Note that the interaction between the upper and lower mass-spring-damper system
is through the signals F 21 and v 1 . The product of these two signals has the dimen-
sion [W]. It represents the power that is exchanged between the two subsystems.
When we would add another mass-spring-damper system, the block diagram can
be extended with a copy of the lower part (below the dashed line). This lower part is
also described by the second equation of eq. 7.46.

7.3.1 Cases
A large mechatronics project at the University of Twente dealt with the design of
the Mobile Autonomous Robot Twente (MART), which could drive through a factory, Mobile
Autonomous
collect product parts and assemble these parts while driving around. Many inno- Robot Twente
vations were developed and applied in this project. The goal of this project was to (MART)
102 CHAPTER 7. MECHANICAL SYSTEMS

learn a mechatronic design approach, rather than the development of an indus-


trial robot for production plants. The robot could autonomously navigate through
a factory hall, based on information from infrared beacons in combination with
dead-reckoning.

F IGURE 7.7 Mobile Autonomous Robot Twente (MART)

Dead reckoning is a technique applied in all kinds of navigation systems. Take, for in-
stance, a GPS navigation system. Accurate position data are available at certain intervals
and when the reception is bad, e.g. in a tunnel, data can be completely missing. Other
sensors, such as a compass and acceleration sensors deliver also information, which may
be less accurate on a longer term, but might even be more accurate in short time inter-
vals. In addition, the map in a navigation system can also predict a car’s position during
loss of GPS data. When it is assumed that the speed of the car is constant and the car does
not leave the road, this prediction can be highly accurate as well. All these other infor-
mation sources can yield a position based on dead reckoning. Dead reckoning is thus the
process that leads to the best estimated position when real position data are (temporar-
ily) unavailable.

In order to perform accurate dead reckoning the velocity and orientation of the
MART had to be known accurately. The velocity and orientation were calculated out
of the rotations of the wheels. Therefore, the wheels should be very hard. As a result
these hard wheels could result in a bumpy ride. This was undesirable given the ac-
curacy of the assembly tasks that were to be performed by the robot manipulator
suspension on top of the vehicle. Therefore, a good suspension system between the lower frame
system
with the wheels and the upper system had to be designed. Based on model studies,
proper parameters could be chosen such that the motions of the upper frame were
smooth. This enabled the assembly robot to perform its tasks.
7.3. MECHANICAL SYSTEMS 103

When we extend the system of figure 7.5 with a modulated velocity source, which
represents a bump in the floor, this system can be analysed. Figure 7.8 gives a proper
simulation model. Note that the system of figure 7.5 is put upside down and that
the fixed world is now replaced by a modulated velocity source.

m mupper frame

Damper2 Spring2 suspension

m m
lower frame

Damper1 Spring1 wheels

Pulse1
bump

Pulse
VelocityActuator

F IGURE 7.8 Model of the suspension of the MART

Exercise 7.39
Simulate this system and play with the compliances and damping of the suspension sys-
tem. Note that the total weight of the mobile robot is fixed due to other constraints.
However, the distribution of the weight over the upper and lower frame is within certain
bounds not fixed. Use the numerical values of table 7.2 to start with. Select the start and
stop times of pulse such that the bump has a height of 10 [cm].

TABLE 7.2 Parameters for the simulation of the MART suspension

mlower frame = 50 [kg]


Damper1 = 1000 [N s/m]
Spring1 = 1e7 [N/m]
mupper frame = 450 [kg]
Damper2 = 2000 [N s/m]
Spring2 = 300000 [N/m]
Pulse.amplitude =1
Pulse1.amplitude =1
104 CHAPTER 7. MECHANICAL SYSTEMS

From the experiments in this exercise it becomes clear that the spring-damper
mechanical combination acts as a mechanical low-pass filter. The quick motions of the lower
low-pass filter
part of the body, due to the bump, are smoothed and lead to slow motions in the
upper frame. See also a short movie
http://www.controllab.nl/en/books/dynsys.html
The MART is an example of a purely technical system. But exactly the same compo-
nents can be used to make a realistic simulation of flowers moving in the wind.

Exercise 7.40
Make a model of a flower that moves in the wind. Start with modelling the flower as an
inertia connected with a stem (rotation spring-damper combination) to the fixed world.
Make the motions more realistic by modelling the stem as a number of mass-spring-
damper systems. The presentation of the results could be much more impressive and
explanatory when a 3D-animation is made. See
http://www.controllab.nl/en/books/dynsys.html

F IGURE 7.9 Flowers in the wind

7.4 Summary
In this chapter we have seen that mechanical elements can also be described with
impedances. The law of d’ Alembert, the equivalent of Kirchhoff’s voltage law, en-
ables computation of transfer functions of mechanical systems in a similar way as
for the electrical domain. The mechanical domain can be split into a translation
and a rotation domain. On an equation level these domains behave similarly. The
icons in the mechanical domain are less ‘standard’ than the icons in the electrical
domain. It is, for instance, quite common to use the translation icons of figure 7.10
7.4. SUMMARY 105

to represent a system in the rotation domain or in a mixed rotation-translation do-


main. In figure 7.10 an overview of the icons of the translation domain is given, to-
gether with the equations, which describe these elements.

spring damper mass fixed world

friction

sources

F F v v

force source modulated velocity source modulated


force source velocity source

transformers

l2
l1 l1

l2

levers pulley-belt

F IGURE 7.10 Overview of translation domain icons

Figure 7.11 gives the same for the rotation domain. From these two figures it is ob-
vious that the equations are similar if F and ω are replaced by T and v. When fig-
ure 7.10 and figure 7.11 are compared with figure 6.18, we see a similar correspon-
dence. This will be considered further in the next chapter.
106 CHAPTER 7. MECHANICAL SYSTEMS

J
spring damper inertia fixed world

bearing

sources

T T  

torque source modulated velocity source modulated


torque source velocity source

transformers

1 1 n
n

gear gear train belt-pulley

F IGURE 7.11 Overview of translation domain icons


8
Power is a quantity that is domain independent.
Therefore, power can be used to make a
domain-independent description of systems and
for describing the coupling between different
domains.

Domain Independent Descriptions

After studying this chapter you are expected to know

– the analogy between the basic concepts in mechanical and electrical systems
– the role of power as something common to all domains
– the concept of power ports
– how to couple electrical and mechanical systems by means of a transducer
– the difference between signals in a block diagram and power-port connections in a
physical system.

8.1 Introduction
In chapter 5 we have already seen that we can use analogies to make analogue
simulations. Hydraulic or mechanical systems can be simulated on an analogue
computer by means of electronic circuits. But the importance of these analogies
is even greater. If we were able to couple the different domains, it would be pos-
sible to solve problems in one domain by adding dynamical elements in another
domain. This way of solving problems, especially by replacing mechanical com-
ponents by electronic circuits, often in combination with a computer, is seen ev-
erywhere. When we enhance mechanical systems with electronics, this is called
mechatronics. In expensive cars the value of the (digital) electronics already exceeds mechatronics
the value of the mechanical components. And this trend is likely to continue. In
most cases control systems are involved. A control system cannot only guarantee
that certain quantities are kept at a constant value (e.g the water level in the wa-
ter clock or the speed of a car in a cruise-control system). It can also alter the be-
haviour of a physical system. Electronically controlled shock dampers, which can
give a car completely different driving characteristics, are an example of the latter.
Because these changes are mostly made by means of a programme in a computer,
altering the behaviour of the system can be done in a very flexible way. It merely
requires changing a few variables or lines of code in the programme, rather than
modifying a whole mechanical construction. In this chapter we will take a closer
look at the common properties of elements in various domains. We will define what

107
108 CHAPTER 8. DOMAIN INDEPENDENT DESCRIPTIONS

we consider to be analogous behaviour. In order to make models that extend over


transducer different domains we will introduce transducers. An electrical motor is an example
of a transducer, since it couples the electrical and mechanical domains by convert-
sensor ing electrical power into mechanical power. Sensors are transducers that are able to
convert physical quantities like voltage, or velocity, into signals that can be used in
actuator a computer. The counterpart of a sensor is an actuator. An actuator converts signals
into physical quantities. We have seen examples of elementary actuators already in
the form of modulated voltage and current sources and modulated force and veloc-
ity sources.

8.1.1 Analogies
At several places in the previous chapters we have already seen that the basic el-
ements in different domains have a lot in common. Let us, for example, recall ta-
ble 4.2 (table A.1 in the appendix). This table is shown again in table 8.1.

TABLE 8.1 Formulas for several physical domains

domain behaviours
mechanical spring:R friction: mass: R
F = 1c vd t F=fv v=m1
Fdt
electrical capacitor: resistor: inductance:
u = C1 i d t u = Ri i = L1 ud t
R R

hydraulical tank: R restriction: inertia:R


p = 1c ϕd t p =rϕ ϕ = 1I pd t

The way in which these elements are arranged suggests e.g. that a spring, a capac-
itor and a water tank share common properties. From table 4.3 (or table A.2) it fol-
lows that
Z
q = i dt (8.1)

and Z
V= ϕ dt (8.2)

or in words, the integrated electrical current is the charge of a capacitor and the
integrated fluid flow is the volume of fluid in a tank. This is indeed analogue be-
haviour. It thus makes sense to consider the load q and the volume V as analogous
quantities and thus also the voltage u and the pressure p. A similar reasoning can
be given for the relation between the mechanical impulse p and the hydraulic im-
pulse Γ. In this case even the names are equal. The related quantities are the ve-
locity v and the flow ϕ. However, the symmetry in table 8.1 does not change if, for
instance, we exchange the formula for the mass and the formula for the spring. This
would just lead to a different analogy. When we consider u and F as analogous sig-
voltage-force or nals we talk about a ‘voltage-force’ analogy. If we consider u and v as analogous sig-
voltage-velocity
analogy
nals we talk about a ‘voltage-velocity’ analogy. Here we choose for the voltage-force
analogy (and for the voltage-pressure analogy).
8.2. POWER 109

8.2 Power
8.2.1 Power ports
All the elements of table 8.1 have in common that they describe the relation be-
tween two variables. The product of these variables has the dimension of power in
Watts. Therefore, we call these variables power conjugated variables. These vari- power
conjugated
ables are variables

u and i (P = ui ) in the electrical domain

F and v (P = F v) or T and ω (P = T ω) in the mechanical domain

p and ϕ (P = pϕ) in the hydraulic domain

For each of the elements of table 8.1 it holds that there is a single variable, the power
P , which determines the flow of energy to and from this element. Therefore, we call
the elements of table 8.1 one-port elements. (The power variable itself is determined one-port element
by the product of two other variables: e.g. P = ui .) By definition the power is con-
sidered to be positive when there is a flow of energy into the element and negative
when there is a flow of energy from the element. This corresponds with the defini-
tion for a positive current: when the current through an element flows from u + to
u − , the current is positive. The energy flow for a discharging battery is thus neg- By definition the
ative (the current through the battery flows from u − to u + , figure 8.1 left) and for energy flow into
an element is
a charging battery positive (the current through the battery flows from u + to u − , considered to be
figure 8.1 right). positive

discharging + charging +
P = u(-i) i P = ui
battery i battery
_ P<0 _ P>0

F IGURE 8.1 An electrical circuit

The elements in the first and last column of table 8.1 are able to store energy. In
case of a positive energy flow the energy stored in the element increases, otherwise
it decreases. The elements in the center column dissipate energy. They cannot store
energy and never deliver energy back to the rest of the system. The energy flow to
these elements is thus always positive.

In fact the term dissipation of energy in the foregoing is not completely correct. Both, in
the case of a resistor and friction the energy is irreversibly converted to energy in the ther-
mal domain. Brakes in a car or bicycle heat up when they are used. This energy is indeed
‘lost’. But we could hardly say that a resistor, in the form of an incandescent lamp or an
electrical heater dissipates energy. It delivers something useful, but in another domain.
However, we still will use the word dissipation for all cases where energy is irreversibly
converted into another domain. From a system’s point of view we can also say that this
is an energy flow to the environment in the case we are not interested in the thermal do-
main.
110 CHAPTER 8. DOMAIN INDEPENDENT DESCRIPTIONS

8.2.2 Graphical representation with power bonds


two-port element Transformers and gyrators are two-port elements. They change the ratio between u
and i or F (T ) and v (ω), but the product, P , remains constant. In figure 8.2 an elec-
trical circuit is given with the one-port elements voltage source, capacitor, resistor
and inductance and the two-port element transformer.

TF I
C R R

n:1

F IGURE 8.2 An electrical circuit

In such a circuit diagram the idea of ports and energy flows is hardly visible. There-
fore, we redraw this figure, which yields figure 8.3. Here we indicate that all the el-
ements at the primary (left) side of the transformer share the same current i 1 , and
at the secondary (right) side of the transformer the current i 2 . We have also indi-
cated the voltages over all the elements. The energy flows have been indicated by
power bonds means of half arrows, which we will call bonds. Or, because the half arrows repre-
‘Bond’ means sent an energy flow (i.e. power), power bonds. Energy flows from the source to the
band or binding. elements, which share i 1 , the C and R element and the primary side of the trans-
The bonds in this
diagram connect former. From the secondary side of the transformer energy flows to the R and I ele-
the elements to ment (the inductor).
each other by We can remove the whole electrical circuit diagram and still have the same in-
means of a
energy flow formation available about the connections in the system. This results in figure 8.4.
Note that we indicated the voltage source as S u .

uC u R1 u R2 uL
+ + +
+

C R R I
TF +
u TF1+ u TF2
+
i1 i2
u source
n:1

F IGURE 8.3 An electrical circuit: the half arrows indicate positive energy flows

This graph emphasises the one-port and two-port character of the elements.
Because the half arrow represents the energy flow, it also represents two signals:
8.2. POWER 111

C R R I
capacitor resistor resistor inductance

Su i TF i
voltage transformer
source

F IGURE 8.4 Graph representing the energy flows to the elements

the voltage u and the current i . This could be explicitly indicated by writing these
signals on each side of the arrow. By convention we write the voltage above or at the
left of the arrow and the current below or at the right of the arrow. In figure 8.5 the
voltage and current signals are indicated in the graph.

C R R I
uC uR1 uR2 u
L
i1 i1 i2 i2
uSu uTF1 uTF1
Su i1 i i1
TF i2
i

F IGURE 8.5 Graph representing the energy flows to the elements, with voltage
and current signals added

The representations of figure 8.4 and figure 8.5 may seem very abstract and mean-
ingless in the beginning. But due to this abstraction they have the advantage of
strongly supporting the idea of analogous behaviour in the different domains. Go-
ing from figure 8.4 in the electrical domain to figure 8.6 in the mechanical domain
is a very simple step. Because of the analogy between i and v we exchange the com-
mon current by common velocities. We do not change the symbols, but realise our-
selves that C now means a spring, R a damper or friction and I a mass. Finally, the
electrical transformer is a mechanical transmission.

C R R I
spring damper friction mass

SF v TF v
transmission

F IGURE 8.6 Graph representing the energy flows to the elements in the
mechanical domain

From here it is a small step to make an IPM with mechanical elements.


112 CHAPTER 8. DOMAIN INDEPENDENT DESCRIPTIONS

Exercise 8.41
Check that figure 8.7 is indeed a possible realisation of the graph of figure 8.6. Draw an
alternative realisation, using another friction element instead of the damper. Draw also a
realisation in the rotation domain. Map the graph of figure 8.6 on the IPM of figure 8.7, in
a similar way as in figure 8.3.

Damper
F
Force FixedWorld
Spring

1 m
n
Friction Mass
Transmission

F IGURE 8.7 Analogous mechanical system

We could go one step further and introduce a completely domain-independent


representation of these systems. This is done by replacing the domain-dependent
1-junction variables i and v by the neutral symbol “1”. We call this a 1-junction. This results
in figure 8.8. In this graph the (voltage/force/torque) source is indicated as Se . In
the next chapter we will introduce the Se -element as a generalised representation
of this type of source. Such a domain independent graph, as in figure 8.8, is called a
bond graph bond graph.
Although the system depicted here is completely domain independent, there is
still a close relation with the physical systems it could represent. The elementary
models (R, C, I and TF) can still be recognised. And when putting variables like u
and i or F and v along the bonds, the relation with the physical domains this graph
represents, is clear again.

C R R I

Se 1 TF 1

F IGURE 8.8 Domain-independent graph

These graphs are also a powerful tool for computing the system equations, either
in the form of a transfer function or as a differential equation. One of the system
bond graph representations available in the graph editor of 20-sim, is the bond graph represen-
tation. The graph of figure 8.8 can directly be drawn in 20-sim. In the next chapter
we will treat bond graphs in more detail and more formally.
8.2. POWER 113

Exercise 8.42
The models of figure 8.3, figure 8.7 and figure 8.8 can all be drawn in 20-sim. Do this and
show that (when giving the corresponding parameters the same values) the responses are
the same indeed.

8.2.3 Signals versus power-port connections


In physical systems power and energy always play a role: they are always needed to
bring an electrical circuit alive or to let a mechanical system move. Without the po-
tential energy stored in a fluid reservoir there will be no fluid flow. In the previous
sections it has been shown that by connecting the elements in a system by means
of power bonds, domain-independent models can be made relatively easily. These
models also enable us to quickly set up an analogon model. Power is determined by
the product of two signals, e.g. ui , F v or T ω.
In a block diagram we seldom pay attention to power. Instead, we consider pure
input-output relations between signals. R For instance, when i is considered the in- signals
put signal of a capacitor, then u = C1 i dt is the output signal. In the opposite case,
when u is considered the input signal of the capacitor, then i = C ddtu is the output
signal. Figure 8.9 shows the two options. The corresponding bond-graph represen-
tation of a capacitor is given in grey. Since a block diagram deals with input-output
relations, we need two diagrams to represent the two situations. In both cases how-
ever, we deal with the same capacitor. It is just a computational issue, which of the
two block diagrams we prefer. And, as we have already seen, from a computational
point of view we prefer the version with the integrator. A power bond combines
these two signals. The bond thus not only represents power, but also a bilateral sig- bilateral signal
flow
nal flow.

i u
 d/dt

C C
u 1 i
C C

F IGURE 8.9 A bond represents power, as well as a bilateral signal flow

An actuator in the form of a modulated voltage source has a signal as an input and actuator
delivers a voltage to the system, proportional to the modulating signal. The power
P and the current i are the result of the response of the rest of the system on the
varying voltage of the modulated voltage source. The power of the modulating sig-
nal itself is completely irrelevant. Only the information of this signal (e.g. a signal
sin(ωt )) is relevant. A modulated voltage source thus couples the information do-
main (e.g signals coming from a computer) to the physical domain. Figure 8.10
gives this situation, represented by means of an iconic diagram and by means of
114 CHAPTER 8. DOMAIN INDEPENDENT DESCRIPTIONS

a combination of block diagram and bond-graph elements. In the right figure the
output signal of the signal generator (in this case the signal sin(ωt )) is represented
by an ‘ordinary’ arrow, the output (power) of the voltage source by means of a half
arrow, a bond. A modulated voltage source can practically be realised as a power
amplifier: the power of the input signal is negligible, the output could have a high
power.

MSe
Modulated
VoltageSource

F IGURE 8.10 Modulated voltage source, represented with an iconic diagram


and as a block diagram - bond graph combination

Another element that connects the power domain with the information domain is
optical encoder an optical encoder or code disc. This is a disc that can be connected to an axis with a
digital code printed on it, in the form of black and white (or transparent) blocks or
bars. The code provides information about the angle of the axis and is thus pure a
signal representing the angle of the axis (figure 8.11).

F IGURE 8.11 Section of an optical encoder

In a computer we always deal with signals. Here, information processing is all that
counts. The power needed to perform the calculations is not essential for this pro-
cess. If less power-consuming electronics are used, the result of the calculations is
similar, but the electricity bill will be lower (or the battery will last longer).
8.3. TRANSDUCERS 115

8.3 Transducers
In section 8.1 we came across examples of actuators: elements that convert sig- actuator
nals to power: e.g. the modulated voltage source. We also saw sensors: elements sensor
that extract information from the system in the form of a (digital) signal: the opti-
cal encoder. What we did not consider yet, are elements that convert power from
one domain to another domain. Most close to this class of elements was the belt-
pulley type of transformer. The belt-pulley combination transforms motions in the
translation domain to the rotation domain or vice versa. But both of these domains
belong to the mechanical domain. Even if we restrict ourselves to the electrical and
mechanical domain there are many transducers that convert electrical to mechani- transducer
cal power or vice versa.

8.3.1 DC-motor
One of the most common transducers is an electrical motor. In its most simple
form, as a rotating DC motor, it works as follows (figure 8.12).

F IGURE 8.12 DC motor


From: http://electronics.howstuffworks.com/motor1.htm

The motor consists of a rotor (or armature) and a stator. The stator consists of per-
manent magnets with alternating north and south poles. The rotor consists of one
or more coils, which rotate around the axle. The current flowing through these coils
produces a magnetic field. If this magnetic field is not aligned with the magnetic
field of the permanent magnets there is a resulting force, which tries to align the
two fields. When, at the right moment, the current in the coils is inverted, the direc-
tion of the field from the coils is inverted as well. The result is a more or less con-
stant force and torque on the rotor, resulting in rotation of the motor. The process
of inverting the direction of the current is called commutation. Commutation is re- commutation
alised by connecting the coils in the rotor via so-called brushes with a (modulated)
voltage or current source. Modern brushless DC-motors use electronics to provide
116 CHAPTER 8. DOMAIN INDEPENDENT DESCRIPTIONS

a rotating magnetic field in the stator. By putting the permanent magnets in the ro-
tor, brushes are no longer needed. This has lots of advantages. More information on
the basics of DC-motors and an animation can be found on
http://electronics.howstuffworks.com/brushless-motor.htm.
Like we did with the other elements we define an ideal, elementary DC-motor. Such
a motor can be described by the equations

T = Kmi
u = Kmω (8.3)

The torque is proportional to the current flowing through the coils. This is not sur-
prising: the larger the current, the larger the magnetic field. The voltage is propor-
counter tional to the angular velocity. This voltage is called the counter electromotive force
electromotive
force (EMF)
(EMF). This implies that the motor can also be used as a generator, i.e. a device that
converts mechanical energy in electrical energy. Examples are the dynamo in a car
or a bicycle dynamo.

Exercise 8.43
If you turn the small wheel of a bicycle dynamo you can feel the influence of the magnets
in the dynamo. Because of the iron cores in the electro magnets the dynamo has a number
of preference positions. Such a dynamo also shows the validity of the electromotive force
formula. The faster you ride, the brighter the lights of your bicycle.

Taking into account that on the one hand T and u and on the other hand i and ω
are each others analogons, eq. 8.3 is the equation of a gyrator (see eq. 6.8). K m is
called the motor constant. The icon for such an ideal motor and the bond-graph
representation are given in figure 8.13. Because the DC-motor has an electrical port
and a mechanical port, it is a two-port element.

+
u T
i GY 
_

F IGURE 8.13 Icon for a DC-motor and the corresponding bond-graph element

A more realistic DC-motor is more complex. It is obvious that the permanent mag-
nets in the rotor are not weightless. The rotor must therefore have some inertia. In
addition, the motor will have friction. And finally, the windings of the electromag-
nets on the electrical side of the motor will have some resistance and inductance. If
we add these elements to the elementary motor of figure 8.13, we get the IPM of a
DC-motor as a component (figure 8.14).

Friction in a motor can be minimised by using so-called air bearings. This is an expensive
construction, applied in machines were an extreme high accuracy is required.
8.3. TRANSDUCERS 117

F IGURE 8.14 IPM for a DC-motor as a component

8.3.2 Tacho generator


Although figure 8.14 might suggest that the DC-motor has an electrical input and a
mechanical output, this is not true. The gyrator (eq. 8.3) gives a relation between u,
i , T and ω. The half arrows in figure 8.13 only indicate the direction of a positive en-
ergy flow. If we connect the motor to a voltage or current source the motor will start
turning. On the other hand, if we connect the ‘motor’ to a rotating axis, it behaves
like a dynamo. In that case we could consider the mechanical side as input and the
electrical side as output. In this situation we could use such a device not only as a
generator of electrical power but also as a tachogenerator: a sensor to measure the tachogenerator
angular velocity.

8.3.3 Potentiometer
Besides velocity, position is an important quantity in mechanical systems. An-
gular positions can be measured by means of an optical encoder, as we have al-
ready seen. Another way to measure positions is with a variable resistor, called a
potentiometer. The symbol for a potentiometer is given in figure 8.15, together with potentiometer
an example of a real potentiometer. Potentiometers are (were) quite common in
e.g. audio amplifiers to control the volume. When one terminal of the potentiome-
ter is connected to a constant voltage and the other one to ground, the voltage of
the sliding contact is proportional to its position. If the mass or inertia and the fric-
tion are negligible, the potentiometer has no influence on the mechanical part of
the system. Because any change in voltage or current on the electrical side of the
potentiometer has no influence on the mechanical side, the potentiometer is a pure
sensor, where only signals play a role. The output voltage is just a measure for the
mechanical position.

8.3.4 Other transducers


There are many more transducers. Sensors and actuators are of increasing impor-
tance in modern systems. Electronic devices always need an interface to humans.
This can be in the form of potentiometers, e.g. in audio equipment, (optical) en-
coders or pressure sensitive devices. The latter are often based on piezo elements.
A piezo element produces a voltage if there is a force acting on the element (ap-
118 CHAPTER 8. DOMAIN INDEPENDENT DESCRIPTIONS

u0
uslider

F IGURE 8.15 Potentiometer: at the left a real potentiometer,


at the right the icon

plied in pressure sensors or gas lighters). But it can also produce a force if a volt-
age is applied. This principle is applied in small loudspeakers, small motors or in
anti-sound devices. Most loudspeakers are more similar to a DC motor. A coil in the
loudspeaker produces a magnetic field, which acts on a permanent magnet con-
nected to the conus of the loudspeaker. The motions of the conus result in changes
in the air pressure around the conus, resulting in sound. A loudspeaker is thus a
transducer from the electrical to the mechanical domain and then to the acoustic
domain. Figure 8.16 gives an example of a system where loudspeakers are used as
transducers from the electrical to the mechanical domain.
Modern cars are also full of transducers, sensors and actuators. By using a sensor-
actuator combination, the properties of a system can be changed by information
processing in a computer instead of by changing the mechanical system. A typical
example is a ‘Segway’ (figure 1.6). It could be stabilised by adding an extra wheel. It
can also be stabilised by measuring the error with respect to the vertical position,
computing a correction in the embedded computer and sending a correction signal
to the motors that drive the wheels. This is the area of automatic control, where al-
ways sensors and actuators are used to couple the process that should be controlled
and where power plays a role, to the controller where only signals (information) is
relevant.
8.3. TRANSDUCERS 119

F IGURE 8.16 Loudspeakers used as transducers from the electrical to


the mechanical domain in the ‘mechatronics project’
at the UT. See also a video of this and similar setups at
http://www.controllab.nl/en/books/dynsys.html
.
120 CHAPTER 8. DOMAIN INDEPENDENT DESCRIPTIONS
9
A bond graph is a graphical representation of the
power flows in a system. It can also be used to
quickly derive the system equations. The causality
assignment procedure supports the modeller in
the construction of a correct model.

Bond graphs

After studying this chapter you are expected to

– be able to draw a bond graph if an IPM is available


– understand the role of causality
– be able to convert a bond graph into a causal bond graph
– be able to convert a causal bond graph into a set of equations
– understand the meaning of preferred and non-preferred causality
– be able to make proper modelling decisions in those cases in which some elements
have non-preferred causality.

9.1 Introduction
In the previous chapter we have seen how we could represent the energy flows in
an IPM of a physical system by means of a bond graph. This bond graph could eas-
ily be converted into an IPM in another domain. In this way the bond graph helps
to understand the analogies between different domains. In the example we used
it was just a matter of replacing the junctions with a common current i by junc-
tions with a common velocity v. We generalised this i -junction to a 1-junction: a 1-junction
1-junction represents a current in the electrical domain, an (angular) velocity in the
mechanical domain and a flow in the hydraulic domain. In a domain-independent
bond graph we refer to these variables as flow variables. The 1-junction thus rep- flow variables
resents a common flow. For these generalised flow variables we use the symbol f .
All the elements we considered so far, always described the relation between two
variables, voltage and current, force and velocity, or pressure and flow. Therefore we
can expect the existence of another junction, representing a voltage, force or pres-
sure. Such a junction indeed exists. In a generalised form we call it a 0-junction. 0-junction
In a domain-independent bond graph we refer to the variables voltage, force and
pressure, represented by a 0-junction as effort variables. effort variables

121
122 CHAPTER 9. BOND GRAPHS

9.2 Junctions

Example
As an example of a system with a 0-junction, we consider the electrical circuit of
figure 9.1.

F IGURE 9.1 + uR _
Electrical circuit

+
u source i C u|| I

We see that the voltage source, the resistor and the parallel circuit of the capacitor
and the inductance share the same current. This implies that they are connected
to a single 1-junction. The capacitor and the inductor share a common voltage
u || . They are thus connected to a 0-junction. Together they are connected to the
1-junction. This leads to the bond graph of figure 9.2. The voltage source is in this
case the effort source S e .

We can always F IGURE 9.2 R C I


write the domain- Bond graph of the electrical circuit
dependent
variables, in this
case i and u || ,
Se 1 0
near the .. ..
junctions. i u
II

Example
As a second example we consider a mechanical system. In a mechanical system a
1-junction represents a velocity and a 0-junction a force. In figure 9.3 we see two
masses, connected by means of a spring-damper combination.

F IGURE 9.3
Mechanical system (IPM)
v1 v2
m m

The two masses have different speeds and can thus be connected to two different
1-junctions. The spring-damper combination is subject to a common force, repre-
9.2. JUNCTIONS 123

sented by a 0-junction. But we see here that the two also share a common velocity
difference (v 1 − v 2 ). This can be expressed by connecting the spring-damper combi-
nation to a 1-junction, which represents this velocity difference (figure 9.4).

F IGURE 9.4 C R
Bond graph of the mechanical
system 1 : v1_v2

I 1.. 0
.. 1
.. I
v1 Fspring v2

A 0-junction thus not only represents an effort, e.g. a force. It also implies that the
(algebraic) sum of all flows, e.g. velocities at the 0-junction is zero. Similarly, a 1-
junction represents a flow (velocity). And at the same time it implies that the (al-
gebraic) sum of all efforts, e.g. forces at the 1-junction is zero. This is illustrated in
figure 9.5.

1 : f3 = f1 _f2 0 : e3 = e1 _e2

1.. 0 1.. 0.. 1 0..


f1 f2 e1 e2

1 : f3 = f1+ f2 0 : e3 = e1+ e2

1
.. 0 1.. ..0 1 ..0
f1 f2 e1 e2

F IGURE 9.5 Rules to compute the sums of efforts and flows at a junction

Note the influence of the orientation of the arrows on the sum. An arrow pointing
towards the junction gives a positive contribution, the contribution of an arrow
pointing away from the junction is negative. This implies that for the four situations
in figure 9.5 the following relations hold:

f1 − f2 − f3 = 0 e1 − e2 − e3 = 0
(9.1)
f1 + f2 − f3 = 0 e1 + e2 − e3 = 0
124 CHAPTER 9. BOND GRAPHS

9.3 Bilateral signal flows and causality


Each bond represents not only a power flow, but also a bilateral signal flow. A bond
connecting a junction and, for instance, an R-element represents a power flow, the
product of e and f . In the case of the R-element, the relation between the power-
conjugated variables e and f is:


 e =Rf

e −R f = 0 → or (9.2)
f = e


R
The notation e − R f = 0 may be confusing. But we want to emphasise that this notation
only implies that there is a relation between the two variables e and f and the parameter
R . No decision is taken yet which one of the two is the input or the output. This is a so-
a-causal relation called a-causal relation. In the natural physical world relations are also a-causal. This
situation is indicated in the left graph in figure 9.6.

However, when we want to perform computations and simulations we have to de-


cide whether e is computed as a function of f , or the other way around. When we
compute f as a function of e, thus f = e/R, we indicate this in the graph by means
causal stroke of a so-called causal stroke at the end of the bond near the (R-)element. We say that
flow-out in this case the R-element has flow-out causality. This is the situation of the cen-
causality
tre graph of figure 9.6. When we compute e as a function of f , thus e = R f , we put
the causal stroke near the junction. This situation is indicated in the right graph in
effort-out figure 9.6. In this case we say that the R-element has effort-out causality.
causality
e e e
1 f R 1 f R 1 f R

a-causal flow-out causality effort-out causality

F IGURE 9.6 Bilateral signal relations

Once causality has been assigned, we can draw the equivalent block diagrams. See
figure 9.7. A causal bond graph contains the same information as the correspond-
ing equations or block diagram. These equations are given in figure 9.7 as well.
Note that it does not matter whether the element is connected to a 1-junction (rep-
resenting a flow) or a 0-junction (representing an effort): the equations remain the
same. In the case of an R-element, there is no preference for either one of the two
indifferent causal forms: the R-element has indifferent causality.
causality
9.3. BILATERAL SIGNAL FLOWS AND CAUSALITY 125

e e
1 f R:R 1 f R:R
e e
0 f R:R 0 f R:R

e f f e
1 R
R

F IGURE 9.7 Causal bond graphs and the corresponding equations and block
diagrams of an R-element

Most other elements are subject to more restrictions. Ideal effort- and flow sources
can have only one causal form. The output of an effort source must, by definition,
be the effort and the output of a flow source the flow. Sources thus have a fixed fixed causality
causality (figure 9.8). We say that the effort source has fixed effort-out causality and
the flow source fixed flow-out causality.

e e
Se f 0 S.. f f 1
..
u i

e f
Se Sf

F IGURE 9.8 Causal bond graphs and the corresponding equations and block
diagrams of source elements

Exercise 9.44
Explain why in figure 9.8 there are still signals e and f along the bonds, while in the block
diagram only one signal seems to play a role.

The next category of elements we consider are the C - (capacitor, spring and fluid
bufffer) and I - (inductor, mass and hydraulic inertia) elements. These elements are
described with an integrator or differentiator.
In a-causal form the C -element is described by the relations:

1 de
Z
e− i dt = 0 or i −C =0 (9.3)
C dt
and the I -element by

1 di
Z
f− e dt = 0 or e − I =0 (9.4)
I dt
126 CHAPTER 9. BOND GRAPHS

In a simulation the integral form is preferred. Therefore, these elements have a


preferred preferred causality. Figure 9.9 gives an overview. Later we will see that elements
causality
with derivative causality need further attention. They not only cause problems
for simulation, but also indicate that a model is either too complex or too simple.
red causal stroke Therefore, 20-sim indicates derivative causality with a red causal stroke, as in fig-
ure 9.9.

0 C: C 1 I:I

f 1
_ e e 1
_ f
C I

0 C:C 1 I:I

e f f e
C I

F IGURE 9.9 Causal bond graphs and the corresponding equations and block di-
agrams of C - and I -elements. The upper two systems have integral
causality, the lower two figures, with the red causal strokes have
derivative causality.

The last two elements are the transformer and the gyrator. A transformer is de-
scribed by the relations

e 1 − ne 2 = 0
(9.5)
n f1 − f2 = 0

This implies that if the primary side of the transformer has effort-in causality, the
secondary side must have effort-out causality, because e 2 = n1 e 1 . Simultaneously
the primary side will then have flow-out causality and the secondary side flow-in
causality. This situation is given in the upper-left graph in figure 9.10. The lower left
graph of figure 9.10 gives the opposite situation.
A gyrator is described by the relations

e1 − n f2 = 0
(9.6)
n f1 − e2 = 0

This implies that if the primary side of the gyrator has effort-in causality, the sec-
ondary side must have flow-out causality, because f 2 = n1 e 1 . Simultaneously the
9.3. BILATERAL SIGNAL FLOWS AND CAUSALITY 127

primary side will then have flow-out causality and the secondary side effort-in
causality. This situation is given in the lower-right graph in figure 9.10. The upper
right graph of figure 9.10 gives the opposite situation.

1 TF 1 1 GY 1

1 TF 1 1 GY 1

F IGURE 9.10 Causal bond graphs and the corresponding equations of a trans-
former and gyrator

Transformers and gyrators thus just propagate the causality. This implies that these
elements are subject to a causal constraint. If one of the ports of a transformer has causal constraint
effort-out causality, the other one must have flow-out causality. In a gyrator the pri-
mary effort determines the secondary flow and vice versa. Both ports of the gyrator
must thus have the same causality. The various causal situations of transformers
and gyrators are given in figure 9.10.
Finally we consider the causality constraints of the junctions. Figure 9.5 and
eq. 9.1 give the formulas relevant for junctions. A 1-junction represents a flow sig-
nal, f . For a 1-junction, as in the upper right graph of figure 9.5, the sum of all the
efforts is equal to zero:

e1 − e2 − e3 = 0 (9.7)
The flow of the junction will be uniquely determined by one and only one of the
connected elements. Let this be element 1. Then

f 1 = F (e 1 ) (9.8)

The effort e 1 follows from eq. 9.9:

e1 = e2 + e3 (9.9)

A 0-junction represents an effort signal, e. For a 0-junction, as in the upper left


graph of figure 9.5, the sum of all the flows is equal to zero:

f1 − f2 − f3 = 0 (9.10)
The effort of the junction will be uniquely determined by one and only one of the
connected elements. Let this be element 1. Then

e1 = F ( f1) (9.11)
128 CHAPTER 9. BOND GRAPHS

The flow f 1 follows from eq. 9.9:


f1 = f2 + f3 (9.12)
causal constraint Junctions are thus subject to a causal constraint, just like transformers and gyrators.
If two elements are connected to a 1-junction, the flow will be the input for one
of the two elements, while the other element has the effort as input and computes
the flow, represented by the 1-junction. If more than two elements are connected to
a 1-junction, only one of the elements can determine the flow and thus have flow-
out causality. All the other elements must have effort-out causality. This implies
that all the bonds connected to a 1-junction, except one, have the causal stroke
near the junction.The left bond graph of figure 9.11 represents this situation. The
effort source has a fixed effort-out causality. The C -element has preferred effort-out
causality and the I -element has preferred flow-out causality. Because of the causal
constraint of the 1-junction, the R-element must thus have effort-out causality.
At a 0-junction the opposite holds true. Only one of the elements can determine
the effort. The effort is the input for all the other elements, which thus have flow-
out causality. Therefore, of all bonds connected to a 0-junction, only one can have
the causal stroke near the junction (as in the bond graph at the right of figure 9.11).

R R R R1

Se 1 I L Sf 0 I L1
Se Sf

C C C C1

+ R L

Uo Io R L C
C

F IGURE 9.11 Causal constraints at junctions

Exercise 9.45
Check yourself how the rules for the causality assignment lead to the causal strokes in the
bond graph at the right of figure 9.11.
9.4. DERIVING EQUATIONS FROM A CAUSAL BOND GRAPH 129

9.4 Deriving equations from a causal bond graph


A causal bond graph, like the two graphs in figure 9.11 is a direct graphical repre-
sentation of the equations that describe the system. From the bond graph of the
circuit at the left in figure 9.11 we can directly deduce the equations. The flow (elec-
trical current in this case), represented by the 1-junction is uniquely determined by
the bond without a causal stroke at the junction:

1 1
Z Z
f = e L dt → i = u L dt (9.13)
L L
Taking the direction of arrows of the bonds into account (see the rules in figure 9.5)
it follows that
e S e − e R − e I − eC = 0 → e I = e S e − e R − eC (9.14)
or
1
Z
u L = Uo − i R − i dt (9.15)
C
These equations are ready for simulation, or can, after some manipulations, be
converted into a differential equation.

Exercise 9.46
Derive in a similar way the equations of the circuit at the right in figure 9.11 from the bond
graph.

As an example of a complete causal bond graph we reconsider the example of the


DC motor of figure 8.14. We connect the DC motor to a voltage source and draw the
bond graph in 20-sim (figure 9.12).

R L
+
Km
U J
f J

R:R I :L R:f I:J When you draw


the bond graph in
uL TJ 20-sim, you will
uR Tf notice that 20-sim
automatically
U
Se
.. 1.. GY
.. 1.. assigns the
causality.
U i Km

F IGURE 9.12 IPM and causal bond graph of a DC motor connected to a voltage
source and a mechanical load
130 CHAPTER 9. BOND GRAPHS

The equations can again be easily derived from the causal bond graph:

1
Z
i= u L dt (9.16)
L
uL = U − i R − K m ω (9.17)
1
Z
ω= T J dt (9.18)
J
T J = Km i − f ω (9.19)
With some computational effort these equations can be converted into a differen-
tial equation or directly into the block diagram of figure 9.13.

i 
 1/L Km  1/J
Constant

R f

Km

F IGURE 9.13 Block diagram of the motor

9.5 Causality assignment


The different causality restrictions discussed in the previous section, make reveal
that there are severe and less severe restrictions to the assignment of causality for
the different elements. Most severe is, of course, the fixed causality of the sources,
followed by the causal constraints of the junctions, the transformer and the gyrator,
then the preferred causality and finally the indifferent or arbitrary causality. Or in a
list:

1. fixed causality

2. causal constraints

3. preferred causality

4. indifferent causality

This is also the order, which we follow to assign the causality. We start at a source
element (or at one of the sources). This source gets the fixed causality belonging to
this source. The source will be connected to a junction. It is possible that due to the
causal constraints of the junctions, this causality assignment propagates through
the graph to other junctions. If no further propagation is possible another source
9.5. CAUSALITY ASSIGNMENT 131

can be given preferred causality. If there are no sources left, the next step is to con-
sider an element with preferred causality. This element gets the preferred causal-
ity. This causality assignment may propagate again through the graph to other ele-
ments and junctions. This is repeated until all elements with preferred causality are
handled. The last step is to assign an arbitrary causality to one of the elements with
indifferent causality and propagate this. Also this step is repeated until all elements
with indifferent causality have been handled. This procedure will be illustrated with
the bond graph of figure 9.12.

Step 1: assign fixed causalities and propagate causal constraints

We start with assigning the required fixed causality to the S e source. At the first 1-
junction this leaves enough freedom for assigning causality to other elements. This
implies that the causality of the effort source does not propagate. This first step is
indicated by the number 1 in the black circle in figure 9.14.

F IGURE 9.14 R:R I :L R:f I:J


Causality assignment
step 1: assign fixed causality.
The causality does not
propagate in this stage. Se
.. 1.. GY
.. 1:
U
1 i Km

If there are more source elements, we repeat this procedure. Because there are no
other source elements, we proceed to step 2.

Step 2: assign preferred causalities and propagate

In step 2 we assign the preferred causality to one of the elements with preferred
causality. We can choose between the mechanical or the electrical I-element. We
choose here, arbitrarily, the electrical I-element (the inductance L). This causal
stroke of this element gets the number 2. Because there is now one bond (from the
I-element) determining the flow of the electrical 1-junction, all other bonds con-
nected to this junction should have the effort directing to the junction. They get
a causal stroke near the junction (2a and 2b). Because of the causal constraint of
the gyrator, the causality is propagated to the other port of the gyrator (2c). At the
mechanical junction there are no further constraints. Thus the propagation stops
here (figure 9.15). Because another element with preferred causality is found at the
mechanical 1-junction, we repeat step 2 and assign the preferred causality to the
mechanical I-element, the inertia J (3). Because of the causal constraint of the me-
chanical 1-junction, the R-element, the mechanical friction f gets the last causal
stroke (3a in figure 9.16).
132 CHAPTER 9. BOND GRAPHS

F IGURE 9.15 R:R I :L R:f I:J


Causality assignment 2
step 2: assign preferred
causality and propagate 2a
Se
.. 1.. GY
.. 1:
U
1 i
2b 2c
Km

F IGURE 9.16 R:R I :L R:f I:J


Causality assignment 2 3
step 2 again:
assign preferred causality and 2a 3a
propagate Se
.. 1.. GY
.. 1:
U
1 i
2b 2c
Km

Step 3: assign indifferent causalities and propagate

In this example no elements are left to which causality has to be assigned. Other-
wise the procedure would continue, similar to the one in step 2, for all elements
with indifferent causality.
The causality assignment in 20-sim is done automatically. It can be made visible
by selecting view/causality info in the graph editor window. 20-sim uses a different
numbering. Instead of 2a and 2b the notation 2.1, 2.2 is used and numbering starts
at 0. The graph with the numbering of 20-sim is given in figure 9.17. Note that 20-
sim started with giving the mechanical I-element preferred causality first.

F IGURE 9.17 R I R:f I:J


Causality assignment of 1.1 1
20-sim 2
2.1 1.3
Se 1 GY 1
0.1 1.2

9.5.1 Causal conflicts


In figure 9.18 an extra inertia has been connected to the motor axle. At first sight
this does not seem problematic at all. But when the bond graph is drawn and causal-
ity is assigned, it appears to be impossible to give this extra intertia, J 2 , the pre-
causal conflict ferred causality in step 3b. We call this a causal conflict.
20-sim reports a Such a causal conflict indicates that we should rethink the correctness of the model.
causal conflict by Without changing the model the derivative causality implies that the influence
means of a red
causal stroke at of inertia J 2 in the system can only be computed in derivative form. This requires
the bond more complex simulation algorithms than in the case of integral equations. In the
connected to the integral form the equation for an inertia is:
problem element
9.5. CAUSALITY ASSIGNMENT 133

R L
+
Km
U J J
f J J2

R:R I :L I :J I : J2
3
2

2a 3b
Se
.. 1.. GY
.. 1:
U
1 i
2b 2c
Km 3a

R:f

F IGURE 9.18 Causal conflict: the inertia J 2 cannot get the preferred causality

1
Z
ω= T dt + ω(0) (9.20)
J
A second inertia on the same axle can only have the same angular velocity and the
same initial condition. Because these initial conditions are not independent from
each other, we say that these elements have dependent states. If the initial condition dependent states
ω(0), the state, of inertia J is chosen, the state of J 2 is the same, because it depends
on the state of J . The easiest way to get rid of this dependent state is to combine the
two inertias into one inertia. Another solution is to make the states independent.
One could wonder if the axle between the two inertias is not somewhat flexible. If
so, a more correct model would be to add a spring-damper combination in between
the two masses. This is done in figure 9.19.
This model is probably a better description of the reality than the model with a
stiff axle. But if the flexibility is negligible, the solution of combining the two iner-
tias into one is to be preferred.
134 CHAPTER 9. BOND GRAPHS

R L R damper
+
Km
U J J
f J C J2

C :C R : Rdamper
R:R I :L I :J 4c 4d I :J
2
3 4
2
1
2a : 1 3b 4b 4a
Se
.. 1.. GY
.. 1 0 1 : 2

U
1 i
2b 2c
Km 3a

R:f
F IGURE 9.19 Causal conflict solved by adding a spring-damper combination to
represent flexibility of the axle

Exercise 9.47
Derive the equations of this system and show that these equations can be converted into
the block diagram of figure 9.20.

1 2

 1/L Km  1/J  1/C  1/J2

R f Rd

Km

F IGURE 9.20 Block diagram of the motor with flexible axle

In a next example of a causal conflict we consider the situation of figure 9.12 again,
but we replace the voltage source by a current source. We now see a causal conflict
in the electrical part of the system (figure 9.21).
9.5. CAUSALITY ASSIGNMENT 135

R:R I :L R:f I:J

Sf 1.. GY 1:
.. ..
I i Km

F IGURE 9.21 Bond graph of the system with a current source

When we take a closer look, we see that in the presence of a current source, the
electrical components cannot have any influence on the current in the current loop
of the motor. This implies that we could just leave out the inductance in our simu-
lation or computation model. When we remove the inductance the bond graph can
be made causal without any causal conflict.

Exercise 9.48
Check this yourself and simulate the two systems. Show that also the resistor can be re-
moved and explain why.

9.5.2 Causality assignment in 20-sim


When bond graphs are used as a representation of a system in 20-sim the user does
not have to bother about causality assignment. 20-sim does this automatically.
When there is a causal conflict it is intelligently solved, in a similar way as shown
here. Two dependent masses or inertias are computed as one. Elements that be-
come irrelevant, like the inductance and resistor in the current source case, are re-
moved. If such measures are not possible advanced simulation algorithms solve the
conflicts by means of iteration or symbolically computing a solution for the prob-
lem situations. Such problem situations occur not only when there is a derivative
causality but also in the case of algebraic loops. Algebraic loops are present when algebraic loop
there are feedback loops without any buffer element. An example of an algebraic Buffer elements
loop is the block diagram of figure 9.22. are integrators or
time delays in
continuous time,
R E C or summers and
K1 delay elements in
discrete time.

K2

F IGURE 9.22 Algebraic loop

In the feedback loop only gain elements are present. This implies that in the loop
the input of each block directly depends on its own output. This can only be solved
by introducing a small delay somewhere in the loop. This leads to an approxima-
tion. To make the approximation as accurate as possible, a very small computation
136 CHAPTER 9. BOND GRAPHS

interval must be chosen, which is less desirable. We can also find an exact solution
symbolic by means of a symbolic solution. We can write the following equations:
solution

C = K1E (9.21)
E = R − K 2C (9.22)
C = K 1 R − K 1 K 2C (9.23)
(1 + K 1 K 2 )C = K 1 R (9.24)
C K1
= K loop = (9.25)
R 1 + K1K2

When, for example, K 1 = 1 and K 2 = 2, the algebraic loop can thus be replaced by
the gain K loop = 13 .
Although the bond-graph representation of a system makes causal conflicts im-
mediately clear, these causal conflicts are not only a problem when we work with
bond graphs. Because IPM’s can be mapped one to one on a bond graph, similar
problems are present, and of course similar solutions. Causal conflicts arise when
we try to derive equations from a model that is too complex or too simple. It does
not matter whether the model is represented by a bond graph or an IPM. However,
in a bond graph, the cause of a causal conflict is immediately clear and the solu-
tions to solve it as well. This is less obvious for an IPM where the solution of causal
problems requires quite some expertise. You can show the causality information of
causality info IPM’s in 20-sim by selecting Causality Info from the View menu. Another way to ob-
serve causal conflicts when working with IPMs is by starting the simulator from the
graph-editor window. This produces a report (log file) at the bottom of the graph-
editor window.
When you want to do your own coding, deriving a model that can simply be sim-
ulated, is even more important. To prevent that complex algorithms must be used it
is crucial for the model to be as simple as possible. The causal analysis with a bond
competent model graph, either manual or with the aid of 20-sim, helps in finding such a competent
model: a model that is complex enough to model all relevant phenomena, but is at
the same time not unnecessarily complex.

9.5.3 Summary of this chapter


In this chapter we have seen how the process of causality assignment leads to a set
of formulas that can be simulated or used to compute a differential equation. The
causality assignment procedure not only leads to equations but also supports the
modelling process itself. Causal conflicts are an indication for a model that is too
complex or too simple. They warn or suggest the user that alternative models may
be a better choice.
causality The causality assignment can be done systematically by following the steps listed
assignment
here (see also figure 9.23, where the different causality restrictions have been sum-
marised):
9.5. CAUSALITY ASSIGNMENT 137

e e
fixed causality: Se f 0 Sf f 1
sources
e f
Se Sf

causal constraints:
- only 1 bond without
a causal stroke
1 0
at 1-junction
- only 1 bond with
a causal stroke
at 0-junction

causal constraints: 1 TF 1 1 GY 1
transformer and gyrator

1 TF 1 1 GY 1
preferred causality: 0 C: C 1 I :I
C- and I-elements
f e e f

e e
indifferent causality: 1 f R 1 f R
R-elements
e f f e
1 R
R

F IGURE 9.23 Overview of causality restrictions: ordered in order of severity

1. Step 1: assign fixed causalities and propagate causal constraints


Select a source element with fixed causality and propagate this causality
through the junction structure, obeying the causal constraints.

2. Step 1a
Repeat this until all sources have been handled.

3. Step 2: assign preferred causalities and propagate


Select an element with preferred causality and propagate this causality through
the junction structure, obeying the causal constraints.

4. Step 2a
Repeat this until all elements with preferred causality have been handled.

5. Step 3: assign indifferent causalities and propagate


Select an element with indifferent causality and propagate this causality
through the junction structure, obeying the causal constraints.

6. Step 3a
Repeat this until all elements with indifferent causality have been handled.

7. Step 4: solve the causal conflicts


If there are any causal conflicts, reconsider the model and add, remove or
combine elements such that a model without causal conflicts is obtained.
138 CHAPTER 9. BOND GRAPHS
10
Here we look back at the previous chapters and
discuss how the different topics are related. We
also introduce modelling of the thermal domain.

Review of Chapters 1-9

After studying this chapter you are expected to completely master the topics treated
in the previous chapters:

– (Causal) relation diagrams


– Ideal Physical Models
– Bond graphs and causality
– Block diagrams
– Electrical systems
– Mechanical systems
– Hydraulic systems
– Thermal systems
– Simulation of these systems with 20-sim and with your own code

10.1 Introduction
In the previous sections we have seen several representations of a system. It is now
time to wrap up and determine in which situation each of these model types is
most useful. We should not forget that most of the time making a model is not a
goal in and by itself. A model helps us to formulate a problem, or to understand a
complex system. In a design phase of a product or project a model is helpful to in-
vestigate the behaviour of the system we plan to build. In the virtual world models
play a crucial role. They represent reality or augmented reality or even a surrealis-
tic world, with physical laws that do not really exist. In all these cases relationships In a closed-loop
between subsystems and closed loops are important. These relations determine the system the output
of a system
system’s dynamics. Catching the important behaviour in a competent model is the element depends
art of modelling. Often this modelling process starts with a global description, e.g. on itself.
in the form of finding (causal or non-causal) relations. Such a model can be rep-
resented with a (causal) relation diagram. A causal relation diagram just depicts causal relation
the relations without any quantitative description. In principle, descriptions in the diagram

139
140 CHAPTER 10. REVIEW OF CHAPTERS 1-9

form of formulas are missing. Still, finding these relations is an important phase in
the modelling process, because some basic modelling decisions are made at this
point. The major elements, relevant for the problem context must be identified and
system boundaries are chosen.
If the relation diagram is indeed a causal relation diagram, it can be converted
block diagram into a block diagram or equations. This requires that the linguistic descriptions of
the causal relation diagram are translated into formulas and that parameters in
these formulas are chosen or estimated from the real system (if such a system ex-
ists). Block diagrams are widely used and if all the parameters and equations are
available, they can be used as input for several simulation programs. In fact, block
diagrams are nothing else than a graphical representation of the underlying causal
equations. Programs like Matlab/Simulink and 20-sim accept both equations and
block diagrams as an input format.
Physical systems are, in first instance, best described by a-causal models in the
IPM form of Ideal Physical Models, or IPMs. These IPMs often closely resemble engi-
neering drawings. This is especially true for electric circuit diagrams, which can in
many cases be directly translated into an IPM. In principle IPMs are a-causal. 20-
sim is one of the few programmes that support IPMs as an input format.
bond graph A more abstract input format is a bond graph. A bond graph can be seen as an
abstract and domain-independent representation of an IPM. Such an abstraction is
helpful to find an analogon model or even a realisation in another domain. 20-sim
supports the input of bond graphs in the graph editor.
Both bond graphs and IPMs must be made causal if simulation is required. In
principle, the causality assignment procedures for a bond graph are applicable
to the corresponding IPM as well. However, this is much easier to perform in the
bond graph. The causality assignment supports the modelling process, because
causal conflicts point to a model being oversimplified or too complex. A-causal
bond graphs (and IPMs) can be used as an input for 20-sim. 20-sim performs the
causality assignment. Most of the causal conflicts are solved by the programme. If a
causal conflict is detected in a bond graph, a red stroke warning for non-preferred
causality is displayed at the problem elements. These messages may lead the mod-
eller to make a better model or they will make the modeller aware of the conse-
quences of the modelling choices made. This red causal stroke does not always
mean that the system cannot be simulated. By symbolic manipulation or iteration a
simulation may still be possible.
We have already seen several examples of electrical and mechanical systems. In
this chapter we will see a few more. A domain we did not yet cover is the thermal
domain. In section 10.3.4 we will see that this domain needs a special treatment.
Finally we will review the consequences of our models for simulation. This is
especially important if not all the actions to be taken are performed by a simula-
tion programme. If you want to write your own code it is important to make models
which can easily be simulated. Also care must be taken that these equations are
properly sorted.
10.2. SYSTEM DESCRIPTIONS 141

10.2 System descriptions


10.2.1 (Causal) Relation diagrams
As a running example in this chapter we will reconsider the DC-motor that has DC-motor
been discussed before. DC-motors are used in all kinds of applications and come
in many different sizes. The applications range from (pet) robots (figure 10.1) and
Mars landers to large traction motors in trains. DC-motors can also be used as gen-
erators. In the latter case the ‘motor’ converts mechanical energy into electrical In a windmill the
energy. Examples of generators are a bicycle dynamo or the generator in a windmill generator will be
of a slightly
(figure 10.2. The ‘DC-motor’ is thus a rather generic electro-mechanical transducer. different type,
because of the
coupling to AC
power lines.

F IGURE 10.1 Motors in a pet robot and a robot arm

F IGURE 10.2 Generators: at the left in windmills and at the right


a bicycle dynamo
142 CHAPTER 10. REVIEW OF CHAPTERS 1-9

When we want to model the motor or the generator we can start with drawing a
(causal) relation diagram. We may choose to model the ‘motor’ as a transducer,
without deciding if it is a motor or a generator yet. But we could also choose one of
the two. These choices are given in figure 10.3 and 10.4.

F IGURE 10.3 The motor or generator modelled as a general transducer of


electrical and mechanical power

F IGURE 10.4 The transducer specified as a motor and as a generator

When we take a closer look at the inside of the motor (figure 10.5) we may de-
cide that we want to model the components in more detail. We see that the rotor
consists of an iron core with windings. The stator consists of permanent magnets
and a housing. Thus, both electrical and mechanical system components are to be
modelled.
Exercise 10.49
Take a closer look at the components of figure 10.5. We see that there are electrical and
mechanical components (figure 10.6). Which of the components of this figure would you
include in your model and how will these models look? Are there also components that
do not play a role in a model of the dynamics of this transducer?

Which elements After examining the electrical and mechanical parts more closely, as in exercise
we include in the 10.49, we could decide to model the inductance and resistance of the windings at
model is a
modelling choice. the electrical side of the motor and inertia and friction at the mechanical side of the
motor. This leads to the relation diagram of figure 10.7. This diagram has no indica-
tion of a positive power flow and can thus represent both a motor and a generator.
10.2. SYSTEM DESCRIPTIONS 143

F IGURE 10.5 A motor taken apart. The stator with permanent magnets and the
rotor with its iron core and the windings are clearly visible

10.2.2 Ideal Physical Models


We can make the details identified in figure 10.7 more explicit by superimposing
an IPM on the relation diagram (figure 10.8). When we connect the electrical side
of the transducer to a voltage or current source, it is a motor. When we connect the
mechanical side to a torque or angular velocity source, it is a generator.
While relation diagrams are more qualitative, the elements in ideal physical mod- elements
els have a one-to-one relation with an elementary physical behaviour. The level
of detail of the description of the motor depends on the context. The IPM of fig-
ure 10.8 can be seen as a description of the component ‘motor’. The component component
consists of physical elements, which under certain circumstances may be left out of
the model (as we will see later).

R L

Km
J
f J

F IGURE 10.8 IPM superimposed on the relation diagram

When used as a motor, we can connect the electrical side of the transducer to a
voltage source or a current source. If the voltage or current is constant, after some
144 CHAPTER 10. REVIEW OF CHAPTERS 1-9

F IGURE 10.6 Motor and generator with electrical and mechanical components
‘detected’

F IGURE 10.7 Motor or generator with electrical and mechanical components


identified

time, this will lead to a constant angular velocity (steady state). Although this may
be interesting, for instance, for a motor driving a fan, there are many applications
in which we want to be able to influence this velocity. This can be achieved by ex-
modulated changing the constant voltage or current source with a modulated voltage or cur-
voltage or
current source
rent source. The output of these sources is determined by a modulating signal. The
iconic diagrams for these modulated sources are given in figure 10.9.

Modulated Voltage Modulated Current


Source Source

F IGURE 10.9 Modulated voltage and current source

The modulating signal may be adjusted manually but can also be the result of a
feedback control system, implemented to move the rotor into a certain position, as
in a robot arm. All the motors in figure 10.1, for instance, must be controlled to let
the pet robot or the robot arm make certain motions.
In figure 10.10 the motor is connected to a modulated voltage source. On the
mechanical side, a mechanical load in the form of an inertia is connected to the
modulating motor. Note that the modulating signal of the voltage source is a signal (i.e. no
signal
power is involved). The modulated voltage source converts this signal into electrical
power, where the voltage follows the modulating signal.
10.2. SYSTEM DESCRIPTIONS 145

R L
+
Km J J
f J J load

motor

F IGURE 10.10 Motor connected to a modulated voltage source and


a mechanical load

In a similar way, when used as a generator, the mechanical side of the transducer
can be connected to a modulated torque or angular velocity source (figure 10.11). modulated
torque or
angular velocity
source
T 
Modulated Modulated
Torque Actuator Velocity Actuator

F IGURE 10.11 Modulated torque and (angular) velocity source

In this case the electrical load is modelled as a resistor (figure 10.12). Note that al-
though we called the transducer a motor in one case and a generator in the other,
the IPM inside the dotted lines is the same in both applications. Because we deal
with the same device in both situations, this should not come as a surprise.

R L

R Km J
load T
f J

generator

F IGURE 10.12 Generator connected to a modulated torque source and


an electrical load

10.2.3 Bond graphs


To get more insight into the properties of this system and eventually possible sim-
plifications or necessary extensions of this model, we also consider this system
from a bond-graph perspective. We disregard the mechanical and electrical load.
Figure 10.13 gives the bond graph of the motor driven by a modulated effort source
(a voltage source). There is a positive power flow to the components of the motor.
146 CHAPTER 10. REVIEW OF CHAPTERS 1-9

motor R :R I:L R:f I:J

MSe
.. 1
.. GY
.. 1
..
u i Km 

F IGURE 10.13 Motor connected to a modulated effort (voltage) source

When we remove the voltage source and add a torque source (a modulated effort
source at the mechanical side) we obtain figure 10.14. The half arrow connected to
a source is always directed away from the source. This emphasises that the source
always delivers energy to the rest of the system.

generator R: R I:L R: f I:J

1.. GY
.. 1
.. MSe
..
i Km  T

F IGURE 10.14 Generator connected to a modulated effort (torque) source

In figure 10.14, at the 1-junction representing ω, there is a positive power flow from
the torque source. When we do not modify the directions of the half arrows in the
rest of the system, the orientations of the half arrows suggest that there is also a
positive power flow from the electrical part of the system. This follows from the
rules, given in figure 9.5. For a generator this is obviously not true. The power will
flow to the electrical part of the system (‘to the left’). This power flow, with the given
orientations of the half arrows must thus be negative. Although the bond graph of
figure 10.14 will give correct results in computations, when the ‘motor’ is used as
a generator, it is more convenient to change the directions of the half arrows, as in
figure 10.15.

generator, R: R I:L R: f I:J


positive power adjusted

1.. GY
.. 1
.. MSe
..
i Km  T

F IGURE 10.15 Generator connected to a modulated effort source

If we horizontally flip the bond graph of figure 10.15, it is completely similar to the
bond graph of figure 10.13, except for the domain dependent variables, T , u, ω and
i . Identical elements are used to represent the mechanical and electrical domain.
10.2. SYSTEM DESCRIPTIONS 147

When we replace the effort sources by flow sources, this implies a current source
for the motor and an (angular) velocity source for the generator (figure 10.16, upper
row). To simplify the figures we leave out the modulation, but with modulated flow
sources the reasoning would be entirely similar. We notice that this leads to a causal
problem: in the case of the motor we cannot assign the preferred causality to the in-
ductance and in the case of the generator we cannot assign the preferred causality
to the inertia.
motor generator

R: R I: L R: f I: J R:R I:L R:f I:J

Sf 1 GY
.. .. .. ..1 1
.. GY
.. 1
.. Sf
..
i i Km  i Km  

R: f I: J R :R I:L

Sf
.. 1.. GY 1 1.. GY 1.. Sf
..
.. .. ..
i i Km  i Km  

R: f I: J R: R I:L

Se Se
.. ..1 1
.. ..
T :Km  i u :Km

F IGURE 10.16 Motor and generator connected to flow sources

In figure 9.21 and exercise 9.48 we have already seen that, in the case of a current
source, the inductance and resistor can be removed from the model because the
current in the electrical circuit is completely determined by the current source.
A similar reasoning holds for the mechanical part of the system with a velocity
source. The velocity is completely determined by the velocity source. The inertia
and friction have no effect on the dynamics of the system. When we remove these
elements, we get the middle row of figure 10.16. Taking a closer look at these bond
graphs shows that first of all the 1-junction to which the flow source is connected
can be left out. The outgoing bond of this junction carries exactly the same infor-
mation as the ingoing bond. A next step is to eliminate the gyrator. The gyrator does
nothing else but interchange the effort and the flow and multiplying the signals
with K m (see eq. 6.8). In this case the gyrator equations are:

e2 = Km f1
e1 = Km f2 (10.1)
148 CHAPTER 10. REVIEW OF CHAPTERS 1-9

where in the case of the motor, f 1 is the current, e 1 the voltage, f 2 is the angular
velocity and e 2 the torque. Because the current ( f 1 ) is fixed by the current source,
also the torque (e 2 = K m f 1 ) is completely fixed. This implies that we can replace the
current source S f and the gyrator by a torque source S e with an output value K m
times the output of the original current source.
The same reasoning can be followed in the case of the generator. The angular
velocity source, combined with the gyrator can be replaced by a K m times larger
voltage source. These simplifications lead to the lower row of figure 10.16.

Exercise 10.50
Show in a simulation that the different bond graphs of the motor in figure 10.16 indeed
lead to the same angular velocity signals.

Exercise 10.51
Draw the IPMs, which correspond to the bond graphs in figure 10.16.

causality- We have seen that the causality-assignment procedure helps us make a compe-
assignment
tent model of the system. The manipulations we performed before with the models
of the motor and the generator are an example. In addition, the causality assign-
ment leads to equations that can be computed without problems in a numerical
simulation. As long as a programme like 20-sim is used, the required equations are
generated automatically. However, when an input in the form of block diagrams
is needed, or if the code has to be programmed manually, a causal bond graph is a
relatively easy intermediate step towards deriving these equations. Block diagrams
will be reviewed in the next section.
Let us consider figure 10.10 again. We have already seen that the combination
of two masses leads to a causal conflict. When we use a current source instead of
a voltage source we can disregard the electrical part of the motor. When we also
replace the current source-gyrator combination by a torque source we obtain the
IPM and bond graph of figure 10.17.

R :f

J J Se
T ..1 I
..
..
Torque Bearing Inertia Inertia 
T J load
Load

I : Jmotor
F IGURE 10.17 Motor as torque source with mechanical elements

causal conflict There is a causal conflict for the load inertia, because it cannot be assigned the pre-
ferred causality. 20-sim solves this by combining the two inertias into one inertia
(figure 10.18).
10.2. SYSTEM DESCRIPTIONS 149

R :f

Se
..
1.. I : J motor + Jload
T 

F IGURE 10.18 Two inertias combined into one

The other solution is to add flexibility in the axle, in the form of a spring (figure 10.19
left bond graph) or a spring-damper combination (figure 10.19 right bond graph).

C : c axle R : daxle
R :f C : c axle R :f
1

Se
..
1 0 ..
1 I Se
..
1 0 1 I
: motor .. : motor .. ..
T load J load T load J load

I : Jmotor I : Jmotor

F IGURE 10.19 Spring (left) or spring-damper combination to represent


compliance of the axle

The bond graph of figure 10.19 (right) can be drawn as the IPM of figure 10.20.

T J J
Torque Bearing Inertia Spring Inertia
motor Damper load

F IGURE 10.20 IPM of a system with a spring-damper combination

10.2.4 Block diagrams


Block diagrams are popular for describing dynamic systems. IPMs and bond graphs
can give an a-causal description of physical systems. This is certainly advantageous
in the earlier stage of the modelling process. A causal bond graph is directly related
to computable equations. A graphical representation of these equations is a block
diagram. Block diagrams can be used as input for simulation programmes. Often
block diagrams are used in combination with transfer functions. We have seen
examples of first-order and second-order transfer functions. A first-order transfer
function is, for instance:
K
H= (10.2)
sτ + 1
150 CHAPTER 10. REVIEW OF CHAPTERS 1-9

Blocks with transfer functions can be combined into a new transfer function, fol-
lowing some simple rules. When two blocks are placed in series, the combined
transfer function, H is the product of the two transfer functions, H1 and H2 (fig-
ure 10.21):

F IGURE 10.21 u y
H1 and H2 in a series configuration: H1 H2
y = Hu = H1 H2 u

When the blocks are placed in parallel, the combined transfer function, H is the
sum of the two transfer functions, H1 and H2 (figure 10.22):

F IGURE 10.22
H1 and H2 in a parallel configuration: H1
u y
y = Hu = H1 u + H2 u = (H1 + H2 )u

H2

When the blocks are placed in a feedback configuration, the combined transfer
function, H is found as follows (figure 10.23):

y = H1 u − H1 H2 y (10.3)

y + H1 H2 y = H1 u (10.4)

(1 + H1 H2 )y = H1 u (10.5)
This yields:

y H1
H= = (10.6)
u 1 + H1 H2

F IGURE 10.23 u y
H1 and H2 in a feedback configuration: H1

y H1
H= =
u 1 + H1 H2
H2

The overall transfer function of a more complex block diagram can be found by
combining these three simple configurations.
10.3. PHYSICAL DOMAINS 151

Exercise 10.52
Find the transfer function of the block diagram of figure 10.24.

H3
u y
H1

H2

H4

F IGURE 10.24 Block diagram of a more complex system

10.3 Physical domains


10.3.1 Electrical Systems
The DC-motor needs a DC-power source to power the electromagnets in the arma-
ture. Most electronic devices also need a DC-power source, known as an adapter. adapter
As an example of an adapter we consider the power supply for an electronic device,
like a mobile phone or laptop. These devices are needed to convert the primary 230
V-AC to, for instance, 5 V-DC for a usb-based charger (figure 10.25).

F IGURE 10.25 USB-based charger

First of all we need an element that reduces the 230 V to 5 V. This can be done with
a transformer. Next we need elements that convert the AC power to DC power. We
call this process rectification. The AC signal out of the transformer is a sinusoidal rectification
signal with an amplitude of ±5 V. If we would have an element that could suppress
the negative parts of the sinus and at the same time let the positive parts pass, we
obtain a pulsating voltage between 0 and 5 V (figure 10.26).
Such an element is comparable with a ‘non-return valve’ in a hydraulic pipe. The
electronic equivalent of the hydraulic non-return valve is a diode. The diode has a diode
resistance of almost zero if the voltage over the diode is positive and a resistance
152 CHAPTER 10. REVIEW OF CHAPTERS 1-9

10
Transformer out {V}

-5

600 Diode current {A}

500

400
300
200

100
0

-100
-200

-300
0 0.05 0.1 0.15 0.2
time {s}

F IGURE 10.26 Current through a diode

going to infinity if the voltage over the diode is negative. Of course this current does
not lead to a nice DC voltage when we connect the diode to a load. Therefore, we
need to suppress the variations. This can be done by adding a capacitor to the elec-
trical circuit. The current from the diode is then used to charge the capacitor. This
charging continues until the voltage over the capacitor is equal to the maximum
output voltage of the transformer. When the capacitor is connected to a load, it
discharges a bit during the phase of each period where the output voltage of the
transformer is lower than the voltage over the capacitor. These fluctuations are
smaller when the capacitor has a higher capacitance. The complete circuit is given
in figure 10.27. The diode icon symbolises an arrow. An ideal diode has a resistance
equal to zero if the current flows in the direction of the arrow and prevents the cur-
rent from flowing in the opposite direction.

n:1
diode
Rload

F IGURE 10.27 DC power adapter: transformer with rectifier circuit


10.3. PHYSICAL DOMAINS 153

In figure 10.28 several relevant signals of this circuit are given. If we choose a ca-
pacitor with a relatively small capacitance, we see that there is large ripple on the
output voltage of this usb-charger. When we choose a capacitor that is 100 times
larger, it takes longer before a steady state is achieved, but the ripple in the output
voltage is much smaller.

small capacitor large capacitor

Transformer out {V} Transformer out {V}


5 5

0 0

-5 -5

Diode current {A} 400 Diode current {A}


15
300
10
200
5
100

0 0

5 5

3 3
Charger output Voltage {V} Charger output Voltage {V}
1 1

-1 -1

0 0.1 0.2 0.3 0.4 0.5 0 0.1 0.2 0.3 0.4 0.5
time {s} time {s}

F IGURE 10.28 Signals with a small and a large capacitor

Note that especially in the case of the large capacitor, the current through the diode is
unrealistically large. This is because the parameter values of the components are cho-
sen such that the differences between a circuit with a small ripple and a large ripple are
clearly visible.

Exercise 10.53
Model the power-converter circuit of figure 10.27 with a bond graph. The AC source can
be modelled as a modulated Se source. Use the proper signal generator to represent the
alternating voltage of the AC source. The diode can be modelled as a modified resistor.
If the voltage over the diode is positive, the resistance must be small, when the voltage is
negative the resistance must be large. To see the effects clearly select the lower value of
the resistance R low = 1 mΩ and the higher value R high = 1kΩ.

Exercise 10.54
Make a hydraulic analogon model of this system.
154 CHAPTER 10. REVIEW OF CHAPTERS 1-9

The performance would be improved if we could use both the positive and negative
parts of the sinus to charge the capacitor. This can be done by inverting the nega-
diode bridge tive signal. In figure 10.29 a circuit with a so-called diode bridge is given. The extra
double-sided or diodes ensure that both parts of the sinusoidal signal contribute to charging the
full-wave
rectification
capacitor. This is called double-sided rectification or full-wave rectification.

rectifier bridge

n:1

load

F IGURE 10.29 Double-sided rectification

Exercise 10.55
Explain the working of the circuit of figure 10.29.

Modern power supplies (or more correct power converters) use more complex electronic
circuits to reduce the size of the converter and increase the efficiency. An example of such
devices are switched power supplies.

When we compare the signals in the two rectifier circuits we see the advantage
of the double-sided rectifier. In figure 10.30 signals of the single-sided (left) and
double-sided (right) rectifier are plotted during the first 0.1 s after switching it on.
We see that the double-sided rectifier has a smoother output signal and that the
current peaks are smaller.
10.3. PHYSICAL DOMAINS 155

10 10
Transformer out {V} Transformer out {V}
5 5

0 0

-5 -5

400 Diode1 current {A} 300 Total Rectifier current {A}

300 200

200 100

100 0

0 -100

6 Charger output Voltage {V} 6 Charger output Voltage {V}


5 5
4 4
3 3
2 2
1 1
0 0
-1 -1
-2 -2
-3 -3
0 0.02 0.04 0.06 0.08 0.1 0 0.02 0.04 0.06 0.08 0.1
time {s} time {s}

F IGURE 10.30 Single- versus double-sided rectification 0-0.1 s


after switching it on

In figure 10.31 signals of the single-sided (left) and double-sided (right) rectifier are
plotted from 0.4 s - 0.5 s after switching it on. We see that also in the steady state the
double-sided rectifier has a smoother output signal and that the current peaks are
smaller.
10 10
Transformer out {V} Transformer out {V}
5 5

0 0

-5 -5

Diode1 current {A} Total Rectifier current {A}


15 15

10 10

5 5

Charger output Voltage {V} Charger output Voltage {V}


4.88 4.88

4.86 4.86

4.84 4.84

4.82 4.82

4.8 4.8
0.4 0.42 0.44 0.46 0.48 0.5 0.4 0.41 0.42 0.43 0.44 0.45 0.46 0.47 0.48 0.49 0.5
time {s} time {s}

F IGURE 10.31 Single- versus double-sided rectification 0.4-0.5 s after


switching it on
156 CHAPTER 10. REVIEW OF CHAPTERS 1-9

We can now use this adapter as a power supply for a DC-motor. In figure 10.32 we
have connected the model of the single-sided rectifier with the DC-motor model
of section 10.2.2. In the plots of figure 10.33 we see that the ripples in the charger
output voltage are still visible in the motor current. Due to the mechanical inertia of
the motor these ripples are less visible in the angular velocity of the motor.

Step at t = 0.5

n:1 switch

F IGURE 10.32 Power supply driving a DC-motor

Table 10.1 summarises some of the major formulas and symbols of electrical sys-
tems. The bond graphs of the capacitor and inductance are given with their pre-
ferred causalities.

TABLE 10.1 Summary of formulas of the electrical domain


capacitor: resistor: inductance:

icons
1 1
u= idt u − Ri = 0 i= ud t
R R
equations C L
q = idt
R
electrical charge

λ = ud t
R
magnetic flux
u
1 i R
u u u
bond graph 0 i C 0 i R 1 i I

power P = ui
10.3. PHYSICAL DOMAINS 157

400 Diode current {A}

300

200

100

Charger output Voltage {V}


5

-1

4 Motor current {A}

3 Angular velocity {rad/s}

-1

0 0.5 1 1.5 2
time {s}

F IGURE 10.33 Responses of the motor driven by the power supply.


The motor is switched on at t = 0.5[s]

10.3.2 Mechanical Systems


As an example of a combined electro-mechanical system we consider an elevator. elevator
An iconic diagram of this system is given in figure 10.34.
The elevator with a mass of 1000 kg is driven by a rotating electrical motor. A ro-
tating drum transforms the rotational motion into a translation: the elevator cable
winds around the drum. We use the ‘belt-pulley’ model to represent the drum. We
edit the icon to let it resemble the situation of this drum better. The dynamics of the
motor are considered to be negligible compared to the mass of the elevator. There-
fore, the motor is modelled as an ideal torque source. The friction in the transmis-
sion is modelled with a bearing element. The cable is not infinitely stiff: a spring-
damper combination models the compliance of the cable. The mass of the eleva-
tor is subject to a gravity force of 1000 [kg] times 9.8 [m s−2 ] ≈ 10 [kN]. This mass is
compensated by a constant torque of the motor, represented by the constant input
158 CHAPTER 10. REVIEW OF CHAPTERS 1-9

Torque

T BeltPulley

Bearing1

SpringDamper
Constant

Pulse m Mass

Pulse1 F

Force

F IGURE 10.34 IPM of an elevator

signal. The model still lacks a control system to bring the elevator accurately from
one floor to the other. Instead two pulse-shaped signals are used to accelerate the
elevator and to slow it down again.

Exercise 10.56
In this model a constant torque of the motor is used to compensate for the gravity force.
Explain why this solution is not used in real elevators. Propose a better solution and indi-
cate what this would mean for the model of 10.34.

When we use the parameter values given in exercise 10.58, we obtain the plots of
figure 10.35.

Exercise 10.57
Have a look at the different signals in figure 10.35 and explain the shapes of the signals.

Exercise 10.58
Simulate this system yourself and have a closer look at the signals during the first 4 sec-
onds. Explain your observations. Use the following numerical values

BeltPulley.radius = 0.2 [m] Force.F= -10000.0 [N]


Mass.m = 1000.0 [kg] Constant.C=2000.0
SpringDamper.k = 30000.0 [N/m] Bearing1.d=10.0 [N m s/rad]
SpringDamper.d = 1.0 [N s/m]
Pulse.start time = 5.0 [s] Pulse1.stop time=12.3 [s]
Pulse.stop time = 9.0 [s] Pulse1.start time=11.0 [s]
Pulse.amplitude = 200.0 [N m] Pulse1.amplitude=-200.0 [N m]
10.3. PHYSICAL DOMAINS 159

15

10

5 Postion elevator {m}

3 velocity elevator {m/s}


2

-1

2200 Torque applied {N.m}


2100

2000

1900

1800

40 angular velocity of the motor {rad/s}

30

20

10

0.4

0.3

0.2
extension of the cable {m}
0.1

0 2 4 6 8 10 12 14
time {s}

F IGURE 10.35 Signals of the elevator model

Exercise 10.59
Plot the power and energy consumption of the elevator. Apply the solution found in exer-
cise 10.56 and plot these quantities again. Draw your conclusions.

We conclude this section with two tables that summarise some of the major formu-
las and symbols of mechanical systems. We need two tables, because of the rotation
and translation domain. Table 10.2 summarises the formulas and symbols of the
translation domain. The bond graphs of the spring and mass are given with their
preferred causalities. Table 10.2 summarises the formulas and symbols of the rota-
tion domain.
160 CHAPTER 10. REVIEW OF CHAPTERS 1-9

TABLE 10.2 Summary of formulas of the mechanical translation domain


spring: friction: mass:

m
icons
1 1
F= vd t F − f v =0 v= Fdt
R R
equations c m
x = vd t
R
displacement

p = Fdt
R
impuls
F
1 v R
F F F
bond graph 0 v C 0 v R 1 v I

power P =Fv

TABLE 10.3 Summary of formulas of the mechanical rotation domain


spring: friction: inertia:

J
icons
1 1
T= ωd t T −f ω=0 ω= Tdt
R R
equations c m
ϕ = ωd t
R
displacement

p = Tdt
R
impuls
T
1 
R
T T T
bond graph 0  C 0 
R 1  I

power P =Tω

10.3.3 Hydraulic Systems


Hydraulic systems, and especially the (leaking) water tank, were used as examples
of dynamical systems in the first chapters. A water tank is probably the most in-
tuitive example of an integrator and of dynamic systems in general. On the other
hand the effect of water hammer is probably the least intuitive analogon of the me-
chanical mass or inertia and the electrical inductance. Table 10.4 summarises the
formulas of the hydraulic domain. The icons are left out, because they appear in
many different forms. Also the equations of practical hydraulic systems are much
more complex than the basic equations given here.
10.3. PHYSICAL DOMAINS 161

TABLE 10.4 Summary of the basic formulas of the hydraulic domain


tank: resistance: inertia:
1
p= ϕd t p −rϕ = 0 ϕ = 1I pd t
R R
equations c
V = ϕd t
R
volume

Γ = pd t
R
hydraulic inertance
power P = pϕ

10.3.4 Thermal Systems


In the end, all energy dissipated in e.g. a resistor or in friction, is converted into
thermal energy. The thermal domain differs from the other domains considered
so far. Electrical and mechanical systems have a reference that can be arbitrarily
chosen. The thermal domain, however, has an absolute reference equal to 0K ≈
−273◦ C. By using proper power-conjugated variables, we could couple thermal sys-
tems to mechanical and electrical systems. But this leads to more complex and less
intuitive equations. Such a treatment is outside the scope of this course. It is the
field of thermodynamics.
We are able to describe thermal systems in a much simpler way, when we con-
sider the temperature, T , as an analogon for voltage and force (the effort variable).
Buffered heat Q is then analogous to electrical charge or the change in length of a
spring x. Temperature differences lead to a heat flow f = dQ/d t , the analogon of
electrical current or mechanical velocity (the flow variable). But f = dQ/ dt also
happens to represent the thermal power! In contrast to the other domains, with
these definitions of effort and flow, the product e f does not represent power in the
thermal domain. Effort and flow are thus no longer power-conjugated variables.
Still we can use them, even in a bond-graph context, as long as we only consider
the thermal domain. The bonds are no longer power bonds. The thermal effort and conjugated
flow variable are just conjugated variables. This leads to the equations of table 10.5. variables

TABLE 10.5 Summary of the basic formulas of the thermal domain


storage: heat resistance:
T = C1 f d t T −r f = 0
R
equations
Q = f dt
R
heat storage
power P=f (P 6= T f )

As an example we consider a domestic central-heating system. In figure 10.36 a


simple sketch of such a central-heating system is given. In figure 10.37 the differ- central-heating
system
ent subsystems are identified and drawn as a relation diagram. At the left we see
the boiler, which produces a constant heat flow. The heat flow is transferred to the
pipes of the central-heating system via a heat exchanger. At the other end of the
pipes we find the radiator, which delivers the heat to the room. The temperature in
162 CHAPTER 10. REVIEW OF CHAPTERS 1-9

the room is determined by the heat flow delivered by the radiator and by the out-
side temperature.

F IGURE 10.36 Simplified central-heating system

F IGURE 10.37 Relation diagram of the central-heating system

We can translate this relation diagram into a bond graph. The heat exchanger, pipes,
radiator and room are all components of the system with a certain temperature.
0-junctions They can be seen as heat buffers. These buffers can be represented by C-elements
represent connected to 0-junctions. Due to temperature differences between the buffers,
temperatures.
there will be heat flows from the warmer to the colder buffers. These heat flows,
1-junctions represented by 1-junctions, are determined by the temperature differences and
represent heat the heat resistance between the buffers. The heat resistance is modelled by an R-
flows.
element. The heat source in the boiler is supposed to deliver a constant heat flow,
which can be modelled by a thermal flow source. Finally the environment is mod-
elled as a constant temperature, and thus as an effort source. In figure 10.38 the
resulting bond graph is superimposed on the relation diagram. In figure 10.39 the
bond graph without the relation diagram is given.
10.3. PHYSICAL DOMAINS 163

Se
R

1
R C R C R C R

Sf 1 0 1 0 1 0 1 0 C

F IGURE 10.38 Relation diagram of the central-heating system with a bond


graph superimposed

Se
R C R C R C R 1 R

Sf 1 0 1 0 1 0 1 0 C

F IGURE 10.39 Bond graph

The chosen parameter values in the simulation of figure 10.40 do not really de-
scribe a realistic central-heating installation, but the signals give a good impression
of the temperatures and heat flows as a function of time. We assume all initial con-
ditions to be equal to zero. The thermal resistances are all equal to 1, except for the
resistance to the environment, which is chosen equal to 10. Also all heat capaci-
tances are chosen equal to 1, with an exception for the room, which has a heating
capacitance of 10. The heat flow from the boiler is chosen as 5 W. As a result of this
heat flow in the steady state the room temperature increases with 5 degrees.
164 CHAPTER 10. REVIEW OF CHAPTERS 1-9

9
heat flow from boiler
6

70
T heat exchanger
40

10

4 heat flow heat exchanger

70
T pipes
40

10

1.5
heat flow pipes
1
0.5
0
70
T radiator
40

10

heat flow radiator


1
0.5
0
0.8
heat flow room
0.4

0
6
T room
3

heat flow to environment


4
2

-1
-3
0 50 100 150 200
time {s}

F IGURE 10.40 Signals in the central-heating system

10.4 Simulation
10.4.1 Preparing models for simulation
Although simulation is not always the ultimate goal of modelling, in many cases
simulations help to get insight in the behaviour of a dynamic system. The whole
10.4. SIMULATION 165

modelling process also helps to gain insight into the problem at hand. On the other
hand, there are situations in which a model is made to realise realistic motions in a
virtual environment, such as training simulators or a game. With tools like 20-sim
the simulation or computation of a model is not much of a problem. All the model
types considered so far (iconic diagrams, bond graphs and block diagrams) can be
used relatively easy as input for the programme. Solving algebraic loops, removing
non-preferred causalities, and so on, is done by the software. In most cases the user
hardly has to be aware of these underlying problems. But we have also seen that
paying attention to these problems, helps to come up with better models. Power-
ful simulation algorithms are able to perform accurate and fast simulations. Being
aware of what can go wrong remains essential in order to prevent that nonsense re-
sults are blindly accepted as the correct outcome. The situation is different when
you need the simulation code for an application outside a standard simulation pro-
gramme, as part of your own code. Automatic code generation is one possible solu- 20-sim provides
tion. Deriving the necessary formulas yourself is another. automatic code
generation.

10.4.2 Deriving equations


Suppose that we start with an IPM and translate it into a bond graph. From a causal
bond graph it is rather straightforward to derive the equations. We have seen that in
various examples in the previous chapters. Probably the most simple way to obtain
the equations, is to let 20-sim do the hard work. Let us consider the bond graph of
figure 10.41, which represents a mass-spring-damper system with a gravity force as
input.

F IGURE 10.41 R damper


Bond graph of a mass-spring-damper system

Se 1 I
F_gravity mass

C spring

In the graph editor, under Model/Show Equations you will find the following code:

static equations: The line numbers


(1) F_gravity\p.e = F_gravity\effort; have been added
here manually.
dynamic equations: They are not
(2) spring\p.f = mass\state / mass\i; visible in the
(3) spring\p.e = spring\state / spring\c; equations
(4) damper\p.e = damper\r * spring\p.f; generated by
(5) mass\p.e = (u0\p.e - damper\p.e) - spring\p.e; 20-sim.

system equations:
(6) mass\state = int (mass\p.e, mass\state_initial);
(7) spring\state = int (spring\p.f, spring\state_initial);
166 CHAPTER 10. REVIEW OF CHAPTERS 1-9

We can translate these equations with some minor efforts into simplified equations
directly suitable as programming code:

// static equations:
(1) F_gravity = constant;
mass_state = 0; // sets the initial condition for the mass
spring_state = 0; // sets the initial condition for the spring

// dynamic equations:
(2) spring_v = mass_state/ mass;
(3) spring_force = spring_state / compliance;
(4) damper_force = friction * spring_v
(5) mass_force=F_gravity - damper_force - spring_force;

// system equations:
(6) mass_state = mass_state + T*mass_force;
(7) spring_state = spring_state+T*spring_v;

Exercise 10.60
Check the correctness of these programme lines. Check also that the equations are or-
dered in such a way that only previous values of the variables are used.

When we do the same for the IPM of this system we get some extra equations, which
after some manipulations lead to the same result. This second-order system can
also be drawn as a block diagram (figure 10.42).

force
 1 v
 x
m
Constant
f

1
c

F IGURE 10.42 Block diagram of a second-order system

From this block diagram we can easily derive the simulation equations manually:

F_gravity = constant;
mass_state = 0;
spring_state = 0;

v = mass_state/m;
force = (F_gravity - spring_state/c -f*v ;

mass_state = mass_state + T*force;


spring_state = spring_state + T*v;
10.5. TO CONCLUDE 167

10.5 To conclude
In this chapter we have reviewed the results of the previous chapters. We reconsid-
ered models in the mechanical and electrical domain and combined these mod-
els into complete multi-domain systems. We introduced the thermal domain and
introduced temperature and heat flow as effort and flow variables. These two vari-
ables are not power conjugated. Therefore, these thermal models cannot be mixed
with the models of the electrical and mechanical domain. As long as we only con-
sider thermal models there is no problem.
We also considered three options for the generation of simulation code: from
(causal) bond graphs, from block diagrams and by using the automatically gener-
ated equations of 20-sim.
168 CHAPTER 10. REVIEW OF CHAPTERS 1-9
11
Feedback is present in many dynamical systems.
We see feedback mechanisms in our body, in the
environment, as well as in social and technical
systems.

Feedback Control Systems

After studying this chapter you are expected to:

– be able to recognise feedback loops in dynamical systems


– know the positive effects of feedback
– know the risk of instability due to feedback
– be able to design a simple feedback system

11.1 Introduction
In the previous chapters we have already seen many examples of feedback systems.
One of the first examples was the water clock in Chapter 1. Here a feedback mecha-
nism took care of control of the water level in the tank. In most cases feedback was control
present as an inherent system property. When we modelled a box of wine, emp-
tying in a glass, the wine flow was dependent on the pressure near the outlet and
thus on the volume of wine in the box. Because the volume of wine in the box is in-
fluenced by the flow of wine out of the box, a feedback loop is present. Therefore,
we can model the box of wine with an open outlet, as an integrator with feedback
(figure 11.1, see also figure 2.6). Or, in other words, as a leaking integrator. Because leaking
integrator
this outlet was not purposefully designed as a feedback mechanism, mostly it is not
recognised as such.

tank

leakage

F IGURE 11.1 A wine box modelled as a leaking water tank

169
170 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

The same holds for the system of heating a room with a heater without a ther-
mostat. When there would be no losses and there is a constant heat flow into the
room, the temperature in the room would go to infinity. In practice there will al-
ways be heat losses to the environment. When the heat flow due to losses is equal
to the incoming heat flow, the temperature goes to a constant value. The heat de-
livered to the room is then in equilibrium with the heat leaking to the environment.
The outgoing heat flow is determined by the difference between the temperature
inside and outside and the heat resistance of the walls. The latter is determined
by, among others, the amount of insulation. This is again a feedback mechanism,
because the temperature on its turn depends on this outgoing heat flow. There is,
however, no guarantee that a desired temperature will ever be reached. In order to
controller control the temperature a controller, in the form of a thermostat, is needed. This
leads to an explicit feedback loop. The incoming heat flow is not constant anymore
but depends on the difference between the desired and the actual room tempera-
ture. This situation is illustrated in figure 11.2. In this case there are two feedback
loops: one due to temperature-dependent heat leakage to the environment and a
second one because of the control loop, needed to realise a desired temperature.

room
desired room
temperature temperature
Thermostat  1 c
controller
outside
temperature
1 r
insulation

F IGURE 11.2 Central-heating system with two feedback loops:


- due to heat leakage to the environment
- because of the control loop

The examples of the wine box and the room temperature are examples of systems
with a negative feedback. When all the gains in the blocks are positive, the nega-
tive signs at the summers indicate that the overall gain in the loop is negative. We
have also seen examples of positive feedback: the growth of rabbits due to the birth
rate or a bank account as a result of the interest. Another example is an economic
system with a constant percentage of annual growth.
In the dynamical systems considered here, integrators (or the discrete equiva-
lent, summers) are always present. Therefore, we will start with considering the ba-
sic properties of systems consisting of an integrator, and an integrator with negative
and positive feedback. In figure 11.3.a the time response of an integrator without an
input signal, but with an initial condition at t = 0 is shown. This is a constant sig-
nal. An example of this situation is a wine box: if no wine is taken from the box, the
volume of wine remains constant.
11.1. INTRODUCTION 171

F IGURE 11.3
a) Integrator with initial 
condition: constant output

b) Integrator with initial condition and 


negative feedback: first-order
response 1/

c) Integrator with initial condition and


positive feedback: exponential growth

In figure 11.3.b the integrator is part of a negative feedback loop. This situation
models the wine box when the tap is open. The box is emptied with the transient transient
response of a first-order system. The volume (V ) is described by V (t ) = V (0)e −t /τ .

Exercise 11.61
Give other examples of such a system.

Finally we consider the situation of the bank account. A bank account can be mod-
elled as an integrator with positive feedback. We see in figure 11.3.c that the output
of the integrator shows exponential growth. The balance (B ) of the bank account is
described by B (t ) = B (0)e K t , or if K = 1/τ: B (t ) = B (0)e t /τ .
Figure 11.3 shows all the possible transients in the case that there is no input sig-
nal. In figure 11.4 we consider the situation that there is an input signal, while the
initial condition of the integrator is zero. In the case of a constant input signal (fig-
ure 11.4.a) the output (y) of the integrator is a so-called ramp signal: y(t ) = t . This ramp signal
siuation is comparable with filling a non-leaking water tank with a constant flow of
water. Finally, figure 11.4b shows the situation of an integrator with a constant in-
put signal and a negative feedback. This situation is comparable with heating up a
room with a constant heat flow. The negative feedback represents the heat leakage
to the environment. Another example is a water tank with a constant incoming flow
and a (small) hole at the bottom.
172 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

F IGURE 11.4 u=1


a) Integrator with constant input; 
output signal: ramp

b) Integrator with negative u=1


feedback and constant input: 
output signal: first-order response
1/

Exercise 11.62
We did not provide a plot of an integrator with constant input and positive feedback. Be-
cause of the scaling this would produce a plot like in figure 11.3.c. Describe what this
situation would mean in the case of a bank account.

We see in these simple systems that, at least for first-order systems, negative feed-
back leads to a stable (constant) steady-state situation. An ideal integrator without
feedback has a constant output, or when there is a constant input signal, an out-
put that increases proportional with time. Positive feedback leads to an unstable
system: the output grows exponentially as a function of time.
In the rest of this chapter we will first discuss examples of dynamical systems
where feedback is present in a natural way. Next we will consider some simple con-
trol systems. These are systems where explicit measures are taken to keep certain
quantities in a system at a desired value.

11.2 Feedback as a property of the system


We have already seen many examples of systems, which could be described by one
or more integrators or summers with a feedback mechanism. They range from the
populations of foxes and rabbits (a prey-predator system), the pig cycle (an eco-
nomical system) to a car (a mechanical system, where the air and roll resistance
perform the feedback). Mass-spring-damper systems were examples of second-
order systems with inherent feedback loops.

11.2.1 Biological and environmental systems


In all living creatures, feedback mechanisms are present. Often these mechanisms
perform a certain control task. An example is the temperature control system of
the human body. When people exercise hard, the body heats up, due to the activ-
ities of the muscles. Cooling is provided by the evaporation of sweat and by an in-
creased blood circulation in the skin (red skin). On the other hand when getting too
cold, shivering is a result of muscle activities, started to warm up the body. Ghoose
bumps, or chicken skin, has no effect for modern humans. For animals covered
with hair or fur, the effect is to erect the hairs and so create an insulation layer. In
11.2. FEEDBACK AS A PROPERTY OF THE SYSTEM 173

biological systems mostly more than one mechanism is present to control certain
variables. In the case of temperature control muscles produce heat while sweat is
the main cooling mechanism. As a result in human beings the temperature is rather
accurately controlled around 37 ◦ C. In the case of fever another control mechanism
raises the setpoint up to 39 or 40 ◦ C. The purpose is to kill the virus, which caused setpoint: the
the disease. In the case of flu it is thus better to have a few days of fever rather than desired value of
the body
suppressing the fever with pills. However, if the temperature would increase be- temperature
yond 40◦ C the patient is in danger, because the proteins in the body will coagulate.
Therefore, it is important that the temperature is accurately controlled within cer-
tain bounds.
Another control mechanism in the human body is the opening of the iris in the
eye. This is similar to the automatic diaphragm control in a photo or video camera.
When its getting darker, the eye iris opens wider and more light is falling at the light
sensitive part of the eye, the retina.

Exercise 11.63
Opening and closing of the iris is a fast process. A much slower process is the dark adap-
tation. Explain the difference between the two mechanisms. Which setting in a (not too
simple) digital photo camera is comparable with dark adaptation? Which, mostly auto-
matic, control function in a digital photo camera is comparable with the control of the iris
opening?

The present discussion about the climate is in fact a discussion about understand-
ing feedback mechanisms in a model of the climate of the earth. The atmosphere is
heated up by the radiation of the sun. The theory is that CO2 emissions will have an
insulating effect on the earth atmosphere. This could lead to less heat losses from
the atmosphere to the outer space: the greenhouse effect. But there is another the-
ory that suggests that due to extra CO2 in the atmosphere less radiation of the sun
will heat up the earth and as a result the opposite could be true. Also the present
reduced solar activity could lead to a new ice age. It is well possible that there are
other factors influencing the average temperatures. We have seen large fluctuations
in history, when there was still minor human intervention. Because of the timescale
of these temperature variations only centuries later it will be possible to see what
the outcome of these effects has been. And it may even remain questionable if one
of these models is valid indeed.

Exercise 11.64
Draw a causal relation diagram of these effects under the assumption that the CO2 con-
centration in the atmosphere has both influences.
174 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

11.3 Feedback as a tool for changing a system’s behaviour


We have already seen several examples of the use of feedback as a basis of a con-
trol system. In chapter 1 we saw, for instance, a level control system. The level was
controlled by means of a control system consisting of the following ‘elements’:

- a device to measure the height of water in the tank

- a reference (the desired height), realised by the construction of the floater

- a valve mechanism to open and close the water inlet

This system can be represented by the block diagram of figure 11.5. In this case all
the elementary functions are performed by one single component, the floater.

R F  h
valve 
floater

measuring
device

F IGURE 11.5 Block diagram of the water level control system of chapter 1

Because of the buoyancy of the floater, a force, F , is generated, representing the


difference between the reference, R, and the height of water, h, in the tank. This
force enables the floater to act as a valve, which controls the incoming water flow ϕ.
A more generalised version of the block diagram of figure 11.5 is given in fig-
ure 11.6. This structure can be recognised in all feedback-control systems.

R + E U C
controller actuator process
_

sensor

F IGURE 11.6 Block diagram of a control system

controlled In figure 11.6 the variable C is the Controlled variable, e.g. the amount of water in a
variable
tank, the temperature in a room or in the human body, or the speed or position of
reference a motor. The Reference R is the desired value for C . The value of C is measured by
sensor means of a sensor. The difference between R and the measured value –the output of
error signal the sensor– is the Error signal E . The latter is the input of a controller. The output
of the controller is indicated with the signal U . The controller can be hidden as a
11.3. FEEDBACK AS A TOOL FOR CHANGING A SYSTEM’S BEHAVIOUR 175

part of a mechanical device like the floater, but generally it is an electronic device.
Modern controllers are often realised with microprocessors. Because the controller
output of such a device is a signal, an actuator is needed to give this signal enough actuator
power to influence the process. In order to make the controlled variable C equal to
R, the transfer function of the sensor must be 1.
Control systems are omnipresent in our modern society. They range from all
kinds of thermostats (to control the temperature of rooms, ovens, refrigerators, etc.)
to cruise control systems in a car and autofocus systems in a photo or video cam-
era. Human beings are in many cases well able to perform control tasks. Driving a
bicycle or a car is just one example.
Example
As an example, we consider the baking of a cake. At least two control processes are
involved. The temperature in the oven is likely to be automatically controlled by
means of a thermostat. But the setpoint of the oven temperature and the duration
of the baking process is mostly the result of a human control action. Based upon
the instructions in the cooking book, a temperature and duration can be set be-
forehand. We refer to such actions as feed-forward control: the real condition of the feed-forward
control
cake at the end of the baking process has no influence on the actual duration of the
baking process nor on the actual temperature in the oven. Both are based only on
the instructions in the cooking book. Temperature and duration of the baking pro-
cess are completely determined by what an ideal oven and standard baking mix is
expected to do.
When the cake is almost ready, its condition can be measured by putting a nee-
dle in the cake (to see if it is still wet) and by observing the color of the cake. If the
cake is still ‘a bit pale’ and the needle is still ‘a bit wet’, the cake may need ‘a little bit
more time’ in the oven at a ‘slightly higher temperature’. If the cake is still ‘very wet’,
it may need a ‘much longer time’ in the oven. The notions: a bit pale, a bit wet, a
little bit more time, slightly higher temperature, very wet and much longer are fuzzy
observations and fuzzy actions. We call the resulting controller a fuzzy controller. fuzzy control
Although the whole process seems rather fuzzy, the result is generally a well tasting
and good looking cake, although some experiments may be necessary to translate
these fuzzy notions into more quantitative data resulting in exact timings and tem-
perature setpoints.
Fuzzy control is not only a result of human control actions. Fuzzy controllers
have also successfully been applied in technical systems, such as in auto-focussing
systems of cameras and in washing machines.

In order to give a more exact description of a control system, we consider the ap-
proach of a bicycle or car at a traffic light. When the traffic light goes from green to
red, it is desired to come to a stand still at the stopping line. This can be seen as a
position control system. Far away from the traffic light the propulsion force should
be large. Closer to the stopping line less propulsion is needed and the propulsion
force should be zero when we are at the stopping line. When we would cross the
stopping line, a negative propulsion force is required. The propulsion force primar-
176 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

ily depends on the distance to the stopping line. In other words, it is proportional to
the error between the desired position, say x 0 = 0 and the actual position x(t ), the
distance to the stopping line. Such a control action is called proportional control:
the control action u is proportional with the error e = x(t ) − x 0 .

u = Kp e (11.1)
proportional The gain K p is called the proportional gain and the controller a proportional con-
control
troller. As long as K p is relatively small, the result will be OK. But for a more ‘agres-
sive’ driver, such a control may not work. More aggressive driving implies that the
driver maintains a higher speed until close to the stopping line. Without taking the
overshoot actual velocity into account, this will result in an overshoot because of the dynamics
of the car. An overshoot means that the car crosses the stopping line, before coming
to a stand still at the desired position. The propulsion force should thus also be ve-
locity dependent. Because the velocity v is the derivative of x, such a control action
derivative is also called derivative control. A controller, which combines proportional (P) and
control
derivative (D) control is called a PD-controller.
A simple model clarifies this further. When we assume that the controller is able
to realise both accelerating and decelerating actions, we can describe the control
system of a stopping car with the block diagram of figure 11.7. In this block diagram
f represents the friction of the air and the roll resistance. We assume that our ob-
servations start 10m before the stopping line.

v x
Kp  
ref = 0

controller f car

F IGURE 11.7 Control system with a P-controller

The results of a multirun simulation for 0.5 < K p < 5 are given in figure 11.8. In all
cases there is an overshoot, for K p = 5 even of 50%. Therefore, we extend the system
to a PD-controlled system (figure 11.9).
11.3. FEEDBACK AS A TOOL FOR CHANGING A SYSTEM’S BEHAVIOUR 177

distance x
10

5
0,5 < K p < 5

-5

0 2 4 6 8 10 12 14
time {s}

F IGURE 11.8 Responses of control system with a P-controller (0.5 < K p < 5)

Kp  
ref = 0 v x

f
Kd
controller car

F IGURE 11.9 Control system with a PD-controller

The effect of the derivative action (or velocity feedback) is clearly visible in fig-
ure 11.10. With a proportional controller only, a response without overshoot is ob-
tained with K p = 0.3. When we increase K p to the value 5, there is a large overshoot.
When we keep the value K p = 5 and tune K d to the value 3, we see fast stopping
without overshoot. If the capacity of the brakes would allow, we could further in-
crease K p and K d and achieve even faster braking. With a proper ratio between K p
and K d , this can be achieved with a similar (but faster) response. The art of tuning
the parameters of a controller is the field of control engineering. Here we can only control
engineering
178 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

consider some of the basic principles of control engineering.

distance x
10

K p = 0.3
Kd = 0

5
Kp = 5
Kd = 3

Kp = 5
Kd = 0
-5

0 2 4 6 8 10 12 14
time {s}

F IGURE 11.10 Responses of a control system with a PD-controller


(K p = 0.3, K d = 0; K p = 5, K d = 0 and K p = 5, K d = 3)

Exercise 11.65
Explain why the rest of the response (t > 1.8) for K p = 5, K d = 0 is in general not realistic
for the example of a stopping car.

Most fuzzy controllers are in fact also PD-controllers. The human control actions for
braking a bicycle or a car can also be expressed in such fuzzy, linguistic terms. Examples
of fuzzy rules are:

– if the distance to the stopping line is large and the speed is not high,
then brake a little bit
– if the distance to the stopping line is large and the speed is high,
then brake moderately
– if the distance to the stopping line is small and the speed is very high,
then brake as hard as you can
– etcetera
11.4. BASIC PROPERTIES OF FEEDBACK SYSTEMS 179

11.4 Basic properties of feedback systems


After these qualitative observations it is time to do some computations in order to
determine the basic properties of feedback systems. We have already seen that we
can influence the behaviour of a system with feedback (control). We can, for in-
stance, keep the level of water in a tank at a constant value or control how a vehicle
comes to a stand still at a traffic light. But how do the different controller and pro-
cess parameters effect the final value of the water level or the transient behaviour of
the distance from the stopping line of the vehicle?
Let us first consider a feedback system with only gain elements (figure 11.11). We could see K 2
as the sensor and
F IGURE 11.11 K 1 as the
R E C
K1 combination of
Static feedback system controller,
actuator and
process. See
K2 figure 11.6

We have seen such a system before as an example of an algebraic loop (figure 9.22).
We can compute the transfer function C /R as follows.

C = K 1 R − K 1 K 2C (11.2)

(1 + K 1 K 2 )C = K 1 R (11.3)

C K1
= (11.4)
R (1 + K 1 K 2 )
When we make K 1 very large:

C K1 1
≈ = . (11.5)
R K1K2 K2

In order to make C equal to R and thus C /R = 1 we must choose K 2 = 1 while K 1


should be very large. That a large value of K 1 is desired also follows from the equa-
tions for the error signal:

E = R − K1K2E (11.6)

(1 + K 1 K 2 )E = R (11.7)

E 1
= (11.8)
R (1 + K 1 K 2 )
180 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

When we make K 1 very large:

E 1
≈ ≈ 0. (11.9)
R K1K2

From figure 11.11 it can be deduced that a large value of K 1 will help to make the
error signal, E , small. (We saw this also in figure 11.10. The larger K p , the faster
the response and the quicker the error goes to zero —at least if we also take care
for proper damping.) If the goal is indeed to let E go to zero, K 1 cannot be large
enough. In the ideal case K 1 → ∞. As long as K 1 is large enough, the value of K 1
is completely irrelevant.
Similar conclusions can be drawn when we add an extra gain K 3 at the input of
the system (figure 11.11 ).

F IGURE 11.12 R E C
K3 K1
Static feedback system with gain
at the input
K2

Exercise 11.66
Show that in this case the wish to make C /R = 1 implies that K 1 → ∞ and K 3 = K 2 .

11.4.1 Feedback of first-order systems


After the static feedback system, we consider a first-order system, e.g. a simplified
version of the temperature control of a room. Let the room be described by the
transfer function (eq. 11.10) from the incoming heat flow (Q in ) to the room tem-
perature (T ).

T K
= (11.10)
Q in sτ + 1

E T
Kp K 1/ 
Tref = 20 °C

controller room

F IGURE 11.13 Room control system with a P-controller

When we add a proportional controller, this yields the block diagram of figure 11.13.
We assume that the sensor has a transfer function 1. In that case it can be left out
11.4. BASIC PROPERTIES OF FEEDBACK SYSTEMS 181

of the diagram. In practice, the parameters of the room cannot easily be changed.
Therefore, we investigate the influence of the gain in the forward path, by varying
the controller gain K p . We simulate this system in a multirun simulation with 1 <
K p < 10. The other parameters K and τ are selected 1. Considering the timescales of
the heating process, this implies that 1s in the simulation corresponds with 1 hour
in real time. The results are given in figure 11.14. We observe that with a low gain
the response is slow and the final value is only 10◦ C, instead of the desired 20◦ C.
With K p = 10 the final value is more close to 20◦ C, but the error is still larger than
zero.
20
Kp=10

10

Kp=1 room temperature

0
0 0.5 1 1.5 2

F IGURE 11.14 Responses with a P-controller (1 < K p < 10)

Exercise 11.67
Simulate this system and verify that the gain cannot be large enough. The higher the gain,
the better the desired temperature is reached and the faster the response. Explain also
why the simulation for very high gains is not realistic anymore.
Hint: plot also the output of the controller and ask yourself what this signal represents in
a heating system.

This can be explained as follows. Because there is a permanent heat leakage to the
outside world, the control system must take care that there is a constant incom-
ing heat flow in the steady state. This implies that the output of the proportional
controller must always be greater than zero. And this can only be true if there is an
error greater than zero!
We can also perform some computations, which further clarify our observations.
We compute the transfer function of the complete feedback system.

K
Kp
T sτ + 1
= (11.11)
Tref K
1 + Kp
sτ + 1
This can be written as
182 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

T Kp K
= (11.12)
Tref sτ + 1 + K p K
or

Kp K
T 1 + Kp K
= τ (11.13)
Tref s +1
1 + Kp K
or

T K fb Kp K τ
= with K fb = , and τfb = (11.14)
Tref sτfb + 1 1 + Kp K 1 + Kp K

The feedback system thus has a gain equal to K fb and a time constant τfb . The time
constant is equal to the original time constant divided by 1 + K p K . The gain, K fb is
always smaller than 1.

– With K = 1 and K p = 1, K fb = 0.5 and τfb = τ/2


– With K = 1 and K p = 10, K fb = 10/11 and τfb = τ/11.

This corresponds with the observations in figure 11.14.


Without a proof or further discussion we give here a rule to compute the steady-
steady-state state output value of a transfer function with a constant input. The steady-state (t →
value
∞) value of a transfer function is given by setting s = 0 in the transfer function. In
the example of eq. 11.12 or eq. 11.13 we see immediately that:

Kp K
 

T Kp K  1+K K  Kp K
· ¸
p
lim = = = (11.15)
 
t →∞ Tref sτ + 1 + K p K s=0  s τ 
1 + Kp K
+1
1 + Kp K
s=0

The steady-state value of the room temperature is thus

Kp K
T= Tref = K fb Tref (11.16)
1 + Kp K
If we want a zero error we have two choices. Either we increase the gain to a very
large value (in fact we need a gain going to infinity) or we add an element, which is
able to produce an output not equal to zero when its input is zero. Such an element
is an integrator. This leads to the block diagram of figure 11.15. A controller with a
PI-controller proportional and integral control action is called a PI-controller.
11.4. BASIC PROPERTIES OF FEEDBACK SYSTEMS 183

E T
Kp K 1/ 
Tref = 20 °C
Ki 
controller room

F IGURE 11.15 Room control system with a PI-controller

Exercise 11.68
Simulate the system with a PI-controller and find parameter values for K p and K i that give
a ‘nice’ response.

11.4.2 Feedback of second-order systems


By adding the integrator the system becomes a second-order system. Probably you
have noticed already in the experiments in exercise 11.68 that (especially) when the
integral gain is chosen high, the system gets an oscillatory response. This is obvi-
ously an undesirable behaviour for a central-heating system (and most other sys-
tems).

Exercise 11.69
If you did not yet observe an oscillatory behaviour, increase the integral gain to (very) high
values.

From these experiments we can conclude that a second-order system with a high
gain in the feedback loop, may show an undesirable behaviour in the form of over- overshoot
shoot or an oscillatory transient behaviour. Like in the case of the first-order sys-
tem, increasing the gain, makes the response faster. Because of the presence of an
integrator in the controller, for step-shaped input signals accuracy is not the issue
anymore.
We get another example of a second-order system when we extend the model
of the central-heating system, with the dynamics of the radiator. In its most simple
form the radiator can be modelled as a first-order system with e.g. a time constant
10 times smaller than the time constant of the room. A proportional control system
for this still (over)simplified model is given in figure 11.16.
184 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

E T
Kp 10/  1/ 
Tref = 20 °C

controller radiator room

F IGURE 11.16 Second-order room control system with a P-controller

When we simulate this system (figure 11.17), our earlier observations are confirmed
here:

- because there is no integrator in the feedback loop, there is a steady-state


error

- the error becomes smaller and the response faster when the controller gain is
increased

- for higher controller gains the system gets an overshoot and for very high
gains an oscillatory response.

30
Kp =100
room temperature

20

Kp =10

10

Kp =1

0
0 0.5 1 1.5 2
time {s}

F IGURE 11.17 Responses with a P-controller (1 < K p < 100)


11.4. BASIC PROPERTIES OF FEEDBACK SYSTEMS 185

11.4.3 Feedback of third-order systems


In order to eliminate the steady-state error we can add the I-action again (figure 11.18).
Because there are now 3 integrators, this is a third-order system.

E T
Kp 10/  1/ 
Tref = 20 °C
 Ki radiator
controller room

F IGURE 11.18 Third-order control system with a PI-controller

Exercise 11.70
Simulate the system with the PI-controller and adjust the parameters. Play with the pa-
rameters and try to get a response that is fast and shows no overshoot.

You will see that it is now more difficult to get a reasonable response. When the pa-
rameters are increased, this rapidly results in an unstable system. unstable system
From these examples of first-, second- and third-order systems we see that for a
first-order system the gain can be made as large as desired, without a risk of over-
shoot or instability. Second-order systems do not become unstable, but for a higher
gain the response becomes oscillatory. Third- and higher-order systems can be-
come unstable for higher gains. We sometimes want high gains in order to reduce
the steady-state error, i.e. the error between the reference value and the controlled
value. And what holds for reference changes also holds for disturbances at the out-
put of the system: high gains (or a pure integrator) in the feedback loop reduce the
influence of such disturbances. The art of designing control systems is to find a
compromise between a gain high enough to guarantee a small error and a quick
transient and a well damped stable system.
To fully understand feedback control systems a more extensive treatment of such
systems is needed. But this is beyond the scope of this course. Therefore we will
finalise this chapter with a short treatment of one of the most popular controllers, a
PID controller. Finally we will show that feedback cannot only result in an unstable
system, but that feedback can also be used to stabilise unstable systems.

11.4.4 PID-control
We have seen that in many cases proportional control does not suffice for obtain-
ing a well-damped response and a small steady-state error. In the example of the
stopping car we observed a need to use velocity feedback to realise a fast and well-
damped response. We argued that velocity feedback is equivalent with using a
derivative of the error signal in the controller. In the example of the central-heating
systems we observed a need to add an integrator in the controller in order to get
186 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

a steady-state error equal to zero. There is no reason why we cannot combine the
three control actions, proportional, derivative and integral control in one controller.
PID-controller When we do this we get a PID-controller. The PID-controller is the most widely
used controller, because it is able to realise reasonable to good control for a wide
range of systems.
Let us here consider the use of a PID controller for the room control system.
When the number of controller settings increase, tuning becomes more difficult.
Systematic tuning of controllers is the field of control engineering. Here we will use
optimum the optimisation feature of 20-sim to find an optimum controller. We consider the
controller
system of figure 11.19.

d/dt

Kd

E T
Kp 10/  1/ 
Tref = 20 °C
Ki
radiator room


controller

F IGURE 11.19 Third-order control system with a PID-controller

We want the error signal to decrease as quickly as possible, and we want no over-
shoot and of course no instability. This can be expressed by a criterion, J , in the
form of the integral from t = 0 to t = t end of the squared error:
Z t end
J= e 2 dt (11.17)
t =0

Exercise 11.71
Why do we use e 2 and not e. Could you think of other suitable candidates?

Minimising this criterion by varying the parameters K p , K d and K i leads to a cer-


tain ratio between these parameters, but when we leave all parameters free, the
response would become infinitely fast and the parameters infinitely large. Although
this minimises the criterion, it is not a realistic solution. Therefore we limit K p to
the maximum value of 100. In that case optimisation leads to the response with a
small (20%) overshoot of figure 11.20.
We can limit the overshoot by punishing variations in e. This leads to the criterion

t end µ µ ¶2 ¶
de
Z
2
J= e +λ dt (11.18)
t =0 dt
11.4. BASIC PROPERTIES OF FEEDBACK SYSTEMS 187

room temperature
criterion = e 2 dt

20

criterion = e2 +  (de/dt)2 )dt


10

0
0 0.5 1 1.5 2
time {s}

F IGURE 11.20 Response of room control system with ‘optimal’


PID-controllers

When we select λ = 0.02 we get the slower response without overshoot. When we
select λ = 0.001 we get the dashed plot. Instead of tuning three parameters, the op-
timisation enables us to select between different responses by adjusting only one
parameter. Because all responses were obtained by means of optimisation, all re-
sponses are optimal responses. We cannot say that one response is ‘more optimal’
than the other. This is complete nonsense, like saying more best. When we change
the criterion we just find another optimum. Probably we prefer the dotted response
most, because this is a fast response, almost without overshoot. But this selection is
then based on yet another (vague and not explicitly formulated) criterion.
Instead of ‘punishing’ the derivative of e, we could also ‘punish’ the controller
output u. Because the latter corresponds with the power at the output of the actua-
tor, needed to control the system, this is a choice that makes sense. This leads to the
criterion:
Z t end ¡
J= e 2 + λu 2 dt (11.19)
¢
t =0

Exercise 11.72
Perform this optimisation and show responses for various values of λ.

11.4.5 Control of unstable systems


We have seen that feedback can help to control the output of a system, either by
keeping the output at a desired constant value (like the body-temperature control
system or in a central-heating system) or by bringing this output from one value
188 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

to the other with a desired response. Systems specially designed to keep the out-
regulator systems put at a constant value, even if there are disturbances, are called regulator systems.
Systems designed with the primary goal to bring the output value from one value
servo systems to the other are called servo systems. We have also seen that feedback applied to
higher-order systems may lead to instability. On the other hand, feedback may
also be used to make unstable systems stable. An example of an unstable system
that can be stabilised by means of a control system is the Segway (figure 1.6). In fig-
ure 11.21 the Segway is modelled as a balancing stick.


F = mg sin()

F = mg

F IGURE 11.21 Segway modelled as a balancing stick

To simplify the analysis we assume that the mass, m, of the stick is concentrated in
the centre of gravity of the stick. When the stick is perfectly upright, there is a grav-
ity force (F = mg ) completely parallel to the stick. This is an equilibrium, but it is an
unstable equilibrium. When the stick is not perfectly upright there is a component
of the gravity force perpendicular to the stick, which makes the stick fall down. This
force can be written as

F = mg sin(ϕ) (11.20)
This force increases when ϕ increases and reaches its maximum value for ϕ = 90◦ . If
there are no forces to compensate for this component of the gravity force, the stick
will further fall down and become a pendulum. Because of friction this pendulum
will finally reach a new (stable) equilibrium, upside down (figure 11.22) at an angle
of π radians (180◦ ).
11.4. BASIC PROPERTIES OF FEEDBACK SYSTEMS 189

Balancing stick: stable equilibrium


0
phi

-1

-2

-3
−π

-4

-5
0 5 10 15 20 25 30 35 40
time {s}

F IGURE 11.22 Balancing stick, falling to a stable equilibrium (ϕ(0) = −0.2)

The simulation of figure 11.22 was made with a simplified model of the system. We
assumed that the centre of gravity of the stick is exactly in the middle of the stick
with length l and that the mass is homogeneously distributed over the stick. In that
case we can find that the moment of inertia of the stick is

ml 2 Deriving this
J= (11.21) formula is out of
3 the scope of this
book.
The force acting on this centre of gravity (according to eq. 11.20) yields a torque in
the centre of gravity of

l
T = mg sin(ϕ) (11.22)
2
This torque results in an angular velocity, described by:

dϕ 1
Z
ω= = T dt (11.23)
dt J
and an angle ϕ
Z
ϕ= ω dt (11.24)

These equations can be represented by the block diagram of figure 11.23. Note that
the feedback of the angle is a positive feedback. This is why the system is unstable.
For small angles sin ϕ can be approximated by ϕ (in radians). This implies that
when we apply a feedback loop with a gain larger than mg 2l , we obtain again a neg-
ative feedback and thus a stable system.
190 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

mgl/2 sin

 
1/J  
_

F IGURE 11.23 Block diagram of the balancing stick without control

Exercise 11.73
Extend the block diagram of figure 11.23 with a sufficiently large negative feedback and
show that the system can now be stabilised.

This shows how feedback can help to stabilise an unstable system, but it does not
yet explain why you can go forward with a Segway. It is nice that you can stay on it
without falling, but it is not yet a vehicle.

Exercise 11.74
What is needed to make a vehicle able to ride forward?

11.5 Conclusion
In this chapter we have seen several examples of feedback systems. We will con-
clude this chapter by summarising some conclusions.
First-order systems can be controlled with a small error by choosing a propor-
tional controller with a high gain. The higher the gain, the faster the response and
the smaller the error. An example of such a system is a speed control system of a
DC-motor. The transfer from the motor current to the angular velocity, ω, can be
described by the first-order transfer function

ω K
= (11.25)
i sτ + 1
With a proportional controller the velocity-controlled motor can be represented by
the block diagram of figure 11.24.
The transfer function of the controlled system is

Kp K
C sτ + 1 = Kp K
= (11.26)
R Kp K sτ + 1 + K p K
1+
sτ + 1
11.5. CONCLUSION 191

R K C
Kp
s +1

F IGURE 11.24 DC-motor with speed control

This can be written as

Kp K KL
C 1 + Kp K 1 + KL
= τ = τ (11.27)
R s +1 s +1
1 + Kp K 1 + KL

We call K L the loop gain. The gain of the closed loop system is found with the rule, loop gain
given at page 182 to compute the steady-state value of the transfer function. This
gain is equal to

KL
(11.28)
1 + KL

This implies that for a constant input signal the transfer C /R is getting more and
more close to the desired value 1, when the loop gain, K L , becomes higher (see also
figure 11.14). Simultaneously the system becomes faster, because the time constant
τ is divided by 1 + K L .

A small steady-state error and a fast response can only be obtained by means of a high
controller gain. But this implies applying a large current to the motor. In practice this
current is limited by the power amplifier and by the specifications of the motor. For too
high currents the motor will get too hot and burn.
But within the limits of the capabilities of the power amplifier and the specifications
of the motor, we can change the dynamic properties of a physical system, by means of
feedback. In this case we can make a faster motor.

Next we consider the same motor in a position-control system, i.e. we want the mo-
tor angle to go to a new value. This leads to the block diagram of figure 11.25.

R K  1  C
Kp s
s +1

F IGURE 11.25 DC-motor with position control


192 CHAPTER 11. FEEDBACK CONTROL SYSTEMS

The transfer function can now be written as

Kp K
C s(sτ + 1) Kp K
= = (11.29)
R Kp K s(sτ + 1) + K p K
1+
s(sτ + 1)
This can be written as

C KL
= (11.30)
R s2τ + s + KL

From the rule for the steady-state gain at page 182 it follows that

C KL KL
· ¸
lim = 2 = =1 (11.31)
t →∞ R s τ + s + K L s=0 K L

Because in the steady state C will become equal to R, the error in the steady state
will be equal to zero. We saw before that (for constant input signals) we could ob-
tain a zero steady-state error by using a PI-controller. In the system of figure 11.25,
the transfer function of the motor itself already contains a pure integrator (block
1/s).
Also in this case, choosing a larger value of K p leads to a faster system. We have
seen that for a second-order system a higher gain also leads to larger overshoots
and oscillatory responses (figure 11.17). This could be compensated for by using a
PD-controller, which is more or less equivalent with using feedback of the velocity
signal.
Finally we have seen that feedback can also be used to make an unstable system
stable.
12
Operational amplifiers are basic electronic building
blocks in many electronic systems. They can be
understood with the knowledge about feedback
systems of the former chapter.

Operational amplifiers

After studying this chapter you are expected to:

– understand the basic properties of operational amplifiers


– understand how operational amplifiers can be used as basic electronic building
blocks
– know how operational amplifiers can be used to realise transfer functions

12.1 Introduction
In this chapter we will use the knowledge of feedback systems of the previous chap-
ter to describe an important and useful electronic component, the operational am-
plifier. An operational amplifier can be modelled as a gain K , with the property that
K → ∞. In feedback systems with a very high loop gain, like the one in figure 11.11,
the transfer function of the complete system is determined by the gain in the feed-
back (figure 12.1) only.

F IGURE 12.1 R E C
Feedback system with an _

infinitely high gain in the
forward path
Ko

C K K 1
= lim = = . (12.1)
R K →∞ (1 + K K o ) K K o K o

If K → −∞ figure 12.1 changes into figure 12.2 and eq. 12.1 into eq. 12.2.

C −K −K 1
= lim = =− . (12.2)
R K →∞ (1 + K K o ) K K o Ko

193
194 CHAPTER 12. OPERATIONAL AMPLIFIERS

F IGURE 12.2 R E _ C
K → −∞ ∞

Ko

When we add a gain K i in series with the feedback system, we obtain figure 12.3,
where the transfer function is described by

C Ki
=− . (12.3)
R Ko

F IGURE 12.3 R E _ C
K → −∞ Ki ∞

Ko

An ideal element with an infinitely high gain (or a gain K → −∞) can be very well
approximated by a so-called operational amplifier. Operational Amplifiers, or in
op-amps short op-amps, are important components in many electronic circuits. Because
they are ‘active’ electronic components they make the design of an electronic cir-
An active cuit relatively easy. With op-amps basic transfer functions can be realised, which
component is a can be connected to each other as independent modules. In other words, the be-
component with
an external power haviour of these modules does not depend on the properties of the modules to
supply. which they are connected. This implies that block diagrams, like figure 12.2-figure 12.3
can be directly realised with op-amp circuits.
The description of op-amp circuits completes the introductory treatment of
electrical networks of chapter 6. After chapter 11 we have some basic understand-
ing of the properties of feedback systems, necessary to understand op-amp circuits.
Op-amp circuits are all examples of feedback systems. In addition, they are very
useful components in many electronic circuits. Especially when it comes to inter-
facing of micro computers to the physical world.
Op-amps are available as electronic components in the form of integrated cir-
cuits. Internally they consist of an electronic circuit with several transistors and
electrical elements. To use op-amps it is not necessary to have a deep understand-
ing of the electronics of the op-amp chip. For the rest of this chapter and for most
practical applications, it suffices to consider the op-amp as an ideal amplifier with a
very high gain.
12.2. IDEAL OPERATIONAL AMPLIFIERS 195

12.2 Ideal operational amplifiers


An (ideal) operational amplifier is an amplifier with an infinitely high gain
(K → ∞), an output impedance equal to zero (R out = 0) and an input impedance For the time
that goes to infinity (R in → ∞). An output impedance equal to zero implies that being, impedance
can be read as
the output voltage of an op-amp is that of an ideal voltage source, i.e. a voltage resistance.
source with internal resistance equal to zero. This also implies that when we anal-
yse the transfer function of a certain op-amp in a circuit with operational ampli-
fiers, the circuit behind that amplifier may be disregarded. And because the input
impedance is infinitely large, the same holds for the parts of the circuit at the in-
put side of the amplifier. The op-amp can thus internally be seen as in figure 12.4.
Because the input resistance is infinitely large there is no flow of energy into the op-
amp. At the output side there is a modulated voltage source with a voltage u out =
K u in . Because R out = 0 the output voltage is not influenced by the current through
R out . The ideal op-amp can thus deliver any power required.

F IGURE 12.4
Operational amplifier
(op-amp): +
Rin →∞
ideal model u in
Rout = 0
+
u out = Kuin
_

In electronic circuits with op-amps we mostly use the symbol of figure 12.5.

F IGURE 12.5
Operational amplifier
(standard symbol)

We see that the amplifier has two inputs, a positive input (the non-inverting input) non-inverting
input
and a negative input (the inverting input). This negative input is useful, because it
inverting input
allows for adding passive feedback elements in order to give the op-amp circuit the
desired properties.

Voltage follower

The most simple circuit we can make with an op-amp is given in 12.6.

F IGURE 12.6
Operational amplifier Uout
(voltage follower)
Uin

This circuit is called a voltage follower or emitter follower and is described by the voltage follower
following equations emitter follower
196 CHAPTER 12. OPERATIONAL AMPLIFIERS

Uout = K (Uin −Uout ) (12.4)

K
Uout = Uin (12.5)
1+K
and because K → ∞, it follows that

Uout = Uin (12.6)

This seems to be a rather useless operation, but it is not. Because an op-amp has an
output impedance equal to zero it is in fact an ideal voltage source. And because
modulated the output voltage is determined by the input voltage, it is a modulated voltage
voltage source
source. Like the voltage sources we have seen so far, the op-amp can thus be used
to couple the signal domain (where only information is important) to the power
domain, where we deal with power and thus with two conjugated signals. The fact
that the input impedance is infinitely large, ensures that no current is flowing into
the op-amp. Therefore, the op-amp does not form a load for the rest of the circuit
at its input side. This is, for instance, a useful property in a measurement setup.
When a sensor is connected to the op-amp the output voltage of the sensor is not
The circuit of affected by the op-amp. The voltage follower converts the low power sensor signal
figure 12.6 is in to a more powerful signal. Note that all these properties assume that the op-amp is
fact a realisation
of figure 12.1 ideal. Fortunately, practical op-amps closely approximate the ideal op-amp.
(eq. 12.1) with
K o = 1.
Inverting amplifier

In the following we will consider a number of other useful op-amp circuits. In order
to keep the analysis simple we consider only op-amps where the input and output
are connected (via an impedance) to the inverting input. The + input will conse-
quently be connected to the ground. We start with the circuit of figure 12.7.

F IGURE 12.7
Operational amplifier Ri Ro
(gain) Ui
Uo
Ro
Uo = − Ui = −K Ui
Ri

We can easily compute the transfer function of this circuit by using the ideal prop-
erties of the op-amp. Because the gain of the op-amp goes to infinity, in order to
have a finite value of Uo , the voltage at the inverting input must be (almost) zero.
This implies that the inverting input is in fact connected to a ‘virtual’ ground. This
is indicated in figure 12.7 by means of a dotted grey ground symbol. The current
through R o is then Uo /R o and the current through R i is Ui /R i . Because of the infinitely-
high input impedance of the op-amp, no current will flow into the op-amp. This
implies that the sum of the currents through R o and R i must be zero.
12.2. IDEAL OPERATIONAL AMPLIFIERS 197

Uo Ui Uo Ui
+ = 0 or =− (12.7)
Ro Ri Ro Ri
This implies that

Uo Ro
=− = −K (12.8)
Ui Ri

The circuit of figure 12.7 thus represents a gain −K = −R o /R i . This gain is com- gain
pletely determined by the ratio of the two resistors. The gain of the amplifier
(K amp → ∞) does not play a role at all (as long as it is just very large). When the
two resistors have the same value, the circuit realises an inverter: Uo /Ui = −1. In inverter
that case we sometimes represent the whole circuit by the bare amplifier symbol of
figure 12.8.

F IGURE 12.8
Inverter: Uo = −Ui Ui Uo

The circuit of figure 12.7 is equivalent with figure 12.3. With a proper choice of the
resistors eq. 12.8 is equivalent with eq. 12.3.

Summing amplifier

We can extend the circuit of figure 12.7 with an extra input. This yields figure 12.9.
With the same reasoning as before we can find the output as a function of the two
inputs.

F IGURE 12.9
Operational amplifier R1 Ro
(adder) U1
U2 Uo
Ro Ro
µ ¶
R2
Uo = − U1 + U2
R1 R2

Exercise 12.75
Show that the equation in figure 12.9 is correct, before reading further.

From the fact that the inverting input is virtually grounded and that the input impedance
goes to infinity it follows that

Uo U1 U2
+ + =0 (12.9)
Ro R1 R2
This can be written as:
198 CHAPTER 12. OPERATIONAL AMPLIFIERS

Ro Ro
µ ¶
Uo = − U1 + U2 (12.10)
R1 R2
or by writing the ratios of the resistances as a gain:

Uo = −(K 1U1 + K 2U2 ) (12.11)


When we select R 1 equal to R 2 there is just one gain

Uo = −K (U1 +U2 ) (12.12)


adder circuit With this adder circuit we can thus make the (weighted) sum of two (or more input
signals).
In Dutch we use, besides the term ‘operationele versterker’, also the term ‘rekenver-
sterker’ for op-amps. In German the terms ‘Operationsverstärker’, ‘Rechenverstärker’
and ‘Funktionsverstärker’ are used. They refer to the capability of op-amps to easily use
them in analogue computations.

Exercise 12.76
Realise the addition:
Uo = U1 −U2 (12.13)
Hint: use two amplifiers.

It would be possible to use the non-inverting input as well. However, with an excep-
tion of the voltage follower of figure 12.6, this leads to more complex circuits and
more complex computations. We will give just one example of a non-inverting am-
plifier (figure 12.10). In the rest we will only consider the use of the inverting input.

F IGURE 12.10
Operational amplifier Ro
(non inverting) Uo
+
Ri + Ro
Uo = Ui +
Ri
Ui Ri

- -

Ri
Uo = K Ui − K Uo (12.14)
Ri + Ro
Ri
µ ¶
Uo 1 + K = K Ui (12.15)
Ri + Ro
K
Uo = Ui (12.16)
Ri
1+K
Ri + Ro
12.2. IDEAL OPERATIONAL AMPLIFIERS 199

With K → ∞ this yields

1 Ri + Ro
Uo = Ui = Ui (12.17)
Ri Ri
Ri + Ro

Note that eq. (12.17) is a more complex relation than eq. (12.8).

12.2.1 Operational amplifiers with impedances


We do not have to restrict ourselves to resistors as input and feedback elements.
In principle we could use both capacitors and inductances as well. In practice we
only use capacitors and resistors. One of the reasons is that inductances are bulky
components. Another reason is that the component capacitor is much more equiv-
alent to an ideal capacitor than a real inductance approaches the ideal inductance.
If inductances are needed in e.g. an integrated circuit (IC) they can be realised with
capacitors in electronic gyrator circuits.

Integrator

Let us first consider the use of a capacitor as a feedback impedance. This leads to
the circuit of figure 12.11.

F IGURE 12.11
Integrator Zo
Ui Zi

with Zo = sC1
and Zi = R Uo
this circuit realises an integration:
1 1
dt
R
− sRC → − RC

When we replace the terms R o and R i in eq. (12.8) with Zo and Zi we obtain the
transfer function of the circuit of figure 12.11.

1
Uo Zo sC 1
=− =− =− (12.18)
Ui Zi Ri sRC
1
With e.g. R = 1MΩ and C = 1µF, the transfer function is equal to − , which (apart
s
from the minus sign) represents a pure integrator. integrator

Differentiator

It is obvious that by interchanging the capacitor and resistor we realise a differen-


tiator (figure 12.12). Because analogue circuits are always subject to some noise, differentiator
realising a pure differentiator with the circuit of figure 12.12 is not a good idea.
200 CHAPTER 12. OPERATIONAL AMPLIFIERS

F IGURE 12.12
Differentiator Zo
Ui Zi
1 Uo
with Zo = R and Zi = sC this circuit
d
realises a differentiation: −sRC → −RC
dt

Low-pass filter

A passive circuit The circuit of figure 12.13 consists of a voltage source, a (passive) low-pass filter and
is a circuit with a load resistance. It is clear that the voltage over the capacitor will not be the same
only resistors,
capacitors and with and without the load resistance. When we connect the load resistance the cir-
inductances. cuit changes and it will behave differently. This is a typical property of all passive
systems.

F IGURE 12.13
Passive low-pass filter with a load +
Rload

low-pass filter

low-pass filter We can realise the same low-pass filter in active form by using an op-amp (fig-
ure 12.14). Because the output impedance of the op-amp is equal to zero, the load
has no influence on the output voltage of the op-amp. This makes the design of the
desired functions much easier.

F IGURE 12.14
Active low-pass filter with a load

+
Rload

low-pass filter
12.2. IDEAL OPERATIONAL AMPLIFIERS 201

Exercise 12.77
Compute the transfer function from input voltage to the voltage over the capacitor for the
circuit of figure 12.13 without the load resistance. Compute the transfer function from
voltage source to the output of the op-amp for the circuit of figure 12.14 (again without
the load). Show that the two transfer functions are the same (with properly chosen val-
ues of the components). Simulate the two systems (without the load) and show that the
responses are equal. (In order to have a similar sign in the two responses you may want
to give the voltage source in the case of figure 12.14 a negative value. Give all the other
parameters in the simulation a value 1.)
Repeat the simulations with the load resistances connected. Describe and explain
your observations.

Exercise 12.78
Because the op-amp is an active circuit, it is possible to give the low-pass filter also a
certain amplification (>1).

- Which component should we change in the values of the resistors and capacitor if
we want to change the gain from 1 to 2 but keep the shape of the response the same?
- Which component should we change if we want to keep the gain as it is, but make
the response 10 times faster?
- Which component should we change if we want a 10 times faster response and a 10
times smaller gain?

Verify your results by examining the transfer function and by performing a simulation.

Differentiator (2)

A better way to realise a differentiator is with the circuit of figure 12.15. The op-amp
in the forward path realises a gain of −100R/R = −100, the op-amp in the feedback
1 1 1
path realises an integrator with transfer function − RC s . Or, with RC = 1: − s . This
leads to a transfer function of the whole circuit:

−100 −100s s s
H= = =− 1 =− (12.19)
1 + 100
s
s + 100 s 100 + 1 sτ + 1

This transfer function represents a differentiator in combination with a low-pass fil-


ter. The low-pass filter suppresses noise, which may be present in the input signal.
202 CHAPTER 12. OPERATIONAL AMPLIFIERS

R 100R

F IGURE 12.15 Differentiator realised by an integrator in the feedback

Exercise 12.79
Simulate the differentiator of figure 12.15. Use as input signal a ramp, with superimposed
a small amount of Gaussian noise (amplitude less than 0.001). Compare the result with
the circuit of figure 12.12

12.2.2 Analogue simulation


Op-amps formed the basic building blocks of the analogue computers, shortly dis-
cussed in Chapter 5. It is now clear why. With simple op-amp circuits we can re-
alise elementary functions, like integration and summation of signals, as modular
building blocks building blocks. Because of the use of active components, in the form of op-amps,
the properties of these building blocks do not change when they are connected to
other building blocks. This is impossible to realise with a circuit consisting of only
passive components.

One could ask whether it is useful to discuss here ‘analogue computing’, which is out-
dated. The reason to do this is that the circuits and related problems are not outdated at
all. They are still present in many analogue circuits, widely used in, for instance, inter-
faces between computers and the real world.

In the previous section we have discussed the elementary building blocks, needed
to simulate linear dynamical systems. As an example of a slightly more complex
system we will consider the simulation of a second-order system. We make an op-
amp-based analogue simulation of the second-order system of eq. (6.61) or eq.
(7.35):

ω2n
H =K (12.20)
s 2 + 2ζωn s + ω2n

This system can be translated into the block diagram of figure 12.16. In order to
simulate this system, we need to split it into the basic building blocks of the previ-
ous section. We need
12.2. IDEAL OPERATIONAL AMPLIFIERS 203

- one op-amp to realise the integrator and the gain ω2n (op-amp 1)

- one op-amp to realise the ‘low-pass filter’ and the summation at the input of
the block diagram (op-amp 2)

- one invertor (op-amp3)

This leads to figure 12.17.

K  2n 
op-amp 1

op-amp 2 2n
op-amp 3

-1

F IGURE 12.16 Block diagram of a second-order system

op-amp 2
op-amp 1

op-amp 3

F IGURE 12.17 Op-amp realisation of the second-order system

Exercise 12.80
Indicate in figure 12.17 where the different parameters of figure 12.16 are realised.

Exercise 12.81
Select ωn = 1, ζ = 0.5 and simulate figure 12.17 and figure 12.16 with 20-sim. The re-
sponses should be the same.
204 CHAPTER 12. OPERATIONAL AMPLIFIERS

Exercise 12.82
Which component(s) in figure 12.17 should we alter and how, to make a 100 times faster
system?
Which component(s) in figure 12.17 should we alter and how, to increase the damping
ratio ζ with a factor 2?

When we want to study the change of ω2n while keeping the term 2ζωn the same,
we could do that by changing the input resistor of op-amp 1. If the components
are soldered together, this is not a very attractive solution. A more flexible solution
would be to use a potentiometer. The simplest way is to replace the fixed resistor by
a potentiometer. With a potentiometer, as in figure 12.18, we can realise a variable
resistance between 0 and R. This changes the transfer function of the integrator
1 1 ∞
(realised with op-amp 1) between RC s and s . This is not a very handy scale.

F IGURE 12.18
Op-amp with input impedance
adjustable between 0 and R

A variable gain with a (more) linear scale can be made when we use a potentiome-
ter in the configuration of figure 12.19. In the ideal case the gain can now be con-
trolled between 0 and 1, with a linear scale. The ideal case refers to the sitiuation
that the input resistor of op-amp 1 is very large compared with the total resistance
of the potentiometer. Because the input of the op-amp is virtually grounded, this
input resistor is in fact in parallel with the lower part of the potentiometer. Figure
12.20 illustrates this.
Let, for instance, α = 0.5 and let R in = 0.5R. In that case the resistance of the two
parallel resistors is equal to (1−αR) || R in = 0.5R || 0.5R = 0.25R. The voltage over the
two parallel resistors is then

0.25R 1
U = U, (12.21)
(0.5 + 0.25)R 3

rather than the intended 0.5U . If the resistance of the potentiometer (R) is chosen
100 times smaller than R in , the input voltage of R in and thus the gain, may be con-
sidered proportional to α, with 0 < α < 1. With R in = 100R and α = 0.5 it follows
that

0.5R · 100R 50
0.5R||R in = = ≈ 0.5 (12.22)
0.5R + 100R 100.5

Exercise 12.83
Explain how the scale can be made completely linear for arbitrary ratios between R and
R in at the expense of using an extra op-amp.
12.2. IDEAL OPERATIONAL AMPLIFIERS 205

op-amp 2
op-amp 1

op-amp 3

F IGURE 12.19 Op-amp realisation with variable gain

+
R

1R Rin
-

F IGURE 12.20 R in is a load for the lower part of the potentiometer

The potentiometer used in figure 12.19 can be drawn as two separate resistors
r 1 = (1 − α)R and r 2 = αR (figure 12.21 at the left). We can convert this into a bond-
graph submodel with three ports, named ‘input_high’ and ‘input_low’, representing the
voltage over the potentiometer and ‘varout’, representing the variable output, which can
be connected to the load. With the aid of the bond graph we can find the equations for
this submodel. After making a representative icon for the submodel and defining the
interface, the submodel is ready to be used.

input_high 1 R : r1
r1

varout
0 varout

r2 Rload
input_low 1 R : r2

F IGURE 12.21 IPM and bond graph of a potentiometer


206 CHAPTER 12. OPERATIONAL AMPLIFIERS

12.2.3 Multiple views


With the representation of a dynamic system with an op-amp circuit the various
representations of these systems in this course are complete. Figure 12.22 sum-
marises these views with examples of second-order systems.
At the top row we see a mechanical system, an electrical system and a bond
graph. From the bond graph we can easily derive the equations, which enable us
to draw a block diagram. From the block diagram the design of the op-amp circuit
is straightforward. Let the bond graph represent the electrical system with resis-
tance R, inductance L and capacitance C . The equations follow directly from the
causal bond grap. At the 1-junction the sum of the voltages is zero:

u L = u source − u R − uC (12.23)

R C

Se 1

I
m
 1/L  1/C

F
R

F IGURE 12.22 Multiple views of a second-order system


12.2. IDEAL OPERATIONAL AMPLIFIERS 207

The current represented by the 1-junction is determined by the inductance:

1
Z
i= (u source − u R − uC ) dt (12.24)
L

u R = Ri (12.25)

1
Z
uC = i dt (12.26)
C

The equations can be translated one-to-one into the block diagram. The output
of the block diagram represents the voltage over the capacitor. Of course the same
block diagram represents the mechanical systems as well. The only thing we have
to do is to replace the inductance by the mass: L → m, the capacitance by the com-
pliance of the spring: C → c and the resistance by the friction of the damper: R → f .

Exercise 12.84
Indicate in the op-amp circuit where the coefficients of the block diagram can be found
back in the values of the different components.

Exercise 12.85
Simulate all the graphical representations of figure 12.22 at once. Select all parameters
equal to one and show that all responses are similar.

12.2.4 Review
Op-amps are another example of the fact that a feedback system with a high gain
in the forward path, is able to realise a desired performance. The most important
property here is that transfer functions can be realised with a modular approach
because the zero output impedance of the op-amp guarantees that its performance
is not influenced by the load at its output. Or in terms of a feedback system: the
feedback system guarantees that the output is constant, even if there are ‘distur-
bances’ at the output.
It has already been discussed that analogue simulation cannot compete any-
more with digital-computer-based simulations. The reason that we treated ana-
logue simulation in this chapter is because the same type of circuits is still impor-
tant for making relatively simple circuits to interface a computer to the physical
world with sensors and actuators. At the sensor side it may, for instance, be desir-
able to add a voltage follower to prevent that the sensor readings are influenced
by the input impedance of the interface. Another function we may want to realise
in analogue form is a low-pass filter or some extra gain in the sensor signal. For all
such applications op-amps are the basic components.
We conclude this chapter with a picture of a printed-circuit board, used in the
mechatronics project of the Electrical Engineering BSc program at the University
of Twente. Figure 12.23 shows a part of this board with two op-amps. The layout of
208 CHAPTER 12. OPERATIONAL AMPLIFIERS

this board is in fact a direct mapping of the circuit diagrams we have seen in this
chapter. Inside the op-amp symbol the IC with the op-amp and two small capac-
itors, needed around each op-amp, can be seen. These capacitors may be disre-
garded with respect to the transfer functions realised by the input and feedback
impedances in the circuit.

F IGURE 12.23 Printed-circuit board with two op-amps. The circuit diagram
can easily be found by examining the layout of the components
in this circuit

Exercise 12.86
Draw the circuit diagram, realised on the printed circuit board.
13
Controllers are mostly implemented in a digital
computer. Because such computers are ‘invisible’
they are called embedded computers.

Embedded control systems

After studying this chapter you are expected to know

– the consequences of digital control of continuous-time systems


– how to select a proper sampling rate
– the effects of analogue-to-digital and digital-to-analogue conversion
– how to deal with noisy measurements in a digital control system.

13.1 Computers used as controllers


In the history of control engineering controllers were originally often implemented
as mechanical devices. In the process industry pneumatic controllers became very pneumatic
controllers
popular, because pneumatic devices are inherently safe in an explosive environ-
ment. In pneumatic controllers compressed air is used as a carrier of the signals. In
pneumatic systems controllers and actuators are still mechanical devices, steered
by the compressed air. When high forces are needed hydraulic systems are popular. hydraulic
systems
Both hydraulic and pneumatic systems are still frequently used. They are relatively
inexpensive but lack the flexibility, which can be achieved with electronic and es-
pecially software-based controllers. Controllers built with analogue electronics, are
often implemented with op-amps.
The flexibility of software makes it attractive to implement controllers in digi-
tal computers. Because computers are inexpensive general purpose components,
advanced options can be implemented for a competitive price. Besides the advan-
tages, such as flexibility at a relatively low price, there are also disadvantages. Com-
puters work in discrete time and need some time to do the necessary computations.
The processes, which we want to control, are mostly continuous-time processes.
A digital computer can only ‘now and then’ pay attention to the continuous-time
process. In addition, the continuous time signals must be converted to numbers,
the only format a computer can deal with. And when the control signal –in the form
of a number, as a result of the computations in the computer– is available it must
be converted back to e.g. a voltage. A computer must thus be fast compared with
the dynamics of the process. When we use a computer for simulation, a fast result is

209
210 CHAPTER 13. EMBEDDED CONTROL SYSTEMS

appreciated by the user. If possible the simulation should quickly give a result and
preferably take less time than in the real-world situation. But as soon as computers
interact with the real world, they have to deal with the ‘real’ time.
Example
An example of a computer interacting with the real world is an automatic teller ma-
chine. A customer who wants to obtain some bank notes interacts with the teller
machine by means of a keyboard or touch screen. It is essential that the screen pro-
duces an echo on the display without a noticeable delay. The teller machine must
thus react in real time.
The real-time performance of a teller machine means in fact fast enough. This type
soft real time of real-time behaviour is called soft real time. From the perspective of a control en-
gineer soft real time is not enough. Computers used for control must not only be
fast enough, they must also be able to communicate with the continuous-time pro-
cess exactly at the desired time. Sampling must thus take place with a constant time
interval. The reason for this is, that otherwise there may be stability and accuracy
issues. We call this behaviour, where the computer interacts with the process fast
hard real time enough and at fixed time intervals, hard real time.
Most people own a considerable number of ‘computers’, without realising this.
Computers in watches, dish washers, microwaves, TV-sets, blue-ray players and
cars, are invisible. We refer to such computers as embedded computers and to con-
embedded trol systems with such embedded computers as embedded control systems. This
control systems
chapter introduces such embedded control systems. This introduction will only
cover a few of the most important aspects of such systems. Full treatment of em-
digital control bedded or digital control systems, would require a much more elaborate treatment.
systems

13.2 Digital control of continuous-time systems


13.2.1 Sampling
hard real time A hard real-time computer observes the environment at fixed time intervals, uses
these observations to perform computations and finally delivers its results to the
environment. Both, the input and output of data should take place at fixed mo-
ments in time. Because the duration of the computations needed for computing
the output signal varies, the way to perform this theoretically correct is the follow-
ing:

1. sample the data from the process (this yields the input signal for the com-
puter)

2. send the computation results of the former sample to the process (the output
signal of the computer is the input signal for the process)

3. perform the computations: the input(s) measured at t = kT are used to com-


pute the outputs for t = (k + 1)T .
13.2. DIGITAL CONTROL OF CONTINUOUS-TIME SYSTEMS 211

These steps are indicated in the block diagram of figure 13.1 and in the timing dia-
gram of figure 13.2.

controller process
T T
1 3 2

F IGURE 13.1 Sampling: 1 = sampling inputs, 2 = sending outputs,


3 = computing

1 = sampling inputs
1 2 2 = sending outputs 1 2
3 = computing

3 3
idle time
t

kT (k+1)T

F IGURE 13.2 Timing in a real-time control system

There must always be some idle time, because otherwise it cannot be guaranteed
that the computations are ready on time. If there is not enough time for the neces-
sary computations unpredictable results may occur.
Because the computer only sees the outside world through the sampling pro-
cess, it only sees values at discrete moments in time: t = T, 2T, 3T, ..., kT . For the For the computer
computer the outside world is a discrete world. This has as a direct consequence the outside world
is a discrete
that the controller should be designed for the discrete system. However, the process world.
itself remains in most cases a continuous-time process, where the variables may
change during the sampling intervals.
One effect of the sampling process, as indicated in figure 13.2, is that we intro-
duce a time delay of one sampling interval. We can make this delay smaller by ex- time delay
changing the steps 2 and 3, i.e. by sending the data to the process immediately after
the computations are finished. Because the duration of the computations may vary,
this will lead to a smaller but variable time delay. If the duration of the computa-
tions is short compared with the total sampling interval (this implies that the idle
time is relatively large) this may be the better solution. But in all cases the use of a
digital computer in a control loop leads to some time delay. Time delays are harm-
ful to the stability and therefore the stability of digital control systems requires extra
attention.
212 CHAPTER 13. EMBEDDED CONTROL SYSTEMS

13.2.2 AD- and DA-conversion


Besides the discretisation in time, the use of a computer also requires that, in gen-
eral, analogue signals are converted into integer numbers and vice versa. This con-
version can be done by means of sensors, which deliver a number rather than an
optical encoder analogue voltage. We have seen an example of such a devise in the optical encoder
or code disc in figure 8.11, shown again in figure 13.3.

F IGURE 13.3 Section of an optical encoder or code disc

AD-converter Another example is an AD-converter(Analogue-to-Digital converter). An AD-con-


verter performs the sampling (discretisation in time) and converts the amplitude of
the voltage into an integer (discretisation in amplitude). The range of these integers
is expressed in the number of bits of the AD-converter. An 8-bit AD converter pro-
duces integers between 0 and 28 − 1 = 255. Higher resolution converters typically
have 10, 12 or 14 bits.
Example
A 12-bit AD-converter has a range from 0 to 212 − 1 = 4095. If this range should rep-
resent voltages between −10 V and +10 V, this implies that voltages are available in
the computer in steps of 20V/4096 ≈ 5 mV. With a 4-bit AD-converter and a range
of ±2 V these steps are 4V/16 = 0.25 V. This is illustrated in figure 13.4, where a sinu-
soidal signal is sampled every 0.5s.
The samples can only have the values indicated by the grid. This leads to clearly
noticeable errors. When we increase the resolution the values of the sinusoidal sig-
nal are converted more accurately. This is shown in figure 13.5, where a 10 bit AD-
converter is used on the interval ±2, leading to a resolution of approximately 4mV.
13.2. DIGITAL CONTROL OF CONTINUOUS-TIME SYSTEMS 213

2
Sinus
AD

-1

-2

0 1 2 3 4 5 6 7 8 9 10
time {s}

F IGURE 13.4 Sinusoidal signal sampled with a 4-bits AD converter:


only 16 discrete levels possible

2
Sinus
DA

-1

-2

0 1 2 3 4 5 6 7 8 9 10
time {s}

F IGURE 13.5 Sinusoidal signal sampled with a 10-bits AD converter:


only 1024 discrete levels possible (Note that the grid has no spe-
cial meaning here anymore)

When we assume that the computer does nothing else with this signal than multi-
plying it with 1, the sampled sinusoidal signal must be converted to a continuous-
time signal again. This is performed by a DA-converter (Digital-to-Analogue con- DA-converter
verter). Inside the computer probably floating-point numbers are used and as a
214 CHAPTER 13. EMBEDDED CONTROL SYSTEMS

result of more complex calculations the number offered to the DA-converter may
not be an integer at all. However, also a DA-converter is only able to convert inte-
ger numbers. Thus also a DA-converter uses a certain number of bits to produce
a voltage within a certain range. Because the numbers are only presented to the
DA-converter during a very small amount of time, the DA-converter is equipped
hold circuit with a hold circuit, which ‘holds’ the voltage until a new conversion is performed.
In its most simple and most generally used form the voltage is just kept at a con-
zero-order hold stant value. Such a hold circuit is called a zero-order hold circuit. The signal at the
output of the DA-converter, corresponding with the sampled signals in figure 13.5 is
given in figure 13.6.

2
Sinus
DA

-1

-2

0 1 2 3 4 5 6 7 8 9 10
time {s}

F IGURE 13.6 Output with a 10-bits DA converter: 1024 discrete levels possible

Although the accuracy of the amplitudes is now rather good, the output of the DA-
converter does not very well resemble the original sinusoidal signal . The sine has
a frequency of 1 rad/s (approximately 0.16 Hz). When we sample such a sine with a
sampling frequency of 10 Hz we get a signal that much better resembles the original
sine (figure 13.7).
13.2. DIGITAL CONTROL OF CONTINUOUS-TIME SYSTEMS 215

2
Sinus
DA

-1

-2

0 1 2 3 4 5 6 7 8 9 10
time {s}

F IGURE 13.7 Output with a 10-bits DA converter and sampling at 10 Hz

If, on the other hand, we sample at 10 Hz with 4 bits AD- and DA-converters, the
discretisation in time is OK, but the discretisation in amplitude still leads to a bad
result. This is especially visible near the maximum values of the sine, where the
variations in the amplitude are smaller than the resolution of the converters (fig-
ure 13.8).
2
Sinus
DA

-1

-2

0 1 2 3 4 5 6 7 8 9 10
time {s}

F IGURE 13.8 Output with a 4-bits DA converter and sampling at 10 Hz

When we compare figure 13.7 with figure 13.8 we see that in order to track fast
changes we need a high sampling frequency, and to accurately track small changes
in amplitude we need AD- and DA-converters with a sufficient number of bits.
216 CHAPTER 13. EMBEDDED CONTROL SYSTEMS

13.3 Stability
The sampling process and the time needed to compute new DA-values in the com-
puter introduce a time delay. Such time delays are, for instance, noticeable when
sound and images of an analogue TV-signal are compared with the signals coming
from a digital set-top box. Also when the sound of an FM-station coming through
the ether is compared with an internet radio signal the delay is obvious. Apart from
the fact that the hourly time signal is not correct anymore, these delays are hardly
a problem. This is different in feedback control systems. Delays in a feedback loop
can have a disastrous effect on the stability of the system. This can be illustrated
with a simple first-order system. In figure 13.9 the continuous-time and discrete-
time versions of a simple control system are given. In both cases a first-order pro-
cess is controlled with a proportional controller. The AD converters have a resolu-
tion of 12 bits, such that the accuracy of the converters has no effect on the results.

Kp K Kp D K
s + 1 A s + 1

A
D

F IGURE 13.9 Continuous-time and discrete-time versions of a first-order


proportional control system

Simulation results for K p = 10, K = 1 and τ = 1 are given in figure 13.10. When
observing these results, we notice the following:

– the discrete system sampled with 5 Hz (Tsample = 0.2s) is on the border of instability
– the discrete system sampled with 100 Hz (Tsample = 0.01s) is, except for a small
delay of 0.01s at the start, almost similar to the continuous-time response
– the time constant of the closed system is approximately 0.1s (t 63% ). The final value
of the responses 1) and 2) is, as could be expected:

Kp K 10
= ≈ 0.9 (13.1)
1 + Kp K 11

When we sample slower than 5 Hz, or increase K p the system will become unstable.
This will never happen in the continuous-time case of a proportionally-controlled
Rule of thumb for first-order system. A rule of thumb for choosing the sampling rate is to sample at
choosing the least 10 times faster than the ‘dominant time constant’ of the system. In that case
sampling rate:
Tsample = the sampling process has only minor influence on the behaviour of the system.
τdominant /10. Fine tuning of the sampling rate can be done similar to the method discussed in
section 5.2.6. Even if stability is not an issue, the sampling must be so fast that the
computer appears to react ‘immediately’ on user commands. This implies that, at
least for the user interface, the sampling must not be slower than, say 100 ms.
13.3. STABILITY 217

2.5
continuous time
discrete time 100 Hz
discrete time 5 Hz
2

1.5

0.5
2

-0.5
0 0.2 0.4 0.6 0.8 1
time {s}

F IGURE 13.10 1) continuous-time system


2) system sampled at 100 Hz
3) system sampled at 5 Hz

Exercise 13.87
Repeat these experiments. Take care that the converters have sufficient bits and that the
range of the converters is large enough to prevent ‘clipping’ of the signals. It may be a
good idea to plot also the output of the DA-converter to check if the signal is still within
the maximum values.

Exercise 13.88
Replace the first-order process by a second-order process with transfer function

1
(13.2)
s(s + 1)

and choose K p = 1. Use the rule of thumb to find a proper sampling rate and determine
the sampling rate where the system becomes unstable.

Note again that in the continuous-time case, a second-order system will never
be unstable. But a discrete-time system can become unstable when the gain is
too high or the sampling rate too slow. Because the output of the AD- and DA-
converters is limited by the maximum and minimum values, the signals cannot be-
come unbounded. An oscillation will be the result. This is illustrated in figure 13.11
for the second-order system, where both the converters are limited at ±100 V.
218 CHAPTER 13. EMBEDDED CONTROL SYSTEMS

1.5 continuous time


1
0.5
0

1.5
discrete time 6.67 Hz
1
0.5

discrete time 0.2 Hz


100
0
-100
-200

DA output 0.2Hz
100
0

-100

0 10 20 30 40 50 60
time {s}

F IGURE 13.11 From top to bottom: responses of the


- continuous time system,
- discrete system sampled at 6.67 Hz,
- discrete system sampled at 0.2 Hz,
- DA output: exponentially growing until it is clipped at ±100 V

13.4 Theoretical limits of the sampling frequency


Even if we do not want a hard real-time behaviour and we do not bother about de-
lays, there are limits to the sampling rate. This can be explained by considering a
sinusoidal signal of e.g. 1 Hz. In the system of figure 13.12 the sinusoidal signal is
sampled, converted back to the continuous-time domain and low-pass filtered in
order to smooth the effects of the sampling process.

ZOH Low pass filter

F IGURE 13.12 Sinusoidal signal, sampling, Zero-Order Hold (ZOH) and


low-pass filtering

It is obvious that if we sample the sine of 1 Hz with a frequency lower than 1 Hz,
only now and then a sample of this signal is taken. From time to time a whole pe-
riod will be missed, without taking a sample. There is a boundary, given by Shan-
non’s theorem, which states that the sample frequency ( f s ) must not be lower than
two times the highest frequency ( f max ) in the signal. Or as a formula:

f s Ê 2 f max (13.3)
13.4. THEORETICAL LIMITS OF THE SAMPLING FREQUENCY 219

The frequency 2 f max is called the Nyquist rate. In order to show this we first con- Nyquist rate
sider the results when we sample a little bit faster than the theoretical boundary of
2 Hz, i.e. with 4 Hz (figure 13.13).

1
sinusoidal signal of 1 Hz
0.5

-0.5

Zero-Order Hold output,


sampled at 4 Hz
0.5

-0.5

after low-pass filtering of


0.5 the ZOH signal

-0.5

-1
0 0.5 1 1.5 2 2.5 3 3.5 4
time {s}

F IGURE 13.13 Sampling of a 1 Hz signal with a sampling frequency of 4 Hz

We see that after low-pass filtering the sine is (almost) perfectly reconstructed.
Due to the low-pass filtering there is a considerable phase lag between the origi-
nal sine and the filtered signal. In signal-processing applications, such as e.g. the
reconstruction of the analogue wave signal from a CD this is not a problem. But in
closed-loop control systems such phase lags are undesirable.

The low-pass filter used in the simulations is a so-called third-order Butterworth filter.
The cut-off frequency of the filter is chosen equal to 0.5 f s .

CD’s are designed for a bandwidth of 20 Hz − 20 kHz. This implies that the highest
frequency on a CD is 20 kHz. This would require a sampling rate of at least 40 kHz. The
sampling rate at a CD is indeed chosen a little bit higher: 44.1 kHz.

In an embedded control system it makes sense to choose a sampling frequency at


least 10 times higher than the Nyquist rate. In this case a sampling frequency of at Nyquist rate
least 10 · 2 · f max = 20 Hz would be needed. As can be seen in figure 13.14, this gives
indeed an acceptable result, although there still is some phase lag. The phase lag
can be made smaller and ZOH-output smoother by increasing the sampling rate.
In order to examine what happens when a too low sampling frequency is used we
consider the situation where f s is slightly smaller than f max : f s = 0.9 f max (see fig-
ure 13.15). Besides the fact that the filtered signal is less smooth, due to rougher
discretisation in time, the main problem here is that the frequency of the sine has
changed in the conversion process. The original sine has a frequency of 1 Hz. Af-
ter sampling with a too low sampling frequency, the frequency has changed into
approximately 0.1 Hz! This effect is known as aliasing. aliasing
220 CHAPTER 13. EMBEDDED CONTROL SYSTEMS

1 sinusoidal signal of 1 Hz
0.5

-0.5

Zero-Order Hold output,


sampled at 20 Hz
0.5

-0.5

after low-pass filtering of


0.5 the ZOH signal

-0.5

-1
0 0.5 1 1.5 2
time {s}

F IGURE 13.14 Sampling of a 1 Hz signal with a sampling frequency of 20 Hz

Exercise 13.89
Examine this further by using the structure of figure 13.12 and applying various sampling
frequencies, lower than the minimum required value of 2 Hz. Show that in all cases this
leads to frequencies after the hold circuit, which are smaller than f max .

13.4.1 Noise
When we deal with noisy measurements the output signal of the controller (the in-
put signal of the process we want to control) will be noisy as well. Eliminating the
noise of sensors as much as possible is always desired. Because noise often con-
tains mainly high frequencies, a low-pass filter could be used to suppress noise.
However, low-pass filtering introduces extra dynamics in the control loop. This has
a detrimental effect on the stability of the system. This is equally true for continuous-
time and discrete-time systems. But in digital control systems there is another
problem. As we just saw, in the sampling process frequencies higher than half the
sampling frequency are converted to lower frequencies! This implies that they can-
not be suppressed anymore by a digital low-pass filter in the computer. Therefore,
anti-aliasing it is important that these frequencies are filtered out by an analogue, anti-aliasing
filter
filter before the AD conversion. The only way to make it possible to do (part of) the
noise filtering in a computer is selecting a higher sampling rate. In that case the
analogue anti-aliasing filter can be tuned at a higher cut-off frequency.
We will demonstrate this phenomenon again with a few examples. We compare
a continuous-time and discrete-time process, both with noisy measurements. We
apply a low-pass filter to suppress the noise in the measurements. In the discrete
system this filter acts as an anti-aliasing filter as well. The two systems are given in
13.4. THEORETICAL LIMITS OF THE SAMPLING FREQUENCY 221

1
sinusoidal signal of 1 Hz
0.5

-0.5

Zero-Order Hold output,


sampled at 0.9 Hz
0.5

-0.5

after low-pass filtering of


0.5 the ZOH signal

-0.5

-1
0 5 10 15 20
time {s}

F IGURE 13.15 Sampling of a 1 Hz signal with a sampling frequency of 0.9 Hz

figure 13.16.

K yc
Kp
s(s +1)
~
1 yc
s f + 1

y
D K d
Kp A s(s +1)

A 1
D s f + 1

F IGURE 13.16 Continuous-time and discrete-time systems, both with noisy


measurements

When the systems are simulated with τ = 1, K = 1 and K p = 1, we get a step re-
sponse with a roughly estimated ‘time constant’ of 1.5 s. This implies that a sam-
pling interval of T s = 1.5/10 or a sampling frequency of f s = 10/1.5 = 6.66 Hz should
be fast enough. When we select a cut-off frequency for the low-pass filters of 3 Hz,
there should be no aliasing. With the filter editor of 20-sim, we find that this implies
a filter time constant (τ f ) of approximately 0.05 s. The result is given in figure 13.17.
222 CHAPTER 13. EMBEDDED CONTROL SYSTEMS

1.5 ~
yc
continuous-time output
measurement
1

0.5

0
continuous-time output
yc before the noise is added
1

0.5

0
discrete-time output
yd before the noise is added
1

0.5

0
0 5 10 15 20 25 30 35 40
time {s}

F IGURE 13.17 Responses with an anti-aliasing filter

1.5
continuous-time output
measurement
1

0.5
~
yc
0

continuous-time output
yc before the noise is added
1

0.5

discrete-time output
yd
before the noise is added
1

0.5

0 20 40 60 80 100 120 140 160


time {s}

F IGURE 13.18 Responses without an anti-aliasing filter

We see that there is hardly any noise visible in the discrete-time and continuous-
time process outputs. In the next experiment we remove the anti-aliasing low-pass
13.5. SUMMARY 223

filters. This results in figure 13.18.


Two effects are visible here. We notice a clearly visible low-frequency noisy com-
ponent in the output signals. In the continuous-time system this is due to the fact
that the noise is present at the input of the process via the feedback signal. Because
of the low-pass character of the process, only low-frequency components are visible
at the output of the process. The same holds for the discrete system. But because
of the aliasing there is much more low-frequency noise here. The discrete system is
thus much more affected.

13.5 Summary
In this chapter the major effects of using a digital real-time computer in a control
system have been presented and demonstrated. There is much more to say than
what can be done in such an introductory chapter. The main phenomena to be
taken care of are summarised here.
When a digital computer is used as a part of a control loop, the sampling rate
of the computer must be chosen fast enough with respect to the dynamics of the
system. For first-order systems, or systems that can be considered as being first
order, a rule of thumb is to sample at least ten times faster than the time constant
of the system. Faster sampling is in general better, but comes at the price of more
expensive hardware. A negative effect of using sampled-data systems is that time
delays are introduced, which have a negative effect on the stability of the closed
loop system. In addition noise can be a problem because high-frequency noise is
converted to low-frequency noise if the noise contains frequencies higher than the
f s /2. Because there is no way to suppress this low-frequency noise in the discrete-
time signal, anti-aliasing filters must be used to suppress those high frequencies in
the continuous-time signals.
Besides discretisation in time, discretisation in amplitude affects the accuracy of
the computations. AD- and DA-converters should have sufficient bits to make the
effects of discretisation negligible. Care should be taken that the input and output
signal are properly scaled, such that the full range of the converters is used. If a 12
bit converter with a range of ±10 V is used for signals never larger than ±2.5 V, in
fact two bits of the converter are not used. The result is that only 10 bits are effec-
tively used.
Discretisation in time (the sampling process) and discretisation in amplitude
(the AD- and DA-conversion) should not be confused. Discretisation in time is any-
how the most critical one of the two, because of stability and aliasing issues. Dis-
cretisation in amplitude affects the accuracy. It is important, but a less accurate
system is not such a disaster as an unstable system. And of course the resolution of
the converters also influences their prices.
224 CHAPTER 13. EMBEDDED CONTROL SYSTEMS
A
This appendix summarises the tables and symbols
used in the previous text.

Tables and symbols

A.1 Formulas for several physical domains

TABLE A.1 Formulas for several physical domains

domain behaviours
mechanical spring:R friction: mass: R
F = 1c vd t F=fv v=m1
Fdt
electrical capacitor: resistor: inductance:
u = C1 i d t u = Ri i = L1 ud t
R R

hydraulical tank: R resistance: inertia:R


p = 1c ϕd t p =rϕ ϕ = 1I pd t

TABLE A.2 Physical quantities represented by the integrators

domain behaviours
mechanical spring: position mass: mechanical impulse
p
F = xc x = vd t v=m p = Fdt
R R

electrical capacitor: electric charge inductance: magnetic flux


q
u=C q = idt i = λL λ = ud t
R R

hydraulical tank: volume inertia: hydraulic impulse


p = Vc V = ϕd t ϕ = ΓI Γ = pd t
R R

225
226 APPENDIX A. TABLES AND SYMBOLS

A.2 Icons
A.2.1 Electrical domain

capacitor resistor inductance ground

i1 i2 i1 i2
+ + + +

u1 u2 u1 u2

_ _ _ _

voltage source current source transformer gyrator

F IGURE A.1 Electrical elements: icons and equations


A.2. ICONS 227

A.2.2 Mechanical domain (translation)

spring damper mass fixed world

friction

sources

F F v v

force source modulated velocity source modulated


force source velocity source

transformers

l2
l1 l1

l2

levers pulley-belt

F IGURE A.2 Overview of translation domain icons


228 APPENDIX A. TABLES AND SYMBOLS

A.2.3 Mechanical domain (rotation)

J
spring damper inertia fixed world

bearing

sources

T T  

torque source modulated velocity source modulated


torque source velocity source

transformers

1 1 n
n

gear gear train belt-pulley

F IGURE A.3 Overview of rotation domain icons


A.3. CAUSALITY ASSIGNMENT 229

A.3 Causality assignment


1. Step 1: assign the fixed causalities
Select a source element with fixed causality and propagate this causality
through the junction structure, obeying the causal constraints.

2. Step 1a
Repeat this until all sources have been handled.

3. Step 2: assign the preferred causalities


Select an element with preferred causality and propagate this causality through
the junction structure, obeying the causal constraints.

4. Step 2a
Repeat this until all elements with preferred causality have been handled.

5. Step 3: assign the indifferent causalities


Select an element with indifferent causality and propagate this causality
through the junction structure, obeying the causal constraints.

6. Step 3a
Repeat this until all elements with indifferent causality have been handled.

7. Step 4: Solve the causal conflicts


If there are any causal conflicts, reconsider the model and add, remove or
combine elements such that a model without causal conflicts is obtained.
230 APPENDIX A. TABLES AND SYMBOLS

e e
fixed causality: Se f 0 Sf f 1
sources
e f
Se Sf

causal constraints:
- only 1 bond without
a causal stroke
1 0
at 1-junction
- only 1 bond with
a causal stroke
at 0-junction

causal constraints: 1 TF 1 1 GY 1
transformer and gyrator

1 TF 1 1 GY 1
preferred causality: 0 C: C 1 I :I
C- and I-elements
f e e f

e e
indifferent causality: 1 f R 1 f R
R-elements
e f f e
1 R
R

F IGURE A.4 Overview of causality restrictions: ordered from


severe to less severe
A.4. SUMMARY OF FORMULAS AND REPRESENTATIONS 231

A.4 Summary of formulas and representations

TABLE A.3 Summary of formulas of the electrical domain


capacitor: resistor: inductance:

icons
1 1
u= idt u − Ri = 0 i= ud t
R R
equations C L
q = idt
R
electrical charge

λ = ud t
R
magnetic flux
u
1 i R
u u u
bond graph 0 i C 0 i R 1 i I

power P = ui

TABLE A.4 Summary of formulas of the mechanical translation domain


spring: friction: mass:

m
icons
1 1
F= vd t F −f v =0 v= Fdt
R R
equations c m
x = vd t
R
displacement

p = Fdt
R
impuls
F
1 v R
F F F
bond graph 0 v C 0 v R 1 v I

power P =Fv
232 APPENDIX A. TABLES AND SYMBOLS

TABLE A.5 Summary of formulas of the mechanical rotation domain


spring: friction: inertia:

J
icons
1 1
T= ωd t T −f ω=0 ω= Tdt
R R
equations c m
ϕ = ωd t
R
displacement

p = Tdt
R
impuls
T
1 
R
T T T
bond graph 0  C 0 
R 1  I

power P =Tω
A.5. BLOCKDIAGRAMS 233

A.5 Blockdiagrams

TABLE A.6 Basic block diagram configurations

y is the product of the u y


H
transferfunction H and u:

y = Hu

H1 and H2 in a series u y
H1 H2
configuration:

y = Hu = H1 H2 u

H1 and H2 in a parallel H1
configuration:
u y

y = Hu = H1 u + H2 u =
(H1 + H2 )u H2

u y
H1 and H2 in a feedback H1
configuration:

y H1
H= =
u 1 + H1 H2 H2
234 APPENDIX A. TABLES AND SYMBOLS

A.6 Operational amplifiers

TABLE A.7 Operational amplifiers: some basic circuits

Voltage follower or emitter


Uout
follower
Uin

Gain:
Ri Ro
Ui
Ro Uo
Uo = − Ui = −K Ui
Ri

Inverter:
Ui Uo
Uo = −Ui
Adder:
R1 Ro
U1
Ro Ro
µ ¶
Uo = − U1 + U2 U2 Uo
R1 R2
R2

Integrator:
C
Ui R
1
Z
Uo = − Ui dt Uo
RC
or
1
Uo = − Ui
sRC

Low-pass filter Ro

R o /R i Ri C
Uo = − Ui Ui
sR oC + 1 Uo
Index

0-junction, 121 capacity C , 31


1-junction, 112, 121 causal conflict, 132, 137, 148, 229
20-sim, 55 causal constraint, 127, 128, 137, 229
causal relation diagram, 4, 139, 141
a-causal, 9 causal stroke, 124
a-causal relation, 124 red causal stroke, 126
active component, 194 causality
actuator, 108, 113, 115, 175 fixed effort-out, 125
AD-converter, 212 fixed flow-out, 125
adapter, 151 info, 136
adder circuit, 198 causality assignment, 137, 229
Alembert conflict, 132, 137, 148, 229
d’ Alembert’s law, 97 fixed, 131, 137, 229
algebraic equations, 57 indifferent, 132, 137, 229
algebraic loop, 63, 135 preferred, 131, 137, 229
aliasing, 219 steps, 136, 229
analogue computer, 55 causality-assignment, 148
analogy central-heating system, 161
voltage-force, 108 closed path, 78
voltage-pressure, 108 code disc, 114, 212
voltage-velocity, 108 code generation
angular mass, 48 automatic, 165
angular velocity, 91 commutation, 115
anti-aliasing filter, 220 competent model, 136
automatic code generation, 165 compliance, 29
component, 43, 143
Backward Differentiation Formula (BDF), 63 conjugated variables, 161
backward Euler differentiation, 60 continuous-time system, 23
backward Euler integration, 60, 63 control, 169
backward Euler integrator, 62 fuzzy, 175
bank account, 17 control engineering, 177
BDF (backward differentiation formula), 65 control system, 6
belt-pulley, 93, 95 controlled variable, 174
bilateral interaction, 8 controller, 170
bilateral signal flow, 113 counter electromotive force, 116
block diagram, 20, 140, 149 current law of Kirchhoff, 78
basic configurations, 233 current source, 50, 74
feedback configuration, 150 modulated, 144
parallel configuration, 150
series configuration, 150 d’ Alembert’s law, 97
bond graph, 112, 140, 145 DA-converter, 213
bonds, 110 damping, 86
boundary, 6 damping ratio, 86, 99
buffer, 23 DC-motor, 141
buffering capacity, 21 delay operator z −1 , 60
building blocks, 202 dependent states, 133
derivative, 33
capacitor, 31 derivative form, 33

235
236 INDEX

second derivative, 34 static, 44


derivative control, 176 error signal, 174
deriving equations, 165 Euler
difference equations, 59 backward Euler differentiation, 60
differential equation, 35 backward Euler integration, 60
first-order, 36 forward Euler differentiation, 61
second-order, 45 forward Euler integration, 61
differential operator, 34, 80 exponential growth, 17, 24
differentiation, 33
differentiator, 199 feed-forward control, 175
digital control systems, 210 feedback, 6, 24
diode, 151 feedback control, 6
diode bridge, 154 feedback loop, 6
discrete integrator negative feedback, 21, 22, 24
backward Euler, 62 positive feedback, 17, 22, 24
forward Euler, 61 filter
discrete system, 22 low pass, 82
discretisation finite-elements analysis, 44
in amplitude, 212 first-order differential equation, 36
in time, 212 first-order system
double-sided rectification, 154 gain, 84
drag, 40 time constant, 83
drag coefficient, 40 fixed causality, 125
dual, 72 fixed effort-out causality, 125
dynamic equilibrium, 45 fixed flow-out causality, 125
flow variables, 121
edge, 8 flow-out causality, 124
effort variables, 121 flux linkage, 31, 70
effort-out causality, 124 force source, 95
electrical motor, 115 forward Euler
electrical resistance, 41 differentiation, 61
electrical systems, 151 integration, 61, 62
elementary physical models, 43 integrator, 61
elementary system, 6 foxes and rabbits, 15
elements, 43, 143 friction, 41
elevator, 157 full-wave rectification, 154
embedded fuzzy control, 175
computers, 210
control systems, 210 gain, 84, 197
EMF, 116 gain K , 87
emitter follower, 195 gear, 93
energy ground, 49
electrical, 70 gyration ratio, 72
kinetic, 92 gyrator, 72
potential, 92 icon, 73
spring, 93
environment, 4, 6 hard real time, 210
equilibrium hold circuit
dynamic, 45 zero-order hold, 214
INDEX 237

Hooke’s law, 29 mass, 29


hydraulic inertia, 42 mass moment of inertia, 48
hydraulic systems, 160, 209 mass-spring-damper system, 44
Matlab, 57
iconic diagram, 44 mechanical systems, 157
icons mechatronics, 107
rotation, 48 Mobile Autonomous Robot Twente (MART),
translation, 44 101
ideal current source, 76 model, 14, 15
ideal physical model, 43, 143 definition, 3
IPM, 43 modelling, 3
ideal voltage source, 76 modulated
impedance, 96 current source, 144
capacitor, 81 force source, 95
inductor, 81 torque source, 145
resistor, 81 velocity source, 95, 145
indifferent causality, 124 voltage source, 73, 83, 144, 196
inductance, 31 modulating signal, 144
initial condition, 32 moment of inertia, 48, 91
input multiple views, 47
input signal, 6, 18, 22
integral, 19 natural frequency, 86, 99
initial condition, 32 negative feedback, 17, 24
integral form, 33 Newton’s law, 29, 96
integrator, 23, 199 node, 78
leaking, 169 non-inverting input, 195
inverter, 197 non-linear, 25, see also linear system
inverting input, 195 numerical integration, 57
IPM, 43, 140 Nyquist rate, 219
irreversible, 70
iteration, 63 Ohm’s law, 41
one-port element, 109
kinetic energy, 92 op-amp, 194
Kirchhoff adder, 198, 234
current law, 78 differentiator, 199
voltage law, 79 emitter follower, 195, 234
gain, 197, 234
Laplace operator, 34, 80
integrator, 199, 234
leaking integrator, 169
inverter, 197, 234
lever, 94
inverting input, 195
linear relation, 25
low-pass filter, 200, 234
linear system, 25
modulated voltage source, 196
loop, 78
non-inverting input, 195
loop gain, 191
table with some basic circuits, 234
low-pass filter, 82, 84, 200
voltage follower, 195, 234
mechanical, 104
operational amplifier, see op-amp
low-pass network, 81
optical encoder, 114, 212
lumped-parameter model, 44
optimum controller, 186
orientation, 79
magnetic flux, 31
238 INDEX

output second derivative, 34


output signal, 6 second-order differential equation, 45
overshoot, 86, 176, 183 second-order system, 85
Segway, 10
passive circuit, 200 self inductance L, 32
patch board, 55 sensor, 108, 115, 174
path, 78 servo systems, 188
closed path , 78 setpoint , 173
PI-controller, 182 signal
PID-controller, 186 modulating, 144
pig cycle, 14 signals, 113
pneumatic controllers, 209 Simulink, 55
pork cycle, 14 soft real time, 210
port sorting, 66
one-port element, 109 source
two-port element, 110 current source, 50
positive feedback, 17, 24 voltage source, 50
potential energy spring constant, 29
mass, 92 state, 23, 32
spring, 93 integrator, 23
potentiometer, 117 summer, 23
power state variable, 23
electrical, 70 static equilibrium, 44
mechanical, 91 steady-state value, 182
power bonds, 110 storage, 23
power conjugated variables, 109 subsystem, 6
preferred causality, 126 sum, 19
proportional controller, 176 summer, 23, 61
proportional gain, 176 suspension system, 102
symbolic solution, 136
ramp signal, 171 system
RC network, 81 continuous-time system, 23
real time control system, 6
hard, 210 discrete system, 22
soft, 210 elementary system, 6
rectification, 71, 151 subsystem, 6
red causal stroke, 126 system (definition), 2
reference, 174 system boundary, 6
regulator systems, 188 system’s approach (definition), 2
relation diagram, 141
reversible, 70 tachogenerator, 117
RLC-network, 85 thermal systems, 161
rolling resistance, 40 thermostat , 170
rule of thumb for choosing the sampling THTSIM, 55
rate, 216 time constant, 83
rule of thumb for time step, 66 time delay, 211
torque, 91
sampling rate torque source
rule of thumb, 216 modulated, 145
INDEX 239

towing tank, 53
transducer, 108, 115
transfer function, 37, 60, 77
discrete, 60
transformation ratio, 72
transformer, 71
icon, 72
transient, 24, 171
transmission
ratio, 94
rotation, 94
translation, 95
trapezium rule, 65
Tustin, 64
TUTSIM, 55
two-port element, 72, 110

unstable system, 185

velocity source, 95
modulated, 145
viscous friction, 41
voltage follower, 195, 234
voltage law of Kirchhoff, 79
voltage source, 50, 72, 83
modulated, 144
voltage-force analogy, 108
voltage-pressure analogy, 108
voltage-velocity analogy, 108

water clock, 4
water hammer, 42
wind tunnel, 53

zero-order hold, 214


Dynamical Systems for Creative Technology has primarily been developed with the Creative
Dynamical Systems

Dynamical Systems
Technology students at the University of Twente in mind. The book gives a concise description
of the physical properties of electrical, mechanical and hydraulic systems. Emphasis is placed

for Creative Technology


on modelling the dynamical properties of these systems. By using a system's approach it is
shown that a limited number of mathematical formulas suffices to describe the basic
properties of all of these systems. Mathematical functions such as integration and
differentiation are introduced and directly related to physical phenomena. A more abstract
description helps to systematically analyse these systems and supports the modelling process.
Job van Amerongen
The book helps to understand the behaviour of technical and non-technical systems in
general. Emphasis is on making realistic models of physical systems, which can be applied in
animations or games. In terms of a dynamical model there is little difference between the
C
suspension system of a car and the motions of a flower in the wind. It is shown that all these Se T
systems share the same basic properties, which allows the use of analogon models. A more 1 R
1 J
abstract domain-independent description helps to better understand the dynamic behaviour 0
I
and allows for modifications of the system in the domain that is most easily accessible. C
1
1 R J
The last chapters give an introduction to the role of feedback in dynamical systems. Examples I
are shown by applying these concepts to electronic simulation models with operational 0
amplifiers. Feedback control systems are briefly introduced as a means to change the
1 C J
dynamical properties of a system by means of appropriate software. I
1
0 R
Extensive use is made of the modelling and simulation programme 20-sim. Exercises stimulate
exploration of the programme and experimenting with the models. The exercises are intended 1
I C J
to raise questions rather than being classroom problems with a straightforward solution. The
0 1
book is also a good background for 20-sim users who want to understand more of the R
underlying principles of 20-sim. I 1
C
J
0 1
R
Se

Job van Amerongen


Job van Amerongen is professor in Control Engineering at the University of Twente. He has
been teaching various courses on control engineering. He is author of three courses on
modelling and simulation and control engineering of the Open university in the Netherlands.
He has been active in research on adaptive control systems applied to adaptive autopilots
and rudder-roll stabilisation for ships. He is one of the pioneers of mechatronics. The
mechatronic design philosophy, i.e. ‘the optimal and integrated design of a physical system
together with its embedded control system’ forms the basis for this book as well.

achterkant 18,5 cm + 1,5 mm voor de lijm = 18,65 voorkant 18,5 cm + 1,5 mm voor de lijm = 18,65
rug 15 mm

Vous aimerez peut-être aussi