0% found this document useful (0 votes)
153 views395 pages

INTRODUCTION TO CONTRO SYSTEM Book PDF

Uploaded by

ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views395 pages

INTRODUCTION TO CONTRO SYSTEM Book PDF

Uploaded by

ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 395

Introduction to Control

Karl Johan Åström

Department of Automatic Control


Lund Institute of Technology
Lund University

c 2004 Karl Johan Åström



Department of Automatic Control
Lund Institute of Technology
Box 118
SE-221 00 LUND
Sweden

c 2004 by Karl Johan Åström. All rights reserved.


&
Contents

1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 A Brief History . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3 Process Control . . . . . . . . . . . . . . . . . . . . . . . . 14
1.4 Manufacturing . . . . . . . . . . . . . . . . . . . . . . . . 16
1.5 Robotics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.6 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.7 Aeronautics . . . . . . . . . . . . . . . . . . . . . . . . . . 24
1.8 Electronics and Communication . . . . . . . . . . . . . . 28
1.9 Automotive . . . . . . . . . . . . . . . . . . . . . . . . . . 33
1.10 Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
1.11 Mathematics . . . . . . . . . . . . . . . . . . . . . . . . . 39
1.12 Physics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1.13 Biology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
1.14 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2. Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 45
2.2 Simple Forms of Feedback . . . . . . . . . . . . . . . . . 46
2.3 Representation of Feedback Systems . . . . . . . . . . . 49
2.4 Properties of Feedback . . . . . . . . . . . . . . . . . . . 58
2.5 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.6 Open and Closed Loop Systems . . . . . . . . . . . . . . 66
2.7 Feedforward . . . . . . . . . . . . . . . . . . . . . . . . . . 68
2.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3. Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.2 Two Views on Dynamics . . . . . . . . . . . . . . . . . . . 72
3.3 Linear Differential Equations . . . . . . . . . . . . . . . 77
3.4 Laplace Transforms . . . . . . . . . . . . . . . . . . . . . 86

3
Contents

3.5 Frequency Response . . . . . . . . . . . . . . . . . . . . . 100


3.6 State Models . . . . . . . . . . . . . . . . . . . . . . . . . 129
3.7 Linear Time-Invariant Systems . . . . . . . . . . . . . . 139
3.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
4. Simple Control Systems . . . . . . . . . . . . . . . . . . . . . 163
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 163
4.2 Cruise Control . . . . . . . . . . . . . . . . . . . . . . . . 164
4.3 Control of First Order Systems . . . . . . . . . . . . . . . 168
4.4 Control of Second Order Systems . . . . . . . . . . . . . 178
4.5 Control of Systems of High Order* . . . . . . . . . . . . 185
4.6 Bicycle Dynamics and Control . . . . . . . . . . . . . . . 192
4.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
5. Feedback Fundamentals . . . . . . . . . . . . . . . . . . . . . 206
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 206
5.2 The Basic Feedback Loop . . . . . . . . . . . . . . . . . . 207
5.3 The Gang of Six . . . . . . . . . . . . . . . . . . . . . . . 210
5.4 Disturbance Attenuation . . . . . . . . . . . . . . . . . . 217
5.5 Process Variations . . . . . . . . . . . . . . . . . . . . . . 221
5.6 When are Two Processes Similar? . . . . . . . . . . . . . 229
5.7 The Sensitivity Functions . . . . . . . . . . . . . . . . . . 231
5.8 Reference Signals . . . . . . . . . . . . . . . . . . . . . . 235
5.9 Implications for Pole Placement Design* . . . . . . . . . 238
5.10 Fundamental Limitations* . . . . . . . . . . . . . . . . . 249
5.11 Electronic Amplifiers . . . . . . . . . . . . . . . . . . . . . 253
5.12 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
6. PID Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 259
6.2 The PID Controller . . . . . . . . . . . . . . . . . . . . . . 260
6.3 Integrator Windup . . . . . . . . . . . . . . . . . . . . . . 266
6.4 Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
6.5 Computer Control . . . . . . . . . . . . . . . . . . . . . . 277
6.6 Further Reading . . . . . . . . . . . . . . . . . . . . . . . 279
7. Loop Shaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 280
7.2 Compensation . . . . . . . . . . . . . . . . . . . . . . . . . 282
7.3 Bode’s Ideal Loop Transfer Function . . . . . . . . . . . 294
7.4 Robustness . . . . . . . . . . . . . . . . . . . . . . . . . . 297
7.5 Measurement Noise . . . . . . . . . . . . . . . . . . . . . 300
7.6 Load Disturbances . . . . . . . . . . . . . . . . . . . . . . 303
7.7 Limitations Caused by Non-Minimum Dynamics . . . . 308
7.8 Trade-offs . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
7.9 A Design Procedure . . . . . . . . . . . . . . . . . . . . . 323

4
Contents

7.10 Insights . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323


7.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
7.12 References . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
8. Feedforward Design . . . . . . . . . . . . . . . . . . . . . . . 331
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 331
8.2 Disturbance attenuation . . . . . . . . . . . . . . . . . . . 331
8.3 System inverses . . . . . . . . . . . . . . . . . . . . . . . 334
8.4 Response to Reference Inputs . . . . . . . . . . . . . . . 335
8.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
9. State Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 339
9.2 State Feedback . . . . . . . . . . . . . . . . . . . . . . . . 341
9.3 Observers . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
9.4 Output Feedback . . . . . . . . . . . . . . . . . . . . . . . 359
9.5 Comparison with PID Control . . . . . . . . . . . . . . . 364
9.6 Disturbance Models . . . . . . . . . . . . . . . . . . . . . 369
9.7 Reference Signals . . . . . . . . . . . . . . . . . . . . . . 373
9.8 An Example . . . . . . . . . . . . . . . . . . . . . . . . . . 378
9.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391

5
Contents

6
1
Introduction

1.1 Introduction

Control systems are ubiquitous. They appear in our homes, in cars, in


industry and in systems for communication and transport, just to give a
few examples. Control is increasingly becoming mission critical, processes
will fail if the control does not work. Control has been important for design
of experimental equipment and instrumentation used in basic sciences
and will be even more so in the future. Principles of control also have an
impact on such diverse fields as economics, biology, and medicine.
Control, like many other branches of engineering science, has devel-
oped in the same pattern as natural science. Although there are strong
similarities between natural science and engineering science it is impor-
tant to realize that there are some fundamental differences. The inspi-
ration for natural science is to understand phenomena in nature. This
has led to a strong emphasis on analysis and isolation of specific phe-
nomena, so called reductionism. A key goal of natural science is to find
basic laws that describe nature. The inspiration of engineering science
is to understand, invent, and design man-made technical systems. This
places much more emphasis on interaction and design. Interaction is a
key feature of practically all man made systems. It is therefore essential
to replace reductionism with a holistic systems approach. The technical
systems are now becoming so complex that they pose challenges compara-
ble to the natural systems. A fundamental goal of engineering science is
to find system principles that make it possible to effectively design com-
plex systems. Feedback, which is at the heart of automatic control, is an
example of such a principle.
A simple form of feedback consists of two dynamical systems connected
in a closed loop which creates an interaction between the systems. Simple

7
Chapter 1. Introduction

causal reasoning about such a system is difficult because, the first system
influences the second and the second system influences the first, leading to
a circular argument. This makes reasoning based on cause and effect diffi-
cult and it is necessary to analyze the system as a whole. A consequence of
this is that the behavior of a feedback system is often counterintuitive. To
understand feedback systems it is therefore necessary to resort to formal
methods.
Feedback has many advantages. It is possible to create linear behavior
out of nonlinear components. Feedback can make a system very resilient
towards external influences. The total system can be made very insensi-
tive to external disturbances and to variations in its individual compo-
nents. Feedback has one major disadvantage, it may create instability,
which is intrinsically a dynamic phenomenon. To understand feedback
systems it is therefore necessary to have a good insight into dynamics.
The wide applicability of control has many advantages. Since control
can be used in so many different fields, it is a very good vehicle for tech-
nology transfer. Ideas invented in one field can be applied to another
technical field.
Control is inherently multi-disciplinary. A typical control system con-
tains sensors, actuators, computers and software. Analysis of design of
control systems require knowledge about the particular process to be con-
trolled, knowledge of the techniques of control and specific technology
used in sensors and actuators. Controllers are typically implemented us-
ing digital computers. Knowledge about real time computing and software
is therefore also essential. Sensors and actuators are often often connected
by communication networks. This implies that knowledge about commu-
nication is also important. In the future we can see a convergence of the
technologies of control, computing and communication.
Team work is essential in control because of the wide range of tech-
nologies and techniques involved. Education in control has proven to be
an excellent background when working with complex engineering sys-
tems. The interdisciplinary nature of control has created some difficulties
for educators. Education and research in engineering grew out of specific
technologies such as mining, building of roads and dams, construction of
machines, generation and transmission of electricity, and industrial use
of chemistry. This led to an organization of engineering schools based on
departments of mining, civil engineering, mechanical engineering, elec-
trical engineering, and chemical engineering etc. This served very well
in the end of the 19th century and the beginning of the 20th century.
The situation changed significantly with the advent of fields like control,
that cut cross traditional department boundaries. Industry has adapted
relatively quickly to the new demands but academia has not.
There are many reasons why an engineer should know control. First

8
1.2 A Brief History

of all because practically all engineers will use control, and some will de-
sign control systems. But the most important reason is that control is an
essential element of practically all engineering systems. It happens too
often that systems perform poorly because they are designed from purely
static analysis with no consideration of dynamics and control. This can
be avoided by considering control and dynamics at the the beginning of
the design. To do this is is necessary that all engineers in a team have
some knowledge of control even if they are not specialists. Control can
also give designers extra degrees of freedom. It is in fact a very powerful
tool for designers of all systems. Cars are typical examples. The strin-
gent requirements on emission were solved by controlling the combustion
engines. Other examples are anti-lock braking systems traction control
and roll stability control. Other reasons to study control is that there are
many beautiful theoretical results and some really neat devices.
Control has for a long time been confined to engineering but it is in-
creasingly clear that the ideas and concepts have a much wider use. The
concepts of feedback and control are thus essential in understanding bio-
logical and economical systems. We illustrate this with a quote from the
book Way Life Works : The Science Lover’s Illustrated Guide to How Life
Grows, Develops, Reproduces, and Gets Along – by Mahlon Hoagland,
Bert Dodson.
Feedback is a central feature of life: All organisms share the
ability to sense how they are doing and to make changes in
"mid-flight" if necessary. The process of feedback governs how
we grow, respond to stress and challenge, and regulate factors
such as body temperature, blood pressure and cholesterol level.
This apparent purposefulness, largely unconscious, operates at
every level - from the interaction of proteins in cells to the
interaction of organisms in complex ecologies.
It is thus reasonable to claim that control not only makes our lives
more comfortable it is also essential for our existence.
The rest of this chapter gives a brief history of the development of the
field of control. The richness of the field is then illustrated by a number
of examples from a wide range of applications ranging from industrial
applications to biology.

1.2 A Brief History


Although there are early examples of the use of feedback in ancient his-
tory, the development of automatic control is strongly connected to the
industrial revolution and the development of modern technology. When

9
Chapter 1. Introduction

new sources of power were discovered the need to control them immedi-
ately arose. When new production techniques were developed there were
needs to keep them operating smoothly with high quality.

The Centrifugal Governor


The centrifugal governor is one of the most celebrated early feedback sys-
tems. It was first used to control the speed of windmills. Later around
1788 it was used by James Watt to control the velocity of steam engines.
A textile mill is a typical application, one steam engine drives several spin-
ning wheels and looms. The power from the steam engine is transmitted
to the spinning wheels and looms via belt-drives. It is highly desirable
to keep the speed of the steam engine constant because changes in speed
may cause thread breaks and require adjustments of the looms. It was
observed that engine speed changed with changes in the load, for example
when a loom was connected to the drive belt. The centrifugal governor was
introduced in order to keep the speed constant. Figure 1.1 shows a typical
system. It consists of two balls hinged on a rotating shaft which is con-
nected to the output shaft of the steam engine. When the speed increases,
the balls swing out. This motion is connected to the valve which admits
steam into the engine via mechanical links. The connection is made in
such a way that steam flow increases when the velocity decreases. The
system is a feedback system because changes in the velocity are fed back
to the steam valve. The feedback is negative because the the steam supply
is increased when the velocity decreases.
The improvement obtained when using a centrifugal governor is illus-
trated in Figure 1.2. The figure shows that the velocity drops when an
additional loom is connected to the drive belt. The figure also shows that
the velocity drop is significantly smaller when a centrifugal governor is
used.
It is possible to change the characteristics of the governor by changing
the mechanism that transmits the motion of the balls to the steam valve.
To describe this we introduce the notion of gain of the governor. This is
the ratio of the change in steam valve opening (∆ u) to the change (∆ v)
of the velocity. See Figure 1.2 which shows how the velocity responds to
changes in the load. The figure shows that the velocity error decreases
with decreasing gain of the controller but also that there is a tendency
for oscillations. The system becomes unstable for large gain. The centrifu-
gal governor was a very successful device that drastically simplified the
operation of steam driven textile mills.
The action of the basic centrifugal governor can crudely be describe
with the equation
u = k( Vr − V ) + b

10
1.2 A Brief History

Figure 1.1 The centrifugal governor, which has been used to control the speed of
engines since the beginning of the industrial revolution. When the axis spins faster
the balls move away from the axis. The motion is transfered to the engine to reduce
its power. The governor has also become an icon of the field of control.

where u is the opening of the steam valve, Vr is the desired speed, V


the actual speed and k and b are constants. This is called a proportional
controller because the control action u is proportional to the error. The
parameter b is a bias term that was adjusted manually to make sure that
the V was equal to Vr . Siemens made a clever invention which eliminated
the bias adjustment. His governor can mathematically be described by the
equation
Z t
u = k( Vr − V ) + ki ( Vr (τ ) − V (τ ))dτ (1.1)
0

the bias term was thus replaced by a term proportional to the integral of
past errors. A controller described by (1.1) has the amazing property that
the velocity V is always equal to the desired velocity Vr in steady state.
This is illustrated by Figure 1.2 which shows the behavior of an engine
with control actions proportional to the integral of the error. In standard
terminology the Siemens governor is called a PI controller, indicating that
the control action is proportional to the error and the integral of the error.
Integral action has some amazing properties that will be discussed further
in Section 2.2.

The Emergence of Control


Apart from the centrifugal governor the early applications of control in-
clude, autopilots for ships and aircrafts, the electronic feedback amplifier
and process control. The fundamental similarities between the different

11
Chapter 1. Introduction

Proportional control Proportional and integral control


3 3

Velocity

Velocity
2 2

1 1

0 0
0 2 4 6 8 10 0 2 4 6 8 10

4 4

3 3
Load

Load
2 2

1 1

0 0
0 2 4 6 8 10 0 2 4 6 8 10
Time Time

Figure 1.2 Response of the velocity to changes in the load of an engine controlled
by a governor with proportional control left and proportional and integral control
right. The values of the gain in the left figures are, k = 0 (dashed), k = 1 (full),
k = 12 (dash-dotted). In the right figure the dashed curve represents proportional
control ( k = 1) and the full line PI control ( k = 1 and ki = 0.5).

systems were not noticed. Control emerged around 1945 as a result of


intensive military research in the period 1940-1945. During the Second
World War it became apparent that science and technology could have
a major impact on the war effort. Among the goals were development
of radar and fire control systems. Control was a central feature element
of these systems. In many countries groups of scientists and engineers
were gathered in research institutes. It was realized that feedback was
essential for such diverse systems as autopilots for ships and aircrafts,
electronic amplifiers, systems for orientation of radar antennas and guns,
and industrial production of uranium. Control was born out of this multi-
disciplinary effort.
The first manifestation of control was called servo-mechanism theory.
This theory used block diagrams as a tool for abstraction. This clearly
showed the similarity between the widely different systems. The math-
ematical tools were Laplace transforms and the theory of complex vari-
ables. Analog computers were used for simulation and controllers were
implemented as analog computers. It is significant that one of the first
books was edited by three persons, James who was a professor of Physicsa
mathematician, Nichols who was an engieer at an instrument company
and a Phillips who was a mathematician.
One factor that strongly contributed to the emergence of control was
that many of the results from the military efforts were disseminated very

12
1.2 A Brief History

quickly. After the war it became apparent that control was very useful
in practically all branches of engineering and the ideas spread like wild
fire around the world. One result was that education in control was in-
troduced as an essential element of engineering education practically all
over the world. A characteristic feature of control is that it is not con-
fined to a particular branch of engineering such as mechanical, electrical,
chemical, aeronautical, and computer. Control appears in all disciplines,
it is actually the first systems science.
In the late 1950’s there were organizational activities which created
meeting places for researchers and practitioners of control. Conferences
were organized and journals on control started to appear. The Interna-
tional Federation of Automatic Control (IFAC) was the key organization
but the traditional engineering organization also introduced special inter-
est groups on control. The first World Congress of IFAC in Moscow in 1960,
where control engineers and scientists from all over the world met for the
first time, was a landmark. Another effect was the industrialization of
control which created companies specializing in control equipment.

The Second Wave


Any field could have been proud of the development that took place from
1940 to 1960, a second wave of development starting in the late 1950s. The
driving forces were new challenging applications and a strong stimulation
from mathematics. The major drivers for the development were the space
race and the use of digital computers for industrial process control. Notice
that Sputnik was launched in 1957 and the first procss control computer
was installed in an oil refinery in 1959. There was a very vigorous devel-
opment of both theory and practice of control. Digital computers replaced
analog computers both for simulation and implementation of controllers.
A number of subspecialities of control were also developed. It turned out
that a wide range of mathematics fitted the control problems very well,
and a tradition of a high respect for mathematical rigor emerged.
Today control is a well established field with a solid body of theory
and very wide applications. Practically all controllers are today imple-
mented in digital computers. There are also many challenges. Control is
increasingly becoming mission critical which requires that safety and re-
liability are very important. The complexity of the control systems are
also increasing substantially.
There are tremendous challenges in the future when we can visualize a
convergence of control, computing and communication which will result in
large interconnected systems. It is also reasonable to guess that a deeper
understanding of control in the field of biology will be very exciting. In
this sections we will present a number of applications together with some
historical notes. The idea is to illustrates the broad applicability of control

13
Chapter 1. Introduction

and the way it has impacted on many different fields.

1.3 Process Control

Many products that are essential for us in daily life are manufactured
by the process industries. Typical examples are oil, petrochemical, pa-
per, pharmaceuticals. These industries use continuous manufacturing pro-
cesses. Process control is an essential part of these industries, the pro-
cesses can not be run without control systems. Control of engine speed
using the centrifugal governor represent early examples of process control,
see Section 1.2.

Advances in Process Control


Key issues in process control are to:
• Keep essential quality variables at specified values.
• Minimize use of energy and raw material.
• Make rapid changes of production or grades.
The control systems are key factors to obtain these goals. There have been
major advances since the centrifugal governor appeared.
In the centrifugal governors the actions of sensing, computing and ac-
tuation were executed by purely mechanical devices. A lot of ingenuity
went into the designs which were often patented. Feedback actually had
a crucial role in the design of the controllers. By using feedback it was pos-
sible to construct controllers that had a stable well defined behavior from
components with a large variability. The technology of controlling engine
speed by governors was applied to all types of engines. When electricity
emerged in the end of the 19th century there was a similar need to control
the speed of generator for hydroelectric generators. Since there was lit-
tle communication between different fields ideas like integral action were
reinvented several times. Major advances were made in the 1930s and 40s.
Controllers then appeared as special devices separated from sensors and
actuators. New industries , such as Fisher Control, Foxboro, Honeywell,
Leeds and Northrup, Taylor Instruments, which supplied sensors, actu-
ators, controller and complete system emerged. The controllers were im-
plemented in different technologies, mechanic, pneumatic and electronic.
Controllers for many loops were located in central control rooms. The
technology of using digital computers for process control emerged in the
1960s. Computer control is the standard technology for process control.
New companies have often emerged when major technology changes oc-
curred, there have also been many mergers. Today there are a few large

14
1.3 Process Control

Figure 1.3 Microprocessor based single loop controller. By courtesy of ABB In-
dustrial Systems.

companies that supply control world wide, ABB, Honeywell, Siemens and
Toshiba.
The processes vary significantly in scale, a small process unit may
have 20-100 control loops but a complete paper mill may have 5000 control
loops. A wide variety of systems are used for control. There are micropro-
cessor based controllers for single or multiple loops, see Figure 1.3, sys-
tems based on personal computers (PC), programmable logic controllers
(PLCs) and distributed control systems consisting of many computers
connected in a network, see Figure 1.4 Large plants may have 5000-
10000 control loops, organized in an hierarchical structure. Most (about
90%) of the lower level control loops are still PID control, which is imple-
mented in the digital computer.

The Role of Sensors


Sensors are key elements of control systems because they provide infor-
mation about the process. The variables of primary interest in process
control are closely related to product quality. Unfortunately it is very dif-
ficult to measure such variables on-line. Control is therefore often done
indirectly by controlling secondary variables such as level, temperature
and pressure. The on-line measurements are often augmented by labora-
tory analysis of samples of the product.
There are interesting synergies between development of sensors and
control. Feedback is often used in sensors. When new sensors become

15
Chapter 1. Introduction
Plant
manager

Order Production Financial


Purchaser
handler manager manager

Lab Process
assistant Plant network operator

Lab Admin. Information Operator


computer computer station station

Control network

Process Process Process


station station station
Field
bus

Process

Figure 1.4 Modern industrial systems for process control, like the Advant OCS
tie computers together and help create a common uniform computer environment
supporting all industrial activities, from input to output, from top to bottom. (By
courtesy of ABB Industrial System, Västerås, Sweden.).

available there are opportunities to develop new control systems. One


example is the emergence of sensors for on-line measurement of basis
weight and moisture in the 1960s which led to emergence of two new
companies Accuray and Measurex which specialized in control of paper
machines. There is a similar window of opportunity today because new
sensors for measuring composition and surface structure based on infrared
and near infrared spectroscopy are available.

1.4 Manufacturing
Process control is continuous manufacturing. Feedback has also had a
major impact on manufacturing of discrete parts. Numerically controlled
machine tools developed at the Control Systems Laboratory Kolla!! at
MIT in the 1950s was a first step where control was used to improve

16
1.4 Manufacturing

Manufacturer Supplier Wholesaler Retailer

Figure 1.5 Schematic diagram of a simple supply chain consisting of manufactur-


ing, suppliers, wholesaler and retailer, with delays between the different operations.

precision of mechanical machining. Welding is highly automated using


control and vision systems. Machines for manufacturing systems based
on machining with lasers and electrical arcs depend heavily on use of
control.
Large manufacturing operations are made on transfer lines, where
the parts are moved along a line to stations which perform the opera-
tions. The individual stations do operations such as drilling, machining
and polishing. A line for making car engines has 10 to 20 machines, which
are separated by buffers. Each machine has around 10 stations. The there
are simple continuous control systems in each station for tasks such as
positioning. A complete transfer line has a few hundred feedback loops.
The major control problem is, however, the safe control of the whole op-
eration, for example, to determine when a part should be moved, when a
drilling operation should start, when a tool should be removed. This is a
discrete control problem where the information comes from on-off signals
such as limit switches. The control actions are also discrete, to start a
motor, to start drilling, to stop drilling, to change a tool. The systems are
very complex because of the large number of signals involved. A single
station in a transfer line may have 5 to 10 000 discrete inputs and output
and 10 to 20 continuous control loops. Logic control was originally done
by relay systems. When microprocessors were developed in the 1970s the
relays were replaced by programmable logic controllers (PLCs). Design
of the discrete control system is typically done in an ad hoc manner based
on past experience. A general solution is still missing.

Supply Chains
There are also other uses of control in manufacturing, namely control of
the complete business operation and complete supply chains. Manufac-
turing and distribution involve large flows of materials. Raw materials
have to be supplied to the manufacturer, the products have to be supplied
to the consumers. This is illustrated in Figure 1.5 which shows a simple
supply chain. The diagram shows only a few levels, in practice a system
may contain thousands of outlets and storages and it may deal with a
very large number of products. Several important functions in the system
like quality control, sales, and production management are not shown in

17
Chapter 1. Introduction

the figure.
Manufacturing facilities and sales operations have traditionally been
quite inflexible in the sense that it is difficult to change products and
production rates. In such a system it is necessary to have many buffer
storages to match production rates to fluctuating sales and supplies of
raw materials and parts from sub-contractors. Production rate is largely
determined in an open loop manner based on prediction of sales. An elab-
orate bookkeeping system is also required to keep inventories of parts.
A different system is obtained if the production time can be reduced
and if the production can be made so flexible that products can be changed
rapidly. It is then possible to produce a part when an order is obtained.
Such a system may be regarded as a closed loop system where production
is determined by feedback from sales. An advantage of such a system is
that inventories can be reduced significantly. Administration of the system
is also greatly simplified because it is no longer necessary to keep track
of many products and parts in storage. A system of this type contributed
significantly to the efficiency of Wal-Mart. Kolla They relied on human
sensors in the form of managers who analyzed the sales when the shops
were closed every evening to make new orders.

1.5 Robotics
The origin of the industrial robot is a patent application for a device called
Programmed Article Transfer submitted in 1956 by the engineer George
Devol. The robotics industry was created when Devol met Joseph En-
gelberger and they founded the company Unimation. The first industrial
robot, Unimate, was developed by in 1961. A major breakthrough occurred
in 1964 when General Motors ordered 66 machines Unimate robots from
Unimation. In 1998 there were about 720 000 robots installed. The ma-
jority of them, 412 000 are in Japan. Robots are used for a wide range
of tasks: welding, painting, grinding, assembly and transfer of parts in
a production line or between production lines. Robots that are used ex-
tensively in manufacturing of cars, and electronics. There are emerging
applications in the food industry and in packaging. Robots for vacuum-
ing and lawn moving as well as more advanced service robots are also
appearing.
Robots are also started to be used used in medical applications. This
is illustrated in Figure 1.6 which shows robots that are used for an endo-
scopic operation. One advantage of the system is that it permits doctors
to work much more ergonomically. Another advantage is that operations
can be done remotely. The system in the figure is from a robot operation,
where the patient was in Strasbourg, France and the doctors in New York.

18
1.5 Robotics

Figure 1.6 Remote robot surgery using the ZEUS system from Computer Motion
Inc. The doctors on the left are in New York and the patient and the robots are in
Strasbourg, France. Courtesy of Computer Motion Inc. Goleta

Another aspect of robots


The word robota is a Slavic word that means work, often meaning of slave
work. It came into prominence in a novel from 1918 and a play from 1921
by the Czeck author Karel Capek called Rossum’s Universal Robots. The
play is about robot workers who revolt and kill their human ruler. Another
literary aspect of robot is the famous robot trilogy by Isaac Asimov from
1940 who introduced the three laws of robotics
First Law: A robot may not injure a human being, or, through inaction,
allow a human being to come to harm.
Second Law: A robot must obey orders given it by human beings, except
where such orders would conflict with the First Law.
Third Law: A robot must protect its own existence as long as such pro-
tection does not conflict with the First or Second Law.
Asimovs book captured the imagination of many and there is clear evi-
dence that Engelberger was inspired by Asimovs writing. Other examples
about imaginative speculations about robots are found in Arthur Clarkes
book 2001 A Space Odyssey where the robot HAL takes over the operation
of a space ship and R2- D2 in the Star Wars series.
There are currently some very interesting developments in robotics.
Particularly in Japan there is much research on humanoid and animaloid
robots. There are very advanced humanoid robots in research laboratories,
there are also robots that mimic snakes, cats, birds and fish. A robot dog
AIBO and a service robot have been commercialized by Sony.

19
Chapter 1. Introduction

Design Issues - Task Based Control and Automomy


Design of robots is a typical multidisciplinary task which is a mixture
of mechanical engineering, electronics, computer science, artificial intelli-
gence, and control. It is a typical example of the challenges posed by new
industries. Control systems are essential parts of a robot.
The control problems for industrial robots are servo problems, typically
to control position of an arm, the trajectory of a tool or the force exerted
by a tool. There are also other forms of feedback based on force sensors
and vision.
Humanoid robots require a much more advanced task based control. It
is necessary to provide them with functions for obstacle avoidance, path
planning, navigation and map making. Since the robots have to be highly
autonomous they must also have capabilities for learning, reasoning and
decision making. Development of systems with such capabilities is a chal-
lenging research task.

1.6 Power
The power industry started to develop in the end of the 19the century and
accelerated rapidly in the 20th century. Availability of power has improved
quality of life tremendously. In 2000 the total amount of electric energy
generated in the world was about about 15 000 TWh. It is expected to
grow by a factor of 3 in 60 years where the main growth is outside the
OECD countries.
Control is an essential element in all systems for generation and trans-
mission of electricity. Many central ideas in control were developed in this
context. When electricity emerged in the end of the 19th century the gen-
erators were typically driven by water turbines. Since alternating current
(AC) was the preferred means for transmission there was immediately a
need to control the speed of the generators to maintain constant frequency.
Derivative and integral control appeared early as did stability critiera.
The development paralleled the work on centrifugal governors but it was
done independently and it had a stronger engineering flavor. One of the
earliest books on control, with the title Die Regelung der Kraftmaschinen,
was published by Tolle as early as 1905. It was discovered that the perfor-
mance of hydroelectric power stations was severely limited by dynamics
of the water duct. The power decreased rapidly initially when the valve
was opened and then increased slowly. This property made the systems
difficult to control. It is an example of what is now call a non-minimum
phase dynamics.
As the demand for electricity grew many generators were connected in

20
1.6 Power

a network. These networks became larger and larger as more generators


and consumers were connected. Figure 1.7, which is a schematic picture
of the network for the Scandinavian countries, is an example of a network
of moderate size. Sweden, Norway and Finland has much hydroelectric
power, Sweden and Finland has nuclear power and Denmark has wind
and thermal power. In Sweden the hydroelectric power is generated in
the north, but most of the consumption is in the south. Power thus has to
be transmitted over long lines. The system in the different countries are
connected via AC and DC lines. There are also connections to Germany
and Poland.
It is difficult to store energy and it is therefore necessary that pro-
duction and consumption are well balanced. This is a difficult problem
because consumption can change rapidly in a way that is difficult to pre-
dict. Generators for AC can only deliver power if the generators are syn-
chronized to the voltage variations in the network. This means that the
rotors of all generators in a network must line up. Synchronism is lost
when the angles deviate too much.
Matching production and consumption is a simple regulation problem
for one generator and one consumer, but it is a more difficult problem
in a highly distributed system with long distances between consumption
and generation. To have a reliable system it is highly desirable to avoid
transmission of information over long distances. Control should therefore
be done locally at each station based on the information available at the
station. Several interesting control principles have been developed to do
this. Control of each generator must be based on information that is locally
available. Because of reliability requirements it is not possible to rely on
information that is transmitted over wide distances.

High Voltage DC Transmission Systems


Even if most of the electricity is transmitted as AC there are some sit-
uation where it is advantageous to transmit direct current (DC). One
example is when electric power has to be transmitted using under wa-
ter cables. DC links can also be used to connect two asynchronous power
grids. The systems for transmission of high voltage DC (HVDC systems)
have many interesting properties. A schematic picture of such a system
is shown in Figure 1.8. The AC is rectified to generate DC which is trans-
mitted and converted to AC by the inverter. The rectifier and the inverter
consists of semiconductor switches that permit very rapid changes of the
power. It is possible to switch the direction of 600MW in fractions of a sec-
ond. Control of such a system in a safe precise way is a great challenge.

21
Chapter 1. Introduction

Figure 1.7 The Nordel power grid which supplies electric energy for the Scan-
dinavian countries. The squares represent hydroelectric stations and the triangles
represent thermal stations, both nuclear and conventional, and circles denote trans-
formers. The lines denote major power lines. Only the major components are shown
in the system.
22
1.6 Power

DC line

Rectifier Inverter

Figure 1.8 Schematic diagram of an HVDC transmission link. The system is fed
from the right by AC which is converted to DC by the rectifier and transmitted over
a DC line to the inverter which converts it to AC.

Control of Networked Power Systems


An interconnected power system of the type shown in Figure 1.7 is a
complicated system. The behavior of such systems is not easy to predict.
Problems when interconnecting two systems were encountered by Edison.
He found that it was not possible to connect two turbine driven generators
when both generators had controllers with integral action. The system
will drift so that one generator takes all the load. This was one of the
first observations that problems may occur when several regulators are
connected to an integrated system.
Edisons observation led to interesting developments of control theory.
In current practice one large generator in the network controls the fre-
quency using a controller with integral action. The other generators use
proportional control. The amount of power delivered by each generator is
set by the gain of the proportional controller. Each generator has separate
voltage control.
There have been many other surprises in interconnected systems. In
the Nordel system it has been observed that a moderated increase of
power load in the north could result in large oscillations in the power
transmission between Sweden and Denmark in the south. Oscillations
have been observed when modern trains with switched power electronics
have put in operation. An understanding of such phenomena and solutions
require knowledge about dynamics and control.

Safety and Reliability


The power systems are generally very reliable. Customers will have power
even when generators and lines fail. This is achieved by good engineering
of the system based on redundancies. Networked generators contribute
significantly to the reliability of the system because it is possible for a
large number of generators to take up the load if one generator fails. The
drawback is however that there may be massive failures in the system
which also has occurred. This is illustrated in Figure 1.9 which shows the

23
Chapter 1. Introduction

1
10

0
10

-1
10

-2
10
10 4 10 5 10 6 10 7

Figure 1.9 Power outages in the US 1984-97. The horizontal axis shows the num-
ber of persons N affected by the outages and the vertical axis shows the yearly
frequency of outages that influence more than N persons. Notice that the scales on
both axes are logarithmic.

statistics of power failures.

1.7 Aeronautics

Control has often emerged jointly with new technology. It has often been
an enabler but in some cases it has had a much more profound impact.
This has been the case in aeronautics and astronautics as will be discussed
in this section.

Emergence of Flight
The fact that the ideas of control has contribute to development of new
technology is very nicely illustrated by the following quote from a lecture
by Wilbur Wright to the Western Society of Engineers in 1901:

“ Men already know how to construct wings or airplanes, which


when driven through the air at sufficient speed, will not only
sustain the weight of the wings themselves, but also that of
the engine, and of the engineer as well. Men also know how to
build engines and screws of sufficient lightness and power to
drive these planes at sustaining speed ... Inability to balance
and steer still confronts students of the flying problem. ... When
this one feature has been worked out, the age of flying will have
arrived, for all other difficulties are of minor importance.”

24
1.7 Aeronautics

Figure 1.10 Picture from Sperry’s contest in Paris. Sperry’s son Lawrence is at
the stick and the mechanic walks on the wings to introduce disturbances. Notice
the proximity to the ground.

The Wright brothers thus realized that control was a key issue to enable
flight. They resolved compromise between stability and maneuverability
by building an airplane, the Wright “Flyer”, that was unstable but ma-
neuverable. The pioneering flight was in 1903. The Wright Flyer had a
rudder in the front of the airplane, which made the plane very maneu-
verable. A disadvantage was the necessity for the pilot to keep adjusting
the rudder to fly the plane. If the pilot let go of the stick the plane would
crash. Other early aviators tried to build stable airplanes. These would
have been easier to fly, but because of their poor maneuverability they
could not be brought up into the air. By using their insight and skillful
experiments the Wright brothers made the first successful flight at Kitty
Hawk in 1903. The fact that this plane was unstable was a strong impetus
for the development of autopilots based on feedback.

Autopilots
Since it was quite tiresome to fly an unstable aircraft, there was strong
motivation to find a mechanism that would stabilize an aircraft. Such a
device, invented by Sperry, was based on the concept of feedback. Sperry
used a gyro-stabilized pendulum to provide an indication of the vertical.

25
Chapter 1. Introduction

Figure 1.11 Excerpt from article in New York Times on September 23, 1947,
describing the first fully automatic transatlantic flight.

He then arranged a feedback mechanism that would pull the stick to


make the plane go up if it was pointing down and vice versa. The Sperry
autopilot is the first use of feedback in aeronautical engineering. Sperry
won a prize in a competition for the safest airplane in Paris in 1912.
Figure 1.10 is a picture from the event. The autopilot is a good example
of how feedback can be used to stabilize an unstable system.

Autonomous Systems
Fully automatic flight including take off and landing is a development
that naturally follows autopilots. It is quite surprising that this was done
as early as 1947, see Figure 1.11. The flight was manually supervised but
the complete flight was done without manual interaction.
Autonomous flight is a challenging problem because it requires auto-
matic handling of a wide variety of tasks, landing, flying to the normal
flight altitude, navigation, approaching the airfield, and landing. This re-
quires a combination of continuous control with discrete control and logic,
so called hybrid control. In the flight by Robert E. Lee the logic required
was provided by an IBM computer with punch cards. The theory of hybrid
systems is still in its infancy. There are many similarities with the prob-
lem of designing humanoid robots. They require facilities for navigation,
map making, adaptation, learning, reasoning. There are many unsolved

26
1.7 Aeronautics

CM
CP

CP
CM

Figure 1.12 Schematic digram of two aircrafts. The aircraft above is stable be-
cause it has the center of pressure behind the center of mass. The aircraft below is
unstable.

research problems in this field.


The use of autonomous systems is rapidly increasing. The Boeing 777
and the Airbus are modern examples of systems with a high degree of
autonomy. There have also been extensive developments of Unmanned
Air Vehicles (UAV).

Integrated Process and Control Design


Flight control is a good illustration of the value of integrated process and
control design. The Wright brothers succeeded where others failed, be-
cause they made an unstable airplane that was maneuverable. Aircrafts
that were both stable and maneuverable were built later. There are still
substantial advantages in having unstable aircrafts that rely on a con-
trol system for stabilization. Modern fighters obtain their performance in
this way. A schematic picture of two modern jet fighters are shown in Fig-
ure 1.12. The positions of the center of mass CM and the center of pressure
are key elements. To be stable the center of pressure must be behind of
the center of mass. The center of pressure of an aircraft shifts backwards
when a plane goes supersonic. If the plane is stable at sub-sonic speeds
it becomes even more stable at supersonic speeds. Very large forces and
large control surfaces are then required to maneuver the airplane. A more
balanced design is obtained by placing the center of pressure in front of
the center of mass at sub-sonic speeds. Such a plane will however by
unstable at sub-sonic speeds, i.e. at take off and landing. This imposes
severe constraints on the safety and robustness of the control system,
but the aircraft will have superior performance. When the control system
becomes a critical part of the system there are strong demands on the

27
Chapter 1. Introduction

reliability of the control system because the system fails if the controls
fails.
The development of aeronautical and aerospace engineering has often
gone hand in hand with the development of feedback control. It was real-
ized that control has to be considered up front in the design and not as an
add on. Control, structures, engines, and aerodynamics thus have to be
considered in all phases of the design process. An interesting illustration
of this is the recent development of high performance military aircrafts.
Most aircrafts built today are designed to be stable.
Control is also mission critical for rockets and satellites.

1.8 Electronics and Communication

Electronics emerged in the in 1906 with the invention of the audion, a


prototype of the vacuum tube, by Le De Forest. This was the start of the
revolutionary development of the electronics industry which has had a
big impact on the way we live. Control has had a major impact on this
industry as well. The first application of feedback in electronics was a
patent on vacuum tube amplifiers by the rocket pioneer Robert Goddard
in 1912, but the most influential development is undoubtedly the nega-
tive feedback amplifier. Before dealing with this we will, however, briefly
discuss an application of positive feedback.

The Super-regenerative Amplifier - Positive Feedback


Vacuum tubes were expensive and it was highly desirable to use as few
amplifiers as possible. In 1915 Armstrong suggested to use positive feed-
back to obtain a high amplification. A schematic of Armstrongs amplifier
is shown in Figure 1.13.
Assume that the current I into the amplifier is zero, then the current
through the resistors R1 and R2 are the same. It then follows from Ohms
Law that
V1 − V V − V2
= (1.2)
R1 R2
Let G be the open loop gain of the amplifier, it then follows that

V2 = GV (1.3)

Eliminating the variable V between Equations (1.2) and (1.3) gives the
following equation for the ratio of the output and input voltages

V2 R1
=G (1.4)
V1 R1 + R2 − G R2

28
1.8 Electronics and Communication

R2

R1
I
+
V

V1 V2

Figure 1.13 Schematic diagram of Armstrongs super-regenerative receiver. Kolla


lamp

This equation gives the gain of the amplifier with positive feedback. The
gain is very large if the resistors are chosen so that R1 + R2 − G R2 is
small. Assume for example that R1 = 100kΩ , R1 = 24kΩ , and G = 5.
The formula above shows that the gain of the feedback system is 25. With
R2 = 24.5kΩ the gain will be 50, and with R1 = 25kΩ the gain is infinite.
Regeneration was the word used for feedback at the time, and Arm-
strongs amplifier was called a super-regenerative amplifier because it
obtained high gain by positive feedback. Armstrongs invention made it
possible to build inexpensive amplifiers with very high gain. The ampli-
fiers were, however, extremely sensitive and they could easily start to
oscillate. Prices of vacuum tubes also dropped and the interest in the
amplifier dwindled. Next we will discuss another use of feedback in an
amplifier which still has profound consequences.

The Negative Feedback Amplifier


When telephone communications were developed, amplifiers were used to
compensate for signal attenuation in long lines. The vacuum tube was a
component that could be used to build amplifiers. Distortion caused by
the nonlinear characteristics of the tube amplifier together with amplifier
drift were obstacles that prevented development of line amplifiers for a
long time. A major breakthrough was Black’s invention of the feedback
amplifier in 1927. Black used negative feedback which reduces the gain
but makes the amplifier very insensitive to variations in tube character-
istics. Black’s invention made it possible to build stable amplifiers with
linear characteristics despite nonlinearities of the vacuum tube amplifier.
A schematic diagram of a feedback amplifier is shown in Figure 1.14.
Assume that the current I into the amplifier is zero, the current through
the resistors R1 and R2 are then the same and it follows from Ohms Law

29
Chapter 1. Introduction

R2
replacements

R1
I

V
+
V1 V2

Figure 1.14 An amplifier with negative feedback.

that Equation (1.2) holds. Let the gain of the amplifier be G it follows
that
V2 = − GV (1.5)
Eliminating the variable V between Equations (1.2) and (1.5) gives the
following equation for the ratio of the output and input voltages

V2 R2 1
=− 1
(1.6)
V1 R1 1 + G
(1 + R2
R1
)

This equation gives the gain of the amplifier with negative feedback. Since
the gain G is a very large number, typically of the order of 105 or 108 , it
follows from this equation that the input-output property of the amplifier
is essentially determined by resistors R1 and R2 . These are passive com-
ponents which are very stable. The properties of the active components
appear in parameter G. Even if G changes significantly, the input-output
gain remains constant. Also notice that the relation between Vout and Vin
is very close to linear even if the relation between Vout and V , equation
1.5, is strongly nonlinear.
Like many clever ideas the idea of the feedback amplifier seems almost
trivial when it is described. It took, however, six years of hard work for
Black to come up with it. The invention and development of the feedback
amplifier was a key step in the development of long distance communi-
cations. The following quote from the presentation of the IEEE Lamme
Medal to Black in 1957 gives a perspective on the importance of Black’s
invention of the feedback amplifier:
It is no exaggeration to say that without Black’s invention, the
present long-distance telephone and television networks which
cover our entire country and the transoceanic telephone cables

30
1.8 Electronics and Communication

Figure 1.15 Circuit diagram of William Hewletts oscillator that gives a stable
oscillation through nonlinear feedback using a lamp.

would not exist. The application of Black’s principle of negative


feedback has not been limited to telecommunications. Many of
the industrial and military amplifiers would not be possible
except for its use. ... Thus, the entire explosive extension of
the area of control, both electrical and mechanical, grew out of
an understanding of the feedback principle. The principle also
sheds light in psychology and physiology on the nature of the
mechanisms that control the operation of animals, including
humans, that is, on how the brain and senses operate.
It is interesting to observe that while Armstrong used positive feedback
Black was using negative feedback.
Feedback quickly became an indispensable companion of electronics
and communication. The applications are abundant. Today we find inter-
esting use of feedback in power control in system for cellular telephony.
A handset must naturally use enough power to transmit so that it can be
heard by the nearest station, using too much power will increase interfer-
ence with other handsets, necessitating use of even more power. Keeping
the power at the correct level gives a large pay-off because the batteries
will last longer.

Hewlett’s Stabilized Oscillator


Many control problems are solved by linear systems. There are, however,
problems where nonlinearities are essential. One of them is the design of
an oscillator that gives a signal with a constant amplitude. This problem
was solved very elegantly by William Hewlett in his PhD thesis at Stan-
ford University in 1939. Hewlett simply introduced a nonlinear element

31
Chapter 1. Introduction

Figure 1.16 Schematic picture of a CD player.

in the form of a lamp in the circuit, see Figure 1.15. Hewletts oscillator
was the beginning of a very successful company HP, that Hewlett founded
with David Packard.

CD Players and Optical Memories


The CD player is an interesting device which critically depends on several
high performance control loops. The yearly sales of CD players was about
100 million units in the year 2000. That makes it one of the most common
control systems.
A schematic picture of the main components of a CD player is shown in
Figure 1.16. The information on the disc is read by light from a laser diode
that is reflected by the disc to an optical assembly with photo transistors.
Processing of the signals from the transistors gives the radial track error
and a a focus signal. The laser diode, the optical assembly and the actuator
are mounted on a sled which can be moved precisely over a small range.
The sled is moved by another servo which permits large motions.
A block diagram of the major servos are shown in Figure 1.17. There
are three critical servo loops. The focus servo concentrates the laser spot
in the disc information layer. The tracking servo positions the laser spot
on the track. The sled servo moves the sled so that the tracking system
is in operating range. The tracking and the sled servos are also used to
switch between tracks. The servos are all based on error feedback since
only the error signal is available from the sensors. The major disturbance
is due to misalignment of the track. In a CD player this is due to an
off set of the center both due to manufacturing variations and errors in
centering of the CD. The disturbance is approximately sinusoidal. The

32
1.9 Automotive

Figure 1.17 Block diagram of the major servos in a CD player.

tracking accuracy of the systems is quite remarkable. For a typical CD


player, which stores 650 M-bytes, the variations in a track are typically
200 µ m, the track width is 1.6 µ m and the tracking accuracy is 0.1µ m.
The tracking speed varies from 1.2 to 1.4m/ s. The servos used in the
Digital Versatile Disc (DVD) and in optical memories are very similar to
the servos in a CD but the precision is higher. For a Digital Versatile Disc
(DVD) the variations in a track are typically 100 µ m, the track width is
1.6 µ m and the tracking accuracy is 0.022µ m. The tracking speed varies
in the range 3.5m/ s. The quality of the major servo loops have a direct
impact on the performanc of the storage system. A better tracking servo
permits a higher storage density in an optical drive. An improved servo for
switching tracks is immediately reflected in the search time in an optical
memory.

1.9 Automotive

Cars are increasingly being provided with more and more control systems.
The possibility of doing this are due to availability of cheap microproces-
sors and sensors and good control technology. The automotive industry has
also been a strong driving force for the development of micro-controllers
and sensors.

33
Chapter 1. Introduction

Reducing Emissions
California introduced a standard that required a substantial reduction of
emissions for internal combustion engines. To achieve this it was neces-
sary to introduce feedback in the engine based on measurement of the
oxygen in the exhaust. The following quote from a plenary lecture by
William E. Powers, (vice president at Ford) at the 1999 World Congress
of IFAC is illuminating.
The automobiles of the 1990s are at least 10 times cleaner and
twice as fuel efficient as the vehicles of the 1970s. These ad-
vancements were due in large part to distributed microproces-
sor based control systems. Furthermore the resultant vehicles
are safer, more comfortable and more maneuverable.
The advances were based on feedback control of the airfuel ratio.

Cruise and Traction Control


Most new cars are provided with a system for cruise control that keeps the
speed constant. This is a common control system that practically everyone
comes in contact with. More advanced systems, called adaptive cruise
control, are now appearing. The system is called adaptive even if it is
a regular servo system that keeps the distance to the car in front at a
constant value. The distance is measured by radar or laser. In this context
it is interesting to note that in 1995 Dickmann’s modified a Mercedes to
make it fully autonomous. The system had vision sensors and could make
automatic lane changes. The car has been tested with human supervision
at high speed in Germany and France.
Systems for anti-lock braking and traction control have also been intro-
duced. These systems were used in an unexpected fashion in the Mercedes
A class, see Figure 1.19. This car has a high center of gravity. When the
car was introduced it was discovered that the car had a tendency to roll
over in sharp turns. This difficult problem was solved by providing the
car with the most sophisticated vehicle stability control system available
in the company at the time. Together with minor changes of tires a severe
difficulty was overcome.

Technology Drivers
The automotive industry is an important driver for technology because of
the large number of produced parts and hard requirements for low cost.
Several interesting developments took place when computers started to be
used for computer control of engines. To save costs the microcomputer and
input-output devices that connect sensors and actuators were merged on
one chip, so called micro controllers. These devices made computer control

34
1.9 Automotive

Figure 1.18 Some of the control systems in a car.

Figure 1.19 The Mercedes A-class is a small car where control helped to solve a
serious problem.

cost effective in many other fields. The total number of micro-controllers


for embedded systems now far exceed the number of microprocessors man-
ufactured each year. The automotive applications also required new sen-
sors and actuators. New accelerometers and gyros based on MEMS devices
were developed, electric actuators based on new magnetic materials have
also been developed. The sensors and actuators use feedback internally
to obtain robustness and performance.

35
Chapter 1. Introduction

Autonomous Driving
There have been several attempts at developing autonomous vehicles. In
1995 Dickmanns demonstrated a fully autonomous Mercedes Benz with
vision sensors. Under human supervision the car drove autonomously
on the Autobahn from Munich to Copenhagen. Experiments with au-
tonomous platoon driving have also been done in California in the Path
program. It has been demonstrated experimentally that it is possible to
drive a platoon of cars at high speed with only a meters separation bete-
ween the cars. Automatic attachement and separation of cars to the pla-
toon have also been demonstrated.

1.10 Computing
There has been a strong symbiosis between control and computing. Com-
puting devices are integral parts of a controller and computing and sim-
ulation are used extensively in design and validation of a control system.

Analog Computing
Early controllers, such as the centrifugal governor, were implemented
using mechanical devices. Integral action was implemented using the ball
and disc integrator invented by Lord Kelvin. In the process industries
analog computing was instead done using pneumatic devices. The key
elements were pneumatic amplifiers, restrictions and volumes. Feedback
was used extensively to obtain linear behavior from the nonlinear devices.
The early development of control was severely hampered by the lack of
computing, many clever graphical methods were developed to obtain in-
sight and understanding using modest computing. The situation is sum-
marized very clearly in the following quote from Vannevar Bush from
1923.
“Engineering can proceed no faster than the mathematical
analysis on which it is based. Formal mathematics is frequently
inadequate for numerous problems pressing for solution, and
in the absence of radically new mathematics, a mechanical so-
lution offers the most promising and powerful attack wherever
a solution in graphical form is adequate for the purpose. This
is usually the case in engineering problems.”
Bush later built the the first mechanical differential analyzer. The key
elements were the ball and disc integrator and the torque amplifier. It
could be used to integrate a handful of differential equations. This com-
puter was used by Ziegler and Nichols to devise tuning rules for PID
controllers.

36
1.10 Computing

Bush’s work laid the foundation for analog computing which developed
rapidly when cheap electronic amplifiers became available. This coincided
with the emergence of control and analog computing became the standard
tool for simulation of control systems. The analog computers were however
large expensive systems that required a large staff to maintain. The use
of analog computing was thus limited to persons with access to these rare
resources. Analog computing was also used to implement the controllers
in the servomechanism era and through the 1960s. Controllers were also
implemented as small dedicated analog computers.
Even if computer control is the dominating technology for implement-
ing controllers there are still niches where analog computing is used ex-
tensively. One area is micro-mechanical systems (MEMS) where mechan-
ics and control are integrated on the same chip. Analog computing is also
used for systems with extremely fast response time.

Computer Control
When digital computers became available they were first used for comput-
ing and simulation. The early computers were large and expensive and
not suitable to be embedded in controllers. The first computer controlled
systems was installed by TRW at the Port Arthur refinery in Texas in
1959. This initiated a development which started slowly and accelerated
rapidly with the advances in computing. Today practically all controllers
are implemented as computer controlled systems.

Real Time Computing


Use of computers for in control systems imposes demands on the architec-
ture of systems and software, because of the requirement of fast response
to external events. It turns out that the features that were useful for
control were also useful for other purposes. There are in particular se-
vere requirements on the operating system to provide rapid response to
external events. It is also necessary to make sure that the system oper-
ates without interruptions. Special real time operating systems therefore
emerged. When implementing control systems there is a clear need to
understand both control algorithms and software. It is also necessary to
have systems with a high degree of reliability. The luxury of restarting
the computer (CTRL+ALT+DEL) if something strange happens is not a
feasible solution for computer control.

Simulation
Simulation is an indispensable tool for the control engineer. Even if sys-
tems can be designed based on relatively simple models it is essential
to verify that the system works in a wide range of operations. This is

37
Chapter 1. Introduction

typically done by simulating the closed loop system. To be reliable the


simulation requires a high fidelity model of the system. Development of
such model is often time consuming. Sometimes parts of the real system
is actually interfaced with the simulator, so called hardware in the loop
simulation. Vehicle and flight simulators are typical examples. If a con-
troller is build using a dedicated computer it can also be verified against
the simulation. Simulation can also be used for many other purposes, to
explore different systems configurations, for operator training and for di-
agnostics. Because of the advances in computers and software simulation
is now easily available at every engineers desk top.

The Internet
The Internet was designed to be an extremely robust communication net-
work. It achieves robustness by being distributed and by using feedback.
The key function of the system is to transmit messages from a sender to
a receiver. The system has a large number of nodes connected with links.
At each node there are routers that receives messages and sends them
out to links. The routers have buffers that can store messages. It is desir-
able to operate the system to exploit capacity by maximizing throughput
subject to the constraint that all users are treated fairly. There are large
variations in traffic and in the lengths of the messages. Routers and links
can also fail so the system may also be changing. The Internet depends
critically on feedback to deal with uncertainty and variations. All control
is decentralized
The routers receive messages on the incoming lines and distributes
them to the outgoing lines. Messages are stored in a buffer if the router
can not handle the incoming traffic. In the simplest scheme a router that
has a full buffer will simply drop the incoming messages. Information
about congestion is propagated to the sender indirectly through the lost
messages.
Flow control is done by the senders. When a message is received by a
receiver it sends an acknowledgment to the sender. The sender can detect
lost messages because the messages are tagged. A very simple algorithm
for traffic control was proposed by Jacobson 1990. This algorithm is called
Additive Increase Multiplicative Decrease (AIMD) works as follows. The
transmission rate is increased by additively as long as no messages are
lost. When a message is lost the transmission rate is reduced by a factor
of 2.
The Internet is a nice illustration that a very large distributed system
can be controlled effectively by reasonably simple control schemes. There
are many variations of the basic scheme described above. Many technical
details have also been omitted. One drawback with the current scheme
is that the control mechanism creates large variations in traffic which is

38
1.11 Mathematics

undesirable. There are many proposals for modifications of the system.

1.11 Mathematics
There has always been a strong interplay between mathematics and con-
trol. This has undoubtedly contributed to the success of control. The the-
ory of governors were developed by James Clarke Maxwell in a paper
from 1868, about 100 years after James Watt had developed the governor.
Maxwell realized that stability was connected to the algebraic problem
of determining if an algebraic equation has roots in the right half plane.
Maxwell turned to the mathematician Routh to get help. An analogous
situation occurred in the development of water turbines where Stodola
turned to the mathematician Hurwitz for assistance.
Mathematics played a major role in the development of servomecha-
nism theory in the 1940s. There were a number of outstanding mathemati-
cians at the Radiation Laboratory at MIT, there were also outstanding
mathematicians at Bell Laboratories at the time. An interesting perspec-
tive can be obtained by comparing the major advances in the theory of
feedback amplifiers with the meager advances in process control and to
speculate what could have happened if there had been mathematicians
working on the process control problems.
There was a very fruitful interaction between mathematics and control
in the 1960s in connection with the space race when optimal control was
developed. The Russian mathematician Pontryagin and his coworkers de-
veloped the maximum principle, which can be viewed as an extension of
the Euler-Lagrange theory in calculus of variations. The American math-
ematician Richard Bellman developed dynamic programming, which can
be regarded as an extension of the Hamilton-Jacobi theory in calculus of
variations. In both cases the developments were directly inspired by the
control problems.
In the US the eminent topologist and past President of the American
Mathematical Society argued for a strong effort in applied mathematics.
With support form the Office of Naval Research he established a research
center devoted to nonlinear ordinary differential equations and dynamics
at Princeton. The center was later moved to RIAS and later to Brown
University where it became the Lefschetz Center for Dynamical Systems.
Later centers were also created at the University of Minnesota.
The Russian activity was centered in Moscow at the famous Institute
of Automatic Control and Telemechanics and in smaller institutes in St
Petersburg and Sverdlovsk. In Peking a strong center was established
under the supervision of the Academy of Sciences. A very strong center
INRIA was also created in Paris under Professor Jean Jacques Lions.

39
Chapter 1. Introduction

A wide range of mathematics such as dynamical systems, differential


geometry and algebra has been important for the development of control
theory after 1960.

Numerical Mathematics
A standard computational problem is to solve ordinary differential equa-
tions by time-stepping methods. As solutions often vary significantly over
the range of integration, efficient computation requires step length con-
trol. This is done by estimating the local error and adjusting the step
length to make this error sufficiently small. Most solvers for differential
equations have carried out the correction in a simplistic fashion, and the
adjustment has often been mixed with other algorithmic elements.
Recently a drastic improvement has been made by viewing step length
adjustment as a feedback problem. Substantial improvements of perfor-
mance can be obtained by replacing the heuristic schemes for step length
adjustment, that were used traditionally, with a scheme based on a PID
controller. These advantages are achieved without incurring additional
computational costs. This has resulted in more reliable software, as well as
software with much better structure. Knowledge of basic control schemes
has thus proven very beneficial. It is likely that the same idea can be
applied to other numerical problems.

1.12 Physics
Feedback has always had a central role in scientific instruments. An early
example is the development of the mass spectrometer. In a paper from
1935 by Nier it is observed that the deflection of the ions depend on both
the magnetic and the electric fields. Instead of keeping both fields constant
Nier let the magnetic field fluctuate and the electric field was controlled to
keep the ratio of the fields constant. The feedback was implemented using
vacuum tube amplifiers. The scheme was crucial for the development of
mass spectroscopy.
Another example is the work by the Dutch Engineer van der Meer.
He invented a clever way to use feedback to maintain a high density
and good quality of the beam of a particle accelerator. The scheme, called
stochastic cooling, was awarded the Nobel prize in Physics in 1984. The
method was essential for the successful experiments in CERN when the
existence of the the particles W and Z was first demonstrated. Another use
of feedback called repetitive control was developed by Nakano for particle
accelerators. The key idea was to obtain very precise control by exploiting
the fact the particles move in circular orbits.

40
1.12 Physics

Figure 1.20 Schematic diagram of a system for adaptive optics.

The atomic force microscope is a more recent example. The key idea
is to move a narrow tip on a cantilever beam across the surface and to
register the forces on the tip. Such systems rely on feedback systems for
precise motion and precise measurement of the forces.

Adaptive Optics
A severe problem in astronomy is that turbulence in the atmosphere blurs
images in telescopes because of variations in diffraction of light in the at-
mosphere. The blur is of the order of an arc-second in a good telescope.
One way to eliminate the blur is to move the telescope outside the Earths
atmosphere as is done with the Hubble telescope. Another way is to use
feedback to eliminate the effects of the variations in a telescope on the
Earth. This is the idea of adaptive optics. A schematic picture of a sys-
tem for adaptive optics is shown in Figure 1.20. The reference signal is
a bright star or an artificial laser beam projected into the atmosphere.
The actuator which is shown simply as a box in the figure is obtained
by reflecting the light on a mirror that can be deformed selectively. The
mirror can have from 13 to 1000 elements. The error signal is formed by
analyzing the shape of the distorted wave form from the reference. This
signal is sent to the controller which adjusts the deformable mirror. The
light from the observed star is compensated because it is also reflected in
the deformable mirror before it is sent to the detector. The wave lengths
used for observation and control are often different. Since diffraction in
the atmosphere changes quite rapidly the response time of the control
system must be of the order of milliseconds.
In normal feedback terminology adaptive optics is a regular feedback

41
Chapter 1. Introduction

system, feedback is used to compensate for variations in diffraction in


the atmosphere. The word adaptive is used in because it can also be said
that the system adapts for variations in the atmosphere. In the control
community the word adaptive is often used with a different meaning.

Quantum Systems
Control of quantum systems is currently receiving a lot of interest. Molec-
ular dynamics is a very spectacular application. The idea is to use modu-
lated laser light to break up bonds in molecules to obtain ions which can
react with other ions to form new molecules. This is done by tailoring the
laser pulses so that they will break specific bonds between atoms. This is
precision surgery at the molecular level, quite different from the methods
used in conventional chemistry.

1.13 Biology
It was mentioned already in Section 1.1 that feedback is an essential
mechanism in biology. Here are a few examples.

The Pupillary Reflex


The human eye has an effective system to control the amount of light that
is let into the eye. The light intensity is measured and the pupil opening
is adjusted. This control systems is easily accessible for experimentation.
Extensive investigations have been made by changing the light intensity
and measuring the pupil opening. The results show that it is a very ef-
fective feedback system.

Human Posture
The human body has many feedback systems. They allow us to stand up-
right, to walk, jump and balance on ropes. They also adjust the sensitivity
of our eyes and ears, enabling us to see and hear over a wide range of
intensity levels. They maintain a constant body temperature and a del-
icate balance of chemical substances in our body. As an illustration we
will discuss the system that allows us to stand upright. The key features
of the system are known although several details are poorly understood.
The primary sensors are the semicircular canals located in the mastoid
bone close to the ear. The sensors consist of toroidal canals that are filled
with liquid. Neurons connected to hairs in the canals give signals related
to the motion of the head. The major actuators are muscles in feet, legs,
knees, hips and arms. There are also sensory neurons in the feet and the
muscles. There is local feedback from pressure sensors in the feet and

42
1.14 Summary

sensors in the muscles to the actuating muscles. This loop has a reaction
time of about 20 ms. The interconnection between sensors and actuators
is made in the spinal cord. These interconnections are responsible for fast
feedback like reflexes. The reaction time is of the order of 100 ms. There is
also a high level feedback loop that receives information from the vestibu-
lar system, which gives information about the position and orientation of
our body parts in space. The sensory information is processed in the cere-
bellum and transmitted to the muscle neurons in the spinal cord. This
feedback has a reaction time of about 250 ms.
This system for control of posture illustrates that feedback can be used
to stabilize an unstable system. It also shows that there are very reliable
biological feedback systems which are essential to everyday life. A par-
ticularly interesting feature is that the system has learning capabilities.
Think about a child learning to stand up and walk or learning to bicycle.
These functions are far superior to those of any technical system.

A Simple Experiment
A simple experiment on one of the systems in the body can be executed
manually with very modest equipment. Take a book with text and hold it
in front of you. Move the text sideways back and forth and increase the
speed of motion until the text is blurred. Next hold the text in front of you
and move the head instead. Notice the difference in the speeds when the
text gets blurred. You will observe that higher speeds are possible when
you move your head. The reason for this is that when you move the text,
the information about the motion comes via the processing of the image
at your retina, but when you move your head the information comes from
the semicircular canals. The feedback from the visual processing is much
slower because it uses higher functions in the brain.
There are many other nice control systems in the human body. Top
performing athletes such as tennis players have interesting abilities for
very advanced motion control that involves much interaction with vision.
Humans also have interesting learning abilities.

1.14 Summary
This chapter has given glimpses of how control and feedback have influ-
enced the development of technology and how control is used. The ex-
amples show that control has emerged concurrently with new technology,
that it has had a major influence on technology and that it sometimes has
been an enabler. A large number of control systems ranging from small
micro devices to large global systems for generation and distribution of

43
Chapter 1. Introduction

electricity and large communication systems have also been given. The
wide range of uses of control also point to some difficulties. The ideas of
control and feedback are abstract which makes them less obvious. It is
therefore common that the ideas are neglected in favor of hardware which
is much easier to talk about.

44
2
Feedback

2.1 Introduction

Feedback is a powerful idea, which is used extensively in natural and


technical systems. The principle of feedback is very simple: base correct-
ing actions on the difference between desired and actual performance.
In engineering feedback has been rediscovered and patented many times
in many different contexts. Use of feedback has often resulted in vast
improvements in system capability, sometimes they have even be revolu-
tionary as discussed in Chapter 1. The reason for this is that feedback
has some truly remarkable properties. In this chapter we will discuss
some of the properties of feedback that can be understood intuitively. The
benefits of feedback can often be obtained using simple forms of feedback
such as on-off control and PID control, which are discussed in Section 2.2.
Particular attention is given to integral action which is has truly remark-
able properties. Feedback systems may appear complicated because they
involve many different subsystems and many different technologies. To
reduce the complexity it is necessary to have abstractions that makes it
possible to have an overview of the systems. Section 2.3 presents differ-
ent ways to describe feedback systems. The block diagram is the most
important representation because it is a uniform description that can be
adapted to many different purposes. The remarkable properties of feed-
back are presented in Section 2.4. It is shown that feedback can reduce the
effects of disturbances and process variations, it can create well defined
relations between variables, it makes it possible to modify the properties
of a system, e.g. stabilize a unstable system. The discussion is based on
block diagrams and simple static mathematical models. The major draw-
back is that feedback can create instability. This is discussed briefly in
Section 2.5. To understand stability it is necessary to have knowledge of

45
Chapter 2. Feedback

A u B u C u

e e e

Figure 2.1 Controller characteristics for ideal on-off control (A), and modifications
with dead zone (B) and hysteresis (C).

dynamical systems which is the topic of Chapter 3. Feedback systems


are also called closed loop systems. Section 2.6 compares closed loop sys-
tems with their opposite, open loop systems. Feedback is reactive because
actions are based on deviations. Feedforward, which is proactive, is the
opposite of feedback. Since feedback and feedforward have complementary
properties they are often combined.

2.2 Simple Forms of Feedback


Some properties of feedback were illustrated in Chapter 1. Many of the
nice properties of feedback can be obtained with simple controllers. In
this section we will discuss some simple forms of feedback namely, on-off
control, proportional control and PID control.

On-Off Control
The feedback can be arranged in many different ways. A simple feedback
mechanism can be described as follows:
umax , if e > 0
(
u= (2.1)
umin , if e < 0

where e = r − y is the control error which is the difference between the


reference signal and the output of the system. Figure 2.1 shows the rela-
tion between error and control. This control law implies that maximum
corrective action is always used. This type of feedback is called on-off con-
trol. It is simple and there are no parameters to choose. On-off control
often succeeds in keeping the process variable close to the reference, but
it will typically result in a system where the variables oscillate. Notice
that in (2.1) the control variable is not defined when the error is zero. It
is common to have some modifications either by introducing hysteresis or
a dead zone (see Figure 2.1).

46
2.2 Simple Forms of Feedback

PID Control
The reason why on-off control often gives rise to oscillations is that the
system over reacts since a small change in the error will make the ma-
nipulated variable change over the full range. This effect is avoided in
proportional control where the characteristic of the controller is propor-
tional to the control error for small errors. This can be achieved by making
the control signal proportional to the error

u = k(r − y) = ke (2.2)

where k is the controller gain.

Integral Action Proportional control has has the drawback that the
process variable often deviates from its reference value. This can be avoided
by making the control action proportional to the integral of the error

Zt
u(t) = ki e(τ )dτ (2.3)
0

where ki is the integral gain. This control form is called integral control. It
follows from this equation that if there is a steady state where the control
signal and the error are constant, i.e. u(t) = u0 and e(t) = e0 respectively
then
u0 = ki e0 t
This equation is a contradiction unless e0 = 0. It has thus demonstrated
that there will be no steady state error with a controller that has integral
action. Notice that the argument also holds for any process and any con-
troller that has integral action. The catch is that there may not always be
a steady state because the system may be oscillating. This amazing prop-
erty which we call the Magic of Integral Control has been rediscovered
many times. It is one of the properties that have strongly contributed to
the wide applicability of PID control.

Derivative Action An additional refinement is to provide the controller


with an anticipative ability by using a prediction of the error. A simple
prediction is given by the linear extrapolation

de(t)
e(t + Td )  e(t) + Td ,
dt

which predicts the error Td time units ahead, see Figure 2.2. Combining

47
Chapter 2. Feedback

Figure 2.2 A PID controller takes control action based on past, present and future
control errors.

proportional, integral and derivative control we obtain a controller that


can be expressed mathematically as follows:

Zt
de(t)
u(t) = ke(t) + ki e(τ )dτ + kd
dt
0
(2.4)
Zt
1
 
de(t)
= k e(t) + e(τ )dτ + Td
Ti dt
0

The control action is thus a sum of three terms representing the past by
the integral of the error (the I-term ), the present (the P-term ) and the
future by a linear extrapolation of the error ( the D-term ). The term
e + Td de/ dt is a linear prediction of the error Td time units in the future.
Notice that the controller can be parameterized in different ways. The
second parameterization is commonly used in industry. The parameters
of the controller are called: are proportional gain k, integral time Ti , and
derivative time Td .
The PID controller is very useful. It is capabable of solving a wide
range of control problems. The PI controller is the most common con-
troller. It is quoted that about 90% of all control problems can be solved by
PID control, many of these controllers are actually PI controller because
derivative action is not so common. There are more advanced controllers
which differ from the PID controller by using more sophisticated methods
for prediction.

48
2.3 Representation of Feedback Systems

2.3 Representation of Feedback Systems


Feedback systems are often large and complex. It is therefore a major
challenge to understand, analyze and design them. This is illustrated by
the fact that the idea of feedback was developed independently in many
different application areas. It took a long time before it was found that the
systems were based on the same idea. The similarities became apparent
when proper abstractions were made. In this section we will develop some
ideas that are used to describe feedback systems. The descriptions we are
looking for should capture the essential features of the systems and hide
unnecessary details. They should be applicable to many different systems.

Schematic Diagrams
In all branches of engineering, it is common practice to use some graphical
description of systems. They can range from stylistic pictures to drasti-
cally simplified standard symbols. These pictures make it possible to get
an overall view of the system and to identify the physical components.
Examples of such diagrams are shown in Figure 2.3

Block Diagrams
The schematic diagrams are useful because they give an overall picture of
a system. They show the different physical processes and their intercon-
nection, and they indicate variables that can be manipulated and signals
that can be measured.
A special graphical representation called block diagrams has been de-
veloped in control engineering. The purpose of block diagrams is to empha-
size the information flow and to hide technological details of the system.
It is natural to look for such representations in control because of its mul-
tidisciplinary nature. In a block diagram, different process elements are
shown as boxes. Each box has inputs denoted by lines with arrows point-
ing toward the box and outputs denoted by lines with arrows going out of
the box. The inputs denote the variables that influence a process and the
outputs denote some consequences of the inputs that are relevant to the
feedback system.
Figure 2.4 illustrates how the principle of information hiding is used
to derive an abstract representation of a system. The upper part of the
picture shows a photo of a physical system which a small desk-top process
in a control laboratory. It consists of two tanks, a pump that pumps wa-
ter to the tanks, sensors, and a computer which implements the control
algorithm and provides the user interface. The purpose of the system is
to maintain a specified level in the lower tank. To do so, it is necessary
to measure the level. The level can be influenced by changing the speed
of the motor that pumps water into the upper tank. The voltage to the

49
Chapter 2. Feedback

Figure 2.3 Examples of schematic descriptions: a schematic picture of an inertial


navigation system (upper left), a neuron network for respiratory control (upper
right), a process and instrumentation diagram (lower left) and a power system
(lower right).

amplifier that drives the pump is selected as the control variable. The
controller receives information about the desired level in the tank and
the actual tank level. This is accomplished using an AD converter to con-
vert the analog signal to a number in the computer. The control algorithm
in the computer then computes a numerical value of the control variable.
This is converted to a voltage using a DA converter. The DA converter is
connected to an amplifier for the motor that drives the pump.
The first step in making a block diagram is to identify the impor-
tant signals: the control variable, the measured signals, disturbances and
goals. Information hiding is illustrated in the figure by covering systems
by a cloth as shown in the lower part of Figure 2.4. The block diagram is
simply a stylized picture of the systems hidden by the cloth.
In Figure 2.4, we have chosen to represent the system by two blocks
only. This granularity is often sufficient. It is easy to show more details
simply by introducing more subsystems, as indicated in Figure 2.5 where
we show the drive amplifier, motor, pump, and tanks, the sensors with
electronics, the AD converter, the computer and the DA converter. The

50
2.3 Representation of Feedback Systems

Figure 2.4 Illustrates the process of information hiding used to obtain a block
diagram. The top figure is a picture of the physical system, the middle figure is
obtained by hiding many details about the system and the bottom figure is the
block diagram.

C A Pump Tanks Sensor

Figure 2.5 A more detailed block diagram of the system in Figure 2.4 showing
controller C, amplifier A, pump, tanks and sensor.

detail chosen depends on the aspects of the system we are interested


in and the taste of the person doing the investigation. Remember that
parsimony is a trademark of good engineering. Very powerful tools for
design, analysis and simulation were developed when the block diagrams
were complemented with descriptions of the blocks in terms of transfer
functions.

51
Chapter 2. Feedback

A B

C D

Figure 2.6 A simple hydraulic system with an inflow and a free outflow is shown
in A. The block diagram representation of the system is shown in B. The system
obtained by connecting two hydraulic systems is shown in C. This system cannot be
represented by the series connection of the block diagrams in B.

Causality
The arrows in a block diagram indicate causality because the output of
a block is caused by the input. To use the block diagram representation,
it is therefore necessary that a system can be partitioned into subsys-
tems so that the interaction between two blocks is unidirectional, i.e. a
causal dependence. Great care must be exercised when using block dia-
grams for detailed physical modeling as is illustrated in Figure 2.6. The
tank system in Figure 2.6B is a cascade combination of the two tanks
shown in Figure 2.6B. It cannot be represented by cascading the block
diagram representations because the level in the second tank influences
the flow between the tanks and thus also the level in the first tank. When
using block diagrams it is therefore necessary to choose blocks to repre-
sent units which can be represented by causal interactions. We can thus
conclude that even if block diagrams are useful for control they also have
serious limitation. In particular they are not useful for serious physical
modeling which has to be dealt with by other tools which permits blocks
with bidirectional interaction.

Examples
An important consequence of using block diagrams is that they clearly
show that control systems from widely different domains have common
features because their block diagrams are identical. This observation was
one of the key factors that contributed to the emergence of the discipline
of automatic control in the 1940s. We will illustrate this by showing the
block diagrams of some of the systems discussed in Chapter 1.

52
2.3 Representation of Feedback Systems

Centrifugal governor

Desired Valve Angular


velocity position Steam velocity
Σ Controller
engine

−1

Figure 2.7 Block diagram of a steam engine with a centrifugal governor.

EXAMPLE 2.1—A STEAM ENGINE WITH A CENTRIFUGAL GOVERNOR


The steam engine with the centrifugal governor in Example 2.1 can be
represented with the block diagram shown in Figure 2.7. In this block
diagram we have chosen to represent the steam engine with one block.
This block has two inputs: the position of the steam valve and the load
torque of the systems that the engine is driving. The system has one
output which is engine speed. The controller is a box with two inputs:
the engine speed and desired engine speed. The output of the controller
is the steam valve position. There is some two-way interaction between
the controller and the valve position but with appropriate gearing and
heavy balls in the governor it may be assumed that the force exerted by
the valve on the governor is negligible.

EXAMPLE 2.2—AN AIRCRAFT STABILIZER


To develop a block diagram for an airplane with the Sperry stabilizer, we
first introduce suitable variables and describe the system briefly. The pitch
angle that describes how the airplane is pointing is an important variable
and is measured by the gyro-stabilized pendulum. The pitch angle is influ-
enced by changing the rudder. We choose to represent the airplane by one
box whose input is the rudder angle and whose output is the pitch angle.
There is another input representing the forces on the airplane from wind
gusts. The stabilizer attempts to keep the pitch angle small by appro-
priate changes in the rudder. This is accomplished by wires that connect
the rudder to the gyro-stabilized pendulum. There is also a mechanism
enabling the pilot to choose a desired value of the pitch angle if he wants
the airplane to ascend or descend. In the block diagram we represent the
controller with one block where the difference between desired and actual
pitch angles is the input and the rudder angle is the output. Figure 2.8
shows the block diagram obtained.

53
Chapter 2. Feedback

Autopilot

Aileron Pitch angle


Desired Σ Controller Aircraft
pitch angle

−1

Figure 2.8 Block diagram of an airplane with the Sperry autopilot.

R2

R1
I

V
+
V1 V2

Figure 2.9 A feedback amplifier.

Even if block diagrams are simple, it is not always entirely trivial to obtain
them. It happens frequently that individual physical components to not
necessarily correspond to specific blocks and that it may be necessary to
use mathematics to obtain the block. We illustrate this by an example.

EXAMPLE 2.3—A FEEDBACK AMPLIFIER


An electronic amplifier with negative feedback was discussed in Sec-
tion 1.8. A schematic diagram of the amplifier is shown in Figure 2.9.
To develop a block diagram we first decide to represent the pure amplifier
as one block. This has input V and output V2 . The input-output relation
is
V2 = − GV

where G is the gain of the amplifier and the negative sign indicates neg-
ative feedback. If the current I into the amplifier is negligible the current
through resistors R1 and R2 are the same and we get

V1 − V V − V2
=
R1 R2

54
2.3 Representation of Feedback Systems

V1 e V V2
R1
Σ R1 + R 2 −G

R1
R2

V1 e V − V2
R1
Σ R1 + R 2 G

− RR21

V1 V − V2
R1
R1
R2
Σ R1 + R 2 G

−1

Figure 2.10 Three block diagrams of the feedback amplifier in Figure 2.9.

Solving this equation for the input voltage V to the amplifier we get
R2 V1 + R1 V2 R2  R1 
V = = V1 + V2
R1 + R2 R1 + R2 R2
This equation can be represented by one block with gain R2 /( R1 + R2 )
and the input V1 + R1 V2 / R1 and we obtain the block diagram shown in
Figure 2.10. The lower representation where the process has positive gain
and the feedback gain is negative has become the standard of represent-
ing feedback systems. Notice that the individual resistors do not appear
as individual blocks, they actually appear in various combinations in dif-
ferent blocks. This is one of the difficulties in drawing block diagrams.
Also notice that the diagrams can be drawn in many different ways. The
middle diagram in Figure 2.10 is obtained by viewing − V2 as the output
of the amplifier. This is the standard convention where the process gain
is positive and the feedback gain is negative. The lowest diagram in Fig-
ure 2.10 is yet another version, where the ratio R1 / R2 is brought outside
the loop. In all three diagrams the gain around the loop is R2 G /( R1 + R2 ),
this is one of the invariants of a feedback system.

A Generic Control System with Error Feedback


Although the centrifugal governor, the autopilot and the feedback ampli-
fier in Examples 2.1, 2.2 and 2.3 represent very different physical sys-

55
Chapter 2. Feedback

d n

r e u v x y
Σ C Σ P Σ

−1

Controller Process

Figure 2.11 Generic control system with error feedback.

tems, their block diagrams are identical apart from the labeling of blocks
and signals, compare Figures 2.7, 2.8 and 2.10. This illustrates the uni-
versality of control. A generic representation of the systems is shown in
Figure 2.11. The system has two blocks. One block P represents the pro-
cess and the other C represents the controller. Notice negative sign of the
feedback. The signal r is the reference signal which represents the desired
behavior of the process variable x.
Disturbances are an important aspect of control systems. In fact if
there were no disturbances there is no reason to use feedback. In Fig-
ure 2.11 there are two types of disturbances, labeled d and n. The distur-
bance labeled d is called a load disturbance and the disturbance labeled
n is called measurement noise. Load disturbances drive the system away
from its desired behavior. In Figure 2.11 it is assumed that there is only
one disturbance that enters at the system input. This is called an input
disturbance. In practice there may be many different disturbances that
enter the system in many different ways. Measurement noise corrupts the
information about the process variable obtained from the measurements.
In Figure 2.11 it is assumed that the measured signal y is the sum of the
process variable x and measurement noise. In practice the measurement
noise may appear in many other ways.
The system in Figure 2.11 is said to have error feedback, because the
control actions are based on the error which is the difference between
the reference r and the output y. In some cases like a CD player there
is no explicit information about the reference signal because the only
information available is the error signal. In such case the system shown
in Figure 2.11 is the only possibility but if the reference signal is available
there are other alternatives that may give better performance.

56
2.3 Representation of Feedback Systems

d n

r s e u v x y
F Σ C Σ P Σ

−1
Controller Process

Figure 2.12 Block diagram of a generic feedback system with two degrees of
freedom.

A Generic Control Loop Two Degrees of Freedom


In Figure 2.11 the control actions are based on the error e. When both the
reference signal r and the measured output y are available it is possible
to obtain improved control. Such a system is shown in Figure 2.12. This
system is similar to the one in Figure 2.11 but the controller now has
two blocks, the feedback C and the feedforward block F. This means
that the signal path from y to u is different from that from r to u. Such
controllers are said to have two degrees of freedom. The extra freedom
gives substantial advantages.

A Qualitative Understanding of Feedback Systems - Cherchez l’erreur


The block diagram is very useful to get an overview of a system. It allows
you to see the wood in spite of the trees. A simple way to understand how
a system works is to assume that the feedback works so well that the
error is zero. We illustrate this with a few examples.

EXAMPLE 2.4—THE GENERIC CONTROL SYSTEM


Consider the system in Figure 2.12. If the error is zero we find that the
output y is equal to the signal s, which is the output of the block F.

EXAMPLE 2.5—THE FEEDBACK AMPLIFIER


Consider the block diagram of the feedback amplifier in the top of Fig-
ure 2.10. If the system works well the error is close to zero which means
that
R1
V2 =
R2

57
Chapter 2. Feedback

r e y
Σ
R

− y2

Figure 2.13 Block diagram of a nonlinear system.

EXAMPLE 2.6—A NONLINEAR SYSTEM


Consider a nonlinear system with the block diagram shown in Figure 2.13.
Assume that r is positive
√ and the error is zero, it follows that r = y2 , which
implies that y = r. The output is thus the positive square root of the
input. Notice, that since the feedback loop contains an integrator the error
will always be zero if a steady state exists.
This example illustrates the fact that if a component for generating a func-
tion is available, it is easy to generate the inverse function by an amplifier
with feedback. This idea has been much applied in analog computing and
in instrumentation.

2.4 Properties of Feedback


To understand the behavior of a feedback system it is necessary to de-
scribe the behavior of the process and the controller. A full understanding
requires a description of the dynamic properties of the process and the
controller. Some properties can however be understood by describing the
behaviors by static models. This will be developed in this Section.

Mathematical Models
A block diagram gives an overview of a system but more details are re-
quired to obtain a more complete description of a system. In particular it is
necessary to describe the behavior of each individual block. This requires
mathematical models. A function

y = f (u)

is a simple way to characterized the relation between input and output in


a block. This is called a static model because a change in the input gives
an instantaneous change of the output. The function can be represented
by a graph as in Figure 2.14. For small perturbations around a given
operating point, the curve can be approximated by its tangent. The slope

58
2.4 Properties of Feedback

10

y
0

−5
0 0.5 1 1.5 2 2.5 3 3.5 4
u

Figure 2.14 Static input-output function for a system and the linear approxima-
tion around the operating point u0 = 3.5. The slope of the curve at the operating
point is the gain of the system.

of the tangent is called the gain of the system at the operating point.
Assume that the control variable at the operating point has the value u0 .
The corresponding value of the output is then y0 = f (u0 ). For values of the
control variable close to the operating point the system can approximately
be described by the model

y − y0 = f (u) − f (u0 )  f ′ (u0 )(u − u0 )

where f ′ denotes the derivative of f . The approximation which is obtained


by making a Taylor series expansion of the function and neglecting higher
order terms is called linearization. The constant K = f u (u0 ) is called
the gain of the system at the operating point. To simplify notation it is
customary to choose the variables so that they are zero at the operating
point of interest. The system can then be described by

y = Ku

which we call a linear static model. Static models of control systems have
severe limitations, because many of the properties of feedback systems
rely on dynamic effects. A major part of this book will be devoted to this
beginning with next chapter which deals with dynamics. Control is thus
intimately connected with dynamics.

Static Analysis
We will start by a very simplistic analysis of a system with error feedback.
Consider the system in Figure 2.11. Assume that the variables r, d and n
are constants and that the process and the controller can be described by
linear static models. Let kp be the process gain and kc the controller gain.

59
Chapter 2. Feedback

The following equations are obtained for the process and the controller.

y= x+n
x = kp (u + d) (2.5)
u = kc (r − y)

Solving these equations for y and u gives


kp kc kp kp kc
x= r+ d− n
1 + kp kc 1 + kp kc 1 + kp kc
kp kc kp 1
y= r+ d+ n (2.6)
1 + kp kc 1 + kp kc 1 + kp kc
kc kp kc kc
u= r− d− n
1 + kp kc 1 + kp kc 1 + kp kc

The product L = kp kc is called the loop gain. It is the total gain around the
feedback loop. It is an important system property which is dimension-free.
Several interesting conclusions can be drawn from (2.6). First we ob-
serve that since the equation is linear we can discuss the effects of refer-
ence values r, load disturbances d and measurement noise n separately.
It follows from (2.6) that the output will be very close to the reference
value if the loop gain L = kp kc is large. It also follows from (2.6) that the
effect of the load disturbances will be small if the controller gain is large.
We will now take a closer look at some of the responses.
Assuming that r = 0 and n = 0 we find that the process variable is
given by
kp
x= d
1 + kp kc
The influence of the load disturbance on the output can be reduced sig-
nificantly by having a controller with high gain.
If the disturbances are zero, i.e. d = n = 0 the response to reference
signals is given by
kp kc
x= r (2.7)
1 + kp kc
By having a controller with high gain the process variable will be very
close to the reference value. For example if kp kc = 100 the deviation
between x and r is less than 1%
The properties of the process are seldom constant. To investigate the
effects of process variations we differentiate (2.7) with respect to the pro-
cess gain kp . This gives

dx kc kc 1 x 1
= 2
r= r=
dkp (1 + kp kc ) 1 + kp kc 1 + kp kc kp 1 + kp kc

60
2.4 Properties of Feedback

r e u y
Σ C P

1

k

Figure 2.15 This feedback system has the input output relation y = kr even if
the process P is highly nonlinear.

Hence
d log x dx/ x 1
= = (2.8)
d log kp dkp / kp 1 + kp kc
The relative variation in the process variable caused by process variations
will thus be very small if the loop gain is high. For example if the loop
gain is kp kc = 100 it follows from (2.8) that a 10% variation in the process
gives only a variation of 0.1% in the relation between the process variable
and the reference. This was the idea used by Black when he invented the
feedback amplifier, (2.8) was actually part of Black’s patent application.
The simple analysis above captures several properties of feedback. The
analysis can however be misleading because it does not consider the dy-
namics of the process and the controller. The most serious drawback is
that most systems will become unstable when the loop gain is large. An-
other factor is that the trade-off between reduction of load disturbances
and injection of measurement noise is not represented well. In practice
the load disturbances are often dominated by components having low fre-
quencies while measurement noise often has high frequencies.

Using Feedback to Obtain Linear Behavior


Another nice feature of feedback is that it can be used to obtain precise
linear relations between the reference and the output even if the process is
nonlinear and time-variable. Consider the system in Figure 2.15. Assume
that the process P is modeled as a nonlinear static system

y = f (u)

Let the controller C be a proportional controller with gain k, i.e.

u = k(r − y)

Eliminating u between these equations we find that the closed loop system
is then described by
1
y + f −1 ( y) = r
k

61
Chapter 2. Feedback

0.8

y 0.6

0.4

0.2

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
u, r

Figure 2.16 Input output relations for the process y = u5 (solid lines) and for the
feedback system in Figure 2.15 (dashed lines) when the controller gain k is 100.

xr vr Ir I v x
Cp Cv CI

Controller Motor

Figure 2.17 An hierarchical control system for a motor drive.

where f −1 is the inverse of the function f . If the controller gain k is


large we have y  r, i.e. a linear relation. This is illustrated in Fig-
ure 2.16 which shows that strongly nonlinear relations can be made linear
by feedback. Because of (2.8) the linear relation is also very insensitive
to variations in the nonlinearity.
The scheme in Figure 2.15 is routinely used in many practical control
systems. This is also very useful in order to structure complex systems.
We illustrate the idea with a few examples.

EXAMPLE 2.7—ELECTRICAL MOTOR DRIVES


An electrical motor drive consists of a motor with a drive amplifier and
possible also gear boxes. The primary control signal is the input voltage
to the drive amplifier and the primary output is the motor angle. It is cus-
tomary to have a control system with the hierarchical structure indicated
in Figure 2.17. The controller thus consist of three cascaded controllers.
The inner loop is a current controller CI , based on measurement of the
current through the rotor. Since the drive torque of the motor is propor-

62
2.4 Properties of Feedback

tional to current the inner loop is essentially controlling motor torque.


The next loop with the controller Cv controls the motor velocity by adjust-
ing the reference value Ir to the current controller. The velocity signal
is either created by differentiating the angle measurements or it is ob-
tained from a special sensor. The outermost loop controls the position by
adjusting the reference value of the velocity loop. In a configuration like
the one in Figure 2.17 the innermost loop is typically the fastest and the
outermost loop is the slowest.

EXAMPLE 2.8—PROCESS CONTROL


A large industrial process such as a refinery or a paper mill has thousands
of control loops. Most variables are primarily influenced by valves, which
have nonlinear characteristics. The model of the system can be simplified
by using local feedback, because it can be assumed that the flows can
be regarded as the inputs to the system. It is then sufficient to find the
relations between flows and the interesting physical quantities.

We have shown how feedback can be used to obtain linear behavior. By


a small modification of the scheme in Figure 2.15 it is also possible to
use feedback to obtain well defined nonlinear relations. It can also be
used to obtain well defined dynamic relations. We illustrate this by a few
examples.

EXAMPLE 2.9—FLIGHT CONTROL


An airplane is primarily influence by changing rudders and engine speed.
The relation between these actuators and the motion of the airplane is
quite complicated and it also changes with flight conditions such as speed
and height. Consider for example the rolling motion of the airplane. By
providing the aircraft with sensors and feedback it is possible to make the
relation between the sideways stick motion and the roll angle look like an
integrator which is easy to control manually. The output remains constant
if the input is zero and the rate of change of the output is proportional to
the input.

EXAMPLE 2.10—A TRAINER FOR SHIPS STEERING


Large ships like tankers are difficult to maneuver. It is possible to have a
small boat and use feedback to make it behave like a large tanker. This
is very convenient for training situations because if the helmsman does
mistakes it is easy to switch off the control system thus giving a small
boat that can easily be maneuvered to recover to a safe situation.

63
Chapter 2. Feedback

EXAMPLE 2.11—COMPLIANCE CONTROL


Consider a tool for grinding that is mounted on an industrial robot. The
robot can apply a force in an arbitrary direction, if the robot is also pro-
vided with force sensors it is possible to arrange a feedback so that the
force is a function of the position of the tool and the its orientation. In
this way it is possible to constrain the tool to be orthogonal to a specified
surface. When forcing the tool away from the surface it will exert a force
that drives it to the surface.

EXAMPLE 2.12—HAPTICS
There are special types of joy sticks which are provided with motors so
that the joy stick can generate forces that give additional information to
the user. With these joy sticks it is possible to use feedback to generate
forces when the cursor approaches given regions. In this way it is possible
to simulate things like pushing on soft objects.
The possibility of using feedback to modify the behavior of systems is an
idea that has very wide applicability.

2.5 Stability

Static analysis of feedback systems is based on the assumption that a con-


trol action is immediately manifested by a change in system output. This
is a strong simplification because systems are typically dynamic which
means that changes in the input do not immediately give rise to changes
in the output. A major effort of control theory is actually devoted to finding
appropriate ways to describe dynamical phenomena.
One consequence of the systems being dynamic is that feedback may
give rise to oscillations. The risk for instability is the major drawback of
using feedback. The static analysis resulting in (2.6) has indicated that
it is advantageous to have controllers with high gain. It is a common
practical experience that feedback systems will oscillate if the feedback
gain is too high. After a perturbation the control error typically has one
of the following behaviors:

S1: The error may decrease monotonously

U1: The error may grow monotonously

S2: The error may be oscillatory with decaying amplitude

U2: The error may be oscillatory with increasing amplitude

64
2.5 Stability

Stable Unstable
1 1

0.5 0.5

0 0
0 10 20 30 40 50 0 10 20 30 40 50
Stable Unstable
1 1

0 0

−1 −1
0 10 20 30 40 50 0 10 20 30 40 50

Figure 2.18 Illustration of different system behaviors used to define stability.

This is illustrated in Figure 2.18, the behaviors S1 and S2 are called stable
the ones labeled U1 and U2 are unstable. There are also intermediate
situations where the error remains constant or oscillates with constant
amplitude.
In a paper from 1868 Maxwell made the important observation that
stability was related to properties of the roots of an algebraic equation. In
particular he established the following relations between the behaviors in
Figure 2.18 and the properties of the roots.

U1: Corresponds to real roots with positive real part

S1: Corresponds to real roots with negative real part

U2: Corresponds to complex roots with positive real part

S2: Corresponds to complex roots with negative real part

Stability analysis of a feedback system can thus be done simply by in-


vestigating if the roots of an algebraic equation have negative real parts.
This will be discussed in detail in Chapter 3.

65
Chapter 2. Feedback

−d

vr u v
Contr Engine Σ Car

−d

vr u v
Σ Contr Engine Σ Car

Figure 2.19 Open and closed loop systems for cruise control. The disturbance is
the slope of the road.

2.6 Open and Closed Loop Systems


Using block diagrams a feedback system can be defined as a system where
there is a loop in the block diagram. For that reason feedback systems are
also called closed loop systems. The opposite of feedback systems are open
loop systems, which have block diagrams which simply are a sequence of
connected blocks.
Open loop systems are easy to understand because we can explain
them by causal reasoning. Consider two blocks connected in series. The
blocks can be investigated one at a time. The output of one block will
be the input to the other and we can use cause and effect reasoning.
This becomes complicated when the blocks are connected in a feedback
loop because the interactions between the blocks. To understand feedback
systems it is therefore necessary to use abstractions and mathematical
reasoning. Open and closed loop systems have very different properties
as is illustrated by the following example.

EXAMPLE 2.13—CRUISE CONTROL


Consider a system for cruise control. The system to be controlled is a car.
The major disturbance is the slope of the road. The input to the system
is the fuel flow into the engine. Block diagrams an open and closed loop
systems is shown in Figure 2.19. The reference signal is fed to the con-
troller which influences the fuel flow. To analyze the differences between
the open and closed loop systems we will use simple static models. The

66
2.6 Open and Closed Loop Systems

car can be described by


v = kp (u − d) (2.9)
where v is the velocity, u is the force generated by the car engine and d
is the gravity force due to the slope of the road. The parameter kp is a
constant that relates the velocity to the total force acting on the car. With
open loop control we have the following relation between the force of the
car and the reference signal.

u = kc vr

where kc is the controller gain and vr is the desired velocity. Eliminating


u between the equations and introducing the velocity error we find

e = vr − v = (1 − kp kc )vr + kp d (2.10)

The error is equal to zero if the slope is zero and if kc = 1/ kp .


For á closed loop system with error feedback the controller can be
described by
u = kc (vr − v)
Combining this with the process model given by (2.9) gives the following
equation for the velocity error

kp kc 1
e = vr − v = vr + d (2.11)
1 + kp kc 1 + kp kc

Some interesting conclusions can be made by comparing Equations (2.10)


and (2.11). First consider the situation when there are no disturbances,
d = 0. With open loop control, (2.10), the velocity error can be made small
by matching the controller gain to be the inverse of the process gain. With
feedback control, (2.11), the velocity error will be small if the controller
gain is large, no matching is required.
Next we will investigate the effect of disturbances. For the open loop
system the effect of a disturbance on the velocity is proportional to the
process gain kp , but for the closed loop system the effect is proportional to
kp /(1 + kp kc ). We thus find that with closed loop control the disturbances
are reduced by the factor
1
1 + kp kc
compared with open loop control. Notice that this factor is the same as
the factor encountered in (2.6).

67
Chapter 2. Feedback

d
−F

u y
P1 Σ P2

Figure 2.20 Illustration of the concept of feedforward.

d
−F

r u y
Σ C Σ P1 Σ P2

−1

Figure 2.21 Control system that combines feedback and feedforward from a mea-
surable disturbance.

2.7 Feedforward

When using feedback that there must be an error before corrective actions
are taken. Feedback is thus reactive. In some circumstances it is possi-
ble to measure a disturbance before it enters the system. It then appears
natural to use the information about the disturbance to take corrective
action before the disturbance has influenced the system. This way of con-
trolling a system is called feedforward. Feedforward is particularly useful
to shape the response to command signals because command signals are
always available. Feedforward compensation of disturbances is illustrated
in Figure 2.20. The effect of the disturbance is reduced by measuring it
and generating a control signal that counteracts it. Since feedforward at-
tempts to match two signals it requires good process models, otherwise
the corrections may have the wrong size or it may be badly timed. Feed-
forward is often combined with feedback as is illustrated in Figure 2.21.
Such a system combines the good features of feedback and feedforward.
The system with a controller having two degrees of freedom shown in
Figure 2.12 can also be interpreted as a system that used feedforward to

68
2.8 Summary

Table 2.1 Properties of Feedback and Feedforward.

Feedback Feedforward
Closed loop Open loop
Market driven Planning
Reactive Pro-active
Robust to modeling errors Sensitive to modeling errors
Risk for instability No risk for instability

obtain a good response to reference signals.


The ideas of feedback and feedforward are very general and appear
in many different fields. In economics they are referred to a market or
planned economy. In business a pure feedforward strategy corresponds to
running a company based on extensive strategic planning while a feed-
back strategy corresponds to a pure reactive approach. The experience
in control indicate that it is often advantageous to combine feedback and
feedforward. Feedforward is particularly useful when disturbances can be
measured or predicted. A typical example is in process control where dis-
turbances in one process may be due to processes upstream. The correct
balance of the approaches requires insight and understanding of their
properties. A summary of the properties of feedback and feedforward are
given in Table 2.1.

2.8 Summary
The idea of feedback has been discussed in this section. It has been shown
that feedback is a powerful concept that has played a major role in the
development of many areas of engineering, e.g. process control, telecom-
munications, instrumentation and computer engineering. This widespread
use of feedback derives from its interesting properties.
• Feedback can reduce effects of disturbances
• Feedback can make a system insensitive to process variations
• Feedback can make a system follow reference values faithfully
• Feedback can create well defined relations between variables in a
system
• Feedback can create desired behavior of a system

69
Chapter 2. Feedback

• Feedback can stabilize an unstable system


• Feedback can create instabilities
The first six features are the main reasons why control is so useful and so
widely used, we summarize them in the catch phrase the magic of feed-
back. The main drawback of feedback is that it may cause instabilities.
This is one reason why it is necessary to have some knowledge of con-
trol. Some special forms of feedback, on-off control and PID control have
also been discussed. Most benefits of feedback can actually be obtained
by PI or PID control. Integral action is very useful because it will give
zero steady state error whenever there is a steady state. Different ways to
describe feedback systems have been introduced, including the notion of
block diagrams which is a powerful method of information hiding. Math-
ematical models in terms of static models have also been introduced and
used to derive some properties of feedback systems. A deeper analysis
requires other tools that take dynamics into account. This is necessary
to describe stability and instability. The chapter ended with a discussion
of another control principle, feedforward, which has properties that are
complementary to feedback.

70
3
Dynamics

3.1 Introduction

From the perspective of control a dynamical system is such that the ef-
fects of actions do not occur immediately. Typical examples are: The ve-
locity of a car does not change immediately when the gas pedal is pushed.
The temperature in a room does not rise immediately when an air condi-
tioner is switched on. Dynamical systems are also common in daily life. A
headache does not vanish immediately when an aspirin is taken. Knowl-
edge of school children do not improve immediately after an increase of a
school budget. Training in sports does not immediately improve results.
Increased funding for a development project does not increase revenues
in the short term.
Dynamics is a key element of control because both processes and con-
trollers are dynamical systems. Concepts, ideas and theories of dynamics
are part of the foundation of control theory. Dynamics is also a topic of its
own that is closely tied to the development of natural science and math-
ematics. There has been an amazing development due to contributions
from intellectual giants like Newton, Euler, Lagrange and Poincare.
Dynamics is a very rich field that is partly highly technical. In this
section we have collected a number of results that are relevant for under-
standing the basic ideas of control. The chapter is organized in separate
sections which can be read independently. The first time reader is recom-
mended to read this chapter section-wise as they are needed for the other
parts of the book.
Section 3.2 gives an overview of dynamics and how it is used in con-
trol which has inherited ideas both from mechanics and from electrical
engineering. It also introduces the standard models that are discussed in
the following sections. In Section 3.3 we introduce a model for dynamics

71
Chapter 3. Dynamics

in terms of linear, time-invariant differential equations. This material is


sufficient for analysis and design of simple control systems of the type dis-
cussed in the beginning of Chapter 5. The concepts of transfer function,
poles and zeros are also introduced in Section 3.3. Another view of lin-
ear, time-invariant systems is given in Section 3.4 introduces the Laplace
transform which is a good formalism for linear systems. This also gives
another view on transfer functions. Combining the block diagrams intro-
duced in Chapter 2 with the transfer functions gives a simple way to
model and analyze feedback systems. The material in Section 3.4 gives a
good theoretical base for Chapters 4 and 5. Frequency response is yet an-
other useful way of describing dynamics that provides additional insight.
The key idea is to investigate how sine waves are propagating through
a dynamical system. This is one of the contributions from electrical en-
gineering discussed in Section 3.5. This section together with Section 3.4
gives the basis for reading Chapters 4, 5, 6 and 7 of the book.
Section 3.6 presents the idea of state models which has its origin in
Newtonian mechanics. The problems of control have added richness by
the necessity to include the effect of external inputs and the information
obtained from sensors. In Section 3.6 we also discuss how to obtain models
from physics and how nonlinear systems can be approximated by linear
systems, so called linearization.
The main part of this chapter deals with linear time invariant systems.
We will frequently only consider systems with one input and one output.
This is true for Sections 3.3, 3.4 and 3.5. The state models in Section 3.5
can however be nonlinear and have many inputs and outputs.

3.2 Two Views on Dynamics


Dynamical systems can be viewed from two different ways: the internal
view or the external views. The internal view which attempts to describe
the internal workings of the system originates from classical mechanics.
The prototype problem was to describe the motion of the planets. For this
problem it was natural to give a complete characterization of the motion
of all planets. The other view on dynamics originated in electrical engi-
neering. The prototype problem was to describe electronic amplifiers. It
was natural to view an amplifier as a device that transforms input volt-
ages to output voltages and disregard the internal detail of the amplifier.
This resulted in the input-output view of systems. The two different views
have been amalgamated in control theory. Models based on the internal
view are called internal descriptions, state models or white box models.
The external view is associated with names such as external descriptions,
input-output models or black box models. In this book we will mostly

72
3.2 Two Views on Dynamics

use the words state models and input-output models.

The Heritage of Mechanics


Dynamics originated in the attempts to describe planetary motion. The
basis was detailed observations of the planets by Tycho Brahe and the
results of Kepler who found empirically that the orbits could be well de-
scribed by ellipses. Newton embarked on an ambitious program to try to
explain why the planets move in ellipses and he found that the motion
could be explained by his law of gravitation and the formula that force
equals mass times acceleration. In the process he also invented calculus
and differential equations. Newton’s results were the first example of the
idea of reductionism, i.e. that seemingly complicated natural phenomena
can be explained by simple physical laws. This became the paradigm of
natural science for many centuries.
One of the triumphs of Newton’s mechanics was the observation that
the motion of the planets could be predicted based on the current posi-
tions and velocities of all planets. It was not necessary to know the past
motion. The state of a dynamical system is a collection of variables that
characterize the motion of a system completely for the purpose of pre-
dicting future motion. For a system of planets the state is simply the
positions and the velocities of the planets. A mathematical model simply
gives the rate of change of the state as a function of the state itself, i.e. a
differential equation.
dx
= f ( x) (3.1)
dt
This is illustrated in Figure 3.1 for a system with two state variables. The
particular system represented in the figure is the van der Pol equation

dx1
= x1 − x13 − x2
dt
dx2
= x1
dt

which is a model of an electronic oscillator. The model (3.1) gives the ve-
locity of the state vector for each value of the state. These are represented
by the arrows in the figure. The figure gives a strong intuitive represen-
tation of the equation as a vector field or a flow. Systems of second order
can be represented in this way. It is unfortunately difficult to visualize
equations of higher order in this way.
The ideas of dynamics and state have also influenced the philosophi-
cal discourse of predestination. If the state of a natural system is known
at some time its future development is complete determined. The vital
development of dynamics has continued in the 20th century. One of the

73
Chapter 3. Dynamics

3 M=1
x’=Mx−y−x
y’=x

1.5

0.5

0
y

−0.5

−1

−1.5

−2

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2


x

Figure 3.1 Illustration of a state model. A state model gives the rate of change of
the state as a function of the state. The velocity of the state are denoted by arrows.

interesting outcomes is chaos theory. It was discovered that there are sim-
ple dynamical systems that are extremely sensitive to initial conditions,
small perturbations may lead to drastic changes in the behavior of the
system. The behavior of the system could also be extremely complicated.
The emergence of chaos also resolved the problem of determinism, even
if the solution is uniquely determined by the initial conditions it is in
practice impossible to make predictions of future behavior because of the
sensitivity of initial conditions.
The differential equation (3.1) is called an autonomous system be-
cause there are no external influences. Such a model is natural to use for
celestial mechanics, because it is difficult to influence the motion of the
planets. The situation in control is quite different because the external
influences are quite important. One way to capture this is to replace (3.1)
by
dx
= f ( x, u) (3.2)
dt

where u represents the effect of external influences. The model (3.2) is


called a controlled differential equation. The model implies that the veloc-
ity of the state can be influenced by the input u. Adding the input makes
the model richer. New questions arise, for example, what influence can
the control variable have on the trajectories of the system? Is it possible
to reach all points in the state space by proper choices of the control?

74
3.2 Two Views on Dynamics

Input Output
System

Figure 3.2 Illustration of the input-output view of a dynamical system.

The Heritage of Electrical Engineering


A very different view of dynamics emerged from electrical engineering.
The prototype problem was design of electronic amplifiers. Since an am-
plifier is a device for amplification of signals it is natural to focus on the
input-output behavior. A system was considered as a device that trans-
formed inputs to outputs, see Figure 3.2. Conceptually, an input-output
model can be viewed as a giant table of inputs and outputs. The input-
output view is particularly useful for the special class of linear systems. To
define linearity we let (u1 , y1 ) och (u2 , y2 ) denote two input-output pairs,
and a and b be real numbers. A system is linear if (au1 + bu2 , a y1 + by2 ) is
also an input-output pair (superposition). A nice property of control prob-
lems is that they can often be modeled by linear, time-invariant systems.
Time invariance is another concept. It means that the behavior of the
system at one time is equivalent to the behavior at another time. It can be
expressed as follows. Let (u, y) be an input-output pair and let ut denote
the signal obtained by shifting the signal u, t units forward. A system
is called time-invariant if (ut , yt ) is also an input-output pair. This view
point has been very useful, particularly for linear, time-invariant systems,
whose input output relation can be described by
Z t
y(t) = g(t − τ )u(τ )dτ . (3.3)
0

where g is the impulse response of the system. If the input u is a unit


step the output becomes
Z t Z t
y(t) = h(t) = g(t − τ )dτ = g(τ )dτ (3.4)
0 0

The function h is called the step response of the system. Notice that the
impulse response is the derivative of the step response.
Another possibility to describe a linear, time-invariant system is to
represent a system by its response to sinusoidal signals, this is called fre-
quency response. A rich powerful theory with many concepts and strong,
useful results have emerged. The results are based on the theory of com-
plex variables and Laplace transforms. The input-output view lends it

75
Chapter 3. Dynamics

naturally to experimental determination of system dynamics, where a


system is characterized by recording its response to a particular input,
e.g. a step.
The words input-output models, external descriptions, black boxes are
synonyms for input-output descriptions.

The Control View


When control emerged in the 1940s the approach to dynamics was strongly
influenced by the Electrical Engineering view. The second wave of devel-
opments starting in the late 1950s was inspired by the mechanics and the
two different views were merged. Systems like planets are autonomous
and cannot easily be influenced from the outside. Much of the classical
development of dynamical systems therefore focused on autonomous sys-
tems. In control it is of course essential that systems can have external
influences. The emergence of space flight is a typical example where pre-
cise control of the orbit is essential. Information also plays an important
role in control because it is essential to know the information about a
system that is provided by available sensors. The models from mechan-
ics were thus modified to include external control forces and sensors. In
control the model given by (3.5) is thus replaced by

dx
= f ( x, u)
dt (3.5)
y = g( x, u)

where u is a vector of control signal and y a vector of measurements. This


viewpoint has added to the richness of the classical problems and led to
new important concepts. For example it is natural to ask if all points in
the state space can be reached and if the measurements contain enough
information to reconstruct the state.
The input-output approach was also strengthened by using ideas from
functional analysis to deal with nonlinear systems. Relations between
the state view and the input output view were also established. Current
control theory presents a rich view of dynamics based on good classical
traditions.
Disturbances and model uncertainty are essential elements of control,
they are in fact the the main reasons for using feedback. To model dis-
turbances and model uncertainty is therefore essential. One approach is
to describe a model by a nominal system and some characterization of
the model uncertainty. The dual views on dynamics is essential in this
context. State models are very convenient to describe a nominal model
but uncertainties are easier to describe using frequency response.

76
3.3 Linear Differential Equations

Standard Models
Standard models are very useful for structuring our knowledge. It also
simplifies problem solving. Learn the standard models, transform the
problem to a standard form and you are on familiar grounds. We will
discuss four standard forms
• Linear differential equations
• Transfer functions
• Frequency responses
• State equations
The first three standard forms are primarily used for linear time-invariant
systems. The state equations also apply to nonlinear systems.

3.3 Linear Differential Equations


Consider the following description of a linear time-invariant dynamical
system

dn y dn−1 y dn−1 u dn−2 u


+ a1 + . . . + a n y = b1 + b2 + . . . + bn u, (3.6)
dtn dtn−1 dtn−1 dtn−2
where u is the input and y the output. The system is of order n order,
where n is the highest derivative of y. The ordinary differential equations
is a standard topic in mathematics. In mathematics it is common practice
to have bn = 1 and b1 = b2 = . . . = bn−1 = 0 in (3.6). The form (3.6) adds
richness and is much more relevant to control. The equation is sometimes
called a controlled differential equation.
It follows from the rules for differentiation that

dk dk y1 dk y2
(α y1 + β y2 ) = α + β
dtk dtk dtk
If (u, y) is a pair of inputs and outputs it follows that (u′ , y′ ) is also an
input output pair. Similarly, if the (u1 , y1 ) and (u2 , y2 ) are pairs of inputs
and outputs that satisfy the Equation (3.6) (α u1 + β u2 , α y1 + β y2 ) is also
an input output pair, which is the principle of superposition.

The Homogeneous Equation


If the input u to the system (3.6) is zero, we obtain the equation

dn y dn−1 y dn−2 y
+ a1 + a2 + . . . + an y = 0, (3.7)
dtn dtn−1 dtn−2

77
Chapter 3. Dynamics

α <0 aneg
3
1
2.5
0.8
2
0.6
y

y
1.5

0.4 1

0.2 0.5

0 0
0 1 2 3 4 0 0.2 0.4 0.6 0.8 1
αt αt

Figure 3.3 The exponential function y(t) = eα t . The linear approximations of of


the functions for small α t are shown in dashed lines. The parameter T = 1/α is
the time constant of the system.

which is called the homogeneous equation associated with equation (3.6).


The characteristic polynomial of Equations (3.6) and (3.7) is

a(s) = sn + a1 sn−1 + a2 sn−2 + . . . + an (3.8)

The roots of the characteristic equation determine the properties of the


solution. If a(α ) = 0, then y(t) = Ceα t is a solution to Equation (3.7).
If the characteristic equation has distinct roots α k the solution is

n
Ck eα k t ,
X
y(t) = (3.9)
k=1

where Ck are arbitrary constants. The Equation (3.7) thus has n free
parameters.

Roots of the Characteristic Equation give Insight


A real root s = α corresponds to ordinary exponential functions eα t . These
are monotone functions that decrease if α is negative and increase if α is
positive as is shown in Figure 3.3. Notice that the linear approximations
shown in dashed lines change by one unit for one unit of α t. Complex
roots s = σ ± iω correspond to the time functions.

eσ t sin ω t, eσ t cos ω t

which have oscillatory behavior, see Figure 3.4. The distance between zero
crossings is π /ω and corresponding amplitude change is eσπ /ω .

78
3.3 Linear Differential Equations

σ = −0.25ω σ = 0.25ω
40
0.6
30

0.4 20

0.2
y

y
10

0 0

−0.2 −10

−0.4 −20
0 5 10 15 0 5 10 15
ωt ωt

Figure 3.4 The exponential function y(t) = eσ t sin ω t. The dashed lines showing
the envelope correspond to a first order system with time constant T = 1/σ . The
distance between zero crossings is π /ω .

Multiple Roots
When there are multiple roots the solution to Equation (3.7) has the form
n
Ck (t) eα k t ,
X
y(t) = (3.10)
k=1

Where Ck (t) is a polynomial with degree less than the multiplicity of the
root α k . The solution (3.10) thus has n free parameters.

The Inhomogeneous Equation – A Special Case


The equation

dn y dn−1 y dn−2 y
n
+ a1 n−1 + a2 n−2 + . . . + an y = u(t) (3.11)
dt dt dt

has the solution


n Z t
Ck (t) eα k t + f (t − τ )u(τ )dτ ,
X
y(t) = (3.12)
k=1 0

where f is the solution to the homogeneous equation (3.7), i.e.

dn f dn−1 f
+ a1 + . . . + an f = 0 (3.13)
dtn dtn−1

with initial conditions

f (0) = 0, f ′ (0) = 0, . . . , f (n−2) (0) = 0, f (n−1) (0) = 1. (3.14)

79
Chapter 3. Dynamics

The solution (3.12) is thus a sum of two terms, the general solution to
the homogeneous equation and a particular solution which depends on
the input u. The solution has n free parameters which can be determined
from initial conditions.
To show that (3.12) satisfies (3.11) we first observe that the sum in
(3.12) satisfies the homogeneous equation (3.7). Consider
Z t
v(t) = f (t − τ )u(τ )dτ ,
0

It follows from (3.14) that v(0) = 0. Taking derivatives we find that


Z t

v (t) = f ′ (t − τ )u(τ )dτ + f (0)u(t)
0
Z t
′′
v (t) = f ′′ (t − τ )u(τ )dτ + f ′ (0)u(t)
0
..
.
Z t
v(n) (t) = f (n) (t − τ )u(τ )dτ + f (n−1) (0)u(t)
0

It follows from (3.13) and (3.14) that v satisfies the differential equation
(3.11).

The Inhomogeneous Equation - The General Case


Having found a solution to (3.11) it is straightforward to find a solution
to the general equation (3.6). If y is a solution to the (3.11) it follows that
d y/ dt is a solution to the differential equation.

dn y dn−1 y dn−2 y du
n
+ a1 n −1
+ a2 n −2
+ . . . + an y =
dt dt dt dt

Repeating this argument for higher derivatives we find that the Equa-
tion (3.6) has the solution

n Z t
Ck (t) eα k t + g(t − τ )u(τ )dτ ,
X
y(t) = (3.15)
k=1 0

where the function g is given by

g(t) = b1 f (n−1) (t) + b2 f (n−2) (t) + . . . + bn f (t). (3.16)

80
3.3 Linear Differential Equations

The solution is thus the sum of two terms, the general solution to the
homogeneous equation and a particular solution. The general solution to
the homogeneous equation does not depend on the input. The particular
solution is given by
Z t
y(t) = g(t − τ )u(τ )dτ
0

where g is called the impulse response.


Notice that the impulse response has the form


n
Ck (t) eα k t .
X
g(t) = (3.17)
k=1

It thus has the same form as the general solution to the homogeneous
equation (3.10). The coefficients Ck in (3.17) are given by the conditions
(3.14). They are constants if the characteristic equation has distinct roots
but polynomials if there are multiple roots. If α k is a root of multiplicity
m then ck (t) is a polynomial of degree m − 1.
The impulse response is also called the weighting function because the
second term of (3.15) can be interpreted as a weighted sum of past inputs.

The Step Response


Consider (3.15) and assume that all initial conditions are zero. The output
is then given by
Z t
y(t) = g(t − τ )u(τ )dτ , (3.18)
0

If the input is constant u(t) = 1 we get


Z t Z t
y(t) = g(t − τ )dτ = g(τ )dτ = H (t), (3.19)
0 0

The function H is called the unit step response or the step response for
short. It follows from the above equation that

dh(t)
g(t) = (3.20)
dt

The step response can easily be determined experimentally by waiting


for the system to come to rest and applying a constant input. In process
engineering the experiment is called a bump test. The impulse response
can then be determined by differentiating the step response.

81
Chapter 3. Dynamics

10

u(τ ) y(τ )
5

−5
0 1 2 3 4 5 6 7 8 9 10

1
g(10 − τ )

0.5

0
0 1 2 3 4 5 6 7 8 9 10

2
u(τ ) g(10 − τ )

−1
0 1 2 3 4 5 6 7 8 9 10

Figure 3.5 Illustration of the convolution integral for the impulse response g(t) =
e−4t . The top shows the input u in full lines and the output y in dashed lines. The
lower graphs illustrates how y(10) is obtained.

The Convolution Integral


The relation between the input and the output for a system which is
initially at rest is given by Equation (3.18), i.e.

Z t
y(t) = g(t − τ )u(τ )dτ .
0

Mathematically the output is called a convolution of the input u and the


impulse response g. This integral has a nice interpretation which is illus-
trated in Figure 3.5. The figure illustrates that the output is obtained as
a weighted average of the input. The top plot shows the input u in full
lines and the output y in dashed lines. The lower graphs illustrates how
the value y(10) is obtained. The middle curve shows the impulse response
g(10 − τ ) and the lower plot shows the product u(τ )g(10 − τ ). The value
y(10) is simply the integral of u(τ )g(10 − τ ). By understanding of the
interpretation of the convolution integral it is easy to develop an intuitive
understanding of the qualitative behavior of a system from the impulse
response.

82
3.3 Linear Differential Equations

Stability - The Routh-Hurwitz Stability Criterion


The solution of a system is described by the ordinary differential equation
(3.6) is given by (3.10). The solution is stable if all solutions go to zero. A
system is thus stable if the real parts of all α i are negative, or equivalently
that all the roots of the characteristic polynomial (3.8) have negative real
parts.
Stability can be determined simply by finding the roots of the charac-
teristic polynomial of a system. This is easily done in Matlab .
When control started to be used for steam engines and electric gener-
ators, computational tools were not available and it was a major effort to
find roots of an algebraic equation. Much intellectual activity was devoted
to the problem of investigating if an algebraic equation has all its roots in
the left half plane without solving the equation. One result is the Routh-
Hurwitz criterion. A few special cases of this are given in the example
below.

EXAMPLE 3.1—SPECIAL CASE OF ROUTH-HURWITZ STABILITY CRITERION


• The polynomial a(s) = s + a1 has its zero in the left half plane if
a1 > 0.

• The polynomial a(s) = s2 + a1 s + a2 has all its zeros in the left half
plane if all coefficients are positive.

• The polynomial a(s) = s3 + a1 s2 + a2 s + a3 has all its zeros in the


left half plane if all coefficients are positive and if a1 a2 > a3 .

Transfer Functions, Poles and Zeros


The model (3.6) is characterized by two polynomials

a(s) = sn + a1 sn−1 + a2 sn−2 + . . . + an−1 s + an


b(s) = b1 sn−1 + b2 sn−2 + . . . + bn−1 s + bn

The rational function


b(s)
G ( s) = (3.21)
a(s)
is called the transfer function of the system.
Consider a system described by (3.6). Assume that the input and the
output have constant values u0 and y0 respectively. It then follows from
(3.6) that
an y0 = bn u0

83
Chapter 3. Dynamics

which can be written


y0 bn
= = G (0)
u0 an
The number G (0) is called the static gain of the system because it tells
the ratio of the output and the input under steady state condition. If the
input is constant u = u0 and the system is stable then the output will
reach the steady state value y0 = G (0)u0 . The transfer function can thus
be viewed as a generalization of the concept of gain.
Notice the symmetry between y and u. The inverse system is obtained
by reversing the roles of input and output. The transfer function of the
b(s) a(s)
system is and the inverse system has the transfer function .
a(s) b(s)
The roots of a(s) are called poles of the system. The roots of b(s) are
called zeros of the system. The poles of the system are the roots of the
characteristic equation. If α is a pole it follows that a(α ) = 0 and that
y(t) = eα t is a solution to the homogeneous equation (3.7). To prove this
we differentiate
dk y dk α t
= e = α k y(t)
dtk dtk
and we find

dn y dn−1 y dn−2 y
+ a1 + a2 + . . . + an y = a(α ) y(t) = 0
dtn dtn−1 dtn−2

If s = α is a pole the solution to the differential equation has the compo-


nent eα t , which is also called a mode, see (3.15). The modes correspond
to the terms of the solution to the homogeneous equation (3.7) and the
terms of the impulse response (3.17) and the step response.
If s = β is a zero of b(s) and u(t) = Ceβ t , then follows that

dn−1 u dn−2 u
b1 n −1
+ b2 n−2 . . . + bn u = b(β ) Ceβ t = 0.
dt dt

If the input to the system (3.6) is eβ t it thus follows that the solution
is given by the general solution to the homogeneous equation (3.7). The
solution thus will not contain the term eβ t . A zero of b(s) at s = β blocks
the transmission of the signal u(t) = Ceβ t . Notice that this does not mean
that the output is zero when the the input is eβ t unless initial conditions
are chosen in a very special way.

Response to Exponential Inputs


Exponential functions play an important role in linear systems. The im-
pulse response of a linear time invariant system is for a sum of terms

84
3.3 Linear Differential Equations

which are products of exponentials and polynomials, see (3.17). Exponen-


tial functions also appear in the general form of the solution of a linear
differential equation, see (3.15). In this section we will investigate how a
linear time invariant system responds to an exponential signal. Consider
the system given by (3.6) and let the input be

u(t) = eα t .

where a(α ) = 0. The solution to the differential equation is a sum of the


general solution to the homogeneous equation and a particular solution.
We will investigate if there is a particular solution of the form

y(t) = y0 eα t

Inserting this into the differential equation (3.6) we find

α n y0 + a1α n−1 + ⋅ ⋅ ⋅ + an y0 = b1α n−1 + b2α n−2 + ⋅ ⋅ ⋅ + bn

The differential equation (3.6) thus has a solution of the form y0 eα t where

b1α n−1 + b2α n−2 + ⋅ ⋅ ⋅ + bn


y0 = = G (α )
α n + a1α n−1 + ⋅ ⋅ ⋅ + an
where G (s) is the transfer function of the system. Let λ k be the zeros
of the characteristic polynomial a(s) of the system we thus find that the
general solution of the differential equation (3.6) with the input u(t) = eα t
is
Ck (t) eλ k t + G (α ) eα t
X
y(t) = (3.22)
k

The particular solution corresponding to the input eα t is thus G (α ) eα t . If


the initial conditions are chosen as yk (0) = α k G (α ) the sum disappears
and we get y(t) = G (α ) eα t . If Reλ k < α the particular solution will
dominate the response for large t for arbitrary initial conditions. We thus
obtain the interesting result that the number G (α ) tells how exponential
functions propagate through the system.
Equation (3.22) is valid when α is a complex number. If α = iω we
find that the response to
u(t) = eiω t
is
Ck (t) eλ k t + G (iω ) eiω t
X
y(t) =
k

We have

G (iω ) eiω t = h G (iω )h ei arg G(iω ) eiω t = h G (iω )h ei(ω t+arg G(iω ))

85
Chapter 3. Dynamics

Separating the real and imaginary parts of the input and the output we
find that the input u(t) = sin ω t gives the output
X 
y(t) = Im Ck (t) eλ k t + h G (iω )h sin (ω t + arg G (iω )) (3.23)
k

This result is of particular interest for stable systems. For such systems
we have Reλ k < 0. After an initial transient the response to a sinusoidal
input will thus be sinusoidal with the same frequency as the input. The
output is thus amplified by the factor h G (iω )h and the phase is shifted by
arg G (iω ) in relation to the input. This is discussed further in Section 3.5.

3.4 Laplace Transforms


In this chapter we will develop effective methods to characterize how a
linear systems resesponds to different stimuli. An overall description of
the system will be given by a block diagram. The behavior of an individ-
ual block is described by an ordinary differential equation with constant
coefficients. The first task is to derive the transfer function or the differ-
ential equation for the closed loop system where the chosen stimuli is the
input and the variable we are interested in is the output. This task can be
simplified substantially by introducing an abstraction, the Laplace trans-
form. The downside is that we have to become familiar with the concept
of Laplace transforms.
The Laplace transform is an essential part of the language of control.
Only a few elementary properties are needed for basic control applications.
There is a beautiful theory for Laplace transforms which makes it possible
to use many powerful tools of the theory of functions of a complex variable
to get deep insights into the behavior of systems.
Consider a time function f : R+ → R which is integrable and grows
no faster than es0 t for large t. The Laplace transform maps f to a function
F = L f : C → C of a complex variable. It is defined by
Z ∞
F ( s) = e−st f (t)dt, Res > s0 (3.24)
0

The transform has some properties that makes it very well suited to deal
with linear systems. First we observe that the transform is linear because
Z ∞
L (a f + bg) = e−st (a f (t) + bg(t))dt
0
Z ∞ Z ∞ (3.25)
=a e−st f (t)dt + b e−st g(t)dt = aL f + bL g
0 0

86
3.4 Laplace Transforms

Next we will calculate the Laplace transform of the derivative of a func-


tion. We have
Z ∞ ∞ Z ∞
df
L = e−st f ′ (t)dt = e−st f (t) + s e−st f (t)dt = − f (0) + sL f

dt 0 0 0

where the second equality is obtained by integration by parts. We thus


obtain the following important formula for the transform of a derivative
df
L = sL f − f (0) = sF (s) − f (0) (3.26)
dt
This formula is particularly simple if the initial conditions are zero be-
cause it follows that differentiation of a function corresponds to multipli-
cation of the transform with s.
Since differentiation corresponds to multiplication with s we can expect
that integration corresponds to division by s. This is true as can be seen
by calculating the Laplace transform of an integral. We have
Z t Z ∞ Z t 
L f (τ )dτ = e−st f (τ )dτ dt
0 0 0
e−st t −sτ
Z ∞ Z ∞ e−sτ 1 ∞ −sτ
Z
=− e f (τ )dτ + f (τ )dτ = e f (τ )dτ

s 0 0 0 s s 0
hence
t
1 1
Z
L f (τ )dτ =
L f = F ( s) (3.27)
0 s s
Integration of a time function thus corresponds to dividing the Laplace
transform by s.

The Laplace Transform of a Convolution Consider a linear time-


invariant system where the initial state is zero. The relation between the
input u and the output y is given by the convolution integral
Z ∞
y(t) = g(t − τ )u(τ )dτ
0

see (3.20). We will now consider the Laplace transform of such an expres-
sion. We have
Z ∞ Z ∞ Z ∞
Y ( s) = e−st y(t)dt = e−st g(t − τ )u(τ )dτ dt
0 0 0
Z ∞Z t
= e−s(t−τ ) e−sτ g(t − τ )u(τ )dτ dt
0 0
Z ∞ Z ∞
−sτ
= e u(τ )dτ e−st g(t)dt = G (s) U (s)
0 0

87
Chapter 3. Dynamics

The result can be written as Y (s) = G (s) U (s) where G, U and Y are the
Laplace transforms of g, u and y. The system theoretic interpretation is
that the Laplace transform of the output of a linear system is a product
of two terms, the Laplace transform of the input U (s) and the Laplace
transform of the impulse response of the system G (s). A mathematical
interpretation is that the Laplace transform of a convolution is the product
of the transforms of the functions that are convoluted. The fact that the
formula Y (s) = G (s) U (s) is much simpler than a convolution is one reason
why Laplace transforms have become popular in control.

The Transfer Function


The properties (3.25) and (3.26) makes the Laplace transform ideally
suited for dealing with linear differential equations. The relations are
particularly simple if all initial conditions are zero.
Consider for example a system described by the differential equation.

dn y dn−1 y dn−1 u dn−2 u


+ a1 + . . . + a n y = b1 + b2 + . . . + bn u, (3.28)
dtn dtn−1 dtn−1 dtn−2

Taking Laplace transforms under the assumption that all initial values
are zero we get

(sn + a1 sn−1 + a2 sn−2 + . . . + an−1 s + an ) Y (s)


= (b1 sn−1 + b2 sn−2 + . . . + bn−1 s + bn ) U (s)

Hence
b1 sn−1 + b2 sn−2 + . . . + bn−1 s + bn
Y ( s) = U ( s)
sn + a1 sn−1 + a2 sn−2 + . . . + an−1 s + an
This equation implies that there is a very simple relation between the
Laplace transforms of the inputs and the outputs of a linear system. The
transform of the output is simply the product of the transform of the input
and a rational function G (s), i.e.

Y ( s) = G ( s) U ( s) (3.29)

where
b1 sn−1 + b2 sn−2 + . . . + bn−1 s + bn
G ( s) =
sn + a1 sn−1 + a2 sn−2 + . . . + an−1 s + an
The function G (s) is called the transfer function of the system. For a
single input single output system the transfer function is thus the ratio
of the Laplace transforms of the output and the input where the Laplace
transforms are calculated under the assumption that all initial values

88
3.4 Laplace Transforms

are zero. The fact that all initial values are assumed to be zero has some
consequences that will be discussed later. For a static system we have the
following simple relation between the input u and the output y.
It follows from Equation (3.29) that signals and systems have the same
representations. In the formula we can thus consider g as the input and
u as the transfer function.
Consider the particular case when both the input and the output are
constants, u = u0 and y = y0 . Since the derivatives of a constant are zero
it follows from the differential equation (3.28) that

y0 bn
= = G (0)
u0 an

The value of the transfer function for s = 0 thus gives the ratio of the
output and the input in steady state. We call this ratio the steady state
gain.
For a linear static system the input is simply the product of the output
and the steady state gain of the system, i.e.

y = gu (3.30)

where g is the gain of the system.


The formula (3.29) has a strong intuitive interpretation because it tells
that the Laplace transform of the output is the product of the transfer
function of the system and the transform of the input. In the transform
domain the action of a linear system on the input is simply a multi-
plication with the transfer function. The transfer function is a natural
generalization of the concept of gain of a system.

Block Diagrams and Transfer Functions


Transfer functions and Laplace transforms are very well suited for analy-
sis of linear control systems. We have already shown that a block is simply
characterized by Equation (3.29). The Laplace transform of the output is
thus simply the product of the transform of the input and the transfer
function of a system, i.e. Y (s) = G (s) U (s). A block can thus simply be
represented algebraically as a multiplication. Since the other element of
a block diagram is a summation it follows that relations between signals
in a block diagram can be obtained by pure algebraic manipulations. We
thus obtain the following very simple recipe for analyzing control systems.
• Draw the block digram of the system.
• Derive transfer functions for each block.

89
Chapter 3. Dynamics

d n

r e u x y
Σ C Σ P Σ

−1

Figure 3.6 Block diagram of a feedback system.

• Use algebra to obtain the transfer functions that relate the signals
of interest.
• Interprete the transfer function.
• Simulate the system by computing responses to interesting signals.
The combination of block diagrams and transfer functions is a power-
ful tool because it is possible both to obtain an overview of a system
and find details of the behavior of the system. By representing signals
by their Laplace transforms and the blocks by transfer functions the re-
lations between signals in the system are obtained by straight forward
manipulations. We illustrate this by an example.

EXAMPLE 3.2—RELATIONS BETWEEN SIGNALS IN A BLOCK DIAGRAM


Consider the system in Figure 3.6. The system has two blocks representing
the process P and the controller C. There are three external signals, the
reference r, the load disturbance d and the measurement noise n. A typical
problem is to find out how the output y is related to the signals r d and n?
Introduce the Laplace transforms of the signals and the transfer functions
of the blocks. To simplify the notation we will drop the argument s of the
Laplace transforms. Signals are labeled by lower case letters and their
Laplace transforms with the corresponding upper case letters.
To obtain the desired relation we simply trace the signals around the
loop. We begin with the signal we are interested in, i.e. y. It follows from
the block diagram that x inis the sum of n and x, hence

Y = X + N.

The signal x is the output of the block P whose input is u + d which gives

X = P( U + D ),

where u is the output of the controller, i.e.

U = C E = C ( R − Y ),

90
3.4 Laplace Transforms

The signal tracing is now complete because the signal y that we started
with appears in the right hand side. Combining the equations above gives
Y = X + N = P( U + D ) + N = P( C E + D ) + N
= P C ( R − Y ) + D + N = PCR − PCY + PD + N .


Hence
(1 + PC ) Y = PCR + PD + N
or
PC P 1
Y= R+ D+ N = G yr R + G yd D + G yn N (3.31)
1 + PC 1 + PC 1 + PC
The error is thus the sum of three terms, depending on the reference r,
the measurement noise n and the load disturbance d. The function
PC
G yr =
1 + PC
is the transfer function from reference r to output y, G yd is the transfer
functions from load disturbance d to output y and G yn is the transfer
functions from measurement noise d to output y. Each term in (3.31) is
a product of a transfer function and a signal. This is a typical illustration
of the superposition principle.
The example illustrates an effective way to manipulate the equations to
obtain the relations between inputs and outputs in a feedback system.
The general idea is to start with the signal of interest and to trace signals
around the feedback loop until coming back to the signal we started with.
With some practice the equation (3.31) can be written directly by inspec-
tion of the block diagram. Notice that all terms in Equation (??) formally
have the same denominators 1 + PC and the numerators correspond to the
blocks between the signals of interest. Notice that there may be common
factors the transfer functions that cancel.

Circuit Analysis - Impedance Operators *


Laplace transforms are very useful for circuit analysis. A resistor is de-
scribed by the algebraic equation
v = Ri
but inductors and capacitors are described by the linear differential equa-
tions
Z t
Cv = i(τ )dτ
0
di
L =v
dt

91
Chapter 3. Dynamics

R2 C

R1
I0
+
V

v1 v2

Figure 3.7 Schematic diagram of an electric circuit.

Introducing the Laplace transforms V = L v and I = L i these equations


can be written as

V ( s) = R I ( s)
1
V ( s) = I ( s)
sC
V (s) = sL I (s)

The transformed equations for all components thus have the form V (s) =
Z (s) I (s), where Z (s) is a generalized impedance, where
Z (s) = R for a resistor
1
Z ( s) = for a capacitor
sC
Z (s) = sL for an inductor
To analyze a circuit we can use these correspondences to define the opera-
tor impedances. Introducing Laplace transforms of voltages and currents
we can then pretend that all elements of a circuit are resistors. This means
that circuit analysis is reduced to pure algebra. This is just another illus-
tration of the fact that differential equations are transformed to algebraic
equations. We illustrate the procedure by an example.

EXAMPLE 3.3—OPERATIONAL AMPLIFIERS


Consider the electric circuit shown in Figure 3.7. Assume that the problem
is to find the relation between the input voltage V1 and the output voltage
V2 . Assuming that the gain of the amplifier is very high, say around 106 ,
then the voltage V is negligible and the current I0 is zero. The currents
I1 and I2 then are the same which gives

V1 (s) V2 (s)
=−
Z 1 ( s) Z 2 ( s)

92
3.4 Laplace Transforms

It now remains to determine the generalized impedances Z1 and Z2 . The


impedance Z1 = R1 is a regular resistor. To determine Z2 we use the
simple rule for combining resistors which gives

1
Z 2 ( s ) = R2 +
sC

Hence
V2 (s) Z 2 ( s) R2 1
=− =− −
V1 (s) Z 1 ( s) R1 R1 Cs
Converting to the time domain we find

1 t
Z
R2
v2 (t) = − − v1 (τ )dτ
R1 R1 C 0

The circuit is thus a PI controller.

Computing Time Responses


Matlab is well suited to simulate systems and to compute time responses.
This will be illustrated with a few examples.

EXAMPLE 3.4—COMPUTING TIME RESPONSE


A system with the transfer function

4s + 5
G ( s) =
s2 + 2s + 3

is introduced in Matlab as
G=tf([4 5],[1 2 3])
The time responses of the system are obtained by the commands
y=step(G,t) step response
y=impulse(G,t) impulse response
y=lsim(G,u,t)
where t is a vector of times where the output is computed. Use the help
command to find out how the commands work in detail.
The command step(G) plots the step response of the system G. It is
often desirable to have better control of the graph. The following example
illustrates how this can be done.

93
Chapter 3. Dynamics

Plotting

2
Output

0
0 5 10 15 20
Time

Figure 3.8 Computing step responses with better control of the plots.

EXAMPLE 3.5—BETTER CONTROL OF PLOTS


The following sequence of commands plots the step response at specified
time points.
t=0:0.1:20;
y=step(G,t);
subplot(2,1,1)
ypl=plot(t,y);
set(ypl,’Linewidth’,1.5)
set(ypl,’Xtick’,[0 5 10 15 20])
xlabel(’Time’);
ylabel(’Output’)
title(’Plotting’)
The first line defines a vector of times t where the step response is com-
puted. The second line computes the step response for each element of
t. The third line defines a subplot using standard vector notation. The
fourth line defines the plot as the object ypl. The fifth line changes the
thickness of the line and the fifth and six lines defines the marking of the
axes. The last three lines adds labels on the axes and a title of the plot.
The result is shown in Figure 3.8.
Matlab can also be used to compute the time functions that correspond to
a Laplace transform as is illustrated in the following example.

EXAMPLE 3.6—TIME FUNCTION CORRESPONDING TO A LAPLACE TRANSFORM


It follows from Equation (3.24) that the Laplace transform of an impulse
is 1. Equation (3.29) then implies that the impulse response of a system
with transfer function G (s) is given by

Y ( s) = G ( s)

94
3.4 Laplace Transforms

The Matlab command impulse(Y) thus gives the time function corre-
sponding to the transfer function Y (s).

Matlab is primarily a program for numerical calculations. There are other


programs, Maple and Mathematica for computer algebra. Matlab can how-
ever be used for simple symbolic calculations because it has facilities for
simple manipulation of systems. For example if G and F are linear time
invariant systems models the operations ∗ and / correspond to multiplica-
tion or division of the transfer functions. The following example illustrates
how this can be used.

EXAMPLE 3.7—USING MATLAB FOR ALGEBRAIC COMPUTATIONS


The program below shows how to compute the transfer function of the
simple closed loop system shown in Figure 3.6 where the process and the
controller have the transfer functions

1
P ( s) =
s(s + 1)
1
C ( s) = 2 +
s

The step response of the closed loop system can be generated by the fol-
lowing commands.

s=tf([1 0],1) %Define the transfer function s


P=1/(s*(s+1)) %Define process transfer function
C=2+1/s %Define the controller transfer function
T=P*C/(1+P*C) %Compute transfer function from
%reference to output
step(T) %Compute and plot the step response

The transfer functions s is first defined on the first line. The transfer
functions for the process and the controller are then defined in terms of
s using a very natural notation. The transfer function from reference r to
output y given by
P ( s) C ( s)
G yr (s) =
1 + P ( s) C ( s)
is then defined and the step response of the closed loop system is then
computed and plotted using the command step(T).

This is a natural way to work with transfer functions, but may be dan-
gerous because Matlab is not smart enough to recognize cancellations of
poles and zeros.

95
Chapter 3. Dynamics

Poles and Zeros


The transfer function of a finite dimensional linear system is a rational
transfer function and can thus be written as a ratio of two polynomials

b(s)
G ( s) = .
a(s)

The roots of the polynomial a(s) are called the poles of the system. The
roots of the polynomial b(s) are called the transmission zeros or simply
the zeros of the system. The poles are the roots of the characteristic poly-
nomial which is also the denominator polynomial of the transfer function.
If the system has a pole λ the general solution of the equation has the
term eλ t . The free motion of the system has the component eλ t , which is
also called a mode of the system. Sometimes the poles themselves are also
called the modes.
The zeros are the roots of the numerator polynomial a(s). If a system
has a zero α it follows from (3.22) that G (α ) = 0. This means that the
particular solution corresponding to the input eα t is blocked. A zero at s =
α thus means that transmission of the exponential signal eα t is blocked
by the system. This is the reason why a zero is also called a transmission
zero.

Transfer Functions of Some Special Systems


So far we have only discussed linear time invariant systems with a finite
number of states. A nice feature of the transfer functions is that they can
be defined also for systems that have infinitely many states. A time delay
is one of the most common infinite dimensional systems that appears in
control. A typical example is a material transport on a belt. Material is fed
to the belt at one station and it is leaves at the end of the belt. To describe
storage of material on the belt it is necessary to know the distribution of
the material on the belt, clearly an infinitely dimensional quantity.
To obtain the transfer function we will first consider the effect of a
time shift. Let the number a be positive and let the function f a be a time
shift of the function f , i.e.

(
0 for t < 0
f a (t) =
f (t − a) for t ≥ 0

96
3.4 Laplace Transforms

The Laplace transform of f a is given by


Z ∞ Z ∞
Fa (s) = e−st f (t − a)dt = e−st f (t − a)dt
Z0 ∞ a
Z ∞
−as −s(t−a)
= e e f (t − a)dt = e−as e−st f (t)dt = e−as F (s)
a 0
(3.32)
Delaying a signal by a time units thus corresponds to multiplication of its
Laplace transform by e−as . We can now determine the transfer function
of a time delay.

EXAMPLE 3.8—TRANSFER FUNCTION OF A TIME DELAY


Consider a system which simply delays the input T time units. It follows
from (3.32) that the input output relation is

Y (s) = e−sT U (s)

The transfer function of a time delay is thus

G (s) = e−sT

It is also possible to calculate the transfer functions for systems de-


scribed by partial differential equations.

EXAMPLE 3.9—TRANSFER FUNCTION OF HEAT PROPAGATION


The temperature of a metal rod is described by the partial differential
equation
Vz V2z
=κ 2
Vt V x
where κ = λ /( ρ C ) is the thermal diffusivity. To describe how energy is
stored in the system it is necessary to specify the temperature distribu-
tion. The system is therefore an infinite dimensional system. Consider the
particular situation when the input is the temperature at the end of of
the rod and the output is the temperature at a distance a from the end
of an infinitely long rod. Introducing the Laplace transform
Z ∞
Z ( s, x ) = e−st z(t, x)dt
0

we find that the partial differential equation reduces to

d2 Z (s, x) s
− Z ( s, x ) = 0
dx2 κ

97
Chapter 3. Dynamics

This equation has the solution


√ √
s/κ s/κ
Z (s, x) = Ae− x + B ex

Since the temperature has to be finite we have B = 0 for an infinitely


long rod. Furthermore the temperature at the endpoint x = 0 is the input
u(t), hence √
s/κ
Z (s, x) = U (s) e− x
Since the output is the temperature at x = a we find that the transfer
function of the system is

Z (s, a) √ √
G ( s) = = e−a s/κ = e− sT
U ( s)

where T = a2 /κ . If we instead consider a rod of length a which is isolated


in the right end we find that the transfer function is

1
G ( s) = √
cosh sT

Some Laplace Transforms and their Properties*


For the sake of completeness we will give a few Laplace transforms and
some of their properties.
We first observe that (3.24) defines the transforms for Res > s0 , where
the real number s0 is called the convergence abscissa. . The domain can
then be extended by analytic continuation.
The transform of f 1 (t) = e−at is given by

1 −(s+a)t ∞
Z ∞
F1 (s) = e−(s+a)t dt = − e
s+a

0 0

e−(s+a)t 1 1
= − lim + =
t→∞ s+a s+a s+a
The limit goes to zeros for Re(s + a) > 0 and the Laplace transform is
thus defined for Res > −a. By analytic continuation the domain can be
extended to all values of s except for s = a where the function has a
singularity.
By setting a = 0 we obtain the Laplace transform for a step. Differen-
tiating the above equation with respect to α gives

1
Z ∞
−te−(s+a)t dt = −
0 (s + α )2

98
3.4 Laplace Transforms

The transform of the function f 2 (t) = te−at is


1
F2 (s) =
(s + a)2
Repeated differentiation with respect to α shows that the transform of
the function f 3 (t) = tn e−at / n! is
1
F3 (s) =
(s + a)n+1
Setting a = 0 in f 1 we find that the transform of the unit step function
f 4 (t) = 1 is
1
F4 (s) =
s
Similarly we find by setting a = 0 in f 3 that the transform of f 5 = tn / n!
is
1
F5 (s) = n+1
s
Setting a = ib in f 1 we find that the transform of f (t) = e−ibt = cos bt −
i sin bt is
1 s − ib s b
F ( s) = = 2 = 2 −i 2
s + ib s + b2 s + b2 s + b2
Separating real and imaginary parts we find that the transform of f 6 (t) =
sin bt and f 7 (t) = cos bt are
b s
F6 (t) = , F7 (t) =
s2 + b2 s2 + b2
Proceeding in this way it is possible to build up tables of transforms that
are useful for hand calculations.
The behavior of the time function for small arguments is governed
by the behavior of the Laplace transform for large arguments. Or more
precisely that the value of f (t) for small t is thus equal to sF (s) for large
s. This is shown as follows.
Z ∞ Z ∞
v
lim sF (s) = lim se−st f (t)dt = lim e−v f ( )dv = f (0)
s→∞ s→∞ 0 s→∞ 0 s
This result, which requires that the limit exists, is called the initial value
theorem. We also have the the similar result
Z ∞ Z ∞
v
lim sF (s) = lim se−st f (t)dt = lim e−v f ( )dv = f (∞)
s→0 s→0 0 s→0 0 s
The value of f (t) for large t is thus equal to sF (s) for small s, the result
is called the final value theorem. These properties are very useful for
qualitative assessment of a time functions and Laplace transforms.

99
Chapter 3. Dynamics

3.5 Frequency Response


The idea of frequency response is to characterize a linear time-invariant
system by its response to sinusoidal signals. The idea goes back to Fourier,
who introduced the method to investigate propagation of heat in metals.
Frequency response gives an alternative way of viewing dynamics. One
advantage is that it is possible to deal with systems of very high order,
even infinite. This is essential when discussing sensitivity to process vari-
ations. This will be discussed in detail in Chapter 5.
Frequency response also gives a different way to investigate stability.
In Section 3.3 it was shown that a linear system is stable if the charac-
teristic polynomial has all its roots in the left half plane. To investigate
stability of a system we have to derive the characteristic equation of the
closed loop system and determine if all its roots are in the left half plane.
Even if it easy to determine the roots of the equation numerically it is not
easy to determine how the roots are influenced by the properties of the
controller. It is for example not easy to see how to modify the controller if
the closed loop system is stable. The way stability has been defined it is
also a binary property, a system is either stable or unstable. In practice it
is highly desirable to have a notion of the degrees of stability. All of these
issues can be related to frequency response. The key is Nyquist’s stability
criterion which is a frequency response concept. Frequency response was
one of the key ideas that formed the foundation of control.

Response to Sinusoidal Inputs


The response of linear systems to sinusoids was discussed in Section 3.3,
see Equation (3.23). Consider a system with the transfer function G (s)
which has poles λ k . The output corresponding to the input u(t) = sin ω t
is
Ck (t) eλ k t + h G (iω )h sin (ω t + arg G (iω ))
X
y(t) =
k

If the system is stable, i.e. Reλ k < 0 for all k, the first term will decay
exponentially and the solution will converge to the steady state response
given by
y(t) = h G (iω )h sin (ω t + arg G (iω )) (3.33)
This is illustrated in Figure 3.9 which shows the response of a linear
time-invariant system to a sinusoidal input. The figure shows the output
of the system when it is initially at rest and the steady state output given
by (3.33). The figure shows that after a transient the output is indeed a
sinusoid with the same frequency as the input.
The steady state response to a sinusoid is completely characterized
by the function G (iω ) which is called the frequency response of the sys-

100
3.5 Frequency Response

0.2

Output
0.1

−0.1
0 5 10 15

0.5
Input

−0.5

−1
0 5 10 15
Time

Figure 3.9 Response of a linear time-invariant system to a sinusoidal input (full


lines). The system has the transfer function G (s) = 1/(s + 1)2 . The dashed line
shows the steady state output calculated from (3.33).

tem. The argument of the function is frequency ω and the function takes
complex values. The magnitude h G (iω )h is called the gain and the angle
arg G (iω ) is called the phase. The phase is often negative and the quan-
tity -arg G (iω ), called the phase lag, is therefore used frequently. The
phase-lag represent how much the output is delayed in relation to the
input.
The gain h G (iω )h is a generalization of the static gain G (0) which tells
steady state output when the input is a constant. It is thus possible to
talk about the gain of the system for signals of different frequencies. The
propagation of any signal can then be obtained by representing it as a
sum of sinusoids, investigating each sinusoid individually and adding the
outputs using superposition.
The frequency response can be determined experimentally by injecting
a sinusoid and measuring the ratio of the amplitudes and the phase shift
between input and output. Very accurate measurements are possible by
using correlation techniques. This is very important in practice because it
may be very time consuming or even impossible to obtain a mathematical
model from first principles.

Nyquist’s Stability Criterion


The frequency response can be represented graphically by plotting the
magnitude and phase of G (iω ) for all frequencies, see Figure 3.10. Such
a graph is called the Nyquist plot. The magnitude a = h G (iω )h represents
the gain and the angle φ = arg G (iω ) represents the phase shift. The
phase shift is typically negative which implies that the output will lag

101
Chapter 3. Dynamics

Im G (iω )

Re G (iω )

−1
g
ϕ

1.4e−s
Figure 3.10 Nyquist plot of the transfer function G (s) = . The gain and
(s + 1)2
phase for the frequency ω are g = h G (iω )h and ϕ = arg G (iω ). The point −1 is called
the critical point.

the input.
One reason why the Nyquist plot is important is that it gives a new
way of looking at stability of a feedback system. Consider the feedback
system in Figure 3.6 consisting of a process with transfer function P(s)
and a controller with transfer function C (s). Introduce the loop transfer
function
L(s) = P(s) C (s), (3.34)
which represents signal transmission around the loop. The system can
then be represented by the block diagram in Figure 3.11. We will first
determine conditions for having a periodic oscillation in the loop. Assume
that the feedback loop is cut as indicated in the figure and that a sinusoid
of frequency ω is injected at point A. In steady state the signal at point B
will also be a sinusoid with the same frequency. It seems reasonable that
an oscillation can be maintained if the signal at B has the same amplitude
and phase as the injected signal because we could then connect A to B.
Tracing signals around the loop we find that the condition that the signal

102
3.5 Frequency Response

B A
L ( s)

−1

Figure 3.11 Block diagram of a simple feedback loop.

at B is identical to the signal at A is that


L(iω 0 ) = −1 (3.35)
This condition has a nice interpretation in the Nyquist plot. It means that
the Nyquist plot of L(iω ) intersects the negative real axis at the point −1,
which is called the critical point. The frequency where the intersection
occurs is the frequency of the oscillation.
Intuitively it seems reasonable that the system would be stable if the
critical point −1 is on the left hand side of the Nyquist curve as indicated
in Figure 3.10. This means that the signal at point B will have smaller
amplitude than the injected signal. This is essentially true, but there are
several subtleties, that requires a proper mathematics to clear up. This
will be done later. The precise statement is given by Nyquist’s stability
criterion.
For loop tranfer functions which do not have poles in the right half
plane the precise condition is that the complete Nyquist plot does not
encircle the critical point −1. The complete Nyquist plot is obtained by
adding the plot for negative frequencies shown in Figure 3.12. This is also
the mirror image in the real axis of the original Nyquist plot. The following
procedure can be used to determine that there are no encirclements. Fix
a pin at the critical point orthogonal to the plane. Attach a flecible cord
with one end in the pin and another to the Nyquist plot. Let the cord
traverse the complete Nyquist curve. There are no encirclements if the
cord does not wind up on the pin when the curve is encircled.

THEOREM 3.1—NYQUIST’S STABILITY CRITERION


Consider a closed loop system with loop transfer function L(s). Assume
that L(s) does not have poles in the right half plane. The closed loop
system is stable if the critical point is to the left of the Nyquist curve of
L(s) when the curve is transversed for increasing frequencies.
A more general version of Nyquist’s theorem will be proven later, be-
fore doing this we will introduce some practical stability concepts.

103
Chapter 3. Dynamics

Im G (iω )

Re G (iω )

−1

1.4e−s
Figure 3.12 Nyquist plot of the transfer function G (s) = . The gain and
(s + 1)2
phase for the frequency ω are g = h G (iω )h and ϕ = arg G (iω ). The point −1 is called
the critical point.

Stability Margins
In practice it is not enough that the system is stable. There must also be
some margins of stability. There are many ways to express this. Many of
the criteria are inspired by Nyquist’s stability criterion. They are based
on the fact that it is easy to see the effects of changes of the gain and the
phase of the controller in the Nyquist diagram of the loop transfer function
L(s). The following classical criteria are based on the assumption that the
Nyquist curve has the general shape shown in Figure 3.10. In particular
that it crosses the unit circle one time. There may be several crossings
of the negative real axis. An increase of controller gain simply expands
the Nyquist plot radially. An increase of the phase of the controller twists
the Nyquist plot clockwise, see Figure 3.13. The gain margin gm tells how
much the controller gain can be increased before reaching the stability
limit. Let ω 180 be the smallest frequency where the phase lag of the loop
transfer function L(s) is 180○ . The gain margin is defined as

1
gm = (3.36)
h L(iω 180 )h

104
3.5 Frequency Response

Im L(iω )

−1 −1/gm Re L(iω )

ϕm

Figure 3.13 Nyquist plot of the loop transfer function L with gain margin gm ,
phase margin ϕ m and stability margin d.

The phase margin ϕ m is the amount of phase lag required to reach the
stability limit. Let ω gc denote the lowest frequency where the loop transfer
function L(s) has unit magnitude. The phase margin is then given by

ϕ m = π + arg L(iω gc ) (3.37)

The margins have simple geometric interpretations in the Nyquist dia-


gram of the loop transfer function as is shown in Figure 3.13.
A drawback with gain and phase margins is that it is necessary to give
both numbers in order to guarantee that the Nyquist curve not is close
to the critical point. One way to express stability margins by a single
number is to use replace gain and phase margins by the shortest distance
from the Nyquist curve to the critical point −1. We call this number the
stability margin. If d is given we have

ϕ m ≥ arcsin d
1 (3.38)
gm ≥ ,
1−d
see Figure 3.13. The stability margin also has other nice interpretations
as will be discussed in Chapter 5.

105
Chapter 3. Dynamics

Reasonable values of the margins are phase margin ϕ m = 30○ − 60○ ,


gain margin gm = 2 − 5, and shortest distance to the critical point d =
0.5 − 0.8.
The gain and phase margins were originally used for the case when the
Nyquist plot intersects the unit circle and the negative real axis once. For
more complicated systems it happens that the Nyquist curve has a large
loops. The traditional stability margins are then misleading because mi-
nor changes in the system may swing the loop towards the critical point.
The delay margin is a robustness measure that attempts to capture this.
The delay margin is defined as the smallest time delay required to make
the system unstable. For loop transfer functions that decay quickly with
frequency the delay margin is closely related to the phase margin but
for systems where the amplitude ratio of the loop transfer function has
several peaks at high frequencies the delay margin is a much more rele-
vant measure. This happens for example for systems that have oscillatory
modes with low damping

Conditionally Stable Systems*


It seems intuitively reasonable that a system with the loop transfer func-
tion shown in Figure 3.13 is stable, because the amplitude of the loop
transfer function has magnitude less than 1 at the frequency where the
phase lag is −180○ . The following example illustrates a case where it is
less obvious that the system is stable.

EXAMPLE 3.10—CONDITIONAL STABILITY


Consider a feedback system with the loop transfer function

3(s + 1)2
L( s ) = (3.39)
s(s + 6)2

The Nyquist plot of the loop transfer function is shown in Figure 3.14.
Notice that the Nyquist curve intersects the negative real axis twice. The
first intersection occurs at L = −12 for ω = 2 and the second at L = −4.5
for ω = 3. The intuitive argument based on signal tracing around the loop
in Figure 3.11 is strongly misleading in this case. For example ab injection
of a sinusoid with frequency 2 rad/s and amplitude 1 at A will in steady
state give an oscillation at B that is in phase with the input and has
amplitude 12. Intuitively it is seems unlikely that closing of the loop will
result a stable system. It follows from Nyquist’s stability criterion that the
system is stable because the critical point is to the left of the Nyquist curve
when it is traversed for increasing frequencies. It was actually systems
of this type which motivated much of the research that led Nyquist to
develop his stability criterion.

106
3.5 Frequency Response

ImL(iω )
ImL(iω )

ReL(iω )
ReL(iω )

3(s+1)2
Figure 3.14 Nyquist curve for the loop transfer function L(s) = s(s+6)2
. The plot
on the right is an enlargement of the area around the origin of the plot on the left.

This example actually represents a real engineering problem as is illumi-


nated by the following quote from Nyquist.
Mr. Black proposed a negative feedback repeater and proved by tests
that it possessed the advantages which he had predicted for it. In
particular, its gain was constant to a high degree, and it was lin-
ear enough so that spurious signals caused by the interaction of the
various channels could be kept within permissible limits. For best re-
sults, the feedback factor, the quantity usually known as µβ (the loop
transfer function), had to be numerically much larger than unity. The
possibility of stability with a feedback factor greater than unity was
puzzling. Granted that the factor is negative it was not obvious how
that would help. If the factor was -10, the effect of one round trip
around the feedback loop is to change the magnitude of the current
from, say 1 to -10. After a second trip around the loop the current
becomes 100, and so forth. The totality looks much like a divergent
series and it was not clear how such a succession of ever-increasing
components could add to something finite and so stable as experience
had shown. The missing part in this argument is that the numbers
that describe the successive components 1, -10, 100, and so on, rep-
resent the steady state, whereas at any finite time many of the com-
ponents have not yet reached steady state and some of them, which
are destined to become very large, have barely reached perceptible
magnitude. My calculations were principally concerned with replac-
ing the indefinite diverging series referred to by a series which gives
the actual value attained at a specific time t. The series thus obtained
is convergent instead of divergent and, moreover, converges to values
in agreement with the experimental findings.
This explains how I came to undertake the work. It should perhaps

107
Chapter 3. Dynamics

be explained also how it come to be so detailed. In the course of the


calculations, the facts with which the term conditional stability have
come to be associated, became apparent. One aspect of this was that
it is possible to have a feedback loop which is stable and can be made
unstable by increasing the loop loss. This seemed a very surprising
result and appeared to require that all the steps be examined and set
forth in full detail.

This quote clearly illustrate the difficulty in understanding feedback by


simple qualitative reasoning as was illustrated in Example 3.10.

Nyquist’s Stability Theorem*


We will now prove Nyquist’s stability theorem. This will require more re-
sults from the theory of complex variables than in many other parts of
the book. Since precision is needed we will also use a more mathemati-
cal style of presentation. The key result is the following theorem about
functions of complex variables.

THEOREM 3.2—PRINCIPLE OF VARIATION OF THE ARGUMENT


Let Γ be a simple closed cuve in the complex plane and let D the region
enclosed by the curve. Assume the function f is analytic in D and on Γ
except at a finite number of poles in D, then

1 1 f ′ ( z)
Z
Nw = ∆ Γ arg f ( z) = dz = N − P
2π 2π i Γ f ( z)

where N is the number of zeros in D and P the number of poles in D. Poles


and zeros of multiplicity m are counted m times. The number Nw is called
the winding number and ∆ Γ arg f ( z) is the variation of the argument of
the function f as the curve Γ is traversed in the positive direction.

PROOF 3.1
Assume that z = a is a zero of multiplicity m. In the neighborhood of
z = a we have
f ( z) = ( z − a)m g( z)

where the function g is analytic and different from zero. We have

f ′ ( z) m g′ ( z)
= +
f ( z) z−a g( z)

The second term is analytic at z = a. The function f ′ / f thus has a single


pole at z = a with the residue m. The sum of the residues at the zeros of

108
3.5 Frequency Response

the function is N. Similarly we find that the sum of the residues of the
poles of is − P. Furthermore we have

d f ′ ( z)
log f ( z) =
dz f ( z)

which implies that


f ′ ( z)
Z
dz = ∆ Γ log f ( z)
Γ f ( z)
where ∆ Γ denotes the variation along the contour Γ . We have

log f ( z) = log h f ( z)h + i arg f ( z)

The function log h f ( z)h has real values and its variation when z loops
around a closed contour is zero, hence

∆ Γ log f ( z) = i∆ Γ arg f ( z)

and the theorem is proven.

REMARK 3.1
The theorem is useful to determine the number of poles and zeros of
a function of complex variables in a given region. To use the result we
must determine the winding number. One way to do this is to investigate
how the curve Γ is transformed under the map f . The variation of the
argument is the number of times the map of Γ winds around the origin
in the f -plane. This explains why the variation of the argument is also
called the winding number.
Nyquist’s stability criterion is a direct consequence of Theorem 3.2.
Since we are interested in the right half plane zeros of the function

f ( s ) = 1 + L( s ) (3.40)

we introduce a contour that encloses the right half plane, see Figure 3.15.
The contour consists of a small half circle with radius r to the right of the
origin, the imaginary axis and a large half circle with radius R to the right
with the imaginary axis as a diameter. To illustrate the contour we have
shown it drawn with a small radius r and a large radius R. The whole
right half plane is covered by making r infinitely small and R infinitely
large. The contour obtained is called the Nyquist contour.
The number of right half plane zeros of the function f given by (3.40)
can be obtained from the winding number of the function when s traverses
the contour Γ . This can be determined from the Nyquist curve because the

109
Chapter 3. Dynamics

Figure 3.15 Contour Γ used to prove Nyquist’s stability theorem.

function f = 1 + L can be represented as a line from the Nyquist curve


to the critical point −1. The Nyquist curve is the map of the imaginary
axis in the s-plane. To determine the winding number we have to get
the map of the full Nyquist contour. The map of the negative real axis
is simply the mirror image of the Nyquist curve in the real axis and it
only remains to find the maps of the semi cirles. Since the loop transfer
function typically goes to zero for large s the large circle is mapped on
the origin. For systems where the loop transfer function does not have
any poles in the right half plane it follows from Theorem 3.2 that the
number of right half plane zeros is equal to the winding number. The
requirement in Theorem 3.1, that the critical point is always to the right
when the Nyquist curve is traversed ensures that the winding number
is zero. Notice however that the principle of variation of the argument
also applies to the situation where the the loop transfer function L(s) has
poles in the right half plane. The argument above immediately gives the
following more general version of Nyquist’s stability criterion.

THEOREM 3.3—NYQUIST’S STABILITY THEOREM


Consider a simple closed loop system with the loop transfer function L(s)
with P poles in the right half plane. Let Nw be the winding number of
the function f (s) = 1 + L(s) when s traverses the Nyquist contour in the
clockwise direction. The function f (s) then has N p + P zeros in the right
half plane.
We illustrate Nyquist’s theorem and the principle of variation of the ar-

110
3.5 Frequency Response

ImL(iω )

ReL(iω )

1
Figure 3.16 Map of the contour Γ under the map L(s) = s(s+1)2
. The map of the
positive imaginary axis is shown in full lines, the map of the negative imaginary
axis and the small semi circle at the origin in dashed lines.

gument with a few examples.

EXAMPLE 3.11—A SIMPLE CASE


Consider a closed loop system with the loop transfer function

k
L( s ) =
s(s + 1)2

Figure 3.16 shows the image of the contour Γ under the map L. The
Nyquist plot intersects the imaginary axis for ω = 1, the intersection is
at − k/2. It follows from Figure 3.16 that the winding number is zero if
k < 2 and 2 if k > 2. We can thus conclude that the closed loop system is
stable if k < 2 and that the closed loop system has two roots in the right
half plane if k > 2.

EXAMPLE 3.12—LOOP TRANSFER FUNCTION WITH RHP POLE


Consider a feedback system with the loop transfer function

1
L( s ) =
s(s − 1)(s + 5)

This transfer function has a pole at s = 1 in the right half plane. The
Nyquist plot of the loop transfer function is shown in Figure 3.17. The

111
Chapter 3. Dynamics

ImL(iω )

ReL(iω )

Figure 3.17 Map of the contour Γ under the map L(s) = s(s−11)(s+5) . The curve on
the right shows the region around the origin in larger scale. The map of the positive
imaginary axis is shown in full lines, the map of the negative imaginary axis and
the small semi circle at the origin in dashed lines.

small half circle in the Nyquist contour

s = reiθ , −π /2 ≤ θ ≤ π /2

is approximately mapped on the half circle

1 −iθ
L=− e
5r
i.e. a large semicircle on the left as is shown with dashed lines in Fig-
ure 3.17. We have P = 1 because the loop transfer function L(s) has one
pole in the right half plane. Traversing the contour Γ in counter clockwise
direction we find that the winding number of the function f (s) = 1 + L(s)
is N p = 1. Hence
N = Nw + P = 2
and it follows from Theorem 3.3 that the function f (s) = 1 + L(s) has two
zeros in the right half plane.

EXAMPLE 3.13—THE INVERTED PENDULUM


Consider a closed loop system for stabilization of an inverted pendulum
with a PD controller. The loop transfer function is

s+2
L( s ) = (3.41)
s2 − 1
The transfer function L(s) has one pole at s = 1 in the right half plane.
The Nyquist plot of the loop transfer function is shown in Figure 3.18. The

112
3.5 Frequency Response

Figure 3.18 Map of the contour Γ under the map L(s) = ss2+−21 given by (3.41). The
map of the positive imaginary axis is shown in full lines, the map of the negative
imaginary axis and the small semi circle at the origin in dashed lines.

loop transfer function has a right half plane pole at s = 1, hence P = 1.


Traversing the contour Γ in clockwise direction we find that the winding
number is Nw = −1, hence

N = Nw + P = 0

and it follows from Theorem 3.3 that the function f (s) = 1 + L(s) has two
zeros in the right half plane and the closed loop system is stable.

Bode Plots
The Nyquist plot is one way to represent the frequency response G (iω ).
Another useful representation was proposed by Bode who represented it
by two curves, the gain curve and the phase curve. The gain curve gives
gain h G (iω )h as a function of ω and the phase curve phase arg G (iω ) as
a function of ω . The curves are plotted as shown below with logarithmic
scales for frequency and magnitude and linear scale for phase, see Fig-
ure 3.19 A useful feature of the Bode plot is that both the gain curve and
the phase curve can be approximated by straight lines, see Figure 3.19
where the approximation is shown in dashed lines. This fact was partic-
ularly useful when computing tools were not easily accessible. The fact
that logarithmic scales were used also simplified the plotting.
It is easy to sketch Bode plots because with the right scales they have
linear asymptotes. This is useful in order to get a quick estimate of the
behavior of a system. It is also a good way to check numerical calculations.
Consider first a transfer function which is a polynomial G (s) = b(s)/ a(s).
We have
log G (s) = log b(s) − log a(s)

113
Chapter 3. Dynamics

3
10

h G (iω )h
2
10

1
10
−2 −1 0 1 2
10 10 10 10 10
100
arg G (iω )

50

−50

−100
−2 −1 0 1 2
10 10 10 10 10
ω

Figure 3.19 Bode plot of the transfer function of the ideal PID controller C(s) =
20 + 10/s + 10s. The top plot is the gain curve and bottom plot is the phase curve.
The dashed lines show straight line approximations of the curves.

Since a polynomial is a product of terms of the type :

s, s + a, s2 + 2ζ as + a2

it suffices to be able to sketch Bode diagrams for these terms. The Bode
plot of a complex system is then obtained by composition.

EXAMPLE 3.14—BODE PLOT OF A DIFFERENTIATOR


Consider the transfer function

G ( s) = s

We have G (iω ) = iω which implies

log h G (iω )h = log ω


arg G (iω ) = π /2

The gain curve is thus a straight line with slope 1 and the phase curve is
a constant at 90○ . The Bode plot is shown in Figure 3.20

EXAMPLE 3.15—BODE PLOT OF AN INTEGRATOR


Consider the transfer function
1
G ( s) =
s

114
3.5 Frequency Response

1
10

h G (iω )h
0
10

−1
10
−1 0 1
10 10 10
91
arg G (iω )

90.5

90

89.5

89
−1 0 1
10 10 10
ω

Figure 3.20 Bode plot of the transfer function G (s) = s, i.e. a differentiator.

We have G (iω ) = 1/ iω which implies

log h G (iω )h = − log ω


arg G (iω ) = −π /2

The gain curve is thus a straight line with slope -1 and the phase curve
is a constant at −90○ . The Bode plot is shown in Figure 3.21
Compare the Bode plots for the differentiator in Figure 3.20 and the
integrator in Figure 3.21. The sign of the phase is reversed and the gain
curve is mirror imaged in the horizontal axis. This is a consequence of
the property of the logarithm.

1
log = − log G = − log h G h − i arg G
G

EXAMPLE 3.16—BODE PLOT OF A FIRST ORDER FACTOR


Consider the transfer function

G ( s) = s + a

We have
G (iω ) = a + iω
and it follows that

h G (iω )h = ω 2 + a2 , arg G (iω ) = arctan ω / a


p

115
Chapter 3. Dynamics

1
10
h G (iω )h

0
10

−1
10
−1 0 1
10 10 10
−89

−89.5
arg G (iω )

−90

−90.5

−91
−1 0 1
10 10 10
ω

Figure 3.21 Bode plot of the transfer function G (s) = 1/s, i.e. an integrator.

Hence

1
log h G (iω )h = log (ω 2 + a2 ), arg G (iω ) = arctan ω / a
2

The Bode Plot is shown in Figure 3.22. Both the gain curve and the phase
curve can be approximated by straight lines if proper scales are chosen
and we obtain the following approximations.

log a if ω << a,


 √
log h G (iω )h  log a + log 2 if ω = a, ,

log ω if ω >> a

0 if ω << a,




π 1 ω


arg G (iω )  4 + 2 log a if ω  a, ,
π



if ω >> a


2

Notice that a first order system behaves like an integrator for high fre-
quencies. Compare with the Bode plot in Figure 3.21.

116
3.5 Frequency Response

1
10

h G (iω )h/a

0
10
−1 0 1
10 10 10
100
arg G (iω )

50

0
−1 0 1
10 10 10
ω /a

Figure 3.22 Bode plot of the transfer function G (s) = s + a. The dashed lines
show the piece-wise linear approximations of the curves.

EXAMPLE 3.17—BODE PLOT OF A SECOND ORDER SYSTEM


Consider the transfer function

G (s) = s2 + 2aζ s + a2

with 0 ≤ ζ ≤ 0. We have

G (iω ) = a2 − ω 2 + 2iζ aω

Hence

1
log h G (iω )h = log (ω 4 + 2a2ω 2 (2ζ 2 − 1) + a4 )
2
arg G (iω ) = arctan 2ζ aω /(a2 − ω 2 )

Notice that the smallest value of the magnitude minω h G (iω )h = 1/2ζ is
obtained for ω = a The gain is thus constant for small ω . It has an asymp-
tote with zero slope for low frequencies. For large values of ω the gain is
proportional to ω 2 , which means that the gain curve has an asymptote
with slope 2. The phase is zero for low frequencies and approaches 180○
for large frequencies. The curves can be approximated with the following

117
Chapter 3. Dynamics

2
10

h G (iω )h/a 1
10

0
10

−1
10
−1 0 1
10 10 10
200
arg G (iω )

150

100

50

0
−1 0 1
10 10 10
ω /a

Figure 3.23 Bode plot of the transfer function G (s) = s2 + 2ζ as + a2 with ζ = 0.05
(dotted), 0.1, 0.2, 0.5 and 1.0 (dash-dotted). The dashed lines show the piece-wise
linear approximations of the curves.

piece-wise linear expressions

2 log a if ω << a,




log h G (iω )h  2 log a + log 2ζ if ω = a, ,

2 log ω if ω >> a

0 if ω << a,


π ω −a


arg G (iω )  + if ω = a, ,

 2 aζ

π if ω >> a

The Bode Plot is shown in Figure 3.23, the piece-wise linear approxima-
tions are shown in dashed lines.

Sketching a Bode Plot*


It is easy to sketch the asymptotes of the gain curves of a Bode plot. This
is often done in order to get a quick overview of the frequency response.
The following procedure can be used
• Factor the numerator and denominator of the transfer functions.
• The poles and zeros are called break points because they correspond
to the points where the asymptotes change direction.

118
3.5 Frequency Response

• Determine break points and sort them in increasing frequency


• Start with low frequencies
• Draw the low frequency asymptote
• Go over all break points and note the slope changes
• A crude sketch of the phase curve is obtained by using the rela-
tion that, for systems with no RHP poles or zeros, one unit slope
corresponds to a phase of 90○
We illustrate the procedure with the transfer function
200(s + 1) 1+s
G ( s) = =
s(s + 10)(s + 200) 10s(1 + 0.1s)(1 + 0.005s)
The break points are 1, 10, 200. For low frequencies the transfer function
can be approximated by
1
G ( s) 
10s
Following the procedure we find
• For low frequencies the system behaves like an integrator with gain
0.1. The low frequency asymptote thus has slope -1 and it crosses
the axis of unit gain at ω = 0.1.
• The first break point occurs ω = 1, since this is a zero the slope
increases by one unit to 0.
• The next break point is at ω = 10, since this is a pole the slope
decreases by one unit to −1.
• The last break point is a pole at ω = 200, the slope then decreases
by one unit to −2.
Figure 3.24 shows the asymptotes and true gain and phase curves.

Interpretations of Bode Plots


The Bode plot gives a quick overview of the properties of a system. Many
properties can be read off directly from the plot. The plots give primarily
the gain and the phase for different frequencies. Since it is possible to
decompose any signal into a sum of sinusoids it is possible to visualize the
behavior of a system for different frequency ranges. Furthermore when the
gain curves are close to the asymptotes the system can be approximated
by integrators or differentiators. Consider for example the Bode plot in
Figure 3.19. For low frequencies the gain curve of the Bode plot has the
slope -1 which means that the system acts like an integrator. For high
frequencies the gain curve has slope +1 which means that the system
acts like a differentiator for high frequencies.

119
Chapter 3. Dynamics

0
Gain
10

−1
10

−2
10

−3
10
−1 0 1 2 3
10 10 10 10 10
ω
Phase
0

−50

−100

−150

−1 0 1 2 3
10 10 10 10 10
ω

Figure 3.24 Illustrates how the asymptotes of the gain curve of the Bode plot can
be sketched. The dashed curves show the asymptotes and the full lines the complete
plot.

Gain and Phase Margins


The gain and phase margins can easily be determined from the Bode plot
of the loop transfer function. The gain margin tells how much the gain
has to be increased for the system to reach instability. To determine the
gain margin we first find the frequency ω pc where the phase is −180○ .
This frequency is called the phase crossover frequency. The gain margin
is the inverse of the gain at that frequency. The phase margin is the addi-
tional phase required to bring the system to instability. To determine the
phase margin we first determine the frequency ω gc where the gain of the
loop transfer function is one. This frequency is called the gain crossover
frequency. The phase margin is the phase of the loop transfer function
at that frequency plus 180○ . Figure 3.25 illustrates how the margins are
found in the Bode plot of the loop transfer function.

Bode’s Relations
Analyzing the Bode plots in the examples we find that there appears

120
3.5 Frequency Response

gain
1
10

0
10

−1
10
−1 0
10 10

phase

−100

−120

−140

−160

−180

−200
−1 0
10 10

Figure 3.25 Finding gain and phase margins from the Bode plot of the loop trans-
fer function.

to be a relation between the gain curve and the phase curve. Consider
e.g. the curves for the differentiator in Figure 3.20 and the integrator
in Figure 3.21. For the differentiator the slope is +1 and the phase is
constant π /2 radians. For the integrator the slope is -1 and the phase is
−π /2. For the system G (s) = s + a the amplitude curve has the slope 0 for
small frequencies and the slope 1 for high frequencies and the phase is
0 for low frequencies and π /2 for high frequencies. Bode investigated the
relations between the curves and found that there was a unique relation
between amplitude and phase for a special class of systems. In particular
he found the following relation between amplitude and phase for system
with no poles and zeros in the right half plane.

1 ∞ d log h G (iω )h ω + ω
Z
0
arg G (iω 0 ) = log d log ω

π 0 d log ω ω − ω0
(3.42)
π ∞  ω  d log h G (iω )h π d log h G (iω )h
Z
= w d log ω 
2 0 ω0 d log ω 2 d log ω

121
Chapter 3. Dynamics

4
w

0
−3 −2 −1 0 1 2 3
10 10 10 10 10 10 10
ω /ω 0

Figure 3.26 The weighting kernel in Bodes formula for computing the phase from
the gain.

where w is the weighting kernel


ω + 1

ω  2 ω + ω 2
0 ω0
w = 2 log = 2 log ω

ω0 π ω − ω0 π ω0 − 1

ω =ω 0

shown in Figure 3.26. Notice that the weight falls off very rapidly, and
that it is practically zero when frequency has changed by a factor of ten.
The formula for the phase implies that the phase is a weighted average
of the logarithmic derivative of the gain. It follows from (3.42) that a
slope of +1 corresponds to a phase of π /2, which holds exactly for the
differentiator, see Figure 3.20.

Minimum Phase and Non-minimum Phase


Bode’s relations hold for systems that do not have poles and zeros in the
left half plane. Such systems are called minimum phase systems because
systems with poles and zeros in the right half plane have larger phase
lag. The distinction is important in practice because minimum phase sys-
tems are easier to control than systems with larger phase lag. A transfer
function G (s) can be factored as

G (s) = G mp (s) G nmp (s)

where G nmp has unit gain and has negative phase lag. We will now give
a few examples of non-minimum phase.

EXAMPLE 3.18—A TIME DELAY


The transfer function of a time delay of T units is

G (s) = e−sT

122
3.5 Frequency Response

1
Gain
10

0
10

−1
10
−1 0 1
10 10 10
ω
Phase
0

−100

−200

−300

−400
−1 0 1
10 10 10
ω

Figure 3.27 Bode plot of a time delay which has the transfer function G (s) = e−s .

This transfer function has an essential singularity at infinity. The gain


and the phase are given by

h G (iω )h = 1, arg G (iω ) = −ω T

Notice that the gain is one but the phase lag is negative. The minimum
phase system which has the same gain is G (s) = 1. The time delay thus
has an additional phase lag of ω T, which increases with increasing fre-
quency. The Bode plot is shown in Figure 3.27.
It seems intuitively reasonable that it is not possible to obtain a fast
response of a system with time delay. We will later show that this is
indeed the case.
Next we will consider a system with a zero in the right half plane

EXAMPLE 3.19—SYSTEM WITH A RHP ZERO


Consider a system with the transfer function
a−s
G ( s) =
a+s

123
Chapter 3. Dynamics

1
10

Gain h G (iω )h
0
10

−1
10
−1 0 1
10 10 10
Phase arg G (iω )

−50

−100

−150

−1 0 1
10 10 10
ω

a−s
Figure 3.28 Bode plot of the transfer function G (s) =
The phase of the
a+s
corresponding minimum phase system G (s) = 1 is shown in dashed lines.

This transfer function has the property

ω
h G (iω )h = 1, arg G (iω ) = −2 arctan
a

Notice that the gain is one. The minimum phase system which has unit
gain has the transfer function G (s) = 1. In Figure 3.28 we show the Bode
plot of the transfer function. The Bode plot resembles the Bode plot for a
time delay which is not surprising because the exponential function e−sT
can be approximated by

1 − sT /2
e−sT 
1 + sT /2

The largest phase lag of a system with a zero in the RHP is however
π.
We will later show that the presence of a zero in the right half plane
severely limits the performance that can be achieved. We can get an in-
tuitive feel for this by considering the step response of a system with a
right half plane zero. Consider a system with the transfer function G (s)
that has a zero at s = α in the right half plane. Let h be the step response
of the system. The Laplace transform of the step response is given by
t
G ( s)
Z
H ( s) = = e−st h(t)dt
s 0

124
3.5 Frequency Response

0.5

−0.5

0 0.5 1 1.5 2 2.5 3

Figure 3.29 Step response of a system with a zero in the right half plane. The
6(−s + 1)
system has the transfer function G (s) = 2 .
s + 5s + 6

Since G (α ) is zero we have


Z t
0= e−α t h(t)dt
0

Since e−α t is positive it follows that the step response h(t) must be neg-
ative for some t. This is illustrated in Figure 3.29 which shows the step
response of a system having a zero in the right half plane. Notice that the
output goes in the wrong direction initially. This is sometimes referred to
as inverse response. It seems intuitively clear that such systems are diffi-
cult to control fast. This is indeed the case as will be shown in Chapter 5.
We have thus found that systems with time delays and zeros in the right
half plane have similar properties. Next we will consider a system with a
right half plane pole.

EXAMPLE 3.20—SYSTEM WITH A RHP POLE


Consider a system with the transfer function

s+a
G ( s) =
s−a

This transfer function has the property

a
h G (iω )h = 1, arg G (iω ) = −2 arctan
ω
Notice that the gain is one. The minimum phase system which has unit
gain has the transfer function G (s) = 1. In Figure 3.30 we show the Bode
plot of the transfer function.

125
Chapter 3. Dynamics

1
Gain
10

0
10

−1
10
−1 0 1
10 10 10
ω
Phase
0

−50

−100

−150

−1 0 1
10 10 10
ω

s+a
Figure 3.30 Bode plot of a the transfer function G (s) = which has a pole
s−a
in the right half plane.

Comparing the Bode plots for systems with a right half plane pole
and a right half plane zero we find that the additional phase lag appears
at high frequencies for a system with a right half plane zero and at low
frequencies for a system with a right half plane pole. This means that
there are significant differences between the systems. A zero in the right
half plane creates difficulties at high frequencies and a right half plane
pole creates difficulties at low frequencies. This will be discussed more in
Chapter 5.
It is a severe limitation to have poles and zeros in the right half plane.
Dynamics of this type should be avoided by redesign of the system. The
zeros of a system can be changed by moving sensors or by introducing ad-
ditional sensors. Unfortunately systems which are non-minimum phase
are not uncommon in practice. We end this section by giving a few exam-
ples of such systems.

EXAMPLE 3.21—HYDRO ELECTRIC POWER GENERATION


The transfer function from tube opening to electric power in a hydroelec-

126
3.5 Frequency Response

tric power station has the form

P ( s) P0 1 − 2sT
=
a(s) A0 1 + sT

where T is the time it takes sound to pass along the tube.

EXAMPLE 3.22—LEVEL CONTROL IN STEAM GENERATORS


Consider the problem of controlling the water level in a steam generator.
The major disturbance is the variation of steam taken from the unit. When
more steam is fed to the turbine the pressure drops. There is typically a
mixture of steam and water under the water level. When pressure drops
the steam bubbles expand and the level increases momentarily. After some
time the level will decrease because of the mass removed from the system.

EXAMPLE 3.23—FLIGHT CONTROL


The transfer function from elevon to height in an airplane is non-minimum
phase. When the elevon is raised there will be a force that pushes the rear
of the airplane down. This causes a rotation which gives an increase of
the angle of attack and an increase of the lift. Initially the aircraft will
however loose height. The Wright brothers understood this and used con-
trol surfaces in the front of the aircraft to avoid the effect.

EXAMPLE 3.24—BACKING A CAR


Consider backing a car close to a curb. The transfer function from steer-
ing angle to distance from the curve is non-minimum phase. This is a
mechanism that is similar to the aircraft.

EXAMPLE 3.25—REVENUE FROM DEVELOPMENT


The relation between revenue development effort in a new product devel-
opment is a non-minimum phase system. This means that such a system
is very difficult to control tightly.

Proof of Bode’s Relations*


Bode’s relations is in principle a consequence of the facts that real and
imaginary parts of an analytic function. The key idea is to apply Cauchy’s
theorem for analytic functions to the logarithm of a transfer function,i.e.

F (iω ) = log G (iω ) = A(ω ) + iΦ(ω ) (3.43)

If G (s) is a transfer function follows that A(ω ) is an even and B (ω ) an odd


function. Cauchy’s theorem can be stated as follows. Consider a function

127
Chapter 3. Dynamics

Figure 3.31 Contour used to prove Bode’s relations.

f ( z) that is analytic inside and on a simple contour Γ , then


Z
f ( z) dz = 0 (3.44)
Γ

Consider an analytic function F (s) with no poles and zeros in the right
half plane and on the imaginary axis. Assume that F (s)/ s goes to zero as
hsh goes to infinity. Apply Cauchy’s integral formula to the function.
F ( s) 1  F ( s) F ( s) 
= − (3.45)
s2 + ω 02 2iω 0 s − iω 0 s + iω 0
where Γ is the contour shown in Figure 3.31. The reason for introducing
the factor in the denominator is that we want to ensure that the function
is sufficiently small for large s. The integral around the large semicircle
goes to zero as hsh → ∞ because it was assumed that F (s)/ s goes to zero
as hsh → ∞. The integral around the small semicircles becomes
F ( s) iπ F (iω 0 ) π F (iω 0 ) π (− A(ω ) − iΦ(ω ))
Z
Iγ + = ds = − =− =
γ+ s 2 +ω2
0 2iω 0 2ω 0 2ω 0
F ( s) iπ F (−iω 0 ) π F (−iω 0 ) π ( A(ω ) − iΦ(ω ))
Z
Iγ − = ds = = =
γ− s 2 +ω2
0 2iω 0 2ω 0 2ω 0

128
3.6 State Models

and the integral along the imaginary axis is

− i∞
F ( s) ∞
F (iω ) ∞
A(ω )
Z Z Z
Ia = ds = i dω = 2i dω
i∞ s2 − ω 02 −∞ ω 2 + ω2
0 0 ω 2 + ω 02

Collecting the pieces it now follows from Cauchy’s theorem that

iπ Φ(ω 0 ) ∞
A(ω )
Z
Iγ + + Iγ − + Ia = − + 2i dω = 0
ω0 0 ω 2 + ω 02

Hence
2ω 0 ∞
A(ω )
Z
Φ(ω ) = dω
π 0 ω 2 + ω 02
Integrating by parts and using

ω0 dω dω ω − ω
Z Z Z
0
dω = dω − dω = log

ω 2 + ω 02 ω − ω0 ω + ω0 ω + ω0

we get

2
Z ω + ω dA(ω )

2 ∞
Z
eu/2 + e−u/2 a(u)
0
Φ(ω 0 ) = log dω = log u/2 du

π 0 ω − ω 0 dω π −∞ e − e−u/2 du

2
Z ∞
a(u)
= log (coth u/2) du,
π −∞ du

where u = log (ω /ω 0 ) and a(u) = A(ω 0 eu ).

3.6 State Models


The state is a collection of variables that summarize the past of a system
for the purpose of prediction the future development of the system. For
an engineering system the state is composed of the variables required to
account for storage of mass, momentum and energy. A key issue in mod-
eling is to decide how accurate storage has to be represented. The state
variables are gathered in a vector, the state vector x ∈ Rn . The control
variables are represented by another vector u ∈ R p and the measured
signal by the vector y ∈ Rq . A system can then be represented by the
model
dx
= f ( x, u)
dt (3.46)
y = g( x, u)

129
Chapter 3. Dynamics

The dimension of the state vector is called the order of the system.
The system is called time-invariant because the functions f and g do not
depend explicitly on time t. It is possible to have more general time-
varying systems where the functions do depend on time. The model thus
consists of two functions. The function f gives the velocity of the state
vector as a function of state x, control u and time t and the function g
gives the measured values as functions of state x, control u and time t. The
function f is called the velocity function and the function g is called the
sensor function or the measurement function. A system is called linear
if the functions f and g are linear in x and u. A linear system can thus
be represented by
dx
= Ax + Bu
dt
y = Cx + Du

where A, B, C and D are constant matrices. Such a system is said to


be linear and time-invariant, or LTI for short. The matrix A is called the
dynamics matrix, the matrix B is called the control matrix, the matrix C
is called the sensor matrix and the matrix D is called the direct term.
We will illustrate by a few examples.

EXAMPLE 3.26—THE DOUBLE INTEGRATOR


Consider a system described by

0 1
 
dx  
= x + 0
 1u
dt 0 0

  (3.47)
y= 1
 0x

This is a linear time-invariant system of second order with no direct term.

EXAMPLE 3.27—THE INVERTED PENDULUM


Consider the inverted pendulum in Figure 3.32. The state variables are
the angle θ = x1 and the angular velocity dθ / dt = x2 , the control variable
is the acceleration ug of the pivot, and the output is the angle θ .
Newton’s law of conservation of angular momentum becomes

d2θ
J = mg l sin θ + mul cos θ
dt2

130
3.6 State Models

Figure 3.32 An inverted pendulum. The picture should be mirrored.

Introducing x1 = θ and x2 = dθ / dt the state equations become

x2
 
dx  
= mg l mlu
 

dt sin x1 + cos x1 

 
J J
y = x1

It is convenient to normalize the equation by choosing J / mg l as the


p

unit of time. The equation then becomes


 
dx x2
=

 

dt sin x1 + u cos x1 (3.48)

y = x1

This is a nonlinear time-invariant system of second order.

EXAMPLE 3.28—AN ELECTRIC MOTOR


A schematic picture of an electric motor is shown in Figure 3.33 Energy
is stored in the inductor and momentum is stored in the rotor. Two state
variables are needed if we are only interested in motor speed. Storage
can be represented by the current I through the rotor and the angular
velocity ω of the rotor. The control signal is the voltage u applied to the
motor. A momentum balance for the rotor gives


J = km I (3.49)
dt

131
Chapter 3. Dynamics

R L +
M J ω
u M e
− D
i

(a) (b)

Figure 3.33 Schematic diagram of an electric motor.

where km is the motor constant. Kirchoff’s voltage law for the electric
circuit gives
dI
u = RI + L + kmω (3.50)
dt
where the last term represents the back-EMF generated when the rotor
winding rotate in the magnetic field. Notice that the same parameter km
appears both in (??) and (??). The reason for this is the following. The
key physical mechanisms for torque generation in a permanent magnet
motor is the fact that a wire in a homogeneous magnetic field is subject
to a force
F = BIL
where B is the field strength, I the current and L the length of a wire. A
single wire in the motor rotor at radius R thus gives the torque

T = B I LR = B RLI .

When a single wire in the motor rotor rotates with angular velocity ω it
generates the voltage
V = B RLω
across the wire. Notice that the constant B LR appears both in the torque
equation and in the equation for the back-EMF. Also notice that the con-
stants may have different values if SI units are not used.
Introducing the state variables x1 = ω , x2 = I the equations for the
motor can be written as
0 km 
0
  
dx J 
= x+ u
  
1 

dt k R
 
− L −L
m
L (3.51)
 
y= 1 0 x
 

132
3.6 State Models

Figure 3.34 A schematic picture of a water tank.

This is a linear time-invariant system with three state variables and one
input.

EXAMPLE 3.29—THE WATER TANK


Consider a tank with water where the input is the inflow and there is
free outflow, see Figure 3.34 Assuming that the density is constant a
mass balance for the tank gives

dV
= qin − qout
dt

The outflow is given by p


qout = a 2g h
There are several possible choices of state variables. One possibility is to
characterize the storage of water by the height of the tank. We have the
following relation between height h and volume
Z h
V = A( x)dx
0

Simplifying the equations we find that the tank can be described by

dh 1 p
= ( qin − a 2g h)
dt A(h)
p
qout = a 2g h

The tank is thus a nonlinear system of first order.

133
Chapter 3. Dynamics

Equilibria
To investigate a system we will first determine the equilibria. Consider
the system given by (3.46) which is assumed to be time-invariant. Let the
control signal be constant u = u0 . The equilibria are states x0 such that
dx/ dt = 0. Hence
f ( x0 , u0 ) = 0
Notice that there may be several equilibria.
For second order systems the state equations can be visualized by
plotting the velocities for all points in the state space. This graph which
is called the phase plane shows the qualitative behavior of the system. The
equilibria corresponds to points where the velocity is zero. We illustrate
this with an example.

EXAMPLE 3.30—THE PHASE PLANE


Consider the system
x − x23 
 
dx  2
=
 
dt − x1 − x22

The equilibria are given by

x2 − x23 = 0
x1 − x22 = 0

There are three equilibria:


x1 = −1 x2 = −1
x1 = −1 x2 = 1
x1 = 0 x2 = 0
The phase plane is shown in Figure 3.35. The phase plane is a good
visualization of solutions for second order systems. It also illustrates that
nonlinear systems can be interpreted as a vector field or a flow.

Linearization
Nonlinear systems are unfortunately difficult. It is fortunate that many
aspects of control can be understood from linear models. This is particu-
larly true for regulation problems where it is intended to keep variables
close to specified values. When deviations are small the nonlinearities can
be approximated by linear functions. With efficient control the deviations
are small and the approximation works even better. In this section we will
show how nonlinear dynamics systems are approximated. We will start
with an example that shows how static systems are approximated.

134
3.6 State Models

3
x’=y−y
2
y’=−x−y

1.5

0.5

0
y

−0.5

−1

−1.5

−2

−3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2


x

Figure 3.35 Phase plane for the second order system dx1 /dt = x2 − x23 ,dx2 /dt =
− x1 − x22 .

EXAMPLE 3.31—LINEARIZATION OF STATIC SYSTEM


Consider the system
y = g(u)
A Taylor series expansion around u = u0 gives

y = g(u0 ) + g′ (u0 )(u − u0 ) + . . .

The linearized model is

y − y0 = g′ (u0 )(u − u0 )

The linearized model thus replaces the nonlinear curve by its tangent at
the operating point.
Linearization of dynamic systems is done in the same way. We start by
determining the appropriate equilibria. The equations are then approxi-
mated using Taylor series expansions. Consider the system
dx
= f ( x, u)
dt
y = g( x, u)

Consider small deviations from the equilibrium.

x = x0 + δ x, u = u0 + δ u, y = y0 + δ y

135
Chapter 3. Dynamics

Make a series expansion of the differential equation and neglect terms of


second and higher order. This gives
dx Vf Vf
= f ( x0 + δ x, u0 + δ u)  f ( x0 , u0 ) + ( x0 , u0 )δ x + ( x0 , u0 )δ u
dt Vx Vu
Vg Vg
y = g( x0 + δ x, u0 + δ u)  y0 + ( x0 , u0 )δ x + ( x0 , u0 )δ u
Vx Vu
We have f ( x0 , u0 ) = 0 because x0 is an equilibrium and we find the fol-
lowing approximation for small deviations around the equilibrium.
d( x − x0 )
= A( x − x0 ) + B (u − u0 )
dt
y − y0 = C ( x − x0 ) + D (u − u0 )
where
Vf Vf
A= ( x0 , u0 ) B= ( x0 , u0 )
Vx Vu
Vg Vg
C= ( x0 , u0 ) D= ( x0 , u0 )
Vx Vu
The linearized equation is thus a linear time-invariant system, compare
with (3.53). It is common practice to relabel variables and simply let x, y
and u denote deviations from the equilibrium.
We illustrate with a few examples

EXAMPLE 3.32—LINEARIZATION OF THE WATER TANK


dh 1 p
= ( qin − a 2g h)
dt A(h)
p
qout = a 2g h
To determine the equilibrium we assume that the inflow is constant qin =
q0 . It follows that
p
qout = qin = q0 = a 2g h0
q20
h0 =
2g a2
Let A0 be the cross section A at level h0 , introduce the deviations. The
linearized equations are

dδ h a 2g h0 1
=− δh+ δ qin
dt 2A h A0
√ 0 0
a 2g h0 q0
δ qout = δh = δh
h0 h0

136
3.6 State Models

The parameter

2A0 h0 Total water volume [m3 ]


T= = 2
q0 Flow rate [m3 /s]

is called the time constant of the system. Notice that T /2 is the time it
takes to fill the volume A0 h0 with the steady state flow rate q0

EXAMPLE 3.33—LINEARIZATION OF THE INVERTED PENDULUM


Consider the inverted pendulum in Example 3.27 which is described by
(3.48). If the control signal is zero the equilibria are given by

x2 = 0
sin x1 = 0

i.e. x2 = dθ / dt and x1 = θ = 0 and x1 = θ = π . The first equilibrium


corresponds to the pendulum standing upright and the second to the pen-
dulum hanging straight down. We have

V f ( x, 0)  0 1  0 
   
Vf
= ,
 = ,

Vx cos x1 − u sin x1 0 Vu cos x1
 

Evaluating the derivatives at the upper equilibrium u = 0, x1 = 0 and


x2 = 0 we get
0 1 0
   
A= , B =  .

   
1 0 1
For the equilibrium when then pendulum is hanging down, u = 0, x1 = π
and x2 = 0 we have instead

 0 1  0 
   
A= ,
 B= .

−1 0 −1
 

Behavior of Nonlinear Systems


Nonlinear systems may have quite complicated behavior. There may be
several equilibria, there may be solutions with stable periodic motions and
there may be highly irregular chaotic motion. Figure 3.1 is an illustration
of a system with a stable periodic limit cycle. The system in Figure 3.35
also has a limit cycle. Solutions starting inside the limit cycle converges
to the limit cycle but not solutions starting outside.

137
Chapter 3. Dynamics

The equilibria can be determined by solving nonlinear algebraic equa-


tions, the local behavior around the equilibria can be obtained by inves-
tigating the linearized equations. The phase plane gives a lot of insight
for two dimensional systems and there are also criteria for finding limit
cycles for such systems. The behavior of a particular solution starting at
a given initial condition can always be found by numerical integration.
There are however no general methods for finding the global behavior
of nonlinear systems. There are also many mathematical subtleties in
nonlinear systems which we illustrate by two simple examples.

EXAMPLE 3.34—FINITE ESCAPE TIME


Consider the first order system
dx
= x2
dt
x(0) = 1
This equation has the solution
1
x(t) =
1−t
We have x(0) = 1 which means that it satisfies the initial condition.
Differentiating x(t) with respect to time also shows that the function x(t)
satisfies the differential equation. The solution starts at x(0) = 1, x(t)
increases monotonically and reaches infinity for t = 1.
This example illustrates that solutions can blow up in finite time. The rea-
son for this is that since the velocity is proportional to x2 it increases very
rapidly with increasing x. This type of behavior cannot occur for linear
systems because the solutions to such systems are composed of polyno-
mials and exponential functions. The technical name for this behavior is
finite escape time.
The next example shows that there may be problems with uniqueness
even of simple differential equations.

EXAMPLE 3.35—LACK OF UNIQUENESS


Consider the first order system
dx √
=2 x
dt (3.52)
x(0) = 0
This equation has the solutions
0 if t ≤ a
(
x(t) =
(t − a)2 if t > a

138
3.7 Linear Time-Invariant Systems

100

80

60
x
40

20

0
0 1 2 3 4 5 6 7 8 9 10
t

Figure 3.36 Solutions to the differential equation (3.52).

This can be verified by differentiation. The solutions are plotted in Fig-


ure 3.36 One solution to the differential equation is x(t) = 0. This would
normally be the only solution. The reason why there are other solutions
is that the square function increases very rapidly at x = 0, the derivative
is actually infinite for x = 0.
The difficulties with the non-uniqueness can be avoided by imposing re-
strictions on the function f . A common assumption is to assume that the
function is Lipschitz continuous which means that

h f ( x) − f ( y)h ≤ C h x − yh, for all x and y

where C is a constant. The square root function does not have this prop-
erty for y = 0 because its derivative is infinite.
Notice that the water tank in Example 3.29 has a model where the
velocity depends on the square root of the height h. We could then expect
that difficulties may occur in this case. Notice, however, that the physical
model is no longer valid if the height is so small so that the water level
is below the upper part of the outlet area.

3.7 Linear Time-Invariant Systems


The model
dx
= Ax + Bu
dt (3.53)
y = Cx + Du
is one of the standard models in control. In this section we will present
an in depth treatment. Let us first recall that x is the state vector, u the
control, y the measurement. The model is nice because it can represent

139
Chapter 3. Dynamics

systems with many inputs and many outputs in a very compact form.
Because of the advances in numeric linear algebra there are also much
powerful software for making computations. Before going into details we
will present some useful results about matrix functions. It is assumed
that the reader is familiar with the basic properties of matrices.

Matrix Functions
Some basic facts about matrix functions are summarized in this section.
Let A be a square matrix, since it is possible to compute powers of matrices
we can define a matrix polynomial as follows

f ( A) = a0 I + a1 A + . . . + an An

Similarly if the function f ( x) has a converging series expansion we can


also define the following matrix function

f ( A) = a0 I + a1 A + . . . + an An + . . .

The matrix exponential is a nice useful example which can be defined as


1 1
eAt = I + At + ( At)2 + . . . + An tn + . . .
2 n!
Differentiating this expression we find

deAt 1 1
= A + A2 t + A3 t2 + . . . + An tn−1 + . . .
dt 2 (n − 1)!
 1 1 
= A I + At + ( At)2 + . . . + An tn + . . . = AeAt
2 n!
The matrix exponential thus has the property

deAt
= AeAt = eAt A (3.54)
dt
Matrix functions do however have other interesting properties. One result
is the following.

THEOREM 3.4—CAYLEY-HAMILTON’S THEOREM


Let the n  n matrix A have the characteristic equation

det(λ I − A) = λ n + a1 λ n−1 + a2 λ n−2 . . . + an = 0

then it follows that

An + a1 An−1 + a2 An−2 . . . + an I = 0

A matrix satisfies its characteristic equation.

140
3.7 Linear Time-Invariant Systems

PROOF 3.2
The proof will be given only for the special case when the matrix can be
diagonalized,i.e A = T −1 Λ T where Λ is a diagonal matrix. This implies
that

A2 = T −1 Λ T T −1 Λ T = T −1 Λ 2 T
A3 = T −1 Λ T A2 = T −1 Λ T T −1 Λ 2 T = T −1 Λ 3 T

and that An = T −1 Λ n T. Since λ i is an eigenvalue it follows that

λ ni + a1 λ ni −1 + a2 λ ni −2 . . . + an = 0

Hence
Λ ni + a1 Λ ni −1 + a2 Λ ni −2 . . . + an I = 0
Multiplying by T −1 from the left and T from the right and using the
relation Ak = T −1 Λ k T now gives

An + a1 An−1 + a2 An−2 . . . + an I = 0

The assumption on distinct eigenvalues is essential. Matrices with


multiple eigenvalues may satisfy polynomial equations of degree less than
n. For example the matrices

1 0 1 1
   
A1 = , A2 =
0 1 0 1

satisfy the equations

A1 − I = 0, and ( A2 − I )2 = 0

This can be captured by the notion of minimal polynomial of a matrix


which is the polynomial of lowest degree such that g( A) = 0. The char-
acteristic polynomial is generically the minimal polynomial. For matrices
with common eigenvalues the minimal polynomial may, however, be dif-
ferent from the characteristic polynomial as is illustrated by the matrices
above.
A matrix function can thus be written as

f ( A) = c0 I + c1 A + . . . + ck−1 Ak−1

where k is the degree of the minimal polynomial.

141
Chapter 3. Dynamics

Solving the Equations


Using the matrix exponential the solution to (3.53) can be written as

Z t
x(t) = e x(0) +
At
eA(t−τ ) Bu(τ )dτ (3.55)
0

To prove this we differentiate both sides and use the property (3.54) of
the matrix exponential. This gives

Z t
dx
= AeAt x(0) + AeA(t−τ ) Bu(τ )dτ + Bu(t) = Ax + Bu
dt 0

which proves the result. Notice that the calculation is essentially the same
as for proving the result for a first order equation.

Input-Output Relations
It follows from Equations (3.53) and (3.55) that the input output relation
is given by

Z t
y(t) = Ce x(0) +
At
eA(t−τ ) Bu(τ )dτ + Du(t)
0

Taking the Laplace transform of (3.53) under the assumption that x(0) =
0 gives

sX (s) = AX (s) + BU (s)


Y (s) = C X (s) + DU (s)

Solving the first equation for X (s) and inserting in the second gives

X (s) = [sI − A]−1 BU (s)


Y (s) = C [sI − A]−1 B + D U (s)


The transfer function is thus

G (s) = C [sI − A]−1 B + D (3.56)

We illustrate this with an example.

142
3.7 Linear Time-Invariant Systems

EXAMPLE 3.36—TRANSFER FUNCTION OF INVERTED PENDULUM


The linearized model of the pendulum in the upright position is charac-
terized by the matrices
0 1 0
     
A=

 , B =  
   , C =  1 0  , D = 0.
1 0 1

The characteristic polynomial of the dynamics matrix A is

 s −1 
 
det (sI − A) = det   = s2 − 1

−1 s

Hence
1 1
 
−1 s
(sI − A) = 2 det  
s −1 1
 
s
The transfer function is thus

1   s 1 −1  0  1
  
G (s) = C [sI − A]−1 B = 1 0 = 2
 
   
s2 − 1 1 1 s −1

s

Consider the system


dx
= Ax + Bu
dt
y = Cx

To find the input output relation we can differentiate the output and we
obtain

y = Cx
dy dx
=C = C Ax + C Bu
dt dt
d2 y dx du du
= CA + CB = C A2 x + C ABu + C B
dt2 dt dt dt
..
.
dn y du dn−1 u
n
= C An x + C An−1 Bu + C An−2 B + . . . + C B n−1
dt dt dt
Let ak be the coefficients of the characteristic equation. Multiplying the
first equation by an , the second by an−1 etc we find that the input-output
relation can be written as.
dn y dn−1 y dn−1 u dn−2 u
+ a1 + . . . + a n y = B1 + B2 + . . . + Bn u,
dtn dtn−1 dtn−1 dtn−2

143
Chapter 3. Dynamics

where the matrices Bk are given by.

B1 = C B
B2 = C AB + a1 C B
B3 = C A2 B + a1 C AB + a2 C B
..
.
Bn = C An−1 B + a1 C An−1 B + . . . + an−1 C B

Poles and Zeros


The poles of the linear time-invariant system (3.53) are simply the eigen-
values of the matrix A. To determine the zeros we use the fact that zeros
are such that, with proper initial conditions, the response to input est is
zero. The state and the output that corresponds to the input u0 est are then
x0 est and y0 est where

sx0 = Ax0 + Bu0


y0 = Cx0 + Du0

Requiring that the output is zero we find

sI − A B   x0 
  
=0

 
   
C D u0

This equation has a solution with nonzero x0 , u0 only if the matrix on the
left is singular. The zeros are thus the values s such that

sI − A B 
 
det  =0 (3.57)

 
C D

Notice in particular that if the matrix B has full rank the matrix has
n linearly independent rows for all values of s. Similarly there are n
linearly independent columns if the matrix C has full rank. This implies
that systems where the matrices B or C are of full rank do not have
zeros. In particular it means that a system has no zeros if the full state
is measured.

Coordinate Changes and Invariants


The components of the input vector u and the output vector y are unique
physical signals, but the state variables depend on the coordinate system
chosen to represent the state. The matrices A, B and C depend on the
coordinate system but not the matrix D which directly relates inputs and

144
3.7 Linear Time-Invariant Systems

outputs. The consequences of changing coordinate system will now be


investigated. Introduce new coordinates z by the transformation z = T x,
where T is a regular matrix. It follows from (3.53) that

dz
= T ( Ax + Bu) = T AT −1 z + T Bu = Ãz + B̃u
dt
y = Cx + DU = CT −1 z + Du = C̃z + Du

The transformed system has the same form as (3.53) but the matrices A,
B and C are different

à = T AT −1 , B̃ = T B , C̃ = CT −1 , D̃ = D (3.58)

It is interesting to investigate if there are special coordinate systems that


gives systems of special structure.
Transfer functions and impulse responses are invariant to coordinate
changes. To demonstrate this we simple calculate the impulse response
for the transformed system

−1
g̃(t) = C̃eÃt B̃ = CT −1 eT AT t
T B = CeAt B = g(t)

A similar calculation of the transfer function of the transformed system


gives

G̃ (s) = C̃ (sI − Ã)−1 B̃ = CT −1 (sI − T AT −1 )−1 T B


= C (sI − A)−1 B = G (s)

Canonical Forms
There are special choices of coordinates that give state equations with a
special structure.

The Diagonal Form Some matrices can be transformed to diagonal


form, one broad class is matrices with distinct eigenvalues. For such ma-
trices it is possible to find a matrix T such that the matrix T AT −1 is a
diagonal i.e.
λ 0 
 
 1

λ2
 

 
−1
 
T AT = Λ == 
 
.
 
.

.

 


 

 
0 λn
 

145
Chapter 3. Dynamics

The transformed system then becomes


 λ1 0 
  
 β1 
λ2 β2 

 
 
 

dz 
 
 
 
= z+
   

.
 
.
 u
. .
 
dt 


 .







 .



 (3.59)
  
 
0 λn βn
  
 
y =  γ 1 γ 2 . . . γ n  z + Du

The transfer function of the system is

n
X β iγ i
G ( s) = +D
s − λi
i=1

Notice appearance of eigenvalues of matrix A in the denominator. Also


notice that there is some arbitrariness because if the product β iγ i is not
zero we can multiply β i with a constant and divide γ i with the same con-
stant. When the product β iγ i = 0 we can thus choose one of the numbers
to be equal to one. Also notice that the transfer function has degree lower
than n if any of the parameters β i or γ i is zero.

Phase Coordinate Form Consider the system

dn y dn−1 y
+ a1 + . . . + an y = u (3.60)
dtn dtn−1

which has the transfer function

1
G phc (s) = (3.61)
sn + a1 sn−1 + . . . + an−1 s + an

The system is a special case of an LTI system with one input and one
output. Introduce the state variables as the output and its derivatives,
i.e.
dn−1 y dn−2 y dy
x1 = , x2 = , ⋅ ⋅ ⋅ , xn−1 = , xn = y
dtn−1 dtn−2 dt

146
3.7 Linear Time-Invariant Systems

It follows that

dx1
= −a1 x1 − a2 x2 − ⋅ ⋅ ⋅ − an xn + u
dt
dx2
= x1
dt
dx3
= x2
dt
..
.
dxn
= xn−1
dt

or in matrix form

−a1 −a2 . . . an−1 − an  1


   

  
 
1 0 0 0  0

 
 
 

  
 

dx 

0 1 0 0 

 

0


= x + u

  
 

dt . .
  
(3.62)
   
.. .
   
.

 
 
 


 
 
 
  
 
0 0 1 0 0
  
 
y = 0 0 ... 0 1x

The system has the characteristic polynomial

s + a1 a2 ... an−1 an 
 

 
−1 s 0 0 

 

 

 
Dn(s) = det  0 −1 0 0 

 

..

 

 
 .

 


 


0 0 −1
 
s

Expanding the determinant by the last row we find the following recursive
equation for the polynomial Dn (s).

Dn (s) = sDn−1 (s) + an

It follows from this equation that

Dn(s) = sn + a1 sn−1 + . . . + an−1 s + an

Notice that the coefficients of the characteristic polynomial appear in the


first row of the dynamics matrix and that X k (s) = sk−1 G phc (s).

147
Chapter 3. Dynamics

Reachable Canonical Form Consider a system described by the n-th


order differential equation

dn y dn−1 y dn−1 u
+ a1 + . . . + a n y = b1 + . . . + bn u
dtn dtn−1 dtn−1

which has the transfer function

b1 sn−1 + b2 sn−2 + ⋅ ⋅ ⋅ + bn−1 s + bn


G ( s) = (3.63)
sn + a1 sn−1 + . . . + an−1 s + an

This transfer function can be written as

G (s) = b1 sn−1 G phc (s) + b2 sn−2 G phc (s) + ⋅ ⋅ ⋅ + bn G phc (s)

Where G phc (s) is the transfer function (3.61) of a system in the phase
coordinate form. The input output relation for the system can be written
as
Y (s) = b1 X 1 (s) + b2 X 2 (s) + ⋅ ⋅ ⋅ + bn X n (s)

where x1 , x2 , etc are given by (3.62). It thus follows that the state equa-
tions can be written as

−a1 −a2 . . . an−1 −an  1


   

  
 
1 0 0 0 0

 
 
 

 
 
 

dz  
0 1 0 0

 

0


= z+ u

 
 
 

dt . .
 
(3.64)
   
.. .. 

 
 
 

 
 
 


 
 
 
 
0 0 1 0 0
  
 
y =  b1 b2 . . . bn−1 bn  z + Du

The system has the transfer function

b1 sn−1 + b2 sn−2 + . . . + bn
G ( s) = +D
sn + a1 sn−1 + a2 sn−2 + . . . + an

The denominator of the transfer function G (s) is the characteristic poly-


nomial of the matrix A. This form is called the reachable canonical for
reasons that will be explained later in this section.
A block diagram of the system is shown in Figure 3.37. The system
can be viewed as composed of n cascaded integrators.

148
3.7 Linear Time-Invariant Systems

Figure 3.37 Block diagram of a system with the transfer function G (s) =
b1 sn−1 +b2 sn−2 +...+bn
sn +a1 sn−1 +a2 sn−2 +...+an
+ D in reachable canonical form. Notice that all integrators
are connected to the input for all values of the parameters.

Observable Canonical Form The reachable canonical form is not the


only way to represent the transfer function

b1 sn−1 + b2 sn−2 + . . . + bn
G ( s) = .
sn + a1 sn−1 + a2 sn−2 + . . . + an

Another representation is obtained by the following recursive procedure.


Introduce the Laplace transform X 1 of first state variable as

b1 sn−1 + b2 sn−2 + . . . + bn
X1 = Y = U
sn + a1 sn−1 + a2 sn−2 + . . . + an

then

(sn + a1 sn−1 + a2 sn−2 + . . . + an ) X 1 = (b1 sn−1 + b2 sn−2 + . . . + bn ) U

Dividing by sn−1 and rearranging the terms we get

sX 1 = −a1 X 1 + b1 U + X 2

where

sn−1 X 2 = −(a2 sn−2 + a3 sn−3 + . . . + an X 1




+ b2 sn−2 + b3 sn−3 + . . . + bn ) U

149
Chapter 3. Dynamics

Dividing by sn−2 we get

sX 2 = −a2 X 2 + b2 U + X 3

where

sn−2 X 3 = −(a3 sn−3 + a4 sn−4 . . . + an X 1 + b3 sn−3 + . . . + bn ) U




Dividing by sn−3 gives

sX 3 = −a3 X 1 + b3 U + X 4

Proceeding in this we we finally obtain

X n = −an X 1 + b1 U

Collecting the different parts and converting to the time domain we find
that the system can be written as

−a1 1 0 ... 0 b1 
   
 
0 1 0
   
 −a2 b2 

  
 
 
 
 

dz  . .
  
.. .
   
= z + . u
 
 
 

dt
   
(3.65)

 
 
 

−an−1 0 0 1
   
bn−1 

  
 

 
 
 

0 0 0
   
− an bn
 
y = 1 0 0... 0  z + Du

The system has the transfer function

b1 sn−1 + b2 sn−2 + . . . + bn
G ( s) = +D
sn + a1 sn−1 + a2 sn−2 + . . . + an

A block diagram of the system is shown in Figure 3.38. The system can
be viewed as composed of n cascaded integrators.

Reachability
We begin by disregard the output masurements and focus on the evolution
of the state which is given by

dx
= Ax + Bu
dt

150
3.7 Linear Time-Invariant Systems

Figure 3.38 Block diagram of a system with the transfer function G (s) =
b1 sn−1 +b2 sn−2 +...+bn
sn +a1 sn−1 +a2 sn−2 +...+an
+ D in reachable observable form. Notice that all integrators
are connected to the output for all values of the parameters.

where x ∈ Rn , u ∈ R, A is an n  n matrix and B an n  1 matrix. A


fundamental question is if it is possible to find control signals so that any
point in the state space can be reached from x = 0.
First observe that possible equilibria for constant controls are given
by
Ax + bu0 = 0
This means that possible equilibria lies in a one dimensional subspace. If
the matrix A is invertible this subspace is spanned by A−1 B.
Even if the possible equilibria lies in a one dimensional subspace it
may still be possible to reach all points in the state space transiently. To
explore this we will first give a heuristic argument based on formal cal-
culations with delta functions. When the initial state is zero the response
of the state to a unit step in the input is given by
Z t
x(t) = eA(t−τ ) Bdτ . (3.66)
0

The derivative of a unit step function is the delta function δ (t) which may
be regarded as a function which is zero everywhere except at the origin
with the property that Z ∞
δ (t)dt = 1

The response of the system to a delta function is thus the derivative of x


in (3.66)
dx
= eAt B .
dt

151
Chapter 3. Dynamics

In the same way we find that the response to the derivative of a delta
function is
d2 x
= AeAt B
dt2
The input

u(t) = α 1δ (t) + α 2δ˙ (t) + α d ddotδ (t) + ⋅ ⋅ ⋅ + α nδ (n−1) (t)

thus gives the state

x(t) = α 1 eAt B + α 2 AeAt B + α 3 A2 eAt B + ⋅ ⋅ ⋅ + α n An−1 eAt B

Hence
x(0+) = α 1 B + α 2 AB + α 3 A2 B + ⋅ ⋅ ⋅ + α n An−1 B
The right hand is a linear combination of the columns of the matrix.
 
Wr =  B AB . . . An−1 B  (3.67)

To reach an arbitrary point in the state space it must thus be required


that there are n linear independent columns of the matrix Wc . The matrix
is therefor called the reachability matrix.
An input consisting of a sum of delta functions and their derivatives is
a very violent signal. To see that an arbitrary point can be reached with
smoother signals we can also argue as follow. Assuming that the initial
condition is zero the state of the system is given by
Z t Z t
A(t−τ )
x(t) = e Bu(τ )dτ = eAτ Bu(t − τ )dτ
0 0

It follows from the theory of matrix functions that

eAτ = Iα 0 (τ ) + Aα 1 (τ ) + . . . + An−1α n−1 (τ )

and we find that


Z t Z t
x(t) = B α 0 (τ )u(t − τ )dτ + AB α 1 (τ )u(t − τ )dτ +
0 0
Z t
. . . + An−1 B α n−1 (τ )u(t − τ )dτ
0

Again we observe that the right hand side is a linear combination of the
columns of the reachability matrix Wr given by (3.67).
We illustrate by two examples.

152
3.7 Linear Time-Invariant Systems

EXAMPLE 3.37—REACHABILITY OF THE INVERTED PENDULUM


The linearized model of the inverted pendulum is derived in Example 3.33.
The dynamics matrix and the control matrix are

0 1 0
   
A= , B=

   
1 0 1

The reachability matrix is

0 1
 
Wr =  (3.68)

 
1 0

This matrix has full rank and we can conclude that the system is reach-
able.

EXAMPLE 3.38—SYSTEM IN REACHABLE CANONICAL FORM


Consider a system in reachable canonical form (3.64), i.e

−a1 −a2 ... an−1 − an  1


   

  
 
 1 0 0 0  0

 
 
 
  
 

dz  0

1 0 0 

 

0


= z + u = Ãz + B̃u
 
 

dt .. .

 
 
 

.
   
. .

 
 
 


 
 
 
  
 
0 0 1 0 0
  

The reachability matrix


 
W̃r =  B̃ Ã B̃ ⋅⋅⋅ Ãn−1 B 

has the inverse


1 a1 a2 ... an 
 

0 1 ...
 
a1 an−1 

 
W̃r−1
 
= (3.69)

..
 

.

 


 

 
0 0 0 ... 1
 

It is useful of have an intuitive understanding of the mechanisms that


make a system unreachable. An example of such a system is given in
Figure 3.39. The system consists of two identical systems with the same
input. The intuition can also be demonstrated analytically. We demon-
strate this by a simple example.

153
Chapter 3. Dynamics

S
u

Figure 3.39 A non-reachable system.

EXAMPLE 3.39—NON-REACHABLE SYSTEM


Assume that the systems in Figure 3.39 are of first order. The complete
system is then described by

dx1
= λ x1 + β 1 u
dt
dx2
= λ x2 + β 2 u
dt

The reachability matrix is

 β1 λβ1 
 
Wr = 
β2 λβ2
 

This matrix is singular and the system is not reachable. In fact it can be
shown that x1 − x2 is a constant.

Coordinate Changes
It is interesting to investigate how the reachability matrix transforms
when the coordinates are changed. Consider the system in (3.53). Assume
that the coordinates are changed to z = T x. It follows from (3.58) that
the dynamics matrix and the control matrix for the transformed system
are

à = T AT −1
B̃ = T B

The reachability matrix for the transformed system then becomes


 
W̃r =  B̃ Ã B̃ . . . Ãn−1 B̃ 

154
3.7 Linear Time-Invariant Systems

We have
à B̃ = T AT −1 T B = T AB
Ã2 B̃ = (T AT −1 )2 T B = T AT −1 T AT −1 T B = T A2 B
..
.
Ãn B̃ = T An B
and we find that the reachability matrix for the transformed system has
the property
   
W̃r =  B̃ Ã B̃ . . . Ãn−1 B̃  = T  B AB . . . An−1 B  = T Wr
(3.70)
This formula is very useful for finding the transformation matrix T.

Observability
When discussing reachability we neglected the output and focused on the
state. We will now focus on the relation between the state and the output.
Consider the system
dx
= Ax
dt (3.71)
y = Cx
We will now investigate if it is possible to determine the state from ob-
servations of the output. This is clearly a problem of significant practical
interest, because it will tell if the sensors are sufficient.
The output itself gives the information about the state on vectors in
directions given by rows of the matrix C. The problem can clearly be
solved if the matrix C is invertible. If the matrix is not invertible we can
take derivatives of the output to obtain.
dy dx
=C = C Ax
dt dt
The derivative of the output give information about the state in directions
given by rows of the matrix C A. Proceeding in this way we get
y 
 

  
 dy   C 

 
 
   
 dt 
 
 CA 

   
 
2

 d y 
   
 C A2 

   
 
= x

 dt2 
   
.

   
  
.
 
 ..  .

 
 
 

   
.
  
 

n −1
   
 n−1 
 
 C A


 d y 

dtn−1

155
Chapter 3. Dynamics

We thus find that the state can be determined if the matrix


C 
 

 
CA 

 

 

2
 
C A (3.72)
 
Wo = 

 

.
 

.
 
 . 

 
 

 
n−1
 
CA
has n independent rows. Notice that because of the Cayley-Hamilton equa-
tion it is not worthwhile to continue and take derivatives of order higher
than n − 1. The matrix Wo is called the observability matrix. A system is
called observable if the observability matrix has full rank. We illustrate
with an example.

EXAMPLE 3.40—OBSERVABILITY OF THE INVERTED PENDULUM


The linearized model of inverted pendulum around the upright position
is described by (3.58). The matrices A and C are
0 1
   
A=

 , C = 1 0
1 0

The observability matrix is


1 0
 
Wo = 

 
0 1

which has full rank. It is thus possible to compute the state from a mea-
surement of the angle.
It is useful to have an insight into the mechanisms that make a system
unobservable. The following is an example.

EXAMPLE 3.41—A NON-OBSERVABLE SYSTEM


Consider the system in Figure 3.40 which is composed of two identical
systems whose outputs are added. It seems intuitively clear that it is
not possible to deduce the states from the output. This can also be seen
formally.

S
y
Σ

156
3.7 Linear Time-Invariant Systems

S
y
Σ

Figure 3.40 A non-observable system.

The system is described by


dx1
= λ x1
dt
dx2
= λ x2
dt
y = γ 1 x1 + γ 2 x2
The observability matrix is
 γ1 γ2 
 
Wo = 
λγ 1 λγ 2
 

which has rank 1 and the system is not observable.


Consider the system in (3.65) on observable canonical form, i.e.
−a1 1 0 ... 0 b
   
  1 

0 1 0
  
 −a2  b2 

  
 

 
  
dz  .  .. 
  
 .
   
= .
 z+
.
u
 
dt  
 
 

   
−an−1 0 0 1
   
bn−1 

 
 
 

  
 

0 0 0
   
− an bn
 
y = 1 0 0... 0  z + Du

A straight forward but tedious calculation shows that the inverse of the
observability matrix has a simple form. It is given by
1 0 0 ... 0
 

1 0 ... 0
 
a1

 

 

1 . . . 0
 
−1 a a
 
Wo =  2 1

 


.
 
 .
 
.
 


 

 
an−1 an−2 an−3 . . . 1
 

157
Chapter 3. Dynamics

This matrix is always invertible.

Coordinate Changes
It is interesting to investigate how the observability matrix transforms
when the coordinates are changed. Consider the system in (3.53). Assume
that the coordinates are changed to z = T x. It follows from (3.58) that
the dynamics matrix and the output matrix are given by

à = T AT −1
C̃ = CT −1

The observability matrix for the transformed system then becomes


C̃ 
 

 
C̃ Ã 

 

 

2
 
C̃ Ã
 
W̃o = 

 

.
 

.
 
 . 

 
 

 
n−1
 
C̃ Ã
We have

C̃ Ã = CT −1 T AT −1 = C AT −1
C̃ Ã2 = CT −1 (T AT −1 )2 = CT −1 T AT −1 T AT −1 = C A2 T −1
..
.
C̃ Ãn = C An T −1

and we find that the observability matrix for the transformed system has
the property
C̃ 
 

 
 C̃ Ã 

 

 
 C̃ Ã2 
 
 −1
 T = Wo T −1 (3.73)

W̃o = 

.
 

 . 

 . 
 


 

n−1
 
C̃ Ã
This formula is very useful for finding the transformation matrix T.

Kalman’s Decomposition
The concepts of reachability and observability give a good insight into the
structure of linear system. The key result is Kalman’s decomposition theo-
rem, which says that a linear system can be divided into four subsystems.
A linear system can thus be decomposed into four subsystems.

158
3.7 Linear Time-Invariant Systems

Figure 3.41 Kalman’s decomposition of a linear system with distinct eigenvalues.

• Sro reachable and observable


• Sr ō reachable not observable
• Sr̄o not reachable observable
• Sr̄ ō not reachable not observable
We will demonstrate this for the special case of systems where the matrix
A has distinct eigenvalues. Such a system can be represented by (3.59).
Since all the eigenvalues are distinct it follows that all states zk such that
β k = 0 are controllable and all states such that γ k = 0 are observable.
Notice that the assumption that the eigenvalues are distinct is important,
compare with Examples 3.39 and 3.41. The system can be represented as

Λ ro 0 0 0  β ro 
   
 
0 Λ r ō 0 0  β ro 
   
dz 
  
 
= +
   
  z   u
0 0 Λ 0 0
  
dt 


 r̄o












0 0 0 Λ r̄ ō 0
   
 
y =  γ ro 0 γ r̄o 0  z + Du

The transfer function of the system is

G (s) = γ ro (sI − Aro )−1 β ro + D

it is uniquely given by the subsystem which is reachable and observable.


A block diagram of the system is given in Figure 3.41.

159
Chapter 3. Dynamics

The Cancellation Problem


Kalman’s decomposition resolves one of the longstanding problems in con-
trol namely the problem of cancellation of poles and zeros, which is illus-
trated by the following example.

EXAMPLE 3.42—CANCELLATION OF POLES AND ZEROS


Consider a system described by the equation.
dy du
−y= −u (3.74)
dt dt
Integrating this system we find that

y(t) = u(t) + cet

where c is a constant. The transfer function of the system is

Y ( s) s−1
= =1
U ( s) s−1

Since s is a complex variable the cancellation is clearly permissible and we


find that the transfer function is G (s) = 1 and we have seemingly obtained
a contradiction because the system is not equivalent to the system

y(t) = u(t)

The problem can be resolved by using the Kalman representation. In this


particular case the system has two subsystems Sro and Sr̄o . The system
Sro is a static system with transfer function G (s) = 1 and the subsystem
Sr̄o which is observable but non reachable has the dynamics.
dx
=x
dt
This system is also unstable. Since it is observable in the input the behav-
ior of the system and the behavior predicted based on its transfer function
are drastically different.
Cancellations typically occurs when manipulating transfer functions.
One reason that they happen is that it is assumed that all initial val-
ues are zero when deriving the transfer functions. The consequences are
particularly serious when factors with zeros in the right half plane are
canceled because they correspond to exponentially growing signals. In
the early development of control, cancellations were avoided by ad hoc
rules forbidding cancellation of factors with zeros in the right half plane.
Kalman’s decomposition gives a clear picture of what happens when poles
and zeros are canceled.

160
3.7 Linear Time-Invariant Systems

The General Case


Some linear algebra is required to solve the general case. Introduce the
reachable subspace X r which is the linear subspace spanned by the columns
of the reachability matrix Wr . The state space is the direct sum of X r and
another linear subspace X r̄ . Notice that X r is unique but that X r̄ can be
chosen in many different ways. Choosing a coordinates with xr ∈ X r and
xbarr ∈ X r̄ the system equations can be written as
d xc A11 A12 xc B1
      
= + u (3.75)
dt xc̄ 0 A22 xc̄ 0
where the states xc are reachable and xc̄ are non-reachable.
Introduce the unique subspace X¯o of non-obeservable states. This is
right the null space of the observability matrix Wo . The state space is the
direct sum of X¯o and the non-unique subspace X o . Choosing a coordinates
with xo ∈ X o and xbaro ∈ X ō the system equations can be written as
d xo A11 0 xo
    
=
dt xō A21 A22 x0̄
(3.76)
xo
 
y = ( C1 0 )
xō
where the states xo are observable and xō not observable (quiet)
The intersection of two linear subspaces is also a linear subspace. In-
troduce X r ō as the intersection of X r and X ō and the linear subspace X ro
which together with X r ō spans X r . Finally we introduce the linear sub-
space X r̄o which together with X r ō , X r ō and X r ō spans the full state space.
Notice that the decomposition is not unique because only the subspace
X rō is unique.
Combining the representation (3.75) and (3.76) we find that a linear
system can be transformed to the form
A11 0 A13 0 B1
   
A
 21 A22 A23 A24 
dx B 
 2

= x+ u
dt  0 0 A33 0   0  (3.77)
0 0 A43 A44 0
y = ( C1 0 C2 0) x
where the state vector has been partitioned as
xro T
 
x 
 r ō 
x= 
 xr̄o 
xr̄ ō

161
Chapter 3. Dynamics

Figure 3.42 Kalman’s decomposition of a linear system.

A block diagram of the system is shown in Figure 3.42. By tracing the


arrows in the diagram we find that the input influences the systems Soc
and Sōc and that the output is influenced by Soc and Soc̄ . The system Sōc̄
is neither connected to the input nor the output. The transfer function of
the system is
G (s) = C1 (sI − A11 )−1 B1 (3.78)
It is uniquely given by the subsystem Soc .

3.8 Summary
This chapter has summarized some properties of dynamical systems that
are useful for control. Both input-output descriptions and state descrip-
tions are given. Much of the terminology that is useful for control has also
been introduced.

162
4
Simple Control Systems

4.1 Introduction

Simple examples of analysis and design of control systems are presented


in this chapter. A cruise controller for a car is designed in Section 4.2.
Only differential equations are used, the mathematical prerequisites are
summarized in Section 3.3. The analysis of more complicated systems can
be simplified significantly by introducing Laplace transforms and trans-
fer functions as described in Section 3.4. The Laplace transforms make it
easy to manipulate the system formally and to derive relations between
different signals. This is used in Section 6.4, which gives a systematic
way of designing PI controllers for first order systems. The key idea for
design is to develop a process model, to introduce a controller with suf-
ficient degrees of freedom. The controller parameters are then chosen to
give a closed loop system with a specified characteristic polynomial. This
approach to design is called pole placement because it gives a closed loop
system with specified closed loop poles. Some basic properties of second
order systems are also given in Section 6.4. Section 4.4 deals with design
of PI and PID controllers for second order systems Section 4.5 treats the
pole placement problem for systems of arbitrary order. This section which
requires more mathematical maturity can be omitted in a first reading.
For the interested reader it gives, however, important insight into the
design problem and the structure of stabilizing controllers. Section 4.5
summarizes the chapter. In most cases feedback is accomplished by us-
ing sensors and actuators. There are cases where feedback is obtained
through clever process design. One example is an ordinary bicycle which
is analyzed in Section 4.6. It is shown that many of the nice properties of
the bicycle are due to a purely mechanical feedback which has emerged
as a result of trial and error over a long period of time.

163
Chapter 4. Simple Control Systems

Figure 4.1 Schematic diagram of a car on a sloping road.

4.2 Cruise Control

The purpose of cruise control is to keep the velocity of a car constant.


The driver drives the car at the desired speed, the cruise control system
is activated by pushing a button and the system then keeps the speed
constant. The major disturbance comes from changes of the slope of the
road which generates forces on the car due to gravity. There are also
disturbances due to air and rolling resistance. The cruise control system
measures the difference between the desired and the actual velocity and
generates a feedback signal which attempts to keep the error small in
spite of changes in the slope of the road. The feedback signal is sent to
an actuator which influences the throttle and thus the force generated by
the engine.
We will start by developing a mathematical model of the system. The
mathematical model should tell how the velocity of the car is influenced
by the throttle and the slope of the road. A schematic picture is shown in
Figure 4.1

Modeling
We will model the system by a momentum balance. The major part of the
momentum is the product of the velocity v and the mass m of the car. There
are also momenta stored in the engine, in terms of the rotation of the crank
shaft and the velocities of the cylinders, but these are much smaller than
mv. Let θ denote the slope of the road, the momentum balance can be
written as
dv
m + cv = F − mgθ (4.1)
dt
where the term cv describes the momentum loss due to air resistance and
rolling and F is the force generated by the engine. The retarding force

164
4.2 Cruise Control
Slope of road

Desired velocity Throttle F Velocity


Σ Controller Engine Σ Body

Figure 4.2 Block diagram of a car with cruise control.

due to the slope of the road should similarly be proportional to the sine
of the angle but we have approximated sin θ  θ . The consequence of the
approximations will be discussed later. It is also assumed that the force F
developed by the engine is proportional to the signal u sent to the throttle.
Introducing parameters for a particular car, an Audi in fourth gear, the
model becomes
dv
+ 0.02v = u − 10θ (4.2)
dt
where the control signal is normalized to be in the interval 0 ≤ u ≤ 1,
where u = 1 corresponds to full throttle. The model implies that with full
throttle in fourth gear the car cannot climb a road that is steeper than
10%, and that the maximum speed in 4th gear on a horizontal road is
v = 1/0.02 = 50 m/s (180 km/h).
Since it is desirable that the controller should be able to maintain
constant speed during stationary conditions it is natural to choose a con-
troller with integral action. A PI controller is a reasonable choice. Such a
controller can be described by
Z t
u = k(vr − v) + ki (vr − v(τ ))dτ (4.3)
0

A block diagram of the system is shown in Figure 4.2. To understand how


the cruise control system works we will derive the equations for the closed
loop systems described by Equations (4.2) and (4.3) Since the effect of the
slope on the velocity is of primary interest we will derive an equation that
tells how the velocity error e = vr − v depends on the slope of the road.
Assuming that vr is constant we find that

dv de d2 v d2 e
=− , = −
dt dt dt2 dt2
It is convenient to differentiate (4.3) to avoid dealing both with integrals
and derivatives. Differentiating the process model (4.2) the term du/ dt

165
Chapter 4. Simple Control Systems

can be eliminated and we find the following equation that describes the
closed loop system

d2 e de dθ
2
+ (0.02 + k) + ki e = 10 (4.4)
dt dt dt

We can first observe that if θ and e are constant the error is zero. This
is no surprise since the controller has integral action, see the discussion
about the integral action Section 2.2.
To understand the effects of the controller parameters k and ki we
can make an analogy between (4.4) and the differential equation for a
mass-spring-damper system

d2 x dx
M 2
+D + Kx = 0
dt dt

We can thus conclude that parameter k influences damping and that ki


influences stiffness.
The closed loop system (4.4) is of second order and it has the charac-
teristic polynomial
s2 + (0.02 + k)s + ki (4.5)
We can immediately conclude that the roots of this polynomial can be
given arbitrary values by choosing the controller parameters properly. To
find reasonable values we compare the characteristic polynomial with the
characteristic polynomial of the normalized second order polynomial

s2 + 2ζ ω 0 s + ω 02 (4.6)

where ζ denotes relative damping and ω 0 is the undamped natural fre-


quency. The parameter ω 0 gives response speed, and ζ determines the
shape of the response. Comparing the coefficients of the closed loop charac-
teristic polynomial (4.5) with the standard second order polynomial (4.6)
we find that the controller parameters are given by

k = 2ζ ω 0 − 0.02
(4.7)
ki = ω 02

Since it is desirable that a cruise control system should respond to changes


in the slope in a smooth manner without oscillations it is natural to choose
ζ = 1, which corresponds to critical damping. Then there is only one pa-
rameter ω 0 that has to be determined. The selection of this parameter is
a compromise between response speed and control actions. This is illus-
trated in Figure 4.3 which shows the velocity error and the control signal

166
4.2 Cruise Control

2.5

Velocity error
2

1.5

0.5

0
0 10 20 30 40 50 60 70 80 90 100
Time

0.5

0.4
Control signal

0.3

0.2

0.1

0
0 10 20 30 40 50 60 70 80 90 100
Time

Figure 4.3 Simulation of a car with cruise control for a step change in the slope of
the road. The controllers are designed with relative damping ζ = 1 and ω 0 = 0.05
(dotted), ω 0 = 0.1 (full) and ω 0 = 0.2 (dashed).

for a simulation where the slope of the road suddenly changes by 4%. No-
tice that the largest velocity error decreases with increasing ω 0 , but also
that the control signal increases more rapidly. In the simple model (4.1)
it was assumed that the force responded instantaneously to the throttle.
For rapid changes there may be additional dynamics that has to be ac-
counted for. There are also physical limitations to the rate of change of the
force. These limitations, which are not accounted for in the simple model
(4.1), limit the admissible value of ω 0 . Figure 4.3 shows the velocity error
and the control signal for a few values of ω 0 . The largest velocity error de-
creases with increasing values of ω 0 . The smaller error is obtained caused
by a more rapid change in the control signal. A reasonable choice of ω 0 is
in the range of 0.1 to 0.2. The performance of the cruise control system
can be evaluated by comparing the behaviors of cars with and without
cruise control. This is done in Figure 4.4 which shows the velocity error
when the slope of the road is suddenly increased by 4%. Notice the drastic
difference between the open and closed loop systems.
With the chosen parameters ω 0 = 0.2 and ζ = 1 we have 2ζ ω 0 = 0.2
and it follows from (4.7) that the parameter c = 0.02 has little influence
on the behavior of the closed loop system since it is an order of mag-

167
Chapter 4. Simple Control Systems

20

Velocity error
15

10

0
0 10 20 30 40 50 60 70 80 90 100
Time

Figure 4.4 Simulation of a car with (solid line) and without cruise control (dashed
line) for a step change of 4% in the slope of the road. The controller is designed for
ω 0 = 0.1 and ζ = 1.

nitude smaller than 2ζ ω 0 . Therefore it is not necessary to have a very


precise value of this parameter. This is an illustration of an important
and surprising property of feedback, namely that feedback systems can
be designed based on simplified models. This will be discussed extensively
in Chapter 5.
A cruise control system contains much more than an implementation
of the PI controller given by (4.3). The human-machine interface is par-
ticularly important because the driver must be able to activate and deac-
tivate the system and to change the desired velocity. There is also logic
for deactivating the system when braking, accelerating or shifting gear.

4.3 Control of First Order Systems


We will now develop a systematic procedure for finding controllers for
simple systems. To do this we will be using the formalism based on Laplace
transforms and transfer functions which is developed in Section 3.4. This
simplifies the calculations required substantially. In this section we will
consider systems whose dynamics are of first order differential equations.
Many systems can be approximately described by such equations. The
approximation is reasonable if the storage of mass, momentum and energy
can be captured by one state variable. Typical examples are
• Velocity of car on the road
• Control of velocity of rotating system
• Electric systems where energy is essentially stored in one component
• Incompressible fluid flow in a pipe

168
4.3 Control of First Order Systems

4
y 3

0
0 2 4 6 8 10 12

Figure 4.5 Result of a step test experiment. The curve is the response to a unit
step. The gain K is the steady state output and the time constant T is the time
required to reach 63% of the steady state value.

• Level control of a tank


• Pressure control in a gas tank
• Temperature in a body with essentially uniform temperature distri-
bution e.g., a vessel filled with a mixture of steam and water.

Transfer Functions from Experiments


A linear time invariant system of first order can be described by the trans-
fer function
K b
P ( s) = = (4.8)
1 + sT s+a
The system thus has two parameters the gain K and the time constant
T, or alternatively a = 1/ T and b = K / T. These parameters can be
determined from physical consideration or from a step response test on
the system. Such an experiment is carried out in the following way.
• Set the control signal to a constant value. Wait for the system to
settle in steady state.
• Change the control signal suddenly to a new value.
• Record the output, subtract the original steady state value and di-
vide with the change of the control signal. This normalizes the re-
sponse to a unit step.
This procedure which gives a response of the type shown in Figure 4.5 is
called a step test or a bump test. The unit step response of the system
(4.8) is given by  
y(t) = K 1 − e−t/T

169
Chapter 4. Simple Control Systems

r e u y
Σ C ( s) Σ P ( s)

−1

Figure 4.6 Block diagram of a first order system with a PI controller.

Since y(∞) = K we find that the gain K can be determined from the
steady state value of the output. It also follows from the above equation
that
y(T ) = (1 − e−1 ) K = 0.63K
The time constant T is thus the time required for the step response to
reach 63% of its steady state value. Having obtained the gain K and
the time constant T the parameters a and b are given by a = 1/ T and
b = K / T.
By repeating the step test for different amplitudes of the input we can
also obtain an assessment of the validity of the linear model. We can thus
conclude that it is relatively easy to obtain a first order model (4.8) by a
step test and also to verify that the model is reasonable.

PI Control
We will now discuss control of a system with the transfer function (4.8).
A block diagram of the closed loop system obtained with error feedback is
shown in Figure 4.6. A PI controller is well suited for a system described
by (4.8). The PI controller is simple, since it has integral action there will
be no steady state error and with proper choices of parameters the closed
loop system will also be relatively insensitive to the model parameters.
the PI controller has the transfer function

ki
C ( s) = k + (4.9)
s

The loop transfer function of the system is

kbs + ki b n L ( s)
L( s ) = P ( s ) C ( s ) = = (4.10)
s(s + a) d L ( s)

170
4.3 Control of First Order Systems

The transfer function of the closed system from reference r to output y is


given by

P ( s) C ( s) n L ( s) b( ks + ki )
G yr (s) = = = 2
1 + P ( s) C ( s) d L ( s) + n L ( s) s + (a + bk)s + bki

The closed loop system is of second order and its characteristic polynomial
is
dL (s) + n L (s) = s2 + (a + bk)s + bki . (4.11)
The poles of the closed loop system can be given arbitrary values by choos-
ing the parameters k and ki properly. Intuition about the effects of the
parameters can be obtained from the mass-spring-damper analogy as was
done in Section 4.2 and we find that integral gain ki corresponds to stiff-
ness and that proportional gain k corresponds to damping.
It is convenient to re-parameterize the problem so that the character-
istic polynomial becomes

s2 + 2ζ ω 0 s + ω 02 (4.12)

Identifying the coefficients of s in the polynomials (6.4) and (6.10) we find


that the controller parameters are given by

2ζ ω 0 − a 2ζ ω 0 T − 1
k= =
b K
(4.13)
ω 02 ω 02 T
ki = =
b K

Since the design method is based on choosing the poles of the closed
loop system it is called pole placement. Instead of choosing the controller
parameters k and ki we now select ζ and ω 0 . These parameters have a
good physical interpretation. The parameter ω 0 determines the speed of
response and ζ determines the shape of the response.
If the parameters ω 0 and ζ are known the controller parameters are
given by (6.11). We will now discuss how to choose these parameters to
obtain desired properties of the system. To do this we must develop an
understanding of the responses of systems of second order.

Behavior of Second Order Systems


We will first consider a second order system with the transfer function

ω 02
G ( s) = . (4.14)
s2 + 2ζ ω 0 s + ω 02

171
Chapter 4. Simple Control Systems

1.5
h

0.5

0
0 5 10 15
ω0t

Figure 4.7 Step responses h for the system (4.14) with the transfer function
ω 02
G ( s) = for ζ = 0 (dotted), 0.1, 0.2, 0.5, 0.707 (dash dotted), 1, 2, 5 and
s2 +2ζ ω 0 s+ω 02
10 (dashed).

This is a normalized transfer function of a second order system without


zeros. The step responses of systems with different values of ζ are shown
in Figure 4.7 The figure shows that parameter ω 0 essentially gives a time
scaling. The response is faster if ω 0 is larger. The shape of the response
is determined by ζ . The step responses have an overshoot of
( √ 2
e−π ζ / 1−ζ for hζ h < 1
M= (4.15)
1 forζ ≥ 1

For ζ < 1 the maximum overshoot occurs at


π
tmax = (4.16)
ω0 1 − ζ 2
p

There is always an overshoot if ζ < 1. The maximum decreases and is


shifted to the right when ζ increases and it becomes infinite for ζ = 1
when the overshoot disappears. In most cases it is desirable to have a
moderate overshoot which means that the parameter ζ should be in the
range of 0.5 to 1. The value ζ = 1 gives no overshoot.

Behavior of Second Order Systems with Zeros


We will now consider a system with the transfer function

ω0 s + βω 0
G ( s) = (4.17)
β s + 2ζ ω 0 s + ω 02
2

Notice that the transfer function has been parameterized so that the
steady state gain G (0) is one. Step responses for this transfer function for

172
4.3 Control of First Order Systems

2.5

2
h

1.5

0.5

0
0 1 2 3 4 5 6 7 8 9 10

1.5

0.5

0
h

−0.5

−1

−1.5

−2
0 1 2 3 4 5 6 7 8 9 10
ω0t

Figure 4.8 Step responses h for the system (4.14) with the transfer function
ω 0 (s+βω 0 )
G ( s) = 2 2 for ω 0 = 1 and ζ = 0.5. The values for β = 0.25 (dotted), 0.5
β (s +2ζ ω 0 s+ω 0 )
1, 2, 5 and 10 (dashed), are shown in the upper plot and β = −0.25, -0.5 -1, -2, -5
and -10 (dashed) in the lower plot.

different values of β are shown in Figure 4.8. The figure shows that the
zero introduces overshoot for positive β and an undershoot for negative
β . Notice that the effect of β is most pronounced if β is small. The effect
of the zero is small if hβ h > 5. The behavior shown in the figures can be
understood analytically. The transfer function G (s) given by (4.17) can be
written as
ω0 s + βω 0 ω 02 1 sω 0
G ( s) = = +
β s2 + 2ζ ω 0 s + ω 02 s2 + 2ζ ω 0 s + ω 02 β s2 + 2ζ ω 0 s + ω 02
(4.18)
Let h0 (t) be the step response of the transfer function
ω 02
G 0 ( s) =
s2 + 2ζ ω 0 s + ω 02
It follows from (4.18) that the step response of G (s) is
1 dh0 (t)
h(t) = h0 (t) + (4.19)
βω 0 dt

173
Chapter 4. Simple Control Systems

It follows from this equation that all step responses for different values of
β go through the point where dh0 /dt is zero. The overshoot will increase
for positive β and decrease for negative β . It also follows that the effect
of the zero is small if hβ h is large. The largest magnitude of dh/ dt is ap-
proximately 0.4ω 0 /2.7, which implies that the largest value of the second
term is approximately 0.4/ β . The term is thus less than 8% if hβ h is larger
than 5.
Notice in Figure 4.8 that the step response goes in the wrong direction
initially when β is negative. This phenomena is called inverse response,
can also be seen from (4.19). When β is negative the transfer function
(4.17) has a zero in the right half plane. Such systems are difficult to
control and they are called non-minimum phase system, see Section 3.5.
Several physical systems have this property, for example level dynamics
in steam generators (Example 3.22), hydro-electric power stations (Ex-
ample 3.21), pitch dynamics of an aircraft (Example 3.23) and vehicles
with rear wheel steering.

Return to PI Control - The Servo Problem


Having developed insight into the behavior of second order systems with
zeros we will return to the problem of PI control of first order systems.
We will discuss selection of controller parameters for the servo problem
where the main concern is that the output should follow the reference
signal well. The loop transfer function of the system is given by (4.10)
and the transfer function from reference r to output y is

P ( s) C ( s) n L ( s) bks + bki
G yr = = = 2
1 + P ( s) C ( s) n D ( s) + n L ( s) s + (a + bk)s + bki

Choosing control parameters to give the characteristic polynomial (6.10)


we find as before that the controller parameters are given by (6.11). The
transfer function then becomes

bks + bki (2ζ ω 0 − a)s + ω 02


G yr (s) = = (4.20)
s2 + (a + bk)s + bki s2 + 2ζ ω 0 s + ω 02

The parameter ω 0 determines the response speed of the system. It follows


from (6.11) that controller gain is negative if, ω 0 < a/2ζ = 1/2ζ T. This
is a severe disadvantage as will be discussed in Section XXX. The trans-
fer function G yr then has a zero in the right half plane which is highly
desirable. There may also be difficulties in choosing too high values of
ω 0 because the model (6.11) may not be accurate for high frequencies. A
reasonable range could be 1 < ω 0 T < 10. These issues will be discussed
in detail in Section XXX.

174
4.3 Control of First Order Systems

1.4

1.2

0.8
y

0.6

0.4

0.2

0
0 1 2 3 4 5 6 7 8 9 10
t/ T

Figure 4.9 Step responses of the closed loop system with ζ = 0.5 and ω 0 T = 1
(dotted), 2, 5 and 10 (dash-dotted). The step response of the open loop system is
shown in dashed lines.

Reasonable values of the parameter ζ are in the range 0.5 < ζ < 1.
The lower values gives a more oscillatory response and ζ = 1 corresponds
to critical damping, compare with Figure 4.7. The overshoot will be ex-
aggerated because of the zero in the numerator of the transfer function
(4.20). Compare with Figure 4.8 which shows the effect of the zero on the
step respoonse. The zero vanishes if 2ζ ω 0 = a as ω 0 increases towards
infinity the zero moves from −∞ to −ω 0 /2ζ . A comparison of the trans-
fer function (4.20) with the standard form of a second order system with
zeros (4.17) gives
ω0 ω 0T
β= =
2ζ ω 0 − a 2ζ ω 0 T − 1

For large values of ω 0 T we have β = 0.5/ζ . With 0.5 ≤ ζ ≤ 1 the param-


eter β is in the range of 1 to 2. Comparing with Figure 4.8 shows that the
overshoot may be significant. There is, however, a simple modification of
the controller that reduces the overshoot.
Figure 4.9 shows the step responses of systems with different values of
the design parameter ω 0 . The figure shows that the step responses have
an overshoot around 25%. The figure also shows that the response speed
increases with increasing values of ω 0 T. The step response of the open
loop system is also shown in the figure. The curve for ω 0 T = 10 indicates
that for such large values of ω 0 it is necessary that the step response of
the process is known accurately for small times.

Avoiding the Overshoot - Systems with two degrees of freedom


The controller used in Figure 4.6 is based on error feedback. The control

175
Chapter 4. Simple Control Systems

signal is related to the reference and the output in the following way
Z t
u(t) = k(r(t) − y(t)) + ki (r(τ ) − y(τ ))dτ (4.21)
0

The reason for the overshoot is that the controller reacts quite violently
on a step change in the reference. By changing the controller to
Z t
u(t) = − ky(t) + ki (r(τ ) − y(τ ))dτ (4.22)
0

we obtain a controller that is reacting much less violent to changes in the


reference signal. Taking Laplace transforms of this controller we get

ki
U (s) = − kY (s) + ( R(s) − Y (s)) (4.23)
s
Combining this equation with the equation (4.8) which describes the pro-
cess we find that

bki ω 02
Y ( s) = R( s ) = 2 R( s ) (4.24)
s2 + (a + bk)s + bki s + 2ζ ω 0 s + ω 02

and we obtain a transfer function from reference r to output y which does


not have a zero, compare with (4.17).
The controller given by (4.21) is said to have error feedback because
all control actions are based on the error e = r − y. The controller given by
(4.22) is said to have two degrees of freedom (2DOF) because the signal
path from reference r to control u is different from the signal path from
output y to control u. Figure 4.10 shows block diagrams of the systems.
The transfer function (4.24) is the standard transfer function for a second
order system without zeros, its step responses are shown in Figure 4.7.
Notice that the reduction of the overshoot makes the response slower.

The Regulation Problem


It will now be investigated how the parameters ω 0 and ζ should be chosen
for the regulation problem. In this problem the main concern is reduction
of load disturbances. Consider the system in Figure 4.6, the transfer func-
tion from load disturbance d to output y is

P ( s) s
G yd (s) = = 2
1 + P ( s) C ( s) s + (a + bk)s + bki
bs b ω 0s
= 2 =
s + 2ζ ω 0 s + ω 02 ω 0 s2 + 2ζ ω 0 s + ω 02

176
4.3 Control of First Order Systems

r e u y
Σ C ( s) P ( s)

−1

r e u y
Σ ki
s
Σ P

−1

Figure 4.10 Block diagrams of a system with a conventional PI controller (above)


and a PI controller having two degrees of freedom (below).

0
10

−2
10

−4
10
−3 −2 −1 0 1 2 3
10 10 10 10 10 10 10

Figure 4.11 Gain curves for the transfer function from load disturbance to process
output for b = 1, ζ = 1 and ω 0 = 0.2 dotted, ω 0 = 1.0, dashed and ω 0 = 5 full.

We will first consider the effect of parameter ω 0 . Figure 4.11 shows the
gain curves of the Bode diagram for different values of ω 0 . The figure
shows that disturbances of high and low frequencies are reduced sig-
nificantly and that the disturbance reduction is smallest for frequencies
around ω 0 , they may actually be amplified. The figure also shows that
the disturbance rejection at low frequencies is drastically influenced by
the parameter ω 0 but that the reduction of high frequency disturbances
is virtually independent of ω 0 . It is easy to make analytical estimates
because we have
bs s
G yd (s)  2 =
ω0 bki
for small s, where the second equality follows from (6.11). It follows from

177
Chapter 4. Simple Control Systems

this equation that it is highly desirable to have a large value of ω 0 . A


large value of ω 0 means that the control signal has to change rapidly. The
largest permissible value of ω 0 is typically determined by how quickly the
control signal can be changed, dynamics that was neglected in the simple
model (4.8) and possible saturations. The integrated error for a unit step
disturbance in the load disturbance is

1 1
Z ∞
b
IE = e(t)dt = lim E(s) = lim G yd = 2 =
0 s→ 0 s→0 s ω 0 bk i

The largest value of h G yd (iω )h is

b
max h G yd (iω )h = h G yd (iω 0 )h =
2ζ ω 0

The closed loop system obtained with PI control of a first order system
is of second order. Before proceeding we will investigate the behavior of
second order systems.

4.4 Control of Second Order Systems


The procedure used to design a PI controller for a first order system in
Section 6.4 can be described as follows:
1. Develop a linearized process model.
2. Develop a linearized process model.
3. Derive the closed loop characteristic polynomial.
4. Determine the controller parameters which gives a specified charac-
teristic polynomial.
5. Modify the controller by using a configuration with two degrees of
freedom to modify the response to reference signals.
This design method is called pole placement because if controller param-
eters are adjusted to give a closed loop system with specified poles. A
nice property was that step 4 gave linear equations. It turns out that this
design procedure can be generalized to systems of arbitrary high order
and that the equations obtained in step 4 are still linear. Pole placement
is a nice simple design method, it is easy to use for low order systems
and it gives good insight into the design problem. The selection of good
closed loop poles is an important issue, bad choices give systems with poor
robustness. This problem will be discussed in depth in Chapter 5.

178
4.4 Control of Second Order Systems

The pole placement problem will be solved for systems of arbitrary


high order in Section 4.5. In this section we will discuss control of sys-
tems of second order. Such models are reasonable if the storage of mass,
momentum and energy can be captured by two state variables. Typical
examples are
• Position of car on the road
• Motion control systems
• Stabilization of satellites
• Electric systems where energy is stored in two elements
• Levels in two connected tanks
• Pressure in two connected vessels
• Simple bicycle models
The general transfer function for a process of second order is

b1 s + b2
P ( s) = (4.25)
s2 + a1 s + a2

Pole placement design will now be applied to derive PD, PI and PID
controllers for this process.

PD control
We will start by investigating PD control of the process (4.25). A PD
controller with error feedback has the transfer function

C (s) = k + kd s

The loop transfer function is

(b1 s + b2 )( kd s + k) n L ( s)
L( s ) = P ( s ) C ( s ) = 2
=
s + a1 s + a2 d L ( s)

The closed loop characteristic polynomial is

n L (s) + dL (s) = (b1 s + b2 )( kd s + k) + s2 + a1 s + a2


= (1 + b1 k − d)s2 + (b1 k + b2 kd + a1 )s + b1 kd + a2

Requiring that this polynomial has the same roots as the standard second
order polynomial
s2 + 2ζ ω 0 s + ω 02

179
Chapter 4. Simple Control Systems

we get the following equations

a1 + b1 k + b2 kd = (1 + b1 k − d)2ζ ω 0
a2 + b2 k = (1 + b1 k − d)ω 02

This linear equation has a solution if the polynomials b1 s + b2 and s2 +


2ζ ω 0 s + ω 02 do not have common factors. The solution is

b1ω 02 (2ζ ω 0 − a1 ) + (b2 − 2ζ ω 0 b1 )(ω 02 − a2 )


k=
b22 − 2ζ ω 0 b1 b2 + b21ω 02
(4.26)
b1 (ω 02 − a2 ) + b2 (2ζ ω 0 − a1 )
kd =
b22 − 2ζ ω 0 b1 b2 + b21ω 02

The closed loop transfer function from reference to output becomes

PC (b1 s + b2 )( kd s + k)
G yr (s) = = 2
1 + PC s + 2ζ ω 0 s + ω 02

Notice that there will be a steady state error unless a2 = 0. The steady
state error is small if ha2 h << ω 02 . Also notice that the numerator has
two zeros, one is equal to the process zero s = −b2 / b1 the other at s =
− k/ kd is caused by the controller. The zero caused by the controller can
be eliminated if the controller based on error feedback can be replaced
with the controller

U (s) = k( R(s) − Y (s)) − kd sY (s) (4.27)

which has two degrees of freedom. The transfer function from reference
to output for the closed loop system then becomes

k(b1 s + b2 )
G yr (s) =
s2 + 2ζ ω 0 s + ω 02

Notice that this transfer function does not have a zero s = − k/ kd . Block
diagrams for the system with error feedback and with two degrees of
freedom are shown in Figure 4.12.

PI Control of Second Order Systems


Next we will investigate what can be achieved with PI control of the
process given by (4.25). Let the PI controller have the transfer function

ki ks + ki
C ( s) = k + =
s s

180
4.4 Control of Second Order Systems

r e u y
Σ k + kd s P

−1

r e u y
Σ k Σ P

kd s

−1

Figure 4.12 Block diagrams of system with PD control based on error feedback
(above) and with a PD controller with two degrees of freedom (below). Compare
with Figure 4.10.

The loop transfer function becomes

( ks + ki )(b1 s + b2 ) n L ( s)
L( s ) = P ( s ) C ( s ) = 3 2
=
s + a1 s + a2 s d L ( s)

The characteristic polynomial is

n L (s) + dL (s) = s3 + (a1 + kb1 )s2 + (a2 + kb2 + ki b1 )s + b2 ki

Identifying the coefficients of this equation with the desired characteristic


polynomial

(s2 + 2ζ 0ω 0 s + ω 02 )(s + α 0 ) = s3 + (α 0 + 2ζ 0ω 0 )s2 + (ω 02 + 2α 0ζ 0ω 0 )s + α 0ω 02


(4.28)
we obtain

a1 + b1 k = α 0 + 2ζ 0ω 0
a2 + b1 ki + b2 k = ω 02 + 2α 0ζ 0ω 0
b2 ki = α 0ω 02

Since there are three equations and only two unknowns the problem can-
not be solved in general. To have a solution we can let α 0 or ω 0 be free

181
Chapter 4. Simple Control Systems

parameters. If b1 = 0 and b2 = 0 the equation has the solution


a1
ω0 =
α 0 + 2ζ 0
(1 + 2α 0ζ 0 )ω 02 − a2
k= (4.29)
b2
α 0ω 03
ki =
b2

The parameter ω 0 which determines the response time is thus uniquely


given by the process dynamics. When b1 = 0 the parameter ω 0 is instead
the real solution to the equation

α 0 b21ω 03 − (1 + 2α 0ζ 0 )b1 b2ω 02 + (α 0 + 2ζ 0 )b22ω 0 + a2 b1 b2 − a1 b22 = 0.

and the controller parameters are given by

(α 0 + 2ζ 0 )ω 0 − a1
k=
b1
α 0ω 03
ki =
b2

In both cases we find that with PI control of a second order system there
is only one choice of ω 0 that is possible. The performance of the closed
loop system is thus severely restricted when a PI controller is used.

PID Control
Assume that the process is characterized by the second-order model

b1 s + b2
P ( s) = (4.30)
s2 + a1 s + a2

This model has four parameters. It has two poles that may be real or com-
plex, and it has one zero. This model captures many processes, oscillatory
systems, and systems with right half-plane zeros. The right half-plane
zero can also be used as an approximation of a time delay. Let controller
be
ki
U (s) = k(bR(s) − Y (s)) + ( R(s) − Y (s)) + kd s(cR(s) − Y (s))
s
The loop transfer function is

( kd s2 + ks + ki )(b1 s + b2 ) n L ( s)
L( s ) = 2
=
s(s + a1 s + a2 ) d L ( s)

182
4.4 Control of Second Order Systems

The closed-loop system is of third order with the characteristic polynomial

dL (s) + n L (s) = s(s2 + a1 s + a2 ) + (b1 s + b2 )( kd s2 + ks + ki )


= (1 + b1 k)s3 + (a1 + b1 k + b2 kd )s2 + (a2 + b1 ki + b2 k)s + b2 ki
 a1 + b1 k + b2 kd 2 a2 + b1 ki + b2 k b2 ki 
= (1 + b1 k) s3 + s + s+
1 + b1 k 1 + b1 k 1 + b1 k

A suitable closed-loop characteristic equation of a third-order system is

(s + αω 0 )(s2 + 2ζ 0ω 0 s + ω 02 )

Equating coefficients of equal power in s in this polynomial with the nor-


malized characteristic polynomial gives

a1 + b2 kd + b1 k
= (α + 2ζ 0 )ω 0
1 + b1 kd
a2 + b2 k + b1 ki
= (1 + 2αζ 0 )ω 02
1 + b1 kd
b2 ki
= αω 03
1 + b1 kd

This is a set of linear equations in the controller parameters. The solution


is straightforward but tedious and is given by

−a2 b22 + a2 b1 b2 (α + 2ζ 0 )ω 0 + (b2 − a1 b1 )(b2 (1 + 2αζ 0 )ω 02 − α b1ω 03 )


k=
b32 − b1 b22 (α + 2ζ 0 )ω 0 + b21 b2 (1 + 2αζ 0 )ω 02 − α b31ω 03

(−a1 b1 b2 + a2 b21 + b22 )αω 03


ki =
b32 − b1 b22 (α + 2ζ 0 )ω 0 + b21 b2 (1 + 2αζ 0 )ω 02 − α b31ω 03

−a1 b22 + a2 b1 b2 + b22 (α + 2ζ 0 )ω 0 − b1 b2ω 02 (1 + 2αζ 0 ) + b21αω 03


kd =
b32 − b1 b22 (α + 2ζ 0 )ω 0 + b21 b2 (1 + 2αζ 0 )ω 02 − α b31ω 03
(4.31)
The transfer function from set point to process output is

(b1 s + b2 )(ckd s2 + bks + ki )


G yr (s) =
(s + αω 0 )(s2 + 2ζ 0ω 0 s + ω 02 )

The parameters b and c have a strong influence on shape of the transient


response of this transfer function.
The transfer function from load disturbance to process output is

b1 s2 + b2 s
G yd =
(s + αω 0 )(s2 + 2ζ 0ω 0 s + ω 02 )

183
Chapter 4. Simple Control Systems

These formulas are useful because many processes can be approximately


described by the transfer function (4.25). We illustrate this with an ex-
ample.

EXAMPLE 4.1—OSCILLATORY SYSTEM WITH RHP ZERO


Consider a system with the transfer function

1−s
P ( s) =
s2 + 1

This system has one right half-plane zero and two undamped complex
poles. This makes the system difficult to control. Attempting a pole place-
ment design which gives the closed loop characteristic polynomial

s3 + 2s2 + 2s + 1.

(4.31) gives a PID controller with the parameters k = 0, ki = 1/3, and


kd = 2/3. Notice that the proportional gain is zero.
We will give an example that illustrates that there are situations where
a PID controller can be much better than a PI controller.

EXAMPLE 4.2—PID CAN BE MUCH BETTER THAN PI


Consider a process described by

kv
P ( s) = e−sTd (4.32)
s(1 + sT )

where the time delay Td is much smaller than the time constant T. Since
the time delay Td is small we neglect it and base the design on the second
order model
kv
P ( s)  (4.33)
s(1 + sT )
A PI controller for this system can be obtained from Equation (4.29) and
we find that a closed loop system with the characteristic polynomial (4.28)
can be obtained by choosing the parameter ω 0 equal to 1/(α + 2ζ 0 )T. Since
Td << T it follows that ω 0 Td << 1 and the approximation is reasonable.
For a process governed by (4.33) we can find a PID controller that
gives the closed loop characteristic polynomial with arbitrarily large val-
ues of ω 0 . Since the real system is described by (4.32) the parameter ω 0
must be chosen so that the approximation (4.33) is valid. This requires
that the product ω 0 Td is not too large. It can be demonstrated that the
approximation is reasonable if ω 0 Td is smaller than 0.2.

184
4.5 Control of Systems of High Order*

Summarizing we find that it is possible to obtain the characteristic


polynomial (4.28) with both PI and PID control. With PI control the pa-
rameter ω 0 must be chosen as 1/(α + 2ζ 0 )T. With PID control the pa-
rameter instead can be chosen so that the product ω 0 Td < 1 is small, e.g.
0.2 or less. With PI control the response speed is thus determined by T
and with PID control it is determined by Td . The differences can be very
significant. Assume for example that T = 100, Td = 1, α = 1 and ζ = 0.5.
Then we find that with ω 0 = 0.005 with PI control and ω 0 = 0.1 with
PID control. This corresponds to a factor of 200 in response time. This
will also be reflected in a much better disturbance attenuation with PID
control.

4.5 Control of Systems of High Order*

The method for control design used in the previous sections can be charac-
terized in the following way. Choose a controller of given complexity, PD,
PI or PID and determine the controller parameters so that the closed loop
characteristic polynomial is equal to a specified polynomial. This tech-
nique is called pole placement because the design is focused on achieving
a closed loop system with specified poles. The zeros of the transfer func-
tion from reference to output can to some extent be influenced by choos-
ing a controller with two degrees of freedom. We also observed that the
complexity of the controller reflected the complexity of the process. A PI
controller is sufficient for a first order system but a PID controller was
useful for a second order system. Choosing a controller of too low order
imposed restrictions on the achievable closed loop poles. In this section
we will generalize the results to systems of arbitrary order. This section
also requires more mathematical preparation than the rest of the book.
Consider a system given by the block diagram in Figure 4.6. Let the
process have the transfer function

b(s) b1 sn−1 + b2 sn−2 + . . . + bn


Y ( s) = ( U (s) + D (s)) = ( U (s) + D (s))
a(s) sn + a1 sn−1 + . . . + an
(4.34)
where a(s) and b(s) are polynomials. A general controller can be described
by
f (s) U (s) = −g(s) Y (s) + h(s) R(s) (4.35)
where f (s), g(s) and h(s) are polynomials. The controller given by (4.35) is
a general controller with two degrees of freedom. The transfer function
from measurement signal y to control signal u is −g(s)/ f (s) and the
transfer function from reference signal r to control signal u is h(s)/ f (s).

185
Chapter 4. Simple Control Systems

For a system with error feedback we have g(s) = h(s). Elimination of


U (s) between Equations (4.34) and (4.35) gives

(4.36)

a(s) f (s) + b(s)g(s) Y (s) = b(s)h(s) R(s) + b(s) f (s) D (s)

The closed loop has the characteristic polynomial

c(s) = a(s) f (s) + b(s)g(s) (4.37)

Notice that this only depends on the polynomials f (s) and g(s). The design
problem can be stated as follows: Given the polynomials a(s), b(s) and c(s)
find the polynomials f (s) and g(s) which satisfies (4.37). This is a well
known mathematical problem. It will be shown in the next section that
the equation always has a solution if the polynomials a(s) and b(s) do not
have any common factors. If one solution exists there are also infinitely
many solutions. This is useful because it makes it possible to introduce
additional constraints. We may for example require that the controller
should have integral action.

A Naive Solution
To obtain the solution to the design problem the equation (4.37) must be
solved. A simple direct way of doing this is to introduce polynomials f
and g with arbitrary coefficients, writing equating coefficients of equal
powers of s, and solving the equations. This procedure is illustrated by
an example.

EXAMPLE 4.3—GENERAL POLE PLACEMENT


Consider a process with the transfer function

1
P ( s) =
(s + 1)2

Find a controller that gives a closed loop system with the characteristic
polynomial
(s2 + as + a2 )(s + a)
(4.37) becomes

(s + 1)2 f + g = (s2 + as + a2 )(s + a) = s3 + 2as2 + 2a2 s + a3

One solution is

f =1
g = s3 + (2a − 1)s2 + (2a2 − 2)s + a3 − 1

186
4.5 Control of Systems of High Order*

but there are also other solutions e.g.

f = s + 2a − 2
g = (2a2 − 4a + 3)s + a3 − 2a + 2

The Diophantine Equation


The naive solution of (4.37) hides many interesting aspects of the prob-
lem. The equation (4.37) is a classical equation which has been studied
extensively in mathematics. To discuss this equation we will use more
mathematics than in most parts of the book. We will also change to a
more formal style of presentation. This is a nice illustration of the fact
that control is a field where many branches of mathematics are useful.
We will start by observing that polynomials belong to a mathematical
object called a ring. This means that they can be multiplied and added,
and that there are units: the zero polynomial for addition and the polyno-
mial 1 for multiplication. Division of polynomials does not always give a
polynomial, but quotient and remainders are defined. Integers is another
other objects that also is a ring. To develop some insight we will first
explore two examples.

EXAMPLE 4.4—AN EQUATION IN INTEGERS


Consider the following equation

3x + 2 y = 1,

where x and y are integers. By inspection we find that x = 1 and y = −1


is a solution. We also find that if we have a solution other solutions can
be obtained by adding 2 to x and subtracting 3 from y. The equation thus
has infinitely many solutions.

EXAMPLE 4.5—AN EQUATION IN INTEGERS


Consider the equation
6x + 4 y = 1,

where x and y are integers. This equation cannot have a solution because
the left hand side is an even number and the right hand side is an odd
number.

187
Chapter 4. Simple Control Systems

EXAMPLE 4.6—AN EQUATION IN INTEGERS


Consider the equation
6x + 4 y = 2,
where x and y are integers. Dividing the right hand side by 2 we obtain
the equation in Example 4.4
These examples tell most about the (4.37) when a, b, f , g and c belong
to a ring. To be precise we have the following result.

THEOREM 4.1—EUCLID’S ALGORITHM


Let a, b, and c be polynomials with real coefficients. Then the equation

ax + by = c (4.38)

has a solution if and only if the greatest common factor of a and b divides
c. If the equation has a solution x0 and y0 then x = x0 − bn and y = y0 + an,
where n is an arbitrary polynomial, is also a solution.

PROOF 4.1
We will first determine the largest common divisor of the polynomials a
and b by a recursive procedure. Assume that the degree of a is greater
than or equal to the degree of b. Let a0 = a and b0 = b. Iterate the
equations

an+1 = bn
bn+1 = an mod bn

until bn+1 = 0. The greatest common divisor is then bn . If a and b are


co-prime we have bn = 1. Backtracking we find that

ax + by = bn

where the polynomials x and y can be found by keeping track of the


quotients and the remainders in the iterations. When a and b are co-
prime we have
ax + by = 1
and the result is obtained by multiplying x and y by c. When a and b have
a common factor it must be required that the largest common divisor of a
and b is also a factor of c. Dividing the equation with this divisor we are
back to the case when a and b are co-prime.
Since the proof has only used addition, multiplication, quotients and re-
mainders it follows that the results holds for any ring.

188
4.5 Control of Systems of High Order*

An Algorithm
The following is a convenient way of organizing the recursive computa-
tions. With this method we also obtain the minimum degree solution to
the homogeneous equation.

ax + by = 1
(4.39)
au + bv = 0

where g is the greatest common divisor of a and b and u and v are the
minimal degree solutions to the homogeneous equation These equations
can be written as
x ya 1 0 1 x y
    
=

     
b 0 1 0 u v
    
u v

The solution to Equation (4.39) can be obtained by transforming the ma-


trix
a 1 0
 
A0 = 

 
b 0 1

by row operations to a matrix where the 21 element is zero. This can be


done recursively as follows. Assume that deg a is greater than or equal
to deg b, exchange the rows if this is not the case. Form the following
recursion.  n n n 
n+1
A21 A22 A23
A = n

 

n n n n n n 
r A12 − q A22 A13 − q A23
n+1
where qn = A11n
div An21 and r n = A11
n
div An21 . Proceed until A21 = 0. It
follows from Euclid’s algorithm that A11 is the greatest common divisor
n

of a and b and that a and b are co-prime if A11 n


= 1. The equation (4.38)
then has a solution if A11 is a factor of c.
n

System Theoretic Consequences


The following result is an immediate consequence of Euclid’s algorithm,
Theorem 4.1.

THEOREM 4.2—CONTROLLER PARAMETERIZATION


Consider a system with a rational transfer function P = b/ a. Let C0 =
g0 / f 0 be a controller which gives a closed loop system with the charac-
teristic polynomial c. Then all controllers which give a closed loop system
with the characteristic polynomial c are given by
g0 + qa
C=
f 0 − qb
where q is an arbitrary polynomial.

189
Chapter 4. Simple Control Systems

PROOF 4.2
The loop transfer function obtained with the controller C is

b(g0 + qa)
L = PC =
a( f 0 − qb)

we have
a( f 0 − qb) + b(g0 + qa) a f 0 + bg0 c
1+ L = = =
a( f 0 − qb) a( f 0 − qb) a( f 0 − qb)

which shows that the characteristic polynomial is c. Let C = g/ f be any


controller that gives the characteristic polynomial c. It follows that

a f + bg = c

and it follows from Theorem 4.1 that f = f 0 − bq and g = g0 + aq.


This theorem is useful because it characterizes all controllers that give
specified closed loop poles. Since the theorem tells that there are many
solutions we may ask if there are some solutions that are particularly use-
ful. It is natural to look for simple solutions. It follows from Theorem 4.2
that there is one controller where deg f < deg b, i.e. a controller of lowest
order, and another where deg g < deg a, a controller with highest pole
excess.

Youla-Kučera Parameterization
Theorem 4.2 characterizes all controllers that give a closed loop system
with a given characteristic polynomial. We will now derive a related re-
sult that characterizes all stabilizing controllers. To start with we will
introduce another representation of a transfer function.

DEFINITION 4.1—STABLE RATIONAL FUNCTIONS


Let a(s) be a polynomial with all zeros in the left half plane and b(s)
an arbitrary polynomial. The rational function b(s)/ a(s) is called a stable
rational function.

Stable rational functions are also a ring. This means that Theorem 4.1
also holds for rational functions. A fractional representation of a transfer
function P is
B
P=
A
where A and B are stable rational transfer functions. We have the fol-
lowing result.

190
4.5 Control of Systems of High Order*

v
replacements
Q B Σ −A

1
− G0 Σ P
F0

Figure 4.13 Block diagram that illustrates the Youla-Kučera parameterization


theorem. If C = G0 / F0 stabilizes the system P = B / A, then the controller shown
in the block diagram also stabilizes the system for all stable rational functions Q.

THEOREM 4.3—YOULA-KUČERA REPRESENTATION


Consider a process with the transfer function P = B / A, where A and
B are stable rational functions that are co-prime, let C0 = G0 / F0 be a
fractional representation of a controller that stabilizes P, all stabilizing
controllers are then given by

G0 + Q A
C= (4.40)
F0 − Q B

where Q is an arbitrary stable rational transfer function.

PROOF 4.3
The loop transfer function obtained with the controller C is

B ( G 0 + Q A)
L = PC =
A( F0 − Q B )

we have

A( F0 − Q B ) + B ( G0 + Q A) AF0 + BG0
1+ L = =
A( F0 − Q B ) A( F0 − Q B )

Since the rational function AF0 + BG0 has all its zeros in the left half
plane the closed loop system is stable. Let C = G / F be any controller
that stabilizes the closed loop system it follows that

AF + BG = C

191
Chapter 4. Simple Control Systems

is a stable rational function with all its zeros in the left half plane. Hence

A B
F+ G=1
C C

and it follows from Theorem 4.1 that

B
F = F0 − Q = F0 − B Q̄
C
A
G = G0 − Q = G0 − A Q̄
C

where Q is a stable rational function because C has all its zeros in the
left half plane.
It follows from Equation (4.40) that the control law can be written as

U G G0 + Q A
=− =−
Y F F0 − Q B

or
F0 U = − G0 Y + Q ( BU − AY )
The Youla-Kučera parameterization theorem can then be illustrated by
the block diagram in Figure 4.13. Notice that the signal v is zero. It
therefore seems intuitively reasonable that a feedback based on this signal
cannot make the system unstable.

4.6 Bicycle Dynamics and Control


The bicycle is an ingenious device for recreation and transportation, which
has evolved over a long period of time. It is a very efficient vehicle that is
extremely maneverable. Feedback is essential for understanding how the
bicycle really works. In the bicycle there is no explicit control system with
sensing and actuation, instead control is accomplished by clever mechan-
ical design of the front fork which creates a feedback that under certain
conditions stabilizes the bicycle. It is worth mentioning that the literature
on bicycles is full of mistakes or misleading statements. We quote from
the book Bicycling Science by Whitt and Wilson:
The scientific literature (Timoshenko, Young, DenHartog et. al.) shows
often complete disagreement even about fundamentals. One advocates
that a high center of mass improves stability, another concludes that
a low center of mass is desirable.

192
4.6 Bicycle Dynamics and Control

Figure 4.14 Schematic picture of a bicycle. There are two coordinate systems the
inertial frame x yz and the system ξηζ that is fixed to the bicycle. The coordinates
of the rear wheel are x and y. The orientation of the bicycle is given by yaw angle
ψ , roll angle φ and steer angle δ .

Modeling
When modeling a physical object it is important to keep the purpose of
the model in mind. In this modeling exercise we will derive simple models
that can be used to discuss the basic balancing and steering problmes for
the bicycle. We are primarily interested in the qualitative properties. The
problem of balancing the bicycle will first be investigated, steering will be
discussed later. A detailed model of the bicycle can be quite complicated.
The system has many degrees of freedom and the geometry is complicated.
We will derive simple models that capture the properties of the bicycle that
are relevant for stabilization and steering. To understand how a bicycle
works it is necessary to consider the system consisting of the bicycle and
the rider. The rider can influence the bicycle in two ways, by turning the
handle bar, and by leaning. Several models of increasing complexity will
be discussed. A schematic picture of the bicycle is shown in Figure 4.14.
This figure also introduces the variables that specify the position and
orientation of the bicycle. If the elasticities of the tires and structure are
neglected the bicycle consists of five rigid bodies: the frame, the rider,
the front fork and the wheels. Neglecting the rider the orientation of the
bicycle is completely specified by the 7 variables: the coordinates x and y
of the contact point of the rear wheel, the orientation of the rear wheel
ψ , the roll angles of the frame ϕ r , the steer angle δ and the angles of
the front and rear wheels γ r and γ f . The configuration space thus has
dimension 7. The degrees of freedom are however reduced because of the
nonholomic constraints imposed by rolling. Since the rear wheel does not

193
Chapter 4. Simple Control Systems

slip it follows that

dx dγ r dy dγ r
=R cos ψ , =R sin ψ
dt dt dt dt
where R is the wheel radius. There are similar relations for the front
wheel. The system has 3 degrees of freedom beacause there are 7 configu-
ration variables and 4 nonholonomic constraints. They can be represented
by the roll angle of the frame ϕ , steering angle δ , and the angle of rotation
θ r of the rear wheel. Taking the rider into account and assuming that the
rider only tilts there is another degree of freedom that can be represented
by the roll angle of the rider.
One degree of freedom is lost if it is assumed that the forward velocity
or the angular velocity of the rear wheel is constant. With a rigid rider
the system then has two degrees of freedom.

A Basic Model
We will first make additional simplifying assumptions. It is assumed that
the rider has fixed position and orientation relative to the frame. The
steer angle δ is assumed to be the control variable. The rotational degree
of freedom associated with the front fork then disappears and the system
only has one degree of freedom, which can be chosen as the roll angle ϕ .
The roll of the front fork will be neglected which means that δ f = δ and
all angles are assumed to be so small that the equations can be linearized.
The forward velocity at the rear wheel V is assumed to be constant.
To describe the equations of motion we assume that the bicycle rolls
on the horisontal x y plane. Introduce a coordinate system that is fixed
to the bicycle with the ξ -axis through the contact points of the wheels
with the ground, the η -axis horizontal and the ζ -axis vertical as shown
in Figure 4.14. The coordinate system is not fixed in inertial space. An
observer fixed to the coordinate system will therefore experience forces
due to the motion of the coordinate system. The motion of the coordinate
system can be determined from kinematics, see Figure 4.15. We find that
the coordinate system rotates around the point O with the angular velocity
ω = V δ /b.
Let m be the mass of the system, b the wheel base, J the moment of
inertia with respect to the ξ -axis, D the product of inertia with respect
to the ξζ plane. Furthermore let the ξ and ζ coordinates of the center of
mass be a and h. The angular momentum of the system is

dϕ dϕ V D dδ
L=J − Dω = J −
dt dt b dt
The torques acting on the system are due to gravity and centrifugal action.

194
4.6 Bicycle Dynamics and Control

Figure 4.15 Bicycle kinematics. The wheel base is b and a is the ξ coordinate of
the center of mass.

The conservation of angular momentum can be written as

d2ϕ DV dδ mV 2 h
J − = m g hϕ + δ (4.41)
dt2 b dt b

where the first term of the right hand side is the torque generated by
gravity and the second term is the torque generated by the centrifugal
forces. It follows from (4.41) that the transfer function from steer angle
δ to roll angle ϕ is is

mV h
V ( Ds + mV h) VD s+ D
Gϕδ (s) = = (4.42)
b( Js2 − mg h) bJ 2 mg h
s −
J

This transfer function has two poles


p p
s = ± mg h/ J  g/ h

and one zero


mV h V
s=− 
D a
The approximate expressions are obtained by assuming that the rider and
the bicycle is a point mass, which gives J = mh2 and D = mah.

195
Chapter 4. Simple Control Systems

Figure 4.16 Schematic picture of the front fork. The angle λ is called the caster
angle.

The Front Fork


To obtain an improved model the torque applied to the handle bar is
regarded as the control variable instead of the steering angle. This seem-
ingly simple change has profound consequences. To keep the model simple
it will be assumed that the dynamics of the front fork can be neglected.
The front fork has an intriguing design, see Figure 4.16. It is angled
and shaped so that the contact point of the wheel with the road is behind
the axis of rotation of the front wheel assembly. The distance between the
contact point and the projection of the axis of rotation of the front fork
assembly c is called the the trail. The distance c is called the trail. The
properties of the bicycle are strongly influenced by the value of c.
The main forces acting on the front fork are the contact forces. With
a positive trail the normal force turns the wheel towards the lean when
the bicycle is tilted. The friction forces acts in the opposite direction. The
steering properties of a bicycle depend critically on the trail. A large trail
increases stability but make the steering less agile.
Let T be the torque applied on the front wheel assembly by the driver.
A simple linearized model is.

δ = k1 T − k2ϕ . (4.43)

This model can be verified qualitatively by determining the torque applied


to the front fork when biking in a straight path. Leaning the body towards
the left causes the bicycle frame to tilt to the right (positive ϕ ). A positive
torque (counter clockwise) is required to maintain a straight path. The
parameters of the model can be determined from measurements of the
tork and the tilt. More complicated models where the parameters are
related to physical quantities can also be derived.
Taking the action of the front fork into account the bicycle can be

196
4.6 Bicycle Dynamics and Control

Front fork

k1

δ ϕ
k2 Σ Frame

−1

Figure 4.17 Block diagram of a bicycle with a front fork, T is handle bar torque,
ϕ roll angle and δ steer angle.

described by the Equations (4.41) and (4.43). A block diagram of repre-


sentation of the system is shown in Figure 4.17. The figure shows clearly
that the bicycle with the front fork is a feedback system. The front wheel
angle δ influences the tilt angle ϕ as described by (4.41) and the tilt an-
gle influences the front wheel angle as described by (4.43). We will now
investigate the consequences of the feedback created by the front fork.
Inserting the expression (4.43) for steering angle δ in the momentum
balance (4.41) we get

d2ϕ DV k2 dϕ  mV 2 hk2  DV k1 dT mV 2 k1 h
J 2
+ + − mg h ϕ = + T (4.44)
dt b dt b b dt b
The characteristic equation of this system is

DV k2  mV 2 hk
2

Js2 + s+ − mg h = 0
b b
This equation is stable if
s
gb
V > Vc = (4.45)
k2

We can thus conclude that because of the feedback created by the design of
the front fork the bicycle will be stable, even in the absence of rider applied
steer torque, provided that the velocity is sufficiently large. The velocity Vc
is called the critical velocity. Reasonable parameters for a normal bicycle
with non-articulating rider are m = 80 kg, a = 0.3 m, b = 1 m, h = 1.2
m, J = mh2 kgm2 , k1 = 0.03 N−1 m−1 and k2 = 4. This gives a critical
velocity of 1.6 m/s.

197
Chapter 4. Simple Control Systems

Biking in a Circle
Useful information about bicycle dynamics can be obtained by driving
it with constant speed V in a circle with radius r0 . To determine the
numerical values of the essential parameters a torque wrench can be used
to measure the torque the driver exerts on the handle bar. In steady state
conditions the centripetal force must be balanced by gravity. Assuming
that the bicycle moves counter clockwise the tilt angle is ϕ 0 = − V 2 /(r0 g).
It then follows from (4.44) that the torque required is given by

bg  V 2  b  V2 
T0 = − 1 ϕ 0 = 1 − (4.46)
k1 V 2 Vc2 k1 r0 Vc2

This gives the nonintuitive result that the torque is positive when the
speed is less than the critical speed and negative when the speed is larger
than the critical speed. The steady state analysis implies that no torque is
required if the bicycle is driven at the critical velocity. This non-intuitive
result can be used to determine the critical speed. Notice that the calcula-
tion is based on the assumption that the rider is lined up with the bicycle,
small changes in the rider orientation will change the torque significantly.

Gyroscopic Effects
The gyroscopic action of the rotation of the front wheel can be taken into
account in the model of the front fork. The model (4.43) is then replaced
by

δ = k1 T − k2ϕ − k3
dt
and the equation for the closed loop system becomes
 k3 DV  d2ϕ  DV k2 mhk3 V 2  dϕ  mhk V 2
2

J+ + + + − m g h ϕ
b dt2 b b dt b
DV k1 dT mV 2 hk1
= + T
b dt b

Analysis of the simple model given by Equations (4.41) and (4.43) shows
that the damping is improved but the condition for stability V > Vc does
not change.

Rear-wheel Steering
The analysis performed shows that feedback analysis gives substantial
insight into behavior of bicycles. Feedback analysis can also indicate that
a proposed system may have substantial disadvantages that are not ap-
parent from static analysis. It is therefore essential to consider feedback

198
4.6 Bicycle Dynamics and Control

and dynamics at an early stage of design. These issues can be illustrated


very nicely by investigating a bicycle with rear wheen steering. There are
advantages in having rear-wheel steering on recumbent bicycles because
the design of the drive is simpler. Again we quote from Whitt and Wilson
Bicycling Science:
Many people have seen theoretical advantages in the fact that front-
drive, rear-steered recumbent bicycles would have simpler transmis-
sions than rear-driven recumbents and could have the center of mass
nearer the front wheel than the rear. The U.S. Department of Trans-
portation commissioned the construction of a safe motorcycle with this
configuration. It turned out to be safe in an unexpected way: No one
could ride it.

The reason for this is that a bicycle with rear-wheel steering has dynamics
which makes it very difficult to ride because the transfer function from
steering angle to tilt given by Equation (??) is replaced by

amV h −s + Va
Gϕδ (s) = , (4.47)
bJ s2 − mJgh

One way to derive this is to simply reverse the sign of the velocity in
Equation (??). The transfer function (4.47) which has both poles and zeros
in the right half plane and is very difficult to control. This can be seen
by investigating the closed loop system obtained when (4.43) is combined
with the front fork model (4.43). The closed loop system then becomes

d2ϕ amhk2 V dϕ mg h  V 2  amk1 hV  dT V 


− + − 1 ϕ = + T
dt2 bJ dt J Vc2 bJ dt a

This equation is unstable for all k2 . A positive k2 makes the damping


coefficient negative and the spring term positive provided that V > Vc .
A negative k2 gives a positive damping term but a negative spring term.
There are several ways to turn the rear fork but it makes little difference.
It is natural to ask if it is possible to stabilize the system by a more
complex controller. It turns out that the system can indeed be stabilized
but the closed loop system will be extremely sensitive to parameter vari-
ations. This will be discussed in detail in Sections 5.10 and 7.7. Let it
suffice to mention that it is essential to consider dynamics and control at
an early stage of the design process. A derivation of the transfer function
and an analysis of the poles and zeros give good insight. The presence
of poles and zeros in the right half plane indicates that there are severe
difficulties in controlling a system. This is one justification for teaching
all engineers dynamics and control.

199
Chapter 4. Simple Control Systems

Manoevring
Having obtained some insight into stabilization of bicycles we will now
turn to the problem of steering. A central problem is to determine how
the path of the bicycle is influenced by the handle bar torque. Later we
will also investigate the effects of leaning.
The first step is to investigate how the steering torque influences the
steering angle. It follows from the block diagram in Figure 4.17 that

k2
Gδ T (s) =
1 + k1 Gϕδ (s)

where Gϕδ (s) is the transfer function from steering torque T to tilt ϕ
given by (4.42). We thus find that
 mg h 
k2 s2 −
Gδ T (s) = J (4.48)
amhk1 V0 m g h  V02 
s2 + s+ 2
−1
bJ J Vc

Notice that the poles of the transfer function Gϕδ appear as zeros of the
transfer function Gδ T . The need for stabilization of the bicycle thus implies
that the steering dynamics has a zero in the right half plane. This imposes
limitations in the maneuvrability of the bicycle.
To determine how the path is influenced by the steering angle we
introduce the coordinate system in Figure 4.14 where x and y are the
coordinates of the rear wheel contact point. The equations are then lin-
earized by assuming small deviations from a straight line path. It then
follows
dy
= Vψ
dt (4.49)
dψ V
= δ
dt b
The transfer function from steering angle δ to path deviation y is

V2
G yδ (s) = (4.50)
bs2

Combining this with Equation (4.48) gives the following transfer function
from steering torque T to y.

ak2 V s2 − mg h/ J
G yT (s) =
b  amhk1 V mg h V 2 
s2 s2 + s+ ( 2 − 1)
bJ J Vc

200
4.6 Bicycle Dynamics and Control

0.15

0.1

y 0.05

0
0 0.2 0.4 0.6 0.8 1

0.4
0.3
ϕ

0.2
0.1
0
0 0.2 0.4 0.6 0.8 1

0.2

0
δ

−0.2

−0.4
0 0.2 0.4 0.6 0.8 1
t

Figure 4.18 Path deviation y, tilt angle ϕ and steering angle δ of a bicycle when
a constant torque is applied to the handle bar.

Figure 4.18 shows the path of a bicycle when a constant torque is applied
to the handle bar. The inverse response nature of the path is clearly visible
in the figure. This can be explained physically as follows. When a steering
torque is applied, the bicycle’s contact line with the ground will initially
turn in the direction of the applied torque. When the bicycle turns there
will be a centripetal force that tilts the bicycle around the x axis. This
tilt generates a torque on the front fork which turns the front fork in the
opposite direction. Once we see the curves it is straight forward to come
up with a physical explanation of what happens. It is however difficult to
apply causal reasoning directly because of the closed loop nature of the
system. The physical argument also indicates a remedy because the tilt
generated by the centripetal force can be opposed by gravitational forces
if the biker bends his upper torso relative to the frame.
The inverse response nature of the response to steering torque has
caused many motorcycle accidents. To explain this we will visualize a mo-
torcycle driven along a straight path. Assume that a car might suddenly
appear from the right. The intuitive reaction is then to try to steer away
from the car. The motor cycle will initially do so when the steering torque
is applied but because of the nature of the steering dynamics the motor
bike will steer into the car as indicated in Figure 4.18. Again the remedy

201
Chapter 4. Simple Control Systems

Figure 4.19 Bicycle with leaning rider.

is to simultaneously lean and counter-steer. Counter-steering consists of


a momentary turn of the handlebar in the opposite direction of the in-
tended travel. This establishes a lean which turns the vehicle away from
the danger( or obstacle that has appeared in front of the rider). Failure to
counter-steer often occurs with novice riders and is responsible for a sig-
nificant number of motor cycling accidents and resulting deaths. Leaning
suffice without counter-steering in many normal traveling conditions, like
routine lane changes. Counter-steer is, however, necessary for fast lane
changes because the dynamics of leaning alone has a long response time.
lean. Since a large motor cycle is heavy a significant lean is required.

Effects of Leaning
Sofar it has been assumed that the rider sits rigidly on the bicycle without
leaning. This is a strong simplification. A simple way of describing the
effect of leaning is to consider the rider as composed of two rigid pieces,
the lower body and the upper body, where the upper body can be rotated
as is illustrated in Figure 4.19. Let the upper body lean the angle be φ
relative to a plane through the bicycle. The linearized momentum balance
given by (??) is then replaced by

d2ϕ d2φ
J + J2 = mg hϕ + m2 g h2φ + Fh (4.51)
dt2 dt2

where m2 is the mass of the upper body, J2 is the moment of inertia of the
upper body with respect to the line where the wheels make contact with
the ground, and l2 is the distance from the ground to the center of mass
of the upper body. Combining this equation with the expression (??) for

202
4.6 Bicycle Dynamics and Control

the force and the model of the front fork (4.43) gives the following model
of the bicycle

d2ϕ dϕ dT dφ
+ a1 + a2ϕ = b11 + b12 T + b21 + b22φ
dt2 dt dt dt
δ = −k2ϕ + k1 T
a ak2 ak1 (4.52)
α = δ =− ϕ+ T
b b b
ak2 V ak1 V
Vy = Vα = − ϕ+ T
b b
where the coefficients are given by

amV hk2 mg h aV
a1 = =
bJ J Vc2
mV 2 k2 h mg h mg h  V 2 
a2 = − = − 1
bJ J J Vc2
amV hk1 k1
b11 = = a1
bJ k2 (4.53)
mV 2 k1 h mg h k1 V 2 k1  mg h 
b12 = = = a2 +
bJ J k2 Vc2 k2 J
J2
b21 =−
J
m2 g h2 mg h m2 h2
b22 = =
J J mh
model of a bicycle is a second order system with two inputs, the steering
torque T and the lean φ .
In steady state Equation (4.52) reduces to

a2ϕ = b12 T + b22φ


(4.54)
δ = −k2ϕ + k1 T

Assuming for example that the bicycle moves in a straight path we have
δ = 0. Straight forward calculations give
k2 m2 h2
T =− φ
k1 mh
m2 h2
ϕ =− φ
mh
A positive tilt thus requires a negative torque on the handle bars and a
negative lean of the bicycle. This is something you can easily try yourself

203
Chapter 4. Simple Control Systems

by investigating the torque you have to apply when biking in a straigt


path and leaning.
Equation (4.52) gives good insight into the behavior of the bicycle.
Since there are two inputs, handle bar torque T and lean φ and only
one output, sway velocity V y is is interesting to explore the effects of the
different inputs. By proper coordination of handlebar torque and lean it is
possible to alleviate the problems occuring when using handlebar torque
for steering. This is what we normally do intuitively when biking.

Summary
There are several interesting general conclusions that can be drawn from
the analysis of this section. The bicycle is a good illustration of the dif-
ficulties in reasoning intuitively about feedback systems. Simple causal
reasoning fails because of the closed loop nature of the system. The fact
that the bicycle is self stabilizing is certainly not a trivial matter. An-
other interesting feature is that much insight can be derived from simple
mathematical models. It is however important to make the proper sim-
plifications. A more subtle observation is that stabilization of the bicycle
introduces difficulties in steering because of the unstable pole appears as
a zero in the steering dynamics. This is actually a general property that
appears in control of many unstable systems. The last observation is that
the difficulty with the steering dynamics can be eliminated by introduc-
ing an extra control variable. This is a manifestation of a very general
result that difficulties in control arising from the appearance of zeros in
the right half plane can be eliminated by introducing additional sensors
or actuators.

4.7 Summary

In this section we started by investigating some simple control systems.


A systematic method for analysis and design was developed. The closed
loop system was first represented by a block diagram. The behavior of
each block was represented by a transfer function. The relations between
the Laplace transforms of all signals could be derived by simple alge-
braic manipulations of the transfer functions of the blocks. An interesting
feature of using Laplace transforms is that systems and signals are repre-
sented in the same way. The analysis gave good insight into the behavior
of simple control systems and how its properties were influenced by the
poles and zeros of the closed loop system. The results can also be devel-
oped using differential equations but it is much simpler to use Laplace
transforms and transfer functions. This is also the standard language of
the field of control.

204
4.7 Summary

To design a controller we selected a controller with given structure,


PI or PID. The parameters of the controller were then chosen to obtain
a closed loop system with specified poles, or equivalently specified roots
of the characteristic equation. This design method was called pole place-
ment. The design methods were worked out in detail for first and sec-
ond order systems but we also briefly discussed the general case. To find
suitable closed loop poles we found that it was convenient to introduce
standard parameters to describe the closed loop poles. Results that guide
the intuition of choosing the closed loop poles were also developed.
The analysis was based on simplified models of the dynamics of the
process. The example on cruise control in Section 4.2 indicated that it was
not necessary to know some parameters accurately. One of the amazing
properties of control systems is that they can often be designed based on
simple models. This will be justified in the next chapter.
In the last section we also gave a more complicated example of model-
ing and analysis, namely a bicycle. This example shows that the tools we
have developed are very convenient for analysing an interesting dynami-
cal system.

205
5
Feedback Fundamentals

5.1 Introduction

Fundamental properties of feedback systems will be investigated in this


Chapter. We begin in Section 5.2 by discussing the basic feedback loop and
typical requirements. This includes the ability to follow reference signals,
effects of load disturbances and measurement noise and the effects of pro-
cess variations. It turns out that these properties can be captured by a
set of six transfer functions, called the Gang of Six. These transfer func-
tions are introduced in Section 5.3. For systems where the feedback is
restricted to operate on the error signal the properties are characterized
by a subset of four transfer functions, called the Gang of Four. Properties
of systems with error feedback and the more general feedback configura-
tion with two degrees of freedom are also discussed in Section 5.3. It is
shown that it is important to consider all transfer functions of the Gang
of Six when evaluating a control system. Another interesting observation
is that for systems with two degrees of freedom the problem of response
to load disturbances can be treated separately. This gives a natural sepa-
ration of the design problem into a design of a feedback and a feedforward
system. The feedback handles process uncertainties and disturbances and
the feedforward gives the desired response to reference signals.
Attenuation of disturbances are discussed in Section 5.4 where it is
demonstrated that process disturbances can be attenuated by feedback
but that feedback also feeds measurement noise into the system. It turns
out that the sensitivity function which belongs to the Gang of Four gives
a nice characterization of disturbance attenuation. The effects of process
variations are discussed in Section 5.5. It is shown that their effects are
well described by the sensitivity function and the complementary sensi-
tivity function. The analysis also gives a good explanation for the fact that

206
5.2 The Basic Feedback Loop

d n

r e u v x y
F Σ C Σ P Σ

−1
Controller Process

Figure 5.1 Block diagram of a basic feedback loop.

control systems can be designed based on simplified models. When dis-


cussing process variations it is natural to investigate when two processes
are similar from the point of view of control. This important nontrivial
problem is discussed in Section 5.6. Section 5.7 is devoted to a detailed
treatment of the sensitivity functions. This leads to a deeper understand-
ing of attenuation of disturbances and effects of process variations. A
fundamental result of Bode which gives insight into fundamental limi-
tations of feedback is also derived. This result shows that disturbances
of some frequencies can be attenuated only if disturbances of other fre-
quencies are amplified. Tracking of reference signals are investigated in
Section 5.8. Particular emphasis is given to precise tracking of low fre-
quency signals. Because of the richness of control systems the emphasis
on different issues varies from field to field. This is illustrated in Sec-
tion 5.11 where we discuss the classical problem of design of feedback
amplifiers.

5.2 The Basic Feedback Loop


A block diagram of a basic feedback loop is shown in Figure 5.1. The sys-
tem loop is composed of two components, the process P and the controller.
The controller has two blocks the feedback block C and the feedforward
block F. There are two disturbances acting on the process, the load distur-
bance d and the measurement noise n. The load disturbance represents
disturbances that drive the process away from its desired behavior. The
process variable x is the real physical variable that we want to control.
Control is based on the measured signal y, where the measurements are
corrupted by measurement noise n. Information about the process variable
x is thus distorted by the measurement noise. The process is influenced
by the controller via the control variable u. The process is thus a system
with three inputs and one output. The inputs are: the control variable

207
Chapter 5. Feedback Fundamentals

w z
P
u y

Figure 5.2 An abstract representation of the system in Figure 5.1. The input u
represents the control signal and the input w represents the reference r, the load
disturbance d and the measurement noise n. The output y is the measured variables
and z are internal variables that are of interest.

u, the load disturbance d and the measurement noise n. The output is


the measured signal. The controller is a system with two inputs and one
output. The inputs are the measured signal y and the reference signal r
and the output is the control signal u. Note that the control signal u is an
input to the process and the output of the controller and that the mea-
sured signal is the output of the process and an input to the controller. In
Figure 5.1 the load disturbance was assumed to act on the process input.
This is a simplification, in reality the disturbance can enter the process
in many different ways. To avoid making the presentation unnecessar-
ily complicated we will use the simple representation in Figure 5.1. This
captures the essence and it can easily be modified if it is known precisely
how disturbances enter the system.

More Abstract Representations


The block diagrams themselves are substantial abstractions but higher
abstractions are sometimes useful. The system in Figure 5.1 can be rep-
resented by only two blocks as shown in Figure 5.2. There are two types
of inputs, the control u, which can be manipulated and the disturbances
w = (r, d, n), which represents external influences on the closed loop
systems. The outputs are also of two types the measured signal y and
other interesting signals z = ( e, v, x). The representation in Figure 5.2
allows many control variables and many measured variables, but it shows
less of the system structure than Figure 5.1. This representation can be
used even when there are many input signals and many output signals.
Representation with a higher level of abstraction are useful for the devel-
opment of theory because they make it possible to focus on fundamentals
and to solve general problems with a wide range of applications. Care
must, however, be exercised to maintain the coupling to the real world
control problems we intend to solve.

208
5.2 The Basic Feedback Loop

Disturbances
Attenuation of load disturbances is often a primary goal for control. This is
particularly the case when controlling processes that run in steady state.
Load disturbances are typically dominated by low frequencies. Consider
for example the cruise control system for a car, where the disturbances are
the gravity forces caused by changes of the slope of the road. These distur-
bances vary slowly because the slope changes slowly when you drive along
a road. Step signals or ramp signals are commonly used as prototypes for
load disturbances disturbances.
Measurement noise corrupts the information about the process vari-
able that the sensors delivers. Measurement noise typically has high fre-
quencies. The average value of the noise is typically zero. If this was not
the case the sensor will give very misleading information about the pro-
cess and it would not be possible to control it well. There may also be
dynamics in the sensor. Several sensors are often used. A common situa-
tion is that very accurate values may be obtained with sensors with slow
dynamics and that rapid but less accurate information can be obtained
from other sensors.

Actuation
The process is influenced by actuators which typically are valves, motors,
that are driven electrically, pneumatically, or hydraulically. There are of-
ten local feedback loops and the control signals can also be the reference
variables for these loops. A typical case is a flow loop where a valve is
controlled by measuring the flow. If the feedback loop for controlling the
flow is fast we can consider the set point of this loop which is the flow
as the control variable. In such cases the use of local feedback loops can
thus simplify the system significantly. When the dynamics of the actua-
tors is significant it is convenient to lump them with the dynamics of the
process. There are cases where the dynamics of the actuator dominates
process dynamics.

Design Issues
Many issues have to be considered in analysis and design of control sys-
tems. Basic requirements are
• Stability
• Ability to follow reference signals
• Reduction of effects of load disturbances
• Reduction of effects of measurement noise
• Reduction of effects of model uncertainties

209
Chapter 5. Feedback Fundamentals

The possibility of instabilities is the primary drawback of feedback. Avoid-


ing instability is thus a primary goal. It is also desirable that the process
variable follows the reference signal faithfully. The system should also
be able to reduce the effect of load disturbances. Measurement noise is
injected into the system by the feedback. This is unavoidable but it is es-
sential that not too much noise is injected. It must also be considered that
the models used to design the control systems are inaccurate. The proper-
ties of the process may also change. The control system should be able to
cope with moderate changes. The focus on different abilities vary with the
application. In process control the major emphasis is often on attenuation
of load disturbances, while the ability to follow reference signals is the
primary concern in motion control systems.

5.3 The Gang of Six


The feedback loop in Figure 5.1 is influenced by three external signals,
the reference r, the load disturbance d and the measurement noise n.
There are at least three signals x, y and u that are of great interest
for control. This means that there are nine relations between the input
and the output signals. Since the system is linear these relations can be
expressed in terms of the transfer functions. Let X , Y, U , D, N R be the
Laplace transforms of x, y, u, d, n r, respectively. The following relations
are obtained from the block diagram in Figure 5.1

P PC PC F
X = D− N+ R
1 + PC 1 + PC 1 + PC
P 1 PC F
Y= D+ N+ R (5.1)
1 + PC 1 + PC 1 + PC
PC C CF
U =− D− N+ R.
1 + PC 1 + PC 1 + PC

To simplify notations we have dropped the arguments of all Laplace trans-


forms. There are several interesting conclusions we can draw from these
equations. First we can observe that several transfer functions are the
same and that all relations are given by the following set of six transfer
functions which we call the Gang of Six.

PC F PC P
1 + PC 1 + PC 1 + PC
(5.2)
CF C 1
,
1 + PC 1 + PC 1 + PC

210
5.3 The Gang of Six

The transfer functions in the first column give the response of process
variable and control signal to the set point. The second column gives the
same signals in the case of pure error feedback when F = 1. The transfer
function P/(1 + PC ) in the third column tells how the process variable
reacts to load disturbances the transfer function C /(1 + PC ) gives the
response of the control signal to measurement noise.
Notice that only four transfer functions are required to describe how
the system reacts to load disturbance and the measurement noise and
that two additional transfer functions are required to describe how the
system responds to set point changes.
The special case when F = 1 is called a system with (pure) error
feedback. In this case all control actions are based on feedback from the
error only. In this case the system is completely characterized by four
transfer functions, namely the four rightmost transfer functions in (5.2),
i.e.
PC
, the complementary sensitivity function
1 + PC
P
, the load disturbance sensitivity function
1 + PC
(5.3)
C
, the noise sensitivity function
1 + PC
1
, the sensitivity function
1 + PC
These transfer functions and their equivalent systems are called the
Gang of Four. The transfer functions have many interesting properties
that will be discussed in then following. A good insight into these prop-
erties are essential for understanding feedback systems. The load distur-
bance sensitivity function is sometimes called the input sensitivity func-
tion and the noise sensitivity function is sometimes called the output
sensitivity function.

Systems with Two Degrees of Freedom


The controller in Figure 5.1 is said to have two degrees of freedom be-
cause the controller has two blocks, the feedback block C which is part
of the closed loop and the feedforward block F which is outside the loop.
Using such a controller gives a very nice separation of the control problem
because the feedback controller can be designed to deal with disturbances
and process uncertainties and the feedforward will handle the response to
reference signals. Design of the feedback only considers the gang of four
and the feedforward deals with the two remaining transfer functions in
the gang of six. For a system with error feedback it is necessary to make
a compromise. The controller C thus has to deal with all aspects of the

211
Chapter 5. Feedback Fundamentals

PC F /(1 + PC ) PC /(1 + PC ) P/(1 + PC )


1.5 1.5 1.5

1 1 1

0.5 0.5 0.5

0 0 0

0 10 20 30 0 10 20 30 0 10 20 30
C F /(1 + PC ) C /(1 + PC ) 1/(1 + PC )
1.5 1.5 1.5

1 1 1

0.5 0.5 0.5

0 0 0

0 10 20 30 0 10 20 30 0 10 20 30

Figure 5.3 Step responses of the Gang of Six for PI control k = 0.775, Ti = 2.05
of the process P(s) = (s + 1)−4 . The feedforward is designed to give the transfer
function (0.5s + 1)−4 from reference r to output y.

problem.
To describe the system properly it is thus necessary to show the re-
sponse of all six transfer functions. The transfer functions can be repre-
sented in different ways, by their step responses and frequency responses,
see Figures 5.3 and 5.4.
Figures 5.3 and 5.4 give useful insight into the properties of the closed
loop system. The time responses in Figure 5.3 show that the feedforward
gives a substantial improvement of the response speed. The settling time
is substantially shorter, 4 s versus 25 s, and there is no overshoot. This is
also reflected in the frequency responses in Figure 5.4 which shows that
the transfer function with feedforward has higher bandwidth and that it
has no resonance peak.
The transfer functions C F /(1 + PC ) and − C /(1 + PC ) represent the
signal transmission from reference to control and from measurement noise
to control. The time responses in Figure 5.3 show that the reduction in
response time by feedforward requires a substantial control effort. The
initial value of the control signal is out of scale in Figure 5.3 but the
frequency response in 5.4 shows that the high frequency gain of PC F /(1 +
PC ) is 16, which can be compared with the value 0.78 for the transfer
function C /(1 + PC ). The fast response thus requires significantly larger
control signals.
There are many other interesting conclusions that can be drawn from
Figures 5.3 and 5.4. Consider for example the response of the output to

212
5.3 The Gang of Six

PC F /(1 + PC ) PC /(1 + PC ) P/(1 + PC )


0 0 0
10 10 10

−1 −1 −1
10 10 10
−1 0 1 −1 0 1 −1 0 1
10 10 10 10 10 10 10 10 10
C F /(1 + PC ) C /(1 + PC ) 1
1/(1 + PC )
10
1 1
10 10

0
10
0 0
10 10

−1 0 1 −1 0 1 −1 0 1
10 10 10 10 10 10 10 10 10

Figure 5.4 Gain curves of frequency responses of the Gang of Six for PI control
k = 0.775, Ti = 2.05 of the process P(s) = (s + 1)−4 where the feedforward has been
designed to give the transfer function (0.5s + 1)−4 from reference to output.

load disturbances expressed by the transfer function P/(1 + PC ). The


frequency response has a pronounced peak 1.22 at ω max = 0.5 the corre-
sponding time function has its maximum 0.59 at tmax = 5.2. Notice that
the peaks are of the same magnitude and that the product of ω max tmax =
2.6.
The step responses can also be represented by two simulations of the
process. The complete system is first simulated with the full two-degree-
of-freedom structure. The simulation begins with a step in the reference
signal, when the system has settled to equilibrium a step in the load dis-
turbance is then given. The process output and the control signals are
recorded. The simulation is then repeated with a system without feedfor-
ward, i.e. F = 1. The response to the reference signal will be different
but the response to the load disturbance will be the same as in the first
simulation. The procedure is illustrated in Figure 5.5.

A Remark
The fact that 6 relations are required to capture properties of the basic
feedback loop is often neglected in literature. Most papers on control only
show the response of the process variable to set point changes. Such a
curve gives only partial information about the behavior of the system. To
get a more complete representation of the system all six responses should
be given. We illustrate the importance of this by an example.

213
Chapter 5. Feedback Fundamentals

Process variable
2

1.5

0.5

0
0 10 20 30 40 50 60
Control signal
1.5

0.5

−0.5
0 10 20 30 40 50 60

Figure 5.5 Representation of properties of a basic feedback loop by step responses


in the reference at time 0, and at the process input at time 30. The full lines show
the response for a system with error feedback F = 1, and the dashed lines show
responses for a system having two degrees of freedom.

EXAMPLE 5.1—ASSESSMENT OF A CONTROL SYSTEM


A process with the transfer function
1
P ( s) =
(s + 1)(s + 0.02)
is controlled using error feedback with a controller having the transfer
function
50s + 1 0.02
C ( s) = =1+
50s s
The loop transfer function is
1
L( s ) =
s(s + 1)
Figure 5.6 shows that the responses to a reference signal look quite rea-
sonable. Based on these responses we could be tempted to conclude that
the closed loop system is well designed. The step response settles in about
10 s and the overshoot is moderate.
To explore the system further we will calculate the transfer functions
of the Gang of Six, we have
PC 1 P s
= 2 =
1 + PC s +s+1 1 + PC (s + 0.02)(s2 + s + 1)
C (s + 0.02)(s + 1) 1 s(s + 1)
= = 2
1 + PC s2 + s + 1 1 + PC s +s+1

214
5.3 The Gang of Six

Output
1.4

1.2

y 0.8

0.6

0.4

0.2

0
0 2 4 6 8 10 12 14 16 18 20

Control
1.2

0.8

0.6
u

0.4

0.2

−0.2
0 2 4 6 8 10 12 14 16 18 20
t

Figure 5.6 Response of output y and control u to a step in reference r.

The responses of y and u to the reference r are given by

1 (s + 1)(s + 0.02)
Y ( s) = R(s), U ( s) = R( s )
s2 + s + 1 s2 + s + 1

and the responses of y and u to the load disturbance d are given by

s 1
Y ( s) = D (s), U ( s) = − D ( s)
(s + 0.02)(s2 + s + 1) s2 + s + 1

Notice that the process pole s = 0.02 is cancelled by a controller zero.


This implies that the loop transfer function is of second order even if the
closed loop system itself is of third order. The characteristic equation of
the closed loop system is

(s + 0.02)(s2 + s + 1) = 0

where the the pole s = −0.02 corresponds the process pole that is canceled
by the controller zero. The presence of the slow pole s = −0.02 which ap-
pears in the response to load disturbances implies that the output decays
very slowly, at the rate of e−0.02t. The controller will not respond to the

215
Chapter 5. Feedback Fundamentals

Output
1.2

0.8

0.6
y

0.4

0.2

−0.2
0 20 40 60 80 100 120 140 160 180 200

Control
0

−0.2

−0.4

−0.6
u

−0.8

−1

−1.2

−1.4
0 20 40 60 80 100 120 140 160 180 200
t

Figure 5.7 Response of output y and control u to a step in the load disturbance.
Notice the very slow decay of the mode e−0.02t . The control signal does not respond
to this mode because the controller has a zero s = −0.02. The dashed curves show
the results when the controller is modified to C(s) = 1 + 0.2/s.

signal e−0.02t because the zero s = −0.02 will block the transmission of this
signal. This is clearly seen in Figure 5.7, which shows the response of the
output and the control signals to a step change in the load disturbance.
Notice that it takes about 200 s for the disturbance to settle. This can be
compared with the step response in Figure 5.6 which settles in about 10s.
Having understood what happens it is straight forward to modify the
controller. With the controller

0.2
C ( s) = 1 +
s

the response to a step in the load disturbance is as shown in the dashed


curves in Figure 5.7. Notice that drastic improvements in the response to
load disturbance are obtained with only moderate changes in the control
signal. This is a nice illustration of the importance of timing to achieve
good control.
The behavior illustrated in the example is typical when there are cancel-
lations of poles and zeros in the transfer functions of the process and the

216
5.4 Disturbance Attenuation

d n

r=0 u x yol
C Σ P Σ

d n

r=0 e u x ycl
Σ C Σ P Σ

−1

Figure 5.8 Block diagrams of open and closed loop systems subject to the same
disturbances.

controller. The canceled factors do not appear in the loop transfer function
and the sensitivity functions. The canceled modes are not visible unless
they are excited. The effects are even more drastic than shown in the
example if the canceled modes are unstable. This has been known among
control engineers for a long time and a good design rule that cancellation
of slow or unstable process poles by zeros in the controller give very poor
attenuation of load disturbances. Another view of cancellations is given
in Section 3.7.

5.4 Disturbance Attenuation


The attenuation of disturbances will now be discussed. For that purpose
we will compare an open loop system and a closed loop system subject to
the disturbances as is illustrated in Figure 5.8. Let the transfer function of
the process be P(s) and let the Laplace transforms of the load disturbance
and the measurement noise be D (s) and N (s) respectively. The output of
the open loop system is

Yol = P(s) D (s) + N (s) (5.4)

and the output of the closed loop system is

P ( s) D ( s) + N ( s)
Ycl = = S(s)( P(s) D (s) + N (s)) (5.5)
1 + P ( s) C ( s)

217
Chapter 5. Feedback Fundamentals

1
10

h S(iω )h
10

−1
10

−2
10
−2 −1 0 1
10 10 10 10
ω

Figure 5.9 Gain curve of the sensitivity function for PI control ( k = 0.8, ki = 0.4)
of process with the transfer function P(s) = (s + 1)−4 . The sensitivity crossover
frequency is indicated by + and the maximum sensitivity by o.

where S(s) is the sensitivity function, which belongs to the Gang of Four.
We thus obtain the following interesting result

Ycl (s) = S(s) Yol (s) (5.6)

The sensitivity function will thus directly show the effect of feedback on
the output. The disturbance attenuation can be visualized graphically by
the gain curve of the Bode plot of S(s). The lowest frequency where the
sensitivity function has the magnitude 1 is called the sensitivity crossover
frequency and denoted by ω sc . The maximum sensitivity
1
Ms = max h S(iω )h = max (5.7)

ω ω 1 + P(iω ) C (iω )

is an important variable which gives the largest amplification of the dis-


turbances. The maximum occurs at the frequency ω ms .
A quick overview of how disturbances are influenced by feedback is
obtained from the gain curve of the Bode plot of the sensitivity function.
An example is given in Figure 5.9. The figure shows that the sensitivity
crossover frequency is 0.32 and that the maximum sensitivity 2.1 occurs at
ω ms = 0.56. Feedback will thus reduce disturbances with frequencies less
than 0.32 rad/s, but it will amplify disturbances with higher frequencies.
The largest amplification is 2.1.
If a record of the disturbance is available and a controller has been
designed the output obtained under closed loop with the same disturbance
can be visualized by sending the recorded output through a filter with the
transfer function S(s). Figure 5.10 shows the output of the system with
and without control.

218
5.4 Disturbance Attenuation

30

20

10

y 0

−10

−20

−30
0 10 20 30 40 50 60 70 80 90 100
t

Figure 5.10 Outputs of process with control (full line) and without control (dashed
line).

The sensitivity function can be written as

1 1
S ( s) = = . (5.8)
1 + P ( s) C ( s) 1 + L( s )

Since it only depends on the loop transfer function it can be visualized


graphically in the Nyquist plot of the loop transfer function. This is illus-
trated in Figure 5.11. The complex number 1 + L(iω ) can be represented
as the vector from the point −1 to the point L(iω ) on the Nyquist curve.
The sensitivity is thus less than one for all points outside a circle with
radius 1 and center at −1. Disturbances of these frequencies are attenu-
ated by the feedback. If a control system has been designed based on a
given model it is straight forward to estimated the potential disturbance
reduction simply by recording a typical output and filtering it through the
sensitivity function.

Variations in the Process Variable


So far we have discussed variations in the output. For the process variable
we have
P ( s) P ( s) C ( s)
X ( s) = D ( s) − N ( s) = S ( s) D ( s) − T ( s) N ( s)
1 + P ( s) C ( s) 1 + P ( s) C ( s)

The first term represents the effect of the load disturbance and the second
term the effect of measurement noise. Load disturbance are thus attenu-
ated but measurement noise is injected because of the feedback.

Slow Load Disturbances


Load disturbances typically have low frequencies. To estimate their effects
on the process variable it is then natural to approximate the transfer

219
Chapter 5. Feedback Fundamentals

−1

1/ Ms ω ms

ω sc

Figure 5.11 Nyquist curve of loop transfer function showing graphical interpre-
tation of maximum sensitivity. The sensitivity crossover frequency ω sc and the fre-
quency ω ms where the sensitivity has its largest value are indicated in the figure.
All points inside the dashed circle have sensitivities greater than 1.

function from load disturbances to process output for small s, i.e.

P ( s)
G xd (s) = = c0 + c1 s + c2 s2 + ⋅ ⋅ ⋅ (5.9)
1 + P ( s) C ( s)

The coefficients ck are called stiffness coefficients. We have c0 = P(0)/(1 +


P(0) C (0)). For P(0) = 0 and a controller with integral action we have
c0 = 0 and c1 = 1/ ki , where ki is the integral gain, see (??).
It follows from (5.9) that the process variable for slowly varying load
disturbances d is given by

dd(t) d2 d(t)
x(t) = c0 d(t) + c1 + c2 +⋅⋅⋅
dt dt2

For example if the load disturbance is d(t) = v0 t we get

x(t) = c0 v0 t + c1 v0

If the controller has integral action we have c0 = 0 and x(t) = v0 / ki .

Random Disturbances*
Process disturbances can often be described as stationary stochastic pro-
cesses which can be characterized by their power spectral density φ (ω ).

220
5.5 Process Variations

This physical meaningRis that the energy of the signal in the frequency
ω
band ω 1 ≤ ω ≤ ω 2 is 2 ω 12 φ (ω )dω . If φ ol (ω ) is the power spectral density
of the output in open loop the power spectral density of the closed loop
system is
φ cl (ω ) = h S(iω )h2φ ol (ω )
and the ratio of the variances of the closed and open loop systems is
R∞
σ cl
2 h S(iω )h2φ ol (ω )dω
= −∞ R ∞
σ cl
2
−∞ φ ol (ω ) dω

5.5 Process Variations


Control systems are designed based on simplified models of the processes.
Process dynamics will often change during operation. The sensitivity of a
closed loop system to variations in process dynamics is therefore a funda-
mental issue.

Risk for Instability


Instability is the main drawback of feedback. It is therefore of interest
to investigate if process variations can cause instability. The sensitivity
functions give a useful insight. Figure 5.11 shows that the largest sen-
sitivity is the inverse of the shortest distance from the point −1 to the
Nyquist curve.
The complementary sensitivity function also gives insight into allow-
able process variations. Consider a feedback system with a process P and
a controller C. We will investigate how much the process can be perturbed
without causing instability. The Nyquist curve of the loop transfer func-
tion is shown in Figure 5.12. If the process is changed from P to P + ∆ P
the loop transfer function changes from PC to PC + C ∆ P as illustrated
in the figure. The distance from the critical point −1 to the point L is
h1 + Lh. This means that the perturbed Nyquist curve will not reach the
critical point −1 provided that

h C ∆ Ph < h1 + Lh

which implies
1 + PC
h∆ Ph < (5.10)

C

This condition must be valid for all points on the Nyquist curve, i.e point-
wise for all frequencies. The condition for stability can be written as
∆ P(iω ) 1
< (5.11)

P(iω ) hT (iω )h

221
Chapter 5. Feedback Fundamentals

−1

1+ L

C∆ P

Figure 5.12 Nyquist curve of a nominal loop transfer function and its uncertainty
caused by process variations ∆ P.

A technical condition, namely that the perturbation ∆ P is a stable trans-


fer function, must also be required. If this does not hold the encirclement
condition required by Nyquist’s stability condition is not satisfied. Also
notice that the condition (5.11) is conservative because it follows from
Figure 5.12 that the critical perturbation is in the direction towards the
critical point −1. Larger perturbations can be permitted in the other di-
rections.
This formula (5.11) is one of the reasons why feedback systems work
so well in practice. The mathematical models used to design control sys-
tem are often strongly simplified. There may be model errors and the
properties of a process may change during operation. Equation (5.11) im-
plies that the closed loop system will at least be stable for substantial
variations in the process dynamics.
It follows from (5.11) that the variations can be large for those fre-
quencies where T is small and that smaller variations are allowed for
frequencies where T is large. A conservative estimate of permissible pro-
cess variations that will not cause instability is given by
∆ P(iω ) 1
<

P(iω ) Mt

where Mt is the largest value of the complementary sensitivity


P(iω ) C (iω )
Mt = max hT (iω )h = max (5.12)

ω ω 1 + P(iω ) C (iω )

The value of Mt is influenced by the design of the controller. For example


if Mt = 2 pure gain variations of 50% or pure phase variations of 30○ are

222
5.5 Process Variations

permitted without making the closed loop system unstable. The fact that
the closed loop system is robust to process variations is one of the reason
why control has been so successful and that control systems for complex
processes can indeed be designed using simple models. This is illustrated
by an example.

EXAMPLE 5.2—MODEL UNCERTAINTY


Consider a process with the transfer function

1
P ( s) =
(s + 1)4

A PI controller with the parameters k = 0.775 and Ti = 2.05 gives a closed


loop system with Ms = 2.00 and Mt = 1.35. The complementary sensitivity
has its maximum for ω mt = 0.46. Figure 5.13 shows the Nyquist curve
of the transfer function of the process and the uncertainty bounds ∆ P =
h Ph/hT h for a few frequencies. The figure shows that
• Large uncertainties are permitted for low frequencies, T (0) = 1.
• The most severe requirement on h∆ P/ Ph occurs for ω = 0.46.
• For ω = 1 we have hT (iω )h = 0.26 which means that the stability
requirement is h∆ P/ Ph < 3.8
• For ω = 2 we have hT (iω )h = 0.032 which means that the stability
requirement is h∆ P/ Ph < 31

The situation illustrated in the figure is typical for many processes, mod-
erately small uncertainties are only required around the gain crossover
frequencies, but large uncertainties can be permitted at higher and lower
frequencies. A consequence of this is also that a simple model that de-
scribes the process dynamics well around the crossover frequency is suf-
ficient for design. Systems with resonance peaks are an exception to this
rule because the process transfer function for such systems may have
large gains also for higher frequencies.

Small Gain Theorem


The robustness result given by Equation (5.11) can be given another inter-
pretation. This is illustrated in Figure 5.14 which shows a block diagram
of the closed loop system with the perturbed process in A. Another repre-
sentation of the system is given in B. This representation is obtatined by
combining two of the blocks. The loop transfer function of the system in

223
Chapter 5. Feedback Fundamentals

Figure 5.13 Nyquist curve of a nominal process transfer function P(s) = (s +


1)−4 shown in full lines. The circles show the uncertainty regions h∆ P/ Ph = 1/hT h
obtained for a PI controller with k = 0.775 and Ti = 2.05 for ω = 0, 0.46 and 1.

∆ P/ P

∆P
P

P Σ

−C
− 1+PC
PC

Figure 5.14 Illustration of robustness to process perturbations.

Figure 5.14B is
PC ∆ P
L( s ) =
1 + PC P
Equation 5.11 thus simply implies that the largest loop gain is less than
one. Since both blocks are stable it follows from Nyquists stability theorem
that the closed loop is stable. This result which holds under much more
general assumptions is called the small gain theorem.

Variations in Closed Loop Transfer Function


So far we have investigated the risk for instability. The effects of small

224
5.5 Process Variations

variation in process dynamics on the closed loop transfer function will


now be investigated. To do this we will analyze the system in Figure 5.1.
For simplicity we will assume that F = 1 and that the disturbances d
and n are zero. The transfer function from reference to output is given by

PC
G yr = =T (5.13)
1 + PC

Compare with (5.2). The transfer function T which belongs to the Gang
of Four is called the complementary sensitivity function. Differentiating
(5.13) we get

dT C PC T
= 2
= =S
dP (1 + PC ) (1 + PC )(1 + PC ) P P

Hence
d log T dT P
= =S (5.14)
d log P dP T
This equation is the reason for calling S the sensitivity function. The
relative error in the closed loop transfer function T will thus be small
if the sensitivity is small. This is one of the very useful properties of
feedback. For example this property was exploited by Black at Bell labs
to build the feedback amplifiers that made it possible to use telephones
over large distances.
A small value of the sensitivity function thus means that disturbances
are attenuated and that the effect of process perturbations also are negli-
gible. A plot of the magnitude of the complementary sensitivity function
as in Figure 5.9 is a good way to determine the frequencies where model
precision is essential.

Constraints on Design
Constraints on the maximum sensitivities Ms and Mt are important to
ensure that the closed loop system is insensitive to process variations.
Typical constraints are that the sensitivities are in the range of 1.1 to 2.
This has implications for design of control systems which are illustrated
by an example.

EXAMPLE 5.3—SENSITIVITIES CONSTRAIN CLOSED LOOP POLES


PI control of a first order system was discussed in Section 6.4 where
it was shown that the closed loop system was of second order and that
the closed loop poles could be placed arbitrarily by proper choice of the
controller parameters. The process and the controller are characterized

225
Chapter 5. Feedback Fundamentals

by

b
Y ( s) = U ( s)
s+a
ki
U (s) = − kY (s) + ( R(s) − Y (s))
s

where U , Y and R are the Laplace transforms of the process input, output
and the reference signal. We assume that the parameter a is positive. The
closed loop characteristic polynomial is

s2 + (a + bk)s + bki

requiring this to be equal to

s2 + 2ζ ω 0 s + ω 02 (5.15)

where ζ ≤ 1, we find that the controller parameters are given by

2ζ ω 0 − a
k=
b
ω 02
ki =
b

and there are no apparent constraints on the choice of parameters ζ and


ω 0 . Calculating the sensitivity functions we get

s(s + a)
S ( s) =
s2 + 2ζ ω 0 s + ω 02
(2ζ ω 0 − a)s + ω 02
T ( s) =
s2 + 2ζ ω 0 s + ω 02

Figure 5.15 shows clearly that the sensitivities will be large if the pa-
rameter ω 0 is chosen smaller than a. The equation for controller gain
also gives an indication that small values of ω 0 are not desirable because
proportional gain then becomes negative which means that the feedback
is positive.
We can thus conclude that if a closed loop characteristic polynomial of
the form (5.15) with ζ ≤ 1 is chosen it is necessary to have ω 0 ≥ a/(2ζ ) in
order to have a system with reasonable robustness. The response time of
the closed loop system thus must be sufficiently fast. It is however possible
to obtain closed loop system with slower response time by choosing a

226
5.5 Process Variations

2
10

0
10

h S(iω )h
−2
10

−4
10
−2 −1 0 1 2
10 10 10 10 10
ω
1
10

0
10
hT (iω )h

−1
10

−2
10

−3
10
−2 −1 0 1 2
10 10 10 10 10
ω

Figure 5.15 Magnitude curve for Bode plots of the sensitivity function S (above)
and the complementary sensitivity function T (below) for ζ = 0.7, a = 1 and ω 0 /a =
0.1 (dashed), 1 (solid) and 10 (dotted).

closed loop characteristic polynomial with real roots. Let the characteristic
polynomial be
(s + p1 )(s + p2 )
where 0 < p1 < p2 . We will consider the case when p1 < a. The controller
parameters then becomes
p1 + p2 − a
k=
b
p1 p2
ki =
b
Controller gain k will be negative if p1 + p2 < a. The sensitivity functions
are
s(s + a)
S ( s) =
(s + p1 )(s + p2 )
( p1 + p2 − a)s + p1 p2
T ( s) =
(s + p1 )(s + p2 )
A sketch of the gain curve for the sensitivity function reveals that p2 must
be close to a to avoid that the sensitivity function becomes too large.The

227
Chapter 5. Feedback Fundamentals

2.5

Ms , Mt
2

1.5

1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
ζ

Figure 5.16 Maximum sensitivities Ms (full line) and Mt (dashed line) as func-
ω 02 s(s+2ζ ω 0 )
tions of relative damping for T (s) = and S(s) = .
s2 +2ζ ω 0 s+ω 02 s2 +2ζ ω 0 s+ω 02

complementary sensitivity function has a zero at

p1 p2
z1 =
p1 + p2 − a

Large values of the complementary sensitivity function are also avoided


if p2 is close to a. This example shows that it is important to choose the
closed loop poles carefully when using pole placement design.

Sensitivities and Relative Damping


For simple low order control systems we have based design criteria on the
patterns of the poles and zeros of the complementary transfer function. To
relate the general results on robustness to the analysis of the simple con-
trollers it is of interest to find the relations between the sensitivities and
relative damping. The complementary sensitivity function for a standard
second order system is given by

ω 02
T ( s) =
s2 + 2ζ ω 0 s + ω 02

This implies that the sensitivity function is given by

s(s + 2ζ ω 0 )
S ( s) = 1 − T ( s) =
s2 + 2ζ ω 0 s + ω 02

Straight forward but tedious calculations give.

228
5.6 When are Two Processes Similar?
s
8ζ 2 + 1 + (4ζ 2 + 1) 8ζ 2 + 1
p
Ms =
8ζ 2 + 1 + (4ζ 2 − 1) 8ζ 2 + 1
p

1 + 8ζ 2 + 1
p
wms = ω0
2
 √
1/(2ζ 1 − ζ 2 ) if ζ ≤ 2/2 (5.16)
p
Mt = √
1 if ζ > 2/2
 p √
ω 0 1 − 2ζ 2 if ζ ≤ 2/2
ω mt = √
0 if ζ > 2/2

The relation between the sensitivities and relative damping are shown in
Figure 5.16. The values ζ = 0.3, 0.5 and 0.7 correspond to the maximum
sensitivities Ms = 1.99, 1.47 and 1.28 respectively.

5.6 When are Two Processes Similar?


A fundamental issue is to determine when two processes are close. This
seemingly innocent problem is not as simple as it may appear. When dis-
cussing the effects of uncertainty of the process on stability in Section 5.5
we used the quantity

δ ( P1 , P2 ) = max h P1 (iω ) − P2 (iω )h (5.17)


ω

as a measure of closeness of two processes. In addition the transfer func-


tions P1 and P2 were assumed to be stable. This means conceptually that
we compare the outputs of two systems subject to the same input. This
may appear as a natural way to compare two systems but there are com-
plications. Two systems that have similar open loop behaviors may have
drastically different behavior in closed loop and systems with very differ-
ent open loop behavior may have similar closed loop behavior. We illus-
trate this by two examples.

EXAMPLE 5.4—SIMILAR IN OPEN LOOP BUT DIFFERENT IN CLOSED LOOP


Systems with the transfer functions

1000 1000a2
P1 (s) = , P2 (s) =
s+1 (s + 1)(s + a)2

have very similar open loop responses for large values of a. This is il-
lustrated in Figure 5.17 which shows the step responses of for a = 100.

229
Chapter 5. Feedback Fundamentals

1000

800

600

400

200

0
0 1 2 3 4 5 6 7 8

Figure 5.17 Step responses for systems with the transfer functions P1 (s) =
1000/(s + 1) and P2 (s) = 107 /((s + 1)(s + 100)2 ).

The differences between the step responses are barely noticeable in the
figure. The transfer functions from reference values to output for closed
loop systems obtained with error feedback with C = 1 are

1000 107
T1 = , T2 =
s + 1001 (s − 287)(s2 + 86s + 34879)

The closed loop systems are very different because the system T1 is stable
and T2 is unstable.

EXAMPLE 5.5—DIFFERENT IN OPEN LOOP BUT SIMILAR IN CLOSED LOOP


Systems with the transfer functions

1000 1000
P1 (s) = , P2 (s) =
s+1 s−1

have very different open loop properties because one system is unstable
and the other is stable. The transfer functions from reference values to
output for closed loop systems obtained with error feedback with C = 1
are
1000 1000
T1 (s) = T2 (s) =
s + 1001 s + 999
which are very close.

These examples show clearly that to compare two systems by investigating


their open loop properties may be strongly misleading from the point
of view of feedback control. Inspired by the examples we will instead
compare the properties of the closed loop systems obtained when two

230
5.7 The Sensitivity Functions

processes P1 and P2 are controlled by the same controller C. To do this


it will be assumed that the closed loop systems obtained are stable. The
difference between the closed loop transfer functions is
P1 C P2 C ( P1 − P2 ) C
δ ( P1 , P2 ) = − = (5.18)

1 + P1 C 1 + P2 C (1 + P1 C )(1 + P2 C )

This is a natural way to express the closeness of the systems P1 and P2 ,


when they are controlled by C. It can be verified that δ is a proper norm
in the mathematical sense. There is one difficulty from a practical point
of view because the norm depends on the feedback C. The norm has some
interesting properties.
Assume that the controller C has high gain at low frequencies. For
low frequencies we have

P1 − P2
δ ( P1 , P2 ) 
P1 P2 C

If C is large it means that δ can be small even if the difference P1 − P2 is


large. For frequencies where the maximum sensitivity is large we have

δ ( P1 , P2 )  Ms1 Ms2 h C( P1 − P2 )h

For frequencies where P1 and P2 have small gains, typically for high
frequencies, we have

δ ( P1 , P2 )  h C( P1 − P2 )h

This equation shows clearly the disadvantage of having controllers with


large gain at high frequencies. The sensitivity to modeling error for high
frequencies can thus be reduced substantially by a controller whose gain
goes to zero rapidly for high frequencies. This has been known empirically
for a long time and it is called high frequency roll off.

5.7 The Sensitivity Functions


We have seen that the sensitivity function S and the complementary sen-
sitivity function T tell much about the feedback loop. We have also seen
from Equations (5.6) and (5.14) that it is advantageous to have a small
value of the sensitivity function and it follows from (5.11) that a small
value of the complementary sensitivity allows large process uncertainty.
Since
1 P ( s) C ( s)
S ( s) = and T (s) =
1 + P ( s) C ( s) 1 + P ( s) C ( s)

231
Chapter 5. Feedback Fundamentals

it follows that
S ( s) + T ( s) = 1 (5.19)
This means that S and T cannot be made small simultaneously. The loop
transfer function L is typically large for small values of s and it goes to
zero as s goes to infinity. This means that S is typically small for small s
and close to 1 for large. The complementary sensitivity function is close
to 1 for small s and it goes to 0 as s goes to infinity.
A basic problem is to investigate if S can be made small over a large
frequency range. We will start by investigating an example.

EXAMPLE 5.6—SYSTEM THAT ADMITS SMALL SENSITIVITIES


Consider a closed loop system consisting of a first order process and a
proportional controller. Let the loop transfer function

k
L( s ) = P ( s ) C ( s ) =
s+1
where parameter k is the controller gain. The sensitivity function is
s+1
S ( s) =
s+1+k
and we have
1 + ω2
r
h S(iω )h =
1 + 2k + k2 + ω 2
This implies that h S(iω )h < 1 for all finite frequencies and that the sensi-
tivity can be made arbitrary small for any finite frequency by making k
sufficiently large.
The system in Example 5.6 is unfortunately an exception. The key feature
of the system is that the Nyquist curve of the process lies in the fourth
quadrant. Systems whose Nyquist curves are in the first and fourth quad-
rant are called positive real. For such systems the Nyquist curve never
enters the region shown in Figure 5.11 where the sensitivity is greater
than one.
For typical control systems there are unfortunately severe constraints
on the sensitivity function. Bode has shown that if the loop transfer has
poles pk in the right half plane and if it goes to zero faster than 1/ s for
large s the sensitivity function satisfies the following integral

1
Z ∞ Z ∞
log h S(iω )hdω = dω = π
X
log Re pk (5.20)
0 0 h1 + L(iω )h

This equation shows that if the sensitivity function is made smaller for
some frequencies it must increase at other frequencies. This means that

232
5.7 The Sensitivity Functions

0
log h S(iω )h

−1

−2

−3
0 0.5 1 1.5 2 2.5 3
ω

Figure 5.18 Geometric interpretation of Bode’s integral formula (5.20).

if disturbance attenuation is improved in one frequency range it will be


worse in other. This is also called the water bed effect.
Equation (5.20) implies that there are fundamental limitations to what
can be achieved by control and that control design can be viewed as a
redistribution of disturbance attenuation over different frequencies.
For a loop transfer function without poles in the right half plane (5.20)
reduces to Z ∞
log h S(iω )hdω = 0
0

This formula can be given a nice geometric interpretation as shown in


Figure 5.18 which shows log h S(iω )h as a function of ω . The area over the
horizontal axis must be equal to the area under the axis.

Derivation of Bode’s Formula*


This is a technical section which requires some knowledge of the theory
of complex variables, in particular contour integration. Assume that the
loop transfer function has distinct poles at s = pk in the right half plane
and that L(s) goes to zero faster than 1/ s for large values of s. Consider
the integral of the logarithm of the sensitivity function S(s) = 1/(1 +
L(s)) over the contour shown in Figure 5.19. The contour encloses the
right half plane except the points s = pk where the loop transfer function
L(s) = P(s) C (s) has poles and the sensitivity function S(s) has zeros. The
direction of the contour is counter clockwise.
Z Z −iR Z XZ
log( S(s))ds = log( S(s))ds + log( S(s))ds + log( S(s))ds
Γ iR R k γ

= I1 + I2 + I3 = 0

233
Chapter 5. Feedback Fundamentals

Figure 5.19 Contour used to prove Bode’s theorem.

where R is a large semi circle on the right and γ k is the contour starting
on the imaginary axis at s = Im pk and a small circle enclosing the pole
pk . The integral is zero because the function log S(s) is regular inside the
contour. We have
Z R Z R
I1 = −i log( S(iω ))dω = −2i log(h S(iω )h)dω
−R 0

because the real part of log S(iω ) is an even function and the imaginary
part is an odd function. Furthermore we have
Z Z Z
I2 = log( S(s))ds = log(1 + L(s))ds  L(s)ds
R R R

Since L(s) goes to zero faster than 1/ s for large s the integral goes to
zero when the radius of the circle goes to infinity. Next we consider the
integral I3 , for this purpose we split the contour into three parts X + , γ
and X − as indicated in Figure 5.19. We have
Z Z Z Z
I3 = log S(s)ds = log S(s)ds + log S(s)ds + log S(s)ds
γ X+ γ X−

The contour γ is a small circle with radius r around the pole pk . The
magnitude of the integrand is of the order log r and the length of the

234
5.8 Reference Signals

path is 2π r. The integral thus goes to zero as the radius r goes to zero.
Furthermore we have
Z Z Z
log S(s)ds + log S(s)ds = log S(s) − log S(s − 2π i) ds

X+ X− X+
Z
log h S(s)h + i arg S(s) − log h S(s − 2π i)h − i arg S(s − 2π i) ds

=
X
Z+
arg S(s) − arg S(s − 2π i) ds = 2π iRe pk

=i
X+

Notice that the argument of S decreases by 2π when the origin is encir-


cled. Letting the small circles go to zero and the large circle go to infinity
and adding the contributions from all right half plane poles pk gives
Z R
log h S(iω )h dω + i 2π pk = 0.
X
I1 + I2 + I3 = −2i
0 k

which is Bode’s formula (5.20).

5.8 Reference Signals


The response of output y and control u to reference r for the systems in
Figure 5.1 having two degrees of freedom is given by the transfer functions

PC F
G yr = = FT
1 + PC
CF
Gur =
1 + PC
First we can observe that if F = 1 then the response to reference signals
is given by T. In many cases the transfer function T gives a satisfactory
response but in some cases it may be desirable to modify the response. If
the feedback controller C has been chosen to deal with disturbances and
process uncertainty it is straight forward to find a feedforward transfer
function that gives the desired response. If the desired response from
reference r to output y is characterized by the transfer function M the
transfer function F is simply given by

M (1 + PC ) M
F= = (5.21)
T PC
The transfer function F has to be stable and it therefore follows that all
right half plane zeros of C and P must be zeros of M . Non-minimum phase

235
Chapter 5. Feedback Fundamentals

properties of the process and the controller therefore impose restrictions


on the response to reference signals. The transfer function given by (5.21)
can also be complicated so it may be useful to approximate the transfer
function.

Tracking of Slowly Varying Reference Signals


In applications such as motion control and robotics it may be highly de-
sirable to have very high precision in following slowly varying reference
signals. To investigate this problem we will consider a system with error
feedback. Neglecting disturbances it follows that

E ( s ) = S ( s ) R( s )

To investigate the effects of slowly varying reference signals we make a


Taylor series expansion of the sensitivity function

S(s) = e0 + e1 s + e2 s2 + . . . .

The coefficients ek are called error coefficients. The output generated by


slowly varying inputs is thus given by

dr(t) d2 r(t)
y(t) = r(t) − e0 r(t) − e1 − e2 + ... (5.22)
dt dt2
Notice that the sensitivity function is given by
1
S ( s) =
1 + P ( s) C ( s)
The coefficient e0 is thus zero if P(s) C (s)  1/ s for small s, i.e. if the
process or the controller has integral action.

EXAMPLE 5.7—TRACKING A RAMP SIGNALS


Consider for example a ramp input

r(t) = v0 t.

It follows from (5.22) that the output is given by

y(t) = v0 t − e0 v0 t − e1 v0 .

The error grows linearly if e0 = 0. If e0 = 0 there is a constant error which


is equal to e1 v0 in the steady state.
The example shows that a system where the loop transfer function has
an integrator there will be a constant steady state error when tracking
a ramp signal. The error can be eliminated by using feedforward as is
illustrated in the next example.

236
5.8 Reference Signals

EXAMPLE 5.8—REDUCING TRACKING ERROR BY FEEDFORWARD


Consider the problem in Example 5.7. Assume that e0 = 0. Introducing
the feedforward transfer function

F = 1 + f1s (5.23)

we find that the transfer function from reference to output becomes

G yr (s) = F (s)T (s) = F (s) 1 − S(s)




= (1 + f 1 s)(1 − e0 − e1 s − e2 s2 − . . .)
= 1 − e0 + ( f 1 (1 − e0 ) − e1 )s + ( e2 − f 1 e2 )s2 + . . .

If the controller has integral action it follows that e0 = 0. It then follows


that the tracking error is zero if f 1 = e1 . The compensator (5.23) implies
that the feedforward compensator predicts the output. Notice that two
coefficients have to be matched.
The error in tracking ramps can also be eliminated by introducing an
additional integrator in the controller as is illustrated in the next example.

EXAMPLE 5.9—REDUCING TRACKING ERROR BY FEEDBACK


Choosing F = 1 and a controller which gives a loop transfer function with
two integrators we have
k
L( s )  2
s
for small s. This implies that e0 = e1 = 0 and e2 = 1/ k and it follows from
(5.22) that there will be no steady state tracking error. There is, however,
one disadvantage with a loop transfer function having two integrators
because the response to step signals will have a substantial overshoot.
The error in the step response is given by

1
E ( s) = S ( s)
s

The integral of the error is

E ( s) 1
= S ( s) 2
s s

Using the final value theorem we find that

t
sS(s)
Z
lim e(τ )dτ = lim =0
t→∞ 0 s→0 s2

237
Chapter 5. Feedback Fundamentals

1.4

1.2

Step response
1

0.8

0.6

0.4

0.2

0
0 1 2 3 4 5 6 7 8 9 10
Time

10
Ramp response

0
0 1 2 3 4 5 6 7 8 9 10
Time

Figure 5.20 Step (above) and ramp (below) responses for a system with error
feedback having e0 = e1 = 0.

Since the integral of the error for a step in the reference is zero it means
that the error must have an overshoot. This is illustrated in Figure 5.20.
This is avoided if feedforward is used.
The figure indicates that an attempt to obtain a controller that gives good
responses to both step and ramp inputs is a difficult compromise if the
controller is linear and time invariant. In this case it is possible to resolve
the compromise by using adaptive controllers that adapt their behavior
to the properties of the input signal.
Constraints on the sensitivities will, in general, give restrictions on the
closed loop poles that can be chosen. This implies that when controllers
are designed using pole placements it is necessary to check afterwards
that the sensitivities have reasonable values. This does in fact apply to all
design methods that do not introduce explicit constraints on the sensitivity
functions.

5.9 Implications for Pole Placement Design*


Analysis of the sensitivity functions has shown that the closed loop poles
must be related to the poles and zeros of the process in order to have a

238
5.9 Implications for Pole Placement Design*

system with reasonable robustness. A typical situation was illustrated in


Example 5.3. In this section we will investigate this further in order to
obtain design rules for pole placement design.

A Design Procedure
To preform a design we start with a mathematical model of the system in
the form of the transfer function
n(s) −sT
P ( s) = e
d(s)
Since the design procedure is based on the assumption that the transfer
function is rational the time delay is approximated by
1 − sT /2
e−sT 
1 + sT /2
This gives a process model having the transfer function
n(s)(1 − sT /2) b(s)
P ( s) = = (5.24)
d(s)(1 + sT /2) a(s)
With this approximation a time delay T shows up as a right half plane
zero at s = 2/ T. The controller is assumed to have the transfer function
g(s)
C ( s) =
f ( s)
The closed loop characteristic polynomial is
c(s) = a(s) f (s) + b(s)g(s) (5.25)
Dominant Poles
A essential element in the design is to select a characteristic polynomial
c(s) which gives a closed loop system with desired properties. To do this we
starts by choosing the dominant poles ω 0 which specify the main proper-
ties of the closed loop system. We can either have a single dominant pole
that corresponds to the factor s + ω 0 of c(s) or a pair of complex poles
which correspond to the factor s2 + 2ζ 0ω 0 s + ω 02 . The frequencies ω gc , ω s
and ω ms are close to ω 0 , the bandwidth is proportional to ω 0 and the re-
sponse time is inverserly proportional to ω s . The dominant poles can be
defined formally as the poles of the transfer function T (s) with the largest
real part and the largest residual. For systems of high order there may be
more than two dominant poles. This will not be discussed because there
are other design methods for such systems. The choice of first or second
order dominant pole depends on the process and the specifications. We
illustrate this by an example.

239
Chapter 5. Feedback Fundamentals

EXAMPLE 5.10—PI CONTROL OF A FIRST ORDER SYSTEM


For PI control of a first order system

b
P ( s) =
s+a
the closed loop system is completely characterized by two poles. In Exam-
ple 5.3 it was shown that if ω 0 < a it is necessary to choose the closed
loop poles as
c(s) = (s + ω 0 )(s + a)
This means that there is a single dominant pole ω 0 and that the fast
process pole appears as a pole of the closed loop system. The controller is

ω 0 (s + a)
C ( s) =
bs
which implies that the fast process pole s = −a is canceled by a controller
zero. The closed loop system will approximately behave like a first order
system with the pole s = −ω 0 . The response time of the closed loop system
is approximately 1/ω 0 , which is slower than the response time of the open
loop system. If a faster response is required, i.e. ω 0 ≥ a, the polynomial
can be chosen as
c(s) = s2 + 2ζ 0ω 0 s + ω 02
The controller is then
(2ζ 0ω 0 − a)s + ω 02
C ( s) =
bs

Since ω 0 is close to the gain crossover frequency ω gc it also separates the


frequency ranges where the loop gain is large and small. The loop gain
is typically large for frequencies less than ω 0 and small for frequencies
larger than ω 0 .
When the loop gain is small we have

P
P
1 + PC
This means that the closed loop system has poles close to process poles
larger than ω 0 . This implies that ω 0 must be larger than the h prhp h, where
prhp is the process pole in the right half plane with the largest magnitude.
When the loop gain is large we have

C 1

1 + PC P

240
5.9 Implications for Pole Placement Design*

This means that the closed loop system has poles close to the process zeros
smaller than ω 0 . This implies that ω 0 must be smaller than the h zrhph,
where zrhp is the process zer in the right half plane with the smallest
magnitude.
Process poles and zeros in the right half plane thus give severe restric-
tions in the choice of dominant poles.

Model Reduction and Cancellations of Process Poles and Zeros


When the dominant poles have been chosen the model can often be sim-
plified. Stable poles and zeros that are much larger than ω 0 can simly be
neglected. Fast unstable zeros can be neglect but fast unstable poles can-
not be neglected because the closed loop system will have poles close to the
neglected poles. The approximations may be delicated but the following
simple rules can serve as a guide line.
• Real poles and zeros can be neglected if their total phase lag at ω 0
is less than 0.05-0.2 rad.
• Complex poles can be neglected if the loop transfer function at the
resonance has magnitude less than 1/ Ms . This guarantees that they
will not give a large sensitivity even if there is a large phase error.
The approximations will reduce the order of the process model and the
number of closed loop poles that have to be selected.
Cancellation of process poles and zeros is another way to simplify the
pole placement design. Poles and zeros that are canceled will not appear
in the loop transfer function. They will however appear as closed loop
poles and in the transfer functions P/(1 + PC ) and C /(1 + PC ). It may
also be necessary to have cancellations in order to avoid having to large
sensitivities as illustrated in Example ??. To see the effects of cancellations
we will analyse the sensitivity functions

1 a(s) f (s)
S= =
1 + PC a(s) f (s) + b(s)g(s)
PC b(s)g(s)
T= =
1 + PC a(s) f (s) + b(s)g(s)

The sensitivity function S is close to one for large frequencies, ω >> ω 0 .


Process poles appear as zeros of the sensitivity function. Sketching the
asymptotes of the gain curve of S for high frequencies reveals that the
sensitivity function will have peaks at high frequencies unless fast process
poles are matched by corresponding poles of the closed loop system. We
can thus conclude that fast stable process poles should be canceled. Fast
unstable process poles cannot be canceled as discussed before.

241
Chapter 5. Feedback Fundamentals

The complementary sensitivity function T is close to one for low fre-


quencies ω << ω 0 . Process zeros appear as zeros of the complementary
sensitivity function. Sketching the asymptotes of the gain curve of T for
low frequencies reveals that the complementary sensitivity function will
have peaks at low frequencies unless fast process poles are matched by
corresponding poles of the closed loop system. We can thus conclude that
slow stable process zeros should be canceled. Slow unstable process zeros
cannot be canceled as discussed before.

Design Procedure and Design Rules


Summarizing we obtain the following procedure for pole placement design.

• Start by developing a process model, approximate time delays by a


rational function.

• Choose the dominant pole(s) ω 0 subject to constraints by:

– Right half plane process poles imply that ω 0 > h prhph, where prhp
is the right half plane process pole with largest magnitude.
– Right half plane process zeros imply that ω 0 < h zrhp h, where prhp
is the right half plane process zero with smallest magnitude.
– Notice that there are process with poles and zeros in the right
half plane such that it may not be possible to find ω 0 . The
process must then be modified by adding actuators and sensors
or by redesign.

• Neglect stable poles and zeros using the following rules:

Real poles and zeros can be neglected if their total phase lag at
ω 0 is less than 0.05-0.2 rad.
Complex poles can be neglected if the loop transfer function at
the resonance has magnitude less than 1/ Ms . This guarantees
that they will not give a large sensitivity even if there is a large
phase error.

• Cancel fast stable process poles and slow stable process zeros by
correspondign controller poles and zeros.

• Solve the pole placement problem for the reduced process model.

• Obtain the complete controller by adding the canceled process poles


and zeros.

We will elaborate the design procedure in two cases.

242
5.9 Implications for Pole Placement Design*

EXAMPLE 5.11—CONTROLLERS WITHOUT INTEGRAL ACTION


We will first present one possible choice for controllers that do not have in-
tegration. A causal process model has deg a(s) ≥ deg b(s). It is desirable
to have a controller with high frequency roll-off, i.e. deg f(s) > deg g(s).
These conditions imply that deg c(s) = deg a(s)f(s). Among all solutions
to (5.25) there is one solution such that deg g(s) < deg a(s) = n. Hence
deg f(s) = n and deg g(s) = n − 1.
To select the closed loop characteristic polynomial we first determine
the desired bandwidth ω B of the closed loop system. The polynomials in
the process transfer function are then factored as
a(s) = ā(s)a(s)
b(s) = b̄(s)b(s)
where ā(s) is a factor that contains all poles of a(s) that are faster than
ω b and b(s) contains all process zeros that are slower than ω b . To have
a sensitivity function that is not too large for high frequencies the closed
loop characteristic polynomial must have factors that are close to ā(s),
close means approximately a factor of 2. Similarly to have a complemen-
tary sensitivity function that is close to one for low frequencies the closed
loop characteristic polynomial must have factors corresponding to b(s).
One possibility to achieve this is to choose
c(s) = c̃(s)ā(s)b(s)
It then follows from (5.25) that
a(s)ā(s) f (s) + b(s)b̄(s)g(s) = c̃(s)ā(s)b(s)
which implies that
f (s) = f˜ (s)b(s)
g(s) = g̃(s)ā(s)
where
a(s) f˜(s) + b̄(s)g̃(s) = c̃(s)
and deg g(s) = na = n − nā − 1 = nã − 1, deg f(s) = n − nb and
deg c̃ = 2n − nb − nā . The degree of the diophantine equation that has
to be solved is thus reduced substantially. Some of the roots of c̃ will be
the dominating poles of the closed loop system. A few of the other closed
loop poles that are associated with high frequency roll off of the controller
should have higher frequencies. It is straight forward to choose closed
loop poles for systems of low order but much more difficult to choose
them for systems of high orders. In such cases it is useful to consider
other designmethods.

243
Chapter 5. Feedback Fundamentals

EXAMPLE 5.12—CONTROLLERS WITH INTEGRAL ACTION


A controller with integral action has f (0) = 0, hence f (s) = s fˆ(s) and
(5.25) becomes.
sa(s) fˆ(s) + b(s)g(s) = c(s) (5.26)
A causal process model has deg a(s) ≥ deg b(s). It is desirable to have
a controller with high frequency roll-off, i.e. deg f(s) > deg g(s). These
conditions imply that deg c(s) = deg a(s)f(s). Among all solutions to
(5.25) there is one solution such that deg g(s) = deg a(s) = n. Hence
deg f̂(s) = n and deg g(s) = n. Using the same arguments as for a
process without integral action we find that slow zeros (roots of b(s)) and
fast poles (roots of ā(s)) should be canceled by the controller, hence

c(s) = c̃(s)ā(s)b(s)
fˆ(s) = f˜(s)b(s)
g(s) = g̃(s)ā(s)

where
sa(s) f˜(s) + b̄(s)g̃(s) = c̃(s) (5.27)

An Example
The design procedure will be illustrated by an few examples. Consider a
process with the transfer function

1
P ( s) = (5.28)
(s + 1)(0.1s + 1)(0.01s + 1)(0.001s + 1)

We will discuss controller designs for different choices of ω 0 .

A PI Controller for Small ω 0 The slowest process pole is s = −1.


Assume that we want a controller that gives a slow closed loop system
the process transfer function can be approximated by

P ( s)  1 (5.29)

The total phase lag of the neglected process poles at ω 0 is 1.111ω 0 . Using
the design rules this means that ω 0 has to be slightly smaller than 0.2.
The approximated process can be controlled by the integrating controller

ω0 ki
C ( s) = =
s s

244
5.9 Implications for Pole Placement Design*

PC /(1 + PC ) P/(1 + PC )
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0 10 20 30 40 50 0 10 20 30 40 50

C /(1 + PC ) 1/(1 + PC )
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0 10 20 30 40 50 0 10 20 30 40 50

Figure 5.21 Step response of the gang of four for integrating control of the process
P(s) = 1/((s + 1)(0.1s + 1)(0.01s + 1)(0.001s + 1)) with ki = 0.1 (full), 0.2 (dashed)
and 0.5(dash-dotted). The dotted curves shows the response for the PI controllers
with the simplified process model P(s) = 1.

which gives a closed loop system of first order with the pole s = ki = ω 0 .
The closed loop characteristic polynomial with the true model is

c(s) = (s + 0.1144)(s + 0.8733)(s + 10.01)(s + 100)(s + 1000)

The closed loop system has one pole at -0.114 which is close to the specified
value 0.1. The next pole at -0.87 is close to the open loop pole at -1 and the
remaining poles are very close to the open loop poles at -10, -100 and -1000.
Figure 5.21 shows the step responses of the Gang of Four. The responses
PC /(1 + PC ), C /(1 + PC ) and PC /(1 + PC ) are close to responses of first
order systems for ω 0 = 0.1 and 0.2. There are substantial deviations for
ω 0 = ki = 0.5 and even closer for ω 0 = 0.1. The higher order dynamics is
clearly visible in the step of responses P/(1 + PC ).

PI Control The approximation given by (5.29) is poor for higher fre-


quencies. Better approximations are required to obtain controllers with
faster responses. To design controllers with ω 0 up to 1 the process (5.28)
is approximated by neglecting the poles s = −10, -100 and -1000. The

245
Chapter 5. Feedback Fundamentals

y11 y12
0.6
1
0.5
0.8
0.4
0.6
0.3

0.4 0.2

0.2 0.1

0 0
0 2 4 6 8 10 0 2 4 6 8 10

y21 y22
2.5 1

2 0.8

0.6
1.5

0.4
1
0.2
0.5
0
0
0 2 4 6 8 10 0 2 4 6 8 10

Figure 5.22 Step response of the gang of four for PI control of the process P(s) =
1/((s + 1)(0.1s + 1)(0.01s + 1)(0.001s + 1)) with the controller C(s) = ki (1 + 1/s)
for ki = 0.5 (full), 1 (dashed) and 2 (dash-dotted). The dotted curves shows the
response for the PI controller with the simplified process model P(s) = 1/(s + 1).

approximated model then becomes

1
P ( s)  . (5.30)
s+1

for 0.1 < ω s < 1 we simply cancel the process pole at s = 1 with a
controller zero. After cancellation the process transfer function becomes
P(s) = 1 and we can use integrating controller. With the approximated
model the closed loop system is still of first order with the dominating
pole ω 0 = ki . Adding the controller zero required to cancel the process
pole the complete controller becomes

s+1
C (s) = ki
s

With k = 1 the closed loop system has poles at s = −1.0, -1.14, -8.7, -
100 and -1000. Figure 5.22 shows the step responses of the Gang of Four.
The responses y11 and y21 are close to responses of first order systems for
all values of ki in the figure. To get a significant deveiation ki has to be

246
5.9 Implications for Pole Placement Design*

increased to 5. Higher order dynamics isclearly visible in the responses


y12 and y22 .
For ω 0 ≥ 1 it controllers with two dominating poles can be designed.
The controller then becomes

(2ζ 0ω 0 − 1)s + ω 02
C ( s) =
s

PID Control A comparison of Figures 5.21 and 5.22 shows that the
response speed can be increased significantly by using PI control instead
of an pure integrating control. The response speed can be increased even
higher by using PID control. Since a PID controller permits arbitrary pole
placement for a second order system the process will be approximated by

1 10
P ( s)  = (5.31)
(s + 1)(0.1s + 1) (s + 1)(s + 10)

The phase lag at ω 0 of the neglected poles is 0.011ω 0 which implies that
the model permits values of ω 0 up to 20. For ω 0 < 10 the controller can
be designed simply by canceling the fast process pole at s = −10. This
gives the process model P1 (s) = 1/(s + 1). Equation (5.27) then becomes

s(s + 1) fˆ(s) + g̃(s) = c̃(s)

There is a solution with deg g̃(s) = 1 deg f̂(s) = 1 which means that
deg c̃(s) = 3. We choose two complex dominant poles specified by ω 0 and
ζ 0 . The remaining closed loop pole is chosen as s = − Nω 0 . Hence

s(s + 1)(s + f 1 ) + g0 s + g1 = (s2 + 2ζ 0ω 0 s + ω 02 )(s + Nω 0 )

Identification of coefficients of equal powers of s gives

1 + f 1 = (2ζ 0 + N )ω 0
f 1 + g0 = (1 + 2ζ 0 N )ω 02
g1 = Nω 03

This equation has the solution

f 1 = (2ζ 0 + N )ω 0 − 1
g0 = (1 + 2ζ 0 N )ω 02 − (2ζ 0 + N )ω 0 + 1
g1 = Nω 03

247
Chapter 5. Feedback Fundamentals

Table 5.1 Properties of closed loop system with different controllers.

Controller ω0 K ki emax hh 1+PPC hh umax hh 1+CPC hh


I 0.1 0 0.1 0.84 1.0 68 1.0
PI 1.0 1.0 1.0 0.39 0.53 1.09 1.11
PID 10 21.1 88.5 0.038 0.632 139 139

The controller transfer function is thus

(g0 s + g1 )(s + 10) kd s2 + ks + ki


C ( s) = = (5.32)
10s(s + f 1 ) s(1 + sT f )

where

g0 (0.1 + 0.2ζ 0 N )ω 02 − (0.2ζ 0 + 0.1N )ω 0 + 0.1


kd = =
10 f 1 (2ζ 0 + N )ω 0 − 1
g0 + 0.1g1 (1 + 2ζ 0 N )ω 02 − 0.9(2ζ 0 + N )ω 0 + 0.9
k= =
f1 (2ζ 0 + N )ω 0 − 1
g1 Nω 03
ki = =
f1 (2ζ 0 + N )ω 0 − 1
1 1
Tf = =
f1 (2ζ 0 + N )ω 0 − 1

With ω 0 = 10 and ζ 0 = 0.7 the closed loop system has poles at s = −10 ,
−7.5 ± 8i, -58.7 -140 and -1000. These values can be compared with the
poles −7 ± 7.14 and -100 for the closed loop obtained with the simplified
model. The dominant poles are close but the real poles is different. Fig-
ure 5.23 shows the step responses of the Gang of Four. The curves indicate
that the approximations are reasonable.

Comparing the Controllers A comparsion of Figures 5.21, 5.22 and


5.23 illustrates the differences between performances obtained with the
different controllers. Some numerical properties of the closed loop system
are also given in Table 5.1. The disturbance rejection is characterized by
the maximum error for a unit step load disturbance emax and the largest
gain of the transfer function P/(1+ PC ). Sensitivity to load disturbances is
given by the initial value of step response of the transfer function C /(1 +
PC ) or by the largest gain of the transfer function. The response time
is inversely proportional to integral gain ki . The table shows that the
attenuation of load disturbances is improved substantially by using PI

248
5.10 Fundamental Limitations*

y11 y12
1.2 0.1

1 0.08
0.8
0.06
0.6
0.04
0.4

0.2 0.02

0 0
0 0.5 1 1.5 0 0.5 1 1.5

y21 y22
10 1

0.8
5
0.6

0 0.4

0.2
−5
0

−10 −0.2
0 0.5 1 1.5 0 0.5 1 1.5

Figure 5.23 Step response of the gang of four for PI control of the process P(s) =
1/((s + 1)(0.1s + 1)(0.01s + 1)(0.001s + 1)) with a PID controller (5.32) designed for
ζ 0 = 0.7, ω 0 = 5 (full) and 10 (dashed). The dotted curves shows the response for
PI controllers with the simplified process model P(s) = 10/((s + 1)(s + 10)).

control. The maximum error drops from 0.84 to 0.39. The improvement
is obtained by a barely perceptible increase of the high frequency gain of
the controller. The response time also decreases significantly as is seen
from the values of the integral gain and the step responses.
Response time is decreased even further by using PID control. Load
disturbance attenuation also improves substantially, emax decreases from
0.39 to 0.038 compared to PID control. A large increase of controller gain
is however required to obtain this improvement.

5.10 Fundamental Limitations*


It is important to be aware of fundamental limitations. In this section
we will discuss these for the simple feedback loop. We will discuss how
quickly a system can respond to changes in the reference signal. Some of
the factors that limit the performance are

• Measurement noise

249
Chapter 5. Feedback Fundamentals

• Actuator saturation
• Process dynamics

Measurement Noise and Saturations


It seems intuitively reasonable that fast response requires a controller
with high gain which gives a fast closed loop system. When the controller
has high gain measurement noise is also amplified and fed into the system.
This will result in variations in the control signal and in the process
variable. It is essential that the fluctuations in the control signal are not
so large that they cause the actuator to saturate. Since measurement
noise typically has high frequencies the high frequency gain Mc of the
controller is thus an important quantity. Measurement noise and actuator
saturation thus gives a bound on the high frequency gain of the controller
and therefore also on the response speed.
There are many sources of measurement noise, it can caused by the
physics of the sensor, in can be electronic. In computer controlled systems
it is also caused by the resolution of the analog to digital converter. Con-
sider for example a computer controlled system with 12 bit AD and DA
converters. Since 12 bits correspond to 4096 it follows that if the high
frequency gain of the controller is Mc = 4096 one bit conversion error will
make the control signal change over the full range. To have a reasonable
system we may require that the fluctuations in the control signal due
to measurement noise cannot be larger than 5% of the signal span. This
means that the high frequency gain of the controller must be restricted
to 200.

Dynamics Limitations
The limitations caused by noise and saturations seem quite obvious. It
turns out that there may also be severe limitations due to the dynamical
properties of the system. This means that there are systems that are in-
herently difficult or even impossible to control. Designers of any system
should be aware of this. Since systems are often designed from static con-
siderations the difficulties caused by dynamics do not show up. We have
already encountered this in Section 5.9 where we found that it was nec-
essary to choose the dominant pole so that ω 0 is larger than the fastest
unstable pole but smaller than the slowest zero. It seems intuitively rea-
sonable that a fast closed loop system is required to stabilize an unstable
pole and that the response speed should be matched to the unstable pole.
In the same way it seems reasonable that it is not possible to get a very
rapid response for a system with a time delay. Since a right half plane
zero s = z is similar to a time delay T = 1/2z it then follows that a right
half plane zero limits the achievable response time.

250
5.10 Fundamental Limitations*

To give quantitative results we will characterize the closed loop sys-


tem by the gain crossover frequency ω gc . This is the smallest frequency
where the loop transfer function has unit magnitude, i.e. h L(iω gc )h. This
parameter is approximately inversely proportional to the response time
of a system. The dynamic elements that cause limitations are time delays
and poles and zeros in the right half plane. The key observations are:

• A time delay Td limits the response speed. A simple rule of thumb


is
ω gc Td < 0.7 (5.33)

• A right half plane zero zrhp limits the response speed. A simple rule
of thumb is
ω gc < 0.5zrhp (5.34)

Slow RHP zeros are thus particularly bad. Notice that if a time delay
is approximated by a zero in the right half plane we can apply the
rule for right half plane zeros to get ω gc Td < 1.

• A right half plane pole prhp requires high gain crossover frequency.
A simple rule of thumb is

ω gc > 2prhp (5.35)

Fast unstable poles require a high crossover frequency.

• Systems with a right half plane pole p and a right half plane zero z
cannot be controlled unless the pole and the zero are well separated.
A simple rule of thumb is

prhp > 6zrhp (5.36)

• A system with a a right half plane pole and a time delay Td cannot be
controlled unless the product prhp Td is sufficiently small. A simple
rule of thumb is
prhp Td < 0.16 (5.37)

A detailed discussion will be given in Chapter 7. We illustrate with a few


examples.

251
Chapter 5. Feedback Fundamentals

EXAMPLE 5.13—BALANCING AN INVERTED PENDULUM


Consider the situation when we attempt to balance a pole manually. An
inverted pendulum is an example of an unstable system. With manual
balancing there is a neural delay which is about Td = 0.04 s. The transfer
function from horizontal position of the pivot to the angle is

s2
G ( s) = g
s2 − Q

where g = 9.8 m/ s2 is the acceleration of


pgravity and Q is the length of the
pendulum. The system has a pole p = g/Q. The inequality (5.37) gives

0.04 g/Q = 0.16


p

Hence, Q = 0.6 m. Investigate the shortest pole you can balance.

EXAMPLE 5.14—BICYCLE WITH REAR WHEEL STEERING


The dynamics of a bicycle was derived in Section 4.6. To obtain the model
for a bicycle with rear wheel steering we can simply change the sign of the
velocity. It then follows from (??) that the transfer function from steering
angle β to tilt angle θ is

mV0 Q Js2 − mg l
P ( s) =
b −as + V0
Notice that the transfer function depends strongly on the forwardpvelocity
of the bicycle. The system thus has a right half plane pole at p = mgQ/ J
and a right half plane zero at z = V0 / a, and it can be suspected that the
system is difficult to control. The location of the pole does not depend on
velocity but the the position of the zero changes significantly with velocity.
At low velocities the zero is at the origin. For V0 = a mgQ/ J the pole and
p

the zero are at the same location and for higher velocities the zero is to
the right of the pole. To draw some quantitative conclusions we introduce
the numerical values m = 70 kg, Q = 1.2 m, a = 0.7, J = 120 kgm2 and
V = 5 m/s, give z = V / a = 7.14 rad/s and p = ω 0 = 2.6 rad/s we find
that p = 2.6. With V0 = 5 m/s we get z = 7.1, and p/ z = 2.7. To have a
situation where the system can be controlled it follows from (5.36) that
to have z/ p = 6 the velocity must be increased to 11 m/s. We can thus
conclude that if the speed of the bicycle can be increased to about 10 m/s
so rapidly that we do not loose balance it can indeed be ridden.
The bicycle example illustrates clearly that it is useful to assess the funda-
mental dynamical limitations of a system at an early stage in the design.
If this had been done the it could quickly have been concluded that the
study of rear wheel steered motor bikes in 4.6 was not necessary.

252
5.11 Electronic Amplifiers

Remedies
Having understood factors that cause fundamental limitations it is inter-
esting to know how they should be overcome. Here are a few suggestions.
Problems with sensor noise are best approached by finding the roots
of the noise and trying to eliminate them. Increasing the resolution of
a converter is one example. Actuation problems can be dealt with in a
similar manner. Limitations caused by rate saturation can be reduced by
replacing the actuator.
Problems that are caused by time delays and RHP zeros can be ap-
proached by moving sensors to different places. It can also be beneficial to
add sensors. Recall that the zeros depend on how inputs and outputs are
coupled to the states of a system. A system where all states are measured
has no zeros.
Poles are inherent properties of a system, they can only be modified
by redesign of the system.
Redesign of the process is the final remedy. Since static analysis can
never reveal the fundamental limitations it is very important to make an
assessment of the dynamics of a system at an early stage of the design.
This is one of the main reasons why all system designers should have a
basic knowledge of control.

5.11 Electronic Amplifiers


There are many variations on the prototype problem discussed in Sec-
tion 5.2. To illustrate this we will discuss electronic amplifiers. Examples
of such amplifiers have been given several times earlier, see Section 1.8
and Example 2.3.
The key issues in amplifier design are gain, noise and process varia-
tions. The purpose of an electronic amplifier is to provide a high gain and
a highly linear input output characteristics. The main disturbance is elec-
trical noise which typically has high frequencies. There are variations in
the components that create nonlinearities and slow drift that are caused
by temperature variations. A nice property of feedback amplifiers that
differ from many other processes is that many extra signals are available
internally.
The difficulty of finding a natural block diagram representation of a
simple feedback amplifier was discussed in Example 2.3. Some alternative
block diagram representations were given in Figure 2.10. In particular
we noted the difficulty that there was not a one to one correspondence
between the components and the blocks. We will start by showing yet
another representation. In this diagram we have kept the negative gain

253
Chapter 5. Feedback Fundamentals

V1 V V2
R2
R1 + R2 Σ −A

R1
R1 + R2

Figure 5.24 Block diagram of the feedback amplifier in Figure 2.9. Compare with
Figure 2.10

V1 R2 V V2
R1 + R2 Σ −A Σ

R1
R1 + R2

Figure 5.25 Generic block diagram of a feedback amplifier.

of the feedback loop in the forward path and the standard −1 block has
been replaced by a feedback. It is customary to use diagrams of this type
when dealing with feedback amplifiers. The generic version of the diagram
is shown in Figure 5.25. The block A represents the open loop amplifier,
block F the feedback and block H the feedforward. The blocks F and H
are represented by passive components.
For the circuit in Figure 5.24 we have

R1
F=
R1 + R2
R2
H=
R1 + R2

notice that both F and H are less than one.

The Gain Bandwidth Product


The input-output relation for the system in Figure 5.25 is given by

L V2
= −G
L V1
where
AH
G= (5.38)
1 + AF

254
5.11 Electronic Amplifiers

The transfer function of an operational amplifier can be approximated by

b
A( s ) =
s+a

The amplifier has gain b/ a and bandwidth a. The gain bandwidth product
is b. Typical numbers for a simple operational amplifier that is often used
to implement control systems, LM 741, are a = 50 Hz, b = 1 MHz. Other
amplifiers may have gain bandwidth products that are several orders of
magnitude larger.
Furthermore we have

R1 R2
F= , H=
R1 + R2 R1 + R2

Combining this with the expression for A(s) in (5.38) gives

bR2 bR2
G= 
( R1 + R2 )(s + a) + bR1 R2 s + bR1

where the approximation is obtained from the inequalities b >> a and


R2 >> R1 . The closed loop system thus has gain R2 R1 and bandwidth
ω 0 = bR1 / R2 and it follows that the gain bandwidth product is constant

Gain  Bandwidth = b

Notice that feedback does not change the gain bandwidth product. The
effect of feedback is simply to decrease the gain and increase the band-
width. This is illustrated in Figure 5.26 which shows the gain curves of
the open and closed loop systems. Also notice that the sensitivity of the
system is

1 ( R1 + R2 )(s + a) R2 (s + a)
S= = 
1 + AF ( R1 + R2 )(s + a) + bR1 R2 s + bR1

The high open loop gain of the amplifier is traded off for high bandwidth
and low sensitivity. This is some times expressed by saying that gain is the
hard currency of feedback amplifiers which can be traded for sensitivity
and linearity.

Sensitivity
It follows from (5.38) that

log G = log AH − log (1 + AF )

255
Chapter 5. Feedback Fundamentals

6
10

4
10
Gain

2
10

0
10
−2 −1 0 1 2 3 4 5 6
10 10 10 10 10 10 10 10 10
ω

Figure 5.26 Gain curves of the open loop amplifier (full lines) and the feedback
amplifier (dashed)

Differentiating this expression we find that

d log G 1
=
d log A 1 + AF
d log G AF
=−
d log F 1 + AF
d log G
=1
d log H

The loop transfer function is normally large which implies that it is only
the sensitivity with respect the amplifier that is small. This is, how-
ever, the important active part where there are significant variations.
The transfer functions F and H typically represent passive components
that are much more stable than the amplifiers.

Signal to Noise Ratio


The ratio between signal and noise is an important parameter for an
amplifier. Noise is represented by the signals n1 and n2 in Figure 5.25.
Noise entering at the amplifier input is more critical than noise at the
amplifier output. For an open loop system the output voltage is given by

Vol = N2 − A( N1 + H V1 )

For a system with feedback the output voltage is instead given by


1  1
Vcl = N2 − A( N1 + H V1 ) = Vol
1 + AF 1 + AF

256
5.12 Summary

The signals will be smaller for a system with feedback but the signal to
noise ratio does not change.

5.12 Summary
Having got insight into some fundamental properties of the feedback loop
we are in a position to discuss how to formulate specifications on a control
system. It was mentioned in Section 5.2 that requirements on a control
system should include stability of the closed loop system, robustness to
model uncertainty, attenuation of measurement noise, injection of mea-
surement noise ability to follow reference signals. From the results given
in this section we also know that these properties are captured by six
transfer functions called the Gang of Six. The specifications can thus be
expressed in terms of these transfer functions.
Stability and robustness to process uncertainties can be expressed by
the sensitivity function and the complementary sensitivity function

1 PC
S= , T= .
1 + PC 1 + PC

Load disturbance attenuation is described by the transfer function from


load disturbances to process output

P
G yd = = PS.
1 + PC

The effect of measurement noise is be captured by the transfer function

C
− Gun = = CS,
1 + PC

which describes how measurement noise influences the control signal. The
response to set point changes is described by the transfer functions

F PC FC
G yr = = FT , Gur = = FCS
1 + PC 1 + PC

Compare with (5.1). A significant advantage with controller structure


with two degrees of freedom is that the problem of set point response can
be decoupled from the response to load disturbances and measurement
noise. The design procedure can then be divided into two independent
steps.

257
Chapter 5. Feedback Fundamentals

• First design the feedback controller C that reduces the effects of


load disturbances and the sensitivity to process variations without
introducing too much measurement noise into the system
• Then design the feedforward F to give the desired response to set
points.

258
6
PID Control

Quotation
Authors, citation.

This chapter describes the PID controller which unquestionably the


most common way of solving practical control problem. Practical imple-
mentation issues are also discussed particularly mechanisms for avoiding
integrator windup. Methods for automatic tuning of a PID controller are
also discussed.

6.1 Introduction
The PID controller is by far the most common control algorithm. Most
practical feedback loops are based on PID control or some minor varia-
tions of it. Many controllers do not even use derivative action. The PID
controllers appear in many different forms, as a stand-alone controllers,
they can also be part of a DDC (Direct Digital Control) package or a hier-
archical distributed process control system or they are built into embedded
systems. Thousands of instrument and control engineers worldwide are
using such controllers in their daily work. The PID algorithm can be ap-
proached from many different directions. It can be viewed as a device that
can be operated with a few empirical rules, but it can also be approached
analytically.
This chapter gives an introduction to PID control. The basic algorithm
and various representations are presented in detail. A description of the
properties of the controller in a closed loop based on intuitive arguments
is given. The phenomenon of reset windup, which occurs when a controller
with integral action is connected to a process with a saturating actuator,
is discussed, including several methods to avoid it. Filters to reduce noise
influence and means to improve reference responses are also provided.
Implementation aspects of the PID controller are presented in Chap-

259
Chapter 6. PID Control

Figure 6.1 A PID controller takes control action based on past, present and pre-
diction of future control errors.

ter ??.

6.2 The PID Controller


The textbook version of the PID controller is
Z t
de
u(t) = ke(t) + ki e(τ )dτ + kd , (6.1)
0 dt

where u is the control signal and e is the control error ( e = r − y). The
reference value is also called the setpoint. The control signal is thus a
sum of three terms: the P-term (which is proportional to the error), the
I-term (which is proportional to the integral of the error), and the D-
term (which is proportional to the derivative of the error). The controller
parameters are proportional gain k, integral gain ki and derivative gain
kd . The controller can also be parameterized as

Zt
1
 
de(t)
u(t) = k e(t) + e(τ )dτ + Td , (6.2)
Ti dt
0

where Ti is called integral time and Td derivative time. The proportional


part acts on the present value of the error, the integral represent and
average of past errors and the derivative can be interpreted as a prediction
of future errors based on linear extrapolation, see Figure 6.1.

260
6.2 The PID Controller

1.5
P PI PID
1.5 1.5

1
1 1
y

y
0.5 0.5 0.5

0 0 0
0 5 10 15 20 0 5 10 15 20 0 5 10 15 20

4 4
2

2 2
u

u
1
0
0

−2 0
0 5 10 15 20 0 5 10 15 20 0 5 10 15 20
t t t

Figure 6.2 Responses to step changes in the command signal for proportional
(left), PI (middle) and PID controllers (right). The process has the transfer function
P(s) = 1/(s + 1)3 , the controller parameters are k = 1 (dashed), 2 and 5 (dash-
dotted) for the P controller, k = 1, ki = 0 (dashed), 0.2, 0.5 and 1 (dash-dotted)
for the PI controller and k = 2.5, ki = 1.5 and kd = 0 (dashed), 1, 2, 3 and 4
(dash-dotted) for the PID controller.

Proportional Action
Figure 6.2 shows the response of the output to a unit step in the com-
mand signal for a system with pure proportional control. The output never
reaches the steady state error. Let the process and the controller have
transfer functions P(s) and C (s). The transfer function from reference to
output is
P ( s) C ( s)
G yr (s) = (6.3)
1 + P ( s) C ( s)
The steady state gain with proportional control C (s) = k is

P(0) k
G yr (0) =
1 + P(0) k

The steady state error for a unit step is thus 1/(1 + kP(0). For the system
in Figure 6.2 with gains k = 1, 2 and 5 the steady state error is 0.5,
0.33 0.17. The error decreases with increasing gain, but the system also
becomes more oscillatory. Notice in the figure that the initial value of the
control signal equals controller gain. To avoid having a steady state error
the proportional controller can be change to

u(t) = K e(t) + ub . (6.4)

where ub is a bias or reset term which is adjusted to give the desired


steady state value.

261
Chapter 6. PID Control

e u
K Σ
I
1
1+ sTi

Figure 6.3 Implementation of integral action as automatic bias adjustment.

Integral Action
Integral action guarantees that the process output agrees with the refer-
ence in steady state. This can be shown as follows. Assume that the system
is in steady state with a constant control signal (u0 ) and a constant error
e0 = 0. It follows from Equation (6.1) that

u0 = ke0 + ki e0 t.

The left hand side is constant but the right hand side is a function of
t. We thus have a contradiction and e0 must be zero. Notice that in this
argument the only assumption made is that there exist a steady state.
Nothing specific is said about the process, it can for example be nonlinear.
Another argument is that the transfer function of a controller with
integral action has infinite gain at zero frequency ( C (0) = ∞). It then
follows from (6.3) that G yr (0) = 0. This argument requires however that
the system is linear.
Integral action can also be viewed as a method for generating the bias
term ub in the proportional controller (6.4) automatically. This is illus-
trated in Figure 6.3, where the bias ub is generated by low pass filtering
the output. This implementation, called automatic reset, was one of the
early inventions of integral control. The transfer function of the system
in Figure 6.3 is obtained by loop tracing. Assuming exponential signals
and tracing them around the loop gives

1
u = ke + u.
1 + sT

Solving for u gives


1 + sT  k 
u=k e= k+ ,
sT sT
which is the transfer function of a PI controller.
The properties of integral action are illustrated in Figure 6.2. The
proportional gain is constant, k = 1, and the integral gain is changed.

262
6.2 The PID Controller

The case ki = 0 corresponds to pure proportional control, with a steady


state error is 50%. The steady state error is removed when integral gain
ki is increased. The response creeps slowly towards the reference for small
values of ki . The approach is faster for larger integral gains but the system
also becomes more oscillatory.

Derivative Action
Figure 6.2 shows that derivative action can improve the stability of the
the closed-loop system. The input-output relation of a controller with pro-
portional and derivative action is

de de 
u(t) = ke(t) + kd = k e(t) + Td = kep(t)
dt dt

where Td = kd / d is the derivative time. The action of a controller with


proportional and derivative action can be interpreted as if the control is
made proportional to the predicted process output, where the prediction
is made by extrapolating the error Td time units into the future using the
tangent to the error curve (see Figure 6.1). Figure ?? illustrates the be-
haviour of a system with a PID controller. The system is oscillatory when
not derivative action is used and it becomes more damped as derivative
gain is increased.

Filtering the Derivative


A drawback with derivative action is that an ideal derivative has very
high gain for high frequency signals. This means that high frequency
measurement noise will generate large variations of the control signal.
The effect of measurement noise be reduced by replacing the term kd s by

kd s
Da = − . (6.5)
1 + sT f

This can be interpreted as an ideal derivative that is filtered using a


first-order system with the time constant T f . For small s the transfer
function is approximately K d s and for large s it is equal to kd / T f . The
approximation acts as a derivative for low-frequency signals and as a
constant gain for the high frequency signals. The high-frequency gain is
kd / T f . The filtering time is chosen as kd / k/ N, with N in the range of 2
to 20. The transfer function of a PID controller with a filtered derivative
is
1
 
sTd
C ( s) = K 1 + + . (6.6)
sTi 1 + sTd / N
The high-frequency gain of the controller is K (1 + N ).

263
Chapter 6. PID Control

− 1+1sT

u y
Σ

Figure 6.4 Implementation of the transfer function sT /(1 + sT ) which approxi-


mates derivative action.

Instead of filtering just the derivative it is also possible to use an ideal


controller and filter the measured signal. The transfer function of such a
controller with the filter is then
1 1
 
C ( s) = K 1 + + sTd . (6.7)
sTi (1 + sT f )2

where a second order filter is used.


An early implementation of derivative action is shown in Figure 6.4. In
this system the derivative is shown as the difference between the signal
and a filtered version of the signal. The transfer function for the system
is  1  sT
C ( s) = 1 − = U (s). (6.8)
1 + sT 1 + sT
The system thus has the transfer function G (s) = sT /(1 + sT ), which
approximates a derivative for low frequencies. Notice that this implemen-
tation gives filtering automatically.

Set Point Weighting


The control system in (6.1) is called a system with error feedback because
the controller acts on the error, which is the difference between the ref-
erence and the output. In the simulation of PID controllers in Figure 6.1
there is a large initial peak of the control signal, which is caused by the
derivative of the reference signal. The peak can be avoided by modifying
the controller (6.1) to
Z ∞  dr(t) d y(t) 
u(t) = k β r(t) − y(t) + ki r(τ ) − y(τ ) dτ + kd γ (6.9)
 

0 dt dt

In this controller proportional and derivative action only acts on a frac-


tions β and γ of the reference. Integral action has to act on the error to

264
6.2 The PID Controller

1.5
0

h G yr (iω )h
10
1

y 0.5

−1
0 10
−1 0 1
0 2 4 6 8 10 10 10

1.5
0

h Gur (iω )h
1 10
u

0.5

0
−1
−0.5 10
−1 0 1
0 2 4 6 8 10 10 10
t ω

Figure 6.5 Time and frequency responses for system with PI controller and set-
point weighting. The curves on the left show responses in process output y and
control signal and the curves on the right show the gain curves for the transfer
functions G yr (s) and Gur (s). The process transfer function is P(s) = 1/s, the con-
troller gains are k = 1.5 and ki = 1, and the setpoint weights are β = 0 (dashed)
0.2, 0.5 and 1 (dash dotted).

make sure that the error goes to zero in steady state. The closed loop sys-
tems obtained for different values of β and γ respond to load disturbances
and measurement noise in the same way. The response to reference sig-
nals is be different because it depends on the values of β and γ , which
are called reference weights or setpoint weights.
Figure 6.5 illustrates the effects of set point weighting on the step
response. The figure shows clearly the effect of changing β . The overshoot
for reference changes is smallest for β = 0, which is the case where
the reference is only introduced in the integral term, and increases with
increasing β . Parameter β it typically in the range of 0 to 1 and γ is
normally zero to avoid large transients in the control signal when the
reference is changed.
The controller given by (6.9) is a special case of the general controller
with two degrees of freedom in Figure ??. The transfer functions are

ki
C ( s) = k + + kd s
s
γ kd s2 + β ks + ki
F ( s) = .
kd s2 + ks + ki

265
Chapter 6. PID Control

6.3 Integrator Windup


Many aspects of a control system can be understood from linear models.
There are, however, some nonlinear phenomena that must be taken into
account. There are typically limitations in the actuators: a motor has
limited speed, a valve cannot be more than fully opened or fully closed,
etc. For a control system with a wide range of operating conditions, it
may happen that the control variable reaches the actuator limits. When
this happens the feedback loop is broken and the system runs in open
loop because the actuator will remain at its limit independently of the
process output as long as the actuator remains saturated. For a controller
with integral action the integral term may become very large. When this
happens the error must change sign for a long period before the integrator
winds down. The consequence is that there may be large transients. This
is colloquially referred to as integrator wind up
The wind-up effect is illustrated in Figure 6.6, which shows control
of an integrating process with a PI controller. The initial reference sig-
nal is so large that the actuator saturates at the high limit. The integral
term increases initially because the error is positive; it reaches its largest
value at time t = 10 when the error goes through zero. The output re-
mains saturated at this point because of the large value of the integral
term. It does not leave saturation until the error has been negative for
a sufficiently long time. Notice that the control signal bounces between
its limits several times. The net effect is a large overshoot and a damped
oscillation where the control signal flips from one extreme to the other
as in relay oscillations. The output finally comes so close to the reference
that the actuator does not saturate and the system then behaves linearly
and settles quickly.
There are many ways to avoid windup, one method is illustrated in
Figure 6.7. The system has an extra feedback path that is generated by
measuring the actual actuator output, or the output of a mathematical
model of the saturating actuator, and forming an error signal ( es ) as the
difference between the output of the controller (v) and the actuator output
(u). The signal es is fed to the input of the integrator through gain 1/Tt .
The signal es is zero when there is no saturation and the extra feedback
loop has no effect on the system. When the actuator saturates, the signal
es is different from zero. The normal feedback path around the process is
broken because the process input remains constant. The feedback around
the integrator will act and it attempts to drive es to zero. This implies that
controller output is kept close to the saturation limit and integral windup
is avoided. The rate at which the controller output is reset is governed
by the feedback gain, 1/ Tt , where the tracking time constant Tt can be
interpreted as the time constant, which determines how quickly the in-

266
6.3 Integrator Windup

1.5

y, r 1

0.5

0
0 10 20 30 40 50 60 70

0.1
0.05
u

0
−0.05
−0.1

0 10 20 30 40 50 60 70

5
I , v, e

−5
0 10 20 30 40 50 60 70
t

Figure 6.6 Illustration of integrator windup. The plots show process output y,
reference r in the upper plot, control signal u in the middle plot, controller output
uo (full) and integral part I and control error e (dashed) in lower part. (dash dotted).

tegral is reset. A short long time constant gives a slow reset and a short
time constant a short reset time. Measurement error can cause an unde-
sirable reset if the time constant is too short. A reasonable compromise
√ is
to choose Tt as a fraction of Ti for proportional control and as Tt = Ti Td
for PID control.
Figure 6.8 shows what happens when a controller with anti-windup
is applied to the system simulated in Figure 6.6. The output of the in-
tegrator is quickly reset to a value such that the controller output is at
the saturation limit, and the integral has a negative value during the
initial phase when the actuator is saturated. This behavior is drastically
different from that in Figure 6.6, where the integral was positive during
the initial transient. Also notice the drastic improvement in performance
compared to the ordinary PI controller used in Figure 6.6.

267
Chapter 6. PID Control

Figure 6.7 PID controller with anti-windup.

1.5

1
y, r

0.5

0
0 5 10 15 20 25 30

0.15

0.1
u

0.05

−0.05
0 5 10 15 20 25 30

1
I , v, e

0.5

0 5 10 15 20 25 30
t

Figure 6.8 Controller with anti-windup applied to the system of Figure 6.6. The
plots show process output y, reference r in the upper plot, control signal u in the mid-
dle plot, controller output uo (full) and integral part I and control error e (dashed)
in lower part. (dash dotted).

268
6.4 Tuning

6.4 Tuning
There are many ways to tune a PID controller. Traditional control tech-
niques based on modeling and design can be used, but there are also
special methods for direct tuning based on simple process experiments. A
few methods are described in this section.

PI Control of First Order Systems


The dynamics of many systems can be approximated by a first order sys-
tem with the transfer function
b
P ( s) = .
s+a
The approximation is reasonable for systems where storage of mass, mo-
mentum and energy can be captured by one state variable. Typical exam-
ples are velocity of car on the road, control of velocity of rotating system,
electric systems where energy is essentially stored in one component, in-
compressible fluid flow in a pipe, level control of a tank, pressure control
in a gas tank, temperature in a body with essentially uniform temperature
distribution.
A PI controller with set point weighting is described by
ki
C ( s) = k +
s
β kski
F ( s) = ,
ks + ki
and the transfer function of the closed loop system from reference to out-
put is
P ( s) C ( s) F ( s) b(β ks + ki )
G yr (s) = = 2 .
1 + P ( s) C ( s) s + (a + bk)s + bki
The closed loop system has the characteristic polynomial

s2 + (a + bk)s + bki .

Assuming that the desired characteristic polynomial is

s2 + 2ζ ω 0 s + ω 02 , (6.10)

we find that the controller parameters are given by


2ζ ω 0 − a 2ζ ω 0 T − 1
k= =
b K
(6.11)
ω 02 ω 02 T
ki = = .
b K

269
Chapter 6. PID Control

The parameter ω 0 determines the response speed and ζ determines the


damping.
The same approach can be used to find the parameters of a PID con-
troller for a process with dynamics of second order.

Loop Shaping
Since a PI controller has two parameters it is possible to shape the loop
transfer function by specifying one point on the Nyquist curve. For exam-
ple, we can choose controller gains to give a specified phase margin at a
given crossover frequency ω gc . To be specific let the process transfer func-
tion be P(s). The frequency response of the loop transfer function with PI
control is
 ki   ki 
L(iω ) = P(iω ) k − i = a(ω ) + ib(ω ) k − i
ω ω
b(ω ) k  a(ω ) ki 
= a(ω ) k + + i b(ω ) k − ,
ω ω
where a(ω ) = ReP(iω ) = r(ω ) cos ϕ (ω ) and b(ω ) = ImP(iω ) = r(ω ) sin ϕ (ω ).
Requiring that the phase margin is ϕ m we get

b(ω gc ) ki
a(ω gc ) k + = − cos ϕ m
ω gc
a(ω gc ) ki
b(ω gc ) k − = − sin ϕ m
ω gc

Solving this equation gives the controller parameters

a(ω gc ) cos ϕ m + b(ω gc ) sin ϕ m cos (ϕ (ω ) − ϕ m )


k=− =−
a (ω gc ) + b (ω gc )
2 2 r(ω )
(6.12)
a(ω gc ) sin ϕ m − b(ω gc ) cos ϕ m ω gc sin (ϕ (ω ) + ϕ m )

ki = = .
a2 (ω gc ) + b2 (ω gc ) r(ω )

We have
arg P(iω gc ) + arg C (iω gc ) ≥ −π + ϕ m .
since a PI controller has phase lag between 0 and π /2 we find that the
gain crossover frequency must be chosen so that

−π + ϕ m ≤ arg P(iω gc ) ≤ −π /2 + ϕ m (6.13)

It follows from(6.12) that integral gain is zero at the lower limit and
proportional gain is zero at the higher limit.

270
6.4 Tuning

ImL(iω ) 1

0.8

0.6

ki , sm
ReL(iω )
0.4

0.2

0
0 0.2 0.4 0.6
ω gc

Figure 6.9 The left figure shows the loop transfer functions for PI controllers gain
crossover frequencies are ω gc = 0.13 (dashed), 0.3, 0.4, 0.5 (full) and 0.58 (dash-
dotted). The right figure shows controller gains k (full), ki (dashed) and stability
margin sm (dash-dotted) as functions of the phase margin ω gc .

Figure 6.9 shows the Nyquist plots for the loop transfer function for
different ω gc for a system with the transfer function P(s) = 1/(s + 1)4 .
With a phase margin ϕ m = π /3 (6.13) becomes

0.13 = tan π /24 < ω gc < tan π /6 = 0.58

The lower limit correspond to a purely integrating controller and the up-
per limit is a purely proportional controller.
In Section ?? it was shown that ki is a good measure for load distur-
bance attenuation and that the stability margin ms = 1/ Ms is a good ro-
bustness measure. These measures are shown in Figure 6.9. The largest
value ki = 0.30 is obtained for ω gc = 0.36, the largest stability mar-
gin sm = 0.48 is obtained for ω gc = 0.18. Reasonable values of the gain
crossover frequency are between 0.18 and 0.36. For ω gc = 0.3 we get
k = 0.71, ki = 0.29 and sm = 0.67 and for ω gc = 0.36 we get k = 0.96,
ki = 0.30 and sm = 0.55.

Ziegler-Nichols’ Tuning Methods


Two special methods for tuning of PID controllers developed by Ziegler
and Nichols in the 1940s are still commonly used. They are based on
the following idea: Make a simple experiment, extract some features of
process dynamics from the experimental data, and determine controller
parameters from the features.
One method is based on the open-loop step response, which is char-
acterized by two parameters a and Tdel , as shown in Figure 6.10. The

271
Chapter 6. PID Control

Tdel t
−a

Figure 6.10 Characterization of the unit step response by parameters a and Tdel
which are the intercepts of the steepest tangent to the response with the coordinate
axes. The point where the tangent is steepest is marked with a small circle.

Table 6.1 Controller parameters for the Ziegler-Nichols step response method.
Parameter Tp is an estimate of the period of damped oscillations of the closed loop
system.

Controller ak Ti / Tdel Td / Tdel Tp / Tdel


P 1 4
PI 0.9 3 5.7
PID 1.2 2 Tdel /2 3.4

step response is characterized by parameters a and Tdel which are the


intercepts of the steepest tangent of the step response with the coordi-
nate axes. Parameter Tdelat is an approximation of the time delay of the
system and a/ Tdel is the steepest slope of the step response. Notice that it
is not necessary to wait until steady state to find the parameters, it suf-
fices to wait until the response has had an inflection point. The controller
parameters are given in Table 6.1.
Another method is based on frequency response features was also de-
veloped by Ziegler and Nichols. Process data is obtained by connecting
a feedback loop with proportional control. The gain of the controller is
increased until the system reaches the stability boundary, the gain of the
controller kc and the period Tc of the oscillation is observed. The controller
parameters are then given by Table 6.2.

Improved Ziegler-Nichols Rules


There are two drawbacks with the Ziegler-Nichols rules, too little process
information is used and the closed loop systems obtained lack robustness.

272
6.4 Tuning

Table 6.2 Controller parameters for the Ziegler-Nichols frequency response


method which gives controller parameters in terms of critical gain kc and criti-
cal period Tc . Parameter Tp is an estimate of the period of damped oscillations of
the closed loop system.

Controller k/ kc Ti / Tc Td / Tc Tp / Tu
P 0.5 1.0
PI 0.4 0.8 1.4
PID 0.6 0.5 0.125 0.85

y
K

0.63K

Tdel T63 t

Figure 6.11 Finding the parameters of the model (6.14) from a unit step response.

Substantially better tuning is obtained by fitting the model

K
P ( s) = e−sTd (6.14)
1 + sT

to the step response. A simple way to do this is illustrated in Figure ??.


The steady state gain of the process K is determined from the steady
state value of the step response. The time delay Tdel is determined from
the intercept of the stepest tangent to the step response as in Figure 6.10
and the time T63 is the time where the output has reached 63% of its
steady state value. Parameter T is given by T = T63 − Tdel . Notice that
the experiment takes longer time than the experiment in Figure 6.10
because it is necessary to way until the steady state has been reached.
The following tuning formulas have been obtained by tuning con-
trollers to a large set of processes typically encountered in process control
 T 
kK = min 0.4 , 0.25
L
(6.15)
 T 
ki K Tdel = max 0.1 , 0.5 .
Tdel

273
Chapter 6. PID Control

1 1
10 10

ki K Tdel
kK

0 0
10 10

−1 −1
10 10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
1 1
10 10

Ti /Tdel
0 0
ak

10 10

−1 −1
10 10
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
τ τ

Figure 6.12 Proportional and integral gains for PI controllers given by the Ziegler-
Nichols rule (dotted), the improved rule given by (??) (dashed) and controller de-
signed for known transfer functions (○).

Figure 6.12 illustrates the relations between the controller parameters


and the process parameters. The controller gain is normalized by mul-
tiplying it either with the static process gain K or with the parame-
ter a = K Tdel / T. Integral gain is normalized by multiplication with
K Tdel and integration time by division by Tdel . The controller parame-
ters in Figure 6.12 are plotted as functions of the normalized time delay
τ = Tdel /(Tdel + T ).

 T 
kK = min 0.4 , 0.25
L
(6.16)
 T 
ki K Tdel = max 0.1 , 0.5 .
Tdel

Notice that the improved formulas typically give lower controller gain
than the Ziegler-Nichols method, but that integral gain is higher par-
ticularly for systems with dynamics that is delay dominated. The figure
also shows that significant improvements are obtained by characterizing
dynamics by three parameters.
There are also improved tuning formulas for the frequency response
method. In this case it is convenient to characterize the process by critical
gain kc , critical period Tc and static process gain K . One improved formula

274
6.4 Tuning

Relay Process
y sp e u y
Σ G(s)

−1

Figure 6.13 Block diagram of a process with relay feedback.

0.5
y

−0.5

−1
0 5 10 15 20 25 30
t

Figure 6.14 Process output y (solid) and relay output u (dashed) for a system
under relay feedback. Notice that the signals are out of phase. The process has the
transfer function P(s) = (s + 1)−4 .

that is applicable for kc K > 0.2 is

k = 0.25kc
0.1kc (1 + 4kc K (6.17)
ki =
Tc
Relay Feedback
The experiment in Ziegler-Nichols frequency response method gives the
frequency where the process has a phase lag of 180○ and the gain of the
process transfer function at that frequency. Another way to obtain this
information is to connect the process in a feedback loop with a relay as
shown in Figure 6.13. This has been used to develop methods for auto-
matic tuning of PID controllers. For many systems there will then be an
oscillation, as shown in Figure 6.14, where the control signal is a square
wave and the process output is close to a sinusoid. Notice that the pro-
cess input and output have opposite phase and that a stable oscillation is
established quickly.
To explain how the system works, assume that the relay output is
expanded in a Fourier series and that the process attenuates higher har-
monics effectively. It is then sufficient to consider only the first harmonic

275
Chapter 6. PID Control

Figure 6.15 PID controller with automatic tuning.

component of the input. The input and the output then have opposite
phase, which means that the frequency of the oscillation ω 180 is such that
the process has a phase lag of 180○ . If d is the relay amplitude, the first
harmonic of the square wave input has amplitude 4d/π . Let a be the
amplitude of the process output. The process gain at ω 180 is then given
by
πa
K 180 = . (6.18)
4d
Notice that the relay experiment is easily automated. Since the amplitude
of the oscillation is proportional to the relay output, it is easy to control
it by adjusting the relay output. Notice in Figure 6.14 that a stable os-
cillation is established very quickly. The amplitude and the period can
be determined after about 20 s only, in spite of the fact that the system
is started so far from the equilibrium that it takes about 8 s to reach
the correct level. The average residence time of the system is 12 s, which
means that it would take about 40 s for a step response to reach steady
state.
The idea of relay feedback has been used to implement PID controller
with automatic tuning. An example of such a controller is shown in Fig-
ure 6.15. For this controller tuning is accomplished simply by pushing a
button which activates relay feedback. The relay amplitude is adjusted
automatically not to perturb the process too much and the controller au-
tomatically reverts to PID mode as soon as the tuning is accomplished.

276
6.5 Computer Control

6.5 Computer Control


In this section we will describe how a PID controller may be implemented
using a digital computer. More material on implementation is given in
Chapter ??. Most controllers are implemented in computers. The com-
puter typically operates periodically, signals from the sensors are sampled
and converted to digital form by the AD converter, the control signal is
computed, converted to analog form for the actuators. The sequence of
operation is as follows:
1. Wait for clock interrupt

2. Read analog input from sensor

3. Compute control signal

4. Set analog output to the actuator

5. Update controller variables

6. Go to 1
Notice that an analog output is done as soon as the output is available.
The time delay is minimized by making the calculations in Step 3 as short
as possible and to delay all updates until the analog output is commanded.

Discretization
As an illustration we consider the PID controller in Figure 6.7 which
has a filtered derivative, set point weighting and protection against in-
tegral windup. The controller is a continuous time dynamical system. To
implement it using a computer the continuous time system has to be ap-
proximated by a discrete time system.
The signal v is the sum of the proportional, integral and derivative
terms
v(t) = P(t) + I (t) + D (t) (6.19)
and the controller output is u(t) = sat(v(t)) where sat is the saturation
function that models the actuator. The proportional term is

P = k(β ysp − y)

This term is implemented simply by replacing the continuous variables


with their sampled versions. Hence,

P(tk ) = k (β yr (tk ) − y(tk )) (6.20)

277
Chapter 6. PID Control

where { tk } denotes the sampling instants, i.e., the times when the com-
puter reads the analog input. The integral term is

Zt
1
sat(v) − v)

I (t) = ki e(s)ds +
Tt
0

Approximating the integral by a sum gives

h
sat(v) − v) (6.21)

I (tk+1 ) = I (tk ) + ki h e(tk ) +
Tt

The derivative term D is given by the differential equation

dD
Tf + D = − kd y
dt

Approximating this equation with a backward difference we find

D (tk ) − D (tk−1) y(tk ) − y(tk−1 )


Tf + D (tk ) = − kd
h h

This can be rewritten as


Tf kd
D (tk) = D (tk−1 ) − ( y(tk ) − y(tk−1 )) (6.22)
Tf + h Tf + h

The advantage by using a backward difference is that the parameter


T f /(T f + h) is nonnegative and less than one for all h > 0, which guar-
antees that the difference equation is stable.

Computer Code
Reorganizing Equations (6.19), (6.20), (6.21) and (6.22) the PID controller
can be described by the following pseudo code.
"Precompute controller coefficients
bi=ki*h
ad=Tf/(Tf+h)
bd=kd/(Tf+h)
br=h/Tt
"Control algorithm - main loop
r=adin(ch1) "read setpoint from ch1
y=adin(ch2) "read process variable from ch2
P=K*(b*r-y) "compute proportional part
D=ad*D-bd*(y-yold) "update derivative part

278
6.6 Further Reading

v=P+I+D "compute temporary output


u=sat(v,ulow,uhigh) "simulate actuator saturation
daout(ch1) "set analog output ch1
I=I+bi*(r-y)+br*(u-v) "update integral
yold=y "update old process output
Precomputation of the coefficients bi, ad, bd and br saves computer time
in the main loop. These calculations have to be done only when controller
parameters are changed. The main program must be called once every
sampling period. The program has three states: yold, I, and D. One state
variable can be eliminated at the cost of a less readable code. Notice
that the code includes derivation of the process output only, proportional
action on part of the error only (b = 1), the last term in the updating of
the integral gives protection against windup.

6.6 Further Reading


Ziegler-Nichols original paper. Some paper from industry (Honeywell)
that describes industrial use. Bialkowsky?. A comprehensive presenta-
tion of PID control is given in [?]. Overviews of industrial use of adaptive
control is found in [] and [].

279
7
Loop Shaping

7.1 Introduction
This is the first Chapter that deals with design and we will therefore
start by some general aspects on design of engineering systems. Design
is complicated because there are many issues that have to be considered.
Much research and development has been devoted to development of de-
sign procedures and there have been numerous attempts to formalize the
design problem. It is useful to think about a design problem in terms of
specifications, trade-offs, limitations, design parameters. In additions it is
useful to be aware of the fact that because of the richness of design prob-
lem there are some properties that are captured explicitly by the design
method and other properties that must be investigated when the design
is completed.
The specifications is an attempt to express the requirements formally.
For control systems they typically include: attenuation of load distur-
bances, measurement noise, process uncertainty and command signal fol-
lowing. Specifications are typically expressed by quantities that capture
these features. For control systems the fundamental quantities are typi-
cally transfer functions or time responses and specifications are some rep-
resentative features of these functions. A design fundamentally involves
trade-offs. It is also extremely important to be aware of fundamental limi-
tations to avoid unrealistic specifications and impossible trade-offs. Some-
times it is attempted to capture the trade-offs in a single optimization
criterion, but such a criterion always includes parameters that have to be
chosen. It is often useful to make the trade-offs explicit and to have design
parameters that gives the designer control of them. A design method typi-
cally focuses on some aspects of a design problem but it is often difficult to
capture all aspects of a design problem formally. There will frequently be

280
7.1 Introduction

several properties that must be investigated separately when the design


is completed. In control system design it is common practice to verify a
design by extensive simulation that may include hardware in the loop.
When discussing design in this and the following chapters we have made
an attempt to emphasize the fundamental tradeoffs and the design pa-
rameters.
In this Chapter we will present a design method which is focused on
the loop transfer function of the system. The method is focused on de-
sign a feedback controller that satisfies can deal with disturbances and
process uncertainty. The response to reference signals can later be dealt
with using feedforward which is discussed in the next chapter. The idea of
loop shaping is outlined in Section 7.2 which present classical results that
were developed when control emerged in the early 1940s. This section also
contains some simple compenstators like lead-lag compensation, which is
closely related to PID control. Section 7.3 presents another classical result
due to Bode, who developed the concept of an ideal loop transfer function
for electronic amplifiers. In the following sections it is shown how the loop
transfer function relates to important properties of the closed loop system.
Section 7.4 treats robustness properties. It is shown that the estimates
developed earlier can be refined to give more precise information. Two
graphical tools, the Hall diagram and the Nichols chart are also intro-
duced. Section 7.6 deals with load disturbances. An estimate the norm of
the transfer function from load disturbances to process output based on
the crossover frequency is derived. The result shows that it is typically
advantageous to have a high crossover frequency. Section 7.5 deals with
measurement noise. An estimate of the norm of the transfer function from
measurement noise to the control signal is developed. It is shown that a
high crossover frequency is typically associated with high controller gains
at frequencies above the crossover frequency. In Section 7.7 it is shown
that non-minimum phase dynamics imposes severe constraints on the ad-
missible crossover frequencies. Summarizing the findings of this section
with the results of Sections 7.4, 7.6, and 7.5 we are in a good position
to discuss the major trade-offs in the choice of gain crossover frequency.
First the choice is severely restricted if process dynamics is not minimum
phase. The choice is then governed by a compromise between robustness,
attenuation of load disturbances and injection of measurement noise. It
turns out that the compromise can be captured in a single diagram. This
diagram also indicates the complexity of the controller that is required
for different choices. This is shown in Section 7.10.

281
Chapter 7. Loop Shaping

7.2 Compensation
The idea of loop shaping is to find a controller so that the loop transfer
function has desired properties. Since the loop transfer function L = PC
is the product of the transfer functions of the process and the controller
it is easy to see how the loop transfer function is influenced by the con-
troller. Compensation is typically done by successive modifications of the
loop transfer function starting with proportional control. If the desired
properties cannot be obtained by proportional control the controller is
modified by multiplying the controller transfer function by compensating
networks having simple transfer functions. The design is conveniently
visualized using bode diagrams. Since the Bode diagram is logarithmic
multiplication by a compensating network corresponds to additions in the
Bode diagram. We start by discussing a desired properties of a loop trans-
fer function, then we present some simple compensators and we end by a
few examples. In the following sections we will present a more systematic
treatment where we discuss how th different properties of the loop are
influenced by the loop transfer function.

Properties of the Loop Transfer Function


The Bode diagram of a typical loop transfer function is shown in Fig-
ure 7.1. Recall that the lowest frequency where the loop transfer function
has gain 1 is called gain crossover frequency, see Section ??. This parame-
ter is an important design parameter in loop shaping. When we talk about
high and low frequencies in the following we are using the crossover fre-
quency as a reference. The gain curve of a typical loop transfer function
is decreasing as shown in Figure 7.1. The behavior at low frequencies de-
termine attenuation of load disturbances and behavior of tracking of low
frequency reference signals. The behavior around the crossover frequency
determines robustness and sensitivity to modeling errors. The gain mar-
gin gm and the phase margin ϕ m are easily visualized in the Bode plot.
The behavior at high frequency determines sensitivity to measurement
noise. It is desirable to have high gain at low frequency and rapidly de-
creasing gain after the gain crossover frequency. Since we require that
the closed loop system should be stable, the slope of the gain curve at
crossover ngc cannot be too steep at the crossover. It follows from Bodes
relations between amplitude and phase that the slope must be larger than
-2 for minimum phase systems- The values typically range from -1.7 to
-1.3, larger values have better stability margins. For a minimum phase
system it follows from Bodes relations between amplitude and phase (??)
that the phase margin is approximately given by

ϕ m  arctan (2 + ngc )

282
7.2 Compensation

2
10

h G (ω gc )h0
10
log10 gm

−2
10
−2 −1 0 1 2
10 10 10 10 10
ω
−120
−140
−160 ϕm
arg G (ω )

−180
−200
−220
−240
−260
−2 −1 0 1 2
10 10 10 10 10
ω

100(s+0.316)
Figure 7.1 Bode plot of the loop transfer function L(s) = s2 (s+3.16)(s+20)
.

The slope must be larger for non-minimum phase systems typical val-
ues for such systems are in the range of -1 to -0.5. The design starts
by adjusting the gain to give the desired crossover frequency compen-
sators are then added to give the desired phase margin and the desired
gain at low frequencies. The gain at low frequency can be increased by so
called lag compensators that increase the gain at low frequencies. The lag
compensators also decrease the phase of the loop transfer function. This
does however not cause stability problems because it happens far below
the crossover frequency. The phase margin is improved by so called lead
compensators which adds phase lead. Lead compensation required high
gain which means that measurement noise may be amplified. There are
also other types of compensators that decrease or increase gain at specific
frequencies.

Lag Compensation
Lag compensation is used to increase the gain of the loop transfer func-
tion at low frequencies. This will improve attenuation of low frequency
disturbances and reduce the error in tracking low frequency signals. A

283
Chapter 7. Loop Shaping

2
10

h G (ω gc )h
10
1

0
10
−2 −1 0 1
10 10 10 10

−20
arg G (ω )

−40

−60

−80

−100
−2 −1 0 1
10 10 10 10
ω

Figure 7.2 Bode plot of the transfer function G (s) = s+s+ a


a/ M
of a lag compensator
with a = 1 and M = 10 (full lines) and M = ∞ (dashed lines) which is a PI
controller.

lag compensator has the transfer function


s+a
G ( s) = (7.1)
s + a/ M

where M > 1. This transfer function has unit gain for high frequencies,
ω >> a, and the gain M at low frequencies ω >> a. If M goes to infinity
the compensator becomes a PI controller with the transfer function
s+a a
G ( s) = =1+
s s
This gain of this compensator goes to infinity as s goes to zero. A Bode plot
of the compensator is given in Figure 7.2 The phase of the compensator is
always negative, which explains the name lag compensator. We illustrate
the use of lag compensation by an example.

EXAMPLE 7.1—LAG COMPENSATION


Consider a process with the transfer function
1
P ( s) =
(s + 1)(s + 2)

284
7.2 Compensation

4
10

h G (ω gc )h
10

0
10

−2
10
−3 −2 −1 0 1
10 10 10 10 10
ω

−100
arg G (ω )

−150

−200

−250

−3 −2 −1 0 1
10 10 10 10 10
ω

0 .7
Figure 7.3 Bode plot of the loop transfer function L(s) =
s(s + 1)(s + 2)
(dashed lines) and the compensated loop transfer function Lc (s) =
ki (s + 0.076)
(full lines).
s(s + 0.0038)(s + 1)(s + 2)

Assume that it is required to have a closed loop system with the following
specifications:
• No steady state error for constant load disturbances.
• A settling time to 1% that is shorter than 15s.
• The error in tracking the ramp input r = v0 t should be less than
0.15v0 .
A controller with integral action is required to avoid steady state errors.
Introducing an integrating controller with gain ki the loop transfer func-
tion becomes
ki
L( s ) =
s(s + 1)(s + 2)
Choosing the gain ki = 0.7 and evaluating the closed loop system we
find that Ms = 1.4, ω ms = 0.64, ϕ m = 62○ , and ω gc = 0.38, gm = 8.2
and a ω pc = 1.4 which are all reasonable values. A Bode plot of the loop
transfer function is shown in Figure 7.3. With Ms = 1.4 and ω ms = 0.64

285
Chapter 7. Loop Shaping

we estimate the real part of the dominant poles to be faster than -0.3
which implies that the settling time is around 15 s. For small s the loop
transfer function and the sensitivity function are

0.7
L( s ) 
s
s
S ( s)  = 1.4s
0.7

This means that tracking error of the signal r = v0 t is 1.4v0 which is much
larger than the requirement of 0.04v0 . To satisfy the specifications the low
frequency gain must be raised by a factor of 20. This can be achieved with
the lag compensator given by (7.1) with M = 20. The parameter a of the
compensator should be chosen so that the phase margin does not decrease
too much. Since the phase margin chosen originally was over 60 degrees
the choice a = ω gc /5 = 0.076 decreases the phase margin by about 11○
which can be acceptable. Adding the lag compensation the loop transfer
function becomes.

0.7(s + 0.076)
L c ( s) =
s(s + 0.0038)(s + 1)(s + 2)

The Bode plot of this loop transfer function is shown in Figure 7.2. An-
alyzing the system we find that Ms = 1.5, ω ms = 0.55, ϕ m = 50○ , and
ω gc = 0.34, gm = 7.6 and a ω pc = 1.3. For small s the loop transfer
function and the sensitivity function can be approximated by

14
L( s ) 
s
s
S ( s)  = 0.035s
0.7

The low frequency gain of the loop transfer function has thus been in-
creased substantially. The Bode plot in Figure 7.1 shows that the gain of
the compensated system is substantially higher for frequencies less than
0.02. To analyze the closed loop system obtained further we compute the
poles of the closed loop system and we find that the poles are -0.099,
−0.33 ± 0.36i and 2.24. The slow pole at -0.086 is close to the zero at
s = −0.076 so it has only a moderate influence on the step response. The
1% settling time is less than 5/0.33=15 s. Step and ramp responses of the
closed loop system are shown in Figure 7.4. Notice the that the compen-
sated system has a significantly better ramp response but also that it has
the inevitable overshoot. Compare with the discussion in Section 5.8.

286
7.2 Compensation

1.4

1.2

Step responses
1

0.8

0.6

0.4

0.2

0
0 5 10 15 20 25 30
t
30
Ramp responses

25

20

15

10

0
0 5 10 15 20 25 30
t

Figure 7.4 Step responses and ramp responses for closed loop systems with error
0 .7
feedback having loop transfer functions L(s) = (dashed lines)
s(s + 1)(s + 2)
ki (s + 0.076)
and Lc (s) = (full lines).
s(s + 0.0038)(s + 1)(s + 2)

Lead Compensation
Lead compensation is used to improve the stability margin of a system or
to increase the crossover frequency. A lead compensator has the transfer
function
s+b
G ( s) = (7.2)
s/ N + b
where N > 1. This transfer function has unit gain for low frequencies,
ω << b, and the gain N at high frequencies ω >> b. This compensator
has its largest gain, maxω h G (iω )h = N, at high frequencies. The largest
phase lead is given by

N −1
ϕ = max arg G (iω ) = arctan √
ω 2 N
√ √
is obtained for ω = ω m = a N. The gain at ω m is h G (iω m )h = N. The
achievable phase lead increases with N but it is less than 90○ . Phase
leads 20○ , 30○ , 40○ , 45○ , 50○ and 60○ correspond to N = 2, 3, 4.6, 5.8 7.5

287
Chapter 7. Loop Shaping

2
10

h G (ω gc )h
1
10

0
10
−1 0 1 2
10 10 10 10

100

80
arg G (ω )

60

40

20

0
−1 0 1 2
10 10 10 10
ω

+b
Figure 7.5 Bode plot of the transfer function G (s) = s/sN +b
of a lead compensator
with b = 1 and N = 10 (full lines) and N = ∞ (dashed lines) which is a PD
controller.

and 13.9. If N goes to infinity the compensator becomes a PI controller


with the transfer function

s+b s
G ( s) = = b+
b b

A Bode plot of the compensator is given in Figure 7.5 The phase of the
compensator is always positive, which explains the name lead compen-
sator. We illustrate the used of lead compensation by an example.

EXAMPLE 7.2—LEAD COMPENSATION


To illustrate lead compensation we consider a process with the transfer
function
250000
P̄(s) = 2
s + 2500s + 250000
which represents the scaled transfer function of a MEMS accelerome-
ter. The process has a bandwidth of 500 rad/s and very low damping
ζ = 0.005. It is desired to have a closed loop system with a bandwidth
of 5 krad/s and good damping. To simplify the writing we first change

288
7.2 Compensation

4
10

2
10

h G (ω )h
0
10

−2
10
−2 −1 0 1 2
10 10 10 10 10
ω
0

−50
arg G (ω )

−100

−150

−200

−250
−2 −1 0 1 2
10 10 10 10 10
ω

25
Figure 7.6 Bode plot of the loop transfer function L(s) = s2 +0.025s+0.25
(dashed
lines) and the compensated loop transfer function Lc (s) = (s+15)(s25 (3s+5)
2 +0.0025s+0.25)

(full lines).

the frequency scale to krad/s instead of rad/s and the process transfer
function then becomes
0.25
P̄(s) =
s2 + 0.0025s + 0.25
To obtain the desired bandwidth the crossover frequency should be around
5 which means that the process gain has to be about 25. The Bode plot of
the loop transfer function with a gain of 25 is shown in Figure 7.6. The
figure shows that the phase margin is very small. To improve the phase
margin we introduce a lead compensator. To have reasonable damping we
choose N = 9 which gives a phase lead of 53○ . Adjusting the gain so that
the the gain of the compensator is 1 at the crossover frequency ω gc = 5
we find that the compensator is
1 s + 5/3 3s + 5
G ( s) = =
3 s/9 + 5/3 s + 15
and the compensated loop transfer function becomes’
25(3s + 5)
L( s ) =
(s + 15)(s2 + 0.0025s + 0.25)

289
Chapter 7. Loop Shaping

2
10

h G (ω )h
10
1

0
10
−2 −1 0 1 2
10 10 10 10 10

100

50
arg G (ω )

−50

−100
−2 −1 0 1 2
10 10 10 10 10
ω

(s+a)(s+b)
Figure 7.7 Bode plot of the transfer function G (s) = (s+a/ M )(s/ N +b) of a lead-lag
compensator with a = b = 1, and M = N = 10 (full lines) and M = N = ∞ (dashed
lines), which is a PID controller.

A Bode plot of the loop transfer function is given in Figure 7.3.

Lead-Lag Compensation
Cascading a lead compensator with lag compensator gives a compensator
with the transfer function

(s + a)(s + b)
G ( s) = (7.3)
(s + a/ M )(s/ N + b)

where M > 1 and N > 1. This compensator combines the features of lead
and lag compensators If N and M go to infinity the compensator becomes
a PID controller with the transfer function

(s + a)(s + b) a+b a s
G ( s) = = + +
bs ab s b

A Bode plot of the transfer function of the compensator is given in Fig-


ure 7.7

290
7.2 Compensation

0
10

h G (ω gc )h

−1
10
−1 0 1
10 10 10
x

60

40
arg G (ω )

20

−20

−40

−60
−1 0 1
10 10 10
x

Figure 7.8 Bode plot of the transfer function (7.4) of a notch compensator with
a = b = 1, ζ a = 0.05 and ζ b = 0.5 (full) and ζ a = 0.158 (dashed).

Notch Compensation
The compensators we have discussed so far have real poles and zeros. It
is sometimes advantageous to have compensators with complex poles and
zeros. One common situation is when it is desired to suppress transmis-
sion of signals at a particular frequency to avoid excitation of resonant
modes. This can be accomplished with the compensator

s2 + 2ζ a s + a2
G ( s) = (7.4)
s2 + 2ζ b b + b2

where the parameter ζ a is small and a is the frequency that should be


suppressed. Parameter b is close to a and ζ b is typically in the range of
0.5 to 1. A Bode plot of the transfer function of the compensator is given
in Figure 7.8 The figure shows that the gain is reduced significantly in a
narrow frequency range. The gain is reduced by ζ a /ζ b . Notice that there
is also a phase drop. In the particular case Figure 7.8 the phase drop
is 55○ when ζ a /ζ b = 0.1 and 31○ when ζ a /ζ b = 0.316. This means that
notch compensation can only be used for frequencies that are sufficiently
far from the gain crossover frequency.
The resonant compensator is the inverse of a notch compensator which

291
Chapter 7. Loop Shaping

Table 7.1 Maximum gain of systems that give a specified phase lead. The table is
based on n first order systems with the transfer function (7.2).

Phase lead n=2 n=4 n=6 n=8 n=∞


90 ○
34 25 24 24 23
180 ○
- 1150 730 630 540
225○ - 14000 4800 3300 2600

gives high gain in a narrow frequency band which is very useful to sup-
press load disturbances of a specific frequency.

High Order Lead Compensators


A lead compensator given by (7.2) can at most give a phase lead of 90○ .
Several systems can be cascaded
√ to obtain more phase lead. If n identical
systems (7.2) with gain N are cascaded we get
n

 s + a n
G n ( s) = √n
. (7.5)
s/ N + a

Thiscompensator has G (0) = 1 and G (∞) = N. The phase lead is thus


associated with an increase of the gain with the factor N. The maximum
phase lead is √
N −1
n

ϕ = n arctan √
2n
2 N
Solving this equation for N we find that the gain Nn required to obtain
a phase lead ϕ with n cascaded systems is

ϕ ϕ ϕ
r
  n
N = Nn = 1 + 2 tan2 + 2 tan 1 + tan2 .
n n n
Numerical values of the gain Nn is given in Table 7.1. Notice that it
is advantageous to use systems of high order because the desired lead is
obtained with less gain. The table shows that the gain required for a given
phase lead can be reduced by increasing the order of the compensator. As
n goes to infinity we have
N∞ = e2ϕ (7.6)
Furthermore
s
lim G n (s) = N s+a .
n→∞

A compensator which gives a large phase lead will thus also have a large
gain.

292
7.2 Compensation

Im s
iR
Γ
ir γ
Re s

Figure 7.9 Integration contour used to prove the phase-area formula.

Bode’s Phase Area Formula


Equation (7.6) which shows that the gain increases exponentially with the
phase lead is a special case of the following much more general result.

THEOREM 7.1—THE PHASE AREA FORMULA


Consider a transfer function G (s) with no poles and zeros in the right
half plane or on the imaginary axis. Assume that i) lims→∞ G (s) = G∞ ,
ii) A(−ω ) = A(ω ), and iii) Φ(−ω ) = −Φ(ω ). Then

2 ∞ dω 2 ∞
Z Z
A(∞) − A(0) = Φ(ω ) = φ (u)du (7.7)
π 0 ω π −∞

PROOF 7.1
The proof which is outlined in Bode’s book is a straightforward application
of residue calculus. The integral of the function ( G (s) − G∞ )/ s along the
contour shown in Figure 7.9 is zero because the function is regular inside
the contour. The integral along the large semi circle goes to zero as R goes
to infinity. The integral along the small semi circle can be evaluated by
residue calculus. Hence
Z 0

Z
ds
0 = ( G ( s) − G ∞ ) = ( A(ω ) − G∞ + iΦ(ω ))
s −∞ ω

Z ∞
+ ( A(ω ) − G∞ + iΦ(ω )) + iπ ( G (0) − G∞ )
0 ω
It follows from ii) and iii) that G (0) = A(0) and G∞ = A(∞). Because of
iii) the integrals of A(ω ) cancel and the result follows from ii).
The theorem is called the phase-area theorem because the gain is pro-
portional to the area under the phase curve. It makes it possible to esti-
mate the gain required to obtain a certain phase lead. To keep the gain as

293
Chapter 7. Loop Shaping

b (u )

ϕo

u
c c c

Figure 7.10 Representative phase curve that gives a phase lead ϕ .

low as possible it is useful to have phase lead only over a small frequency
range. To have robustness it is however required that the frequency inter-
val is not too short. A representative phase curve is shown in Figure 7.10.
For this curve we have φ (u) du = 2cϕ and the gain becomes
R

4c
N = e π ϕ = e2γ ϕ (7.8)

Reasonable values of c are in the range of 1 to 2 which gives γ between


0.6 and 1.2. In the following we will choose γ = 1.

7.3 Bode’s Ideal Loop Transfer Function

Any loop transfer function can be obtained by proper compensation for


processes that have minimum phase. It is then interesting to find out if
there is a best form of loop transfer function. When working with feedback
amplifiers Bode suggested the following loop transfer function.

s n
L( s ) = . (7.9)
ω gc

The Nyquist curve for this loop transfer function is simply a straight
line through the origin with arg L(iω ) = nπ /2, see Figure 7.11. Bode
called (7.9) the ideal cut-off characteristic. In the terminology of automatic
control we will call it Bode’s ideal loop transfer function.
One reason why Bode choose the loop transfer function given by Equa-
tion (7.9) is that it gives a closed-loop system where the phase margin is
insensitive to gain changes. Changes in the process gain will change the
crossover frequency but the phase margin is ϕ m = π (1 + n/2) for all values

294
7.3 Bode’s Ideal Loop Transfer Function

ω max

ω min

Figure 7.11 Nyquist curve for Bode’s ideal loop transfer function. Figure should
be redrawn, add circle, change slope to 30 degxs.

of the gain. The amplitude margin is also infinite. The slopes n = −4/3,
−1.5 and −5/3 correspond to phase margins of 60○ , 45○ and 30○ .
The transfer function given by Equation (7.9) is an irrational transfer
function for non-integer n. It can be approximated arbitrarily close by ra-
tional frequency functions. Bode realized that it was sufficient to approx-
imate L over a frequency range around the desired crossover frequency
ω gc . Assume for example that the gain of the process varies between kmin
and kmax and that it is desired to have a loop transfer function that is
close to (7.9) in the frequency range (ω min , ω max ). It follows from (7.9)
that

ω max  kmax 1/n


=
ω min kmin

With n = −5/3 and a gain ratio of 100 we get a frequency ratio of about
16 and with n = −4/3 we get a frequency ratio of 32. To avoid having too
large a frequency range it is thus useful to have n as small as possible.
There is, however, a compromise because the phase margin decreases with
decreasing n and the system becomes unstable for n = −2.
The operational amplifier is a system that approximates the loop trans-
fer function (7.9) with n = 1. This amplifier has the useful property that
it will be stable under a very wide range of feedbacks.

295
Chapter 7. Loop Shaping

2
10

1
10
h L(iω )h

0
10

−1
10

−2
10
−1 0 1
10 10 10

−128

−130
arg L(iω )

−132

−134

−136

−138

−140

−142
−1 0 1
10 10 10
ω

Figure 7.12 Bode diagram of the loop transfer function obtained by approximat-
ing the fractional controller (7.12) with the rational transfer function (7.13). The
fractional transfer function is shown in full lines and the approximation in dashed
lines. Redraw, line too heavy.

Fractional Systems
It follows from Equation (7.9) that the loop transfer function is not a
rational function. We illustrate this with an example.

EXAMPLE 7.3—CONTROLLER WITH FRACTIONAL TRANSFER FUNCTION


Consider a process with the transfer function

k
P ( s) = (7.10)
s(s + 1)

Assume that we would like to have a closed loop system that is insensitive
to gain variations with a phase margin of 45○ . Bode’s ideal loop transfer
function that gives this phase margin is

1
L( s ) = √ (7.11)
s s

296
7.4 Robustness

Since L = PC we find that the controller transfer function is

s+1 √ 1
C ( s) = √ = s + √ (7.12)
s s

To implement a controller the transfer function is approximated with a


rational function. This can be done in many ways. One possibility is the
following

(s + 1/16)(s + 1/4)(s + 1)2 (s + 4)(s + 16)


Ĉ (s) = k (7.13)
(s + 1/32)(s + 1/8)(s + 1/2)(s + 2)(s + 8)(s + 32)
√ √
where the gain k is chosen to equal the gain of s + 1/ s for s = i. Notice
that the controller is composed of sections of equal length having slopes 0,
+1 and -1 in the Bode diagram. Figure 7.12 shows the Bode diagrams of
the loop transfer functions obtained with the fractional controller (7.12)
and its approximation (7.13). The differences of the gain curves is not
visible in the graph. Figure 7.12 shows that the phase margin is close to
45○ even if the gain changes substantially. The differences in phase is less
than 2○ for a gain variation of 2 orders of magnitude. With a tolerance of
5○ we can even allow a gain variation of 3 orders of magnitude. The range
of gains can be extended by increasing the order of the approximate con-
troller (7.13). Even if the closed loop system has the same phase margin
when the gain changes the response speed will change with the gain.

The example shows that robustness is obtained by increasing controller


complexity. The range of gain variation that the system can tolerate can
be increased by increasing the complexity of the controller.

7.4 Robustness

The loop transfer function L is the central object in loop shaping design
and the crossover frequency ω gc is the primary design variable. To make
an effective design it is essential to understand how the specifications
are influenced by the loop transfer function. The robustness of a closed
loop system can be described by the sensitivity function and the comple-
mentary sensitivity function. In this section we will investigate how these
transfer functions relate to the loop transfer function and the crossover
frequency.

297
Chapter 7. Loop Shaping

ω pc ω pc
ω ms ω ms
ω gc ω
ω gscc
ω sc

Figure 7.13 Nyquist curve of the loop transfer function with indications of gain
crossover frequency ω gc , phase crossover frequency ω pc , sensitivity crossover fre-
quency ω sc and the frequency where the sensitivity function has its maximum ω ms .

Some Interesting Frequencies


The crossover frequency ω gc is the lowest frequency where the loop trans-
fer function has magnitude one. This is an important parameter in loop
shaping design. The relation between the gain crossover frequency and
other interesting frequencies are illustrated in Figure 7.13 The figure
shows that the phase crossover frequency ω pc and the frequency ω ms
where the sensitivity function has its largest value are larger than ω gc .
The sensitivity crossover frequency ω sc is close to ω gc but it can be larger
or smaller. The phase crossover frequency ω pc is larger than ω gc .

Process Variations
Robustness is captured by the sensitivity functions
1 T
S ( L) = , T ( L) =
1+ L 1+ L
which are directly related to the loop transfer function. A good way to show
how the sensitivity functions depend on L is to plot the loci of constant
magnitude and constant phase of S and T in the L-plane.
The function S( L) is particularly simple. The loci for constant h S( L)h
are simply circles with center at -1 and the loci for constant phase of S( L)
are straight lines through the point -1. This is illustrated in Figure 7.14.
The to find the loci of constant magnitude and phase for the function
T ( L) we introduce L = x + i y. The condition that T is constant can be
written
L x + iy
hT h = = =M
1+ L 1 + x + iy

298
7.4 Robustness

ℑL ℑL

−1 ℜL ℜL

Figure 7.14 L-plane loci for constant gain and constant phase of the sensitivity
function S = 1/(1 + L).

Hence
x2 + y2 = M 2 (1 + 2x + x2 + y2 )

or
 M 2 2 2 M2
x− + y =
1 − M2 (1 − M 2 )2
This is a circle with center at M 2 /(1 − M 2 ) and radius M /( M 2 − 1). If
you know complex functions you will realize this immediately because
the map S( L) is a Möbius transformations that maps circles to circles
and straight lines.
The loci for constant phase of T are circle through the points 0 and -1.
It follows from the geometric interpretation of division of complex numbers
that the circle corresponding to arg T = φ has center at −0.5 + 0.5i/ tan φ
and radius 0.5/h cos φ h. Figure 7.15 shows the loci in the L-plane of con-
stant magnitude and phase of the complementary sensitivity function. The
loci for constant phase and constant magnitude are orthogonal. They are
often drawn in the same figure, called Hall diagram. This diagram gives a
much better insight into permissible parameter variations that the crude
estimates given by Equation (5.14), because the figure shows directly the
effect of the loop transfer function on the closed loop transfer function T.
The transfer function T is also the closed loop transfer function from ref-
erence to the output for a system with error feedback. Figure 7.15 shows
that the widest margin for process variations is when the loop transfer
function is close to the line ℜ L = −0.5. The figure also shows that it is
essential not to have much variation in the gain for frequencies close to
ω pc .

299
Chapter 7. Loop Shaping

ℑL
ℑL

ℜL
ℜL

Figure 7.15 L-plane loci for constant gain (left) and constant phase (right) of the
complementary sensitivity function T = L/(1 + L).

The Nichols Chart


The Hall diagram is convenient to work with when judging loop transfer
functions through the Nyquist plot. When Bode plots are used it is more
convenient to use another diagram called the Nichols chart. This plot is
obtained by mapping the Hall plot through the transformation.

N = log( L)

This means that instead of plotting the real and imaginary parts of L we
plot the logarithm of the magnitude and the argument, see vFigure 7.16.
It is also customary to let the argument be the horizontal axis. The loci
for constant magnitude and constant phase of T are orthogonal if natural
scales are used. In the practice that developed in control engineering it
became practice of choosing other scales which distorts the angles. The
Nichols chart and the Bode plots were very effective tools when computa-
tion was not widely available.

7.5 Measurement Noise


The effect of measurement noise will now be investigated. The feedback
feeds measurement noise into the system, which creates control actions.
This is described analytically by the transfer function from measurement

300
7.5 Measurement Noise

Figure 7.16 The Nichols plot is a digram where the magnitude of L is plotted in
logarithmic scale as a function of the argument of L. The loci of constant magnitude
and phase of the complementary sensitivity function are also plotted in the diagram.

noise to controller output

C C
Gun = = SC = (7.14)
1 + PC T
The loop transfer function PC typically has high gain for low frequencies,
and we have approximately
1
Gun  ,
P
for low frequencies. The loop transfer function is typically small for high
frequencies and we have approximately

Gun  C

It is important that the control actions generated by the measurement


noise are not too large. In particular they should not be so large so that
the system is saturated. Measurement noise typically has high frequen-
cies and the high frequency properties of the transfer function (7.14) are
therefore of particular interest. Assuming that the controller is designed
with Ms < M we find that a simple quantitative measure of noise injection
is the high frequency gain of the controller, i.e.

Mc = max h C (iω )h (7.15)


ω ≥ω g c

301
Chapter 7. Loop Shaping

log h C (iω )h

log K c √
log K

log K

ω gc log ω

Figure 7.17 Gain curve of the transfer function of a typical controller that pro-
vides phase lead.

Reasonable values of the Mc are determined by the noise level and the
span of the control signal.

An Estimate of Mc
We will now investigate how Mc depends on the crossover frequency ω gc .
Let the process transfer function be P(s). Since

1
h C (iω gc )h = (7.16)
h P(iω gc )h

it follows that
1
Mc ≥ (7.17)
h P(iω gc )h
The high frequency gain of the controller can, however, be significantly
larger when the controller has substantial phase advance as is illus-
trated in Figure Figure 7.17. The phase of the process transfer function
at the crossover frequency is arg P(iω gc ). The controller should thus have
a phase lead of
ϕ l = − arg P(iω gc ) − π + ϕ m . (7.18)
It follows from Equation (7.8) that this phase lead is associated with a
gain increase K = e2γ ϕ l . It is reasonable to assume that the controller
transfer function is symmetric around the neighborhood of the crossover
frequency, as shown in Figure
√ 7.17. The high frequency gain of the con-
troller is thus a factor of K larger than the gain at the crossover fre-
quency, which is given by Equation (7.16). We thus obtain the following

302
7.6 Load Disturbances

estimate of the high frequency gain of the controller

1 √ 1
Mc = max(1, K ) = f mc (ω gc , ϕ m )
h P(iω gc )h h P(iω gc )h (7.19)
f mc (ω , ϕ ) = max(1, eγ (− arg P(iω )−π +ϕ ) )

Notice that Mc is a product of two factors, one is inversely proportional to


the process gain at the crossover frequency, the other is the gain required
to obtain the required phase-lead. Notice that the gain increases exponen-
tially with increasing phase lag of the process. The particular value of γ
depends on the details of the design method, a reasonable value is γ = 1.
Equation (7.19) is very useful for assessment of achievable perfor-
mance because it gives an estimate of the maximum controller gain that
only depends on the process transfer function P and the specifications in
terms of gain crossover frequency ω gc and phase margin ϕ m . Since the
gain increases with increasing ω gc it follows that measurement noise and
the saturation levels of the control limits the achievable gain crossover
frequency.

7.6 Load Disturbances


Attenuation of load disturbances is often one of the main reasons for using
feedback. The transfer functions from load disturbance to process output
is given by
P T
G xd = = PS =
1 + PC C
Load disturbances typically have low frequencies. For that reason the
compensators are typically chosen so that the loop transfer function has
high gain at low frequencies, e.g. by introducing integral action. For low
frequencies we have the following approximation

1
G xd 
C

The loop transfer function typically has low gain at high frequencies. For
high frequencies we thus have the following approximation

G xd  P

where the gain of P typically decreases with frequency. We can thus expect
the transfer function G xd to have a maximum. We illustrate this by an
example.

303
Chapter 7. Loop Shaping

EXAMPLE 7.4—AN EXAMPLE OF LOAD DISTURBANCE ATTENUATION


Consider a process with the transfer function

1 b(s)
P ( s) = 2
=
(s + 1) a(s)

The controller
G g0 s2 + g1 s + g2
C ( s) = =
F s( s + f 1 )
where

f 1 = 4a − 2
g0 = 6a2 − 8a + 4
g1 = 5a3 − 4a + 2
g2 = 2a4

gives a closed loop system with the closed loop characteristic polynomial

(s2 + as + a2 )(s + a)(s + 2a)

The transfer functions from load disturbance to process output is

s(s + 4a − 2)
G xd =
( s2 + as + a2 )(s + a)(s + 2a)

1Gain curves for the transfer function are shown in Figure 7.18 for a = 1,
2 and 5. The corresponding values of the gain crossover frequencies are
ω gc = 0.7, 2.1 and 6.5.
The example shows that choice of crossover frequency has a major effect
on attenuation of load disturbances and that it is very advantageous to
have a high crossover frequency.

Estimating Mxd
In Example 7.4 the gain of the transfer function G xd has a maximum,
compare with Figure 7.18. We will now derive an approximation for the
largest gain
Mxd = max h G xd (iω )h (7.20)
ω

of the transfer function G xd and of frequency ω xd where the maximum


is attained. To do this we will make an approximation of G xd for high

304
7.6 Load Disturbances

0
10

−1
10

h G xd (iω )h
10
−2

−3
10

−4
10
−2 −1 0 1 2
10 10 10 10 10

4
10

3
10
h Gun (iω )h

2
10

1
10

0
10
−2 −1 0 1 2
10 10 10 10 10
ω

Figure 7.18 Gain curves for the transfer functions Gxd for crossover frequencies
ω gc = 0.7 (dotted), 2.1(dashed) and 6.5 (full). In the upper curve we also show
the gain curve for the process transfer function in thick full lines. The crossover
frequencies are also marked on this curve. Redraw figure only one curve!

frequencies. The following inequalities holds for all frequencies

P
h G xd h = = h SPh < Ms h Ph

1+ L
P hT h Mt
h G xd h = = <

1+ L hCh hCh

Assuming for simplicity that the controller is designed with Ms < M and
Mt < M we find that

 1 
h G xd (iω )h < M min , h P(iω )h
ω h C (iω )h

It follows from the definition of gain crossover frequency that the terms
h P(iω )h and 1/h C (iω )h are equal for ω = ω gc . In the neighborhood of ω gc
we have  ω n
h P(iω ) C (iω )h  (7.21)
ω gc

305
Chapter 7. Loop Shaping

where −2 < n < 0. Hence


1  ω −n
= h P(iω )h
h C (iω )h ω gc

We thus obtain the following bound

M

 for ω ≤ ω cl
h G xd h ≤ h C (iω )h
M h P(iω )h for ω > ω cl .

The largest value of the right hand side occurs for ω > ω gc if the controller
gain decreases at the crossover frequency and for ω < ω gc if the gain
increases.
If the both controller and process gains decreases at the crossover
frequency we have

max h G xd (iω )h = M h P(iω )gc h


ω

For controllers with phase advance the gain increases at the crossover
frequency. For a controller designed with a phase margin of ϕ m the phase
lead at the crossover frequency is

ϕ l = − arg P(iω gc ) − π + ϕ m .

It follows from Equation (7.8) that this phase lead is associated with a
gain increase K = e2γ ϕ l . If the controller transfer function is symmetric
around the neighborhood of the crossover frequency, as √ shown in Fig-
ure 7.17 the controller gain will drop with the factor of K below the
crossover frequency and we find that

1 √ 1 √
max h G xd (iω )h = M max =M K = M K h P(iω gc )h
ω ω h C (iω )h h C (iω gc )h

Combining with the case when the controller gain was decreasing at the
crossover frequency we obtain the following estimate
√ 1
max h G xd (iω )h = M h P(iω gc )h max(1, K) = f mc (ω gc , ϕ m )
h P(iω gc )h
(7.22)
where the function f (ω , ϕ ) is defined in (7.19). Check the following section
and remove unnecessary material
The typical situation is that the process gain decreases around ω gc . If
For processes where the magnitude of the loop transfer function decreases

306
7.6 Load Disturbances

monotonically around the gain crossover frequency it follows that the first
term is the smallest for ω < ω gc and the second term is the smallest for
ω > ω gc . For processes where the controller gain increase monotonically
and the controller gain decreases monotonically with frequency we have
the following estimate.

hh G xd hh < M h P(iω gc )h. (7.23)

For these processes the maximum occurs at frequencies that are higher
than the crossover frequency ω gc . For controllers with substantial phase
lead the maximum occurs instead for frequencies that are lower than ω gc .
For such frequencies the sensitivity function is close to one and we obtain
the estimate
1
hh G xd hh < min . (7.24)
h C (iω gc )h
The phase lead required is

α = − arg P(iω gc ) − π + ϕ m

Using Bode’s phase area formula the gain required to obtain this lead can
be estimated by
K = e2γ (− arg P(iω gc )π +ϕ m )
Assuming that the phase curve is locally symmetric around the crossover
frequency we get the following estimate

hh G xd hh  h P(iω gc )h e2γ (− arg P(iω gc )π +ϕ m ) .

Combining this with the results for the case when the maximum occurs
for ω > ω gc we get

hh G xd hh  h P(iω gc ) max(1, h e2γ (− arg P(iω gc )π +ϕ m ) ).

The approximation is illustrated by an example.

EXAMPLE 7.5—THE NORM OF G xd


Consider the system in Example 7.4. Figure 7.19 shows the gain curves
of the transfer function P(s) and the transfer functions G xd obtained for
controllers with different crossover frequencies.
The true values of hh G xd hh for the different designs are 0.78 (0.95), 0.26
(0.26) and 0.049 (0.035) they occur at ω = 0.89, (0.74), 1.78 (2.14) and
4.3 (6.5). The estimates given by Equation (7.24) are given in parenthe-
ses. The estimates are too high when the maximum of hh G xd hh occurs for
frequencies below ω gc and too large if the maximum occurs for higher
frequencies.

307
Chapter 7. Loop Shaping

0
10

−1
10

−2
10
y

−3
10

−4
10
−2 −1 0 1 2
10 10 10 10 10
x

Figure 7.19 Gain curves for the transfer functions Gxd for crossover frequencies
ω gc = 0.7, 2.1 and 6.5. The estimates of the maxima of hh Gxd hh given by Equa-
tion (7.24) are marked by o:s.

7.7 Limitations Caused by Non-Minimum Dynamics

The loop transfer function for a minimum phase system can be shaped
in practically any form. The achievable crossover frequency is determined
from a compromise between attenuation of load disturbances and injection
of measurement noise. For systems that are not minimum phase there are
severe restrictions on the choise of the crossover frequency. This imposes
severe limitations on control of such systems. This will be investigated
in this section. Consider a system with the transfer function P(s). Factor
the transfer function as

P(s) = Pmp (s) Pnmp (s) (7.25)

where Pmp is the minimum phase part and Pnmp is the non-minimum
phase part. Let ∆ P(s) denote the uncertainty in the process transfer func-
tion. The factorization is normalized so that h Pnmp (iω )h = 1 and the sign
is chosen so that Pnmp has negative phase. The achievable bandwidth is
characterized by the gain crossover frequency ω gc .

The Crossover Frequency Inequality


We will now derive an inequality for the gain crossover frequency. The loop
transfer function is L(s) = P(s) C (s). Requiring that the phase margin is
ϕ m we get.

arg L(iω gc ) = arg Pnmp (iω gc ) + arg Pmp (iω gc ) + arg C (iω gc ) ≥ −π + ϕ m .
(7.26)
To proceed it is necessary to make some assumptions about the controller-
transfer function. We will assume that the controller is chosen so that the

308
7.7 Limitations Caused by Non-Minimum Dynamics

loop transfer function Pmp C is equal to Bode’s ideal loop transfer function
given by Equation (7.9). Equation (7.26) then becomes
π
arg Pmp (iω ) + arg C (iω ) = n (7.27)
2
where n is the slope of the loop transfer function at the crossover fre-
quency. If replace n by gc the Equation (7.27) is a good approximation for
other controllers, with no RHP poles and zeros, because the amplitude
curve is typically close to a straight line at the crossover frequency. It
follows from Bode’s relations (3.42) that the phase is ngcπ /2. If the con-
troller has poles or zeros in the right half plane its non-minimum phase
parts have to be included in Pnmp .
It follows from Equations (7.26) and (7.27) that the crossover fre-
quency satisfies the inequality

arg Pnmp (iω gc ) ≥ −α (7.28)

where
π
α = −π + ϕ m − ngc . (7.29)
2
This condition which we call the crossover frequency inequality gives the
limitations imposed by non-minimum phase factors. A straightforward
method to assess the crossover frequencies that can be obtained for a
given system is simply to plot the left hand side of Equation (7.28) and
determine when the inequality holds. The following example gives a sim-
ple rule of thumb.

EXAMPLE 7.6—A SIMPLE RULE OF THUMB


To see the implications of (7.28) we will make some reasonable design
choices. The phase margin is chosen to be 45○ (ϕ m = π /4), and the slope
of the compensated minimum phase part is chosen to ngc = −1/2. This
gives α = π /2 and the crossover frequency inequality (7.28) becomes
π
arg Pnmp (iω gc ) ≥ − . (7.30)
2
This gives the simple rule that the phase lag of the minimum phase com-
ponents should be less than 90○ at the gain crossover frequency. If the
slope is instead chosen as n = −1 with a phase margin of 45○ the phase
lag of the non-minimum phase components can be at most −45○ . With
reasonable design choices we thus find that the phase lag of the non-
minimum phase components should be in the range of −45○ to −90○ .
The crossover frequency inequality implies that non-minimum phase
components impose restrictions on possible crossover frequencies. It also

309
Chapter 7. Loop Shaping

10
2 Gain curve

1
10
h G (iω )h
0
10

−1
10

−2
10
−1 0 1
10 10 10
ω
Phase curve
0

−50
arg G (iω )

−100

−150

−200

−250

−300
−1 0 1
10 10 10
ω

Figure 7.20 Bode plot of process transfer function (full lines) and corresponding
minimum phase transfer function (dashed).

means that there are systems that cannot be controlled with sufficient
stability margins. If the process has an uncertainty ∆ P(iω gc ) the crossover
frequency inequality (7.28) becomes more stringent

arg Pnmp (iω gc ) ≥ −α − arg ∆ P(iω gc ).

where α is given by Equation (7.29). A straight forward way of using the


crossover frequency inequality is to plot the phase of the transfer function
of the process and the phase of the corresponding minimum phase system.
Such a plot which is shown in Figure 7.20 will immediately show the
permissible loop transfer function. As an illustration we will give some
analytical examples.

A Zero in the Right Half Plane


We will now discuss limitations imposed by right half plane zeros. We
will first consider systems with only one zero in the right half plane. The
non-minimum phase part of the plant transfer function then becomes

z− s
Pnmp (s) = . (7.31)
z+ s

310
7.7 Limitations Caused by Non-Minimum Dynamics

Notice that Pnmp should be chosen to have unit gain and negative phase.
We have
ω
arg Pnmp (iω ) = −2 arctan
z
Since the phase of Pnmp decreases with frequency the inequality (7.28)
gives the following bound on the crossover frequency.

ω gc α
≤ tan . (7.32)
z 2

with ϕ m = π /4 and ngc = −1/2 which corresponds to the simple rule of


thumb (7.30) we get α = π /2 which implies ω gc < z. With ϕ m = π /4 and
ngc = −1 we get α = 4π / which implies ω gc ≤ 0.4z.
A right half plane zero gives an upper bound to the achievable band-
width. The bandwidth decreases with decreasing frequency of the zero. It
is thus more difficult to control systems with slow zeros.

Time Delays
The transfer function for such systems has an essential singularity at in-
finity. The non-minimum phase part of the transfer function of the process
is
Pnmp (s) = e−sL . (7.33)
We have
arg Pnmp (iω ) = −ω L.
It follows from the crossover frequency inequality, Equation (7.28),
that
π
ω gc L ≤ α = π − ϕ m + ngc = 2α . (7.34)
2
π
The simple rule of thumb (7.30) gives ω gc L ≤ 2 = 1.57. Approximating
the time delay by
1 − sL/2
e−sL =
1 + sL/2
we find that a time delay L corresponds to a RHP zero s = −2/ L, using
the results for systems with a right half plane zero gives instead ω gc L ≤ 2.
Time delays give an upper bound on the achievable bandwidth.

A Pole in the Right Half Plane


Consider a system with one pole in the right half plane. The non-minimum
phase part of the transfer function is thus

s+ p
Pnmp (s) = (7.35)
s− p

311
Chapter 7. Loop Shaping

where p > 0. Notice that the transfer function is normalized so that Pnmp
has unit gain and negative phase. We have
p
arg Pnmp (iω ) = −2 arctan .
ω
It follows from the crossover frequency inequality, Equation (7.28), that
p
ω gc ≥ . (7.36)
tan α /2

The simple rule of thumb (7.30), which corresponds to ϕ m = π /4 and


ngc = −1/2 gives α = π /2 which implies ω gc ≥ p. Requiring that ϕ m =
π /4 and ngc = −1 we get instead α = π /4 and ω gc ≥ 2.4p.
Unstable poles thus give a lower bound on the crossover frequency.
For systems with right half plane poles the bandwidth must thus be suf-
ficiently large. By computing the phase lag of the minimum phase part of
the system at ω gc we can determine the phase lead required to compen-
sate the minimum phase part. Equation (7.8) then gives the gain required
to achieve the phase lead. Knowledge of the measurement noise and the
saturation levels of the control signal then indicates the feasibility of sta-
bilizing the system.

Poles and Zeros in the Right Half Plane


The calculations can be extended to cases with both poles and zeros in
the right half plane. We will give the results for a pole-zero pair. The
non-minimum phase part of the transfer function is then

( z − s)(s + p)
Pnmp (s) = . (7.37)
( z + s)(s − p)

For z > p we have

ω p ω gc / z + p/ω gc
arg Pnmp (iω ) = −2 arctan − 2 arctan = −2 arctan .
z ω 1 − p/ z

The right hand side has its maximum for ω = pz, hence
r
p
arg Pnmp (iω ) ≤ −4 arctan
z

and the inequality (7.28) becomes

z α π ϕm π
≥ tan2 = tan2 − + ngc . (7.38)
p 2 4 4 8

312
7.7 Limitations Caused by Non-Minimum Dynamics

Table 7.2 Achievable phase margin for for ϕ m = π /4 and ngc = −1/2 and different
zero-pole ratios z/ p.

z/ p 2 2.24 3.86 5 5.83 8.68 10 20


ϕm -6.0 0 30 38.6 45 60 64.8 84.6

Introducing the values ϕ m = π /4 and ngc = −1/2 into (7.38) gives z ≥


5.83p. With ϕ m = π /4 and ngc = −1 equation (7.38) gives z ≥ 25.3p.
Table 7.2 gives the phase margin as a function of the ratio z/ p for ϕ m =
π /4 and ngc = −1/2. The phase-margin that can be achieved for a given
ratio p/ z is
π
r
p
ϕ m < π + ngc − 4 arctan . (7.39)
2 z
When the unstable zero is faster than the unstable pole, i.e. z > p,
the ratio z/ p thus must be sufficiently large in order to have the desired
phase margin. The best gain crossover frequency is the geometric mean
of the unstable pole and zero.

EXAMPLE 7.7—BOEING 747


xxx

EXAMPLE 7.8—BACKING A CAR


xxx

EXAMPLE 7.9—THE X-29


Considerable design effort has been devoted to the design of the flight con-
trol system for the experimental X-29 aircraft. One of the design criteria
was that the phase margin should be greater than 45○ for all flight con-
ditions. At one flight condition the model has the following non-minimum
phase component
s − 26
Pnmp (s) =
s−6
Since z = 4.33p, it follows from Equation 7.39 that the achievable phase
margins for ngc = −0.5 and ngc = −1 are ϕ m = 32.3○ and ϕ m = −12.6○ .
It is interesting to note that many design methods were used in a futile
attempt to reach the design goal. A simple calculation of the type given in
this paper would have given much insight. We illustrate the results with
a few examples.

313
Chapter 7. Loop Shaping

EXAMPLE 7.10—KLEIN’S UNRIDABLE BICYCLE


A bicycle with rear wheel steering is an example of a system which is very
difficult to control. The transfer function from steering angle to tilt angle
is given by
θ ( s) mQ V V − as
=
δ ( s) Jc s2 − mgQ/ J
where m is the total mass of the bicycle and the rider, J the moment
of inertia for tilt with respect to the contact line of the wheels and the
ground, h the height of the center of mass from the ground, a the vertical
distance from the center of mass to the contact point of the front wheel,
V the forward velocity,p and g the acceleration of gravity. The system has
a RHP pole at s = p = mgQ/ J, caused by the pendulum effect. Because
of the rear wheel steering the system also has a RHP zero at s = z = V / l.
Typical values m = 70 kg, Q = 1.2 m, a = 0.7, J = 120 kgm2 and V = 5
m/s, give z = V / a = 7.14 rad/s and p = ω 0 = 2.6 rad/s. The ratio of
the zero and the pole is thus p/ z = 2.74, with ngc = −0.5 the inequality
(7.28) shows that the phase margin can be at most ϕ m = 10.4.
The reason why the bicycle is impossible to ride is thus that the system
has a right half plane pole and a right half plane zero that are too close
together. Klein has verified this experimentally by making a bicycle where
the ratio z/ p is larger. This bicycle is indeed possible to ride.
So far we have only discussed the case z > p. When the unstable zero is
slower than the unstable pole the crossover frequency inequality (7.28)
cannot be satisfied unless ϕ m < 0 and ngc > 0. The closed-loop systems
have low gain and poor control at low frequencies, as will be discussed in
Section 7.6.

A Pole in the Right Half Plane and Time Delay


Consider a system with one pole in the right half plane and a time delay
T. The non-minimum phase part of the transfer function is thus
s + p −sT
Pnmp (s) = e . (7.40)
s− p
It follows from the the crossover condition, Equation (7.28), that
ω gc π
2 arctan − ω gc T ≥ ϕ m − ngc . (7.41)
p 2
The system cannot be stabilized if pTp > 2. If pT < 2 the left hand side
has its smallest value for ω gc / p = 2/( pT ) − 1. Introducing this value
of ω gc into (7.41) we get
s s
2 2 π
2 arctan − 1 − pT − 1 > ϕ m − ngc
pT pT 2

314
7.7 Limitations Caused by Non-Minimum Dynamics

. The simple rule of thumb with to ϕ m = π /4 and ngc = −0.5 gives

pT ≤ 0.326 (7.42)

and ϕ m = π /4 and ngc = −1 gives pT ≤ 0.0781.

EXAMPLE 7.11—POLE BALANCING


To illustrate the results we can consider balancing of anp
inverted pendu-
lum. A pendulum of length Q has a right half plane pole g/Q. Assuming
that the neural lag of a human is 0.07 s. The inequality (7.42) gives
g/l 0.07 < 0.326, hence Q > 0.45. The calculation thus indicate that a
p

human with a lag of 0.07 s should be able to balance a pendulum whose


length is 0.5 m. To balance a pendulum whose length is 0.1 m the time
delay must be less than 0.03s. Pendulum balancing has also been done
using video cameras as angle sensors. The limited video rate imposes
strong limitations on what can be achieved. With a video rate of 20 Hz it
follows from (7.42) that the shortest pendulum that can be balanced with
ϕ m = 45○ and ngc = −0.5 is Q = 0.23m.
The calculations can be extended to complex poles and zeros and to mul-
tiple singularities.

Other Criteria
The phase margin and the slope at crossover are quite crude measures.
The advantage in using them is that it is very easy to obtain the crossover
frequency inequality, (7.28). By carrying out detailed designs the results
obtained can be refined and other criteria can be considered. In this section
we have made designs that give Ms = Mt = 2 and Ms = Mt = 1.4. The
results give the following design inequalities.
• A RHP zero z

0.5
(
ω gc for Ms , Mt < 2

z 0.2 for Ms , Mt < 1.4.

• A time delay T

0.7
(
for Ms , Mt < 2
ω gc T ≤
0.37 for Ms , Mt < 1.4.

• A RHP pole p
(
ω gc 2 for Ms , Mt < 2

p 5 for Ms , Mt < 1.4.

315
Chapter 7. Loop Shaping

• A RHP pole-zero pair with z > p

6.5
(
z for Ms , Mt < 2

p 14.4 for Ms , Mt < 1.4.

• A RHP pole p and a time delay T

0.16
(
for Ms , Mt < 2
pT ≤
0.05 for Ms , Mt < 1.4.

A time delay or a zero in the right half plane gives an upper bound of
the bandwidth that can be achieved. The bound decreases when the zero
z decreases and the time delay increases. A pole in the right half plane
gives a lower bound on the bandwidth. The bandwidth increases with
increasing p. For a pole zero pair there is a upper bound on the pole-zero
ratio.
The rules of thumb are very useful for making a preliminary estimate
of what can be achieved by control. They are particularly useful in pre-
liminary phases of projects based on codesign of processes and controllers
because they provide a quick indication of difficulties of control that can
be alleviated by a redesign of the process.

7.8 Trade-offs
• Choose the gain crossover frequency based on the limitations plot
• Determine if higher low frequency gain is required
• Shape th loop transfer function at the crossover frequency
– Approximate with low order system make pole placement
• Some difficult design problems
This section summarizes the results from Sections 7.6 and 7.5 to give a
systematic treatment of some essential trade-offs in loopshaping design.
The crossover frequency is the primary design variable for loop shaping.
The results of the previous sections are very useful for choosing the design
variable. It follows from Section 7.7 that non-minimum phase dynamics
imposes severe restrictions on the crossover frequency.

The Trade-off Plot


The results of Sections 7.6 and 7.5 imply that the choice of crossover fre-
quency is a compromise between attenuation of load disturbances and

316
7.8 Trade-offs

injection of measurement noise. Attenuation of load disturbances can be


described analytically by the largest value, hh G xd hh of the transfer function
from disturbance to process output. Injection of measurement noise can
be captured by the largest value hh Gun hh of the transfer function from mea-
surement noise to control, and the possible choices of crossover frequency
can be captured by the argument of the non-minimum phase component
of the transfer function of the process. These functions can be combined
into one plot, which we call the trade-off plot.
It is also of interest to have an indication of the complexity of the con-
troller that is required. It is natural to use a PID controller as a reference.
We can make the following observation. An integrating controller is suffi-
cient if the phase lag of the process is less than π /2 − ϕ m . A proportional
controller is adequate if the phase lag of the process is less than π − ϕ m
and a derivative controller may be appropriate if the the phase lag of the
process is less than 3π /2 − ϕ m . An assessment of the controller complex-
ity required can thus be made if we include a plot of the argument of the
process with markings for I, P and D controllers. To make the plot we will
also need a value of the combined sensitivity M , the corresponding phase
margin is then given by ϕ m = arcsin(1/ M ).
Some examples of the trade-offs will now be presented.

Examples

The Trade-off Plot


A quick assessment of possible gain crossover frequencies is obtained by
plotting the functions hh G xd hh(ω ), hh Gun hh(ω ) and arg Pnmp (ω ). The following
examples will illustrate the trade-off plots and their uses.
The first example we choose is a minimum phase system where the
crossover frequency can be chosen over a wide range.

EXAMPLE 7.12—MINIMUM PHASE SYSTEM 1


Consider a process with the transfer function

1
P ( s) =
(s + 1)(0.1s + 1)(0.01s + 1)(0.001s + 1)

This transfer function is minimum phase and it is sufficient to plot hh G xd hh


and hh Gun hh(ω ). See Figure 7.21. The figure indicates that reasonable val-
ues of the crossover frequency are between 1 and 50. It is possible to
obtain a substantial reduction of load disturbances. Allowing the largest
high frequency gain of the controller to be 1000 we find that hh G xd hh can
be reduced to 0.01 with a crossover frequency ω gc = 41. With a more rea-
sonable controller gain of 100 we find that hh G xd hh = 0.06 with a crossover

317
Chapter 7. Loop Shaping

0
10

hh G xd hh
10
−2

0 1 2
10 10 10
0
arg P

−100

−200 P

−300
0 1 2
10 10 10
4
10
hh Gun hh

2
10

0
10
0 1 2
10 10 10
ω gc

Figure 7.21 The trade-off plot for a process with transfer function P(s) = 1/(s +
1)(0.1s + 1)(0.01s + 1)(0.001s + 1) which shows estimates of the maximum load
disturbance gain hh Gxd hh, maximum noise gain hh Gun hh and arg P as functions of the
crossover frequency ω gc . The dashed curve in the middle plot also shows the estimate
of the maximum high frequency gain kh f of the controller. The points marked o show
the crossover frequencies achievable by I, P and D controllers.

frequency ω gc = 17. For crossover frequencies less than 30 rad/s it is


possible to use PID control but more complex controllers are required if
higher crossover frequencies are desired.
The second example is a minimum phase system where the crossover
frequency is limited to a narrow range. The fundamental limitation is
given by sensor noise.

EXAMPLE 7.13—MINIMUM PHASE SYSTEM 2


Consider a process with the transfer function

1
P ( s) =
(s + 1)4

This transfer function is minimum phase and it is sufficient to plot hh G xd hh


and hh Gun hh(ω ). See Figure 7.22. The figure indicates that reasonable val-
ues of the crossover frequency are between 0.3 and 3. It is possible to

318
7.8 Trade-offs

0
10

hh G xd hh
−2
10

−1 0 1
10 10 10
0
arg P, Pnmp

−100

−200 P

−300
−1 0 1
10 10 10
4
10
hh Gun hh

2
10

0
10
−1 0 1
10 10 10
ω gc

Figure 7.22 The trade-off plot for a process with transfer function P(s) = 1/(s +
1)4 which shows maximum load disturbance gain hh Gxd hh and maximum noise gain
hh Gun hh as functions of the crossover frequency ω gc . The dashed curve in the lower
plot also shows the estimate of the high frequency gain of the controller.

obtain a substantial of load disturbances. Allowing the largest high fre-


quency gain of the controller to be 1000 we find that hh G xd hh can be reduced
to 0.06 with a crossover frequency ω gc = 1.5. With a more reasonable con-
troller gain of 100 we find that hh G xd hh = 0.05 with ω gc = 1.5. A crossover
frequency of 0.4 rad/s can be obtained with PI control. The crossover fre-
quency can be increased to about 1 rad/s by using PID control. Higher
values can be obtained by using more complex controllers but good sen-
sors and wide signal range of the control signal are required.

EXAMPLE 7.14—NON-MINIMUM PHASE SYSTEM 1


Consider a process with the transfer function

1
P ( s) = e−s
10 ∗ s + 1

This is non-minimum phase because it has a time delay, but the dynamics
is lag dominated. The process has ω 90 = 0.3 and ω 180 = 1.6. The trade-off
plot is shown in Figure 7.23. The figure indicates that the crossover fre-
quency must be less than 1 rad/s, for that frequency we have hh G xd hh = 0.2

319
Chapter 7. Loop Shaping

0
10

hh G xd hh
−1
10

−2
10
−1 0 1
10 10 10
0
arg P, Pnmp

−100

−200 P

−300
−1 0 1
10 10 10
4
10
hh Gun hh

2
10

0
10
−1 0 1
10 10 10
ω gc

Figure 7.23 The trade-off plot for a process with transfer function P(s) =
e−s /(10s + 1) which shows maximum load disturbance gain hh Gxd hh, maximum noise
gain hh Gun hh and phase of process and non-minimum phase part as functions of the
crossover frequency ω gc . The dashed curve in the lower plot also shows the estimate
of the high frequency gain of the controller.

and the controller gain is Mc = 11. With PI control it is possible to obtain


a crossover frequency of about 0.3 rad/s. With PID control it is possible
to obtain a crossover frequency of 1.5 rad/s. This also gives a substantial
reduction of load disturbances, but such a high crossover frequency will
give poor robustness due to the non-minimum phase dynamics. To obtain
a reasonable robustness the crossover frequency should be lower than 1
rad/s.

EXAMPLE 7.15—NON-MINIMUM PHASE SYSTEM 2


Consider a process with the transfer function

1
P ( s) = e−s
0.1 ∗ s + 1

This is non-minimum phase because it has a time delay. The process has
ω 90 = 1.4 and ω 180 = 2.9. The trade-off plot is shown in Figure 7.24. The
figure indicates that the crossover frequency must be less than 1 rad/s,
for that frequency we have hh G xd hh = 2 and the controller gain is Mc = 0.3.

320
7.8 Trade-offs

0
10

hh G xd hh
−1
10
−1 0 1
10 10 10
0
arg P, Pnmp

−100

−200 P

−300
−1 0 1
10 10 10

2
10
hh Gun hh

0
10

−1 0 1
10 10 10
ω gc

Figure 7.24 The trade-off plot for a process with transfer function P(s) =
e−s /(0.1s + 1) which shows maximum load disturbance gain hh Gxd hh, maximum
noise gain hh Gun hh and phase of process and non-minimum phase part as functions
of the crossover frequency ω gc . The dashed curve in the lower plot also shows the
estimate of the high frequency gain of the controller.

The achievable crossover frequency is limited by the time delay to about


1 rad/s. This can easily be obtained by PI control so it is not worth while
to use a more complicated controller in this case.
The examples with non-minimum phase systems given so far have had
time delays which has given an upper bound on the gain crossover fre-
quency. In the next example we present an example that has time delays
as well as poles and zeros in the right half plane.

EXAMPLE 7.16—NON-MINIMUM PHASE SYSTEM 3


Consider a process with the transfer function

10(s − 10)
P ( s) = e−0.0025s
(s − 1)(s + 20)

This system has poles and zeros in the right half plane and a time delay.
The trade-off plot is shown in Figure 7.24. The figure indicates that in
order to have a controller with reasonable robustness the crossover fre-
quency must selected between 1 and 10 rad/s. The figure also indicates

321
Chapter 7. Loop Shaping

1
10

hh G xd hh
10

−1
10

−2
10
−1 0 1 2
10 10 10 10
100
arg P, Pnmp

−100 P

−200
−1 0 1 2
10 10 10 10

2
10
hh Gun hh

0
10

−1 0 1 2
10 10 10 10
ω gc

Figure 7.25 The trade-off plot for a process with transfer function P(s) =
100(s−20)
(s−0.5)(s+20)
e−0.005swhich shows maximum load disturbance gain hh Gxd hh, maximum
noise gain hh Gun hh and phase of process and non-minimum phase part as functions
of the crossover frequency ω gc . The dashed curve in the lower plot also shows the
estimate of the high frequency gain of the controller.

that a controller with purely integral control is sufficient. This problem


is difficult to control in a robust manner and it is probably a good idea to
modify the process or to add more sensors.

Summary
Summarizing we have obtained approximate expressions for the largest
gain of the transfer functions from load disturbances to process output
and from measurement noise to controller output. These expressions can
be used to find a suitable value of the gain crossover frequency as a com-
promise between attenuation of load disturbances and injection of mea-
surement noise.
hh G xd hh = M h P(iω gc )h
M
hh Gun hh = eγ (−π +ϕ m −arg P(iω gc ))
h P(iω gc )h
Notice that the right hand side of these expression depends on the process
transfer function, the design parameters M and ϕ m and the parameter γ .

322
7.9 A Design Procedure

Notice that the requirements on load disturbances typical involves


frequencies lower than ω gc and that the measurement noise involves fre-
quencies above the crossover frequency. The specifications on robustness
typically involve frequencies around the crossover frequency. It should
also be remembered that the models used are not valid for high frequency
which implies that model uncertainty imposes a definite upper limit of
the crossover frequency.

7.9 A Design Procedure


Having understood the basic trade-offs it is now straight forward to for-
mulate a systematic procedure for carrying out the loop shaping.
• Choose the gain crossover frequency based on the trade-offs
• Determine if higher low frequency gain is required
• Determine if higher gain is required at some particular frequency
• Shape the loop transfer function at the crossover frequency
• Analyze the design and fine tune
The trade-off analysis gives a ball park value of the maximum disturbance
gain. Since load disturbances typically have low frequencies it may be use-
ful to increase the gain more at low frequencies by introducing more lead
compensation. There may also be disturbances at particular frequencies
that require particular attention. If these disturbances are sufficiently
smaller than the gain crossover frequency it is possible to use resonant
compensators to increase the loop gain at particular frequencies.
To have good robustness it is essential to shape the loop transfer
function carefully at the crossover frequency. Since the slope around the
crossover frequency must be between -2 and 0 this can often be done by
approximating the loop transfer function by low order dynamics and make
a pole placement design.

7.10 Insights
• Dominant poles determined from the crossover frequency inequality
• Low order models can explain behavior at crossover
• A little about closed loop poles see PID bok
– Separate process poles and zeros into fast and slow

323
Chapter 7. Loop Shaping

Figure 7.26 Representation of the loop transfer function as a map of complex


planes.

– Slow process zeros must be matched by closed loop poles


– Elaborate on dipole compensation
– Fast process poles should be selected as fast closed loop poles
• Good closed loop poles but bad behavior

Dominant Poles
The behavior of a feedback system is typically dominated by a pair of com-
plex poles, which we call dominant poles. These poles are closely related
to the behavior of the loop transfer function at the crossover frequency. A
simple method for approximate determination of the dominant poles from
knowledge of the Nyquist curve of the loop transfer function will now be
given. Consider the loop transfer function L(s) as a mapping from the s-
plane to the L-plane. The map of the imaginary axis in the s-plane is the
Nyquist curve L(iω ), which is indicated in Figure 7.26. The closed-loop
poles are the roots of the characteristic equation

1 + L( s ) = 0

The map of a straight vertical line through the dominant closed-loop poles
in the s-plane is thus a curve through the critical point L = −1 in the L-
plane. This curve is shown by a dashed line in Figure 7.26. Since the map
is conform, the straight line A′ C′ is mapped on the curve AC, which in-
tersects the Nyquist curve orthogonally. The triangle ABC is also mapped
conformally to A′ B′ C′ . If ABC can be approximated by a triangle, we have

L(iω 2 ) − L(iω 1 ) 1 + L(iω 2 )



iω 2 − iω 1 σ
When ω 1 is close to ω 2 this becomes

iω 2 − iω 1 1 + L(iω 2 )
σ = (1 + L(iω 2 ))  (7.43)
L(iω 2 ) − L(iω 1 ) L′ (iω 2 )

where L′ (s) = dL(s)/ ds. To determine the dominant poles we first deter-
mine the point A on the Nyquist curve that is closest to the critical point
−1. This point is characterized by the frequency ω 1 . Then determine the
derivative of the loop transfer function at ω 1 . The dominant poles are
then given by s = −σ ± iω 1 , where σ is given by Equation (7.43).

324
7.10 Insights

A Counter Intuitive Property of Pole Placement Design


It seems intuitively obvious that a closed loop system that is designed
to give closed loop poles which have good relative damping will also be
robust. This is unfortunately not the case as is illustrated by the following
example.

EXAMPLE 7.17—WELL DAMPED POLES BUT POOR ROBUSTNESS


Consider a system with the transfer function

1−s
P ( s) =
s

Assume that it is desired to find a controller with integral action which


gives a closed loop system with the characteristic polynomial

s2 + 2as + a2

i.e. a critically damped pole pair, which is unquestionably well damped.


Let the controller have the transfer function
g
C ( s) =
s+ f

The loop transfer function is

g(1 − s)
L( s ) = =
s( s + f )

The closed loop characteristic polynomial is

s(s + f ) + g(1 − s) = s2 + ( f − g)s + g

Matching the this polynomial with the desired characteristic polynomial


we find

f − g = 2a
g = a2

The controller parameters are

f = a2 + 2a
g = a2

325
Chapter 7. Loop Shaping

and the loop transfer function becomes

a2 (1 − s)
L( s ) =
s(s + 2a + a2 )
Hence
a2 (1 − iω ) a2 (1 − iω )(2a + a2 − iω )
L(iω ) = =
iω (2a + a2 + iω ) iω ((2a + a2 )2 + ω 2 )
a2 (1 + 2a + a2 ) a2 (1 + 2a − ω 2 )
=− − i
(2a + a2 )2 + ω 2 (2a + a2 )2 + ω 2

The loop transfer function intersects the real axis for ω 180 = a2 + 2a. At
the intersection the loop transfer function has the value

a2 (1 + 2a + a2 ) a
L(iω 180 ) = − =−
(2a + a2 )2 + (2a + a2 ) a+2
The gain margin of the system is gm = 1 + 2/ a which can be made arbi-
trarily close to one by making a sufficiently large.
The example shows that it is possible to have systems where the closed
loop poles are very well damped and still the closed loop system is ex-
tremely sensitive to parameters. The reason for this behavior is that the
system has a zero at s = 1 in the right half plane. It thus follows from
the results of Section 7.7 that the crossover frequency cannot be larger
than 0.5 to have a robust closed loop system. Choosing a large value of a
is equivalent to choosing a high crossover frequency. The example shows
clearly the necessity of being aware of the fundamental limitations caused
by non-minimum phase dynamics.
The result can also be explained by Equation (7.43) which implies
that the real part of the root σ can be large even if the distance 1 + L
from the critical point is small if the derivative L′ is also small.

Poles and Zeros


Many properties of the closed-loop system can be deduced from the poles
and the zeros of complementary sensitivity function
L( s )
T ( s) =
1 + L( s )
With error feedback, F = 1 in Figure ??, the closed-loop zeros are the
same as the zeros of loop transfer function L(s), and the closed-loop poles
are the roots of the equation

1 + L( s ) = 0

326
7.10 Insights

Figure 7.27 Pole-zero configuration of the complementary sensitivity function for


a simple feedback system.

The pole-zero configurations of closed-loop systems may vary considerably.


Many simple feedback loops, however, will have a configuration of the type
shown in Figure 7.27, where the principal characteristics of the response
are given by a complex pair of poles, p1 and p2 , called the dominant poles.
The response is also influenced by real poles and zeros p3 and z1 close
to the origin. The position of p3 and z1 may be reversed. There may also
be more poles and zeros far from the origin, which typically are of less
influence. Poles and zeros to the left of the dominant poles have little
influence on the transient response if they are sufficiently far away from
the dominant poles. The influence of a pole diminishes if there is a zero
close to it.
Complex poles can be characterized in terms of their frequency ω 0 ,
which is the distance from the origin, and their relative damping ζ . A
first approximation of the response is obtained from the equivalent sec-
ond order system. The response is modified if there are poles and zeros
close to the dominating poles. Classical control was very much concerned
with closed-loop systems having the pole-zero configuration shown in Fig-
ure 7.27.
Even if many closed-loop systems have a pole-zero configuration sim-
ilar to the one shown in Figure 7.27, there are, however, exceptions. For
instance, systems with mechanical resonances, which may have poles and
zeros close to the imaginary axis, are generic examples of systems that do
not fit the pole-zero pattern of the figure. Another example is processes
with a long dead time.
Design of PID controllers are typically based on low order models
which gives closed loop systems with a small number of poles and ze-
ros.

327
Chapter 7. Loop Shaping

Implications for Pole Placement Design


In pole placement design it is attempted to place the closed loop poles at
arbitrary positions. The investigation of loop shaping has shown clearly
that the closed loop poles cannot be positioned arbitrarily. Example 7.17
shows that non-minimum phase dynamics introduces severe constraints
on locations of closed loop poles. We will now show that there are other
constraints as well, they are particularly important for systems of high
order.
The analysis of limitations in Section 7.7 shows that slow right half
plane zeros impose severe limitations. Slow stable zeros also impose some
restrictions. Consider a process with the transfer function

B
P=
A
and a controller with error feedback having the transfer function

G
C=
F
The complementary sensitivity function is

BG
T=
AF + BG

the gain of this transfer function is close to one for small frequencies.
The gain will increase at a low frequency zero and it will keep increasing
until a closed loop pole is encountered. To avoid having a large gain of
T and a poor sensitivity it is therefore necessary that slow process zeros
are matched with closed loop poles that are close to the zeros. Since there
is a natural tendency for the gain of T to decrease it is advantageous to
choose the closed loop poles slightly faster than the zeros. Slow process
zeros must be matched in the same way.
The reason why slow right half plane zeros impose severe limitations
is that they cannot be compensated by slow right hand poles, because this
will make the closed loop system unstable. Dass lässt tief Gucken
There are also restrictions imposed by fast process poles. To under-
stand this we will consider the process and the controller discussed above.
The sensitivity function is given by

AF
S=
AF + BG
The gain of the sensitivity function is 1 for high frequencies. Now consider
stable open loop poles that are faster than the gain crossover frequency. To

328
7.10 Insights

avoid having a high sensitivity these poles should be matched by closed


loop poles that are close. Fast controller poles should also be matched.
The closed loop poles should be equal to the fast poles or slightly slower.
We thus find that the closed loop poles should be chosen based on the
properties of the process. Our findings can be summarized as follows.
• Determine the crossover frequency or the frequency of the desired
dominant closed loop poles
• Consider the limitations imposed by RHP poles and zeros when mak-
ing the choice
• Choose closed loop poles close to slow process zeros
• Choose closed loop poles close to fast process poles
Let the slow process zeros be roots of the polynomial Bs and let the fast
process poles be roots of the polynomial A f . A rule of thumb is that slow
poles are poles that are a factor of 5 slower than the crossover frequency
and that fast poles are a factor of 5 faster than the crossover frequency.
If we choose to match the slow process zeros and the fast process poles
exactly by closed loop poles the closed loop characteristic polynomial be-
comes C = A f Bs C̄ and we get the following design equation

AF + BG = ĀA f F + B̄ Bs G = A f Bs C̄

Hence F = Bs F̄ and G = A f Ḡ and the design equation reduces to

Ā F̄ + B̄ Ḡ = C̄

where the polynomial C has all its roots in the neighborhood of the gain
crossover frequency. The design is thus accomplished simply by cancelling
slow process zeros and fast process poles. The result is that the design
problem is simplified considerably. This is also one reason why successful
control design can be based on simple models.
We illustrate with an example.

EXAMPLE 7.18—DESIGN BASED ON A LOW ORDER APPROXIMATION


Consider a process with the transfer function

(s + 0.1)(s + 0.2)
P ( s) =
(s + 1)(s + 2)(s + 10)(s + 20)

329
Chapter 7. Loop Shaping

Difficult Design Problems


• PID with multiple intersections
• Oscillatory systems
• Smith compensator

7.11 Summary
• What have we learned
• A simple design procedure
• There are fundamental limitations - non-minimum phase
• Why low order models work - Dominant poles
• There are severe restrictions when choosing closed loop poles- The
difficulties with pole placement

7.12 References

330
8
Feedforward Design

8.1 Introduction
Feedforward is a powerful technique that complements feedback. It can be
used both to reduce the effect of measurable disturbances and to improve
set-point responses. Uses of feedforward was already discussed in connec-
tion with systems having two degrees of freedom in Section ??. We will
now give a systematic treatment of feedforward and also discuss design
of model-following systems.

8.2 Disturbance attenuation

Disturbances can be eliminated by feedback. With a feedback system it


is, however, necessary that there be an error before the controller can
take actions to eliminate disturbances. In some situations it is possible
to measure disturbances before they have influenced the processes. It is
then natural to try to eliminate the effects of the disturbances before they
have created control errors. This control paradigm is called feedforward.
The principle is illustrated in Figure 8.1.
In Figure 8.1 process transfer function P is composed of two factors,
P = P1 P2 . A measured disturbance d enters at the input of process sec-
tion P2 . The measured disturbance is fed to the process input via the
feedforward transfer function G f f .
The transfer function from load disturbance to process output is

Y ( s) P2 (1 − P1 G f f )
= = P2 (1 − P1 G f f ) S (8.1)
D ( s) 1 + PC

331
Chapter 8. Feedforward Design

d
−F

r u y
Σ C Σ P1 Σ P2

−1

Figure 8.1 Block diagram of a system where measured disturbance d is reduced


by a combination of feedback and feedforward.

where S = 1/(1 + PC ) is the sensitivity function. This equation shows


that there are two ways of reducing the disturbance. We can try to make
1 − P1 G f f small by a proper choice of the feedforward transfer function
G f f or we can make the loop transfer function PC large by feedback.
Feedforward and feedback can also be combined.
Notice that with feedforward we are trying to make the difference
between two terms small but with feedback we simply multiply with a
small number. An immediate consequence is that feedforward is more
sensitive than feedback. With feedback there is risk of instability, there
is no such risk with feedforward. Feedback and feedforward are therefore
complementary and it is useful to combine them.
An ideal feedforward compensator is given by
P yd
G f f = P1−1 = . (8.2)
P yu
where P yd is the transfer function from d to y and P yu = P is the transfer
function from u to y.
The ideal feedforward compensator is formed by taking the inverse of
the process dynamics P1 . This inverse is often not realizable, but approx-
imations have to be used. This problem is treated in the next section.
Feedforward is most effective when the disturbance d enters early in
the process. This occurs when most of the dynamics are in process section
P2 . When P1 = 1, and therefore P2 = P, the ideal feedforward compensator
is realizable and the effects of the disturbance can be eliminated from the
process output y. On the other hand, when the dynamics enter late in
the process, so that P1  P, the effects of the disturbance are seen in the
process output y at the same time as they are seen in the feedforward
signal. In this case, there is no advantage of using feedforward compared
to feedback.

332
8.2 Disturbance attenuation

Steam valve
Feed F F

water
L Drum

Oil Turbine
Air
Raiser Down comer

Figure 8.2 Schematic diagram of a drum boiler with level control.

Applications
In many process control applications there are several processes in series.
In such cases it is often easy to measure disturbances and use feedfor-
ward. Typical applications of feedforward control are: drum-level control
in steam boilers, control of distillation columns and rolling mills. An ap-
plication of combined feedback and feedforward control follows.

EXAMPLE 8.1—DRUM LEVEL CONTROL


A simplified diagram of a steam boiler is shown in Figure 8.2. The water
in the raiser is heated by the burners. The steam generated in the raiser,
which is lighter than the water, rises toward the drum. This causes a
circulation around the loop consisting of the raisers, the drum, and the
down comers. The steam is separated from the water in the drum. The
steam flow to the turbine is controlled by the steam valve.
It is important to keep the water level in the drum constant. Too low a
water level gives insufficient cooling of the raisers, and there is a risk of
burning. With too high a water level, water may move into the turbines,
which may cause damage. There is a control system for keeping the level
constant. The control problem is difficult because of the so-called shrink
and swell effect. It can be explained as follows: Assume that the system is
in equilibrium with a constant drum level. If the steam flow is increased
by opening the turbine valve, the pressure in the drum will drop. The
decreased pressure causes generation of extra bubbles in the drum and
in the raisers. As a result the drum level will initially increase. Since
more steam is taken out of the drum, the drum level will of course finally
decrease. This phenomena, which is called the shrink and swell effect,
causes severe difficulties in the control of the drum level. Mathematically
it also gives rise to right half plane zero in the transfer function.

333
Chapter 8. Feedforward Design

The problem can be solved by introducing the control strategy shown


in Figure 8.2. It consists of a combination of feedback and feedforward.
There is a feedback from the drum level to the controller, but there is also
a feedforward from the difference between steam flow and feed-water flow
so that the feedwater flow is quickly matched to the steam flow.

8.3 System inverses


It follows from (8.2) that the feedforward compensator contains an inverse
of the process model P1 . A key issue in design of feedforward compensators
is thus to find inverse dynamics. It is easy to compute the inverse formally.
There are, however, severe fundamental problems in system inversion
that are illustrated by the following examples.

EXAMPLE 8.2—INVERSE OF KLT SYSTEM


The system
1
P ( s) = e−sL
1 + sT
has the formal inverse.

P−1 (s) = (1 + sT ) esL

This system is not a causal dynamical system because the term esL repre-
sents a prediction. The term (1 + sT ) requires and ideal derivative which
also is problematic as was discussed in Section ??. Implementation of
feedforward thus requires approximations.

EXAMPLE 8.3—INVERSE OF SYSTEM WITH RHP ZERO


The system
s−1
P ( s) =
s+1
has the inverse
s+2
P−1 (s) =
s−1
Notice that this inverse is an unstable system.
Use of system inverses and feedforward often gives rise to pole-zero
cancellations. The canceled poles and zeros must be stable and sufficiently
fast otherwise there will be signals in the system that will grow exponen-
tially or decay very slowly.
To design feedforward we thus have to compute approximate system in-
verses with suitable properties. Since feedforward is frequently combined

334
8.4 Response to Reference Inputs

with feedback we can take that into account when finding approximate
inverses.
Let P† denote the approximate inverse of the transfer function P. A
common approximation in process control is to neglect all dynamics and
simply take the inverse of the static gain, i.e.

P† (s) = P(0)−1

A number of results on more accurate system inverses have been de-


rived in system theory. Some of these will be shown here. Note that it
follows from (8.2) that the inverse transfer function only has to be small
for those frequencies where the sensitivity function is large.

EXAMPLE 8.4—APPROXIMATE INVERSE OF KLT SYSTEM


The system
1
P ( s) = e−sL
1 + sT
has the approximate inverse.

1 + sT
P † ( s) =
1 + sT / N

where N gives the frequency range where inversion is valid.

EXAMPLE 8.5—APPROXIMATE INVERSE OF SYSTEM WITH RHP ZERO


The system
s−1
P ( s) =
s+2
has the inverse
s+2
P † ( s) =
s+1
Notice that the unstable zero in P gives rise to a pole in P† which is the
mirror image of the unstable zero.

8.4 Response to Reference Inputs


Feedforward can be used very effectively to improve the set point response
of the system. This was has been discussed in connection with systems
having two degrees of freedom in Section 5.3. Here we will go a little
deeper into the design of feedforward compensators.

335
Chapter 8. Feedforward Design

a
d n

r e u x y
F Σ C Σ P Σ

−1

b
d n

r e u x y
F Σ CI Σ P Σ

CR

−1

P† M uf f
r
ym u y
M Σ C Σ P

−1

Figure 8.3 Block diagram of three system with two degrees of freedom.

We will start with a system having two degrees of freedom. It is as-


sumed that a feedback controller which gives good rejection of distur-
bances and good robustness has been designed an we will consider the
problem of designing feedforward compensators that give good response
to set point changes. There are many possible configurations of a system
with two degrees of freedom. Three examples are shown in in Figure 8.3.
The block diagram in the top of the figure (a) is the system that was dis-
cussed in the previous chapters. The process has the transfer function P

336
8.4 Response to Reference Inputs

and the feedback controller has the transfer function C. The system in the
middle (b) is a slight modification where the controller transfer function
is written as
C = CI + CR
where CI is the term of the controller function that contains integral
action and CR is the rest of the controller transfer function. For the PID
controller
ki
C = k+ + kd s
s
we have
ki
CI =
s
CR = k + kd s

The block diagram at the bottom of the figure (c) is yet another config-
uration. In this system there is an explicit feedforward signal u f f that
generates an input to the process that gives the ideal response ym to a
reference input r. This input is generated by the transfer function M . The
feedback operates on the error ym − y. It can be shown that all configu-
rations are equivalent if all systems are linear and the transfer functions
are chosen properly.
There are however some differences between the systems from a prac-
tical point of view. Assume for example that the transfer function M that
gives the ideal response to reference inputs is such that the transfer func-
tion P−1 M is stable with the same number of poles and zeros. It then
follows that the scheme c) in Figure 8.3 will give the ideal response to
reference signals for all controllers C that stabilize the system. There is
thus a clean separation between feedback and feedforward. The scheme
a) in Figure 8.3 will give the ideal response if

P−1 M + CM = C F

which implies that in a) the transfer function F must be chosen as

1 + PC
F=M
PC
The transfer function F thus depends on C. This means that if the feed-
back controller C is changed it is necessary to also change the feedforward
F. Notice that the feedforward F must cancel zeros in PC that are not
zeros of M . The corresponding equation for scheme b) is

1 + PC
F=M
PCI

337
Chapter 8. Feedforward Design

The transfer function CI = ki / s does not have any zeros. With this scheme
the feedforward F must cancel zeros in P that are not zeros of M .
Notice that in all cases it is necessary to have an invertible process
transfer function P. Approximate inverses must be used if this transfer
function has RHP zeros or time delays. In scheme c) the process inverse
appears in the combination P† M . This transfer function will not contain
derivatives if the pole excess of P is not larger than the pole excess of M .
For example, if

1
P ( s) =
s(s + 1)
1
M ( s) = 2
s +s+1

then
s(s + 1)
P−1 (s) M (s) =
s2 + s + 1
Notice also that in this case the steady state gain of the transfer function
P−1 (s) M (s) is zero.

8.5 Summary

Design of feedforward has been discussed in this chapter. Feedforward can


be used to reduce the effect of measurable disturbances. Design of feedfor-
ward is essentially a matter of finding inverse process models. Different
techniques to do this have been discussed. The major part of the chapter
has been devoted to set point response. A structure with two degrees of
freedom has been used. This gives a clean separation of regulation and set
point response and of feedback and feedforward. It has been assumed that
the feedback controller has been designed. A simple way to modify the set
point response is to use set point weighting. If the desired results cannot
be obtained by zero set point weighting a full fledged two degree of free-
dom can be used. This makes is possible to make a complete separation
between load disturbance response and set point response. The crucial
design issue is to decide the achievable response speed. For systems with
monotone set point responses the notion of neutral feedforward has been
proposed. Many other variants have also been discussed. Finally it has
been demonstrated that very fast set point responses can be obtained by
using nonlinear methods.
Special care must be taken when implementing feedforward control,
otherwise integrator windup may occur.

338
9
State Feedback

9.1 Introduction

The state of a dynamical system is a collection of variables that permits


prediction of the future development of a system. It is therefore very natu-
ral to base control on the state. This will be explored in this chapter. It will
be assumed that the system to be controlled is described by a state model.
Furthermore it is assumed that the system has one control variable. The
technique which will be developed may be viewed as a prototype of an
analytical design method. The feedback control will be developed step by
step using one single idea, the positioning of closed loop poles in desired
locations.
The case when all the state variables are measured is first discussed
in Section 9.2. It is shown that if the system is reachable then it is always
possible to find a feedback so that the closed loop system has prescribed
poles. The controller does not have integral action. This can however be
provided by a hack using state augmentation.
In Section 9.3 we consider the problem of determining the states from
observations of inputs and outputs. Conditions for doing this are estab-
lished and practical ways to do this are also developed. In particular it is
shown that the state can be generated from a dynamical system driven by
the inputs and outputs of the process. Such a system is called an observer.
The observer can be constructed in such a way that its state approaches
the true states with dynamics having prescribed poles. It will also be
shown that the problem of finding an observer with prescribed dynamics
is mathematically equivalent to the problem of finding a state feedback.
In Section 9.4 it is shown that the results of Sections 9.2 and 9.3 can be
combined to give a controller based on measurements of the process output
only. The conditions required are simply that the system is reachable and

339
Chapter 9. State Feedback

observable. This result is important because the controller has a very


interesting structure. The controller contains a mathematical model of the
system to be controlled. This is called the internal model principle. The
solution to the pole placement problem also illustrates that the notions
of reachability and observability are essential. The result gives a good
interpretation of dynamic feedback. It shows that the dynamics of the
controller arises from the need to reconstruct the state of the system.
The controller obtained in Section 9.4 is compared with a PID con-
troller in Section 9.5. The comparison shows that one difference is that
the prediction by derivative action in the PID controller is replaced by
a better prediction using a mathematical model in the controller in the
controller with output feedback. The comparison also shows that the con-
troller with output feedback does not have integral action. The lack of
integral action is due to assumptions made when modeling the system.
Once this is understood it is easy to modify the model so that integral
action is obtained. The modification requires modeling of disturbances
which is discussed in Section 9.6. This shows that integral action is ob-
tained when there are constant disturbances. The theory also make it
possible to deal with other types of disturbances in a similar way. The
approach is based on the idea of state augmentation. This means that the
model of the system is augmented by mathematical models that describe
disturbances acting on the system.
Following reference signals is discussed in Section 9.7. It is shown
that following of reference signals can be completely decoupled from dis-
turbance attenuation by a design which gives a controller having two
degrees of freedom. Finally in Section 9.8 we give an example that illus-
trates the design technique.
The details of the designs in this chapter are carried out for systems
with one input and one output. It turns out that the structure of the
controller and the forms of the equations are exactly the same for systems
with many inputs and many outputs. There are also many other design
techniques that give controllers with the same structure. A characteristic
feature of a controller with state feedback and an observer is that the
complexity of the controller is given by the complexity of the system to
be controlled. The controller actually contains a model of the system, the
internal model principle.

340
9.2 State Feedback

u ẋ x y
Σ
R
B C

Figure 9.1 Block diagram of the process described by the state model in Equa-
tion (9.1).

9.2 State Feedback

Consider a system described by the linear differential equation

dx
= Ax + Bu
dt (9.1)
y = Cx

A block diagram of the system is shown in Figure 9.1. The output is the
variable that we are interested in controlling. To begin with it is assumed
that all components of the state vector are measured. Since the state at
time t contains all information necessary to predict the future behavior
of the system, the most general time invariant control law is function of
the state, i.e.
u(t) = f ( x)
If the feedback is restricted to be a linear, it can be written as

u = − Lx + Lr r (9.2)

where r is the reference value. The negative sign is simply a convention


to indicate that negative feedback is the normal situation. The closed loop
system obtained when the feedback (9.1) is applied to the system (9.2) is
given by
dx
= ( A − B L) x + B L r r (9.3)
dt
It will be attempted to determine the feedback gain L so that the closed
loop system has the characteristic polynomial

p(s) = sn + p1 sn−1 + . . . + pn−1 s + pn (9.4)

This control problem is called the pole assignment problem or the pole
placement problem.

341
Chapter 9. State Feedback

The transfer function from reference r to output y of the closed loop


system is
G yr (s) = C (sI − A + B L)−1 B Lr (9.5)
Requiring that the static gain from reference r to output y should be equal
to one gives
1 1 + LA−1 B
Lr = 1
= (9.6)

C (− A + B L) B C A−1 B
The static gain given by (9.6) critically depends on the parameter values.
We express this by saying that the system is calibrated. This is different
from a system with integral action where the static gain does not depend
on the parameter values.

Examples
We will start by considering a few examples that give insight into the
nature of the problem.

EXAMPLE 9.1—THE DOUBLE INTEGRATOR


The double integrator is described by

0 1 0
   
dx
= x+ u

   
dt 0 0 1
 
y = 1 0x

Introducing the feedback

u = −l1 x1 − l2 x2 + Lr r

the closed loop system becomes

 0 1   0 
   
dx
= x+
   r
dt − l1 − l2

Lr (9.7)
 
y = 1 0x

The closed loop system has the characteristic polynomial

−1 
 
s
det  = s 2 + l2 s + l1

 
l1 s + l2

Assume it is desired to have a feedback that gives a closed loop system


with the characteristic polynomial

p(s) = s2 + 2ζ ω 0 s + ω 02

342
9.2 State Feedback

Comparing this with the characteristic polynomial of the closed loop sys-
tem we fin the following values of the We find that the feedback gains
should be chosen as
l1 = ω 02 , l2 = 2ζ ω 0
The closed loop system which is given by Equation (9.7) has the transfer
function
 s −1 −1  0 
   
G yr (s) = 1 0 
  
 
   
l1 s + l2

Lr
Lr Lr
= 2 = 2
s + l2 s + l1 s + 2ζ 0ω 0 s + ω 02

To have unit steady state gain the parameter Lr must be equal to l1 = ω 02 .


The control law can thus be written as

u = l1 (r − x1 ) − l2 x2 = ω 02 (r − x1 ) − 2ζ 0ω 0 x2

In the next example we will encounter some difficulties.

EXAMPLE 9.2—AN UNREACHABLE SYSTEM


Consider the system

0 1 1
   
dx
= x+ u

   
dt 0 0 0
 
y = Cx =  1 0  x

with the control law


u = −l1 x1 − l2 x2 + Lr r
The closed loop system is

 − l1 1 − l2 
   
dx  Lr 
= x+
   r
dt 0 0 0

This system has the characteristic polynomial

s + l1 −1 + l2 
 
det   = s 2 + l1 s = s ( s + l1 )

 
0 s

This polynomial has zeros at s = 0 and s = −l1 . One closed loop pole is
thus always equal to s = 0 and it is not possible to obtain an arbitrary
characteristic polynomial.

343
Chapter 9. State Feedback

This example shows that the pole placement problem cannot be solved.
An analysis of the equation describing the system shows that the state x2
is not reachable. It is thus clear that some conditions on the system are
required. The reachable and observable canonical forms have the property
that the parameters of the system are the coefficients of the characteristic
equation. It is therefore natural to consider systems on these forms when
solving the pole placement problem. In the next example we investigate
the case when the system is in reachable canonical form.

EXAMPLE 9.3—SYSTEM IN REACHABLE CANONICAL FORM


Consider a system in reachable canonical form, i.e,

−a1 −a2 . . . −an−1 − an  1


   
 
...
   
1 0 0 0  0

 
 
 

  
 

dz 

0 1 . . . 0 0 

 

0


= Ãz + B̃u =  z + u

  
 

dt . .
  
(9.8)
   
.. .
   
.

 
 
 


 
 
 
  
 
0 0 ... 1 0 0
  
 
y = C̃z =  b1 b2 ⋅ ⋅ ⋅ bn  z

The open loop system has the characteristic polynomial

s + a1 a2 ... an−1 an 
 

 
−1 s 0 0 

 


 
 
Dn (s) = det  0 −1 0 0 

 

.

 

 ..

 

 


 

0 0 −1
 
s

Expanding the determinant by the last row we find that the following
recursive equation for the determinant.

Dn(s) = sDn−1(s) + an

It follows from this equation that

Dn (s) = sn + a1 sn−1 + . . . + an−1 s + an

A useful property of the system described by (9.8) is thus that the co-
efficients of the characteristic polynomial appear in the first row. Since
the all elements of the B-matrix except the first row are zero it follows
that the state feedback only changes the first row of the A-matrix. It is

344
9.2 State Feedback

thus straight forward to see how the closed loop poles are changed by the
feedback. Introduce the control law

u = − L̃z + Lr r = −l̃1 z1 − l̃2 z2 − . . . − l̃n zn + Lr r (9.9)

The closed loop system then becomes

−a1 − l̃1 −a2 − l̃2 . . . −an−1 − l̃n−1 −an − l̃n  Lr 


   

  
 
1 0 0 0 0 

 
 
 

 
 
 

dz  
0 1 0 0

 

0 


= z + r

 
 
 
dt .. .
 
 
 

.
   
. . 

 
 
 


 
 
 
   

0 0 1 0 0
  
 
y =  b1 b2 ⋅ ⋅ ⋅ bn  z
(9.10)
The feedback thus changes the elements of the first row of the A matrix,
which corresponds to the parameters of the characteristic equation. The
closed loop system thus has the characteristic polynomial

sn + (al + l̃1 )sn−1 + (a2 + l̃2 )sn−2 + . . . + (an−1 + l̃n−1 )s + an + l̃n

Requiring this polynomial to be equal to the desired closed loop polynomial


(9.4) we find that the controller gains should be chosen as

l̃1 = p1 − a1
l̃2 = p2 − a2
..
.
l̃n = pn − an

This feedback simply replace the parameters ai in the system (9.10) by


pi . The feedback gain for a system in reachable canonical form is thus
 
L̃ =  p1 − a1 p2 − a2 ⋅⋅⋅ pn − an  (9.11)

The system (9.10) has the following transfer function from reference to
output from

(b1 sn−1 + b2 sn−2 ⋅ ⋅ ⋅ + bn−1 s + bn ) Lr


G yr (s) =
sn+ p1 sn−1 + p2 sn−2 + . . . + pn−1 s + pn

345
Chapter 9. State Feedback

Notice that the system has the same zeros as the open loop system. To
have unit steady state gain the parameter Lr should be chosen as

an + l̃n pn
Lr = = (9.12)
bn bn

Notice that it is essential to know the precise values of parameters an


and bn in order to obtain the correct steady state gain. The steady state
gain is thus obtained by precise calibration. This is very different from
obtaining the correct steady state value by integral action. We thus find
that it is easy to solve the pole placement problem when the system has
the structure given by (9.8).

The General Case


To solve the problem in the general case, we simply change coordinates
so that the system is in reachable canonical form. Consider the system
(9.1). Change the coordinates by a linear transformation

z = Tx

so that the transformed system is in observable canonical form (9.8). For


such a system the feedback is given by (9.9) where the coefficients are
given by (9.11). Transforming back to the original coordinates gives the
feedback
u = − L̃z + Lr r = − L̃T x + Lr r
It now remains to find the transformation. To do this we observe that the
reachability matrices have the property.
   
W̃r =  B̃ Ã B̃ ... Ãn−1 B̃  = T  B AB ... An−1 B  = T Wr

The transformation matrix is thus given by

T = W̃r Wr−1 (9.13)

and the feedback gain can be written as

L = L̃T = L̃ W̃r Wr−1 (9.14)

Notice that the matrix W̃r is given by (3.69). The feedforward gain Lr is
given by Equation (9.12).
The results obtained can be summarized as follows.

346
9.2 State Feedback

THEOREM 9.1—POLE-PLACEMENT BY STATE FEEDBACK


Consider the system given by Equation (9.1)

dx
= Ax + Bu
dt
y = Cx

with one input and one output which has the transfer function

(b1 sn−1 + b2 sn−2 ⋅ ⋅ ⋅ + bn−1 s + bn ) Lr


G ( s) =
sn + a1 sn−1 + a2 sn−2 + . . . + an−1 s + an

If the system is reachable there exits a feedback

u = − Lx + Lr r

that gives a closed loop system with the characteristic polynomial

p(s) = sn + p1 sn−1 + . . . + pn−1 s + pn

The feedback gain is given by


 
L = L̃T =  p1 − a1 p2 − a2 ... pn − an  W̃r Wr−1
pn
Lr =
an

where ai are the coefficients of the characteristic polynomial of the matrix


A and the matrices Wr and W̃r are given by
 
Wr =  B AB . . . An−1 

1 a1 a2 ... an−1 −1


 

0 1 ...
 
a1 an−2 

 
 
W̃r = 

.

 ..

 

 


 

0 0 0 ... 1
 

REMARK 9.1—A MATHEMATICAL INTERPRETATION


Notice that the pole-placement problem can be formulated abstractly as
the following algebraic problem. Given an n  n matrix A and an n  1
matrix B, find a 1 n matrix L such that the matrix A− B L has prescribed
eigenvalues.

347
Chapter 9. State Feedback

Computing the Feedback Gain


We have thus obtained a solution to the problem and the feedback has
been described by a closed form solution.
For simple problems is is easy to solve the problem by the following
simple procedure: Introduce the elements li of L as unknown variables.
Compute the characteristic polynomial

det(sI − A + B L)

Equate coefficients of equal powers of s to the coefficients of the desired


characteristic polynomial

p(s) = sn + p1 sn−1 + . . . + pn−1 + pn

This gives a system of linear equations to determine li . The equations


can always be solved if the system is observable. Example 9.1 is typical
illustrations.
For systems of higher order it is more convenient to use Equation 9.14,
this can also be used for numeric computations. However, for large sys-
tems this is not sound numerically, because it involves computation of the
characteristic polynomial of a matrix and computations of high powers
of matrices. Both operations lead to loss of numerical accuracy. For this
reason there are other methods that are better numerically. In Matlab the
state feedback can be computed by the procedures acker or place.
ACKER Pole placement gain selection using Ackermann’s formula.

K = ACKER(A,B,P) calculates the feedback gain matrix K such that


the single input system
.
x = Ax + Bu

with a feedback law of u = -Kx has closed loop poles at the


values specified in vector P, i.e., P = eig(A-B*K).

Note: This algorithm uses Ackermann’s formula. This method


is NOT numerically reliable and starts to break down rapidly
for problems of order greater than 10, or for weakly controllable
systems. A warning message is printed if the nonzero closed-loop
poles are greater than 10\% from the desired locations specified
in P.

See also PLACE.

PLACE Pole placement technique

348
9.2 State Feedback

K = PLACE(A,B,P) computes a state-feedback matrix K such that


the eigenvalues of A-B*K are those specified in vector P.
No eigenvalue should have a multiplicity greater than the
number of inputs.

[K,PREC,MESSAGE] = PLACE(A,B,P) returns PREC, an estimate of how


closely the eigenvalues of A-B*K match the specified locations P
(PREC measures the number of accurate decimal digits in the actual
closed-loop poles). If some nonzero closed-loop pole is more than
10\% off from the desired location, MESSAGE contains a warning
message.

See also ACKER.

Notice that the program acker does not give the static gain Lr , com-
pare (9.6), and that the notation is different from the one we use in the
book. This is easily dealt with by writing a new Matlab function sfb which
computes the gain matrices for the state feedback problem.
function [L Lr]=sfb(A,B,C,p)
% Compute gains L Lr for state feedback
% A, B and C are the matrices in the state model
% p is a vector of desired closed loop poles
L=acker(A,B,p);
Lr=1/(C*((-A+B*L)\B);

This program also computes the gain Lr .

Integral Action
The controller (9.2) does not have integral action. The correct steady state
response to reference values was obtained by a proper choice of the gain
Lr , i.e. a calibrated procedure. Compare with (9.6). This means that the
controller is not useful practically. One way to ensure that the output will
equal the reference in steady state is enforce integral action. One way to
do this is to introduce the integral of the error as an extra state, i.e.
Z
xn+1 = ( y − r)dt

Differentiating this equation gives

dxn+1
= y − r = Cx − r
dt

Augmenting the state by considering xn+1 as an extra state variable we

349
Chapter 9. State Feedback

find that the augmented system can be described by the equation


 
d  x 
=  
dt dt xn+1
 

A 0 x   B  (9.15)
      
= + u + 0− Ir

    
C 0 0

xn+1
= Āξ + B̄r

This equation has the same form as the original system (9.1). The reach-
ability matrix of the augmented system is

... An B
 
B AB
Wr = 


0 ... C An−1 B
 
CB

To find the conditions for Wr to be of full rank the matrix will be trans-
formed by making column operations. Let ak be the coefficients of the
characteristic polynomial of the matrix A. Multiplying the first column by
an , the second by an−1 and the (n-1)th column by a1 and adding to the
last column the matrix Wr it follows from the Cayley-Hamilton theorem
that the transformed matrix becomes

 B AB . . . 0 
 
Wr =  
0 C B . . . bn
 

where
bn = C ( An−1 B + a1 An−2 B + . . . + an−1 B ) (9.16)
Notice that bn can be identified with a coefficient of the transfer function
of the original system

b1 sn−1 + b2 sn−2 + . . . + bn
G ( s) =
sn + a1 sn−1 + . . . + an

Notice that bn = an G (0) = −an C A−1 B. Compare with Section 3.7.


The state feedback for the augmented system (9.15) is
  x 
u = − L̄ξ = −  L LI    + Lr r (9.17)
 


xn+1

and the closed loop system becomes

x   A − BL − B L I   x   B Lr 
      
d 
 =
   +
  r

dt xn+1 0 −1
  
C xn+1

350
9.3 Observers

If the reference is constant r0 and the closed loop system is stable it follows
that
y0 = Cx0 = r0
The steady state output is thus equal to the reference for all values of the
gain Lr . This is no surprise because the control law (9.17) can be written
as
Z t Z t
u(t) = − Lx(t)− L I ( y(τ )−r(τ ))dτ + Lr r(t) = Lr r(t)+ L I e(τ )dτ − Lx(t)
0 0
(9.18)
and it clearly has integral action. Compare with Equation (2.4). This com-
parison also shows that the term − Lx(t) is a generalization of derivative
action.

Summary
It has been found that the control problem is simple if all states are
measured. The most general feedback is a static function from the state
space to space of controls. A particularly simple case is when the feedback
is restricted to be linear, because it can then be described as a matrix or a
vector in the case of systems with only one control variable. A method of
determining the feedback gain in such a way that the closed loop system
has prescribed poles has been given. This can always be done if the system
is reachable. A method of obtaining integral action was also introduced.
A comparison with the PID controller showed that state feedback can
be interpreted as a PID controller where the derivative is replaced by a
better prediction based on the state of the system.

9.3 Observers
In Section 9.2 it was shown that the pole it was possible to find a feedback
that gives desired closed loop poles provided that the system is reachable
and that all states were measured. It is highly unrealistic to assume that
all states are measured. In this section we will investigate how the state
can be estimated by using the mathematical model and a few measure-
ments. Before reading this section it is recommended to refresh the mate-
rial on observability in Section 3.7. In that section it was shown that the
state could be computed from the output if the the system is observable.
In this Section we will develop some practical methods for determining
the state of the system from inputs and outputs. It will be shown that
the computation of the states can be done by dynamical systems. Such
systems will be called observers.

351
Chapter 9. State Feedback

Consider a system described by

dx
= Ax + Bu
dt (9.19)
y = Cx

where x is the state, u the input, and y the measured output. The problem
of determining the state of the system from its inputs and outputs will
be considered. It will be assumed that there is only one measured signal,
i.e. that the signal y is a scalar and that C is a vector.

Observers Based on Differentiation


An observer based on differentiation will first be given. The construction
is an extension of the derivation of the criterion for observability in Sec-
tion 3.7.
First observe that the output equation

y = Cx

gives the projection of the state on the vector C. Differentiation of this


equation gives
dy dx
=C = C Ax + C Bu
dt dt
The derivative of the output together with C Bu thus gives the projection
of the state vector on the vector C A. Proceeding in this way and taking
higher derivatives give the projections of the state vector on the vectors
C , C A, . . . , C An−1 . If these vectors are linearly independent, the projec-
tions of the state on n linearly independent vectors are obtained and the
state can thus be determined. Carrying out the details, we get

y = Cx
dy
= Cdxdt = C Ax + C Bu
dt
d2 y dx du du
2
= CA + CB = C A2 x + C ABu + C B
dt dt dt dt
..
.
dn−1 y du dn−2 u
n −1
= C An−1 x + C An−2 Bu + C An−3 B + . . . + C B n−2
dt dt dt

352
9.3 Observers

This equation can be written in matrix form as

y
 
C 
 
 
 

  dy
− C Bu
 
C A

 
  
dt
  
 

. =
 
x ..
   
..

 
 
 

.

 
 
 


 
 
 

C An−1 dn−1 y n−2
 
− C A Bu − C An−3 B du
n−2
− . . . − C B dtn−2
 
d u
 
dtn−1 dt

Notice that the matrix on the left-hand side is the observability matrix
Wo . If the system is observable, the equation can be solved to give

y  0 0 ⋅⋅⋅
0 
    u 

    

dy  du 
⋅⋅⋅
 
0 0 
 
CB
  
 
  
dt dt
   
−1  1


   
x = Wo  − ..
 
. W .

   
 

o 
. .
 
.
    
. .

 
 
 
 
 


 
 
 
 
 

n−2 n−3
⋅ ⋅ ⋅
 dn−1 
     dn−2 

C A B C A B C B

dtn−1 dtn−2
(9.20)
This is an exact expression for the state. The state is obtained by differ-
entiating inputs and outputs. Notice that it has been derived under the
assumption that there is no measurement noise. Differentiation can give
very large errors when there is measurement noise and the method is
therefore not very practical particularly when derivatives of high order
appear.

Using a Dynamical Systems to Observe the State


For a system governed by Equation (9.19), it can be attempted to deter-
mine the state simply by simulating the equations with the correct input.
An estimate of the state is then given by

d x̂
= A x̂ + Bu (9.21)
dt
To find the properties of this estimate, introduce the estimation error

x̃ = x − x̂

It follows from (9.19) and (9.21) that

d x̃
= A x̃
dt
If matrix A has all its eigenvalues in the left half plane, the error x̃ will
thus go to zero. Equation (9.21) is thus a dynamical system whose output
converges to the state of the system (9.19).

353
Chapter 9. State Feedback

The observer given by (9.21) uses only the process input u, the mea-
sured signal does not appear in the equation. It must also be required that
the system is stable. We will therefore attempt to modify the observer so
that the output is used and that it will work for unstable systems. Con-
sider the following
d x̂
= A x̂ + Bu + K ( y − C x̂) (9.22)
dt
observer. This can be considered as a generalization of (9.21). Feedback
from the measured output is provided by adding the term K ( y − C x̂).
Notice that C x̂ = ŷ is the output that is predicted by the observer. To
investigate the observer (9.22), form the error

x̃ = x − x̂

It follows from (9.19) and (9.22) that

d x̃
= ( A − K C ) x̃
dt
If the matrix K can be chosen in such a way that the matrix A − K C has
eigenvalues with negative real parts, error x̃ will go to zero. The conver-
gence rate is determined by an appropriate selection of the eigenvalues.
The problem of determining the matrix K such that A − K C has pre-
scribed eigenvalues is very similar to the pole placement problem that
was solved in Section 3.7. In fact, if we observe that the eigenvalues of
the matrix and its transpose are the same, we find that could determine
K such that AT − C T K T has given eigenvalues. First we notice that the
problem can be solved if the matrix
 
 C T AT C T . . . A(n−1)T C T 

is invertible. Notice that this matrix is the transpose of the observability


matrix for the system (9.19).

C 
 

 
CA 

 
 
Wo =  .

 

.

.

 


 

 
n−1
 
CA

of the system. Assume it is desired that the characteristic polynomial of


the matrix A − K C is

p(s) = sn + p1 sn−1 + . . . + pn

354
9.3 Observers

It follows from Remark 9.1 of Theorem 9.1 that the solution is given by
 
K T =  p1 − a1 p2 − a2 . . . pn − an  W̃oT Wo−T

where Wo is the observability matrix and W̃o is the observability matrix


of the system of the system

−a1 1 0 ... 0 b1 
   
 
0 1 ... 0
   
 −a2 b2 

  
 
 
 
 

dz  . .
  
 .. .
   
= z+ . u
 
 
 

dt  
  

   
−an−1 0 0 ... 1
   
bn−1 

 
 
 


  
 
0 0 ... 0
   
− an bn
 
y = 1 0 0 ... 0

which is the observable canonical form of the system (9.19). Transposing


the formula for K we obtain
p1 − a1 
 

 
 p2 − a2 

 

−1

K = Wo W̃o 

..
 

.

 


 


 

pn − an

The result is summarized by the following theorem.

THEOREM 9.2—OBSERVER DESIGN BY POLE PLACEMENT


Consider the system given by

dx
= Ax + Bu
dt
y = Cx

where output y is a scalar. Assume that the system is observable. The


dynamical system
d x̂
= A x̂ + Bu + K ( y − C x̂)
dt
with K chosen as
p1 − a1 
 

 
 p2 − a2 

 

−1

K = Wo W̃o  (9.23)

..
 

.

 


 


 

pn − an

355
Chapter 9. State Feedback

where the matrices Wo and W̃o are given by

1 0 0 ... 0
 
C 
  
1 0 ... 0
 
a
 
1

  
 
CA 

   
1 ... 0
 
1
 
, W̃o = 
− a a1
 
Wo =  .. 2

 
 
 

.

..

 
 
 

 
.

 
 
 

C An−1
  
 

 
... 1
 
an−1 an−2 an−3

Then the observer error x̃ = x − x̂ is governed by a differential equation


having the characteristic polynomial

p(s) = sn + p1 sn−1 + . . . + pn

REMARK 9.2
The dynamical system (9.22) is called an observer for (the states of the)
system (9.19) because it will generate an approximation of the states of
the system from its inputs and outputs.

REMARK 9.3
The theorem can be derived by transforming the system to observable
canonical form and solving the problem for a system in this form.

REMARK 9.4
Notice that we have given two observers, one based on pure differentiation
(9.20) and another described by the differential equation (9.22). There are
also other forms of observers.

Interpretation of the Observer


The observer is a dynamical system whose inputs are process input u
and process output y. The rate of change of the estimate is composed of
two terms. One term A x̂ + Bu is the rate of change computed from the
model with x̂ substituted for x. The other term K ( y − ŷ) is proportional
to the difference e = y − ŷ between measured output y and its estimate
ŷ = C x̂. The estimator gain K is a matrix that tells how the error e is
weighted and distributed among the states. The observer thus combines
measurements with a dynamical model of the system. A block diagram of
the observer is shown in Figure 9.2.

356
9.3 Observers
y
Σ

u x̂˙ x̂ − ŷ
Σ
R
B −C

Figure 9.2 Block diagram of the observer. Notice that the observer contains a
copy of the process.

Duality
Notice the similarity between the problems of finding a state feedback and
finding the observer. The key is that both of these problems are equivalent
to the same algebraic problem. In pole placement it is attempted to find
L so that A − B L has given eigenvalues. For the observer design it is
instead attempted to find K so that A − K C has given eigenvalues. The
following equivalence can be established between the problems

A 1 AT
B 1 CT
L 1 KT
Wr 1 WoT

The similarity between design of state feedback and observers also means
that the same computer code can be used for both problems. To avoid
mistakes it is however convenient to have a special code for computing
the observer gain. This can be done by the following Matlab program.
function K=obs(A,C,p)
% Compute observer gain K
% A and C are the matrices in the state model
% p is a vector of desired observer poles
K=acker(A’,B’,p)’;

Computing the Observer Gain


The observer gain can be computed in several different ways. For simple
problems it is convenient to introduce the elements of K as unknown pa-
rameters, determine the characteristic polynomial of the observer det ( A − K C )

357
Chapter 9. State Feedback

and identify it with the desired characteristic polynomial. Another alter-


native is to use the fact that the observer gain can be obtained by inspec-
tion if the system is in observable canonical form. In the general case the
observer gain is then obtained by transformation to the canonical form.
There are also reliable numerical algorithms. They are identical to the al-
gorithms for computing the state feedback. The procedures are illustrated
by a few examples.

EXAMPLE 9.4—THE DOUBLE INTEGRATOR


The double integrator is described by

0 1 0
   
dx
= x + u
 

 
dt 0 0 1
 
 
y = 1 0

The observability matrix is

1 0
 
Wo =  
0 1
 

i.e. the identity matrix. The system is thus observable and the problem
can be solved. We have
− k1 1 
 
A− KC = 

 
− k2 0

It has the characteristic polynomial


s + k1 −1 
 
det A − K C = det   = s2 + k1 s + k2

 
− k2 s
Assume that it is desired to have an observer with the characteristic
polynomial
s2 + p1 s + p2 = s2 + 2ζ ω s + ω 2
The observer gains should be chosen as

k1 = p1 = 2ζ ω
k2 = p2 = ω 2

The observer is then


0 1 0
     
d x̂  k1 
=  x̂ +  u +   ( y − x̂1 )

     
dt 0 0 1 k2

358
9.4 Output Feedback

9.4 Output Feedback


In this section we will consider the same system as in the previous sec-
tions, i.e. the nth order system described by
dx
= Ax + Bu
dt (9.24)
y = Cx

where only the output is measured. As before it will be assumed that u


and y are scalars. It is also assumed that the system is reachable and
observable. In Section 9.2 we had found a feedback

u = − Lx + Lr r

for the case that all states could be measured and in Section 9.3 we have
presented developed an observer that can generate estimates of the state
x̂ based on inputs and outputs. In this section we will combine the ideas
of these sections to find an feedback which gives desired closed loop poles
for systems where only outputs are available for feedback.
If all states are not measurable, it seems reasonable to try the feedback

u = − L x̂ + Lr r (9.25)

where x̂ is the output of an observer of the state (9.22) ,i.e.


d x̂
= A x̂ + Bu + K ( y − C x̂) (9.26)
dt
Since the system (9.24) and the observer (9.26) both are of order n, the
closed loop system is thus of order 2n. The states of the system are x and x̂.
The evolution of the states is described by equations (9.24), (9.25)(9.26).
To analyze the closed loop system, the state variable x̂ is replace by

x̃ = x − x̂ (9.27)

Subtraction of (9.24) from (9.24) gives


d x̃
= Ax − A x̂ − K ( y − C x̂ ) = A x̃ − K C x̃ = ( A − K C ) x̃
dt
Introducing u from (9.25) into this equation and using (9.27) to eliminate
x̂ gives
dx
= Ax + Bu = Ax − B L x̂ + B Lr r = Ax − B L( x − x̃) + B Lr r
dt
= ( A − B L) x + B L x̃ + B Lr r

359
Chapter 9. State Feedback

The closed loop system is thus governed by

x   A − BL
      
d  BL x   B Lr 
=   +  r (9.28)
  
      
dt x̃ 0 A− KC 0

Since the matrix on the right-hand side is block diagonal, we find that
the characteristic polynomial of the closed loop system is

det (sI − A + B L) det (sI − A + K C )

This polynomial is a product of two terms, where the first is the charac-
teristic polynomial of the closed loop system obtained with state feedback
and the other is the characteristic polynomial of the observer error. The
feedback (9.25) that was motivated heuristically thus provides a very
neat solution to the pole placement problem. The result is summarized as
follows.

THEOREM 9.3—POLE PLACEMENT BY OUTPUT FEEDBACK


Consider the system

dx
= Ax + Bu
dt
y = Cx

The controller described by

u = − L x̂ + Lr r
d x̂
= A x̂ + Bu + K ( y − C x̂)
dt

gives a closed loop system with the characteristic polynomial

det (sI − A + B L) det (sI − A + K C )

This polynomial can be assigned arbitrary roots if the system is observable


and reachable.

REMARK 9.5
Notice that the characteristic polynomial is of order 2n and that it can
naturally be separated into two factors, one det (sI − A + B L) associated
with the state feedback and the other det (sI − A + K C ) with the ob-
server.

360
9.4 Output Feedback

r u ẋ x y
Σ Σ
R
Lr B C

A
Process

K Σ

− ŷ

Σ
R
B −C

A
Observer

−L

Figure 9.3 Block diagram of a controller which combines state feedback with an
observer.

REMARK 9.6
The controller has a strong intuitive appeal. It can be thought of as com-
posed of two parts, one state feedback and one observer. The feedback
gain L can be computed as if all state variables can be measured.

The Internal Model Principle


A block diagram of the controller is shown in Figure 9.3. Notice that
the controller contains a dynamical model of the plant. This is called the
internal model principle. Notice that the dynamics of the controller is due
to the observer. The controller can be viewed as a dynamical system with
input y and output u.
d x̂
= ( A − B L − K C ) x̂ + K y
dt
u = − L x̂ + Lr r

The controller has the transfer function

C (s) = L[sI − A + B L + K C ]−1 K (9.29)


This can be compared with the controller obtained by the frequency re-
sponse method. Notice that the order of the controller is equal to the order

361
Chapter 9. State Feedback

of the system. A complex model thus gives a complex controller. Also no-
tice that it follows from (9.29) that the transfer function of the controller
has the property that C (s) goes to zero at least as fast as s−1 for large
s. The approach thus results in controllers which have high frequency
roll-off. Compare with the discussion of frequency response in Section 5.5
where it was found that controllers with high frequency roll-off were de-
sirable in order to make systems less sensitive to model uncertainty at
high frequencies.

Properties of the Closed Loop System


To get insight into the properties of the closed loop system we will calculate
the transfer functions of the gang of four. For this purpose we introduce
a load disturbance d at the process input and measurement noise n at
the process output, see the block diagram in Figure 9.3. The closed loop
system is then described by the equations
dx
= Ax + B (u + d)
dt
u = − L x̂ + Lr r = − Lx + L x̃ + Lr r
d x̂
= A x̂ + Bu + K ( Cx + n − C x̂ )
dt
Introducing the error x̃ = x − x̂ this equation can be written as
dx
= ( A − B L) x + B L x̂ + Bd + B Lr r = As x + B L x̂ + Bd + B Lr r
dt
d x̃
= ( A − K C ) x̃ + Bd − K n = Ao x̃ + Bd − K n
dt
u = − Lx + L x̃ + Lr r
y = Cx + n

Notice that this equation has a triangular structure since the equation
for x̃ does not depend on x. Also notice that the reference signal does
not influence x̃. This makes a lot of sense because it would be highly
undesirable to have a system where reference inputs generate observer
errors.

EXAMPLE 9.5—OUTPUT FEEDBACK OF DOUBLE INTEGRATOR


Consider a system described by

0 1 0
   
dx
= x+ u

 
dt 0 0 1

 
y = 1 0x

362
9.4 Output Feedback

A state feedback was determined in Example 9.1 and and observer was
computed in Example 9.4. Assume that it is desired to have a closed loop
system with the characteristic polynomial

(s2 + 2ζ cω c s + ω 2c )(s2 + 2ζ oω o s + ω 2o )

Assuming that the first factor is chosen as the characteristic polynomial


associated with the state feedback, i.e. A − B L, and the second with the
observer, i.e. A − K C, it follows from the results of the previous examples
that the controller

0 1 0
     
d x̂  k1 
=  x̂ +  u +   ( y − x̂1 )

     
dt 0 0 1
 
k2
u = −l1 x̂1 − l2 x̂2 + Lr r

gives the desired closed loop polynomial, provided that

l1 = ω 2c , k1 = 2ζ oω o
l2 = 2ζ cω c , k2 = ω 2o

It follows from (9.29) that the transfer function from y to u of the con-
troller is

C (s) = L[sI − A + B L + K C ]−1 K


ω cω o (2(ζ cω o + ζ oω c )s + ω cω o )
=
s2 + 2s(ζ cω c + ζ oω o ) + ω 2c + ω 2o + 4ζ 1ζ 2ω 1ω 2

Notice that this transfer function is invariant to permutations of the in-


dices 1 and 2. This means that the controller is the same if the state
feedback was designed to give the characteristic polynomial

s2 + 2ζ 2ω 2 s + ω 2

and the observer was designed to give the characteristic polynomial

s2 + 2ζ 1ω 1 s + ω 12

It can be shown that the observation about the association of poles to state
feedback and observers is true in general and we can draw the following
important conclusion: Although it is convenient to split the design prob-
lem into two parts, design of a state feedback and design of an observer,

363
Chapter 9. State Feedback

the controller transfer function is uniquely given by all the specified closed
loop poles. It does not matter if a pole is allocated by the state feedback
or the observer, all assignments will give the same transfer function from
y to u! Transfer functions between other signal pairs do however depend
on which poles are associated with the observer and the state feedback. If
reference values are introduced as described by (9.25) the transfer func-
tion from reference r to output y is uniquely determined by the poles
assigned to the state feedback.

9.5 Comparison with PID Control


The controller obtained by combining an observer with state feedback will
now be compared with a PID controller. This gives a perspective on what
has been done and it also reveals a significant drawback of the controller
which is caused by assumptions made when modeling the system. With
this insight it is possible to make a simple modification which gives a
much more practical controller.
The input-output relation for an ideal PID controller can be written as

Z t
dy
u = k(br − y) + ki (r(τ ) − y(τ ))dτ − Td
o dt

in Section 2.2 the derivative term was interpreted as a prediction of the


output based on linear extrapolation, see Figure 2.2. From Equation (9.20)
it also follows that the derivative term can be interpreted as an estimate
of one state variable. The first three terms of the PID controller can thus
be interpreted as a controller with feedback from two states y and d y/ dt
and the reference signal r.
The controller obtained by feedback from the observed states has the
form
u = − L x̂ + Lr r = −l1 x̂1 − l2 x̂2 − . . . − ln x̂n + Lr r (9.30)

The differences between this controller and a PID controller are that there
are more terms and there is no integral action in (9.30). The estimates x̂i
in (9.30) are filtered through the estimator.
We can thus conclude that a PD controller can be interpreted as a
controller with feedback from two states where the first state is the output
and the second state is an estimate of the derivative of the output. We
can also conclude that the controller based on feedback from estimated
states lacks integral action.

364
9.5 Comparison with PID Control

A Calibrated System
The controller based on state feedback achieves the correct steady state
response to reference signals by careful calibration of the gain Lr and
it lacks the nice property of integral control. It is then natural to ask
why the the beautiful theory of state feedback and observes does not
automatically give controllers with integral action. This is a consequence
of the assumptions made when deriving the analytical design method
which we will now investigate.
When using an analytical design method, we postulate criteria and
specifications, and the controller is then a consequence of the assumptions.
In this case the problem is the model (9.1). This model assumes implicitly
that the system is perfectly calibrated in the sense that the output is zero
when the input is zero. In practice it is very difficult to obtain such a
model. Consider, for example, a process control problem where the output
is temperature and the control variable is a large rusty valve. The model
(9.1) then implies that we know exactly how to position the valve to get
a specified outlet temperature–indeed, a highly unrealistic assumption.
Having understood the difficulty it is not too difficult to change the
model. By modifying the model to

dx
= Ax + B (u + v)
dt (9.31)
y = Cx

where v is an unknown constant we can can capture the idea that the
model is no longer perfectly calibrated. This model is called a model with
an input disturbance. Another possibility is to use the model

dx
= Ax + Bu
dt
y = Cx + v

where v is an unknown constant. This is a model with an output distur-


bance. It will now be shown that a straight forward design of an output
feedback for this system does indeed give integral action

Integral Action by Disturbance Estimation


Both disturbance models will produce controllers with integral action. We
will start by investigating the case of an input disturbance. This is a
little more convenient for us because it fits the control goal of finding a
controller that drives the state to zero.
The model with an input disturbance can conveniently be brought into
the framework of state feedback. To do this, we first observe that v is an

365
Chapter 9. State Feedback

unknown constant which can be described by


dv
=0
dt
To bring the system into the standard format we simply introduce the
disturbance v as an extra state variable. The state of the system is thus
 
x
z=   
v
This is also called state augmentation. Using the augmented state the
model (9.31) can be written as
      
d  x  A B  x  B 
 =
   
   +   u
dt v 0 0 v 0
 
 x  (9.32)
y= C 0  
  
 

v
Notice that the disturbance state is not reachable. If the disturbance can
be measured, the state feedback is then
u = − L̃z + Lr r = − L x x − Lv v + Lr r (9.33)
h The disturbance state v is not reachable. The the effect of the distur-
bance on the system can, however, be eliminated by choosing Lv = 1. If
the disturbance v is known the The control law above can be interpreted
as a combination of feedback from the system state and feedforward from
a measured disturbance. It is not realistic to assume that the disturbance
can be measured and we will instead replace the states by estimates. The
feedback law then becomes
u = − L x ẑ + Lr r = − L x x̂ − v̂ + Lr r
This means that feedback is based on estimates of the state and the dis-
turbance.

Observability of Augmented Model


Before attempting to estimate the state we will investigate if the system
is observable. To do this we form the observability matrix
C 0
 

 

CA CB 

 

 

2
 
C A C AB

 

 
Wo =  .

 

.

.

 


 

 
n − 1 n −2
 
 CA

 C A B 


 
n n−1
 
CA CA B

366
9.5 Comparison with PID Control

The first n rows of this matrix are linearly independent if the original
system is observable. Let a1 , a2 , . . . , an be the coefficients of the character-
istic polynomial of A. To find out if the last row is linearly independent,
we multiply the rows of the matrix with an , an−1 , an−2 , . . . , a1 and add to
the last row. It follows from Cayley-Hamilton Theorem that

C 0
 

 

C A C B

 


 

2
 
C A C AB

 

 
W̄o =  .

 

..
 


 


 

n−1 n−2
 



 C A C A B 



0
 
bn

where

bn = C An−1 B + a1 C An−2 B + . . . + an−2 C AB + an−1 C B = an G (0)

The last row is linearly independent of the first n rows if the parameter bn
is different from zero. We can thus conclude that the state can be observed
if the original system is observable and if parameter bn is different from
zero. Notice that the condition for observability of the input disturbance is
the same as the condition (9.16) for reachability of the augmented system
used to introduce integral action in Section 9.2.

Observer and Control Law


The observer of the system (9.32) is given by
        
d  x̂   A B   x̂   B  Kx 
 =   +  u +   ( y − C x̂ )
        
 
dt v̂ 0 0 v̂ 0 Kv
A − K x C B   x̂   B 
      
Kx 
=  +  u +  y

      
 
− Kv 0 v̂ 0 Kv

where matrix K can be chosen to give arbitrary eigenvalues to the matrix

A − KxC B 
 

 
− Kv 0
 

The controller can be written as

u = − L x x̂ − v̂ + Lr r
x̂   A − B L x − K x C 0   x̂   K x 
        
d  B

  =  + 
    y+
   r
dt v̂ − Kv C 0 0

v̂ Kv

367
Chapter 9. State Feedback

Notice that the system matrix of this equation has zero as an eigenvalue,
which implies that the controller has integral action. The transfer function
of the controller is given by
   sI − A + B L + K C 0 −1  K 
x x x
C ( s) =  L x1
  

    

Kv s Kv
1 1
= K v + ( L x − K v C )(sI − A + B L x + K x C )−1 K x
s s
The controller has integral action and the integral gain is

K i = K v 1 + C ( A − B L x − K x C )−1 K x


We thus find that integral action can be obtained by introducing a


constant but unknown disturbance at the process input. This state is be
observable under very natural conditions. The control law then obtained
by the feedback from the estimated states. In this way integral action can
thus be interpreted as an estimate from an estimated disturbance. The
observer gives an explicit estimate of the disturbance. Notice that the
augmented system (9.32) is not reachable because the disturbance states
are unreachable, the effect of the disturbance on the state can however
be reduced.

EXAMPLE 9.6—THE DOUBLE INTEGRATOR


Consider the double integrator. The following model is obtained by aug-
menting the model by an input disturbance

x1   0 1 0 0
     
dx d  
0 0 1 1
 
    
= =
x2  x+ u

  
 
 
dt dt  

    
 
0 0 0 0
  
x3

The observer becomes


0 1 0 0 k1 
     
d x̂   
0 0 1 1
     
= x̂ +  u+  ( y − x̂1 )
k2 

 
 
 
 
 
dt     
 
0 0 0 0
    
k3
(9.34)
− k1 1 0  0 k1 
     
  
0 1 1
     
= − k x̂ + u + k2 
y
     
 2













 
− k3 0 0 0
    
k3

and the feedback law is

u = −l1 x̂1 − l2 x̂2 − x̂3 + Lr r (9.35)

368
9.6 Disturbance Models

The characteristic polynomial of the observer is

s3 + k1 s2 + k2 s + k3

Requiring this to be equal to

(s + αω )(s2 + 2ζ ω s + ω 2 )

gives the following expressions for the components of the observer gain K

k1 = (α + 2ζ )ω
k2 = (1 + 2αζ )ω 2
k3 = αω 3

Eliminating u between Equations (9.34) and (9.35) gives the following


expression for the controller

u = −l1 x̂1 − l2 x̂2 − x̂3


− k1 1 0 k1 
   
d x̂ 
 − k2 − l1 −l2 0 
  
 
= x̂ +  k2 
y
   
dt  
 

 
0 0
  
− k3 k3
Straightforward calculations give the following transfer function

s2 ( k1 l1 + k2 l2 + k3 ) + s( k2 l1 + k3 l2 ) + l1 k3
C ( s) = (9.36)
s(s2 + s( k1 + l2 ) + k1 l2 + k2 + l1 )
The transfer function has two zeros and three poles, where one pole is at
the origin.

9.6 Disturbance Models


The results will now be generalized. Before doing this we will discuss the
problem formulation that has been used. When a pole placement controller
is designed the chosen closed loop characteristic polynomial determines
the way the state goes to zero. It seems intuitively reasonable that the
controller also would react well to disturbances of short duration provided
that the disturbances are so widely spaced that the state goes to zero
between them. The modification of the controller done in Section 9.5 shows
that integral action is obtained when an input disturbance of constant
but unknown amplitude is introduced in the model. In this section it the
results for constant disturbances will be generalized to different types of
disturbances.

369
Chapter 9. State Feedback

Pulse Step Ramp Sinusoid

Figure 9.4 Classical disturbance models.

Examples of Disturbances
A suitable characterization of disturbances will first be given. To do this
we will first give some simple example of disturbances and their mathe-
matical models.
Some prototype disturbances like pulses, steps, ramps and sinusoids,
see Figure 9.4 , have traditionally been used to model disturbances. These
disturbances can all be described by simple dynamical systems as is il-
lustrated by the following examples.

EXAMPLE 9.7—STEP DISTURBANCE


Consider a constant disturbance v = c,where a is a constant. Taking the
derivative gives
dv
= 0, v(0) = c
dt

EXAMPLE 9.8—RAMP DISTURBANCE


Consider a disturbance that is affine, i.e. v = c1 + c2 t Differentiating twice
gives
d2 v
=0
dt2
The disturbance is thus represented by a second order differential equa-
tion. It can also be represented by

dξ 0 1
   
 c1 
= ξ,
 ξ (0) = 
  ξ
dt 0 0

c2
 
v = 1 0 ξ

370
9.6 Disturbance Models

EXAMPLE 9.9—SINUSOIDAL DISTURBANCE


Consider a sinusoidal disturbance with known frequency ω , i.e

v(t) = c1 sin ω t + c2 cos ω t

Differentiation twice gives

d2 v
= −ω 2 a sin ω t = −ω 2 v
dt2

This differential equation can also be written as

dξ 0 ω
   
 c1 
= ξ, ξ (0) =  ξ

−ω 0
   
dt c2
 
v =  1 0 ξ

These examples show that simple disturbances can be represented as


differential equations with initial conditions. In all examples the shape of
the disturbance is given by the differential equation and the amplitude is
determined by the initial conditions.
A general approach is to model disturbances as


= Avξ
dt (9.37)
v = Cvξ

It is natural that eigenvalues of Aξ are on the imaginary axis or in the


right half plane, because this will represent disturbances that do not go
to zero as time goes to infinity.
Assuming that the disturbances act on the process input the system
can be described by
dx
= Ax + B (u + v)
dt
dξ (9.38)
= Avξ
dt
v = Cvξ
This system can be brought to standard form by introducing the aug-
mented state  
x
z=
ξ
 

371
Chapter 9. State Feedback

The system equations then become


   
dz  A B B
= z+
   u
dt 0 0

Av

This system is in standard form. Assuming that all states are measurable
it is natural to use the feedback

u = − Lx − v + Lr r

Notice that the disturbance state is not reachable. This is natural because
the disturbance model (9.37) is not influenced by the control signal. In
spite of this the effect of the disturbances on the process can be elimi-
nated by proper choice of the gain Lv . Combining the control law with the
feedback law we obtain the following closed loop system

dx
= Ax + B (u + v) = ( A − B L) x + B (1 − Lv )v + Lr r
dt

and it is clear that the disturbance can be eliminated by choosing Lv =


1. The term Lξ ξ can be interpreted as a feedforward from a measured
disturbances.
It is not realistic to assume that the disturbance can be measured. In
this case we can use an observer to obtain an estimate of the disturbance.
The control law then becomes

u = − L x̂ − v̂ + Lr r
(9.39)
        
d  x̂ A B   x̂  B  Kx 
  =
 
  +
  u +   ( y − C x̂ )

dt v̂ 0 Av 0
  
v̂ Kv

Eliminating the control signal u the controller becomes

x̂   A − B L − K x C 0   x̂   B Lr 
        
d  Kx 
= + r + y
 
        
dt v̂ − Kv C 0
     
Av v̂ Kv
u = − L x̂ − v̂ + Lr r

The transfer function from measured signal y to control u is

C (s) = Cv (sI − Av )−1 K v


+ L − Cv (sI − Av )−1 K v (sI − A + B L + K v C )−1 K x


372
9.7 Reference Signals

uff
r Model and
Feedforward
xm State ufb u y
Generator Σ Σ Process
Feedback

- x̂

Observer

Figure 9.5 Block diagram of a controller based on a structure with two degrees
of freedom. The controller consists of a command signal generator, state feedback
and an observer.

9.7 Reference Signals


So far we have only introduced the reference signals in a very primitive
way by adding it to the state feedback. When discussing simple control
system in Sections 6.4 and 8.4 we found that response to command sig-
nals could be completely decoupled from disturbance rejection by using a
controller structure having two degrees of freedom. In this section we will
present such a structure for a system with state feedback.
A block diagram of the system is shown in Figure 9.5. Notice that the
system admits independent specification of response to command signals
and disturbances. The response to command signals is given by the re-
sponse model which can be represented by a transfer function M . The
response to disturbances is given by the state feedback and the observer.
The system in Figure 9.5 is a natural version of the two-degree of
freedom structure for systems with state feedback. To get some insight
into the behavior of the system let us reason through what happens when
the command signal is changed. To fix the ideas let us assume that the
system is in equilibrium with the observer state equal to the process state.
When the command signal is changed a feedforward signal is generated.
This signal has the property that the process output gives the desired
output when the feedforward signal is applied. The process state naturally
changes in response to the feedforward signal. The observer will track the
state perfectly because the initial state was correct. This means that the
estimated state will be equal to the desired model state which implies
the feedback signal L( xm − x̂ ) is zero. If there are some disturbances or
some modeling errors the feedback signal will be different from zero and
attempt to correct the situation.

373
Chapter 9. State Feedback

Details
Having described the key idea we will now consider the details. Let the
process be described by (9.1) and let P(s) denote the process transfer
function, Furthermore let M (s) denote the transfer function defining the
ideal response to the reference signal. The feedforward signal is then given
by
U f f ( s ) = M ( s ) P † ( s ) R( s ) (9.40)

where P† (s) is an inverse or a generalized inverse of P(s). Approximate


process models can often be used to determine P† (s), see Section 8.3.
To generate the feedforward signals a system with the transfer function
M (s) P−1 (s) must be realized. Notice that this transfer function can be
implemented even if P−1 is not realizable. Also notice that since the feed-
forward signal is most useful for the rapid response it is possible to make
several approximations, compare with Section 8.3.
The ideal response of the states to the signal uff can be generated from
the process model, (9.1) hence

dxm
= Axm + Buff
dt (9.41)
ym = Cxm

The control signal then becomes

u = uff + L( xm − x̂) (9.42)

and the complete controller is given by

u = uff + L( xm − x̂)
dxm
= Axm + Buff
dt
ym = Cxm
d x̂
= A x̂ + Bu + K ( y − C x̂ )
dt

The dynamics required to generate u f f from the reference input is also


requred. This dynamics which has the transfer function P† M can often
be generated from the states xm as will be illustrated by the examples in
the following.
This controller given above has the state vectors xm and x̂. Replacing

374
9.7 Reference Signals

uff

r Model and ym
Σ e ufb u y
Feedforward
− Observer L Σ Process
Generator

Controller

Figure 9.6 Block diagram of a controller based on a structure with two degrees
of freedom. The controller consists of a command signal generator, state feedback
and an observer which estimates the error e = xm − x̂, between the ideal states and
the estimates states.

the state x̂ by error e = xm − x̂ gives the following controller


u = uff + Le
dxm
= Axm + Buff
dt
ym = Cxm (9.43)
de
= ( A − K C ) e + B (uff − u) + K ( ym − y)
dt
= ( A − K C − B L) e + K ( ym − y)
This equation for e is driven by the output error y − ym . The model and
feedforward generator only have to provide the feedforward signal uff and
the ideal output ym . A block diagram of the system is shown in Figure 9.6.
Notice that this system has the same structure as the feedforward con-
troller in Figure 8.3C. The controller has integral actions the state feed-
back or the observer is designed so that the transfer function
C (s) = L(sI − A + K C + B L)−1 K
has integral action. Since integral action is in the error path, the steady
state error will always be zero if a steady state exists.
In some situations like in path following for robots or for numerically
controlled machine tools it may be natural to generate the desired behav-
ior of the state in other ways instead of generating it in real time as we
have described here.
We will illustrate with an example.

375
Chapter 9. State Feedback

EXAMPLE 9.10—THE DOUBLE INTEGRATOR


Consider the double integrator which has the transfer function

1
P ( s) =
s2

Assume that it is desired to have a response characterized by the transfer


function
ω 2m
M ( s) =
s2 + 2ζ mω m + ω 2m

The transfer function which generates the feedforward signal uff is given
by
s2ω 2m
G f f (s) = M (s) P−1 (s) =
s2 + 2ζ mω m + ω 2m

Notice that this transfer function is realizable without using derivatives


even if P−1 (s) is not realizable. To find a realization of the transfer func-
tion we rewrite it as

s2ω 2m  2ζ mω m s + ω 2m 
M (s) P−1 (s) = = ω 2m 1 −
s2 + 2ζ mω m + ω 2m s2 + 2ζ mω m + ω 2m

This transfer function can be realized as

dz1
= −2ζ mω m z1 − ω m z2 + ω m r
dt
dz2
= ω m z1
dt
ym = ω m z2
uff = ω 2m (r − 2ζ m z1 − z2 )

Notice that the same dynamical system generates both the desired model
output ym and the feedforward signal uff . Also notice that the gain in-
creases as the square of ω m . Fast responses can thus be obtained but
large control signals are required.
Combining the feedforward generator with the determination of an
output feedback in Example 9.5 we can obtain a complete controller based
on command following, state feedback and an observer for the double
integrator. The controller is a dynamical system of fifth order which is

376
9.7 Reference Signals

described by the following equations by

u = uff + ufb
uff = ω 2m (r − 2ζ m z1 − z2 )
ufb = l1 e1 + l2 e2 + e3
ym = ω m z2
dz1
= −2ζ mω m z1 + ω m z2 + ω m r
dt
dz2
= −ω m z1
dt
de1
= e2 + k1 ( ym − y − e1 )
dt
de2
= e3 + u + k2 ( ym − y − e1 )
dt
de3
= k3 ( y − e1 )
dt

The states z1 and z2 represent the feedforward generator, the states e1 =


xm1 − x̂1 and e2 = xm2 − x̂2 represent the components of the deviations
of the estimated state x̂ from its ideal values xm and the state e3 is an
estimate of the load disturbance.
This controller can be represented as

U (s) = G f f (s) R(s) + G f b (s)( M (s) R(s) − Y (s))

where G f f is given by Equation (9.36) and

s2ω 2m
G f f ( s) =
s2 + 2ζ mω m + ω 2m
ω 2m
M ( s) =
s2 + 2ζ mω m + ω 2m
( k1 l1 + k2 l2 + k3 )s2 + ( k2 l1 + l2 )s + k3 l1
G f b ( s) =
s(s2 + ( k1 + l1 )s + k1 l2 + k2 + l1 )

The loop transfer function is

( k1 l1 + k2 l2 + k3 )s2 + ( k2 l1 + l2 )s + k3 l1
L( s ) =
s3 (s2 + ( k1 + l1 )s + k1 l2 + k2 + l1 )

377
Chapter 9. State Feedback
ϕ1 ϕ2
I
Motor
ω1 ω2
J1 J2

Figure 9.7 Schematic diagram of the system

9.8 An Example

The design procedure will be illustrated by an example.

The Process
Consider the system shown in Figure 9.7. It consists of a motor that drives
two wheels connected by a spring. The input signal is the motor current
I and the output is the angle of the second wheel ϕ 2 . It is assumed that
friction can be neglected. The torque constant of the motor is k I , the
moments of inertia are J1 and J2 and the damping in the spring is kd .
The system is a representative example of control of systems with
mechanical resonances. Such systems are common in many different con-
texts, industrial drive systems, robots with flexible arms, disk drives and
optical memories. If the requirements on the control system are modest
it is possible to use a PID controller but the achievable performance is
limited by the controller. The PID controller will work quite well as long
as the rotors move in essentially the same way. When the system is driven
in such a way that the angles ϕ 1 and ϕ 2 starts to deviate substantially
the PID controller is not working well and superior performance can be
obtained by using a more complex controller.
The equations of motion of the system are given by momentum bal-
ances for the rotors
dω 1
J1 = k I I + k(ϕ 2 − ϕ 1 ) + kd (ω 2 − ω 1 )
dt
dω 1
J2 = k(ϕ 1 − ϕ 2 ) + kd (ω 1 − ω 2 )
dt (9.44)
dϕ 1
= ω1
dt
dϕ 2
= ω2
dt
Choose the state variables as
x1 = ϕ 1 , x2 = −ϕ 2
x3 = ω 1 /ω 0 , x4 = ω 2 /ω 0

378
9.8 An Example

where ω 0 = k( J1 + J2 )/( J1 J2 ), which is the undamped natural fre-


p

quency of the system when the control signal is zero. The state equations
of the system are

0 0 1 0  0 0
     
  
 0 0 0 1  0 0
     
1 dx

 
 
 
 
 
  
=  x+
  u+
  d
ω 0 dt 
 −α 1 α1 −β 1 β1  γ 0
 
  
  

1

  
 
 
 

 
  
 
α2 −α 2 β2 −β 2 0 γ2
   

where the parameters are given by

J2 J1 kd kd
α1 = , α2 = β1 = , β2 =
J1 + J2 J1 + J2 ω 0 J1 ω 0 J2
k 1
γ 1 = 2I , γ 2 =
ω 0 J1 ω 0 J2

The parameters have the following numerical values J1 = 10/9, J2 = 10,


k = 1, kd = 0.1, and k I = 5, which gives ω 0 = 1.
It is convenient to use Matlab to for analysis and design and we will
simply describe the procedure through Matlab scripts. First we create the
model by the following script.
%The robot arm model
%Parameters
J1=10/9;J2=10;k=1;kd=0.1;ki=5;
w0=sqrt(k*(J1+J2)/J1/J2);a1=J2/(J1+J2);a2=J1/(J1+J2);
b1=kd/(w0^2*J1);b2=kd/(w0^2*J2);g1=ki/(w0^2*J1);g2=1/(w0^2*J2);
%System matrices
A=[0 0 1 0;0 0 0 1;-a1 a1 -b1 b1;a2 -a2 b2 -b2]*w0;
B1=[0;0;g1;0];B2=[0;0;0;g2];C1=[1 0 0 0];C2=[0 1 0 0];D1=0;
B=[B1 B2];C=[C1;C2];D=zeros(2,2);
%SISO system where output is angle of first rotor
sys1=ss(A,B1,C1,D1);
%SISO system where output is angle of second rotor
sys2=ss(A,B2,C2,D1);
%Complete system
sys=ss(A,B,C,D);
%Compute transfer function from current to angle
%of second wheel
[num,den]=ss2tf(A,B1,C2,0);P=tf(num,den);
As a first assessment of the system we compute its poles, which is
done in the following Matlab dialog:

379
Chapter 9. State Feedback

2
10

0
g 10

−2
10

−1 0 1
10 10 10

−150

−200

−250
p

−300

−350
−1 0 1
10 10 10
w

Figure 9.8 Bode plot for the open loop transfer function from current to angle of
the second rotor.

robarmdata
eig(sys.A)
ans =
-0.0500 + 0.9987i
-0.0500 - 0.9987i
0.0000 + 0.0000i
0.0000 - 0.0000i
The system thus has two poles at the origin corresponding to the rigid
body motion and two complex poles corresponding to the relative motion
of the wheels. The relative damping of the complex poles is ζ = 0.05 which
means that there is very little damping. The transfer function from motor
current to the angle of the second rotor is

0.045s + 0.45
P ( s) =
s4 + 0.1s3 + s2

The Bode diagram of this transfer function is shown in Figure 9.8.

PD Control
For low frequencies process dynamics can be approximated by the transfer

380
9.8 An Example

function
0.45
P ( s) 
s2
Such a system can conveniently be controlled by a a PD controller. Requir-
ing that the closed loop system should have the characteristic polynomial

s2 + 2ζ 1ω 1 s + ω 12

we find that the PD controller becomes

C (s) = ω 12 + 2ζ 1ω 1 s = k + kd s = k(1 + sTd )

We add high frequency roll-off by modifying the controller to

1 + sTd
C ( s) = k (9.45)
(1 + sTd / N )2

where N is a parameter that is chosen empirically, a good choice is typ-


ically in the range of 4 to 20. The approximate model is very poor for
frequencies close to 1 rad/s because of the phase lag caused by the res-
onant poles. Notice in Figure 9.8 that the phase drops very rapidly for
frequencies around 1 rad/s. The frequency ω 1 should thus be chosen well
below 1 rad/s. Using the standard rule of thumb we choose ω 1 = 0.2. It
is essential to have high-frequency roll-off in the controller to make sure
that the loop gain drops rapidly after the crossover frequency.
To evaluate the controller we compute the maximum sensitivity, Ms =
2.2, which occurs at ω = 0.93, i.e. close to the resonance. To reduce the
sensitivity we reduce the parameter ω 1 to 0.15 and the maximum sen-
sitivity reduces to Ms = 1.6 at ω = 0.13. The frequency responses of
the gang of four, see Figure 9.9. The figure shows that the sensitivity
functions are reasonable, the maximum sensitivities are Ms = 1.6 and
Mt = 1.8. The disturbance rejection is quite poor, the largest value of the
transfer function G xd is 60. There are no problems with measurement
noise because the largest value of the transfer function Gun is only 0.16.
The resonance peak is noticeable in several of the frequency responses,
because of the high frequency roll-off of the controller the peak is kept at a
low level for the chosen parameters. It is essential that the controller has
high frequency roll-off, without this the controller with the parameters
in Figure 9.9 actually gives an unstable closed loop system. The choice of
the parameter ω 1 is sensitive, increasing the value to ω 1 = 0.2867 makes
the closed loop system unstable. The step responses of the gang of four
are shown in Figure 9.10. The time responses look quite reasonable, they
represent what can be achieved with PD control. The overshoot indicated

381
Chapter 9. State Feedback

g11 g12
2
10
0
10
1
10

0
−1
10
10

−1
10

−2 −2
10 10
−2 −1 0 1 −2 −1 0 1
10 10 10 10 10 10 10 10

g21 g22

−1 0
10 10

−2 −1
10 10

−3 −2
10 10
−2 −1 0 1 −2 −1 0 1
10 10 10 10 10 10 10 10

Figure 9.9 Gain curve of the frequency responses of the gang of four for PD
control of the system. The controller is given by (9.45) with parameters ω 1 = 0.15,
ζ 1 = 0.707 and N = 10.

by the response of P(s) C (s)/(1 + P(s) C (s)) can be reduced by set point
weighting. The load disturbance response can be improved at low fre-
quencies by introducing integral action. The peak in the response to load
disturbances can be reduced a little by further tuning of the parameters.
Notice that the high frequency resonant mode is traceable in the graphs
although the amplitude is small. The mode becomes very visible if the
parameter ω 1 is increased towards 0.3.

Design of State Feedback


We will first design a state feedback that gives a closed loop system with
poles in -2 -1 and −1 ± i. This choice implies that the oscillatory poles are
damped and that the integrating poles are move well into the left half
plane. The design is executed with the following Matlab script.
%Design of State feedback for robotarm
%Get process model
robarmdata;B=B1;C=C2;
%Desired closed loop poles
P=[-1 -2 -1+i -1-i];

382
9.8 An Example

g11 g12
1.5 60

50

1 40

30

0.5 20

10

0 0
0 50 100 150 200 0 50 100 150 200

g21 g22
1 1

0.5 0.5

0 0

−0.5 −0.5
0 50 100 150 200 0 50 100 150 200

Figure 9.10 Time responses of the gang of four for PD control of the system. The
controller is given by (9.45) with parameters ω 1 = 0.15, ζ 1 = 0.707 and N = 10.

L=acker(A,B,P);Acl=A-B*L;
Lr=-1/(C*inv(Acl)*B);
disp(’Feedback gain L=’);disp(L)
disp(’Refererence gain Lr=’);disp(Lr)
%Check the results
n=size(A);disp(’Specified closed loop poles’)
disp(P);
disp(’Closed loop poles obtained’)
disp(eig(Acl)’);
%Compute Closed loop transfer function
[num,den]=ss2tf(Acl,B*Lr,C,0);Gcl=tf(num,den);
disp(’Closed loop transfer function:’)
Gcl

We find that the control law is

u = −l1 x1 − l2 x2 − l3 x3 − l4 x4 + Lr xr

where l1 = 1.78 l2 = 7.10 l3 = 1.09 and l4 = 20.24 and Lr = 8.89. The

383
Chapter 9. State Feedback

closed loop transfer function is

0.4s + 4
G ( s) =
s4 + 5s3 + 10s2 + 20s + 4

Notice that when using Matlab a few small terms appear because of in-
accuracies in the computations.
To find the stiffness of the system we calculate the transfer function
from a a disturbance torque on the second rotor to the deflection of the
rotor. This can be done by the Matlab script
%Computation of impedance
%This script computes the transfer function
%from a disturbance on the second rotor to
%the angle of that rotor
%Compute state feedback
robarmsfb;
%Compute the transfer function
A=sys2.A;B=sys2.B;C=sys2.C;
[num,den]=ss2tf(Acl,B,C,0);Gcl=tf(num,den);
disp(’Closed loop impedance function:’)
Gcl
%Compute stiffness at second rotor
ks=den(5)/num(4);
disp(’Stiffness=’)
disp(ks)
Executing the script we find that the transfer function from a torque
on the second mass to deflection is

0.1s2 + 0.499s + 0.894


G ( s) =
s4+ 5s3 + 10s2 + 10s + 4
The steady state gain of this transfer function is G (0) = 0.894/4 = 0.22.
The stiffness is thus 1/ G (0) = 4.5 which can be compared with the stiff-
ness of the uncontrolled system which is 1. The stiffness can be increased
by choosing faster closed loop poles.

Simulation of the Closed Loop System


To illustrate the properties of the closed loop system further we will sim-
ulate the system. A Simulink block diagram of the system is shown in
Figure 9.11. In the simulation we will first apply a unit step in the refer-
ence signal and we will then apply a disturbance torque of 2 units at the
second rotor. The results of the simulation are shown in Figure 9.12. The
simulation is executed using the following Matlab script.

384
9.8 An Example

2 3
Out2 Out3

x’ = Ax+Bu x’ = Ax+Bu 1
y = Cx+Du y = Cx+Du
Step Out1
State−Space1 State−Space

Step1

Figure 9.11 Simulink block diagram of the system with a controller.

1
y

−1

−2
0 2 4 6 8 10 12 14 16 18 20

10

4
u

−2
0 2 4 6 8 10 12 14 16 18 20
t

Figure 9.12 Simulation of the closed loop system with state feedback. The angle
ϕ 1 of the first rotor is shown in dashed curves, and the motion of the second rotor
in solid lines.

%Simlation of robot arm with state feedback


robarmsfb; %Execute controller design
%Set procees parameters
Ap=A;Bp=[B B2];Cp=eye(n);Dp=zeros(4,2);

385
Chapter 9. State Feedback

%Set controller parameters


Ac=0;Bc=zeros(1,5);Cc=0;Dc=[Lr -L];
%Execute simulation
r=1;d=2;ts=20;[t,x,y]=sim(’robarmblk’,[0 ts]);
subplot(2,1,1);
plot(t,y(:,1),’r--’,t,y(:,2),’b’,t,ones(size(t)),’r:’,’linew’,2);
ylabel(’y’)
subplot(2,1,2);plot(t,y(:,6),t,zeros(size(t)),’r--’,’linew’,2);
ylabel(’u’)
The simulation shows that the second rotor responds very nicely to the
reference signal. To achieve the fast response the first rotor has a large
overshoot. This is necessary because the only way to exert a force on the
second rotor is to turn the first rotor so that a large force is obtained. To
execute effective control it is necessary to coordinate the motion of both
rotors accurate. This is done very efficiently by the controller based on
state feedback. To obtain the response to a unit step command shown in
the figure the initial value of the control signal is 8.9. The value is propor-
tional to the magnitude of the step. To judge if the value is reasonable it
it necessary to know the numerical values of typical steps and the signal
level when the control signal saturates. If the a larger value of the control
signal can be permitted the specified closed loop poles can be chose to be
faster. If the value is too large the desired closed loop poles should have
smaller magnitude.
The response to a torque disturbance at the second rotor shows that
there is a steady state error. The reason for this is that the controller does
not have integral action. Also notice that the angle ϕ 1 of the first rotor is
negative. This is necessary because the only way to exert a torque on the
second rotor is by turning the first rotor.

Controller with Integral Action


To avoid the steady state error for a load disturbance we will introduce
integral action as described in Section 9.2. This gives the control law
Z t
u = −l1 x1 − l2 x2 − l3 x3 − l4 x4 − l5 ( x2 − r)dt + Lr r
0

With a controller having integral action the closed loop system is of fifth
order and it is necessary to specify five poles. They are chosen as -3, -2,
-1, and −1 ± i. The design is executed with the following Matlab script.
%Design of State feedback for robotarm
%Get process model
robarmdata;A=sys2.A;B=sys1.B;C=sys2.C;

386
9.8 An Example

%Form augmented system


A=[A;C];A=[A,zeros(5,1)];B=[B;0];C=[C 0];
%Desired closed loop poles
P=[-0.5 -1 -2 -1+i -1-i];
L=acker(A,B,P);Acl=A-B*L;
Lr=-1/(C*inv(Acl)*B);
disp(’Feedback gain L=’);disp(L)
disp(’Refererence gain Lr=’);disp(Lr)
%Check the results
n=size(A);disp(’Specified closed loop poles’)
disp(P);
disp(’Closed loop poles obtained’)
disp(eig(Acl)’);
%Compute Closed loop transfer function
%using the same value of Lr as for regular
%state feedback Lr=8.89
Ba=B*8.89+[zeros(4,1);-1]
[num,den]=ss2tf(Acl,Ba,C,0);Gcl=tf(num,den);
disp(’Closed loop transfer function:’)
Gcl
Executing the script we find that the following controller parameters

l1 = 3.61, l2 = 47.95, l3 = 1.53, l4 = 59.98, l5 = 17.78

The transfer function from reference to angle of the second rotor for the
closed loop system is

0.4001s2 + 4.801s + 8
G ( s) =
s5 + 7s4 + 20s3 + 30s2 + 24s + 8

The transfer function from torque on the second rotor to its displacement
can be computed using the following Matlab script.
%Computation of impedance
%This script computes the transfer function
%from a disturbance on the second rotor to
%the angle of that rotor for a state feedback
%with integral action
%Compute state feedback
robarmsfbi;
%Compute the transfer function
B=[sys2.B;0];C=[sys2.C 0];
[num,den]=ss2tf(Acl,B,C,0);Gcl=tf(num,den);

387
Chapter 9. State Feedback

0
10

−2
g 10

−4
10

−3 −2 −1 0 1 2
10 10 10 10 10 10
w

Figure 9.13 Gain curves for the open loop system (dotted), the system with state
feedback (dashed) and the system with state feedback and integral action (full).

disp(’Closed loop impedance function:’)


Gcl
%Compute stiffness at second rotor
ks=den(6)/num(6);
The transfer function is

0.1s3 + 0.699s2 + 1.713s


G ( s) =
s5 + 7s4 + 20s3 + 30s2 + 24s + 8

In Figure 9.13 we show the gain curves of the transfer functions relating
angular deviation to disturbance torque for the open loop system and for
the system with state feedback and state feedback with integral action.
The figure shows clearly that the deflection caused by a given torque
can be reduced by feedback. With a regular state feedback the gain is
reduced by more than a factor of XXX. By introducing integral action in
the controller the deviation can be reduce more at low frequencies.

Simulation of the Controller with Integral Action


The simulink block shown in Figure 9.11 can also be used to simulate the
controller with integral action. The simulation is executed with the script
%Simlation of robot arm with state feedback
%having integral action
%Get procees and controller parameters
robarmsfbi;
Ap=A;Bp=[B B2];Cp=eye(4);Dp=zeros(4,2);
%Set controller parameters
Lr=8.8;
Ac=0;Bc=[1 0 -1 0 0];Cc=L(5);Dc=[Lr -L(1:4)];
%Execute simulation

388
9.8 An Example

1
y

−1

−2
0 2 4 6 8 10 12 14 16 18 20

10

4
u

−2
0 2 4 6 8 10 12 14 16 18 20
t

Figure 9.14 Simulation of the closed loop system with state feedback having in-
tegral action. The angle ϕ 1 of the first rotor is shown in dashed curves, and the
motion of the second rotor in solid lines.

r=1;d=2;ts=20;[t,x,y]=sim(’robarmblk’,[0 ts]);
subplot(2,1,1);
plot(t,y(:,1),’r--’,t,y(:,2),’b’,t,ones(size(t)),’r:’,’linew’,2);
ylabel(’y’)
axis([0 20 -2 4])
subplot(2,1,2);plot(t,y(:,6),t,zeros(size(t)),’r--’,’linew’,2);
ylabel(’u’)
axis([0 20 -2 10])

The result of the simulation is shown in Figure 9.14. Compare this with
the simulation of the controller without integral action in Figure 9.14. The
responses to reference signals are quite comparable but the responses to
a disturbance torque are different. The controller with integral action
gives zero steady state error when a torque is applied. The first rotor
does however have a substantial deviation. This is necessary to create a
torque to oppose the disturbance.

389
Chapter 9. State Feedback

9.9 Summary
In this chapter we have presented a systematic method for design of a
controller. The controller has an interesting structure, it can be thought
of as composed of three subsystems: a system that generates the desired
output and a feedforward signals from the reference value, an estimator
and a feedback from estimated states. This structure has the property that
the response to reference signals can be decoupled from the response to
disturbances. The details are carried out only for systems with one input
and one output but it turns out that the structure of the controller is the
same for systems with many inputs and many outputs. The equations for
the controller have the same form, the only difference is that the feedback
gain L and the observer gain K are matrices instead of vectors for the
single-input single-output case. There are also many other design methods
that give controllers with the same structure but the gains K and L are
computed differently. The analysis also gives an interesting interpretation
of integral action as a disturbance estimator. This admits generalizations
to many other types of disturbances.

390
Index

2DOF, general controller, 185 cancellation of poles and zeros,


2DOF, two degrees of freedom, 160
176 Cauchy’s theorem, 127
causal reasoning: difficulties with
AC, alternating current, 20 closed loop systems, 204
actuation, 209 CD player, 32
actuators, 209 centrifugal governor, 10
adaptive, 42 characteristic polynomial, 78
adaptive cruise control, 34 closed loop systems, 66
adaptive optics, 41 closed loop systems: difficulties
aeronautics, 24 in causal reasoning, 204
alternating current, AC, 20 communications, 28
amplifier, positive feedback, 29 comparison of processes, 229
anti-lock braking systems, 9 complementary sensitivity func-
anti-windup, 266 tion, 211, 225
automatic reset, 262 computing, 36
automotive, 33 control error, 46
autonomous driving, 34 control matrix, 130
autonomy, 27 control: why learn about it, 199
controlled differential equation,
bias, 261 74, 77
bicycle dynamics, 192, 195 controller gain K , 48, 260
biology, 42 controller parameterization, 189
black box models, 72 controllers:two degrees of free-
block diagram, 49 dom, 57
block diagrams, 49 convergence abscissa, 98
Bode’s Relations, 120 critical point, 103
bump test, 81, 169 critical point, 102, 104
critical velocity, 197
calibrated system, 342 crossover frequency, 298
calibration, 346 cruise control, 164

391
Chapter 9. State Feedback

D-term, 48, 260 feedback, magic, 70


DC, alternating current, 21 feedback, main drawback, 70
DCS, distributed process con- feedback, positive, 28
trol, 15 feedback: reducing parameter vari-
delay margin, 106 ations, 14
derivative action, 263 final value theorem, 99
derivative gain, 260 first order dynamics, 169
derivative time Td , 48, 260 first order system, 168, 269
differential equation: controlled, flow, 73
77 frequency response, 101
Diophantine equation, 187 frequency response: experimen-
direct current, DC, 21 tal determination, 101
direct term, 130 front fork, 196
distributed process control, DCS, fundamental limitations, 249
15
disturbances, 76 gain, 59, 89, 101
dominant poles, 239, 324, 327 gain crossover frequency, 120,
double integrator, 130 298
double integrator: pole placement gain margin, 104–106
by state feedback, 342 gain, steady state, 89
drum level control, 333 Gang of Six, 206
dynamics matrix, 130 Gang of Four, 206, 211
dynamics, bicycle, 192 Gang of Six, 210
dynamics, car, 164
Hall diagram, 299
electric motor, 131 haptics, 64
electronics, 28 high frequency roll-off, 231
engineering science, 7 high order systems, 185
error coefficients, 236 history, 9
error feedback, 55, 56, 176, 211, hybrid control, 26
264
Euclid’s algorithm, 188 I-term, 48, 260
experimental determination of impulse response, 75, 81
dynamic models, 101 impulse response: experimental
exponential functions, 84 determination, 81
external descriptions, 72 initial value theorem, 99
input disturbance, 56, 365
feedback amplifier, 54 input-output models, 72
feedback systems: definition in integral action, 11, 262, 346, 375
terms of block diagrams, integral control, 47
66 integral gain, 260
feedback, creates linear relations, integral time Ti , 48, 260
61 integral windup, 266

392
9.9 Summary

integrator windup, 266 micromechanical systems, MEMS,


internal descriptions, 72 37
internal model principle, 361 minimum phase, 122
inverse response, 125, 174 mode, 84, 96
inverted pendulum, 130 model uncertainty, 223
models simplified, 168
lag compensation, 283
Leadcompensation, 290 natural science, 7
leadcompensation, 287 noise sensitivity function, 211
limitations, 249 non-minimum phase, 20
limitations: noise, 250 notch compensation, 291
limitations: delay, 251 notch compensator, 291
limitations: dynamics, 250 Nyquist contour, 109
limitations: RHP pole, 251 Nyquist plot, 101
limitations: RHP pole and de- observability, 76, 156
lay, 251 on-off control, 46
limitations: RHP poles and ze- operational amplifier, 295
ros, 251 order, 77, 130
limitations: RHP zero, 251 ordinary differential equation:
limitations: RHP zeros, 325 controlled, 74
limitations: saturation, 250 output disturbance, 365
linear static model, 59 overshoot, 175
linear system, 130
linear systems, 75 P-term, 48, 260
linearization, 59 PC, personal computer, 15
load disturbance, 56, 207 PD control, 179
load disturbance sensitivity func- personal computer, PC, 15
tion, 211 phase, 101
local feed back, 209 phase crossover frequency, 120
loop gain, 60 phase lag, 101
loop transfer function, 102 phase margin, 105, 106
LTI system, 130 physics, 40
LTI: response to exponential func- PI and PID control, 184
tions, 84 PI control, 11, 180
PI control, cruise control, 165
magic of integral control, 47 PI control, first order systems,
manufacturing, 16 168, 171, 269
mathematics, 39 PI controller: analog circuit, 93
maximum sensitivity, 218 PID control, 47, 182, 259
measurement noise, 56, 207, 250 PLC, programmable logic con-
MEMS, micromechanical systems, troller, 15
37 PLC, programmable logic con-
micro-controller, 34 trollers, 17

393
Chapter 9. State Feedback

pole placement, 171, 178, 185, response to sinusoidal inputs,


205 100
pole placement: counterintuitive RHP zeros and stabilization, 204
behavior, 325 robotics, 18
pole placement: RHP process ze- Routh-Hurwitz stability crite-
ros, 325 rion, 83
pole zero cancellation: design rule,
217 saturations, 250
poles, 84, 96 second order dynamics, 179
poles and zeros, 84 second order systems, 171, 172
positive feedback, 28 sensitivity crossover frequency,
power, 20 218
predestination, 73 sensitivity function, 211, 225
prediction, ability of controllers, sensitivity, relation to relative
48 damping, 228
prediction, using derivative ac- sensor function, 130
tion, 48 sensor matrix, 130
process control, 14 sensors and actuators: elimina-
programmable logic controller, tion effects of RHP zeros,
PLC, 15 204
programmable logic controllers, servo mechanism theory, 12
PLC, 17 servo problem, 174
proportional action, 11 setpoint, 260, 264, 265
proportional control, 11, 47 setpoint weights, 265
similarity of processes, 229
proportional gain, 260
simple models, 168, 205, 223
pure error feedback, 211
sinusoidal inputs, 100
Small Gain Theorem, 223
quantum systems, 42 stability, 64, 83
stability analysis, 65
reachability, 76 stability margin, 105, 106
reachability matrix, 152 stability margins, 104
rear wheel steering, 198 state, 73, 129
reductionism, 7 state augmentation, 366
reference weighting, 264 state feedback: unreachable sys-
reference weights, 265 tem, 343
regulation problem, 176 state models, 72
relay feedback, 275 state:concept, 73
relays, 17 static model, 58
reset, 261 steady state gain, 84, 89
resonant compensator, 292 step response, 75, 81
response to exponential functions, step response: experimental de-
84 termination, 81

394
9.9 Summary

step test, 169 zero: signal blocking property,


stiffness coefficients, 220 84, 96
super-regenerative amplifier, 28 zeros, 84, 96
superposition, 77, 91 Ziegler-Nichols methods, 271
symbol:ω ms , 218
symbol:ω sc , 218
symbol:Ms , 218
system: time-invariant, 130

the magic of feedback, 70


time delay: approximation, 239
time-invariant system, 130
timing, 216
tracking slow signals, 236
tracking time constant, 266
trail, 196
transfer function: laplace trans-
forms, 89
transfer function, 83, 89
transfer function from signal to
signal, 91
transmission zero, 96
transmission zeros, 96
two degrees of freedom, general
controller, 185
two degrees of freedom, 57, 180,
185, 211
two degrees of freedom (2DOF),
176

UAV, unmanned air vehicles, 27


uncertainty, 76
unmanned air vehicles, UAV, 27

vector field, 73
velocity function, 130

waterbed effect, 233


white box models, 72
winding number, 108
windup, 266

Youla-Kučera parameterization,
190

395

You might also like