SE 380 Lecture Notes
SE 380 Lecture Notes
Christopher Nielsen
Control Systems Group
Department of Electrical & Computer Engineering
Acknowledgments
These notes are for introductory undergraduate courses on control systems at the University of Waterloo. They
are partially based on notes written by Prof. John Thistle, Prof. Daniel Miller, Prof. Daniel E. Davison at
the University of Waterloo and Prof. Bruce Francis, Prof. Manfredi Maggiore, Prof. Raymond Kwong at the
University of Toronto and Prof. Andrew Lewis at Queen’s University. All errors, typographical or otherwise,
are solely mine.
i
Contents
Notation iv
1 Introduction 1
1.1 Familiar examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 What is control engineering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Control engineering design cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Feedback control in software and computer systems . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Very brief history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.6 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ii
4 First and second order systems 93
4.1 Prototype first order system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.2 Prototype second order system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4.3 General characteristics of a step response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.4 The effect of adding poles and zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.5 Dominant poles and zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
4.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Bibliography 213
Index 216
iii
Notation
iv
Acronyms and Initialisms
P.I. Proportional-Integral. 9
v
Chapter 1
Introduction
This course is about the analysis and design of control systems. Control systems are ubiquitous, essential, and
largely invisible to the general public. Without control systems there could be no manufacturing, no vehicles,
no computers, no regulated environment — in short, no technology. Control systems are what make machines,
in the broadest sense of the term, function as intended [Doyle et al., 1990].
Contents
1.1 Familiar examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 What is control engineering? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Control engineering design cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Feedback control in software and computer systems . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Very brief history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.6 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1
1.2. What is control engineering? 2
• auto-pilot on a plane,
• bioengineering applications, e.g., prosthetics and artificial pancreas [Cobelli et al., 2009], [Bequette, 2005],
• Cyber-physical systems, e.g., smart grid, traffic control systems [Kim and Kumar, 2012],
• opinion dynamics in social networks [Anderson and Ye, 2019] [Jia et al., 2015],
• middleware (application servers, database management systems, email servers) [Hellerstein et al., 2004].
an input or an output of the system P . In control engineering we are given a system called the plant. We are
interested in making the output of the plant behave in a desirable manner in the presence of model uncertainty
and despite uncontrolled influences called disturbances. We change the behaviour of the plant by connecting
it to another system called the controller or compensator1 . The essential picture is given in Figure 1.2.
In Figure 1.2 the reference signal r(t) represents the desired output. The external disturbance is d(t).
The controller affects the behaviour of the plant through the input signal to the plant u(t) which is physically
implemented by actuators. The basic feedback loop of (i) sensing, (ii) computation and (iii) actuation is the
central concept in control.
Example 1.2.1. (Helicopter) In helicopter flight control, the plant is the helicopter itself plus its sensors
and actuators. The controller is implemented as a program running in an on-board computer. The disturbance
might be the force of the wind acting on aircraft. The design of a flight control system for a helicopter requires
first the development of a mathematical model of the helicopter dynamics. This is a very advanced subject,
well beyond the scope of this course. We must content ourselves with much simpler plants. N
1
The term compensation is used for the process of designing a controller, reflecting the fact that one is “compensating” for
deficiencies in the innate properties of the plant. The controller itself is sometimes called a compensator.
Example 1.2.2. (Open-Loop Control) Suppose we want the plant output to track the reference signal, i.e.,
we want the difference r(t) − y(t) to approach zero as time passes. One way to do this is to use an open-loop
architecture. In this case, one omits the sensors (saving money) and hence removes the part of the diagram in
Figure 1.2 with dashed lines. The controller reads the reference signal r(t) and uses this information to decide
on the input u(t) to the plant.
The open-loop control design has inherent problems. First, if d(t) is unknown then the disturbance may
cause the plant output to deviate from the reference signal. Another problem is that the plant model used to
decide on the input signal can never be a completely accurate representation of a real physical system. Since
there is no feedback, the controller is oblivious to these issues and will not take any corrective action when the
plant output inevitably deviates from the reference signal. N
A powerful way to solve these problems is to use feedback. In this architecture the plant output is read
by sensors which may themselves be considered a system. The sensor output is then compared to the reference
signal and an error signal e(t) is formed. The error is sent to the controller2 which decides on the corrective
action to be taken.
Example 1.2.3. (Cruise Control) A classic example is the cruise control system in a car. The plant is the
car itself. The output of the plant is the car’s speed. The speed is read by a speedometer whose values are sent
to an embedded processor in the car. The control algorithm running on the processor compares the speedometer
reading to the desired speed set by the driver and then decides whether to increase or decrease the throttle. In
this example disturbances may include the pitch of the road, ice and wind. N
Example 1.2.4. (Automated Shopping Cart) Consider an automated shopping cart that follows a person
around the grocery store while they shop. The cart must maintain a predefined safe distance from the shopper
while not colliding with shelves. In this example the plant is the shopping cart. The actuators are motors
attached to the wheels. The cart is equipped with distance sensors, e.g., a camera, that measure how far the
cart is from the shelves and the shopper. The sensors send the distance information to an embedded computer.
The control algorithm running on the computer compares the distance measurements to the desired distances
and sends appropriate command signals to the motors. The disturbances in this example include other shoppers
and carts. N
we have a DC motor whose output is the angular velocity ω(t) of its shaft, the input is a voltage u(t), and
there is a disturbance torque T (t) resulting from, for example, an unknown external load being applied to the
shaft of the motor. This external torque is something we cannot alter. In Chapter 2 we’ll derive the governing
differential equation for this system to be
dω 1
= − ω(t) + kE u(t) + kT T (t).
dt τ
Here τ , kE and kT are positive physical constants. This system can be represented by the block diagram in
Figure 1.3a.
12
10
0
0 2 4 6 8 10 12 14 16 18 20
time (s)
Figure 1.3: Block diagram of DC motor speed model and open-loop step response.
Suppose that we want the motor shaft to spin at a constant desired speed of ω0 radians per second. This
constant represents our reference signal, i.e., ωref (t) = ω0 . Our first naı̈ve attempt to control this system is to
use an open-loop scheme. We start applying constant voltages to observe the resulting speed of the motor’s
shaft. From this we’ll generate a rule for our control signal u(t). If u(t) = u0 (constant) and there is no
disturbance torque T (t) = 0 then the system model becomes
dω 1
= − ω(t) + kE u0 , t ≥ 0.
dt τ
If we assume, as is reasonable, that the motor isn’t moving when we apply the voltage then ω(0) = 0. The
solution to the Ordinary Differential Equation (O.D.E.) is then
t
ω(t) = kE u0 τ 1 − e− τ , t ≥ 0.
Figure 1.3b gives a plot of this signal for kE = 2, u0 = 3, τ = 2. From either the above expression for ω(t) or
by running more experiments (with different values of u0 ) on the motor to obtain enough data like Figure 1.3b,
we can figure out that if we want the motor to run at a speed of ω0 radians per second, then we should set the
voltage to
ω0
u(t) = . (1.1)
kE τ
The block diagram for this open-loop strategy is depicted in Figure 1.4. As discussed in Example 1.2.2, this
strategy has problems. First, suppose that the disturbance torque is a non-zero constant T (t) = −T0 . The
ODE becomes
dω 1
= − ω(t) + kE u0 − kT T0 , t ≥ 0.
dt τ
and its solution, again assuming ω(0) = 0, is
t
ω(t) = τ (kE u0 − kT T0 ) 1 − e− τ , t ≥ 0.
With the open-loop control strategy (1.1) the ultimate speed of the motor is ω0 − τ kT T0 . Figure 1.5a shows
the response using the open-loop control when ω0 = 5, kT = 1 and T0 = 2. We can see that the final speed
(≈ 1 rad/sec) is way below the desired speed of 5. The other problem is that, due to modelling errors, we are
unlikely to have exact numerical values for τ and kE . Figure 1.5b shows the response of the open-loop system
when the actual value of τ is 1.6 instead of our estimated value of 2. Again the motor fails to reach the desired
speed of 5.
1 4
0.9
3.5
0.8
3
0.7
2.5
0.6
0.5 2
0.4
1.5
0.3
1
0.2
0.5
0.1
0 0
0 2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 10 12 14 16 18 20
time (s) time (s)
(a) Response with constant disturbance. (b) Response with modelling error.
Figure 1.5: Open-loop control of a DC motor in the presence of disturbances and modelling error.
As mentioned in our introductory discussion, a powerful way to solve the problems we’ve just observed is
to use feedback in our decision making. To that end, let’s suppose instead that the motor has a tachometer
which measures its shaft speed. The tachometer takes an angular velocity and returns a voltage. We’ll model
the tachometer as a scaling factor kS . The voltage from the tachometer is available for feedback. Our controller
converts this voltage back to the physically meaningful unit of radians per second ωmeas (t) and then compares
the measured speed to the reference3 . This is illustrated in Figure 1.6.
In Figure 1.6 the controller computes the tracking error, i.e., the difference between the desired speed ωref (t)
and the measured speed ωmeas (t). Then it multiplies the error by a constant Kp which is the gain of the
controller. The differential equation governing this system is
dω 1
= − ω(t) + kE Kp ωref (t) − k̄S kS ω(t) + kT T (t).
dt τ
The only independent signals in the closed-loop system are the reference signal and the disturbance torque.
Figure 1.7a shows the response of the closed-loop system, for various values of the gain Kp , when ωref (t) = 5,
k̄S kS = 1, there is no disturbance torque T (t) = 0 and we assume perfect knowledge of the physical constants.
Compared to the open-loop response (cf. Figure 1.3b) we see that the closed-loop system doesn’t achieve
the desired speed but that the response is much faster. We can try to increase the gain of the controller to see
3
Ideally in Figure 1.6 we have k̄S kS = 1 so that ωmeas (t) = ω(t). For this reason the sensor blocks in the feedback path are often
omitted in which case we have a unity feedback system.
if this helps. Figure 1.7a shows the response for Kp ∈ {5, 10, 15, 20, 25}. As the gain Kp increases the error
decreases and the response becomes faster. High gain is a very important concept in control but we have to be
careful using it. Figure 1.7b shows the applied voltage u(t) corresponding to Kp ∈ {5, 10, 15, 20, 25}. As the
5 0
4.5
-20
4
3.5 -40
3
-60
2.5
-80
2
1.5
-100
-120
0.5
0 -140
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 1 2 3 4 5 6 7 8 9 10
time (s) time (s)
gain increases so does the applied voltage. If the applied voltage is too large we will damage the motor so we
need to be judicious when using high gain4 .
A major benefit of the closed-loop architecture is in handling disturbances and modelling error. Figure 1.8
shows the response of the closed-loop system (cf. Figure 1.5) with T (t) = −2 (Figure 1.8a) and τ = 1.6
(Figure 1.8b). In these scenarios the closed-loop system gets closer to the desired speed of ωref (t) = 5. It’s
actually possible to design a controller so that we exactly track the desired speed. We’ll learn how to do this as
the course progresses. In summary, it is hoped that this simple introductory example helps convince you that
feedback is a good thing.
1. Study the system to be controlled and decide what types of sensors and actuators will be used and where
they will be placed.
4
Another problem with high gain is that it can lead to instability. We’ll see this in detail as the course progresses.
5 5
4.5 4.5
4 4
3.5 3.5
3 3
2.5 2.5
2 2
1.5 1.5
1 1
0.5 0.5
0 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
time (s) time (s)
(a) Response with constant disturbance. (b) Response with modelling error.
Output
! Actuators System Sensors !
Process
Clock
Controller
operator input
Figure 1.3: Components of a computer-controlled system. The upper dashed box represents
Figure 1.9: Components of theaprocess
computer controlled
dynamics, systemthe[Åström
which include and
sensors and Murray,
actuators 2019].toThe
in addition upper dashed box represents the
the dynamical
process dynamics, which include the sensors
system being controlled.and actuators
Noise in addition
and external to can
disturbances theperturb
dynamical systemofbeing
the dynamics the controlled. Noise and
external disturbances canprocess.
perturbThe thecontroller
dynamicsis shown in the
of the lower dashed
process. The box. It consists
controller is ofshown
a filter in
andthe
analog-to-
lower dashed box. It consists
of a filter and analog-to- digital
digital(A/D)
(A/D) and and
digital-to-analog (D/A) converters,
digital-to-analog (D/A) as well as a computer
converters, as wellthat asimplements
a computer that implements the
control algorithm. A systemthe control
clockalgorithm.
controlsAthe system clock controls
operation the controller,
of the operation of the controller, synchronizing
synchronizing the A/D, D/A and computing
the A/D, D/A and computing processes. The operator input is also fed to the computer as an
processes. The operator input is also fed to the computer as an external input.
external input.
7. Design a controller to meet the specs, if possible; if not, modify the specs or generalize the type of controller
sought.
• In this course the controller itself is a transfer function. It corresponds to an ODE that relates the
controller output (input signal to plant) to the controller input (usually tracking error).
(i) Don’t let queue length get too big thereby exceeding the buffer capacity causing requests to be lost.
(ii) Don’t let queue length get to zero – causing a buffer underflow and idling the web server.
Taken together, these specifications suggest that we would like to keep the number of queries in the buffer
y(t) equal to some reference value r(t) that is enough to not greatly impact the server response time but large
enough that if the web server were to suddenly obtain additional capacity, the buffer would not underflow.
The problem here is that the rate at which the server handles requests is unknown – it depends on various
things including the number of clients. We can model the uncertain service rate as a disturbance d(t). The
controller’s goal is therefore to decide on the request rate u(t) so that the number of bits in the buffer y(t)
remains close to r(t) despite the disturbance d(t). The only information available to the controller is r(t) and
y(t).
have finite-size buffers. Thus, to prevent buffer overflows during congestion, routers may discard packets (which
results in their later re-transmission as part of the TCP protocol).
Unfortunately, by the time that buffer overflows occur, it may be that the network is already congested.
The idea behind Random Early Detection (R.E.D.) is to take action before congestion becomes severe. RED
measures how much of critical buffers are consumed, a metric that is referred to as the Buffer Fill Level (B.F.L.).
As depicted in Figure 1.10, RED introduces the capability of randomly dropping packets even if buffer capacity
is not exceeded. If BFL is small, no packets are dropped. However, as BFL grows larger, progressively more
packets are dropped.
Figure 1.10: Router operation under random early detection. Incoming packets are dropped based on an adjustable drop
probability.
RED has been shown to reduce network congestion and to improve network throughput. However, one
challenge with using RED in practice is specifying its configuration parameters, especially the BFL at which
packets start being dropped and the maximum drop probability. One approach to tuning these parameters
has been to view RED as a feedback control system. Figure 1.11 depicts this perspective. Control theory is
used to study the impact on stability and other properties for different settings of RED configuration parame-
ters. Proportional-Integral (P.I.) control has been used for management of the accept queues of network routers.
Figure 1.11: Feedback control of buffer fill level in a router. The reference input is the desired BFL, and the control input
is the package drop probability.
2. Classical control (1940’s-1950’s): this constitutes the main topics covered in this course. Deals mostly
with Single-Input Single-Output (S.I.S.O.) linear systems. The pioneering work of Bode, Nyquist, Nichols,
Evans and others appeared at this time. This resulted in simple graphical tools for analyzing single-input
single-output feedback control problems which are now generally known by the generic term Classical
Control Theory. Specifications are based on closed-loop gain, bandwidth, and stability margin. Design
is done using Bode plots. Controllers are typically tuned by hand. Examples: anti-aircraft guns (WWII),
chemical plants, nuclear reactors, cruise control in cars, motor control.
3. Modern control (1960’s - 1970’s): The approach to control analysis and design, covered in ECE488, is
in the time domain and uses state-space models instead of transfer functions. This period followed the
work of Wiener, Kalman (and others) on optimal estimation and control. Specifications may be based on
closed-loop eigenvalues, that is, closed-loop poles. This approach is known as the “state-space approach.”
4. Robust and adaptive control (1980’s): frequency domain tools and thinking but state-space computational
methods; robust control including the effect of model error on the performance of feedback controllers;
optimal control (where the controller is designed by minimizing a mathematical function). In this context
classical control extends to H∞ optimization and state-space control extends to Linear-quadratic Gaus-
sian (LQG) control. Discrete-event systems (DES). Examples: advanced aircrafts, large power systems,
distributed control.
5. “Post modern” control (1990’s - present): Striking developments in the control of nonlinear systems;
hybrid systems; distributed robotics; sensor networks. Examples: unmanned vehicles, social networks
and dynamics, cooperative control, advanced robotics including humanoids, medical applications, control
over networks.
1.6 Notation
Generally, signals are written lower case: e.g., x(t). Their transforms are capitalized: X(s) or X(jω). The
impulse is δ(t). In signals and systems the unit step is denoted u(t), but in control u(t) denotes a plant input
so we’ll denote the unit step by 1(t). We will use the following notation for parts of the complex plane
We denote by R[s] the ring of polynomials in the (complex) variable s with coefficients in R. The symbol :=
means equal by definition. It is convenient to write vectors sometimes as column vectors and sometimes as
n-tuples, i.e., ordered lists. For example
x1
x= , x = (x1 , x2 ).
x2
1.7 Summary
In this chapter we introduced the essential idea of feedback control. The key points that you should understand
are the following.
1. Feedback control is used in all sorts of engineered systems that we use everyday and is found in many
natural phenomena.
2. Control engineering is about making the output of a system (the plant) behave in a desirable manner
despite disturbances acting on the system and despite modelling uncertainty. The essential picture is
given in Figure 1.2 and you should understand what all the signals and systems in the figure represent.
3. In Section 1.2.1 we studied the problem of controlling the speed of a DC motor. We used this example to
introduce the deficiencies of open-loop control and to motivate the use of feedback.
4. The “big picture” of the control engineering design cycle was presented at a high level in Section 1.3. The
remainder of this course is spent filling in the details of this process. The components of a moden control
system were shown in Figure 1.9.
5. Examples of feedback control applied to problems in computer hardware and software were presented.
These examples demonstrate the power of the ideas covered in this course and the breadth of their
application areas.
6. A brief history of the subject and notation used in this course were presented.
Before doing any controller design, we must first find a good mathematical model of the system we want to
control. A good model is simple but accurate. The system model serves as the basis on which a controller is
designed. Modelling is an important part of the control engineering design process discussed in Chapter 1.
In principle, there are two different ways in which mathematical models can be obtained: from prior knowl-
edge — e.g., in terms of physical laws — or by experimentation on a process. When attempting to obtain a
specific model, it is often necessary and beneficial to combine both approaches. In this chapter we focus on the
first approach to modelling, i.e., modelling based on physical principles.
Contents
2.1 General comments on modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Block diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 Modelling based on first principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.4 State-space models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.5 Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.6 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
2.7 The Laplace transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.8 Transfer functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
2.9 Block diagram manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
2.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.A Appendix: Linear functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.B Appendix: The impulse and convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
• Given a plant and control objective, what controller can achieve the objective? Can it be achieved at all?
• Why is a particular loop behaving the way it is? Can it be done better? If so, by which controller?
• How would the loop performance change if the system parameters were to change, or disturbances were
larger, or a sensor were to fail?
12
13 CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS
To answer these questions systematically, we need a means to capture the behaviour of the system in such
a way that it can be manipulated outside the constraints of physical reality. An appropriate means to achieve
this goal is to use a mathematical model [Goodwin et al., 2001]. A mathematical model is a set of equations
that describe how a system transforms input signals into output signals.
There is a trade-off between model complexity and model accuracy. Typically, increasing the accuracy of
a model also increases its complexity. The goal is to develop a model that is adequate for the problem at
hand without being overly complex. Models are used for both control design and simulation. The models used
for control design are usually simpler than simulation models. A model, no matter how detailed, is never a
completely accurate representation of a real physical system.
One may observe that a general method of representing a system is by using a table of all possible inputs to
the system and the possible responses (outputs) for these inputs. However, only very rarely will such a crude
technique be useful. One major reason for paying so much attention to linear systems is that for such systems
the table of input-output pairs can be drastically abbreviated [Kailath, 1980].
Example 2.1.1. (Mass-Spring-Damper) A common class of mathematical models for dynamical systems1 is
ordinary differential equations. In mechanics, one of the simplest differential equations is that of a mass-spring
system with damping
M q̈ + c(q̇) + Kq = u. (2.1)
Figure 2.1 illustrates this system. The variable q(t) ∈ R represents the position of a box with mass M with
Figure 2.1: Mass-spring-damper system. The position of the mass M is q with q = 0 corresponding to the rest position of
the spring. The forces acting on M are due to a linear spring with constant k, a damper whose force depends on velocity
q̇ and an applied force u.
q = 0 corresponding to the position of the mass when the spring is at rest. The notation q̇ represents the time
derivative of q, i.e., the velocity of the mass. The symbol q̈ represents the second derivative with respect to
time, i.e., the acceleration. The spring is assumed to be linear, i.e., it satisfies Hooke’s law, which says that
the force exerted by the spring is proportional to the displacement of the mass. The friction element, called a
damper, is taken as a possibly nonlinear function of the velocity q̇. It can model effects such as viscous drag or
static friction. The force u is an externally applied force which we treat as the input. This system is second
order because the highest derivative appearing in the differential equation (2.1) is the second derivative of q.
If the damper’s force is a nonlinear function of q̇, then the differential equation (2.1) is nonlinear. If the
damper function is a linear function of q̇, i.e., it has the form c(q̇) = bq̇ for some real constant b, then the
differential equation is linear. N
Example 2.1.2. (Simplified Atmospheric Model) Consider a rectangular slice of air heated from below
and cooled from above with it sides kept at constant temperatures. This is our atmosphere in its simplest
1
Roughly speaking a dynamical system is one in which the effects of actions do not occur immediately. For example the speed
of a car does not change instantaneously when the gas pedal is pushed.
description. The bottom is heated by the earth and the top is cooled by the void of outer space. Within
this slice, warm air rises and cool air sinks. In the model, as in the atmosphere, convection cells develop,
transferring heat from bottom to top. The state of the atmosphere in this model can be completely described
by three variables, namely the convective flow x, the horizontal temperature distribution y, and the vertical
temperature distribution z; by three parameters, namely the ratio of viscosity to thermal conductivity σ, the
temperature difference between the top and bottom of the slice ρ, and the width to height ratio of the slice β,
and by three differential equations describing the appropriate laws of fluid dynamics
These equations were introduced by E.N. Lorenz [Lorenz, 1963], to model the strange behaviour of the atmo-
sphere and to justify why weather forecast can be erroneous. The Lorenz equations are still at the basis of
modern weather forecast algorithms. In these equations there is no external influence, i.e., no input and the
resulting system is said to be autonomous. It is also nonlinear because of the terms xz and xy in, respectively,
the ẏ and ż equations. N
Example 2.1.3. (Google Page Rank) The initial success of Google can be attributed in large part to the
efficiency of its search algorithm which, linked with a good hardware architecture, creates an excellent search
engine. Originally, a key part of the search engine was PageRank™, a system for ranking web pages developed
by Google’s founders Larry Page and Sergey Brin at Stanford University.
The main idea of the algorithm is the following. The web can be represented as an oriented (and sparse)
graph in which the nodes are the web pages and the oriented paths between nodes are the hyperlinks. The
basic idea of PageRank is to walk randomly on the graph assigning to each node a vote proportional to the
frequency of return to the node. If xi [k] denotes the vote of website i at time k, the updated vote is given by
X xj [k]
xi [k + 1] = .
nj
j∈N (i)
Here nj is the number of nodes (websites) connected to node (website) j and N (i) is the index set of all
the nodes that link to node i. If we let N ≈ 4 × 1010 denote the total number of webpages on the internet,
then i ∈ {1, . . . , N }. The graph, representing the internet, is not strongly connected, therefore to improve the
algorithm for computing the vote, one considers a random jump, with probability p (typically 0.15) to another
node (another page). As a result
X xj [k] N
X xj [k]
xi [k + 1] = (1 − p) +p .
nj N
j∈N (i) j=1
If we collect the variables xi as a vector x ∈ RN we can express the equations for the vote in the form
x[k + 1] = Ax[k]
for an N × N matrix A of real constants. This is a linear, time-invariant difference equation. One can show,
using the tools of ECE481, that
lim x[k] = x̄ (a constant).
k→∞
where all the elements x̄i of the constant vector x̄ are non-negative and bounded. The vector x̄ (after a certain
normalization) is the Google Page Rank and x̄i is the rank of page i. N
Example 2.1.4. (Heated Rod) Consider a thin rod of length L made of a homogeneous material, see Fig-
ure 2.2. Assume its sides are thermally insulated, while its ends are kept at constant temperatures T1 and T2 .
Let q0 : [0, L] → R be a differentiable function representing the temperature distribution in the rod at time 0,
Figure 2.2: Heated Rod. The rod has length L, is insulated except for its ends which are kept at constant temperatures T1
and T2 .
i.e, q0 (x) is the temperature of the rod at the point x ∈ [0, L] and at time t = 0. Then, the evolution of the
temperature as time progresses is described by the Partial Differential Equation (P.D.E.)
∂q ∂2q
= k 2, k > 0.
∂t ∂x
This is the one-dimensional heat equation. The unique solution to this PDE is the differentiable function
q(t, x) : R × [0, L] → R such that, for all x ∈ [0, L] and all t ∈ R,
If the temperature T1 at one end of the rod is allowed to be a variable input that can be freely assigned, then
the heat propagation process turns into a control system. N
Although these examples are quite different, they share important fundamental properties. They all describe
a dynamical system, i.e., a process that evolves with time. They illustrate the power of mathematical models to
help us understand simple systems (like the mass-spring-damper) to very complex systems (like the atmosphere).
In obtaining the mathematical model for a given physical system, we make use of a storehouse of known
physical cause-and-effect relations for individual elements–a storehouse built up through innumerable physical
experiments, performed (sometimes at great expense) by many research teams. It is unrealistic for an engineer
to be an expert on all classes of system models, this requires domain specific knowledge. Instead, the aim of
this chapter is to give an introduction to basic modelling and linearization.
Newton’s second law tells us that there’s a mathematical relationship between u and y, namely, M ÿ = u.
We take the viewpoint that the force can be applied independently of anything else, that is, it’s an input. Then
y is an output. We represent this graphically by the block diagram in Figure 2.4b.
Suppose the cart starts at rest at the origin at time 0, i.e., y(0) = ẏ(0) = 0. Then the position depends only
on the force applied. However y at time t depends on u not just at time t, but on past times as well. So we
can write y = f (u), i.e., y is a function of u, but we can’t write y(t) = f (u(t)) because the position at time t
doesn’t depend only on the force at that same time t. N
We may need to allow a block to have more than one input as in Figure 2.5. This means that y is a function
of u and v, y = f (u, v). Block diagrams may also have summing junctions as in Figure 2.6.
Example 2.2.2. (Ball and Beam) This example concerns a beam balanced on a fulcrum as shown in Fig-
ure 2.7. This system is used in the lab for ECE481. Suppose a torque τ is applied to the beam. Let θ denote
the angle of tilt and d the distance of roll. Then both θ and d are functions of τ . The block diagram could be
valve
Figure 2.7: Ball and Beam. A ball sits on a beam that can be rotated by a torque applied at the centre of the beam. The
position of the ball is denoted by d, the angle of the beam is θ and the applied torque is τ .
as in Figure 2.8a or, as in Figure 2.8b, or initial conditions, if they are not fixed, could be modelled as inputs
too. N
Figure 2.9: Rotor on a shaft. A rotor or disk is attached to a shaft. The rotation of the shaft causes the rotor to spin.
The position of the disk is its angle θ with respect to some fixed reference. Its velocity is θ̇ and its acceleration is θ̈.
inertia of the rotor about its axis of rotation. Let θ denote the rotor’s angular position. Then the governing
equation for this system is X
J θ̈ = applied torques
X (2.3)
= τi .
The forces and torques2 that appear on the right-hand side of the above summations are usually modelled by
various types of simple components. These simple components form the building blocks of mechanical models.
Next we review the equations for them.
2
A torque is sometimes called a moment of force or moment for short.
Linear springs
For linear translational springs the force due to the spring is given by
where k is the spring constant. The torque due to a rotational or torsion spring obeys a rotational version of
Hooke’s law. It is often used to model flexible shafts and its equation is
Linear dampers
A linear damper is usually used to model viscous friction. For translational motion the equation is
where b is the coefficient of damping. The torque due to a rotational or inertia damper is given by
We follow the procedure from [Cannon Jr., 2003] for deriving the equations of motions for mechanical
systems.
3. Separate the system into its mechanical components. Each component should be either a single point
mass or a single rigid body.
4. For each component determine all external forces and moments (torques) acting on it.
5. For each component, express the position of the centre of mass in terms of the chosen coordinates.
7. Apply Newton’s equations for rotational motion to each mechanical component. For each component, the
sum of moments about a point that is either (a) the centre of mass or (b) in the component but stationary,
equals the moment of inertia of the component about that point multiplied by the angular acceleration.
We follow this procedure in the next example though it is too simple to be really representative.
Example 2.3.1. (Car Suspension) Find the governing differential equations for the simplified quarter model
of a car suspension system shown in Figure 2.14. Here M1 represents 1/4 of the mass of the car chassis while
M2 represents half the axle mass.
1. In this example the reference frame is already suggested by Figure 2.14. From the figure we see that up
is taken as the positive direction.
• We assume that the origin of our coordinates, i.e., the zero position (q1 , q2 , q3 ) = (0, 0, 0), is the
position at which all the springs are balanced by the force gravity. In this way we can ignore gravity.
We can do this when we have linear springs.
• The variable q1 represents how far M1 has moved from its rest position. The variable q2 represents
how far M2 has moved from its rest position. The variable q3 represents the distance from the road
to M2 . It is an exogenous signal, i.e., it comes from the “outside world.” We can view it as a
disturbance to the suspension system.
3. In this example there is no rotational motion. We have two masses M1 and M2 which we treat as point
masses.
4. Free body diagrams are very useful to accomplish this step. Figure 2.15 shows the free body diagrams for
both masses.
5. Since this example is so simple, we already did this when we chose the set of coordinates in step 2.
The next example follows the same procedure for a system with both translational and rotational motion.
Example 2.3.2. (Anti-lock Brake System) An Anti-lock Braking System (ABS) can greatly improve the
safety of a vehicle in extreme circumstances, as it maximizes the longitudinal tire-road friction while maintaining
large lateral forces, which guarantee vehicle steerability. We’d like to obtain a model for a rolling wheel on a flat
road as shown in Figure 2.16. In this figure r is the wheel’s radius, the term τb represents the braking torque,
i.e., the input signal, and F (q̇) is the force due to friction with the road. We follow the same general procedure
as in the previous example.
• We take the left direction as positive translational motion and the counterclockwise rotation of the
wheel as the positive direction of rotation. This choice is already suggested by Figure 2.16.
• Let q denote the position of the contact point of the wheel and let θ denote the angle that a point
on the wheel makes with the road.
4. For each component determine all external forces and moments (torques) acting on it.
5. For each component, express the position of the centre of mass in terms of the chosen coordinates.
• Since this example is so simple, we already did this when we chose the set of coordinates. The centre
of mass has position q. We ignore the vertical coordinate since we are assuming a flat road surface.
• We have
M q̈ = −F (q̇)
M q̈ = −F (q̇)
J θ̈ = rF (q̇) − τb .
If we model the road friction as a linear damper, then F (q̇) = bq̇. When simulating an ABS system, the friction
model is more sophisticated than just a linear damper. However, for the purpose of controller design, the linear
model of friction is a reasonable starting point. N
Example 2.3.3. (Physical Pendulum) Consider the physical pendulum shown in Figure 2.17a. It consists
of a rod made of a homogenous material of length ` and mass M hanging from a pivot point. Its center of mass
is at the midpoint `/2. A motor connected to the rod at the pivot point provides a torque τ . Assume there is
no friction.
1. It is standard practice to let counterclockwise rotation correspond to positive angular displacement. There
is no translational motion so we don’t need to define any other reference frames.
2. Following Figure 2.17b we choose the downward position of the pendulum to correspond to the angle
θ = 0. By our choice above, θ increases as the pendulum rotates counterclockwise.
3. In this example there is only rotational motion. The moment of inertia about the rotational axis is3
`2
2
J = M 12 + M 2` = 13 M `2 . You are not expected to know how to compute J.
4. For each component determine all external forces and moments (torques) acting on it.
• Figure 2.17b shows a free body diagram of the moments acting on the pendulum.
6. In light of the previous point, we can ignore translational motion in this example.
7. Apply Newton’s equations for rotational motion to each mechanical component about the pivot point.
Resistors
The current-voltage characteristics of a resistor R are static. Namely, the voltage v(t) across a resistor at any
fixed time t only depends on the current i(t) at that particular time. The equations are
Equivalently, using complex impedances in the Laplace domain (see Section 2.7),
Inductors
The current-voltage characteristics of an inductor L are dynamic. Namely, the current i(t) passing through an
inductor at any fixed time t depends on the voltage across the inductor v(τ ) for τ ≤ t. The equations are
Zt
1
i(t) = v(τ )dτ
L
0 (2.10)
di(t)
v(t) = L .
dt
Figure 2.19: An inductor.
In the Laplace domain, if we assume zero initial conditions, equation (2.10) becomes
Capacitors
The current-voltage characteristics of a capacitor C are also dynamic. Namely, the voltage v(t) across a capacitor
at any fixed time t depends on the current passing through the capacitor i(τ ) for τ ≤ t. The equations are
Zt
1
v(t) = i(τ )dτ
C
0 (2.12)
dv(t)
i(t) = C .
Figure 2.20: A capacitor dt
In the Laplace domain, if we assume zero initial conditions, equation (2.12) becomes
1
V (s) = I(s). (2.13)
sC
Operational amplifiers
Operational amplifiers, often called op-amps, are among the most widely used electronic devices. We only
consider ideal op-amps in this course. The circuit symbol for an ideal op-amp is shown in Figure 2.21. KCL
and KVL are used to analyse op-amp circuits under two fundamental assumptions which are valid for ideal
op-amps and approximately valid for more sophisticated models.
Example 2.3.4. (Low Pass Filter) Consider the RC low pass filter in Figure 2.22 with input voltage u(t)
and output voltage y(t) — the voltage across the capacitor. This circuit only has one loop so that Kirchhoff’s
Example 2.3.5. Consider the RLC circuit in Figure 2.23. Apply KVL to this circuit to get
−u(t) + vR (t) + vC (t) + vL (t) = 0
where vR (t), vC (t), vL (t) are the voltages across, respectively, the resistor, capacitor and inductor. We substitute
the device equations and use the definition of y(t) to obtain
Zt
1
−u(t) + Ry(t) + Lẏ(t) + y(τ )dτ = 0.
C
0
This is not a differential equation because of the integral. Take the time derivative of this equation to obtain
an ODE model
1
−u̇ + Rẏ + Lÿ + y = 0.
C
N
Example 2.3.6. (Pure Gain Op-Amp) An ideal op-amp circuit is shown in Figure 2.24. Determine the
governing equations of this circuit. With the ideal op-amp assumptions in mind, i.e.,
• There is no current into, or out of, either the positive or negative terminals,
• The voltage at the positive terminal v+ (t) equals the voltage at the negative terminal v− (t),
R2 u(t) + R1 y(t) = 0.
This is a static system since the value of y at time t only depends on the value of u at time t, i.e., y(t) =
−R2 /R1 u(t). For this reason the circuit is called a pure gain system. N
Example 2.3.7. (DC Motor) A common actuator used to provide rotary motion in control systems is the
permanent magnet DC motor which was discussed in Section 1.2.1. In this example we perform a detailed
derivation of its equations of motion.
A DC motor works on the principle that a current-carrying conductor in a magnetic field experiences a
force. The motor consists of a fixed stator and a movable rotor (also called the armature) that rotates inside
the stator.
The stator produces a magnetic field. DC motors can be classified according to the way that the magnetic
field is produced. Here we are discussing a permanent magnet motor whose stator consists of a permanent
magnet. The key physical cause-and-effect relations are:
1. If the stator produces a magnetic field and a current i passes through the armature, then there will be a
torque on the armature causing it to rotate.
2. Whenever a conductor moves inside a magnetic field, a voltage is created across its terminals that is
proportional to the velocity of the conductor in the field. This voltage is called the back emf .
The “motor equations” model these two phenomena and provide the link between the electrical and mechanical
subsystems of the DC motor. They give the torque τ (t) on the rotor in terms of the armature current i(t) and
express the back emf voltage4 e(t) in terms of the shaft’s rotational velocity θ̇(t)
τ (t) = Kτ i(t)
(2.14)
e(t) = Ke θ̇(t).
electrical mechanical
subsystem subsystem
the motor’s shaft while θ̇(t) is its angular velocity which acts as an input to the electrical subsystem via the
second motor equation (2.14).
Next we model each block in the functional diagram. Start by drawing the equivalent circuit for the electrical
subsystem and the free body diagram for the mechanical subsystem, the rotor, as shown in Figure 2.26. We
denote the rotor shaft’s inertia with the symbol J and assume there is viscous friction, modelled using a
rotational damper with coefficient b.
Figure 2.26: DC Motor: Circuit and free body diagram for the rotor / shaft.
4
Since the generated Electromotive Force (E.M.F.) works against the applied armature voltage, it is called back emf.
Application of Newton’s laws to the shaft, along with the motor equations (2.14), yield
J θ̈ = −bθ̇ + τ
(2.15)
= −bθ̇ + Kτ i.
Notice that this equation assumes that the only source of inertia in the motor is from to the shaft itself. If we
connect a load to the motor then this is no longer true and the load can be modelled as a disturbance torque
on the right-hand side of (2.15). The electrical equation is found using KVL
di
− v + Ri + L +e=0
dt (2.16)
di
⇒ −v + Ri + L + Ke θ̇ = 0.
dt
In summary, (2.15) and (2.16) are the equations of motion governing a DC motor. N
Remark 2.3.1. If in Example 2.3.7 the response of the circuit is much faster than that of the mechanical
system, e.g., if the inductance L ≈ 0, then v(t) = Ri(t) + Ke θ̇(t) and the equations (2.15), (2.16) reduce to
Kτ Ke Kτ
J θ̈ = − b + θ̇ + v. (2.17)
R R
If we now define the constants
1 K K Kτ
ω(t) := θ̇(t), := b + τ e , kE := ,
τ R R
then (2.17) recovers the model used for motor speed control in Section 1.2.1.
Our last example, adapted from [Gopal, 1963], provides a somewhat complete treatment of how to model
the connection of mechanical components to DC motors.
Example 2.3.8. (Geared Drive) Electric motors generally produce their maximum power (= torque × angu-
lar velocity) at high speeds. Therefore at high speeds, they generally produce small torques. As a consequence,
gears are needed to drive large loads (that require high torque) at high speeds.
Consider the setup in Figure 2.27. A DC motor as in Example 2.3.7 is connected through a gear train to
the physical pendulum from Example 2.3.3. The gear with N1 teeth is called the primary gear and the gear
with N2 teeth is called the secondary gear. We denote the angular displacement of the motor shaft by θ1 and
the angular displacement of the pendulum by θ2 . The coordinates are such that θ1 = 0 when θ2 = 0. Let J1
denote the inertia of the motor shaft and the gears. Let τ2 denote the torque on the pendulum.
To analyse this system we first need to understand the effect of the gears. Ideal gears have no dynamics but
they impose algebraic constraints5
N1 θ1 = N2 θ2
τ1 τ2 (2.18)
= .
N1 N2
Example 2.4.1. (Cart with Air Resistance) Consider a cart on wheels, driven by a force u and subject to
air resistance as in Figure 2.29. Typically air resistance creates a force depending on the velocity ẏ; let’s say
this force is a possibly nonlinear function D(ẏ). Assuming M is constant, Newton’s second law gives
M ÿ = u − D(ẏ).
We are going to put this in a standard form by defining two so-called state variables, in this example position
and velocity:
x1 := y, x2 := ẏ.
Then
ẋ1 = x2
1 1
ẋ2 = u− D(x2 )
M M
y = x1 .
These equations have the form
ẋ = f (x, u) (state equation)
(2.19)
y = h(x) (output equation)
where
x1
x := , u := applied force
x2
x2
f : R2 × R → R2 , f (x1 , x2 , u) =
1 1
Mu − M D(x2 )
h : R2 → R, h(x1 , x2 ) = x1 .
The function f is nonlinear if D is; h is linear. Equation (2.19) constitutes a state-space model of the system,
and x is called the state or state vector. Here the plant is a possibly nonlinear system, u (applied force) is
the input, y (cart position) is the output, and
cart position
x=
cart velocity
In other words, when D(ẏ) is linear, the state model has the structure
ẋ = Ax + Bu, y = Cx.
ẋ = f (x, u), f : Rn × Rm → Rn
(2.21)
y = h(x, u), h : Rn × Rm → Rp .
This model is nonlinear, time-invariant. The input u has dimension m, the output y dimension p, and the state
x dimension n. An example where m = 2, p = 2, n = 4 is shown in Figure 2.30. In Figure 2.30 we have
In this course we mainly deal with single-input single-output systems. Therefore we restrict ourselves to the
case when m = 1 and p = 1.
Now we turn to the concept of the state of a system. Roughly speaking, x(t0 ) encapsulates all the system
dynamics up to time t0 , that is, no additional prior information is required. More precisely, the concept is this:
For any t0 and t1 , with t0 < t1 , knowing x(t0 ) and knowing {u(t) : t0 ≤ t ≤ t1 }, we can compute x(t1 ), and
hence y(t1 ).
Example 2.4.2. (Choosing State Variables) Consider the cart system in Figure 2.31 with no applied forces
and no air resistance. If we were to try simply x = y, then knowing x(t0 ) without ẏ(t0 ), we could not solve the
initial value problem for the future cart position. Similarly x = ẏ won’t work. Since the equation of motion,
M ÿ = 0, is second order, we need two initial conditions at t = t0 , implying we need a 2-dimensional state vector.
In general for mechanical systems it is customary to take the vector x to consist of positions and velocities of
all masses. N
Even though this course is about continuous-time systems, it is instructive to look at the state of a simple
discrete-time system.
Example 2.4.3. (Digital Filter) Consider a weighted averaging algorithm defined recursively by the difference
equation
y[k] = 3y[k − 1] + 2y[k − 2] + u[k − 2].
Here y[k] ∈ R is the output of the algorithm at the kth iteration and the above equation represents the update
rule. We can recursively solve for the output sequence {y[k]}k≥0 as long as we are given the initial values
y[−1], y[−2]
and the input sequence {u[k]}k≥−2 . The concept of a state extends to this system: The state vector x[k0 ]
encapsulates all the system dynamics up to time k0 . For any integers k0 and k1 , with k0 < k1 , knowing x[k0 ]
and knowing {u[k] : k0 ≤ k ≤ k1 }, we can compute x[k1 ], and hence y[k1 ]. As in the previous example, neither
y[k0 − 1] nor y[k0 − 2] on their own contain enough information to compute future values of y; they aren’t valid
state vectors. You should check that a valid choice of state vector for this system is x[k] = (x1 [k], x2 [k]) :=
(y[k], y[k + 1]) and that the corresponding state-space model is
x1 [k + 1] = x2 [k]
x2 [k + 1] = 2x1 [k] + 3x2 [k] + u[k]
y[k] = x1 [k].
N
Why are state models useful? First, there’s a rich control theory for them. This is covered in ECE488. You
may have heard of the Kalman filter; it is based on a state model. Second, they give a convenient data type to
store a linear model, namely, the matrices A, B, C, D which makes state models useful for computations. And
third, they give a simple way to linearize, namely, compute Jacobians. More on this in Section 2.5.
Example 2.4.4. (Mass-Spring-Damper) Consider the system in Figure 2.32. The dynamic equation is6
M ÿ = u + M g − K(y − y0 ) − bẏ.
x := (x1 , x2 ), x1 := y, x2 := ẏ
ẋ1 = x2
1 K K b
ẋ2 = u+g− x1 + y0 − x2
M M M M
y = x1 .
6
Here we are assuming that the spring is unstretched/uncompressed when y = y0 (cf. Example 2.3.1).
ẋ = Ax + Bu + c
y = Cx,
where
0 1 0 0
A= K , B= 1 , c= K , C = [1 0].
−M − Mb M g+ M y0
The constant vector c is known, and hence is taken as part of the system rather than as a signal. This system
is nonlinear. Can you see why? N
Example 2.4.5. (RLC Circuit) Recall the RLC circuit from Example 2.3.5.
1
−u̇ + Rẏ + Lÿ + y = 0.
C
It is natural to take the state variables to be voltage drop across C and current through L because together
these variables characterize the energy stored in the circuit. Let
Zt
1
x1 := capacitor voltage = y(τ )dτ
C
0
x2 := inductor current = y.
Then the KVL equation becomes
−u + Rx2 + Lẋ2 + x1 = 0
and the capacitor equation becomes
1
ẋ1 = x2 .
C
Thus
1
ẋ1 0 C x1 0
= + 1 u.
ẋ2 − L1 −RL x2 L
Since this is an LTI system, the state model of this system has the structure
1
0 C 0
ẋ = Ax + Bu, A= , B = 1
− 1 −R L
L L
y = Cx + Du, C= 0 1 , D = 0.
N
Example 2.4.6. Recall the simplified car suspension system from Example 2.3.1
M1 q̈1 + b1 q̇1 + k1 q1 = b1 q̇2 + k1 q2
M2 q̈2 + b1 q̇2 + (k1 + k2 )q2 = k1 q1 + b1 q̇1 + k2 q3 .
For mechanical systems, we take the position and velocities of the masses as our state variables. Namely, let
Let the input to the system be the road height u := q3 . Let the output of the system be the position of the
chassis y := q1 . We get the equations
ẋ1 = x2
1
ẋ2 = (−k1 x1 − b1 x2 + k1 x3 + b1 x4 )
M1
ẋ3 = x4
1
ẋ4 = (k1 x1 + b1 x2 − (k1 + k2 )x3 − b1 x4 + k2 u)
M2
y = x1 .
ẋ = Ax + Bu
y = Cx,
where
0 1 0 0
0
k1
−M b1 k1 b1
−M M1 M1
0
A=
0
1 1 , B=
0 ,
C= 1 0 0 0 .
0 0 1
k1 b1 k2
M2 M2 − k1M+k
2
2 b1
M2 M2
N
Example 2.4.7. (DC Motor) We return to the DC motor from Example 2.3.7. The equations of motion are
J θ̈ = −bθ̇ + Kτ i
di
− v + Ri + L + Ke θ̇ = 0.
dt
For state variables we take the position and velocities for the mechanical subsystem and the inductor current
for the electrical subsystem
x := (x1 , x2 , x3 ), x1 := θ, x2 := θ̇, x3 := i.
Let the input to the system be the applied voltage u := v. Let the output of the system be the angular position
of the motor’s shaft y := θ. We get the equations
ẋ1 = x2
1
ẋ2 = (−bx2 + Kτ x3 )
J
1
ẋ3 = (−Ke x2 − Rx3 + u)
L
y = x1 .
ẋ = Ax + Bu
y = Cx,
where
0 1 0 0
A = 0 − Jb KJτ ,
B = 0 , C= 1 0 0 .
1
0 − KLe − R
L L
N
2.5 Linearization
Virtually all physical systems are nonlinear in nature. We saw that nonlinear systems can be modelled by
equations of the form (2.21) which we re-write here
ẋ = f (x, u)
y = h(x, u).
There might be disturbance signals present, but for now we suppose they are lumped into u. This state-space
model includes the linear version (2.22) as a special case, i.e., f (x, u) = Ax + Bu, h(x, u) = Cx + Du, but
also includes a much larger class of systems that includes robotic manipulators, mobile and humanoid robots,
population dynamics, economic systems etc.
Example 2.5.1. (Physical Pendulum) Recall the governing ODE of the physical pendulum from Exam-
ple 2.3.3
3 g
θ̈ = 2
τ − 1.5 sin (θ).
M` `
For state variables we take the position and velocity of the pendulum
x := (x1 , x2 ), x1 := θ, x2 := θ̇.
The input is the applied torque u := τ and the output is taken to be the pendulum’s angle y := θ. We get the
equations
ẋ1 = x2
g 3
ẋ2 = −1.5 sin (x1 ) + u
` M `2
y = x1 .
This system is nonlinear because f (x, u) contains the term sin (x1 ); you can’t find constant matrices A, B such
that f (x, u) equals Ax + Bu. N
There are techniques for controlling nonlinear systems, but that’s an advanced subject. However, many
systems can be linearized about an equilibrium configuration. In other words, although almost every physical
system contains nonlinearities, oftentimes its behaviour within a certain operating range of an equilibrium
configuration can be reasonably approximated by that of a linear model. The linear approximation is then used
as the basis for control design. One reason for approximating the nonlinear system (2.21) by a linear model is
that, by doing so, one can apply rather simple and systematic linear control design techniques. Keep in mind,
however, that a linearized model will only be a good approximation to the nonlinear model when the system
operates in a sufficiently small range around an equilibrium configuration. In this section we see how to make
these approximations. The idea is to use Taylor series.
Example 2.5.2. To review Taylor series, let’s linearize the function y = f (x) = x3 about the point x = 1. The
Taylor series expansion is
∞
X f (n) (x)
f (x) = cn (x − x)n , cn =
n!
n=0
f 00 (x)
= f (x) + f 0 (x)(x − x) + (x − x)2 + · · · .
2
Taking only terms n = 0, 1 gives
f (x) ≈ f (x) + f 0 (x)(x − x),
that is, letting y := f (x) denote the value of f at the nominal point x,
y − y ≈ f 0 (x)(x − x).
2
y = f(x)
-2
-4
-6
-8
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
x
We’ll linearize the equation y = f (x) about a nominal point, say x = (1, −1). Let
2
y := f (x) = −1
2
∂f
f (x) = f (x) + (x − x) + higher order terms
∂x x=x
where
∂f
= Jacobian of f evaluated at x
∂x x=x
∂f ∂f
1 1
∂x ∂x2
∂f21 ∂f2
= ∂x 1 ∂x2
∂f3 ∂f3
∂x1 ∂x2 x=x
1 0
= x2 x1
2x1 −1 x=(1,−1)
1 0
= −1 1 .
2 −1
Taking only the lower order terms in this expansion we have that
∂f
f (x) ≈ f (x) + (x − x) .
∂x x=x
In other words
∂f
y−y ≈ (x − x) .
∂x x=x
Defining the perturbations
δx := x − x, δy := y − y
we have the linearized function
δy = Aδx
where
1 0
∂f
A= = −1 1 .
∂x x=x 2 −1
In what sense does this approximate the equation y = f (x) near x = x? The exact equation is
δy = f (x + δx) − f (x)
∂f ∂f
f (x, u) ≈ f (x, u) + δx + δu.
∂x (x,u) ∂u (x,u)
Definition 2.5.1. Consider a system in state-variable form (2.23). A constant pair (x, u) is called an equi-
librium configuration of (2.23) if f (x, u) = (0, 0, . . . , 0). The constant x is called an equilibrium point.
Example 2.5.4. (Equilibria of the Physical Pendulum) Back to the pendulum example. Suppose we turn
off the motor and apply no torque, i.e., we set u = u = 0. Let’s use the definition above to find all corresponding
equilibria. To do this we must solve the equation f (x, u) = 0 for x. In other words, we must solve
x2 = 0
g
−1.5 sin (x1 ) = 0
`
for x1 , x2 . Thus the equilibria (x, u) of the pendulum with u = 0 are given by
kπ
x= , k is an integer.
0
Physically, this means that the pendulum is at equilibrium whenever the angle θ is either 0 (pointed downward)
or π (pointed upward), and the angular velocity θ̇ is zero.
Now suppose that we turn on the motor in such a way that it produces the constant torque u = u 6= 0. The
corresponding equilibria satisfy f (x, u) = 0, i.e.,
x2 = 0
g 3
−1.5 sin (x1 ) + u = 0.
` M `2
This yields the equilibria " #
2u
arcsin M g` + 2πk
x= , k is an integer.
0
If we pick a position x1 ∈ (−π, π] and set u = u = 0.5M g` sin (x1 ), then the state
x1
x=
0
is an equilibrium point of the pendulum. Physically, this means that by imparting a suitable constant torque
to the pendulum one can make the pendulum be at rest at any desired angle x1 . For instance, by imparting
the torque u = u = 0.5M g`, the configuration x1 = π/2, x2 = 0 is an equilibrium of the pendulum. N
Exercise 2.1. Find an equilibrium configuration (x, u) for system from Example 2.5.4 at which its output equals 3π/4.
First, assume there is an equilibrium configuration (x, u) of (2.23), that is, a constant solution x(t) =
x, u(t) = u. Now consider the perturbations from the equilibrium configuration:
δx(t) = x(t) − x, δu(t) = u(t) − u, δx(t), δu(t) small.
We have
ẋ(t) = f (x(t), u(t))
= f (x, u) + Aδx(t) + Bδu(t) + higher order terms
where
∂f ∂f
A := , B := .
∂x (x,u) ∂u (x,u)
Summary
Linearizing ẋ = f (x, u), y = h(x, u): Select, if one exists, an equilibrium configuration (x, u). Compute the
four Jacobians, A, B, C, D, of f and h at the equilibrium point. Then the linearized system is
˙ = Aδx + Bδu,
δx
δy = Cδx + Dδu.
Under mild conditions (sufficient smoothness of f and h), this linearized system is a valid approximation of the
nonlinear one in a sufficiently small neighbourhood of the equilibrium configuration.
Example 2.5.5. (Physical Pendulum) Suppose that we want to control the physical pendulum
ẋ1 = x2
g 3
ẋ2 = −1.5 sin (x1 ) + u
` M `2
y = x1
near its upright position, i.e., ȳ = π. In this example we compute a linear model that approximates the
pendulum near this position. First we find the equilibrium configuration (x, u) corresponding to the desired
output ȳ. Using the results of Example 2.5.4 we get the equilibrium configuration (verify!)
π
(x, u) = ,0 .
0
To get the linearization at (x, u) we have to compute the four matrices A, B, C, D:
∂f 0 1 ∂f 0
A= = , B= =
∂x (x,u) 1.5 g` 0 ∂u (x,u) 3
M `2
∂h ∂h
C= = 1 0 , D= = 0.
∂x (x,u) ∂u (x,u)
2.6 Simulation
Concerning the model
ẋ = f (x, u), y = h(x, u),
simulation involves numerically computing x(t) and y(t) given an initial state x(0) and an input u(t). If the
model is nonlinear, simulation requires an ODE solver, based on, for example, the Runge-Kutta method. Scilab
and MATLAB have ODE solvers and very nice simulation GUIs called, respectively, Scicos and SIMULINK.
Example 2.6.1. Recall the model of the physical pendulum from Example 2.3.3. The MATLAB code below
simulates this model for twenty seconds in the case M = 1, ` = 1, g = 9.8, θ(0) = 0, θ̇(0) = 0 and u(t) = 1(t).
After solving the ODE, the code also plots two figures to visually display the results of the simulation.
Here s is a complex variable. We use L (f ) to denote the Laplace Transform of f . Normally, the integral
converges for some values of s and not for others. That is, there is a region of convergence. It turns out
that the Region of Convergence (R.O.C.) is always an open right half-plane, of the form {s ∈ C : Re (s) > a}.
Within the ROC F (s) has no poles.
The LT exists provided f (t) satisfies two conditions. The first is that it is piecewise continuous on t ≥ 0.
This means that, on any time interval (t1 , t2 ), f (t) has at most a finite number of jumps, and between these
jumps f (t) is continuous. A square wave has this property for example. The second condition is that it is of
exponential order, meaning there exist constants M, c such that |f (t)| ≤ M ect for all t ≥ 0. This means that if
f (t) blows up, at least there is some exponential that blows up faster. For example, exp(t2 ) blows up too fast.
The LT thus maps a class of time-domain functions f (t) into a class of complex-valued functions F (s). The
mapping f (t) 7→ F (s) is linear.
Example 2.7.3. Let’s use linearity to find the LT of the signal in Figure 2.34. We can write f = f1 + f2 ,
where f1 (t) = t is the unit ramp starting at time 0 and f2 the ramp of slope −1 starting at time 1. By linearity,
F (s) = F1 (s) + F2 (s). We compute that
1
F1 (s) = , Re (s) > 0
s2
1
F2 (s) = −e−s , Re (s) > 0.
s2
Thus
1 − e−s
F (s) = , Re (s) > 0.
s2
N
There are tables of LTs. So in practice, if you have F (s), you can get f (t) using a table like Table 2.1. If
where N , D ∈ R[s] are polynomials and the degree of N is strictly less than the degree of D, then we can use
partial fraction expansions and the linearity of the LT to obtain f (t).
One use of the LT is in solving initial-value problems involving linear, constant-coefficient differential equa-
tions. In control engineering we do this by simulation. But let us look briefly at the LT method. We first
observe that if we have the LT pair
f (t) ←→ F (s)
and f is continuously differentiable at t = 0, then
To prove this formula, start with the LT of f˙(t) and integrate by parts:
Z∞ Z∞
−st −st ∞
e f˙(t)dt = e f (t) 0
+s e−st f (t)dt.
0 0
Now s is such that e−st f (t) converges to 0 as t goes to ∞. Thus the right-hand side of the preceding equation
becomes
−f (0) + sF (s).
This proves (2.25).
ẏ − 2y = t, y(0) = 1.
The range of t for the differential equation isn’t stated. Let us first assume that y(t) is continuously differentiable
at t = 0. This implies the differential equation holds at least for −ε < t < ∞ for some positive ε, that is, it
holds for a little time before t = 0. Then we can apply (2.25) to get
1
sY (s) − 1 − 2Y (s) = .
s2
Solving for Y (s) we get
s2 + 1 1 1 5
Y (s) = 2
=− − 2 + .
s (s − 2) 4s 2s 4(s − 2)
Therefore
1 1 5
y(t) = − − t + e2t . (2.26)
4 2 4
Since we used the one-sided LT, which is oblivious to negative time, we can assert that (2.26) holds at least for
t ≥ 0. Note that it satisfies y(0) = 1.
On the other hand, suppose instead that the problem is posed as follows:
ẏ − 2y = t, t > 0; y(0) = 1.
That is, the differential equation holds for positive time and the initial value of y is 1. We aren’t told explicitly
that y(t) is continuously differentiable at t = 0, but we are justified in making that assumption, since any other
solution, for example the one satisfying y(t) = 0 for t < 0, satisfies (2.26) for t ≥ 0.
N
Example 2.7.8. Let us take the same system as in the previous example but modify the forcing term:
ẏ − 2y = 1, y(0) = 1.
We assume y(t) is continuously differentiable at t = 0 and the solution goes like this:
1
sY (s) − 1 − 2Y (s) =
s
s+1 1 3
Y (s) = =− +
s(s − 2) 2s 2(s − 2)
1 3
y(t) = − + e2t , t ≥ 0.
2 2
N
1 1 3 1 7 1
= + −
8s−1 4s+1 8s+3
1 3 7
y(t) = et + e−t − e−3t , t ≥ 0.
8 4 8
The same solution would be arrived at for t > 0 if, instead of assuming y(t) is twice continuously differentiable
at t = 0, we were to allow jumps at t = 0. N
The LT of the product f (t)g(t) of two functions is not equal to F (s)G(s), the product of the two transforms.
Then what operation in the time domain does correspond to multiplication of the transforms? The answer is
convolution. Let f (t), g(t) be defined on t ≥ 0. Define a new function
Zt
h(t) = f (t − τ )g(τ )dτ, t ≥ 0.
0
We say h is the convolution of f and g. Note that another equivalent way of writing h is
Zt
h(t) = f (τ )g(t − τ )dτ, t ≥ 0.
0
Thus
Z∞
H(s) = F (s)e−sτ g(τ )dτ.
0
Properties of Laplace transforms: Let f (t) and g(t) be real-valued functions, continuously differentiable
at t = 0, and let a be a real constant.
(i) L {f + g} = L {f } + L {g}
(ii) L {af } = aL {f }
n o
(iii) L dfdt = sL {f } − f (0)
(iv) L {f ∗ g} = L {f } L {g}
t
(v) L f (τ )dτ = 1s L {f }
R
0
(vi) L {f (t − T )} = e−sT L {f } , T ≥ 0.
then X(jω) is a continuous function of ω. An example is x(t) = e−|t| cos (t). If the absolute value of x(t) is only
square integrable, that is,
Z∞
|x(t)|2 dt < ∞,
−∞
and it has no meaning in the sense of ordinary functions. Likewise, the sinusoidal signal ejω0 t is neither absolutely
integrable nor square integrable. Its FT is defined to be 2πδ(ω − ω0 ).
In general, FTs where either x(t) or X(jω) is not a function (i.e. has an impulse) must be treated with care
to make sure that the result is correct.
Example 2.7.11. Let’s turn to FTs and take the FT of the two signals from Example 2.7.10. The FT of the
unit step is
Z∞
1
UF T (jω) = e−jωt dt = πδ(ω) + .
jω
0
Thus the FT is a distribution having an impulse. Notice that the FT and LT are not equivalent
UF T (jω) 6= ULT (jω).
Indeed, setting s = jω in ULT (s) requires some justification since the imaginary axis is not in the ROC.
For g(t) = e−t 1(t) we have
1
GF T (jω) = .
jω + 1
In this case the FT is a function. Furthermore, the FT and LT are equivalent
GF T (jω) = GLT (jω).
In general, the LT and FT are equivalent when the ROC of the LT includes the imaginary axis. N
ẏ + (sin t)y = u.
Example 2.8.2. (Low Pass Filter) Recall the RC filter from Example 2.3.4
RC ẏ + y = u.
Therefore the TF is
Y (s) 1
= .
U (s) RCs + 1
This transfer function is rational, a ratio of polynomials. N
Exercise 2.2. Re-derive the TF from Example 2.8.2 using the voltage-divider rule and complex impedances.
M ÿ = u − Ky − bẏ.
We get
Y (s) 1
= 2
.
U (s) M s + bs + K
This transfer function also is rational. N
Example 2.8.4. (RLC Circuit) In Example 2.3.5 we derived the governing ODE for an RLC circuit to be
1
−u̇ + Rẏ + Lÿ + y = 0.
C
Apply Laplace transforms with zero initial conditions:
1
−sU (s) + sRY (s) + s2 LY (s) + Y (s) = 0.
C
The resulting TF is
Y (s) Cs
= 2
.
U (s) LCs + RCs + 1
N
Example 2.8.5. (DC Motor) In Remark 2.3.1 we found the simplified model of a DC motor, assuming L ≈ 0,
to be
Kτ Ke Kτ
J θ̈ = − b + θ̇ + v.
R R
If we now define
1 Kτ Ke Kτ
a1 := b+ , b0 := ,
J R JR
then the TF from the voltage v to the shaft angle θ is
Θ(s) b0
= .
V (s) s(s + a1 )
The TF from the voltage v to the shaft velocity ω is
Ω(s) b0
= .
V (s) s + a1
N
Table 2.2 lists other examples of transfer functions.
Table 2.2: Common Transfer Functions.
Rt Ki
Proportional-integral-derivative controller y(t) = Kp u(t) + Ki u(τ )dτ + Kd u̇(t) Kp + s + Kd s
0
Definition 2.8.1. (i) A transfer function G(s) is (real) rational if it is the quotient of two polynomials
bm sm + · · · + b1 s + b0
G(s) =
sn + an−1 sn−1 + · · · + a1 s + a0
where the coefficients ai , bi are real constants. The numbers m, n are the degrees of the numerator and
denominator polynomials. Let R(s) denote the set of rational functions in s ∈ C with coefficients in R.
(iii) A rational transfer function is strictly proper if n > m. This is equivalent to the condition
lim G(s) = 0.
s→∞
s+1 (s + 1)(s − 1)
,
s(s + 2) s(s + 2)(s − 1)
represent the same rational function. In the first function the numerator and denominator polynomials are
coprime8 while in the second function these polynomials are not coprime. They represent the same rational
5
function in the same way that the expressions 10 and 12 represent the same rational number.
lim |G(s)| = ∞.
s→p
lim G(s) = 0.
s→z
If G(s) is rational and proper and if its numerator and denominator polynomials are coprime, then the roots
of the denominator are the poles of G(s) and the roots of the numerator are the zeros of G(s). For example the
functions
s+1 (s + 1)(s − 1)
,
s(s + 2) s(s + 2)(s − 1)
have poles at s = 0 and s = −2 and zeros at9 s = −1. In the second expression, s = 1 is a root of the
denominator but isn’t a pole since the numerator and denominator aren’t coprime.
Remark 2.8.3. The transfer function obtained from a state model is always real rational and proper. We can
see this if we write (sI − A)−1 using Cramer’s rule as
1
(sI − A)−1 = adj (sI − A)
det (sI − A)
where adj (·) is the classical adjoint of a matrix. The (i, j) entry of adj (sI − A) is (−1)i+j times the determinant
of the matrix obtained from (sI − A) by eliminating its jth row and ith column. The determinant det (sI − A)
is an element of R[s] with degree n. The adjoint is formed by cofactors of the elements of the matrix. Therefore
adj (sI − A) is a matrix whose entries are elements of R[s]; each of which has degree strictly less than n.
Therefore (sI − A)−1 is a matrix in which each entry is a strictly proper element of R(s). It follows that
G(s) = C(sI − A)−1 B + D ∈ R(s) is proper.
Exercise 2.3. Use Cramer’s rule to show that the TF associated with a state-space model can also be computed using
sI − A B
det
Y (s) −C D
= .
U (s) det (sI − A)
This construction naturally leads to the converse question known as the realization problem: Given G(s),
find A, B, C, D such that
G(s) = C(sI − A)−1 B + D.
A solution exists if and only if G(s) is rational and proper. The solution is never unique.
Summary
Let us recap our procedure for getting the transfer function of a system:
1. Apply the laws of physics or first principles to get differential equations governing the behaviour of the
system. Put these equations in state form. In general these are nonlinear.
2. Find an equilibrium, if there is one. If there is more than one equilibrium, you have to select one. If there
isn’t even one, this method doesn’t apply.
4. Take Laplace transform of the linearized system with zero initial state.
In general G(s) is a matrix. In the SISO case, G(s) is a scalar-valued transfer function.
Example 2.8.6. (TF of the Linearized Pendulum) In Example 2.5.1 we found the nonlinear state model
of a physical pendulum (step 1). In Example 2.5.5 we found the pendulum’s equilibrium configuration corre-
sponding to being upright (step 2). In Example 2.5.5 we also linearized about the equilibrium configuration to
obtain a LTI state model (step 3)
˙ 0 1 0
δx = δx + δu
1.5 g` 0 3
M `2
δy = 1 0 δx.
Series
Consider a system that is the cascade connection of systems with transfer functions G1 (s) and G2 (s), as
shown in Figure 2.36. Let V (s) denote the LT of the signal between the blocks. Then
V (s) = G1 (s)U (s), Y (s) = G2 (s)V (s) =⇒ Y (s) = G2 (s)G1 (s)U (s).
The transfer function of the series connection is thus G(s) = G2 (s)G1 (s). The order of the individual transfer
functions is due to the fact that we place the input signal on the right-hand side of this expression, hence we
first multiply by G1 and then by G2 . Unfortunately, this has the opposite ordering from the diagrams that
we use, where we typically have the signal flow from left to right, so one needs to be careful. The ordering is
important if either G1 or G2 is a vector-valued transfer function. If G1 (s) and G2 (s) are scalar TFs, then the
order doesn’t matter.
Parallel
Consider a system that is the parallel connection of systems with transfer functions G1 (s) and G2 (s), as shown
in Figure 2.37. Let V1 (s) denote the LT of the output of the top branch and let V2 (s) denote the LT of the
output of the bottom branch. Then we have
V1 (s) = G1 (s)U (s), V2 (s) = G2 (s)U (s) =⇒ Y (s) = V1 (s) + V2 (s) = (G1 (s) + G2 (s))U (s)
and the transfer function for a parallel connection is G(s) = G1 (s) + G2 (s).
Negative feedback
Consider the negative feedback connection of systems with transfer functions G1 (s) and G2 (s), as shown in
Figure 2.38. We have
E(s) = U (s) − G2 (s)Y (s), Y (s) = G1 (s)E(s) =⇒ Y (s) = G1 (s) (U (s) − G2 (s)Y (s))
=⇒ (1 + G1 (s)G2 (s)) Y (s) = G1 (s)U (s)
G1 (s)
=⇒ Y (s) = U (s).
1 + G1 (s)G2 (s)
Thus the transfer function for a negative feedback connection is G(s) = G1 (s)/(1 + G1 (s)G2 (s)). These three
basic interconnections can be used as the basis for computing transfer functions for more complicated systems.
Example 2.9.1. (Proportional error feedback for a first order plant) Consider the block diagram in
Figure 2.39. This is a negative feedback interconnection in which the TF G1 (s) is the series connection of Kp
and K/(τ s + 1) and G2 (s) = 1. Therefore the TF from r to y is
K
Y (s) Kp τ s+1 Kp K
= K
= .
R(s) 1 + Kp τ s+1 τ s + 1 + Kp K
This TF has a pole at s = (−1 − Kp K)/τ and therefore, by picking the proportional gain Kp appropriately, we
can place the pole anywhere along the real axis. N
Figure 2.40: Changing the order of summing junctions and transfer functions.
Example 2.9.2. Find the transfer function from U (s) to Y (s) for the system in Figure 2.41. Our approach is
to move blocks around until common configurations are revealed. We start by moving the input to G1 (s) past
the block G2 (s). This yields the system in Figure 2.42. The feedback portion in Figure 2.42 has TF
G2
.
1 + G2 G3
The series portion has TF G1 /G2 . Therefore the parallel portion has TF
G1
1+ .
G2
Example 2.9.3. We re-do Example 2.9.2 using the above procedure. Consider the system in Figure 2.41.
1. Let v1 be the output of left-most summing junction. We don’t need a variable for the summing junction
on the right since it is y.
2. The inputs to the left-most summing junction are u and G2 G3 v1 . The inputs to the right-most summing
junction are G1 v1 and G2 v1 .
3. The equations are
v 1 = u − G2 G3 v 1
y = G 1 v1 + G 2 v1 .
Or, in matrix notation,
1 + G2 G 3 0 v1 u
= .
G1 + G2 −1 y 0
4. We can solve for y easily since this is such a small problem but I’ll use Cramer’s rule since it scales better
to larger problems. We have
1 + G2 G 3 u
det
G 1 + G2 0 −G1 − G2 G1 + G2
Y (s) = = U (s) = U (s).
1 + G2 G3 0 −1 − G G
2 3 1 + G2 G3
det
G1 + G2 −1
Example 2.9.4. (2019 Midterm) Find the transfer function from r to y for the system shown in Figure 2.43.
1. Label, from left to right, the outputs of the summing junctions as v1 , v2 and v3 .
2. Working from left to right, the inputs to the left-most summing junction are r and y. The inputs to the
next summing junction are v1 and G2 v3 . The inputs to the next summing junction are G1 v2 and y. The
inputs to the right-most summing junction are G4 v2 and G3 G2 v3 .
4. In principle we can now solve for y using Cramer’s rule except that no one likes finding the determinant
of a 4 × 4 matrix by hand. To make the problem tractable for hand calculations, let’s make some simple
substitutions in (2.27). Substitute the v1 expression into v2
v 2 = r − y − G2 v 3 .
v3 = G1 (r − y − G2 v3 ) − y
y = G4 (r − y − G2 v3 ) + G3 G2 v3 .
In matrix notation
1 + G1 G2 1 + G1 v3 G1 r
=
G 4 G2 − G3 G 2 1 + G 4 y G4 r
2.10 Summary
In this chapter we introduced the very important topic of modelling. The key things you should know after
reading this chapter are as follows.
1. The usefulness of mathematical models and the key role they play in all branches of engineering. We
presented various examples showing that there are different types of models (ODEs, PDEs, discrete-time).
2. No model is perfect.
3. If you can’t draw the block diagram of a system, then you don’t understand the system very well.
4. The basic building blocks of linear models for mechanical and electrical systems were introduced in
Section 2.3. You should be comfortable modelling (deriving the governing ODEs) simple linear systems
including those with electrical and mechanical subsystems.
5. In Section 2.4 we introduced state models which provide a standard way of expressing mathematical
models. You should know what the state of a system is and how to convert an ODE model into a state
model. You should know the difference between a nonlinear state model and a linear state model.
6. We learned how to linearize nonlinear state models in Section 2.5. You must be able to find equilibrium
configurations of nonlinear state models and then find the system’s linear state space approximation.
7. You must know the basic properties of a Laplace transform and be comfortable going from the time
domain to the s-domain and vice versa.
8. Section 2.8 is very important because most of the systems we study hereafter are modelled by transfer
functions. You should know what a rational transfer function is, what poles and zeros are, and what it
means for a TF to be proper. You should be able to obtain a TF model for a nonlinear state model near
an equilibrium configuration and you must be able to convert an LTI state model into a TF model.
9. You should understand why TF models are also called input-output models.
10. You should be able to reduce complex block diagrams into simpler forms using the basic rules in Section 2.9.
f :X→Y
means that f is a function from X to Y . We typically write y = f (x) for a function. To repeat, for each x
there must be one and only one y such that y = f (x); y1 = f (x) and y2 = f (x) with y1 6= y2 is not allowed.
Let f be a function R → R. This means that f takes a real variable x and assigns a real variable y, written
y = f (x). So f has a graph in the (x, y) plane. To say that f is linear means the graph is a straight line through
the origin; there’s only one straight line that is not allowed—the y-axis. Thus y = ax defines a linear function
for any real constant a; the equation defining the y-axis is x = 0. The function y = 2x + 1 is not linear—its
graph is a straight line, but not through the origin.
In your linear algebra course you were taught that a linear function is a function f from a vector space X
to another (or the same) vector space Y having the property
for all vectors x1 , x2 in X and all real numbers11 a1 , a2 . If the vector spaces are X = Rn , Y = Rm , and if f is
linear, then it has the form f (x) = Ax, where A is an m × n matrix. Conversely, every function of this form is
linear.
This concept extends beyond vectors to signals. For example, consider a capacitor, whose constitutive law
is
dv
i=C .
dt
Here, i and v are not constants, or vectors—they are functions of time. If we think of the current i as a function
of the voltage v, then the function is linear. This is because
Zt
1
v(t) = i(τ )dτ.
C
0
You know this as the “sifting formula.” Let us emphasize that the expression
Z∞
φ(t)δ(t)dt (2.28)
−∞
is not intended to mean integration of the product φ(t)δ(t) of functions—δ isn’t a function; rather, the expression
is that of an operation on φ whose value is defined to be φ(0). The expression is defined to be valid for all
functions φ(t) that are smooth at t = 0; smooth means continuously differentiable up to every order.
Needless to say, we have to be careful with δ; for example, there’s no way to make sense of δ 2 because the
expression (2.28) is not valid for φ = δ, again, because δ isn’t a function, let alone a smooth one. Because the
unit step is not smooth at t = 0, 1(t)δ(t) is undefined too. However, (2.28) does apply for φ(t) = e−st , because
it is smooth:
Z∞
e−st δ(t)dt = 1.
−∞
ẏ + 2y = δ,
or worse,
ẏ + 2y = δ̇,
require more advanced theory, because y(t) cannot be continuously differentiable at t = 0. Instead of pursuing
this direction, since initial-value problems are of minor concern in control we turn instead to convolution
equations.
As you learned in signals and systems, linear time-invariant systems are modelled in the time domain by a
convolution equation:
Z∞
y(t) = g(t − τ )u(τ )dτ.
−∞
If g(t) is a smooth function for all t, then expression (2.28) applies and we get
Z∞
g(t) = g(t − τ )δ(τ )dτ.
−∞
Thus g(t) equals the output when the input is the unit impulse. We call g(t) the impulse-response function,
or the impulse response. The case where g itself equals δ isn’t covered by what has been said so far, but
distribution theory can be used to justify δ ∗ δ = δ.
In general, if G(s) is strictly proper, then g(t) is a regular function. If G(s) is proper but not strictly proper,
then g(t) contains an impulse.
As a final comment, some texts (Dorf and Bishop [Dorf and Bishop, 2011]) give the LT pair
indicating that f (0) and f (0− ) may be different, that is, f (t) may be discontinuous at t = 0. If that is the case,
then f˙ has an impulse and distribution theory needs to be invoked. For more details see [Lundberg et al., 2007].
2.B.1 Summary
Rigorously speaking, the impulse is not a function. Instead, it is defined only indirectly via the sifting formula.
However, in the subject of control systems, and other signals and systems subjects, the impulse is used just as
though it were a function. Usually no harm is done, i.e., you get the right answer. But sometimes questions
arise that require a rigorous way to answer them; distribution theory is that way. For example, the derivative
of the impulse, δ̇(t), can be defined rigorously, and its LT is s. In this way we can obtain the impulse response
of the differentiator y = u̇—it is g(t) = δ̇(t). The transfer function is G(s) = s.
In the preceding chapter we saw nonlinear state models and how to linearize them about an equilibrium point.
A linearized system has the form (dropping the δ notation)
ẋ = Ax + Bu
y = Cx + Du.
Contents
3.1 Initial-state response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.2 Input-response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.3 Total response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.4 Stability of state-space models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.5 Bounded-input bounded-output stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.6 Steady-state gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.7 Frequency response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.8 Graphical representations of the frequency response . . . . . . . . . . . . . . . . . . . . . . . . . 76
3.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
3.A Appendix: Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
3.B Appendix: Time domain, s-domain and frequency domain . . . . . . . . . . . . . . . . . . . . . . 91
60
61 CHAPTER 3. LINEAR SYSTEM THEORY
It can be proved that the matrix exponential converges for every matrix A. If A is n × n then eA is too; if
A is not square, then eA is undefined.
Example 3.1.1.
0 0 A 1 0
A= , e = .
0 0 0 1
Notice that eA is not obtained by taking the exponent of each element of A. N
e3 0
3 0 A
A= , e = .
0 1 0 e
When A is a diagonal matrix then eA is obtained by taking the exponent of each diagonal element of A. N
1. etA t=0
=I (identity matrix).
2. et1 A et2 A = eA(t1 +t2 ) . Note that etA1 etA2 6= et(A1 +A2 ) . Equality holds if and only if A1 and A2 commute,
i.e., A1 A2 = A2 A1 .
−1 −1
3. eA = e−A which implies that eAt = e−At .
This fact can be used to compute eAt by hand for small problems (n ≤ 3).
Example 3.1.4. Calculate etA for the matrix
0 1
A= .
−2 −3
n o
From above we know that etA = L −1 (sI − A)−1 . We proceed to perform the necessary calculations:
s −1
sI − A = ,
2 s+3
Find the inverse Laplace transform of each entry in (sI − A)−1 to obtain
Exercise 3.2. Compute eAt using the Laplace transform for the A matrix in Exercise 3.1.
Another way to compute eAt is by using eigenvalues and eigenvectors. We won’t cover the general theory
and instead present an example.
2
Here X(s) = L (x) is the component wise LT of the vector x. That is, if x(t) = (x1 (t), . . . , xn (t)) then X(s) = (X1 (s), . . . , Xn (s))
Example 3.1.5.
0 1
A= .
−2 −3
The MATLAB command [V, D] = eigs(A) produces
1 −1 −1 0
V = , D= .
−1 2 0 −2
The eigenvalues of A are the diagonal elements of D. The columns of V are the corresponding eigenvectors.
So, for example,
1 1
A = −1 .
−1 −1
It follows that AV = V D (verify this) and therefore that eAt V = V eDt (prove this). The nice thing about eDt
is that it is easy to compute since D is a diagonal matrix (cf. Example 3.1.2). In this case
−t
Dt e 0
e = .
0 e−2t
Then
e−t 2e−t − e−2t e−t − e−2t
At Dt −1 1 −1 0 2 1
e =Ve V = = .
−1 2 0 e−2t 1 1 −t
−2e + 2e −2t −e−t + 2e−2t
N
The approach in Example 3.1.5 works when A has n linearly independent eigenvectors so that V is invertible.
Otherwise the theory is more complicated and requires the Jordan form of the matrix A.
Remark 3.1.3. Examples 3.1.4 and 3.1.2 present two different methods of computing the function eAt . For
large problems, both methods are tedious to apply by hand. Programs like MATLAB, Mathematica and Maple
can do these calculations. The command in MATLAB is expm.
3.2 Input-response
Now set the initial state to zero and consider the response from the input:
We can use the properties of the matrix exponential to solve this equation. Here’s a derivation of the solu-
tion [Chen, 1999]. Write
ẋ − Ax = Bu.
Multiply by e−tA :
e−tA ẋ − Ae−tA x = e−tA Bu.
d
e−tA x(t) . Thus
The left-hand side equals dt
d −tA
x(t) = e−tA Bu.
e
dt
Integrate from t = 0 to t:
Zt
−tA
e x(t) − x(0) = e−τ A Bu(τ )dτ.
|{z}
=0 0
Multiply by etA
Zt
x(t) = e(t−τ )A Bu(τ )dτ. (3.2)
0
This is the solution of (3.1). It gives the value of the state and at time t as a function of u(τ ), 0 ≤ τ ≤ t when
the initial state equals zero. Substituting the solution into the output equation leads to
Zt
y(t) = CeA(t−τ ) Bu(τ )dτ + Du(t). (3.3)
0
where 1(t) denotes the unit step. We conclude that the impulse response of the system is
y(t) = (g ∗ u)(t).
According to the development in this section, this system’s input-response is given by the integral (convolution)
equation (3.3) which for this example is
Zt
y(t) = 8e−3(t−τ ) u(τ )dτ.
0
Zt
y(t) = 8 e−3(t−τ ) dτ
0
Zt
−3t
= 8e e3τ dτ
0
8
= e−3t e3t − 1
3
8
1 − e−3t .
=
3
N
ẋ = Ax + Bu, x(0) = x0 .
The system is linear in the sense that the state at time t equals the initial-state-response at time t plus the
input-response at time t
Zt
x(t) = e x0 + eA(t−τ ) Bu(τ )dτ.
At
0
Similarly, the output is
Zt
At
y(t) = Ce x0 + CeA(t−τ ) Bu(τ )dτ + Du(t).
0
These two equations constitute a solution in the time domain.
Summary
We began with an LTI system modelled by a differential equation in state form:
ẋ = Ax + Bu, x(0) = x0
y = Cx + Du.
Zt
At
x(t) = e x0 + eA(t−τ ) Bu(τ )dτ
0
(3.5)
Zt
y(t) = CeAt x0 + CeA(t−τ ) Bu(τ )dτ + Du(t).
0
These are integral (convolution) equations giving x(t) and y(t) explicitly in terms of x0 and u(τ ), 0 ≤ τ ≤ t.
In the SISO case, if x0 = 0 then
Zt
y = g ∗ u = g(t − τ )u(τ )dτ
0
Example 3.3.1. (Mass-Spring) We illustrate these calculations in an example. We stress that normally time
domain solutions are obtained through simulations. These calculations are useful for gaining intuition about
the structure of the solution (3.5) and especially for understanding the stability arguments in the next section.
Recall the mass-spring-damper system of Example 2.1.1 with linear damping
M q̈ + bq̇ + kq = u.
ẋ1 = x2
ẋ2 = −4x1 + u
where (x1 , x2 ) := (q, q̇). We are interested in the solution to this system when u(t) = 1(t) and x1 (0), x2 (0) are
arbitrary. We compute
( −1 ) s 1
cos (2t) 12 sin (2t)
−1 −1 −1 s −1 −1
e =L
At
=L =L
2 +4 2 +4
s s
(sI − A) = .
4 s − s24+4 s2s+4 −2 sin (2t) cos (2t)
Figure 3.1 shows simulation results for this system when x1 (0) = 0 and x2 (0) = 0. Figure 3.1a is a plot of
(x1 (t), x2 (t)) as they evolve in the plane. It is called a phase plot and the curve is called a phase curve.
Figure 3.1b plots x1 and x2 versus time. If we are interested in controlling the position of the mass then we
0.5
x 1(t)
x 2(t)
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
0
x 2 (t)
-0.1
-0.1
-0.2 -0.2
-0.3 -0.3
-0.4
-0.4
-0.5
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 -0.5
x 1 (t) 0 2 4 6 8 10 12 14 16 18 20
(a) Phase curve. (b) Position (x1 , black) & velocity (x2 , grey) vs. time.
Figure 3.1: Time domain response of a mass-spring system with zero initial conditions and unit step input.
take x1 as the system output while if we were interested in velocity control we take x2 as the output. N
ẋ = Ax (3.6)
Definition 3.4.1. System (3.6) is asymptotically stable if x(t) → 0 as t → ∞ for every initial condition
x(0).
As we saw before, the trajectory of (3.6) is specified by x(t) = eAt x(0). So asymptotic stability is equivalent
to the condition that eAt → 0 as t → ∞.
Example 3.4.1. Recall the matrix eAt for the mass-spring system from Example 3.3.1
cos (2t) 21 sin (2t)
At
e = .
−2 sin (2t) cos (2t)
Since eAt does not approach zero as t → ∞ this system is not asymptotically stable. Physically this corresponds
to the mass oscillating back and forth indefinitely if it is initialized with a non-zero initial position or velocity
and no applied force. Our intuition suggests that friction should prevent such a phenomenon. Indeed, if we set
b = 1 so that there is a damper to model friction, then (cf. Example 3.3.1)
0 1
A=
−4 −1
and t √ √ √ √ √
e− 2
15 cos ( 15t/2) + √15 sin (√15t/2) 2√15 sin (√15t/2)
eAt = √ .
15 −8 15 sin ( 15t/2) 15 cos ( 15t/2) − 15 sin ( 15t/2)
In this case eAt → 0 as t → ∞ and the system is asymptotically stable. This is consistent with our physical
intuition that friction should cause energy loss in the system eventually resulting in the mass returning to its
rest position. N
Fortunately, we do not need to compute eAt to determine whether or not (3.6) is asymptotically stable.
Asymptotic stability only depends on the eigenvalues of A.
Proposition 3.4.2. eAt → 0 as t → ∞ if, and only if, every eigenvalue of A has negative real part.
Proof. If A has n linearly independent eigenvectors, then it can be diagonalized by a similarity transformation,
so that
eAt = V eDt V −1 .
Then
eAt → 0 ⇐⇒ eDt → 0
⇐⇒ eλi t → 0, ∀i
⇐⇒ Re λi < 0, ∀i.
The proof in the general case is more complicated but not more enlightening.
Example 3.4.2. Re-visiting the systems from Example 3.4.1, when there is no damping
0 1
A=
−4 0
and the eigenvalues of A are found by solving det (sI − A) = 0 to yield s = ±j2. The eigenvalues have zero
real part and therefore by Proposition 3.4.2 the system is not asymptotically stable.
When there is friction
0 1
A=
−4 −1
√
and the eigenvalues are − 12 1 ± j 15 . By Proposition 3.4.2 the system is asymptotically stable. These
Definition 3.5.1. Let u(t) be a real-valued signal defined for t ≥ 0. We say u is bounded if there exists a
constant b such that, for all t ≥ 0, |u(t)| ≤ b.
Familiar bounded signals are steps u(t) = 1(t) and sinusoids u(t) = sin (t), but not ramps u(t) = t nor the
exponential u(t) = et . The least upper bound of a signal u is denoted kuk∞ . You can think of3 kuk∞ as
maxt≥0 |u(t)|.
Definition 3.5.2. A linear time-invariant system with input u and output y is Bounded-Input Bounded-
Output (B.I.B.O.) stable if every bounded input u produces a bounded output y, i.e.,
Then
y(t) = (g ∗ u)(t)
Zt
= e−2τ u(t − τ )dτ.
0
3
To be more precise, kuk∞ := supt≥0 |u(t)| where sup is the supremum.
This implies
Zt
|y(t)| = e−2τ u(t − τ )dτ
0
Zt
≤ e−2τ u(t − τ ) dτ
0
Zt
= e−2τ |u(t − τ )| dτ
0
Zt
≤ e−2τ dτ kuk∞
0
1
≤ kuk∞ .
2
In other words
1
kyk∞ ≤ kuk∞
2
which means that every bounded u produces a bounded y. N
Then
y(t) = (g ∗ u)(t)
Zt
= e2τ u(t − τ )dτ.
0
u(t) = −2 + 3e−t , t ≥ 0,
Fortunately, we do not need to compute convolution integrals to determine if a system is BIBO stable.
BIBO stability only depends on the poles of G(s).
Theorem 3.5.4. Assume G(s) is strictly proper, rational. Then the following three statements are equivalent:
1. The system is BIBO stable.
R∞
2. The impulse-response function g(t) is absolutely integrable, i.e., |g(t)|dt < ∞.
0
3. Every pole of the transfer function G(s) has negative real part.
Example 3.5.3. (Low Pass Filter) Consider the RC filter from Example 2.8.2
1 1 −t/RC
G(s) = , g(t) = e 1(t).
RCs + 1 RC
1
The transfer function G(s) has one pole at s = − RC . Since R is a resistance and C is a capacitance, they are
both positive and so the pole has negative real part. According to the theorem, we expect that every bounded
u produces a bounded y. Let’s see
Zt
|y(t)| = g(τ )u(t − τ )dτ
0
Zt
≤ |g(τ )||u(t − τ )|dτ
0
Zt
≤ |g(τ )|dτ kuk∞
0
Z∞
≤ |g(τ )|dτ kuk∞
0
Z∞
1 −τ /RC
= e dτ kuk∞
RC
0
= kuk∞ .
Thus kyk∞ ≤ kuk∞ which confirms, as expected, that every bounded input produces a bounded output. N
The theorem can be extended to the case where G(s) ∈ R(s) is only proper (and not strictly proper). Then
write
G(s) = G1 (s) + c, G1 (s) strictly proper, c ∈ R.
Theorem 3.5.5. If G(s) ∈ R(s) is improper, then G(s) is not BIBO stable.
where G1 (s) ∈ R(s) is strictly proper and G2 (s) ∈ R[s] has degree at least 1. For any input u the output y is,
by linearity, y = y1 + y2 where
If G1 (s) has poles with non-negative real parts, then the result follows from Theorem 3.5.4. So let’s assume
G1 (s) has all its poles in C− and consider the bounded input u(t) = sin (t2 ). Since G1 has all poles in C− , the
signal y1 is bounded. We’ll now show that y2 is not bounded. Any derivative of u will involve terms polynomial
in t and such terms will not be bounded as t → ∞. But y2 is a linear combination of u and its derivatives so
the result follows.
Theorem 3.5.5 shows that the differentiator system G(s) = s is not BIBO stable.
ẋ = Ax + Bu
y = Cx + Du.
or
Y (s)/U (s) = G(s)
= C (sI − A)−1 B + D
1
= C adj (sI − A)B + D.
det (sI − A)
From the last expression we see that the poles of G(s) are contained in the eigenvalues of A. Thus
Usually the poles of G(s) are identical to the eigenvalues of A, that is, the two polynomials
have no common roots, i.e., they’re coprime. In these cases, the two stability concepts are equivalent.
Example 3.5.5. (Mass-Spring) The A matrix for the mass-spring system from Example 3.3.1 was
0 1
A= .
−4 0
det (sI − A) = s2 + 4 = 0
to get s = ±j2. By Proposition 3.4.2 this system is not asymptotically stable. The system’s transfer function
is given by G(s) = C(sI − A)−1 B + D. The matrices C, D depend on what we want to chose as the output. If
we take the position of the mass as the output then
s 1
s 2 +4 s 2 +4 0 1
G(s) = 1 0 = 2 .
− s24+4 s2s+4 1 s +4
By Theorem 3.5.4 the system is not BIBO stable. In this case the two notions of stability are equivalent because
the polynomials
det(sI − A) = s2 + 4
and
s 1 0
C adj (sI − A)B + D det (sI − A) = 1 0 =1
−4 s 1
are coprime. N
Example 3.5.6. Consider the parallel interconnection in Figure 3.2. If we take the state vector to be x =
By Theorem 3.5.4 the system is BIBO stable. In this case the two notions of stability are not equivalent because
the polynomials
det(sI − A) = (s − 1)2
and
s−1 0 1
− (s − 1)2 = 1
C adj (sI − A)B + D det (sI − A) = 1 −1
0 s−1 1
have roots in common. N
Exercise 3.3. Show that the two notions of stability presented are not equivalent for the system
ẋ1 0 1 x1 0
= + u
ẋ2 1 0 x2 1
x1
y = 1 −1 .
x2
In the last deduction we used the definition of the Laplace Transform (2.24) with s = 0. We are allowed to
make the substitution s = 0 in (2.24) because G(s) is BIBO stable which means, by Theorem 3.5.4, that all its
poles are to the left of the imaginary axis and hence s = 0 is in the region of convergence of (2.24).
Definition 3.6.3. Let G(s) be a BIBO stable transfer function and let u(t) = b1(t), b a real constant. The
steady-state gain of G(s) is
yss
= G(0).
b
Figure 3.3: Steady-state output of a BIBO stable LTI system excited by a sinusoidal input.
To understand the above fact, consider a single-input, single-output LTI system. It will then be modelled
by
y =g∗u or Y (s) = G(s)U (s).
Let us assume G(s) is rational, proper, and has all its poles in C− . Then the system is BIBO stable by
Theorem 3.5.4. The first fact we want to see is this: Complex exponentials are eigenfunctions4 .
Proof.
Z∞
jωt
u(t) = e , yss = g(t − τ )u(τ )dτ.
−∞
Notice that the convolution integral used in this proof goes from t = −∞ to t = +∞. That is, the input was
applied starting at t = −∞. If the time of application of the sinusoid is t = 0, there is a transient component
in y(t) too. Taking the limits as above removes the transient terms. Continuing we have
Z∞
yss = g(τ )ejω(t−τ ) dτ
−∞
Z∞
= g(τ )ejωt e−jωτ dτ
−∞
Z∞
Thus, if the input is the complex sinusoid ejωt , then the steady-state output is the complex sinusoid
By the above analysis and linearity of the system, the steady-state output is6
1 1
y(t) = G(jω)ejωt + G(−jω)e−jωt
2 2
jωt
= Re G(jω)e .
Theorem 3.7.1. Assume G(s) is rational, proper, and has all its poles in C− . Then the steady-state response
to the input u(t) = aejωt is
y(t) = aG(jω)ejωt . (3.9)
In particular
Therefore the response of a BIBO stable LTI system to a continuous-time sinusoid input of frequency ω is
also a continuous-time sinusoid of the same frequency. The amplitude of the output sinusoid is |G(jω)| times
the input amplitude, and the phase of the output is shifted by ]G(jω) with respect to the input phase. This
justifies the picture in Figure 3.3 and leads to the following definition.
Definition 3.7.2. Assume G(s) is rational, proper, and has all its poles in C− .
Hence, the frequency response of a BIBO stable continuous-time LTI system G(s) is determined by setting
s = jω and varying ω. Here’s the important point: Under the stated assumptions about the system (G(s)
is rational, proper, and all poles in C− ), the region of convergence of the Laplace transform includes the
imaginary axis. Therefore it is legitimate to set s = jω in G(s) to get G(jω), which, by the way, equals the
Fourier transform of the impulse response g(t).
6
Here we are using the fact that if G(s) ∈ R(s), then G(−jω) = G(jω). See Remark 3.8.1.
1 w = −100:0.01:100;
2 s = 1i.*w;
3 G = −10./(s+10);
4 plot(w, abs(G), 'LineWidth', 2); grid on;
5 figure; plot(w, rad2deg(angle(G)), 'LineWidth', 2); grid on;
200
0.9
150
0.8
0.7
100
0.6
50
0.5
0.4
-50
0.3
-100
0.2
-150
0.1
0 -200
-100 -80 -60 -40 -20 0 20 40 60 8 00 -100 -80 -60 -40 -20 0 20 40 60 80 100
Figure 3.4: A plot of the magnitude and phase response for Example 3.8.1.
N
Remark 3.8.1. From now on, when we graphically represent the functions from Definition 3.7.2 we will only
consider non-negative values of ω. One may think that we are losing information by not considering negative
values of frequency. This is not the case because when G(s) ∈ R(s) (real rational)7 , then its magnitude is
symmetric about ω = 0, i.e., |G(jω)| = |G(−jω)| and its phase is anti-symmetric about ω = 0, i.e., ](G(jω)) =
−](G(−jω)). See Figure 3.4.
Pure gain
Consider G(s) = K. Then G(jω) = K and the frequency response is constant. Figure 3.5 shows the polar
plots.
Real zero
Consider G(s) = τ s ± 1 with τ > 0. For τ s + 1 the zero is located at s = − τ1 and lies in C− . For τ s − 1 the
zero is located at s = τ1 and lies in C+ . The frequency response is G(jω) = jτ ω ± 1. Figure 3.7 shows the polar
plots for both cases.
(a) jτ ω − 1. (b) jτ ω + 1.
Figure 3.8: Polar plot of frequency response for G(s) = s2 + ωn2 , purely imaginary roots.
s2
ζ
G(s) = ωn2 +2 s+1 , ζ ∈ (0, 1), ωn > 0.
ωn2 ωn
In this case
ω2
ζ
G(jω) = ωn2 1 − 2 + j2 ω .
ωn ωn
The polar plot of G(jω) is shown in Figure 3.9a. The last sub-case is when G(s) has complex conjugate roots
in C+ 2
2 s ζ
G(s) = ωn − 2 s + 1 , ζ ∈ (0, 1), ωn > 0
ωn2 ωn
for which
ω2
ζ
G(jω) = ωn2 1 − 2 − j2 ω .
ωn ωn
The polar plot of G(jω) is shown in Figure 3.9b. Note that when making a polar plot, the thing one loses is
Figure 3.9: Polar plot of frequency response for G(s) = s2 ± 2ζωn s + ωn2 for ζ ∈ (0, 1), ωn > 0.
frequency information. That is, one can no longer read from the plot the frequency at which, say, the magnitude
of the frequency response is maximum.
Example 3.8.2. (Non-Minimum Phase) Consider the two rational transfer functions
1+s 1−s
G1 (s) = , G2 (s) = .
s2 +s+1 s2 +s+1
√
On the one hand, both transfer functions are BIBO stable since they both have poles at s = − 12 1 ± 3 ∈ C− .
On the other hand, G1 (s) has a zero at s = −1 ∈ C− while G2 (s) has a zero at s = 1 ∈ C+ . For reasons that
will become apparent shortly, systems with zeros in C− are called minimum phase while systems with zeros
in C+ are called non-minimum phase. The polar plots of their frequency responses
1 + jω 1 − jω
G1 (jω) = , G2 (jω) =
−ω 2 + jω + 1 −ω 2 + jω + 1
are shown in Figure 3.10. As the names suggest, the minimum phase system undergoes a smaller phase change
as we move along its parameterized polar curve. N
0.4
0.2
0
-0.2
-0.2
-0.4
-0.4
-0.6
-0.6
-0.8
-0.8 -1
-1.2
-1
-1.4
-1.2 -1.6
0 0.2 0.4 0.6 0.8 1 1.2 1.4 -1.5 -1 -0.5 0 0.5 1
Figure 3.10: Polar plots of minimum and non-minimum phase transfer functions in Example 3.8.2.
Definition 3.8.2. A rational, proper transfer function is minimum phase if all its zeros have Re (s) ≤ 0.
The transfer function is non-minimum phase if it is not minimum phase.
Example 3.8.3. (RLC Circuit) In this example we’ll use software to create the Bode plot of the RLC circuit
-20
-25
-30
-35
Magnitude (dB)
-40
-45
-50
-55
-60
-65
-70
90
45
Phase (deg)
-45
-90
10 -3 10 -2 10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
from Example 2.3.5. Later we’ll discuss how to sketch them by hand. The governing equation for the circuit is
1
−u̇ + Rẏ + Lÿ + y = 0.
C
The TF of this system is (verify)
Y (s) s
= G(s) = 1
U (s) Ls2 + Rs + C
and the frequency response is
jω
G(jω) = 1 .
−jLω 2 + jRω + C
Figure 3.11 shows the Bode plot for this system and was generated using the following script in MATLAB
1 s = tf('s');
2 R =10; L = 1; C = 1;
3 G = s/(L*sˆ2 + R*s + 1/C);
4 bode(G);
5 grid on;
Example 3.8.4. (Low Pass Filter) Recall the TF of the so-called low pass RC filter from Example 2.8.2
0
-5
-10
Magnitude (dB)
-15
-20
-25
-30
-35
-40
0
-30
Phase (deg)
-60
-90
2 3 4 5 6
10 10 10 10 10
Frequency (rad/s)
Y (s) 1
= G(s) = .
U (s) RCs + 1
The associated frequency response is
1
.
G(jω) =
jRCω + 1
Figure 3.12 shows the Bode plot for this system with RC = 10−4 . The Bode plot provides justification for the
name low-pass filter. From the plot of the magnitude response we see that when we apply sinusoidal inputs
with frequencies above 104 rad/s, the amplitude of the steady-state output signal is heavily attenuated. For
instance, if the input has amplitude one and frequency ω = 105 , then 20 log |G(jω)| ≈ −20dB and therefore the
amplitude of the output is |G(jω)| ≈ 10−1 . N
The above example helps to motivate the notion of bandwidth for control systems. The term bandwidth
is used by engineers in many different contexts like (i) bandwidth of filters (ii) bandwidth of communication
channels (iii) bandwidth of control systems. In feedback control, where the plant is often a low pass filter, the
higher the bandwidth the better because, as we will see in Chapter 4, the higher the bandwidth of a control
system, the faster its response.
Definition 3.8.3. Let G(s) be a rational, proper transfer function with all its poles in C− . Let Gmax :=
supω∈[0,∞) |G(jω)| denote the maximum magnitude of G(jω). The bandwidth of G is the width of the frequency
range in [0, ∞) in which, for every ω in this range
1
|G(jω) ≥ √ Gmax .
2
In terms of decibels, for every ω in this frequency range, 20 log |G(jω)| − 20 log Gmax ≥ −3dB.
Example 3.8.5. The Bode plot in Figure 3.11 of Example 3.8.3 shows that the RLC circuit has a bandwidth
of 9.9 radians/second. Input signals with frequencies outside of the interval [0.1, 10] are heavily attenuated. N
Example 3.8.6. The Bode plot in Figure 3.12 of Example 3.8.4 shows that the RC circuit has a bandwidth of
104 radians/second. Input signals with frequencies outside of the interval [0, 104 ] are heavily attenuated. N
When, as in Example 3.8.6, the maximum magnitude of G(jω) occurs at ω = 0, we will often say that a
system’s bandwidth is simply ωBW with the understanding that this refers to the width of the interval [0, ωBW ].
For such systems, the bandwidth ωBW indicates that the system will essentially pass all signals in the band
[0, ωBW ] without much attenuation. The bandwidth is easily obtained from the amplitude response plot of G(s)
as illustrated in Figure 3.13.
Magnitude (dB)
Frequency (rad/s)
Figure 3.13: Obtaining the bandwidth of a system from its amplitude response.
√
Remark 3.8.4. The significance of the ratio 1/ 2 (-3dB) in Definition 3.8.3 has its origins in the notion of
signal power. The (instantaneous) power in a signal u(t) is typically proportional to the amplitude of u2 (t).
If we apply an input √signal of frequency ωBW to a system with G(0) = 1, the output signal will have power
proportional to (u(t)/ 2)2 = u2 /2. In other words, the output will have half the power of the input signal.
Example 3.8.7.
1
s2
40s2 (s − 2) (40)(2) 2s − 1
G(s) = 2
= 1
1 2 1
.
(s + 5)(s + 4s + 100) (5)(100) 5s +1 100 s + 25 s +1
N
Once G(s) has been factored as above, we find the frequency response by setting s = jω. Using the basic
properties of logarithms and complex numbers it is easy to show that 20 log |G(jω)| and ](G(jω)) consist of
sums and differences of the four basic terms. This is best illustrated by example.
Example 3.8.8. Continuing from Example 3.8.7 consider
80 1 1 1 2 1
20 log |G(s)| = 20 log + 20 log s2 + 20 log s − 1 − 20 log s + 1 − 20 log s + s+1
500 2 5 100 25
and
80 2
1 1 1 2 1
](G(s)) = ] +] s +] s−1 −] s+1 −] s + s+1 .
500 2 5 100 25
N
Example 3.8.8 suggests that if we are able to plot the Bode plot for the four basic factors then we can add
and subtract these plots to obtain the Bode plot of G(s). This is the main idea of this section.
Pure gain
Consider G(s) = K. Then G(jω) = K and the frequency response is constant. The Bode plots are shown in
Figure 3.14. It is instructive to compare the Bode plots to the polar plots in Figure 3.5.
Bode Diagram Bode Diagram
Magnitude (dB)
Magnitude (dB)
Phase (deg)
Phase (deg)
10 2 10 3 10 4 10 5 10 6 10 2 10 3 10 4 10 5 10 6
Frequency (rad/s) Frequency (rad/s)
and
0◦ n ∈ {0, 4, 8, . . .}
90◦
n ∈ {1, 5, 9, . . .}
](G(jω)) = ](jω)n =
180◦ n ∈ {2, 6, 10, . . .}
−90◦
n ∈ {3, 7, 11, . . .} .
It is useful to compare these expressions, especially for the phase response, to the polar plots in Figure 3.6.
Notice that when ω = 1 = 100 then 20 log |G(jω)| = 0; when ω = 10 = 101 then 20 log |G(jω)| = n20; when
ω = 100 = 102 then 20 log |G(jω)| = n40; etc. In other words every time the frequency increases by a factor of
10 (called a decade increase), the magnitude response increases by n20 dB. Thus on a 20 log |G(jω)| vs log (ω)
plot the magnitude response is a straight line with slope n20 dB which passes through 0dB at ω = 100 . The
Bode plots for n ∈ {1, 2, 3, 4} are shown in Figure 3.15.
160
140
120
Magnitude (dB)
100
80
60
40
20
0
0 1 2
10 10 10
200
150
100
Phase (deg)
50
-50
-100
10 0 10 1 10 2
Frequency (rad/sec)
Real zero
Consider G(s) = τ s + 1 with τ > 0. Then G(jω) = jτ ω + 1 and
20 log |G(jω)| = 20 log |jτ ω + 1|, ](G(jω)) = ](jτ ω + 1) = arctan2 (1, τ ω).
We now make some key observations used to draw Bode plots by hand. The polar plot in Figure 3.7b is helpful
for understanding these observations.
1
1. When ω τ then:
The frequency τ1 is called the break frequency of τ s + 1. Based on the above observations, we make the
following simplifications for drawing the Bode plot of τ s + 1 by hand:
1. For ω < τ1 , |jτ ω + 1| ≈ 1.
4. For ω > 10
τ , ](jτ ω + 1) ≈ ]jω = 90◦ .
The lines obtained using the above approximations are called asymptotes and the resulting approximation of
the Bode plot is called an asymptotic Bode plot. Figure 3.16 shows the asymptotic Bode plot when τ = 1
as well as the exact Bode plot. The maximum error between the magnitude plots occurs at ω = τ1 .
Bode Diagram
40
35
30
25
Magnitude (dB)
20
15
10
0
90
60
Phase (deg)
30
0
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
Now consider G(s) = τ s − 1 with τ > 0. Then G(jω) = jτ ω − 1. The magnitude plot is exactly as before.
The only difference is in the phase plot. Once again it is instructive to observe the polar plot in Figure 3.7a. In
this case we have that when ω τ1 , ]G(jω) ≈ 180◦ and when ω τ1 , ]G(jω) ≈ 90◦ . The asymptotic Bode
plot is drawn in the same manner. The plots are shown in Figure 3.17.
s2 ζ
G(s) = + 2 s + 1, ζ ∈ [0, 1), ωn 6= 0.
ωn2 ωn
In this approximation we treat the complex conjugate zeros as two real, repeated zeros at s = −ωn . The
advantage of doing this is that we can generate asymptotic Bode plots in the same fashion as the previous
section using a break frequency of |ωn |. The disadvantage is that the approximation is quite crude and can lead
to large errors between the asymptotic and exact Bode plots. The error is entirely dependent on the actual value
Bode Diagram
40
35
30
25
Magnitude (dB)
20
15
10
0
180
150
Phase (deg)
120
90
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
of ζ. The closer ζ is to 1, the more accurate the plot. To make the asymptotic Bode plot more accurate you
can correct it by computing the true value of |G(jω)| and ]G(jω) near ω = ωn . Most introductory textbooks
have tables of correction factors for different values of ζ.
Figure 3.18 shows a plot for complex conjugate zeros in C− , i.e., ωn > 0, ζ ∈ (0, 1). Figure 3.19 shows the
plot for complex conjugate zeros in C+ , i.e., ωn < 0, ζ ∈ (0, 1). Once again it is instructive to compare these
Bode plots to the polar plots in Figure 3.7.
Bode Diagram
80
70
60
50
Magnitude (dB)
40
30
20
10
-10
180
135
Phase (deg)
90
45
0
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
s2
Figure 3.18: Exact and asymptotic Bode plots of 2
ωn + 2 ωζn s + 1 with ωn = 1.
Bode Diagram
80
70
60
50
Magnitude (dB)
40
30
20
10
-10
0
-45
Phase (deg)
-90
-135
-180
-2 -1 0 1 2
10 10 10 10 10
Frequency (rad/s)
s2
Figure 3.19: Exact and asymptotic Bode plots of 2
ωn + 2 ωζn s + 1 with ωn = −1.
A special case is when ζ = 0. In this case G(s) has imaginary roots at s = ±jωn . When ζ = 0 and ω = ωn
we have G(jω) = 0. Hence the magnitude bode plot approaches negative infinity as ω → ωn . This is illustrated
in Figure 3.20. Compare with the polar plot in Figure 3.8. In such a case the asymptotic Bode plot has infinite
error at the break frequency ω = ωn .
Bode Diagram
40
20
-20
Magnitude (dB)
-40
-60
-80
-100
-120
-140
-160
0
-45
Phase (deg)
-90
-135
-180
10 -1 10 0 10 1
Frequency (rad/s)
s2
Figure 3.20: Exact and asymptotic Bode plots of 2
ωn + 1 with ωn2 = 1.
Exercise 3.6. Using the principles developed so far, sketch the asymptotic Bode plot of
40s2 (s − 2)
G(s) = .
(s + 5)(s2 + 4s + 100)
Examples
0
-25
-30
-0.005
-35
Magnitude (dB)
-0.01
-40
-45
-0.015
-50
-0.02
-55
-60
-0.025
0
-0.03
-30
-0.035
Phase (deg)
-0.04
-60
-0.045
-90
-0.05 -1 0 1 2 3
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 10 10 10 10 10
Figure 3.21: Polar and asymptotic Bode plots for Example 3.8.9.
Figure 3.22 shows the polar plot and asymptotic Bode plot for this frequency response. As before, make sure
you understand the Bode plot in Figure 3.22b and know how to plot it by hand. N
-0.1
-0.2
1
0.8
-0.3 0.6
0.4
Magnitude (dB)
0.2
-0.4
0
-0.2
-0.5 -0.4
-0.6
-0.6 -0.8
-1
0
-0.7
-45
-0.8
Phase (deg)
-90
-0.9
-135
-1 -180
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 10 -2 10 -1 10 0 10 1 10 2
Figure 3.22: Polar and asymptotic Bode plots for Example 3.8.10.
so that the magnitude response of G3 is that same as that of G1 from Figure 3.21b. Furthermore the frequency
response is
]G3 (jω) = ]G2 (jω) + ]G1 (jω).
Figure 3.23 shows the polar plot and asymptotic Bode plot for this frequency response. As before, make sure
you understand the Bode plot in Figure 3.23b and know how to plot it by hand. From the polar plot we again
-20
0.05
-25
-30
-35
Magnitude (dB)
-40
-45
0
-50
-55
-60
180
135
90
-0.05
45
Phase (deg)
-45
-90
-135
-180
-0.1
-0.1 -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1 10 -2 10 -1 10 0 10 1 10 2 10 3
Figure 3.23: Polar and asymptotic Bode plots for Example 3.8.11.
see (cf. Example 3.8.2) that the phase change for G3 is greater than the phase change for G1 . Of all TFs
having the same magnitude response |G1 (jω)|, G1 has the minimum phase change. Hence the terminology of
Definition 3.8.2. N
Remark 3.8.5. This section has dealt with graphical methods done by hand on paper. Why did we bother?
Why didn’t we just ask MATLAB to draw the Bode plots? The answer is that by learning to draw the graphs,
you acquire understanding. In addition, there will come times when MATLAB will fail you. For example,
poles on the imaginary axis: MATLAB isn’t smart enough to properly draw Nyquist plots which we cover in
Chapter 8.
3.9 Summary
This chapter covered some of the basic results in linear system theory. Parts of this chapter should have been
review from your signals and systems course. After reading this chapter you should know the following.
1. You should know how to compute the matrix exponential eAt using Laplace transforms for small problems
(n ≤ 3).
2. Understand the structure of the total response of an LTI state-space model.
3. Know what it means for an LTI system to be asymptotically stable and how to test for asymptotic stability
using eigenvalues.
4. Know the definition of BIBO stability and how to test for it by checking the poles of a TF.
5. Understand the relationship between asymptotic stability and BIBO stability of LTI systems.
6. Be able to apply the final-value theorem and compute the steady-state gain of a BIBO stable system.
7. Understand the physical interpretation of a system’s frequency response.
8. Be able to plot asymptotic Bode plots by hand.
For z, w ∈ C, you can also verify the following basic properties of magnitudes
z |z|
|zw| = |z||w|, = .
w |w|
By ]z we denote the the angle between the positive real axis and the line segment from 0 to z in the complex
plane. This angle is called the argument of z and we write ]z = arg (z). Since we can always add integer
multiples of 2π, arg (z) is not single-valued and therefore “arg” is not a function. To avoid confusion, we always
use the principle value of the argument.
Definition 3.A.1. The principle value of the argument (or principle argument) of a complex number
z is the value of arg (z) greater than −π and less than or equal to π.
The principle argument of z = z + jy can be computed as arctan2 (x, y) where arctan2 : R2 \ {0} → (−π, π]
is the four quadrant arctan. Unless otherwise stated, we always use the principle value of the argument in this
course so that −π < ]z ≤ π.
Example 3.A.1. The argument of −1 − j is any number −3π/4 + 2kπ where k is an arbitrary integer. The
principle argument of −1 − j is −3π/4. N
Euler’s equation states that for all x ∈ R, ejx = cos (x) + j sin (x). Notice that |ejx | = 1 and that we can
always represent x ∈ R as x = θ + 2πk where θ ∈ (−π, π] and k is an integer. Using this representation, the
principle argument of ejx equals θ and we can write any non-zero complex number z = x + jy in polar form
z = |z|ej]z .
It is common in engineering to drop the dependence on e and simply write |z|]z. This is called phasor
notation. It is easy to show that
r1 ejθ1 r2 ejθ2 = r1 r2 ej(θ1 +θ2 ) .
It follows that for any z, w ∈ C
z
]zw = ]z + ]w, ] = ]z − ]w.
w
F −1 (3.14)
' w
frequency domain
(frequency response G(jω))
Figure 3.24: Relationship between impulse response, s-domain and frequency response of a BIBO stable LTI system.
Proposition 3.B.1. Let G(s) ∈ R(s) be a strictly proper BIBO stable system with impulse response g(t) and
frequency response G(jω). Then, for all s ∈ C+
Z∞
1 G(jω)
G(s) = dω. (3.14)
2π s − jω
−∞
Proof. As discussed above and in Section 3.7, under the assumption of BIBO stability, the frequency response
of a system equals the Fourier transform of g(t) and therefore
Z∞
1
g(t) = F −1 {G(jω)} = G(jω)ejωt dω.
2π
−∞
On the other hand, G(s) is the LT of g(t) and so for any s in its ROC, which by BIBO stability includes C+ ,
we have
Z∞
G(s) = g(t)e−st dt
0
Z∞ Z∞
1
= G(jω)ejωt e−st dω dt
2π
0 −∞
Z∞ Z∞
1
= G(jω)ejωt e−st dt dω
2π
−∞ 0
Z∞
1 G(jω)
= dω.
2π s − jω
−∞
Remark 3.B.2. State models fit into the above discussion via the impulse response (3.4) given by g(t) =
CeAt B1(t) + Dδ(t) or via the transfer function G(s) = C(sI − A)−1 B + D.
Remark 3.B.3. This discussion can be extended to unstable systems and systems with poles on the imaginary
axis. The treatment in [Dullerud and Paganini, 2000] is somewhat advanced but rather complete.
In the previous chapter we studied properties of linear time-invariant systems in a somewhat general manner.
We showed that a single-input, single-output LTI system can be modelled by state equations
ẋ = Ax + Bu, y = Cx + Du, u, y ∈ R
or by input-output models
y =g∗u or Y (s) = G(s)U (s).
In this chapter we study the important special cases when G(s) ∈ R(s) is given by
K
G(s) = (prototype first order system),
τs + 1
Kωn2
G(s) = 2 (prototype second order system).
s + 2ζωn s + ωn2
First and second order systems are important because they are easy to analyze which makes them useful for
developing intuition that can be applied to more complicated systems, e.g., higher order systems, systems with
zeros. Also, the behaviour of these more complicated systems can sometimes be well approximated by first and
second order models. Our main objective in this chapter is to relate the position of the poles of G(s) in the
s-plane to the corresponding time-domain responses. This relationship is a key to the analysis and design of
LTI feedback controllers.
Contents
4.1 Prototype first order system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
4.2 Prototype second order system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
4.3 General characteristics of a step response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.4 The effect of adding poles and zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.5 Dominant poles and zeros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
4.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Definition 4.1.1. The prototype first order system with input u and output y is governed by the differential
equation
τ ẏ + y = Ku, K, τ ∈ R. (4.1)
93
4.1. Prototype first order system 94
System (4.1) in Definition 4.1.1 can of course be given a state model. Define x := y to obtain (verify)
ẋ = ax + bu, y = cx + du, x, y, u ∈ R
and
1 K
a = − , b = , c = 1, d = 0.
τ τ
For the remainder of this section we study how the values of the constants K and τ affect the time-domain
response of the prototype first order system.
Example 4.1.1. (Heating a room) Consider the problem of heating up a room as shown in Figure 4.1.
Suppose that:
dT u α
= − (T − Te ). (4.3)
dt β β
This model is nonlinear (Do you see why? Hint: see Example 2.4.4.) with input u and output T . The governing
equation (4.3) is first order so we only need one state variable. The natural choice is x := T so that the resulting
nonlinear state model is
α 1 αTe
ẋ = f (x, u) := − x + u +
β β β
y = h(x, u) := x.
Suppose that we want to control the temperature of the room to maintain an inside temperature of T > Te ,
i.e., the room should be T − Te degrees warmer than the outside.
Exercise 4.1. Show that (x, u) = (T , α(T − Te )) is the unique equilibrium configuration corresponding to the desired temperature
x = T (see Definition 2.5.1).
∂f ∂f ∂h ∂h
Exercise 4.2. Compute Jacobians a = ∂x (x,u)
, b= ∂u (x,u)
, c= ∂x (x,u)
, d= ∂u (x,u)
and verify that a = −α/β, b = 1/β,
c = 1, d = 0.
Finally, let δx := x − x = T − T and δu := u − u = u − α(T − Te ) denote deviations from the equilibrium
configuration to obtain the linearized model
˙ = − α δx + 1 δu
δx
β β
δy = δx.
Let Y (s) := L {δy} and U (s) := L {δu}. The resulting transfer function of the linearized model is
1 1
Y (s) β α
= α = β
.
U (s) s+ β αs +1
β
This system has the form of a prototype first order system (4.2) with τ = α and K = α1 . N
By Theorem 3.5.4 the prototype first order systems is BIBO stable if τ > 0 and unstable if τ < 0.
Exercise 4.3. Is the prototype first order system (4.2) BIBO stable when τ = 0? What if K = 0?
Exercise 4.4. Is the state-space model of the prototype first order system asymptotically stable when u = 0 and τ < 0? Hint:
Use Proposition 3.4.2.
Table 4.1 lists key properties of the prototype first order system (4.2).
s = − τ1 None K 1
τ rad/s.
Exercise 4.5. Verify that Table 4.1 is correct using Definitions 2.8.2, 3.6.3 and 3.8.3.
Using the ideas of either Section 3.3 or Section 2.7 (Examples 2.7.7 and 2.7.9) it is easy to show that the
impulse response of the prototype first order system is given by
K −t
g(t) = e τ , t ≥ 0. (4.4)
τ
K 1 K K
Y (s) = G(s)U (s) = = −
1 + τs s s s + τ1
0.9
0.9
0.8
0.8
0.7
0.7
0.6
0.6
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0.2
0.1
0.1
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0
Figure 4.2: Responses of a prototype first order system with K = τ = 1 sampled every τ seconds.
Again, suppose that we sample the step response (4.5) every τ seconds starting from t = 0 as shown in
Figure 4.2b. We obtain the sampled values
After 4τ seconds the step response has reached 98% of its steady-state value. The smaller τ > 0 is, the faster the
step response converges to its steady-state value. The parameter τ determines the rate at which e−t/τ decays
to zero which motivates the subsequent definition.
Definition 4.1.2. The time constant of the prototype first order system is the parameter τ in (4.2).
In summary, the time constant completely determines the transient response of the first order system. As
τ > 0 approaches zero, the system pole moves towards −∞ along the real axis of the s-plane, the system’s
bandwidth approaches infinity and the system’s time-domain response gets faster.
Example 4.1.2. In Example 2.9.1 proportional error feedback was applied to a prototype first order system.
The resulting TF from the reference input to the plant output was found to be
Y (s) Kp K
= .
R(s) τ s + 1 + Kp K
The time constant of the closed-loop system is τ /(1 + Kp K) and the closed-loop steady-state gain is Kp K/(1 +
Kp K). The step response (4.5) is
Kp K t(1+Kp K)
y(t) = 1 − e− τ , t ≥ 0.
1 + Kp K
By choosing large positive values of Kp , i.e., high gain control, the time constant of the closed-loop system can
be made arbitrarily small and the steady-state gain arbitrarily close to one. However large values of Kp will
result in large control signals and may not be physically implementable. N
Definition 4.2.1. The prototype second order system with input u and output y is governed by the
differential equation
ÿ + 2ζωn ẏ + ωn2 y = Kωn2 u, K, ζ, ωn ∈ R. (4.6)
The associated transfer function is
Y (s) Kωn2
= 2 . (4.7)
U (s) s + 2ζωn s + ωn2
To put (4.6) into state model form, let x := (y, ẏ) to obtain (verify!) ẋ = Ax + Bu, y = Cx + Du with
0 1 0
A= 2 , B= 2 , C = 1 0 , D = 0.
−ωn −2ζωn Kωn
The prototype second order system is very important because it is easy to analyse but it also has far richer
dynamics than the first order system. This makes it a workhorse for obtaining simple models of many engineering
systems.
Example 4.2.1. (Mass-Spring-Damper) The mass spring damper in Figure 4.3 from Examples 2.1.1
and 3.3.1 has transfer function
Y (s) 1
= 2
.
U (s) M s + bs + k
Comparing this transfer function to the prototype second order system (4.7) we deduce
r
k 1 b
ωn = , K= , ζ= √ .
M k 2 kM
N
Example 4.2.2. (RLC Circuit) Consider the series RLC circuit in Figure 4.4 (cf. Examples 2.3.5 and 2.4.5).
The system TF is (verify!)
1
Y (s) 1 LC
= G(s) = 2 = 2 R 1
.
U (s) s LC + sRC + 1 s + L s + LC
Comparing this transfer function to the prototype second order system (4.7) we deduce
r
1 R C
ωn = √ , K = 1, ζ= .
LC 2 L
N
Figure 4.4: RLC circuit with voltage across capacitor taken as output.
The prototype second order system’s TF is real rational and it has no zeros so its poles are the roots of its
denominator, i.e., the roots of s2 + 2ζωn s + ωn2 . These are easily computed using the quadratic formula
p p
s = −ζωn ± (ζωn )2 − ωn2 = ωn −ζ ± ζ 2 − 1 . (4.8)
• When 0 < ζ < 1 the system has two complex conjugate poles.
Figure 4.5 shows how the poles of the prototype second order system (4.7) vary on the s-plane as a function
of ζ for fixed ωn > 0.
Figure 4.5: Pole locations of the prototype second order system as a function of ζ with fixed ωn .
Just as the time constant characterizes the prototype first order system, the parameter ζ is a useful way to
categorize the prototype second order system and has its own name.
Definition 4.2.2. The damping ratio of the prototype second order system is the parameter ζ in (4.7).
The natural undamped frequency of the prototype second order system is the parameter ωn in (4.7). The
prototype second order system is called:
(i) undamped if ζ = 0,
The step responses for an underdamped, critically damped and over damped prototype second order system
are shown in Figure 4.6.
Figure 4.6: Representative step responses of the prototype second order system for different values of ζ and fixed ωn .
Exercise 4.7. Simulate and plot the step response of an undamped prototype second order system.
Table 4.2 lists key properties of the prototype second order system (4.7). In the rest of this section we study
in some detail the properties of underdamped, critically damped and overdamped second order systems.
Example 4.2.3. (Mass-Spring-Damper) Using the expression for the damping ratio from Example 4.2.1
we conclude
√ that the mass-spring-damper system is underdamped if and only if the damper constant b satisfies
0 < b < 2 kM . N
Exercise 4.8. Suppose that L = 160 µH and C = 10 µF in the RLC circuit from Example 4.2.2. Find the range of resistance
values so that the circuit is underdamped. p
The poles of an underdamped system, written in Cartesian form, are s = −ζωn ± jωn 1 − ζ 2.
Exercise 4.9. Verify that
p p
−ζωn ± jωn 1 − ζ 2 = ωn , ] −ζωn ± jωn 1 − ζ 2 = ± (π − arccos (ζ)) .
In light of Exercise 4.9, the polar form of the poles of an underdamped prototype second order system is
s = ωn e±j(π−arccos (ζ)) .
The angle of the poles is completely determined by the damping ratio ζ while the magnitude is determined by
the undamped natural frequency ωn , see Figure 4.7. We now analyse the frequency response of an underdamped
Figure 4.7: Pole location of an underdamped second order system. In this figure θ = arccos (ζ).
prototype second order system. If we assume that the steady-state gain is unity, i.e., K = 1, then we can write
the TF (4.7) as
1
G(s) = 2 .
s s
ωn + 2ζ ωn + 1
Recall from Section 3.8.3 that this is exactly the standard form for drawing the Bode plot of a system with
complex conjugate roots. The Bode plot for an underdamped system with K = ωn = 1 is shown in Figure 4.8
for various different values of ζ. We observe from Figure 4.8 that the system bandwidth is approximately ωn and
40
20
0
Magnitude (dB)
−20
−40
−60
−80
0
−45
Phase (deg)
−90
−135
−180
−2 −1 0 1 2
10 10 10 10 10
Frequency (rad/s)
√
Figure 4.8: Bode plot of the prototype second order system with K = ωn = 1 for ζ ∈ 0.05, 0.1, 0.3, 0.5, 1/ 2, 1 .
√
that, when 0 < ζ < 1/ 2, the magnitude plot has a “peak.” It can be shown that the value of the magnitude
plot at that peak is
1
20 log p
2ζ 1 − ζ 2
p
and that it occurs at ω = ωn 1 − ζ 2 .
Having identified the bandwidth of the underdamped system (ωBW ≈ ωn ) we turn to the impulse and
step responses to see how the damping ratio and undamped natural frequency affect them. We start with
the impulse response. The impulse response of the underdamped second order system is found, using partial
fraction expansions and doing some messy calculations, to be
ωn −ζωn t
p
2
g(t) = K p e sin ωn 1 − ζ t , t ≥ 0. (4.9)
1 − ζ2
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
−0.2 −0.2
−0.4 −0.4
−0.6 −0.6
−0.8 −0.8
−1 −1
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
(a) K = ωn = 1. (b) K = 1, ωn = 5.
√
Figure 4.9: Impulse response of an underdamped system with ζ ∈ 0.05, 0.1, 0.3.0.5, 1/ 2, 1 .
1.8
1.6
1.4
1.8
1.2
1.6
1.4
1
1.2
0.8
1
0.6
0.8
0.6 0.4
0.4
0.2
0.2
0
0
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
(a) K = ωn = 1. (b) K = 1, ωn = 5.
√
Figure 4.10: Step response of an underdamped system with ζ ∈ 0.05, 0.1, 0.3.0.5, 1/ 2, 1 .
as ωn gets larger the response speeds up. Similarly, as ωn gets smaller, the response slows down. Therefore, we
once again see that the higher the system bandwidth, the faster the response.
These plots also show that as ζ gets closer to 1, equivalently as the complex conjugate poles get closer to
the real axis, the response become less oscillatory. The undamped natural frequency ωn is the frequency of
oscillation when ζ = 0 which provides some justification for its name.
Just as in the first order case, we see that the further to the left in C− that the poles are, the faster the
response. Also, the closer the poles are to the real axis (for fixed ωn ), the less oscillatory the response. We will
make much use of the above observations in analyzing and designing control systems.
By factoring the denominator of the TF (4.7) we can re-write the transfer function in the form
Kab
G(s) =
(s + a)(s + b)
g(t) = L −1 {G(s)}
( )
ab ab
−1 b−a a−b
= KL + (4.12)
s+a
s+b
ab −at
=K e − e−bt , t ≥ 0.
b−a
The time derivative of the impulse response is
d ab −bt
g(t) = K be − ae−at .
dt b−a
Setting this derivative equal to zero and solving for t we get
ln (a) − ln (b)
t̄ = .
a−b
This means that g(t̄) is an extreme value of the impulse response: the absolute value of the the impulse peaks
at that time. The step response can also be found using partial fraction expansions. If
Kab 1 K K a b
Y (s) = = + − .
(s + a)(s + b) s s b−a s+b s+a
then
1 −bt
y(t) = K 1 − ae − be−at , t ≥ 0. (4.13)
b−a
The time derivative of the step response is
d ab −at
y(t) = K e − e−bt .
dt b−a
This shows that ẏ = 0 only when t = 0. In other words, there are no extreme values of y(t) for t ≥ 0 and the
step response does not have “peaks.” Figure 4.11 shows typical impulse and step responses of an overdamped
system.
Exercise 4.11. Find the pole locations of the system used to create the plots in Figure 4.11.
Kωn2
G(s) = .
(s + ωn )2
0
0
Time (seconds) Time (seconds)
Exercise 4.12. Show that the bandwidth of a critically damped system is approximately ωBW = |ωn |.
The unit step response can be found using the inverse LT and partial fraction expansions
y(t) = K 1 − (1 + ωn t)e−ωn t , t ≥ 0.
(4.15)
Using similar analysis as in the overdamped case, Section 4.2.2, you can show that the critically damped system
has no “peaks” in its step response. Its response is slower than a underdamped system’s response but it does
not “overshoot” its steady-state value during its transient period. Figure 4.12 shows the typical impulse and
step responses of an overdamped systems.
0
0
Time (seconds) Time (seconds)
1.4
1.2
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6
4.3.1 Overshoot
Informally, overshoot refers to the situation when the magnitude of a stable system’s step response gets larger
than the magnitude of its steady-state value. We have seen that stable underdamped systems always have
overshoot while first order systems, critically damped and overdamped systems never do.
Definition 4.3.1. The percentage overshoot of a stable LTI system with scalar TF G(s) and unit step
response y(t) = L −1 G(s) 1s is
kyk∞ − |G(0)|
%OS := .
|G(0)|
To derive an expression for the overshoot of an underdamped prototype second order system (4.7), we
differentiate the step response (4.10) and then solve for the smallest time t̄ > 0 such that ẏ(t̄) = 0. Then
kyk∞ = |y(t̄)| is the least upper bound of the step response (see Figure 4.13). Doing these calculations yields
the following formula
√−ζπ
%OS = e 1−ζ 2 (underdamped prototype second order system). (4.16)
Notice that the percentage overshoot only depends on the damping ratio ζ and not on ωn . We rearrange (4.16)
to obtain the percentage overshoot as a function of the damping ratio
0.9
0.8
0.7
0.6
0.5
ln (%OS)
0.4
ζ = −q . (4.17)
0.3 π 2 + (ln (%OS))2
0.2
0.1
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Observe that the more damping (larger ζ) the less overshoot. We can use this observation to help us impose
constraints on a system’s damping ratio as follows. Let %OSmax denote the maximum allowable overshoot.
Then using (4.17) the specification %OSmax is translated into a specification on the damping ratio
ln (%OSmax )
%OS ≤ %OSmax ⇐⇒ ζ ≥ − q .
π 2 + (ln (%OSmax ))2
Therefore, in order to meet an overshoot specification, the second order system must have all its poles in a
“cone” in the left half of the s-plane
Example 4.3.1. Suppose that L = 160 µH and C = 10 µF in the RLC circuit from Example 4.2.2. Find the
range of resistor values R > 0 so that the system is (i) stable (ii) underdamped and (iii) its step response
satisfies %OS ≤ 0.05.
From Exercise 4.8 we know that (i) and (ii) are satisfied if R < 8 Ω. In this example %OSmax = 0.05 so that
(iii) is satisfied if
ln (0.05)
ζ ≥ −q = 0.69.
2 2
π + (ln (0.05))
Using the expression for ζ from Example 4.2.2 we obtain the constraint
r
R C R
ζ= = ≥ 0.69 ⇐⇒ R ≥ 5.52.
2 L 8
In summary, the design specifications are met if 5.52 ≤ R < 8. N
Exercise 4.13. Draw the region in the s-plane in which the poles of an under damped second order system must lie so that
%OS < 0.05.
Definition 4.3.2. The 2% settling time of a stable LTI system with scalar TF G(s) and unit step response
y(t) = L −1 G(s) 1s is the smallest Ts > 0 such that
|G(0) − y(t)|
for all t ≥ Ts ≤ 0.02.
|G(0)|
For an underdamped second order system, based on the expression for its step response (4.10), we can
crudely estimate the settling time by looking at the envelope e−ζωn t to get
e−ζωn t ≤ 0.02.
Solving for t we get the approximate inequality t ≥ 4/ζωn to obtain1
4
Ts ≈ (underdamped prototype second order system). (4.18)
ζωn
From this relationship we see that the larger the ωn , the faster the response. Note that Ts only depends on the
real part of the poles of G(s). This is consistent with our previous observations and motivates the following rule
of thumb for underdamped second order systems: the higher the bandwidth (larger ωn ) the faster the response
(smaller Ts ).
Suppose our design specification is that the settling time must be less than Tsmax . This means that
4
Ts ≤ Tsmax ⇔ ζωn ≥ .
Tsmax
Therefore, in order to meet a settling time specification, the second order system must have all its poles
sufficiently far to the left of the s-plane
4
s ∈ C : Re (s) ≤ − max .
Ts
Exercise 4.14. Find the settling time for the system from Example 4.3.1 when R = 0.4 Ω.
Exercise 4.15. Draw the region in the s-plane in which the poles of an under damped second order system must lie so that Ts < 3
seconds.
Definition 4.3.3. The peak time or time to peak of a stable LTI system with scalar TF G(s) and unit step
response y(t) = L −1 G(s) 1s is the smallest Tp > 0 such that
1 5.8
It can be shown that the 2% settling time for a critically damped system is approximately given by Ts ≈ ωn
. Unless explicitly
stated, we will use (4.18) for computing the settling time of second order systems.
To derive an expression for Tp for an underdamped prototype second order system (4.7), we (cf. Section 4.3.1)
differentiate the step response (4.10) and then solve for the smallest time Tp > 0 such that ẏ(Tp ) = 0. Doing
so yields
π
Tp = p (underdamped prototype second order system). (4.19)
ωn 1 − ζ 2
Once again we observe that the larger the bandwidth (ωn ), the smaller Tp is and the faster the response
becomes. Also note that Tp only depends on the imaginary part of the poles for a second order system.
Exercise 4.16. Draw the region in the s-plane in which the poles of an underdamped second order system must lie so that Tp < 3
seconds.
Definition 4.3.4. Let G(s) be the scalar TF of a stable LTI system with unit step response y(t) = L −1 G(s) 1s .
Let t1 > 0 and t2 > 0 be the smallest times such that y(t1 ) = 0.1yss and y(t2 ) = 0.9yss . Then the rise time of
G(s) is
Tr = t2 − t1 .
Kωn2 1
Ga (s) = , τ >0 (augmented plant).
s2 + 2ζωn s + ωn2 1 + τ s
The pole that we’ve added is located at s = −1/τ ∈ C− . As τ → +∞ the new pole approaches s = 0. As τ → 0
the pole approaches −∞. From the expression for Ga (s) we see that as the new pole approaches −∞ (τ → 0)
we recover2 the TF of the second order system (4.7).
2
In this case the effect of the additional pole is only noticeable when analyzing the high frequency response.
To see the effect on the system’s step response when the pole approaches s = 0 (τ → ∞) response let’s
assume that K = 1 and re-write Ga (s) using an appropriate partial fraction expansion
a bs + c
Ga (s) = + 2
1 + τ s s + 2ζωn s + ωn2
where
τ 2 ωn2
a ζωn 1
a= , b=− , c= − 2 a.
1 − 2ζωn τ + ωn2 τ 2 τ τ τ ζωn
From this we see that as τ → ∞, we get b, c, → 0 and the augmented system’s response approaches a first order
response.
1 8 1
Ga (s) = G(s) = 2 .
1 + τs s + 2s + 4 1 + τ s
Figure 4.15 shows the Bode plots and step response of this system for τ ∈ {0, 0.01, 0.1, 0.2, 1, 2, 10}.
50 2.5
0
Magnitude (dB)
−50 2
−100
−150 1.5
−200
0
1
−45
−90
Phase (deg)
−135
0.5
−180
−225
−270
−3 −2 −1 0 1 2 3 4 0
10 10 10 10 10 10 10 10 0 10 20 30 40 50 60
Frequency (rad/s) Time (seconds)
Figure 4.15: Effect of adding a stable pole to a second order system (Example 4.4.1).
We summarize our observations as follows: As the additional pole gets closer to the origin (i.e., τ increases)
the bandwidth decreases, the phase is more negative and the step response is more sluggish. These effects
become less prominent as the extra pole moves further into C− (i.e., τ decreases).
The zero we’ve added is located at s = −1/τ . As τ → +∞ the zero approaches s = 0. As τ → 0 the zero
approaches −∞. To see the effect on the system response let’s assume that K = 1 and find the step response
−1 1
y(t) = L Ga (s)
s
ωn2
−1 1
=L (τ s + 1)
s2 + 2ζωn s + ωn2 s
2 ωn2
ωn 1 1
= L −1 + τ s
s2 + 2ζωn s + ωn2 s s2 + 2ζωn s + ωn2 s
2 ωn2
−1 ωn 1
=L +τ 2
s2 + 2ζωn s + ωn2 s s + 2ζωn s + ωn2
= step response of G(s) + τ × impulse response of G(s).
From this we conclude that as the extra zero approaches −∞ (i.e., τ → 0) then y(t) approaches the standard
second order step response. As the zero gets closer to s = 0 (τ → +∞) the impulse response term becomes
more noticeable in the step response.
Example 4.4.2. Consider, as in the previous example,
8
G(s) =
s2 + 2s + 4
and the augmented plant
8
Ga (s) = G(s)(τ s + 1) =
(τ s + 1).
+ 2s + 4 s2
Figure 4.16 shows the Bode plot and step response of this system for τ ∈ {0, 0.5, 1, 1.5, 2}. N
20 6
10
−10 5
Magnitude (dB)
−20
−30
−40
4
−50
−60
−70
3
−80
45
0
2
−45
Phase (deg)
−90
1
−135
−180
−2 −1 0 1 2 0
10 10 10 10 10 0 1 2 3 4 5 6 7
Frequency (rad/s) Time (seconds)
Figure 4.16: Effect of adding a minimum phase zero to a second order system (Example 4.4.2).
We summarize our observations as follows: As the minimum phase zero moves closer to the origin, i.e., as τ
increases, the bandwidth increases, the phase is more positive and the response gets faster but more oscillatory.
As the zero moves closer to −∞, i.e., as τ decreases, the response approaches that of the prototype second order
system. Because of these relationships we will generally try to keep zeros away from the origin.
The added zero is located at s = 1/τ . Generally, a non-minimum phase zero makes a system hard to control
(see Section 9.6.2). It slows the system down and causes the system to go in the “wrong direction” at first. To
see why, let’s assume that K = 1 and find the step response
−1 1
y(t) = L Ga (s)
s
ωn2
1
= L −1 (1 − τ s)
s2 + 2ζωn s + ωn2 s
2 ωn2
−1 ωn 1 1
=L − τs 2
s2 + 2ζωn s + ωn2 s s + 2ζωn s + ωn2 s
= step response of G(s) − τ × impulse response of G(s).
The negative sign in front of the impulse response in the above derivation is what causes the response to “go
the wrong way.”
10
0
2
−10
Magnitude (dB)
−20
1
−30
−40
0
−50
−60
360
−1
270
−2
Phase (deg)
180
−3
90
−2 −1 0 1 2 3 −4
10 10 10 10 10 10 0 1 2 3 4 5 6 7
Frequency (rad/s) Time (seconds)
Figure 4.17: Effect of adding a non-minimum phase zero to a second order system (Example 4.4.3).
We summarize this section as follows: As the non-minimum phase zero moves closer to the origin, i.e., as τ
increases, the bandwidth increases, the phase is more negative. Furthermore, the step response goes further in
the wrong direction near t = 0.
In Section 4.4 we showed that poles and zeros “far to the left” do not have a significant impact on the
low frequency response3 of a system. Hence good low-order approximations can be found by appropriately
neglecting the less significant poles and zeros. Typically, we neglect poles and zeros that are at least 5 times
further away from the imaginary axis. The poles and zeros close to the imaginary axis are called dominant
poles and dominant zeros. The poles and zeros at least 5 times further away from the imaginary axis are
called non-dominant poles and non-dominant zeros.
Example 4.5.1. (Model Reduction)
s + 10
G(s) =
(s + 11)(s + 12)(s2 + 2s + 2)
s + 10 1
= 2
.
(s + 11)(s + 12) s + 2s + 2
| {z } | {z }
=:Gfast (s) =:Gslow (s)
The portion of the time response due to Gfast (s) reaches steady-state much faster than the portion of the time
response due to Gslow (s). This motivates us to approximate Gfast (s) by its steady-state gain
10
Gfast (0) =
132
and hence
10 1
G(s) ≈ Gfast (0)Gslow (s) = 2
=: Ĝ(s).
132 s + 2s + 2
Figure 4.19a shows the frequency response of G(s) and Ĝ(s). As expected, at low frequencies the approximation
is reasonably good. The step responses for the actual and approximated systems are shown in Figure 4.19b. N
When reducing the order of system model it is important to determine the frequency range in which the
approximation should be valid.
Example 4.5.2. Consider the transfer function
1 1
1 + 60 s 1+ 900 s
G(s) = 100 1
1
1 1
.
1 + 100 s 1 + 500 s 1+ 600 s 1+ 1000 s
We want to obtain a model that describes the process well in the frequency range ω ≤ 600. In this case
1
1 + 900 s
Gfast (s) = 1
1 + 1000 s
3
The Bode plot is affected at high frequencies where the gain is typically small.
0.04
−20
−40
−60 0.035
−80
Magnitude (dB)
−100
0.03
−120
−140
0.025
−160
−180
−200 0.02
0
0.015
−90
Phase (deg)
0.01
−180
0.005
−270 0
10
−2 −1
10
0
10
1
10
2
10
3
10 0 1 2 3 4 5 6 7
Frequency (rad/sec) Time (seconds)
Figure 4.19: Bode and step responses of G(s) (black) and Ĝ(s) (grey) from Example 4.5.1.
4.6 Summary
The main purpose of this chapter is to build intuition about how pole locations affect the time-domain response
and bandwidth of LTI systems. Upon finishing this chapter you should know the following.
1. The form of the TF for prototype first and second order systems.
2. Understand how changing the time constant τ changes the time domain response and bandwidth of a
prototype first order system.
3. The relationship between damping ratio ζ, undamped natural frequency ωn and the pole locations of the
prototype second order system (see Figures 4.5, 4.7).
4. The qualitative differences in the step responses for under-, over- and critically damped second order
systems.
5. Perhaps most importantly, understand how changing the damping ratio and undamped natural frequency
changes the step response of an underdamped prototype second order system.
6. Section 4.3 is very important and serves as a basis for many design techniques. You should know the
common measures used to quantify the performance of a step response.
7. Compute the overshoot, rise time, settling and time to peak for an underdamped second order systems.
You should also be able to translate specifications on these parameters into allowable pole locations for
second order systems. You should be able to draw these allowable pole locations on the complex s-plane.
8. Qualitatively understand the effect that adding poles and zeros to a second order system has on its step
response. You should be able to relate this effect to the location of the additional pole/zero.
10. Find a reduced order model of a system when there are dominant poles.
In this chapter we start to develop the basic theory and tools for feedback control analysis and design in the
frequency domain. “Analysis” means you already have a controller and you want to study how good it is;
“design” of course means you want to design a controller to meet certain specifications. The most fundamental
specification is stability. Typically, good performance requires high-gain controllers, yet typically the feedback
loop will become unstable if the gain is too high.
Contents
5.1 Closing the loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
5.2 Stability of feedback systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
5.3 The Routh-Hurwitz criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
5.4 Steady-state performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
5.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
114
115 CHAPTER 5. FEEDBACK CONTROL THEORY
1. Our reference frame is such that down is the positive vertical direction and right is the positive horizontal
direction. Positive angular displacements correspond to clockwise rotations of the pendulum.
3. The system has two mechanical components: the cart and the ball.
5. The position of the centre of mass of the cart is q. We ignore its vertical position since it has no motion
in that direction. The position of the centre of mass of the ball is q + L sin (θ) (horizontal direction) and
L − L cos (θ) (vertical direction). So when θ = 0 (upward vertical position), the ball is located at (q, 0).
When θ = π (downward vertical position) the ball is located at (q, 2L).
multiply the first by cos θ, the second by sin θ, add, and cancel M2 to get
u + M2 Lθ̇2 sin θ
M1 + M2 M2 L cos θ q̈
= .
cos θ L θ̈ g sin θ
Thus
u + M2 Lθ̇2 sin θ − M2 g sin θ cos θ
q̈ =
M1 + M2 sin2 θ
−u cos θ − M2 Lθ̇2 sin θ cos θ + (M1 + M2 )g sin θ
θ̈ = .
L(M1 + M2 sin2 θ)
The natural state is (positions and velocities) x = (x1 , x2 , x3 , x4 ) = (q, θ, q̇, θ̇) so that in terms of state variables
we have
ẋ1 = x3
ẋ2 = x4
u + M2 Lx24 sin x2 − M2 g sin x2 cos x2
ẋ3 =
M1 + M2 sin2 x2
−u cos x2 − M2 Lx24 sin x2 cos x2 + (M1 + M2 )g sin x2
ẋ4 = .
L(M1 + M2 sin2 x2 )
Again, these have the form
ẋ = f (x, u).
We might take the output to be the positions
q x1
y= = = h(x).
θ x2
The system is highly nonlinear; as you would expect, it can be approximated by a linear system for |θ| small
enough, say less than 5◦ . N
In order to apply the analysis and design tools of this course we need an LTI plant. In the next example we
linearize the pendulum on the cart.
Example 5.1.2. (Pendulum on a Cart - linearization) An equilibrium configuration (Definition 2.5.1)
x̄ = (x̄1 , x̄2 , x̄3 , x̄4 ) , ū satisfies f (x̄, ū) = 0, i.e.,
x̄3 = 0
x̄4 = 0
ū + M2 Lx̄24 sin x̄2 − M2 g sin x̄2 cos x̄2 = 0
−ū cos x̄2 − M2 Lx̄24 sin x̄2 cos x̄2 + (M1 + M2 )g sin x̄2 = 0.
Multiply the third equation by cos x̄2 and add to the fourth: We get in sequence
x̄ = (arbitrary, 0 or π, 0, 0), ū = 0.
This makes good physical sense because the system is at rest when there are no applied forces; all the velocities
are zero; the pendulum is pointing either up or down; and the position of the cart doesn’t matter. We have to
choose x̄2 = 0 (pendulum up) or x̄2 = π (pendulum down). Let’s take x̄2 = 0. Then the Jacobians compute to
0 0 1 0
0
0 0 0 1 0
A= , B= .
0 −MM1 g
2
0 0 1
M1
M1 +M2 g 1
0 M1 L 0 0 − LM1
Remark 5.1.1. Example 5.1.2 uses the general method of linearizing introduced in Section 2.5. In this partic-
ular example, there’s a faster way, which is to approximate sin θ ≈ θ, cos θ ≈ 1 in the original equations:
M1 q̈ = u − F1 θ
d2
M2 (q + Lθ) = F1 θ
dt2
0 = M2 g − F1 .
These equations are already linear and lead to the above matrices A and B.
Example 5.1.3. (Pendulum on a Cart - control design) Consider the linearized cart-pendulum from the
previous example. Take M1 = 1 kg, M2 = 2 kg, L = 1 m, g = 9.8 m/s2 . Then the state-space model is
0 0 1 0 0
0 0 0 1 0
ẋ = Ax + Bu, A= 0 −19.6 0 0
, B = 1 .
0 29.4 0 0 −1
Let’s suppose we designate the cart position as the only output: y = x1 . Then
C= 1 0 0 0 .
Y (s) s2 − 9.8
= P (s) = 2 2 .
U (s) s (s − 29.4)
The poles and zeros of P (s) are shown in Figure 5.3a. Having three poles in Re (s) ≥ 0, the plant is quite
unstable. The right half-plane zero doesn’t contribute to the degree of instability, but, as we shall see, it does
make the plant quite difficult to control. The block diagram of the plant by itself is shown in Figure 5.3b.
Let us try to stabilize the plant by feeding back the cart position, y, comparing it to a reference r, and
setting the error r − y as the controller input as shown in Figure 5.4. Here C(s) is the transfer function of the
controller to be designed. One controller that does in fact stabilize is
1.5
0.5
y(t)
−0.5
−1
−1.5
0 2 4 6 8 10 12
time (s)
(a) Reference signal (desired cart position). (b) Output signal (cart position).
the cart move right 0.1 m for 5 seconds, then return to its original position. Figure 5.5b is a plot of the cart
position x1 versus t. The cart moves rather wildly as it tries to balance the pendulum—it’s not a good controller
design—but it does stabilize.
We mentioned that our controller C(s) is open-loop unstable. It can be proved (it’s beyond the scope of this
course) that every controller that stabilizes this P (s) is itself unstable (see the notion of strong stabilization
in, for instance, [Doyle et al., 1990]). N
Y (s) 1
=
R(s) s+1
which by Theorem 3.5.4 is BIBO stable. On these grounds we’d say that the system is BIBO stable, wash our
hands of the stability question and walk away. In doing so we’d be too hasty. To see why this is so, suppose
that the system admits some noise as in Figure 5.8.
Definition 5.2.1. The feedback system in Figure 5.6 is well-posed if 1 + C(s)P (s) is not identically equal to
zero. Otherwise, it is said to be ill-posed.
An ill-posed system is not meaningful, does not work properly, and should be avoided.
Example 5.2.2. (Ill-Posed) Consider the feedback system in Figure 5.6 with
In this case 1 + C(s)P (s) ≡ 0 and the system is ill-posed. The dependent signals e, u and y cannot be uniquely
determined from the independent signals r and d. N
Assumption 5.2.2. The plant P (s) and controller C(s) are rational, the controller C(s) is proper, and the
plant P (s) is strictly proper. J
Exercise 5.1. Show that Assumption 5.2.2 implies that 1 + P C is not identically zero.
Assumption 5.2.2 is also ensures that the closed-loop system is causal as illustrated in the next example
1 + 2s + as2
C(s)P (s) =
s2 + s + 1
where a ∈ R is unspecified. If a 6= 0 then Assumption 5.2.2 is violated. The transfer function from r to y is
(see Section 2.9)
Y (s) C(s)P (s) 1 + 2s + as2
= = .
R(s) 1 + C(s)P (s) (1 + a)s2 + 3s + 2
If, and only if, a = −1 the TF is improper and hence non-causal2 . N
ẋp = Ap xp + Bp u
ẋc = Ac xc + Bc e
u = Cc x c + D c e
e = −Cp xp .
2
And, incidentally, also unstable by Theorem 3.5.5.
Definition 5.2.3. The feedback system in Figure 5.6 is internally stable if the state model ẋcl = Acl xcl is
asymptotically stable.
The concept of internal stability means that with no exogenous inputs applied (r = d = 0), the internal
states xp (t), xc (t) decay to zero for every initial state xp (0), xc (0). By Proposition 3.4.2 the feedback system is
internally stable if and only if all the eigenvalues of the matrix Acl have negative real part.
ẋp = xp + u
y = xp
u = 2e
Acl = Ap − Bp Cc Cp = −1.
The 1 × 1 matrix Acl has one eigenvalue at λ = −1. Therefore, the unstable plant 1/(s − 1) is internally
stabilized by unity feedback with a proportional (pure gain) controller 2. N
Example 5.2.5. We re-visit Example 5.2.1 and show that we cannot internally stabilize the plant P (s) =
1/(s − 1) by cancelling the unstable pole. Consider the controller C(s) = (s − 1)/(s + 1) and the system in
Figure 5.7. We saw in Example 5.2.1 that the transfer function from r to y is BIBO stable but that any noise at
the interface of the systems will potentially be dangerously magnified in the output. We now show that while
the instability is not apparent by only looking at input and output signals, it is apparent when we examine
internal stability.
Figure 5.10 shows state models for each transfer function. We have, with r = 0,
ẋp = xp − 2xc
ẋc = −xc
and therefore
ẋp 1 −2 xp
= .
ẋc 0 −1 xc
The system is not internally stable since the eigenvalues of this matrix are {1, −1}. N
E = R − PU
U = D + CE.
Definition 5.2.4. The feedback system in Figure 5.6 is input-output stable provided e, u, and y are bounded
signals whenever r and d are bounded signals; briefly, the system from (r, d) to (e, u, y) is BIBO stable.
Input-output stability is equivalent to saying that the 6 transfer functions from (r, d) to (e, u, y) are BIBO
stable, in the sense that all poles are in Re (s) < 0. Since whenever r and e are bounded, so is y = r − e, it
suffices to look at the 4 transfer functions from (r, d) to (e, u), namely,
1 −P
E 1 + PC 1 + PC R
= D .
U C 1
1 + PC 1 + PC
Remark 5.2.5. An alternative definition for input-output stability of an interconnected system is: a feedback
system is input-output stable if and only if every possible transfer function in the system (imagine introducing
noise everywhere) is BIBO stable.
Example 5.2.6.
1 s−1
P (s) = , C(s) =
s2 −1 s+1
The four transfer functions are
(s + 1)2
s+1
s2 + 2s + 2 (s − 1)(s2 + 2s + 2)
E R
= D .
U
(s + 1)(s − 1) (s + 1)2
s2 + 2s + 2 s2 + 2s + 2
Three of these are stable; the one from D to E is not. Consequently, the feedback system is not input-output
stable. This is in spite of the fact that a bounded r produces a bounded y. The problem here is that C cancels
an unstable pole of P . That isn’t allowed. N
Example 5.2.7.
1
P (s) = , C(s) = K.
s−1
The feedback system is input-output stable if and only if K > 1 (check). This again shows that a feedback
system can be stable even if the individual components are unstable. N
We assume the polynomials (Np , Dp ) are coprime, i.e., have no common factors, and (Nc , Dc ) are coprime too.
Definition 5.2.6. The characteristic polynomial of the feedback system in Figure 5.6 is π(s) := Np Nc +
Dp Dc .
The characteristic polynomial of a feedback system is the least common multiple of the denominators in the
four transfer functions from (r, d) to (e, u), i.e.,
−P
1
1+P C 1+P C
= 1 Dp Dc −Np Dc
. (5.1)
C 1 Np Nc + Dp Dc Dp Nc Dp Dc
1+P C 1+P C
Example 5.2.8.
1 s−1
P (s) = , C(s) = .
s2 − 1 s+1
We have seen that with the plant and controller combination the system is not feedback stable because the trans-
fer function from d to e is unstable. Notice the unstable pole-zero cancellation. The characteristic polynomial
is
π(s) = s − 1 + (s2 − 1)(s + 1) = (s − 1)(s2 + 2s + 2).
This has a right half-plane root – precisely the root that the controller cancels. N
Theorem 5.2.7. The feedback system is input-output stable if and only if the characteristic polynomial has no
roots with Re(s) ≥ 0.
Proof. (⇐ Sufficiency) If Np Nc + Dp Dc has no roots in Re(s) ≥ 0, then the four transfer functions on the
left-hand side of (5.1) have no poles in Re(s) ≥ 0, and hence they are stable.
(⇒ Necessity) Conversely, assume the feedback system is stable, that is, the four transfer functions on the
left-hand side of (5.1) are BIBO stable. To conclude that Np Nc + Dp Dc has no roots in Re(s) ≥ 0, we must
show that the polynomial Np Nc + Dp Dc does not have a common factor with all four numerators in (5.1),
namely, Dp Dc , Np Dc , Nc Dp . That is, we must show that the four polynomials
Np Nc + Dp Dc , Dp Dc , Np Dc , Nc Dp
Exercise 5.2. Show that the polynomials Np Nc + Dp Dc , Dp Dc , Np Dc , Nc Dp do not have a common root. Hint: use the fact
that the pair (Np , Dp ) is coprime and the pair (Nc , Dc ) is coprime.
Definition 5.2.8. The plant P (s) and controller C(s) have a pole-zero cancellation at s = λ ∈ C if
Corollary 5.2.9. If there is an unstable pole-zero cancellation, then the feedback system is not input-output
stable.
+
Proof. If there is an unstable pole-zero cancellation at λ ∈ C , then
Remark 5.2.10. In practice, it is not possible to exactly cancel a plant zero or pole because of modelling errors.
In Example 5.2.6 therefore the transfer function from r to y will also be unstable. However, it is important to
stress that even in the ideal case with a perfect pole-zero cancellation, we still get an unstable system.
Theorem 5.2.11. The feedback system is input-output stable if, and only if,
Example 5.2.9.
1 s−1
P (s) = , C(s) =
s2 − 1 s+1
Check that 1) holds but 2) does not. N
Remark 5.2.12. Occasionally we will encounter non-unity feedback system as shown in Figure 5.11. This is
the case when we model the dynamics of the sensor that provides the feedback using a transfer function H(s).
The exogenous signal n models sensor noise. If we write
Np Nc Nh
P = , C= , H=
Dp Dc Dh
π(s) = Nc Np Nh + Dc Dp Dh .
In this case we have feedback stability if and only if all the roots of π(s) are in C− .
Exercise 5.4. Find the 9 transfer functions from (r, d, n) to (v, u, y).
The Routh-Hurwitz criterion is an algebraic test for a polynomial π(s) to be Hurwitz without having to
calculate its roots [Routh, 1877].
Proof. Assume that π ∈ R[s] is Hurwitz. Let {λ1 , . . . , λr } be the real roots of π and let {µ1 , µ̄1 , . . . , µs , µ̄s } be
the complex conjugate roots of π. Then n = r + 2s. Factor the polynomial as
For the real roots −λi > 0 since π is Hurwitz by assumption. For the complex conjugate roots we expand
Note that µi µ̄i = |µi |2 > 0 and −(µi + µ̄i ) = −2 Re (µi ) > 0 since π is Hurwitz by assumption. Therefore, when
we expand π(s), every coefficient will be have the same sign as the coefficient multiplying sn .
Example 5.3.1.
s4 + 3s3 − 2s2 + 5s + 6 (a bad root)
s3 + 4s + 6 (a bad root)
3 2
s + 5s + 9s + 1 (don’t know).
N
Remark 5.3.2. The definition of the coefficients (5.3) can be expressed using determinants
1 ri−2,0 ri−2,j+1 n−i
ri,j = − det , i ∈ {2, . . . , n} , j ∈ 0, . . . , .
ri−1,0 ri−1,0 ri−1,j+1 2
Theorem 5.3.3 (Routh-Hurwitz Stability Criterion). Consider a polynomial π ∈ R[s] given by (5.2) and its
associated Routh array in Table 5.1. The number of roots of π with real part greater than or equal to zero equals
the number of sign changes in the first column of the array.
Example 5.3.2.
π(s) = a2 s2 + a1 s + a0 , a2 6= 0.
s2 a2 a0 0
s1 a1 0 0
a1 a0
s0 a1 = a0 0 0
We conclude that all the roots of π are in C− if and only if a0 , a1 , a2 have the same sign. N
Example 5.3.3.
π(s) = 2s4 + s3 + 3s2 + 5s + 10.
s4 2 3 10 0
s3 1 5 0 0
3−10
s2 1 = −7 10 0 0
−35−10
s1 −7 = 45
7 0 0 0
s0 10 0 0 0
There are two sign changes in the first column so π(s) has two roots in C+ . N
The next example illustrates the utility of the Routh-Hurwitz criterion.
Example 5.3.4. Consider the unity feedback system in Figure 5.12 with
1
P (s) = , C(s) = Kp .
s4 + 6s3 + 11s2 + 6s
Find all Kp ∈ R such that the feedback system is stable. From Section 5.2.2 we know that the system is
feedback stable if and only if all the roots of π(s) are in C− . In this case
s4 1 11 Kp 0
s3 6 6 0 0
s2 10 Kp 0 0
3
s1 5 (10 − Kp ) 0 0 0
s0 Kp 0 0 0
We need all entries in the first column to be positive. From the s1 row we get the constraint Kp < 10. From
the s0 row we get the constraint Kp > 0. Therefore the system is feedback stable provided Kp ∈ (0, 10). N
Special cases
In using Routh’s array there are sometimes special cases that require extra steps to be taken. For example, we
see that in building the array, we cannot proceed when one of the elements in the first column is zero. In this
case we can immediately conclude that the polynomial is unstable.
Example 5.3.5. Consider π(s) = s5 + 3s4 + 2s3 + 6s2 + 3s + 3. We then have
s5 1 2 3
s4 3 6 3
s3 0 2
s2 r3,0
s1
s0
Since r2,0 = 0, the next element r3,0 cannot be computed. We can stop at this point and conclude that π(s) is
unstable since the elements in the first column aren’t all positive. N
The second special case we consider is when an entire row of Routh’s array is zero. If row sn−k is all zero
it means that the polynomial πa (s) = rk−1,0 sn−k+1 + rk−1,1 sn−k−1 + rk−1,2 sn−k−3 + rk−1,3 sn−k−5 + · · · divides
the original polynomial π. The polynomial πa is sometimes called an auxiliary polynomial. It consists of
only even or odd powers of s, where the coefficients come from the row above the row of zeros. By the result
from Section 5.3.1 we conclude that πa is not Hurwitz and therefore niether is π.
Example 5.3.6. Consider π(s) = s6 + 5s5 + 2s4 + 5s3 + 4s2 + 15s + 3. The associated Routh table is
s6 1 2 4 3
s5 5 5 15 0
s4 1 1 3
s3 0 0
s2
s1
s0 .
Thus πa (s) = s4 + s2 + 3 and π(s) = πa (s) s2 + 5s + 1 . The roots of πa (s) are s = ±0.785 ± j1.06.
N
1. Transient performance: depends in a complicated way on the location of the closed-loop poles and zeros.
If the closed-loop system is dominated by a first or second order system, then we can use the results of
Chapter 4.
2. Steady-state performance: This refers to specifications like tracking reference signals and rejecting distur-
bance signals.
Example 5.4.1. Consider the unity feedback system in Figure 5.13 with
1 1
P (s) = , C(s) = .
s+1 s
Let r be a step input, r(t) = r0 1(t). Then we have
1
E(s) = R(s)
1 + P (s)C(s)
s(s + 1) r0
=
s2 + s + 1 s
s+1
= 2
r0 .
s +s+1
The FVT applies to E(s), and e(t) → 0 as t → ∞. Thus the feedback system provides asymptotic tracking of
step reference signals with zero steady-state error.
How it works: C(s) contains an internal model of R(s) (i.e., an integrator); closing the loop creates a zero
from R(s) to E(s) to exactly cancel the unstable pole of R(s). (This isn’t an illegal pole-zero cancellation.) N
Remark 5.4.1. Tracking error is always defined by e := r − y where r is the command or reference input and
y is the plant output. In a unity feedback control system, as in Figure 5.6, the tracking error is the input to
the controller. If the sensor TF in the feedback path is not 1, as in Figure 5.11, then the signal coming out of
the negative feedback summing junction is not the tracking error.
Step inputs
Let’s generalize the preceding example. Consider the unity feedback control system in Figure 5.6 and write
E(s) 1 Dp Dc
= = . (5.4)
R(s) 1 + CP Np Nc + Dp Dc
Suppose that R(s) = r0 /s, i.e., r(t) = r0 1(t) for some constant r0 ∈ R. If we assume that the controller C(s)
stabilizes the closed-loop system, then π(s) = Np Nc + Dp Dc has all its roots in C− , the TF (5.4) is BIBO stable,
and the final-value theorem applies. Application of the FVT to the tracking error yields
1 s r0 r0
ess = lim e(t) = lim sE(s) = lim s R(s) = lim = lim .
t→∞ s→0 s→0 1 + C(s)P (s) s→0 1 + C(s)P (s) s s→0 1 + C(s)P (s)
Therefore ess = 0 if and only if P (0)C(0) = ∞. This means that P (s)C(s) has at least one pole at s = 0, i.e.,
at least one integrator.
If P (s) does not have a pole at s = 0 and we want perfect step tracking, then we must choose
1
C(s) = C1 (s)
s
so that C(s)P (s) has an integrator. Then C1 (s) is designed to provide feedback stability. The integrator adds
more phase lag though and this can make the overall system harder to stabilize.
Ramp inputs
Now let’s try a non-constant reference input.
Generalizing the preceding example, suppose that R(s) = r0 /s2 (ramp reference r(t) = r0 t, t ≥ 0, r0 ∈ R).
If we assume that the controller C(s) provides input-output stability then π(s) has all its roots in C− and the
TF (5.4) is BIBO stable. Let’s try and apply the final-value theorem
s r0 r0
ess = lim e(t) = lim sE(s) = lim 2
= .
t→∞ s→0 s→0 1 + C(s)P (s) s sC(s)P (s) s=0
We observe:
(i) If C(s)P (s) has no poles at s = 0 then we can’t even apply the FVT since sE(s) has bad poles. It
turns out that ess is unbounded in this case. This doesn’t contradict the assumption that C(s) provides
input-output stability because the input is unbounded.
r0
(ii) If C(s)P (s) has one pole at s = 0 then ess = C(0)P (0) is finite and non-zero.
(ii) If C(s)P (s) has two or more poles at s = 0 then ess equals zero.
Theorem 5.4.2 (Internal model principle). Assume that P (s) is strictly proper, C(s) is proper and the feedback
system is stable. If C(s)P (s) contains an internal model of the unstable part of R(s), then perfect asymptotic
tracking occurs.
The internal model principle of Theorem 5.4.2 can be understood as follows. Suppose that the Laplace
transform of the reference signal r(t) is R(s) = L {r(t)}. Write
Nr (s) Nr (s)
R(s) = = +
Dr (s) Dr (s)Dr− (s)
where the roots of the polynomial Dr− (s) are in C− (Re (s) < 0) while the roots of the polynomial Dr+ (s) are
+
in C (Re (s) ≥ 0). The internal model principle says that in order for the plant output y(t) to asymptotically
converge to r(t), the product C(s)P (s) should have the form
N (s)
C(s)P (s) =
D(s)Dr+ (s)
where N (s), D(s) ∈ R[s] are polynomials. That is, the product C(s)P (s) must have a copy of Dr+ (s) in its
denominator.
Then
r0
R(s) = .
s2 +1
In this case Nr (s) = r0 and Dr+ (s) = s2 + 1, Dr− (s) = 1. Since the plant doesn’t contain a copy of Dr+ (s), the
internal model principle suggests that we should pick a controller of the form
1 1
C(s) = C1 (s) = C1 (s)
Dr+ (s) s2 +1
where C1 (s) ∈ R(s) is a TF yet to be determined. That is, we embed an internal model of the unstable part
of R(s) in C(s) and allow an extra factor C1 (s) to achieve feedback stability. You can check that C1 (s) = s
works. N
Remark 5.4.3. The internal model principle of Theorem 5.4.2 is only concerned with the unstable part of the
Laplace transform R(s) of the reference signal r(t). For example, if r(t) = e−t + sin (t) then
1 1 s2 + s + 2
R(s) = + 2 = .
s+1 s +1 (s + 1)(s2 + 1)
In this case Dr− (s) = s + 1 and Dr+ (s) = s2 + 1. The internal model needs to include the poles at s = ±j (roots
of Dr+ (s)) but not the pole at s = −1. This is because the part of r(t) corresponding to stable pole decays to
zero in steady-state and hence there is nothing to asymptotically track.
To help understanding, it is useful to interpret the internal model principle in the frequency domain.
20
-20
-40
Magnitude (dB)
-60
-80
-100
-120
-140
-160
135
90
Phase (deg)
45
-45
10 -2 10 -1 10 0 10 1
Frequency (rad/s)
E(s) 1 s3 + s2 + s + 1
= = 3 =: S(s).
R(s) 1 + C(s)P (s) s + s2 + 2s + 1
Figure 5.14 shows the Bode plot of the frequency response S(jω). Notice that the system heavily attenuates
signals at the frequency 100 = 1 rad/s. Indeed, the internal model introduces zeros at s = ±j in S which creates
a notch filter. Any reference signals at this frequency result in zero steady-state error as we saw using the FVT
in the previous example. N
Exercise 5.5. At what frequencies do you expect the Bode plot of E/R from Example 5.4.1 to heavily attenuate signals? Confirm
your response by plotting the Bode plot.
In summary, we have the following facts:
• If the closed-loop system is unstable, we can’t even talk about steady-state tracking performance since
there will likely not be a steady-state response.
• Even if the closed-loop system is stable, we have to be careful applying the FVT to compute the steady-
state tracking error because, depending on the reference signal, sE(s) may have poles in Re (s) ≥ 0.
• If the closed-loop system is stable and P (s)C(s) contains an internal model of the unstable part of R(s),
then perfect asymptotic tracking occurs.
• It does not matter if P (s) or C(s) provide the internal model. Perfect asymptotic tracking occurs when
the product C(s)P (s) has an internal model of the unstable part of R(s).
• If C(s)P (s) does not contain an internal model, then increasing the gain |C(jω)P (jω)| over the range of
frequencies that r(t) contains decreases the steady-state tracking error. This is consistent with the idea
that high-gain leads to good performance.
modelled as a disturbance. Consider a system with an input disturbance di , an output disturbance d0 and
sensor noise n(t) illustrated in Figure 5.15. We can once again use the final-value theorem to check for the
Therefore the disturbance will have no steady-state effect on the output if and only if C(0)P (0)H(0) = ∞,
i.e., C(s)P (s)H(s) has at least one pole at the origin. We conclude that the output disturbance do (t) = 1(t)
has no effect on the steady-state output of this system as long as (i) the system is feedback stable and (ii)
C(s)P (s)H(s) has at least one pole at the origin. N
As seen in Figure 5.15, disturbances can appear at the input to a plant and/or the output to a plant. In this
section we adopt a unified description that encompasses both types of disturbances. Specifically, for a nominal
plant model P (s) with input U (s) and output Y (s), we’ll assume that a disturbance D(s) acts on the plant at
some intermediate point, i.e., we model the plant as follows:
Y (s) = P2 (s) (D(s) + P1 (s)U (s)) = P2 (s)D(s) + P2 (s)P1 (s)U (s). (5.5)
where P (s) = P2 (s)P1 (s). The generalized model of plant disturbances in a feedback loop are shown in
Figure 5.16. If P1 (s) = 1, then d(t) is an input disturbance. If P2 (s) = 1, then d(t) is an output disturbance.
Note that Figure 5.16 does not include measurement noise, i.e., it doesn’t include the signal n(t) from Figure 5.15.
Example 5.4.6. The generalized disturbance model allows us to handle more than just input and output
disturbances. Consider a plant with state-space model
0 1 0 0.3
ẋ(t) = x(t) + u(t) + d(t)
0 0 1 0
y(t) = 1 0 x(t).
Here u is the plant input while d is a disturbance. Find the transfer functions P1 (s) and P2 (s) so that the
input-output model of this plant has the structure (5.5).
The TF from U (s) to Y (s) is
s −1 −1 0
Y (s) 1 s 1 0 1
= 1 0 = 2 1 0 = 2.
U (s) 0 s 1 s 0 s 1 s
s −1 −1 0.3
Y (s) 1 s 1 0.3 0.3
= 1 0 = 2 1 0 = .
D(s) 0 s 0 s 0 s 0 s
Therefore
10 1 0.3
P1 (s) = , P2 (s) = .
3 s s
N
We are interested in understanding when a closed-loop system is able to asymptotically reject disturbances
in steady-state. Assume throughout that the controller C(s) provides input-output stability. The TF from
D(s) to Y (s) for the system in Figure 5.16 is
Y (s) P2 (s)
= .
D(s) 1 + C(s)P2 (s)P1 (s)
Suppose that D(s) = L {d(t)} is the Laplace transform of the disturbance signal and write
Nd (s) Nd (s)
D(s) = = +
Dd (s) Dd (s)Dd− (s)
where the roots of the polynomial Dd− (s) are in C− (Re (s) < 0) while the roots of the polynomial Dd+ (s) are
+
in C (Re (s) ≥ 0). We’d like to use the FVT to determine the steady-state effect of the disturbance on the
+
output so let’s determine conditions under which sY (s) has no poles in C . We have
P2 (s)
sY (s) = D(s)
1 + C(s)P2 (s)P1 (s)
P2 (s) Nd (s)
=s .
1 + C(s)P2 (s)P1 (s) Dd (s)Dd− (s)
+
Now write C(s) = Nc (s)/Dc (s), P1 (s) = Np1 (s)/Dp1 (s), P2 (s) = Np2 (s)/Dp2 (s) so that
Since the controller provides input-output stability, the characteristic polynomial π(s) = Dc (s)Dp1 (s)Dp2 (s) +
Nc (s)Dp2 (s)Dp1 (s) is Hurwitz. Therefore, sY (s) has no poles with Re (s) ≥ 0 if the product Np2 (s)Dc (s)Dp1 (s)
contains a copy of the polynomial Dd+ (s). In summary, we’ve shown that if C(s) provides input-output stability
and the product Np2 (s)Dc (s)Dp1 (s) contains a copy of the polynomial Dd+ (s), then the final-value theorem
applies and
Np2 (s)Dc (s)Dp1 (s) Nd (s)
lim y(t) = lim sY (s) = lim s = 0.
t→∞ s→0 s→0 Dc (s)Dp1 (s)Dp2 (s) + Nc (s)Dp2 (s)Dp1 (s) Dd (s)Dd− (s)
+
r(t) = r0 1(t) while rejecting measurement error modelled as a constant bias n(t) = n0 1(t). Measurement noise
was not considered in our derivations of disturbance rejecting controllers so let’s apply first principles to see if
we can reject the error. The TF from N (s) = L {n(t)} to Y (s) is
Y (s) −C(s)P (s)
= .
N (s) 1 + C(s)P (s)
If N (s) = n0 /s and C(s) provides feedback stability, then by the FVT
−C(0)P (0)
lim y(t) = n0 .
t→∞ 1 + C(0)P (0)
This means that the steady-state error due to measurement error is zero only if C(s)P (s) has a zero at the
origin. However, if C(0)P (0) = 0, then y can never track a reference of the form r0 1(t) because the controller
can’t provide an internal model of R(s) without causing an unstable pole-zero cancellation. This shows that
the feedback system is not capable of rejecting measurement error of the form n0 1(t) if it is required to track
signals of the same form. This makes a lot of intuitive sense. If we wish to track a step and there is a step
measurement error, then the controller can never know the true value of the output and cannot take appropriate
actions. N
5.5 Summary
This chapter contains some of the most important ideas in this course. The following concepts should be
understood and gleamed after reading this chapter.
1. We have to be careful when we start to interconnect LTI systems because stability of the interconnected
system does not follow from stability of the individual components.
2. We gave two definitions for what it means for the system in Figure 5.6 to be stable. Internal stability
(Definition 5.2.3) dealt with the closed-loop state model whereas input-output stability (Definition 5.2.4)
dealt with the various transfer functions in the loop.
3. You must know how to test for both internal stability and input-output stability.
5. You should know what the characteristic polynomial is for a feedback system and how to find it for unity
feedback systems and non-unity feedback systems.
6. Section 5.3 covered the Routh-Hurwitz criterion. You must be able to use these tests to check for stability.
7. You should understand the internal model principle (Theorem 5.4.2) and be able to determine the steady-
state tracking error and disturbance response for a stable feedback system using the final-value theorem.
Root-locus method
The poles of a system tell us a lot about the behaviour of the system. They determine stability (directly)
and transient performance (in a complicated way). In this chapter we study the roots of polynomials when
the coefficients depend linearly on a parameter. In control systems, the parameter is typically the gain of a
feedback loop, and our interest is in choosing the gain so that the closed-loop system is internally stable.
The manner of studying such problems in this chapter is to understand how the roots move in the complex
plane as functions of the parameter. That is to say, we look at the locus of all roots of the polynomial as the
parameter varies, hence the name “root-locus.” The root-locus shows us, graphically, how the closed-loop poles
of a control system move around the s-plane as a single parameter is varied. The root-locus can be very easily
and quickly sketched by hand which makes it an efficient tool for analysis and, to some extent, design1 .
Contents
6.1 Basic root-locus construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
6.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
6.3 Non-standard problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
6.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Definition 5.2.6) is π(s) = Np (s)Nc (s) + Dp (s)Dc (s). The closed-loop system is internally stable if and only if
all the roots of π are in C− , see Theorem 5.2.7.
1
The root-locus method was put forth by Walter Evans [Evans, 1948], [Evans, 1950].
137
6.1. Basic root-locus construction 138
Example 6.1.1. To get a feeling for what a root-locus diagram looks we first consider a simple example in
which we can compute the closed-loop poles explicitly. Suppose that
1
C(s) = K, P (s) = .
s(s + 2)
2 +2s+K. Using the quadratic formula from high school the roots of the characteristic polynomial
Then π(s) = s√
are s = −1 ± 1 − K. From this equation we make the following observations.
• If K ∈ (0, 1], the closed-loop system has two real poles in C− and is stable.
• If K ∈ (1, +∞), the closed-loop system has complex conjugate poles with real part −1 and hence it is
stable.
From these observations we can sketch a plot that shows how the closed-loop poles vary as K goes from 0 to
+∞. The sketch is shown in Figure 6.2.
Figure 6.2: Locus of roots for s2 + 2s + K as K goes from 0 to +∞. The roots when K = 0 are denoted by the symbol ×.
This plot shows us that the system is stable for all K > 0 (infinite gain margin, see Chapter 8). The same
information could have been obtained using the Routh-Hurwitz criterion but this figure contains much more
information. We see that as K → +∞ the closed-loop system becomes less damped, the step response has more
overshoot and its frequency of oscillation increases. This suggests that for a good step response we shouldn’t
choose K too large for this system. N
We now show how to draw root-locus diagrams for higher order polynomials. Consider the system in
Figure 6.3 where we have pulled a gain K out of the controller.
The characteristic polynomial of this system is π(s) = D(s)+KN (s) where N (s) := Np Nc and D(s) := Dp Dc .
The roots of the characteristic polynomial are of course
The root-locus is a drawing of how the roots of π(s) = D(s) + KN (s) vary as a function of K ∈ R. For
now we make the following assumption.
Assumption 6.1.1. Let D, N ∈ R[s] and let n := deg D(s) and m := deg N (s).
1. C(s)P (s) is proper, i.e., n ≥ m.
2. K ≥ 0.
3. N (s) and D(s) are monic, i.e., their leading coefficients are 1. J
In Section 6.3 we’ll see how to handle cases where items 1 and 2 in Assumption 6.1.1 don’t hold. As for item
3, that D should be taken as monic seems natural from (6.1). As for N , it can be made monic by redefining K
if necessary.
Remark 6.1.2. As with Bode and Nyquist plots, the root-locus of a polynomial can be generated using software.
The MATLAB graphical user interfaces started by the commands rltool or sisotool are very powerful. We
discuss how to do these plots by hand because, in most cases, it is more important to quickly determine the
trend of the root loci rather than the exact root-locus plot.
Construction rules
Rule 1 The root-locus of D(s) + KN (s) is symmetric about the real axis.
This rule follows from the fact that π ∈ R[s] so that it’s complex roots always appears as conjugate pairs.
Rule 4 When K = 0 the roots of D(s) + KN (s) equal the roots of D(s).
Rule 5 As K → +∞ there are m branches of the root-locus that approach the roots of N (s).
This follows from re-writing D(s) + KN (s) = 0 in the form
1
D(s) + N (s) = 0.
K
As K → +∞, the s with finite magnitude for which this equation holds approach the roots of N .
Rule 6 The n − m branches of the root-locus that do not approach the zeros of N (s) asymptotically tend towards
infinity following asymptotes that originate from the point
P P
roots of D(s) − roots of N (s)
σ := (centroid of π). (6.2)
n−m
The angles of the asymptotes are φ1 , . . . , φn−m where
(2k − 1) π
φk := , k ∈ {1, . . . , n − m} . (6.3)
n−m
Figure 6.4 shows the asymptote patterns for different values of n − m.
Rule 7 (“no–yes–no rule”) A point s0 on the real axis is part of the root-locus if, and only if, s0 is to the left of
an odd number of poles and zeros of P (s)C(s) = N (s)/D(s).
This rule follows from (6.1) and the angular constraint each point s0 on the root-locus must satisfy
1
]N (s0 ) − ](D(s0 )) = ] − =π (for K > 0). (6.4)
K
Rule 8 (angles of arrival and departure) As K varies from 0 to +∞ the angle that a branch of the root-locus
makes when leaving a root of D(s) (departure angle) and the angles of branches that arrive at roots of
N (s) (arrival angle) can be computed using (6.4).
To find these angles note that at each point on the root-locus we have
where zi ∈ C are the roots of N (s) and pi ∈ C are the roots of D(s).
For example, let θpi denote the angle of departure from pi . Then θpi satisfies
m
X n
X
θpi = ](pi − zj ) − ](pi − pj ) − π.
j=1 j=1
j6=i
Rule 9 Given a point s ∈ C on the root locus, the corresponding value of K is given by
D(s)
K=− .
N (s)
Rule 10 The values of K for which the root-locus crosses the imaginary axis can be computed using the Routh
array. See Examples 5.3.6 and 7.2.2.
1. Compute the roots {z1 , . . . , zm } of N (s) and place a at the location of each root in C.
2. Compute the roots {p1 , . . . , pn } of D(s) and place a × at the location of each root in C.
3. Use the “no–yes–no” rule (Rule 7) to fill in the portion of the real axis that are on the root-locus.
6. Use Rule 8 to compute the departure and arrival angles. This is usually only needed for complex conjugate
pairs and, occasionally, repeated real roots.
7. If you are lucky, you can give a reasonable guess as to how the root-locus behaves.
The last step is in some sense the most crucial. It is possible that one can do the steps preceding it, and still
get the root-locus wrong. Some experience is involved in knowing how a “typical” root-locus diagram looks,
and then extrapolating this to a given example.
6.2 Examples
4. The centroid is
0 + (−1 − j2) + (−1 + j2) − (−4)
σ= =1
3−1
5. The asymptotes are
π 3π π
φ1 = , φ2 = ∼− .
2 2 2
When K 1 2
√ = 5 we get a row of zeros in s . The auxiliary polynomial is πa (s) = 2s + 20 whose roots are
s = ±j 10. Thus the root-locus plot cross jR at these points when K = 5.
With this information along with Rule 1 and the “no–yes–no” rule we can obtain the root-locus as shown in
Figure 6.6. N
Exercise 6.1. Re-create the root-locus in Figure 7.3 using the procedure outlined in this chapter.
Root-locus diagrams are useful for deciding on the structure of the controller as the next four examples
demonstrate.
Example 6.2.3. (Inverted pendulum on a cart and proportional control) Consider the inverted pen-
dulum on a cart from Section 5.1 where the angle of the pendulum is taken as the output
1
P (s) = .
M1 Ls2 − g(M1 + M2 )
Can a proportional controller stabilize this system in unity feedback? With C(s) = Kp the characteristic
polynomial of the system is π(s) = D(s) + KN (s) with
g Kp
D(s) = s2 − (M1 + M2 ), N (s) = 1, K= .
M1 L M1 L
Here n = 2, m = 0 and the root-locus is drawn in Figure 6.7. We conclude that a proportional controller
cannot render the closed-loop system internally stable. N
Example 6.2.4. (Inverted pendulum on a cart and proportional-derivative control) Continuing with
the inverted pendulum on a cart, determine if an (ideal) PD controller can render the feedback system stable.
With
C(s) = Kp (1 + Td s)
the characteristic polynomial of the system is π(s) = D(s) + KN (s) with
g 1 Kp Td
D(s) = s2 − (M1 + M2 ), N (s) = s + , K= .
M1 L Td M1 L
Our root-locus rules were derived for the case where there is only one undetermined parameter in π(s). In this
example we have two free parameters – the proportional gain Kp and the derivative time constant Td . We break
the root-locus into three cases determined by the location of the root of N (s).
Case 1 (Td < 0) In this case the root of N (s) is in the right half-plane. This root is a zero of the closed-loop
system. Placing a zero in C+ means that, by Rules 5 and 7, we will not be able to stabilize the system.
Furthermore, right half-plane zeros limit the achievable performance of a closed-loop system (Section 4.4
and Section 9.6.2) so we avoid them if at all possible.
Case 2 (Td > (M1 L)/(g(M1 + M2 ))) In this case the root of N (s) is in C− between the left root of D(s) and
p
the imaginary axis. We have n = 2, m = 1. The root locus is shown in Figure 6.8a. In this case we see
that the PD controller can stabilize the closed-loop system but placing the zero between the poles limits
how fast we can make the response. The dominant pole can never move to the left of the zero no matter
how high we make the proportional gain Kp .
p p
(a) Td > (M1 L)/(g(M1 + M2 )). (b) 0 < Td < (M1 L)/(g(M1 + M2 )).
p
Case 3 (0 < Td < (M1 L)/(g(M1 + M2 ))) In this case the root of N (s) is to the left of both roots of D(s). We
still have n = 2, m = 1. The root-locus is shown in Figure 6.8b. In this case we again see that the PD
controller can stabilize the closed-loop system. The root-locus shows that we can get both poles far to
left which means a high bandwidth and fast response. On the other hand, the control effort will be high.
N
Exercise 6.2. Draw the root-locus for Case 1 of the previous example.
Example 6.2.5. (Inverted pendulum on a cart and proportional-integral control) Once again the
plant is the inverted pendulum on a cart. Determine if a PI controller can render the feedback system stable.
With
1
C(s) = Kp 1 +
Ti s
the characteristic polynomial of the system is π(s) = D(s) + KN (s) with
2 g 1 Kp
D(s) = s s − (M1 + M2 ) , N (s) = s + , K= .
M1 L Ti M1 L
In this case n = 3 and m = 1. The choice of integral time constant Ti determines the location of the root of
N (s). We consider two cases.
+ M2 ))) In this case the zero (root of N (s)) is in C− between the pole at s = 0
p
Case 1 (Ti > (M1 L)/(g(M1p
and the pole at s = − g(M1 + M2 )/(M1 L). Since n − m = 2 there are two asymptotes. The centroid is
given by p p
− g(M1 + M2 )/(M1 L) + g(M1 + M2 )/(M1 L) + 0 − 1/Ti 1
σ= =
3−1 2Ti
which means it is to the right of imaginary axis and to left of the plant’s unstable pole. The root-locus is
shown in Figure 6.9a from which we conclude that this configuration for the PI controller cannot stabilize
the pendulum on a cart system.
p
Case 2 (0 < Ti < (M1 L)/(g(M1 + M2 ))) The rootp of N (s) is now to the left of both plant poles. The analysis
is the same as in Case 1 but now if Ti < 0.5 (M1 L)/(g(M1 + M2 )), then the centroid is to the right of
the plant’s positive pole. The root-locus is shown in Figure 6.9b
p p
(a) Ti > (M1 L)/(g(M1 + M2 )). (b) 0 < Ti < (M1 L)/(g(M1 + M2 )).
Exercise 6.3. Draw the root-locus for the previous example when Ti < 0.
Exercise 6.4. Re-create the root-locus in Figure 7.6 using the procedure outlined in this chapter.
The zero locations, i.e., roots of N (s), can be placed anywhere in the complex plane by appropriately choosing
the values of Ti , Td . By breaking things down into cases based on the zero locations, we can analyse the closed-
loop system in the same manner as the previous examples. It turns out that the PID controller can stabilize
the feedback system and it provides perfect step tracking to boot! This is hardly surprising given the discussion
in Section 7.3. The diagram of the root-locus for this system is left as an exercise. N
Exercise 6.5. Draw the root-locus for K ≥ 0 for Example 6.2.6 when the roots of N (s) are complex conjugates and in C− .
Exercise 6.6. Draw the root-locus for K ≥ 0 for Example 6.2.6 when the roots of N (s) are real, distinct and to the left of both
plant poles.
In this case the loop gain is L(s) = KC(s)P (s)H(s) and the closed-loop poles satisfy 1 + L(s) = 0. The
characteristic polynomial is given by π(s) = Dc Dp Dh + KNc Np Nh =: D(s) + KN (s). This polynomial has
the same form as before so the root-locus construction proceeds in the exact same way. The unity-feedback
situation becomes a special case in which Nh = Dh = 1.
In this case C(s) cannot be written in the form KC1 (s). The characteristic polynomial of the system is
Notice that the characteristic polynomial’s coefficients are linear in the unknown parameter K but that D(s) =
s2 + 2s + 10 6= Dp Dc = s(s + 2) and N (s) = s 6= Nc Np . The root-locus for this system is shown in Figure 6.11.
N
If we define D̂(s) := N (s), N̂ (s) := D(s) and K̂ = 1/K then the polynomial π̂(s) = D̂(s) + K̂ N̂ (s) satisfies
Assumption 6.1.1 and its root-locus can be drawn for K̂ ≥ 0. In order to recover the root-locus of π from the
root-locus of π̂ we do the following.
Example 6.3.2. Consider the usual unity-feedback system in Figure 6.1 with
1 s+3
P (s) = , C(s) = .
s(s + 1) Ts + 1
Then
π(s) = (s2 + 2s + 3) + T s2 (s + 1) =: D(s) + KN (s).
In this case deg (D) = 2 < deg (N ) = 3 so we use the approach described above. Define π̂ = D̂(s) + K̂ N̂ (s)
where
1
D̂(s) := s2 (s + 1), N̂ (s) := s2 + 2s + 3, K̂ = .
T
The root-locus of π̂ is shown in Figure 6.12a while the root-locus of π is shown in Figure 6.12b. N
Negative gain
Assumption 6.1.1 asks that K ≥ 0 but it is possible to obtain a root-locus for K < 0. Such a root-locus shows
how the roots of π(s) = D(s) + KN (s) vary as K goes from 0 to −∞. The root-locus for K < 0 is called the
complementary root locus.
The analysis for K < 0 is very similar to the K > 0 case. The main difference is that, since ]− K1 = 0, the
various angle conditions are slightly modified. In particular, for K < 0, the rules presented in Section 6.1 are
modified as follows.
Rule 1 No change.
Rule 2 No change.
Rule 3 No change.
Rule 4 No change.
Rule 5 As K → −∞ there are m branches of the root that approach the roots of N (s).
Rule 7 (“no–yes–no rule”) A point s0 on the real axis, is part of the root-locus if, and only if, s0 is to the left of
an even number of poles and zeros of P (s)C(s) = N (s)/D(s).
Rule 8 (angles of arrival and departure) The angles of arrival and departure are calculated and interpreted in the
same way except that the angle criterion is
where zi ∈ C are the roots of N (s) and pi ∈ C are the roots of D(s).
Rule 9 No change.
Rule 10 No change.
6.4 Summary
In this chapter we gave a method for plotting the root-locus of a polynomial by hand. These sketches are
useful for quickly understanding a system and how changing a gain affects performance. You should know the
following.
3. Given a point on the root-locus, you should be able to compute the gain K for which the polynomial has
a root at the given point.
4. You should be able to do all the examples in Section 6.2 in full detail.
5. You should be able to draw the root-locus for any of the non-standard scenarios discussed in Section 6.3.
PID control
In this chapter we briefly introduce Proportional-Integral-Derivative (P.I.D.) controllers. This particular control
structure has become almost universally used in industrial control1 . These controllers are popular because they
are simple and have proven to be robust in the control of many important applications. The simplicity of these
controllers is also their weakness since it limits the range of plants that they can control satisfactorily. The
references [Åström and Hägglund, 1995], [Goodwin et al., 2001], [Åström and Hägglund, 2006] contain much
more information for the interested student.
Contents
7.1 Classical PID controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
7.2 Empirical tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
7.3 Pole placement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
7.4 Integrator windup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
7.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Figure 7.1: Block diagram of closed-loop system with ideal PID controllers.
1
“Based on a survey of over eleven thousand controllers in the refining, chemicals and pulp and paper industries, 97% of regulatory
controllers utilize PID feedback” [Desborough and Miller, 2002], [Åström and Murray, 2019], [Samad, 2017].
150
151 CHAPTER 7. PID CONTROL
where e(t) = r(t) − y(t) as usual. The constants Kp , Ki and Kd are called, respectively, the proportional,
integral and derivative gains.
In Figure 7.1b the integral action acts on the error, but proportional and derivative action act on the process
output y. The input output model is
Ki Ki 1
U (s) = E(s) − (Kp + Kd s) Y (s) = R(s) − Kp + Ki + Kd s Y (s). (7.3)
s s s
This setup is often preferred when the reference signal r is discontinuous, e.g., a sequence of step changes.
Differentiating a step function creates an impulse which we usually do not want in the control signal u.
Exercise 7.1. Let P (s) be real rational and write P = Np /Dp where (Np , Dp ) is coprime. Find the TF from R to Y for both
the systems in Figure 7.1. Show that the system in Figure 7.1a is input-output stable if and only if the system in Figure 7.1b is
input-output stable.
The PID controller (7.1) is sometimes expressed in the equivalent form
1
C(s) = Kp 1 + + Td s (7.4)
Ti s
where Ti is called the integral time constant or reset time while Td is the derivative time constant.
Exercise 7.2. Show that the PID controllers (7.1) and (7.4) are identical.
The PID controllers (7.1) and (7.3) are idealized because the resulting TFs are improper which makes them
impossible to implement without approximations2 . Furthermore, an ideal differentiator has the undesirable
property that it amplifies high frequency noise (see Figure 3.15). Therefore, in practice the derivative term is
“rolled off” and replaced by a low pass filtered version
s
Kd τd > 0. (7.5)
τd s + 1
The TF (7.5) approximates a derivative for low frequencies (ω < 1/τd ) and approaches the ideal differentiator
as τd → 0. Figure 7.2 shows the Bode plot for an ideal differentiator and the “rolled off” version. With the
approximated differentiator the PID controller (7.4) (equivalently (7.1)) becomes
1 Td s
C(s) = Kp 1 + + (7.6)
Ti s τd s + 1
while the two degree-of-freedom version (7.3) becomes
Ki 1 s
U (s) = R(s) − Kp + Ki + Kd Y (s). (7.7)
s s τd s + 1
Remark 7.1.1. In classical PID control design, τd 6= 0 was largely seen as a necessary evil, i.e., as a necessary
departure from a pure proportional, integral and derivative action. As a result almost all industrial PID
controllers set τd as a fixed fraction of Td , rather than viewing it as an independent design parameter in its own
right. A more modern approach to PID design is to treat the time constant of the derivative as an important
degree of freedom available to the designer.
2
An exception is when the derivative term can be measured directly using sensors, e.g., a tachometer on a motor.
Magnitude (dB)
90
60
Phase (deg)
30
Figure 7.2: Bode plot of an ideal differentiator (blue) and an implementable low pass filtered version (red).
Remark 7.1.2. There are various different ways of parametrizing a PID controller. The form (7.1) is useful
for analysis because it is linear in the controller gains and turning off the integral action corresponds to setting
Ki = 0. The form in (7.6) is called the standard form. In this course we usually stick to the standard
form (7.6) or its ideal version (7.4). However, when working with industrial PID controllers you should be
aware that different definitions of PID gains abound.
Equation (7.1) is an idealization but it is a useful abstraction for understanding PID controllers. We now use
this idealized controller to develop some intuition about the closed-loop system in Figure 7.1a. In our discussion
we assume that the plant TF is given by
1
P (s) = . (7.8)
(s + 1)3
Of course, the behaviour of the closed-loop system in Figure 7.1a depends very much on the plant dynamics.
By focusing on a specific plant our intention is to simply develop intuition on the role that each component of
a PID controller plays.
C(s)P (s) Kp
= 3 2
.
1 + C(s)P (s) s + 3s + 3s + 1 + Kp
s3 1 3
s2 3 1 + Kp
1 8−Kp
s 3
s0 1 + Kp .
Therefore the closed-loop system is internally stable if and only if Kp ∈ (−1, 8). Assuming internal stability
and applying the FVT, the steady-state tracking error for a unit step reference signal is
1 1
ess = = .
1 + Kp P (0) 1 + Kp
Thus we see that this system will always have steady-state error though the error gets smaller as Kp → 8. On
the other hand, as Kp → 8 the system is getting closer to becoming unstable. Figure 7.3 is called a root-locus
diagram3 . It shows how the roots of s3 + 3s2 + 3s + 1 + Kp vary in the s-plane as we increase Kp . From
1
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
-2.5 -2 -1.5 -1 -0.5 0
Figure 7.3 and based on our discussion in Chapter 4, we observe that as Kp gets larger the complex conjugate
poles approach the imaginary axis and dominate the time response. As Kp gets larger, the dominant poles have
smaller real part (larger settling time), the damping ratio gets smaller (more overshoot) and the imaginary part
gets larger (increased frequency of oscillations). We conclude that while we can reduce the steady-state tracking
error by increasing the proportional gain, the transient performance gets worse and the system eventually goes
unstable. These predictions are verified in Figure 7.4 where we simulate the closed-loop system for different
values of Kp .
1.4 5
1.2 4
1 3
0.8 2
0.6 1
0.4 0
0.2 -1
0 -2
0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40
Time (seconds) Time (seconds)
Figure 7.4: Step response of system in Figure 7.1a with plant (7.8) and proportional control with Kp ∈ {1, 2, 5}.
3
See Chapter 6.
To eliminate steady-state tracking error for step inputs the proportional term can be changed to
where the gain Kf f is a feedforward or bias term. It is sometimes called reset in the PID literature. This
control architecture is shown in Figure 7.5 which justifies the term feedforward.
Exercise 7.3. Find the TF from r to y for the system in Figure 7.5.
If we choose Kf f = 1/P (0) then the steady-state tracking error for step inputs will be zero so long as there
are no disturbances.
Exercise 7.4. Regarding the system in Figure 7.5, show that (a) input-output stability of the system in does not depend on Kf f
and (b) if the system is input-output stable and Kf f = 1/P (0) then ess = 0 for step inputs.
The problem with the solution for eliminating steady-state tracking error in Figure 7.5 is that (i) it requires
perfect knowledge of P (0) (ii) it only works if there are no disturbances and no noise in the loop and (iii) the
value of Kf f often needs to be re-calibrated. As we saw in Section 5.4, a far better solution is to use the internal
model principle to achieve perfect step tracking. This helps motivate the integral action in a PID controller.
C(s)P (s) Ki
= 4 .
1 + C(s)P (s) s + 3s + 3s2 + s + Ki
3
s4 1 3 Ki
s3 3 1 0
2 8
s 3 Ki
s1 1 − 98 Ki
s0 Ki .
Therefore the closed-loop system is internally stable if and only if Ki ∈ (0, 8/9). Thus we see that integral
action can make the system go unstable if the integral gain is too high. Figure 7.6 shows how the roots
1.5
0.5
-0.5
-1
-1.5
-2
-2.5
-3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5
of s4 + 3s3 + 3s2 + s + Ki vary in the s-plane as we increase Ki . Again we see that as Ki gets large, two
complex conjugate poles get closer to the imaginary axis and dominante the time-domain response. Increasing
Ki results in longer settling time, more overshoot and increased frequency of oscillation. Figure 7.7 shows
simulation results for different values of Ki which match our expectations.
1.6 1.8
1.6
1.4
1.4
1.2
1.2
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0 0
0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70
Time (seconds) Time (seconds)
Figure 7.7: Step response of system in Figure 7.1a with plant (7.8) and integral control with Ki ∈ {0.1, 0.3, 0.5}.
The term inside the bracket can be interpreted as a prediction of the tracking error at time t + Td by linear
interpolation as illustrated in Figure 7.8. The prediction horizon Td = Kd /Kp is the derivative time constant
of the controller.
Figure 7.8: PD controller viewed as predictive action. Increasing Td increases the prediction horizon.
For the system in Figure 7.1a with plant (7.8) and an ideal derivative controller the closed-loop TF from r
to y is
C(s)P (s) Kd s
= 3 2
.
1 + C(s)P (s) s + 3s + (3 + Kd )s + 1
The Routh array for this system is given by
s3 1 3 + Kd
s2 3 1
8
s1 3 + Kd
s0 1.
Therefore the closed-loop system is internally stable if and only if Kd > −8/3. The fact that high gain derivative
control does not destabilize the system gives some justification to the intuitive notion that derivative control
has a stabilizing effect. Another interpretation of this intuitive notion is that derivative control acts like friction
in a mechanical system or resistance in an electrical system and tends to dampen oscillations and dissipate
energy resulting in a stable system.
A main draw back of derivative control is that it cannot provide zero steady-state tracking error. Indeed,
the simulations in Figure 7.9a show that in the case of plant (7.8), the steady state output is zero4 . Derivative
control can also lead to large control signals in response to high frequency tracking error as seen in Figure 7.9b.
This latter concern can be alleviated using the architecture from Figure 7.1b. The simulations in Figure 7.9
were done using a low pass filtered version of the differentiator (7.5) with τd = 0.01. Note that for the filtered
differentiator the closed-loop system can become unstable if Kd is too large.
Exercise 7.5. Let τd = 0.01 and use a Routh table to find the conditions on Kd so that the system in Figure 7.1a with plant (7.8)
and controller (7.5) is internally stable.
1
1000
0.9
800
0.8
0.7
600
0.6
0.5
400
0.4
200
0.3
0.2
0.1
0 -200
0 10 20 30 40 50 60 70 80 0 0.01 0.02 0.03 0.04 0.05 0.06
Time (seconds) Time (seconds)
Figure 7.9: Step response of system in Figure 7.1a with plant (7.8) and derivative control with τd = 0.01 and Kd ∈
{2, 5, 10}.
4
This is not surprising since the TF from r to y has a zero at s = 0.
where e(t) is the tracking error due to a step input. A more modern approach to gain selection is to use a model
based technique like the one we discuss in Section 7.3.
1. Obtain the step response of the plant which by Assumption 7.2.1 and the FVT converges to a constant
value. The step response can be obtained either by simulating the plant model or, if we don’t have a model
to simulate, by running experiments on the physical system. Plot the step response as in Figure 7.10.
2. From the plot, extract the parameters σ and τ shown in Figure 7.10. Physically σ is the maximum slope
of the step response. The parameter τ is the intersection between the tangent and the coordinate axis.
Time (seconds)
Figure 7.10: Obtaining the parameters σ and τ for Ziegler-Nichols tuning of PID controllers.
3. Use the gain formulae in Table 7.1 to obtain a PID controller of the form 7.4.
Controller type Kp Ti Td
1
Proportional στ — —
9
Proportional-Integral 10στ 3τ —
6 τ
Proportional-Integral- 5στ 2τ 2
Derivative
0.9
1.4
0.8
1.2
0.7
1
0.6
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 12 14 0 2 4 6 8 10 12 14 16 18 20
Time (seconds) Time (seconds)
Figure 7.11: Ziegler-Nichols tuning for Example 7.2.1 using step response method.
Controller type Kp Ti Td
Proportional 0.5Ku — —
Proportional-Integral 0.4Ku 0.8Tu —
Proportional-Integral- 0.6Ku 0.5Tu 0.125Tu
Derivative
Example 7.2.2. We use the same plant as in Example 7.2.1. The closed-loop TF with proportional control
was found in Section 7.1.1. Figure 7.3 shows that Assumption 7.2.2 holds for this system. To find Ku and Tu
we can use the Routh table from Section 7.1.1. From that table we see that when the proportional gain equals
8, we get a row of zeros in the s1 row. The auxiliary polynomial (see Section 5.3.2) is
πa (s) = 3s2 + 9.
√ √
The roots of πa are s = ±j 3. From this we conclude that Ku = 8, ωu = 3 and Tu = 3.6276. The resulting
PID controller using the Ziegler-Nichols gains from Table 7.2 is
1
C(s) = 4.8 1 + 0.5513 + 0.4543s .
s
N
Exercise 7.6. Simulate the closed-loop step response from Example 7.2.2.
g2 s2 + g1 s + g0
C(s) = (7.11)
s2 + f1 s
is identical to the PID controller (7.6) with
g1 f1 − g0 g1 f1 − g0 g0 − g1 f1 + g2 f12 1
Kp = , Ti = , Td = , τd = . (7.12)
f12 g0 f1 f1 (g1 f1 − g0 ) f1
Assumption 7.3.2. The plant P (s) ∈ R(s) is strictly proper and second order
b1 s + b0
P (s) = , b0 6= 0. (7.13)
s2 + a1 s + a0
J
Remark 7.3.3. We cannot allow b0 = 0 in the plant (7.13) because then the plant has a zero at s = 0. The
PID controller (7.11) has a pole at s = 0 due its integral action and if connected to a plant (7.13) with b0 = 0
there results an unstable pole-zero cancellation. See Definition 5.2.8 and Corollary 5.2.9.
If we connect the plant (7.13) in unity feedback configuration, as in Figure 5.6, with controller (7.11) then
the characteristic polynomial (see Definition 5.2.6) is given by
π(s) = (b1 s + b0 ) g2 s2 + g1 s + g0 + s2 + a1 s + a0 s2 + f1 s
Suppose that we would like the closed-loop poles, i.e., the roots of π(s), to be located at5 {λ1 , λ2 , λ3 , λ4 } ⊂ C− .
These desired pole locations can be chosen based on, for instance, desired characteristics of the step response
and the ideas of Section 4.3. The desired pole locations generate a desired characteristic polynomial
πdes (s) = (s − λ1 ) (s − λ2 ) (s − λ3 ) (s − λ4 ) =: s4 + α3 s3 + α2 s2 + α1 s + α0 ∈ R[s].
Equating coefficients between π and πdes yields the following linear equation in the unknown controller gains
1 b1 0 0 f1 α3 − a1
g2 = α2 − a0 .
a1 b0 b1 0
a0 0 b0 (7.14)
b1 g1 α1
0 0 0 b0 g0 α0
A few observations and facts about equation (7.14) and its derivation.
• If Np and Dp are coprime, then equation 7.14 has a unique solution (see Proposition 7.3.4).
• In deriving (7.14) we have treated τd as an independent design parameter as opposed to the approach
taken in classical control, see Remark 7.1.1.
• The plant (7.13) includes every rational strictly proper system of order two. When designing PID con-
trollers for higher order plants the ideas on model reduction in Section 4.5 can be useful.
Proposition 7.3.4. Equation (7.14) has a unique solution if and only if the numerator and denominator
of (7.13) are coprime.
Proof. Let M denote the 4 × 4 matrix in (7.14). Equation (7.14) has a unique solution if and only if the deter-
2 2
minant of M is non-zero. The determinant of M is det (M ) = b0 b0 − b0 b1 a1 + b1 a0 . Under Assumption 7.3.2
b0 6= 0 so det (M ) = 0 if and only if b20 − b0 b1 a1 + b21 a0 = 0. We now proceed to prove the proposition.
(=⇒) Assume that the numerator and denominator of (7.13) are not coprime. Then b1 6= 0 because otherwise
the plant has no zeros and therefore its numerator and denominator are coprime. When b1 6= 0 the plant has a
zero at s = −b0 /b1 . By assumption this is also a pole of the plant
b0 2
b0
− − a1 + a0 = 0.
b1 b1
Simplifying this expression we obtain b20 − b0 b1 a1 + b21 a0 = 0 which shows that det (M ) = 0. We’ve shown
Not coprime =⇒ Solution to (7.14) not unique
which is logically equivalent to showing6
Coprime ⇐= Solution to (7.14) unique.
(⇐=) Conversely, suppose that det (M ) = 0. Then b20 − b0 b1 a1 + b21 a0 = 0 which, reversing the argument we
just made, implies that the plant’s numerator and denominator have a common root.
5
The desired pole locations must be symmetric about the real axis to ensure that the controller gains are real.
6
Formally, we have proven the contrapositive of the statement we sought to prove.
which yields a closed-loop dominated by the roots of s2 +4s+9. We solve this problem using our pole placement
equations with
πdes (s) = (s2 + 4s + 9)(s + 4)2 , b1 = 0, b0 = 2, a1 = 3, a0 = 2.
Note that we’ve added the extra term (s + 4)2 to πdes so that its order matches the order of π. Also note that
the terms we’ve added are further to the left in C− so that s2 + 4s + 9 dominates the response. Equation 7.14
becomes
1 0 0 0 f1 12 − 3
3 2 0 0 g2 57 − 2
2 0 2 0 g1 = 136 .
0 0 0 2 g0 144
The unique solution is (f1 , g2 , g1 , g0 ) = (9, 14, 59, 72). Using Proposition 7.3.1 these gains correspond to a PID
controller (7.6) with
Kp = 5.6667, Ti = 0.7083, Td = 0.1634, τd = 0.1111.
N
Exercise 7.8. Design a PID controller for the plant from Example 7.2.1 using pole placement. Compare the step response of your
controller to that in Figure 7.11b.
The ideas presented so far can also be applied to plants of the form
K
P (s) = e−sT .
τs + 1
Many plants, especially in process industries, can be satisfactorily described by this model. This plant is not
rational because of the time-delay term e−sT . One way to obtain an approximate rational second order model
is to approximate the time delay by a first order all-pass system. In this case we have
K K − sT 2 +1
P (s) = e−sT ≈ sT
.
τs + 1 τs + 1 2 + 1
Our previously derived design equations (7.14) can now be used to design PID controllers for the approximated
plant.
If the plant has a first order model
K
P (s) =
τs + 1
and we are using the PID controller (7.11) then the closed-loop characteristic polynomial is
Equation (7.15) does not have a unique solution. Letting α ∈ R be a free parameter, the solution is
f1 0 1
g2 1 (τ α2 − 1) τ
= K + α −K .
g1 τ α1 −1
g0 τ α0 0
The resulting PID controller is
1 τ
(τ α2 − 1) s2 + τ α1 s + τ α0 − αs
K Ks +1
C(s) =
s2 + αs
where again α ∈ R is a free parameter.
1 Ki
P (s) = , C(s) = Kp + .
s s
The saturator block labelled satM in Figure 7.12 models the actuator limitations and its equation is
(
x if |x| ≤ M ,
satM (x) = (7.16)
sgn (x)M if |x| > M .
For this example let M = 0.1, let the gains in the PI controller be Kp = Ki = 0.2 and let r(t) = 1(t). The
simulation results are shown in Figures 7.13 and 7.14.
2
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
0 10 20 30 40 50 60 70 80 90 100
time (s)
0.8
0.1
0.6
0.4
0.05
0.2
-0.05 -0.2
-0.4
-0.1
-0.6
-0.15 -0.8
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
time (s) time (s)
Figure 7.14: Control signal and integrator signal from Example 7.4.1.
• As a result, the control signal saturates at M = 0.1 just after t = 0. This is seen in Figure 7.14a. The
integral action starts integrating the tracking error and starts to increase. This is shown in Figure 7.14b.
• At t ≈ 10 the tracking error finally changes sign as y(t) finally exceeds 1. See Figure 7.13. As a result of
this sign change, we see in Figure 7.14b that at t ≈ 10 the integrator starts to decrease.
• Even though the integrator starts to decrease at t ≈ 10, it has accumulated a relatively large value over the
first 10 seconds, i.e., it has wound up. The integral part of the control signal dominates the proportional
part of the control signal. Hence the overall control signal in Figure 7.14a does not react and remains at
its upper bound.
• At t ≈ 18 the tracking error becomes sufficiently large (see Figure 7.13) so that the proportional part
of the control signal starts to dominate the accumulated integral. The control signal starts to decrease
(Figure 7.14a) but the tracking error has become so large that it again saturates, this time at its lower
bound, around t ≈ 20.
• The above process begins to repeat except now the integrator value is negative. The magnitude of the
tracking error at t ≈ 20 is less than it was just after t = 0 so the integrator does not windup as much as
it did initially.
The wild transients in Figure 7.13 are a tell-tale sign that windup is happening. N
The core idea used to protect systems against the negative effects of windup is to turn the integrator off
whenever the input reaches a limit. This can either be done by a switch or by implementing the integrator in
such a way that it automatically turns off when the input reaches a limit. An example of the latter type of
solution, called back-calculation, is shown implemented on a PI controller in Figure 7.15. The system has an
extra feedback path that changes the input to the integrator. The error signal es is the difference between the
actuator output u(t) and the controller output v(t). This signal is fed through a gain of 1/Tt into the integrator.
When there is no saturation es = 0 and the system acts like a standard PI controller. When the actuator
saturates, the signal es is fed back to the integrator in such a way that es goes toward zero. This implies that
the controller output is kept close to the saturation limit. The controller output will then change as soon as
the error changes sign and integral windup is avoided.
The rate at which the controller output is reset is governed by the feedback gain 1/Tt ; a small value of Tt
gives a short reset time. The parameter Tt is called the tracking time constant. It cannot be too small
because measurement noise can then cause an undesirable reset. The tracking √ time constant Tt should be larger
than Td and smaller than Ti in a PID controller. A rule of thumb is Tt = Ti Td [Åström and Hägglund, 1995].
7.5 Summary
The purpose of this chapter was to introduce you to the basic structure of one of the most common feedback
controllers used in industry. The key concepts to take away from this chapter are as follows.
0.8
0.6
0.4
0.2
0
0 10 20 30 40 50 60 70 80 90 100
time (s)
0.015
0.1
0.01
0.05
0 0.005
-0.05 0
-0.1 -0.005
-0.15 -0.01
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
time (s) time (s)
Figure 7.17: Control signal and integrator signal from Example 7.4.2.
• Understand the issues associated with implementing derivative action and the reasons that the low-pass
approximation (7.5) is used in practice. You should also know the frequency ranges in which (7.5) gives
a good approximation to a derivative.
• Understand why the two degree of freedom implementation scheme in Figure 7.1b is often better in
practice.
• Some intuition about what the “P”, “I” and “D” terms do to a step response. Understand the reason
why “D” is sometimes called a predictive mode.
• Be aware of the classical tuning methods of Ziegler-Nichols. You don’t need to know the specific formulae,
you just need to understand the basic concept of using experimental results to choose controller gains.
• Section 7.3 is very important. You should know how to design PID controllers using pole placement and
use this section to understand the power and the limitations of PID control.
• Know what integrator windup is and the core idea behind anti-windup solutions. Namely, to turn the
integrator off whenever the input reaches a limit.
In Chapter 5 we developed tests that determine when a feedback system is stable. In this chapter we introduce
a new test for stability of feedback systems called the Nyquist criterion [Nyquist, 1932]. The Nyquist criterion
tells us if a feedback system is stable but more importantly, it provides guidelines for modifying an unstable
system to make it stable. Nyquist’s results were an inspiration for many of the design methods that today are
called loop shaping. Nyquist’s results also allow us to quantify how robust the feedback loop is to modelling
uncertainty.
Contents
8.1 Cauchy’s principle of the argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
8.2 Nyquist stability criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
8.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
8.4 Stability margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
8.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Figure 8.1: Closed path in s-plane with no self-intersections and negative orientation.
1
Nyquist’s original analysis was fairly complicated. Only later was it pointed out that the result can in fact be easily obtained
from the principle of the argument from complex analysis [MacColl, 1945]. A more accessible version of Nyquist’s papers are found
in [Bellman and Kalaba, 1964], which also includes other interesting early papers on control. Nyquist’s paper is also reprinted in
an IEEE collection of seminal papers on control [Basar and Basar, 2001].
166
167 CHAPTER 8. FREQUENCY DOMAIN METHODS FOR STABILITY ANALYSIS
Now let G ∈ R(s) be a rational function of the complex variable s. For every point s in the complex plane,
G(s) is also a point in the complex plane. In other words, we can view the rational function G as a map C → C.
To make this clear and avoid clutter we draw two copies of the complex plane, s in one copy called the s-plane
and G in the other copy called the G-plane.
If the curve Γs does not pass through a pole of G(s), then as s moves around Γs from any starting point,
the point G(s) traces out a different closed curve ΓG , the image of Γs under the map G.
Example 8.1.1. For G(s) = s − 1 we could have :
Figure 8.2: Mapping the curve Γs to the curve ΓG when G(s) = s − 1. In this example each point s ∈ Γs is shifted to the
left by 1 unit.
Notice that ΓG is just Γs shifted to the left one unit. The angle of G(s) is ](s − 1). Since Γs encircles one
zero of G(s), the angle of G changes by −2π as s makes a circuit around Γs . Therefore ΓG encircles the origin
once CW. N
Figure 8.3: Mapping the curve Γs to the curve ΓG when G(s) = s − 1. In this example, Γs does not encircle the zero of G.
Now Γs does not encircle any zeros of G. The net change in ](s − 1) is therefore zero after one trip around
Γs which is why ΓG has no encirclements of the origin. N
Figure 8.4: Mapping the curve Γs to the curve ΓG when G(s) = (s − 1)−1 .
Since Γs encircles the point 1, i.e., a pole of G(s), the curve ΓG encircles the origin once in the counterclock-
wise (C.C.W.) direction. N
From these examples we observe that there is a relationship between the number of poles and zeros of G(s)
inside Γs and the number of times ΓG encircles the origin.
Theorem 8.1.1 (Principle of the argument). Suppose G(s) ∈ R(s) has no poles or zeros on Γs , but Γs encloses
n poles and m zeros of G(s). Then ΓG has exactly n − m counterclockwise encirclements of the origin.
Proof. Write G(s) in this way Q
(s − zi )
G(s) = K Qi
i (s − pi )
with K a real gain, {zi } the zeros and {pi } the poles. Then for every s on Γs
X X
]G(s) = ]K + ](s − zi ) − ](s − pi ).
If zi is enclosed by Γs , the net change after one trip around the curve Γs in the term ](s − zi ) is −2π;
otherwise the change is 0. If pi is enclosed by Γs , the net change after one trip around the curve Γs in the term
](s − pi ) is −2π; otherwise the change is 0. Hence the net change in ]G equals m(−2π) − n(−2π) which equals
(n − m)2π.
Remark 8.1.2. If we change the orientation of Γs so that it is positively oriented (CCW) then the above proof
yields m − n CCW encirclements.
• Similarly, G(s) has no zeros on the Nyquist contour if, and only if, G(s) has no zeros on the imaginary
axis and G(s) is not strictly proper.
• In our application, if G(s) does actually have poles on the imaginary axis, then we have to indent the
contour around them. You can either indent to the left or the right; we’ll always indent to the right as in
Figure 8.6.
• We indent around poles of G(s) on the imaginary axis because otherwise the function G(s) would be
undefined there; we don’t need to indent around the zeros of G(s).
Definition 8.2.1. The loop gain of the system in Figure 8.7 is the transfer function L(s) = KC(s)P (s).
We could also have a TF H(s) in the feedback path in which case L(s) = KC(s)P (s)H(s) but we’ll take
H(s) = 1 for simplicity.
1. P (s) and C(s) are proper and C(s)P (s) is strictly proper.
The second part of Assumption 8.2.2 is needed because the Nyquist criterion doesn’t test for it, and such can-
cellations would make the feedback system not stable (see Corollary 5.2.9). The third part of Assumption 8.2.2
is needed only because we’re going to divide by K at some point.
Theorem 8.2.3. Let n denote the number of poles of P (s)C(s) in C+ . Construct the Nyquist plot of P (s)C(s),
indenting to the right around poles on the imaginary axis. Then the feedback system is stable if and only if the
Nyquist plot doesn’t pass through − K1 + j0 and encircles it exactly n times CCW.
Proof. The closed-loop transfer function from reference input to plant output is (8.1). Define G(s) := 1 + L(s).
Because we have assumed no unstable pole-zero cancellations, feedback stability is equivalent to the condition
that
Dc (s)Dp (s) + KNc (s)Np (s)
G(s) = 1 + L(s) = 1 + KC(s)P (s) =
Dc (s)Dp (s)
has no zeros with Re (s) ≥ 0 (Theorem 5.2.11). So we’re going to apply the principle of the argument to get a
test for G(s) to have no zeros in the closed right half complex plane.
Please note the logic so far: The closed-loop transfer function from R to Y is
KP (s)C(s)
.
G(s)
This should have no poles with Re (s) ≥ 0. So G(s) should have no zeros with Re (s) ≥ 0. So we need a test
for G(s) to have this property.
Note that G(s) and C(s)P (s) have the same poles with real part greater then or equal to zero, so G(s)
has precisely n there. Since Γs indents to the right around poles of G(s) on the imaginary axis and since G(s)
is proper, G(s) has no poles on Γs . Thus by Theorem 8.1.3, G(s) has no zeros in Re (s) ≥ 0 and hence the
feedback system is stable if, and only if, the Nyquist plot of G(s) doesn’t pass through 0 and encircles it exactly
n times CCW. Since C(s)P (s) = K1 G(s)− K1 , this latter condition is equivalent to: the Nyquist plot of P (s)C(s)
doesn’t pass through − K1 and encircles it exactly n times CCW.
Remark 8.2.4. If there had been a non-unity transfer function H(s) in the feedback path, we would have
taken G(s) = 1 + KP (s)C(s)H(s) in the proof.
Remark 8.2.5. By Assumption 8.2.2 C(s)P (s) is strictly proper. As a result, see Definition 2.8.1, the infinite
part of the Nyquist counter Γs (labelled B in Figure 8.8) gets mapped to the origin.
Figure 8.8: Relevant parts of Nyquist contour when plotting a Nyquist plot under Assumption 8.2.2.
Remark 8.2.6. Furthermore, see Remark 3.8.1, since L(s) ∈ R(s) we have that |L(jω)| = |L(−jω)| and
]L(jω) = −]L(−jω). Therefore the part of the Nyquist plot corresponding to the negative imaginary axis in
Γs (labelled C in Figure 8.8) is identical to the part corresponding to positive imaginary axis, except mirrored
along the real axis. This means we can get a complete Nyquist plot by plotting C(s)P (s) for s on that portion
of Γs in red in Figure 8.8.
Remark 8.2.7. Together, Remarks 8.2.5, 8.2.6 show that under Assumption 8.2.2, the Nyquist plot is essentially
(aside from indentations caused by poles on the imaginary axis) a polar plot of the loop gain with s = jω. As
we saw in Section 3.8, the polar plot and the Bode plot of a TF are closely related. Thus we see the important
relationship between the Nyquist plot and the Bode plot of the loop gain.
2. Draw the image of Γs under the map C(s)P (s). If Assumption 8.2.2 holds then we only need to draw the
part corresponding the red portion of Γs in Figure 8.8, (see Remarks 8.2.5, 8.2.6).
3. Observe N , the number of counter clockwise encirclement of − K1 made by the Nyquist plot.
N =n−m
where N is obtained from the figure in Step 3, n is the number of poles of C(s)P (s) in C+ (known) and
m is the number of closed-loop poles in C+ (unknown).
5. By Theorem 5.2.7 the feedback system is stable if and only if m = 0 which is equivalent, in light of
Theorem 8.2.3, to N = n.
8.3 Examples
In this section you’ll learn how to draw Nyquist plots and how to apply the Nyquist criterion.
Figure 8.9: Nyquist contour (left) and Nyquist plot (right) for Example 8.3.1.
We map Γs one segment at a time. For the segment A (solid red) we have s = jω and
1 1 − ω2 2ω
C(jω)P (jω) = 2
= 2 2 2
−j .
(1 − ω ) + j2ω (1 − ω ) + 4ω (1 − ω )2 + 4ω 2
2
To plot the image of segment A we make the following observations which allow us to plot by hand the red
portion of the Nyquist plot.
• On A, s = jω. When ω = 0, C(j0)P (j0) = 1 + j0. As ω starts to increase, the imaginary part of CP
becomes negative and never crosses zero again for any finite value of ω > 0.
• When ω = 1 the real part of CP equals zero, and hence switches from being positive to being negative.
In other words, the Nyquist plot of the segment A crosses the jR axis at C(j)P (j) = −j1/2. The real
part of CP never crosses zero again for any finite value of ω > 1.
• As ω → +∞ the real part of CP is negative and approaches zero. The imaginary part is also negative
while approaching zero.
Segment B of the Nyquist counter (dashed blue in left side of Figure 8.9) gets mapped to the origin since
CP is strictly proper, see Remark 8.2.5. The image of segment C (dashed orange in the Nyquist contour of
Figure 8.9) is a reflection of the image of section A. Figure 8.10 shows the Nyquist plot generated by MATLAB
for this system.
Now that we have the Nyquist plot, we are ready to apply the Nyquist stability criterion and determine for
what range of K the feedback system is stable. The transfer function CP has no poles inside Γs and therefore
n = 0. So the feedback system is stable if and only if the Nyquist plot encircles −1/K exactly 0 times CCW.
This means, does not encircle it. The number of CCW encirclements for different values of −1/K are shown in
Table 8.1
Thus the conditions for stability are −1/K < 0 or −1/K > 1; that is, K > 0 or −1 < K < 0; that is,
K > −1, K 6= 0. The condition K 6= 0 is ruled out by our initial assumption (which we made only because
0.6
0.4
0.2
Imaginary Axis
0
-0.2
-0.4
-0.6
-0.8
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
Real Axis
CCW encirclements 0 −1 0
we were going to divide by K). But now, at the end of the analysis, we can check directly that the feedback
system actually is stable for K = 0. So finally the condition for stability is K > −1. You can readily confirm
this by applying Routh-Hurwitz to the closed-loop characteristic polynomial, (s + 1)2 + K. N
Figure 8.11: Nyquist contour (left) and Nyquist plot (right) for Example 8.3.2.
On segment A, s goes from jε, ε > 0 and small, to +j∞. When s = jε we have
j−ε −2 1 − ε2
C(jε)P (jε) = = 2
+j ≈ −2 + j∞.
ω(1 − jε) 1+ε ε(1 + ε2 )
This point is shown on the Nyquist plot in Figure 8.11. As s progresses along the rest of segment A, we have
that the real part of C(jω)P (jω) remains negative while the imaginary part equals zero when s = j. Thus the
Nyquist plot cross the real axis at C(j)P (j) = −1 + j0. For ω > 1 both the real and imaginary parts remain
negative and approach zero as ω → +∞.
Since CP is strictly proper segment B gets mapped to the origin. The image of segment C is the same as
the image of segment A reflected about the real axis.
On segment D, s = εejθ where ε > 0 is small and θ increases from −π/2 to π/2. Therefore
εejθ + 1 1 1
C(εejθ )P (εejθ ) = ≈ − jθ = ej(π−θ) .
εejθ (εejθ − 1) εe ε
Thus the image of segment D is a semicircle of infinite radius whose argument goes from 3π/2 (equivalent to
−π/2) to π/2, i.e., CW. Figure 8.12 shows the Nyquist plot generated by MATLAB for this system.
10
2
Imaginary Axis
-2
-4
-6
-8
-10
-2 -1.5 -1 -0.5 0 0.5
Real Axis
Now to apply the Nyquist criterion. Since C(s)P (s) has one pole inside Γs , we have n = 1. Therefore we
need exactly 1 CCW encirclement of the point −1/K.
CCW encirclements −1 1 0
Thus feedback stability holds if and only if −1 < 1/K < 0; equivalently, K > 1. N
for which
1 1 − jω 1 ω
C(jω)P (jω) = 2
= 2 2
= 4
−j .
(jω + 1)(1 − ω ) (ω + 1)(1 − ω ) 1−ω 1 − ω4
You should be able to draw the Nyquist plot shown in Figure 8.13 based on the previous two examples. We
observe that on segment A of Γs , s = jω with ω ∈ [0, 1 − ε], ε > 0 and small. On segment B, s = j + εejθ with
ε > 0, small and θ ∈ [−π/2, π/2]. On segment C of Γs , s = jω with ω ∈ [1 + ε, +∞), ε > 0 and small. The
drawing yields the data in Table 8.3. Since n = 0, i.e., CP has no poles inside Γs , we conclude that the system
is feedback stable if and only if −1/K > 1, i.e., −1 < K < 0. N
Figure 8.13: Nyquist contour (left) and Nyquist plot (right) for Example 8.3.3.
CCW encirclements −2 −1 0
Remark 8.3.1. This section and Section 3.8.2 have dealt with graphical methods done by hand on paper.
Why did we bother? Why didn’t we just ask MATLAB to draw the Bode or Nyquist plots? The answer is
that by learning to draw the graphs, you acquire understanding. Additionally you should check that MATLAB
incorrectly draws the Nyquist plot in Example 8.3.3. MATLAB isn’t smart enough to indent the Γs -contour
around the poles on the imaginary axis.
Example 8.3.4. (Capturing the essential features of the Nyquist plot from the Bode plot) Consider
the Bode plot in Figure 8.14 of some loop gain L(s). In Figure 8.14 the magnitude is in absolute units (not
dB), the phase is in degrees. The frequency is in rad/s.
We make the following observations:
• Since the magnitude plot is bounded from above, we conclude that the Nyquist contour doesn’t need
to indent around poles on the imaginary axis. Therefore we can use the basic Nyquist contour from
Figure 8.5 and the Nyquist plot is simply a polar plot of L(jω).
• Using the Bode plot, we see that at low frequencies (ω < 10−2 rad/s) the magnitude is |L(jω)| ≈ 5. The
phase at these low frequencies is ]L(jω) ≈ −π ∼ π and so L(j0) ≈ −5. Thus the Nyqusit plot starts at
−5 in the complex plane.
• Next we observe from the Bode plot that the phase of L(jω) is always between −π and −π/2. Therefore
the part of the Nyquist plot corresponding to moving up the imaginary axis is always in the third quadrant.
• The magnitude Bode plot crosses 1 at about ω = 6 rad/s and ]L(j6) ≈ −157◦ . Therefore the Nyquist
plot crosses the unit circle at an angle of −157◦ .
• The magnitude Bode plot increases a little at first and then goes to zero as ω → ∞. Therefore the Nyquist
plot moves aways from the origin before eventually going to zero.
From the above observations we can sketch the Nyquist plot in Figure 8.15. The Nyquist plot encircles −1
once in the CCW direction. Thus the feedback system is stable if, and only if, L has one pole in C+ .
N
1
10
10 0
10 -1
10 -2
10 -3
-2 -1 0 1 2
10 10 10 10 10
-120
-130
-140
-150
-160
-170
-180
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/sec)
Example 8.4.1. Consider the usual feedback loop as in Figure 8.7 and let its loop gain be given by
2
L(s) = .
(s + 1)2
The Nyquist plot of L is shown in Figure 8.16 where the image of the portion of the Nyquist contour corre-
sponding to negative frequencies is drawn with a red dashed line.
2
1.5
0.5
-0.5
-1
-1.5
-2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Figure 8.16: Nyquist plot of Example 8.4.1 with phase margin indicated.
There are no encirclements of the critical point −1 + j0 so the feedback system is stable. A decrease in
the phase of L(s) will cause the blue portion of the Nyquist plot to rotate CW about the origin. If we rotate
it too far CW the Nyquist plot will eventually encircle −1 + j0 and we’ll lose stability. Hence, the maximum
amount of phase we can decrease by is exactly the angle indicated in Figure 8.16. This angle is called the phase
margin of the system and is related to the distance from the critical point −1 + j0 to the point where the
Nyquist plot crosses the unit circle.
The phase margin can also be found from the Bode plot of the loop gain because the two plots are closely
related (see Remark 8.2.7 and Example 8.3.4). The Bode plot of L(jω) is shown in Figure 8.17. The Nyquist
plot intersects the unit circle when |L(jω)| = 1. This corresponds to the magnitude plot crossing through
20 log |L(jω)| = 20 log |1| = 0 dB. Furthermore, the Nyquist plot intersects the negative real axis whenever2
](L(jω)) = π. This corresponds to the phase response crossing −180◦ . So to find the phase margin from a
Bode plot of L, we determine the frequency at which the magnitude is 0dB and then measure how far the phase
at that frequency is from −180, see Figure 8.17. N
Definition 8.4.1. Let L(s) ∈ R(s) be the loop gain TF for the feedback system in Figure 8.7.
(i) A gain crossover frequency, ωgc ∈ [0, ∞), for L(s) is a frequency at which |L(jωgc )| = 1.
2
Remember that we take the angles π and −π to be equivalent. See Appendix 3.A.
10
-10
-20
-40
-50
-60
-70
0
-45
Phase (deg)
-90
-135
-180
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
Let ωgc,1 , . . . , ωgc,` be the gain crossover frequencies for L(s) and assume these are ordered so that
In simpler terms: (1) the upper phase margin is the amount of phase decrease required to reach the stability
limit and (2) the lower phase margin is the amount of phase increase required to reach the stability limit. The
upper and lower phase margins are easy to read off a Nyquist plot or Bode plot so there is usually no need to
compute them using the definition. See Figure 8.18. We adopt the convention that when we simply say phase
margin, we refer to the smaller of the upper and lower phase margins and denote it by Φpm .
Remark 8.4.2. In many texts one simply sees “phase margin” without reference to upper and lower. They
are usually referring to the upper phase margin which is more relevant for closed-loop stability when the loop
gain L(s) is minimum phase and has all its poles in C− .
Figure 8.18: A Nyquist plot illustrating lower and upper phase margins.
1
0.8
0.6
10
0.4 0
-10
0.2
Magnitude (dB)
-20
-30
0
-40
-50
-0.2
-60
180
-0.4
135
-0.6
Phase (deg)
90
-0.8
45
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0
10 -1 10 0 10 1 10 2
Frequency (rad/s)
encirclement of the critical point −1 + j0 so the closed-loop system is stable. We observe that the blue (non-
dashed) portion of the Nyquist plot intersects the unit circle twice and that if we rotate in the CCW direction
(adding phase) by 27◦ we get an encirclement of −1 + j0 thereby losing closed-loop stability.
From the Bode plot in Figure 8.19 we determine that there are two gain crossover frequencies : ωgc,1 = 3.37
rad/s and ωgc,2 = 1.59 rad/s with (see Definition 8.4.1)
](L(jωgc,1 )) = 104.7◦ < ](L(jωgc,2 )) = 153◦ .
Thus by Definition 8.4.1 we conclude that lower phase margin is Φlpm = 27◦ and the upper phase margin is
undefined. MATLAB reports this as a negative phase margin of −27◦ . Conclusion: We need the Nyquist plot
for the correct interpretation of the phase margins. N
The Nyquist plot of L is shown in Figure 8.20 where, again, the image of the portion of the Nyquist contour
corresponding to negative frequencies is drawn with a dashed line.
2
1.5
0.5
-0.5
-1
-1.5
-2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Figure 8.20: Nyquist plot of Example 8.4.3 with gain margin indicated.
There are no encirclements of the critical point −1 + j0 so the feedback system is stable. The feedback
loop will remain stable for KC(s), where K ∈ R is a gain, so long as the point −1/K isn’t encircled. Since the
Nyquist plot crosses the negative real axis at −1/(12.1), this means we need
1 1
− <− .
K 12.1
Thus K can be increased from K = 1 up to K = 12.1 (21.67 dB) before the critical point is encircled resulting
in instability. This number, 21.67 dB, is called the gain margin. It is the distance from the critical point
−1 + j0 to the point where the Nyquist plot crosses the negative real axis.
The gain margin can be found from the Bode plot of the loop gain. The Bode plot of L(jω) is shown in
Figure 8.21. The Nyquist plot of L(jω) crosses the negative real axis whenever ](L(jω)) = π. Furthermore, the
magnitude of L(jω) equals 0db if |L(jω)| = 1. So to find the gain margin from a Bode plot of L, we determine
the frequency at which the phase is π and then measure how far the gain at that frequency is from 0 dB, see
Figure 8.21. N
Remark 8.4.3. The Bode plot in Figure 8.21 was created using the MATLAB command bode. By default,
this command “unwraps” the phase which is why the phase in Figure 8.21 goes below −180◦ . Figure 8.22 shows
the same Bode plot with phase wrapping on. Definitions 8.4.1 and 8.4.4 assume that phase wrapping is in effect.
The MATLAB commands used to create Figure 8.22 are shown below.
1 s = tf('s');
2 L = 2/(s+1)ˆ2/(0.1*s + 1);
3 opts = bodeoptions('cstprefs');
4 opts.PhaseWrapping = 'on';
5 bodeplot(L, opts);
6 grid on;
20
-20
-40
Magnitude (dB)
-60
-80
-100
-120
-140
-160
0
-45
-90
Phase (deg)
-135
-180
-225
-270
10 -2 10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
-20
-40
Magnitude (dB)
-60
-80
-100
-120
-140
-160
180
135
90
45
Phase (deg)
-45
-90
-135
-180
10 -2 10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
Figure 8.22: Bode plot of L(jω) for Example 8.4.3 with phase wrapping.
Definition 8.4.4. Let L(s) ∈ R(s) be the loop gain TF for the feedback system in Figure 8.7.
(i) A phase crossover frequency, ωpc ∈ [0, ∞), for a loop TF L(s) is a frequency at which ]L(jωpc ) = 180◦ .
Let ωpc,1 , . . . , ωpc,` be the phase crossover frequencies for L(s) and assume these are ordered so that
L(jωpc,1 ) < · · · < L(jωpc,` ).
(ii) The upper gain margin of L(s) is
(
1
, if there exists a k ∈ {1, . . . , ` − 1} such that L(jωpc,k ) < −1 < L(jωpc,k+1 ).
Kugm := |L(jωpc,k+1 )|
undefined, if L(jωpc,` ) < −1.
(8.4)
In simpler terms: (1) the upper gain margin is the smallest amount that the loop gain can be increased
before the closed-loop system goes unstable and (2) the lower gain margin is smallest amount that the loop gain
can be decreased before reaching the stability limit. As with phase margin, the upper and lower gain margins
are easy to read off a Nyquist plot or Bode plot so there is usually no need to compute them using the definition,
see Figure 8.23. We adopt the convention that when we simply say gain margin, we refer to the smaller of the
upper and lower phase margins and denote it by Kgm .
Figure 8.23: A Nyquist plot illustrating lower and upper gain margins.
Remark 8.4.5. In many texts one simply sees “gain margin” without reference to upper and lower. They are
usually referring to the upper gain margin which is more relevant for closed-loop stability when the loop gain
L(s) is minimum phase and has all its poles in C− .
50
40
30
Magnitude (dB)
20
10
-10
-20
-30
-40
180
135
90
45
Phase (deg)
-45
-90
-135
-180
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
Example 8.4.5. (Good gain and phase margin but poor robustness) Consider the loop gain
The Nyquist and Bode plots for this system are shown in Figure 8.26.
From either plot we get the Φpm ≈ 70◦ and Kgm is infinite. These values indicate that the system is robust,
but the Nyquist curve is still close to the critical point, as shown in Figure 8.26a. This example illustrates the
limitation of gain and phase margins when it comes to quantifying robustness to modelling uncertainty. N
1.5
40
0.5
20
Magnitude (dB)
-20
0
-40
-60
-80
-0.5 -100
-90
-120
Phase (deg)
-1
-150
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5 -180
10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
Let’s recap: The phase margin is related to the distance from the critical point to the Nyquist plot along
the unit circle; the gain margin is related to the distance from the critical point to the Nyquist plot along the
real axis. More generally, it makes sense to define the stability margin to be the distance from the critical
point to the closest point on the Nyquist plot.
Consider the system in Figure 8.27 and define S(s) to be the TF from the reference input r to the tracking
error e
1
S(s) := . (8.6)
1 + C(s)P (s)
Assume that the feedback system is stable. Then the distance from −1 + j0 to the Nyquist plot of L(s) =
C(s)P (s) can be expressed as follows
In words: the point on the Nyquist plot which is closest to the point −1 + j0 is a distance equal to the reciprocal
of peak magnitude on Bode plot of S(jω). Thus, to increase the stability margin, one may wish to make the
function S(s) small.
Definition 8.4.6. Let L(s) ∈ R(s) be the loop gain TF for the feedback system in Figure 8.7 and let S(s) =
(1 + L(s))−1 . The stability margin, of the feedback system is
h i−1
sm := max |S(jω)| .
ω
Example 8.4.6. Let’s return to the system from Example 8.4.5. The Bode plot of the transfer function
1
S(s) =
1 + L(s)
10
0
Magnitude (dB)
-10
-20
-30
-40
90
60
Phase (deg)
30
0
10 -2 10 -1 10 0 10 1
Frequency (rad/s)
From the magnitude plot of S(jω) we get that the peak response is 11.3 dB which means that maxω |S(jω)| =
3.6728. The stability margin is therefore
h i−1 1
max |S(jω)| = = 0.2723
ω 3.6728
which is very low. N
There is a very nice geometric interpretation of the stability margin on the Nyquist plot. Suppose that, to
ensure good robustness, we have a desired stability margin of sm ≥ M . This means that we want the Nyquist
plot to be a distance greater than or equal to M from the critical point. In this case we want the Nyquist plot
to appear as in Figure 8.29.
When designing feedback systems, it will often be useful to define the robustness of the system using gain,
phase and stability margins. These numbers tell us how much the system can vary from our nominal model
and still be stable. Reasonable values of the margins are shown in Table 8.4.
8.5 Summary
This chapter is very important because the Nyquist plot and its interpretation lie at the heart of the design
methods discussed in the next chapter. After completing this chapter you should know the following.
1. You should know what it means for a closed curve in the complex plane to have CW (negative) orientation
and CCW (positive) orientation.
2. You should understand the basic ideas of Section 8.1 and especially the idea behind the construction
of Nyquist plots: A Nyquist plot is the image of a curve in the complex plane under a complex-valued
rational function.
3. Given a feedback system you should be able to find its loop gain TF L(s).
4. You must be able to draw and, even more importantly, interpret a Nyquist plot.
6. Stability margins tell us how far a system is from being unstable. This depends entirely on how much mod-
elling uncertainty there is. For TFs, modelling uncertainty is naturally measured in terms of magnitude
and phase as functions of frequency.
7. Understanding the meanings of gain and phase margin, in terms of feedback stability, is essential. You
should be able to read gain and phase margins off Nyquist and Bode plots.
8. Know the definition of stability margin and be aware of the deficiency of using gain and phase margins
alone. You should know how to obtain the stability margin from a Bode plot of (8.6).
In this chapter we develop the basic technique of controller design in the frequency domain. Specifications are
in the form of bandwidth and stability margin. Of course our real interest is how the system will behave in
physical time (e.g. settling time, overshoot, steady-state tracking error) and in using the frequency domain we
are employing the duality between the two domains. The methods we use in this chapter fall under the broad
heading of loop shaping, as the objective is to shape the Nyquist plot to have desired properties.
Contents
9.1 Loop shaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
9.2 Performance specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
9.3 Lag compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
9.4 Lead compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
9.5 Lead-lag compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
9.6 Loop shaping theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
9.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
The design problem is this: Given P , the nominal plant transfer function, maybe some uncertainty bounds,
and some performance specifications design an implementable C. The performance specs would include, as
a bare minimum, stability of the feedback system. The simplest situation is where the performance can be
specified in terms of the transfer function
1
S(s) = . (9.1)
1 + C(s)P (s)
which is called the sensitivity function.
187
9.1. Loop shaping 188
Definition 9.1.1. The sensitivity function of a feedback system with loop gain L(s) is S(s) = (1 + L(s))−1 .
Remark 9.1.2. The transfer function (9.1) is called the sensitivity function for the following reason. Let G(s)
denote the transfer function from r to y
C(s)P (s)
G(s) := .
1 + C(s)P (s)
Consider the relative perturbation in G due to a relative perturbation in P
∆G/G ∆G P
lim = lim
∆P →0 ∆P/P ∆P G
∆P →0
dT P
= ·
dP T
d C(s)P (s) 1 + C(s)P (s)
= ·P ·
dP 1 + C(s)P (s) C(s)P (s)
= S(s).
So S is a measure of the sensitivity of the closed-loop transfer function to variations in the plant transfer
function.
For us, S is important for two reasons: 1) S is the transfer function from the reference signal r to the
tracking error e. Thus we want |S(jω)| to be small over the range of frequencies of r (see Example 5.4.4). 2)
The peak magnitude of S is the reciprocal of the stability margin (see Definition 8.4.6). Thus a typical desired
magnitude plot of S(jω) is shown in Figure 9.2.
Here ω1 is the maximum frequency of the reference signal r, ε is the maximum permitted relative tracking
error, ε < 1, and M is the maximum peak magnitude of |S|, M > 1. If |S| has this shape and the feedback
system is stable, then for the input r(t) = cos (ωt), ω ≤ ω1 , we have |e(t)| ≤ ε in steady state, and the stability
margin is at least 1/M . A typical value for M is 2 (see Table 8.4). In these terms, the design problem can be
stated as follows: Given P, M, ε, ω1 ; design C so that the feedback system is stable and |S| satisfies |S(jω)| ≤ ε
for ω ≤ ω1 and |S(jω)| ≤ M for all ω.
Example 9.1.1.
10
P (s) =
0.2s + 1
This is a typical transfer function of a DC motor (cf. Example 2.8.5). Let’s take a PI controller:
Ki
. C(s) = Kp +
s
Then any M, ε, ω1 are achievable by suitable Kp , Ki . To see this, start with
1
S(s) = 10(Kp s+Ki )
1+ s(0.2s+1)
s(0.2s + 1)
= .
0.2s2 + (1 + 10Kp )s + 10Ki
We can simplify by reducing to two equal real poles:
5s(0.2s + 1)
S(s) = .
(s + K)2
Clearly, if we find a suitable K, then we can back-solve for Kp , Ki . Figure 9.3 shows the Bode plot of S(jω) for
K = 10.
0
-10
-20
-30
Magnitude (dB)
-40
-50
-60
-70
-80
-90
180
135
Phase (deg)
90
45
0
-1 0 1 2 3 4
10 10 10 10 10 10
Frequency (rad/s)
Sketch the asymptotic Bode plot of S and confirm that any M > 1, ε < 1, and ω1 can be achieved. N
Exercise 9.1. Design a PI controller for the system in Example 9.1.1 for M = 2, ε = 0.01, and ω1 = 50 rad/s.
In practice it is common to combine interactively the shaping of S with a time-domain simulation. Now,
S(s) is a nonlinear function of C(s). So in fact it is easier to shape the loop transfer function L(s) = C(s)P (s)
instead of S(s) = (1 + L(s))−1 . Notice that if the loop gain is high, i.e., |L| 1, then
1
|S| ≈ .
|L|
A typical desired loop gain amplitude plot is shown in Figure 9.4. In shaping |L| instead of |S|, we don’t have
a direct handle on the stability margin, unfortunately. However, we can directly influence the gain and phase
margins, as we’ll see.
Figure 9.4: Typical desired shape for a loop gain. The loop gain is easier to work with for design than the sensitivity function
because it is linear in the controller. High gain at low frequencies provides good tracking and disturbance rejection. Fast
roll off to the gain crossover frequency gives good robustness. Low gain at high frequencies gives good rejection of high
frequency noise.
Observe that the phase margin only depends on the damping ratio ζ and not on ωn . Figure 9.5 shows a graph
of phase margin Φpm versus damping ratio ζ and also shows that it can be reasonably well approximated by a
line for small values of ζ. We conclude that, for the system (9.2) we have
If 0 ≤ ζ ≤ 0.7 then Φpm ≈ 100ζ (expressed in degrees). (9.5)
While the expression (9.5) was derived for the loop gain (9.2), we will use it as a general rule-of-thumb for
converting overshoot specifications into phase margin specifications.
90
80
70
60
50
40
30
20
10
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Figure 9.5: Phase margin Φpm as a function ζ for (9.2) (black) and its linear approximation (grey).
Remark 9.2.1. In the next two sections we present two simple loop shaping controllers. These loop shaping
controllers work best for “nice plants” that (i) are stable or, at worst, have a single pole at s = 0 and (ii) have
only one gain crossover frequency ωgc and only one phase crossover frequency ωpc .
αT s + 1
C(s) = KC1 (s) = K , 0 < α < 1, T > 0, K > 0, (lag controller). (9.7)
Ts + 1
The lag controller has a steady-state gain of C(0) = KC1 (0) = K and its pole and a zero locations are shown in
Figure 9.7. The asymptotic Bode plot of C1 (s) is shown in Figure 9.8. A lag controller is like a low pass filter.
Figure 9.7: Pole-zero configuration of a lag controller: the pole is always closer to the imaginary axis than the zero.
Magnitude (dB)
Phase (deg)
Exercise 9.2. Prove that magnitude plot of C1 (s) levels off at 20 log |α| as indicated in Figure 9.8.
1
Exercise 9.3. Prove that ωm , the geometric mean of the pole and zero location, is given by ωm = T
√
α
.
2. Boost low frequency gain to improve steady-state tracking and disturbance rejection without having too
much effect on gain margin, phase margin nor high frequency behaviour.
The loop shaping idea behind lag design is illustrated in Figure 9.9.
Magnitude (dB)
Phase (deg)
Frequency (rad/s)
Figure 9.9: The black plot shows the Bode plot of KP (jω) where K has been chosen to meet steady-state tracking and
disturbance rejection specifications. The red plot is the lag compensated system KC1 (jω)P (jω). The lag controller reduces
the high frequency gain without phase lag. This lowers the gain crossover frequency which, for “nice plants,” increases the
phase margin.
Example 9.3.1. (Increasing phase margin with a lag controller) The plant transfer function is
1
P (s) = .
s(s + 2)
40 4
30
20
3
Magnitude (dB)
10
0
2
-10
-20
-30 1
-40
-50
0
-90
-1
-120
Phase (deg)
-2
-150
-3
-180
10 -1 10 0 10 1 10 2 -4
-2.5 -2 -1.5 -1 -0.5 0
Frequency (rad/s)
Figure 9.10: Bode and Nyquist plot for Example 9.3.1 with only proportional control.
crossover frequency is ωgc = 6.17 rad/s and the phase margin is Φpm = 18◦ . Figure 9.10b shows the Nyquist
plot of KP (s). The system is closed-loop stable with K = 40 since there are no encirclements of −1 + j0 (not
shown in Figure 9.10b is the semi-circle of infinite radius on the right). However we see that a rotation of the
plot by −18◦ will result in an encirclement.
Step 3: We now design the lag compensator C1 . The idea is to reduce the high frequency gain and increase
Φpm while not changing the low frequency gain (thus preserving Specification (a) achieved in Step 1).
We want Φpm = 45◦ but we’ll actually aim for 50◦ , a bit more than 45◦ , to compensate for the fact that the
phase plot of a lag controller only approaches zero asymptotically as frequency increases.
From the Bode plot in Step 2 we find the frequency at which we have the correct phase margin. We obtain
◦
Φdes
pm = 50 = 180 + ](KP (jω)) when ω = 1.7 rad/s.
Again, from the Bode plot of KP (jω), we see that the gain at ω = 1.7 rad/s is 19 dB. Therefore we want to
reduce the gain by 19 dB at ω = 1.7 without changing the phase there. We have (see Figure 9.8 and Exercise 9.2)
We now pick T so that we don’t change the phase near ω = 1.7 by ensuring that
10
≤ 1.7.
αT
I’ll pick T = 52.7 (equality).
Step 4: We now plot the Bode plot of the lag compensated loop gain L(s) = KC1 (s)P (s). It is shown in
Figure 9.11. From Figure 9.11 we find that the phase margin is now Φpm = 44.6◦ . Close enough. Figure 9.12a
120
100
80
60
Magnitude (dB)
40
20
-20
-40
-60
-80
-90
-120
Phase (deg)
-150
-180
10 -3 10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s)
Figure 9.11: Bode plot of KC1 (jω)P (jω) (red) and KP (jω) (blue) for Example 9.3.1.
shows the Nyquist plot of the compensated system. We see that the curve is now much farther from the critical
point.
1.8
4 1.6
3 1.4
1.2
2
1
Amplitude
0.8
0.6
-1
0.4
-2
0.2
-3
0
0 2 4 6 8 10 12 14
Time (seconds)
-4
-2.5 -2 -1.5 -1 -0.5 0
Figure 9.12: Nyquist plot and step response for Example 9.3.1 with final lag controller.
Step responses are shown in Figure 9.12b. The step response of KP/(1+KP ), that is, the plant compensated
only by the gain for Spec (a), is fast but oscillatory. The step response of P C/(1 + P C) is slower, typical of lag
compensation1 , but less oscillatory which was the goal of Specification (b). N
1
A lag controller reduces the gain crossover frequency which, using our rule-of-thumb from Section 9.2, reduces the closed-loop
bandwidth. Lowering the bandwidth, as we saw in Chapter 4, results in a slower response.
The MATLAB code below was used to design the controller in the above example.
1 s = tf('s'); P = 1/s/(s+2);
2 K = 40;
3 [mag, phase, w] = bode(K*P);
4 Phi desired = 45; ∆ = 5;
5 [¬, i] = min(abs(phase + 180 − Phi desired − ∆)); % find freq. with desired phase
6 alpha = 1/mag(i);
7 T = 10/alpha/w(i);
8 C = K*(alpha*T*s + 1)/(T*s + 1);
9 [Gm,Pm,Wpc,Wgc] = margin(C*P); % check if the design meets the spec
3. If Φpm specification is met, we’re done (a proportional controller can do the job!). Otherwise, find ω ? such
that
dist (](KP (jω ? )), 180◦ ) = Φdes
pm + δ.
Here Φdes ◦
pm is the given specification and δ is a buffer to account for approximations, usually 5 .
4. Shift the gain down at the frequency ω ? from step 3 to get a new gain crossover frequency
1
α= .
K|P (jω)|
5. Ensure that the phase isn’t affected near the frequency ω ? from steps 3, 4
10
≤ ω?.
αT
6. Simulate the closed-loop system and check Bode plot of C(jω)P (jω) to make sure all specifications are
met.
The next example illustrates the second main use of lag controllers.
Example 9.3.2. (Boosting low frequency gain without changing high frequency gain) Consider the
plant with time-delay
1 + 0.48s
P (s) = 10.4e−0.05s .
s(s + 2)(1 + 0.13s)
The specifications are:
(a) When r(t) is a unit ramp, the steady-state tracking error must be less than or equal to 0.05.
(b) The phase margin and bandwidth should not be significantly changed.
20
Magnitude (dB)
-20
-40
-60
-80
-100
180
135
90
45
Phase (deg)
-45
-90
-135
-180
10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
This is a typical lag compensation problem because we only want to increase the low frequency gain. The
Bode plot of P (jω) is shown in Figure 9.13. From the Bode plot we obtain that that the phase margin is
approximately 47◦ and that ωBW ≈ ωgc = 4.4 rad/s. We now have numbers to work with for the second
specification.
Step 1: Choose K to meet the tracking specification.
1
E(s) = R(s) (TF from e to r)
1 + C(s)P (s)
1 1
= αT s+1 1+0.48s
1 + K T s+1 10.4e−0.05s s(s+2)(1+0.13s) s2
(s + 2)(T s + 1)(1 + 0.13s) 1
= −0.05s
.
s(s + 2)(T s + 1)(1 + 0.13s) + 10.4Ke (αT s + 1)(1 + 0.48s) s
Assuming closed-loop stability, use the FVT
2
ess = lim e(t) = lim sE(s) = .
t→∞ s→0 10.4K
So specification (a) is satisfied if K ≥ 3.85. We’ll pick K = 4 so that
1 + 0.48s
KP (s) = 41.6e−0.05s .
s(s + 2)(1 + 0.13s)
Step 2: Draw the Bode plot of KP (s). Actually, there is no need in this case since Figure 9.13 has all the
needed data but remember to account for the increase in gain from our choice of K.
Step 3: The desired gain crossover frequency is ωgc = 4.4 rad/s and, since we’ve only added a gain of
K = 4, the gain of KP (jω) at ω = 4.4 rad/s is exactly 20 log |K|.
Step 4: We shift the gain down at ω = 4.4 to get
1 1
α= = = 0.25.
K|P (jω)| K
Step 5: Ensure the phase isn’t affected near ω = 4.4
10
≤ 4.4.
αT
I’ll take T = 9.1. Our overall lag controller is
0.25(9.1)s + 1 9.1s + 4
C(s) = KC1 (s) = 4 = .
9.1s + 1 9.1s + 1
80
60
40
Magnitude (dB)
20
-20
-40
-60
-80
-100
180
135
90
45
Phase (deg)
-45
-90
-135
-180
10 -3 10 -2 10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
Figure 9.14: Bode plot of KC1 (jω)P (jω) for Example 9.3.2.
Step 6: The Bode plot of the lag compensated loop gain L(s) = KC1 (s)P (s) is shown in Figure 9.14. From
Figure 9.14 we find that the phase margin is Φpm = 45◦ at ωgc = 4.38 rad/s. Close enough.
Exercise 9.4. Simulate the closed-loop step responses of P/(1 + P ) and CP/(1 + CP ). Verify that our lag compensated system
has a higher settling time.
Exercise 9.4 shows that the step response of the compensated system is slower. This is typical of a lag
compensator.
Exercise 9.5. Simulate the closed-loop response of the system to a ramp input and verify that our controller meets the tracking
specification.
Exercise 9.5 shows that our lag compensated system does a much better job tracking ramp signals. N
it can be viewed as a special case of the lag controller in which the lag controller’s pole has been moved all the
way to the origin. The asymptotic Bode plot of a PI controller is shown in Figure 9.15. The high frequency
gain of a PI controller equals 20 log |K| and its high frequency phase equals zero2 . The PI controller’s gains can
be selected using the same procedure as a lag controller.
Example 9.3.3. Let’s re-do Example 9.3.1 using a PI controller. Once again the specifications are:
(a) When r(t) is a unit ramp, the steady-state tracking error must be less than or equal to 0.05.
Observe that the PI controller has integral action (a pole at s = 0) and so C(s)P (s) will have two poles at
the origin. Therefore ramps will be perfectly tracked in steady-state meaning that we only need to worry about
the phase margin specification.
2
In contrast to a lag controller whose high frequency gain is 20 log |α| and high frequency phase equals zero.
Magnitude (dB)
Phase (deg)
80
0
60
40
-20
Magnitude (dB)
Magnitude (dB)
20
-40 0
-20
-60
-40
-60
-80
-80
-100 -100
-90 -90
-120
Phase (deg)
Phase (deg)
-135
-150
-180 -180
10 -1 10 0 10 1 10 2 10 -3 10 -2 10 -1 10 0 10 1 10 2
Frequency (rad/s) Frequency (rad/s)
Figure 9.16: Uncompensated and PI compensated Bode plots for Example 9.3.3.
Step 1: We already meet the tracking specification so there is nothing to do in this step.
Step 2: Draw Bode plot of P (jω). See Figure 9.16a.
Steps 3 – 4: From Figure 9.16a we have that the phase margin is 76◦ at ωgc = 0.5 rad/s. We’re already
meeting the specification.
Step 5: Since the phase margin specification is already met, we select K and Ti to ensure that neither the
gain nor the phase is affected very much near the crossover frequency ωgc = 0.5 rad/s. Looking at the gain Bode
plot from Figure 9.15, we should pick K = 1 to ensure that the gain isn’t changed near the crossover frequency.
Next pick Ti to ensure the PI controller does not affect the phase near the crossover frequency. Looking at the
phase Bode plot from Figure 9.15, we should pick
10
≤ 0.5.
Ti
I’ll take Ti = 20. Our controller is C(s) = 1 + 0.05s−1 .
Step 6: The Bode plot of the loop gain L(s) = C(s)P (s) in Figure 9.16b meets all the specifications.
N
The lead controller has a steady-state gain of C(0) = KC1 (0) = K and its pole and a zero locations are shown
in Figure 9.18.
Figure 9.18: Pole-zero configuration of a lead controller: the pole is always farther from the imaginary axis than the zero.
The asymptotic Bode plot of C1 (s) is shown in Figure 9.19. A lead controller is a high pass filter. Lead
Magnitude (dB)
Phase (deg)
The loop shaping idea behind lead design is illustrated in Figure 9.20. Before doing a design example we need
Magnitude (dB)
Phase (deg)
Frequency (rad/s)
Figure 9.20: The black plot shows the Bode plot of KP (jω) where K has been chosen to meet steady-state tracking and
disturbance rejection specifications. The red plot is the lead compensated system KC1 (jω)P (jω). The lead controller
increases the phase of the system at a designer specified frequency. An undesirable side effect is that it also increases the
gain at the specified frequency. This changes ωgc .
2. The magnitude of C1 (jω) at ωm . This is the midpoint between 20 log |1| and 20 log |α|
1
log |C1 (jωm )| = (log |1| + log |α|)
2 √
= log ( α).
Therefore √
|C1 (jωm )| = α. (9.10)
3. The angle φmax : This is the angle of C1 (jωm ) (see Figure 9.19). Thus
√
1 1 α−1
sin (φmax ) = α− √ √ q = ,
α 1+α 1+ 1 α+1
α
and hence
−1 α−1 1 + sin (φmax )
φmax = sin , α= . (9.11)
α+1 1 − sin (φmax )
Example 9.4.1. (Increasing phase margin with a lead controller) Let’s re-do Example 9.3.1 using a
lead controller.
1 (a) |ess | ≤ 0.05 for r(t) = t,
P (s) = Specs :
s(s + 2) (b) Φpm = 45◦ .
We start with a trick; express the lead controller (9.8) in the form
αT s + 1 K̂ αT s + 1
C(s) = K =: √ .
Ts + 1 α Ts + 1
√
The α term is ugly, but as we’ll see, it’s convenient for design purposes.
Step 1: (same as lag) Choose K̂ ≥ 40 so that K̂P (s) meets the tracking spec. Boost K̂ by 10bB (a guess)
√ 1
to account for the magnitude reduction that will result from the α term in our trick. I’ll pick K̂ = 40 · 10 2 .
Draw the Bode plot of K̂P (s) and find that Φpm = 10.2◦ at ωgc = 11.2 rad/s.
Step 2: We need at least 45 − 10.2 = 34.8◦ phase addition in order to meet the spec so we set φmax = 34.8◦ .
The lead controller will add the most phase at ωm so we set ωm = ωgc = 11.2 rad/s to get the maximum phase
addition at the phase crossover frequency.
Step 3: Now that we’ve selected numerical values for φmax and ωm , we can use our design equations. We
get
1 + sin (φmax ) 1
α= = 3.66, T = √ = 0.0467
1 − sin (φmax ) ωm α
and we determine that 1
K̂ 40 · 10 2
K=√ = √ = 66.13.
α 3.66
The lead controller is
αT s + 1
C(s) = K , α = 3.66, T = 0.0467, K = 66.13.
Ts + 1
Step 4: We now plot the Bode plot of the lead compensated loop gain L(s) = KC1 (s)P (s). It is shown in
Figure 9.22. From Figure 9.22 we find that the phase margin is now Φpm = 45◦ . N
The MATLAB code below was used to design the controller in the above example.
1 s = tf('s'); P = 1/s/(s+2);
2 hatK = 40*sqrt(10); % boost of 10dB
3 [Gm,Pm,Wpc,Wgc] = margin(hatK*P); % get margins of partially compensated system
80
60
40
20
Magnitude (dB)
0
-20
-40
-60
-80
-100
-90
Phase (deg)
-135
-180
10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
Figure 9.22: Bode plot of KC1 (jω)P (jω) (red) and KP (jω) (blue) for Example 9.3.1.
Exercise 9.6. Simulate and compare the step responses of the lead and lag controllers from Examples 9.3.1 and 9.4.1. Generate
plots of the respective control signals. They both meet the specifications but the lead controller has a faster response (lead increases
ωgc which increases the bandwidth) at the expensive of using more control effort.
The next example illustrates the second main use of lead controllers.
Example 9.4.2. (Increasing phase margin and bandwidth with lead controller) Consider the plant
1
P (s) = 4e−0.05s
s(s + 2)
We start by converting the second specification into a frequency domain constraint. Assuming the system
behaves like a second order underdamped system we can use the following approximations.
◦
Φdes
pm = 50 ⇒ ζ = 0.5,
4
Ts ≈ ≤ 2 ⇒ ζωn ≥ 2,
ζωn
⇒ ωn ≥ 4.
For an underdamped second order system ωBW ≈ ωn so we want ωgc ≈ ωBW = 4 rad/s. Of course at the end
we have to check that our controller satisfies the specifications for the actual plant and not just for a second
order approximation.
√
Step 1: Using the trick from the previous example, define K̂ = K α. Now choose the gain K̂ to meet the
bandwidth specification. The Bode plot of P (jω) is shown in Figure 9.23. From the Bode plot we see that we
must boost the gain by about 14dB which yields
14
K̂ = 10 20 = 5.
20
-20
Magnitude (dB)
-40
-60
-80
-100
-120
180
135
90
45
Phase (deg)
-45
-90
-135
-180
10 -1 10 0 10 1 10 2 10 3
Frequency (rad/s)
Step 2: Draw Bode plot of K̂P (jω). Since we already have the Bode plot of P (jω), we have that the Bode
plot of K̂P (jω) is the same as that in Figure 9.23 with the magnitude plot shifted upwards by 14dB.
Steps 3 – 4: We want the crossover frequency to be 4 rad/s. From Figure 9.23 we have that the phase at
ω = 4 is about −165◦ . Therefore we need to add at least
20
0 1.2
Magnitude (dB)
-20
1
-40
-60
0.8
-80
Amplitude
-100
180
0.6
135
90
45 0.4
Phase (deg)
-45
0.2
-90
-135
-180
0
10 -1 10 0 10 1 10 2 10 3 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8
Frequency (rad/s) Time (seconds)
(a) Bode plot of KC1 (jω)P (jω). (b) Step response of P C/(1 + P C).
Figure 9.24: Bode plot of loop gain and step response for Example 9.4.2.
√
1. Define K̂ := K α.
(i) Use FVT to select K̂ such that K̂P (s) meets the steady-state specification. Purposefully boost the
gain by 10dB to compensate for the distortion that comes from α.
(ii) Pick K̂ so that the gain crossover frequency of K̂P (jω) equals the desired bandwidth.
2. Draw the Bode plot of K̂P (jω).
3. Find ωgc and Φpm ; set ωm = ωgc .
4. Determine the amount of phase to add: φmax = Φdes
pm − Φpm .
√
5. Compute α using (9.11). Set K = K̂/ α.
6. Compute T using (9.9).
7. Simulate closed-loop system and check Bode plot of KC1 (jω)P (jω) to make sure all specifications are
met. If they aren’t met, you can return to Step 1 and use a different K̂.
Magnitude (dB)
Phase (deg)
Example 9.4.3. (Ideal PD controller) Let’s re-do Example 9.3.1 using an ideal PD controller.
Steps 1 – 3: Again choose K = 40 to meet the tracking spec. Once again we draw the Bode plot of KP (s)
and find that Φpm = 18◦ at ωgc = 6 rad/s (see Figure 9.10a).
Step 4: As before, we need at least 27◦ degrees of phase addition.
Step 5 – 6: The phase contribution of an ideal PD controller at the frequency ω is
So pick Td using
1 1
Td = tan (27◦ + δ) = tan (27◦ + 5◦ ) = 0.1041.
ωgc ωgc
Here ωgc = 6 rad/s is the frequency from the earlier steps and the buffer δ = 5◦ is included because the PD
controller increases the gain at ωgc .
Step 7: The controller we’ve designed is
C(s) = 40 (1 + 0.1041s) .
The Bode plot of C(jω)P (jω) is shown in Figure 9.26a. The phase margin is 51.8◦ at ωgc = 6.9 rad /s. The
tracking error for a ramp reference is shown in Figure 9.26b. N
40
30
20 0.1
Magnitude (dB)
10
-10
0.08
-20
-30
-40
0.06
-50
-90
-95
-100
0.04
-105
Phase (deg)
-110
-115
-120
0.02
-125
-130
-135
10 -1 10 0 10 1 10 2 10 3
0
Frequency (rad/s) 0 1 2 3 4 5 6 7 8 9 10
(a) Bode plot of C(jω)P (jω). (b) Ramp tracking error e(t) = t − y(t).
Figure 9.26: Bode plot of loop gain and ramp response for Example 9.4.3.
3. If Φpm specification is met, we’re done (a proportional controller can do the job!). Otherwise, divide Φdes
pm
into two roughly equal parts Φdes
pm = Φ pm,1 + Φ pm,2 .
7. Simulate the closed-loop system and check Bode plot of C(jω)P (jω) to make sure all specifications are
met.
Remark 9.5.1. The reason that the lag controller is designed first in the above procedure is that a lead
controller will tend to “flatten” the phase curve. This means that if we tried to then design a lag controller,
the crossover frequency will be very small and we’ll get a sluggish response.
Step 5: The phase margin of K̂C2 (s)P (s) is Φpm = 23.8◦ at ωgc = 1.5 rad/s.
Step 6: We follow the standard lead control design procedure to design C1 (s) to increase the phase margin
by φmax = Φdes ◦
pm − Φpm = 21.2 at ωm = 1.5 rad/s. This yields α1 = 2.13, T1 = 0.45, K = 433 and
0.961s + 1
C1 (s) = .
0.45s + 1
Step 7: The overall controller is given by
11 T2 = 10/alpha2/w(i);
12 C2 = (alpha2*T2*s + 1)/(T2*s + 1);
13 [Gm,Pm,Wpc,Wgc] = margin(hatK*C2*P); % check if the design meets the spec
14
15 % lead design
16 phi max = Phi pm des − Pm; Wm = Wgc;
17 alpha1 = (1+sind(phi max))/(1 − sind(phi max));
18 T1 = 1/Wm/sqrt(alpha1);
19 C1 = (alpha1*T1*s + 1)/(T1*s + 1);
20
21 % overall controller
22 K = hatK/sqrt(alpha1);
23 C = K*C1*C2;
24 [Gm,Pm,Wpc,Wgc] = margin(C*P); % check if the design meets the spec
Assumption 9.6.1. The loop gain L(s) = C(s)P (s) of the system in Figure 9.1 is stable, minimum phase and
L(0) > 0. J
The exact formula relating the magnitude to the phase is rather complicated, and is derived using Cauchy’s
integral theorem [Wunsch, 2005]. Let
ω0 = any frequency
ω ω
u = normalized frequency = ln ω0 , i.e., eu = ω0
Recall that
cosh (x) ex + e−x
coth (x) = = x .
sinh (x) e − e−x
The phase formula (in radians) is
Z∞
1 dM (u)
](L(jω0 )) = W (u)du (Bode’s gain/phase formula). (9.13)
π du
−∞
The key point of this is that it shows that ](L(jω0 )) can be expressed as an integral involving |L(jω)|. What
it tells us is that for systems that satisfy Assumption 9.6.1, if one wishes to specify a certain magnitude
characteristic for the frequency response (cf. Figure 9.4), the phase characteristic is completely determined.
π2
It turns out we may approximate the weighting function as W (u) ≈ 2 δ(u). Then the phase formula (9.13)
gives
π dM (u)
](L(jω0 )) ≈ . (9.14)
2 du u=0
As an example, consider the situation where
c
L(jω) = near ω = ω0 .
ωn
Thus the slope of the magnitude plot is −n per decade near ω = ω0 . Then
c
|L(jω0 eu )| =
ω0n enu
c
⇒ M (u) = ln |L(jω0 eu )| = ln − nu
ω0n
dM (u)
⇒ = −n
du
π
⇒ ](L(jω0 )) = −n from (9.14).
2
Thus we arrive at the observation: If the slope of |L(jω)| near crossover is −n, then arg(L(jω)) at crossover is
π
approximately −n .
2
What we learn from this observation is that in transforming |P | to |P C| via, say, lag or lead compensation,
we should not attempt to roll off |P C| too sharply near gain crossover. If we do, ]P C will be too large near
crossover, resulting in a negative phase margin and hence instability.
Let us suppose M > 1 and ω1 > 0 are fixed. Can we make ε arbitrarily small? That is, can we get arbitrarily
good tracking over a finite frequency range, while maintaining a given stability margin (1/M )? Or is there a
positive lower bound for ε? The answer is that arbitrarily good performance in this sense is achievable if and
only if P (s) is minimum phase. Thus, non-minimum phase plants have bounds on achievable performance: As
|S(jω)| is pushed down on one frequency range, it pops up somewhere else, like a waterbed.
To understand the result, first note that we can always factor a non-minimum phase TF G(s) as
where Gmp is the minimum phase part of G and A is the non-minimum phase part. We normalize A so that
|A(jω)| = 1. The transfer function A is called all-pass because it has gain 1 at all frequencies.
Example 9.6.3.
1−s
P (s) = , p > 0, p 6= 1.
(s + 1)(s − p)
The plant has a non-minimum phase zero at s = 1. If C(s) = Nc /Dc is a stabilizing controller, then
1 (s + 1)(s − p)Dc
S(s) = = .
1 + PC (s + 1)(s − p)Dc + (1 − s)Nc
So S has a non-minimum phase zero at s = p and therefore (s − p)/(s + p) is an all-pass factor of S. There may
be other all-pass factors, so what we can say is that A(s) has the form
s−p
A(s) = A1 (s),
s+p
where A1 (s) is some all-pass TF (may be 1). Evaluate at the RHP zero of the plant
1−p
|A(1)| = |A1 (1)|.
1+p
Now |A1 (1)| ≤ 1 (why?), so
1−p
|A(1)| ≤
1+p
and hence
1+p
|A(1)−1 | ≥ .
1−p
The theorem gives
1+p
c1 log ε + c2 log M ≥ log .
1−p
Thus, if M > 1 is fixed, log ε cannot be arbitrarily negative, and hence ε cannot be arbitrarily small. In fact
the situation is much worse if p ≈ 1, that is, if the RHP plant pole and zero are close. N
The following quote is from Gunter Stein in the inaugural IEEE Bode Lecture at the 1989 IEEE Conference
on Decision and Control describing the waterbed effect:
Sensitivity improvements in one frequency range must be paid for with sensitivity deteriorations in
another frequency range, and the price is higher if the plant is open-loop unstable. This applies to
every controller, no matter how it was designed.
Stein called this, the principle of Conservation of Sensitivity Dirt. This image refers to the area under
the sensitivity function being analogous to a pile of dirt. If one shovels dirt away from some area (i.e. re-
duces sensitivity in a frequency band), then it piles up somewhere else (i.e. the sensitivity increases at other
frequencies).
9.7 Summary
In this chapter we introduced two basic loop shaping design methods. Control design is a vast subject area
with many other techniques not covered here. Key ideas to extract from this chapter are listed below.
1. Understand how adjusting the shape of the sensitivity function’s Bode plot can lead to good performance.
3. Understand why we shape the Bode plot of L(s) instead of S(s) and the advantages and disadvantages
of doing so.
4. Know what a lag controller is and what it is used for. Especially know Figures 9.7 and 9.8.
5. Know how to design a lag controller to meet specs on (i) stability (ii) steady-state tracking (iii) percentage
overshoot (converted into a Φpm spec).
6. Know what a lead controller is and what it is used for. Especially know Figures 9.18 and 9.19.
7. Know how to design a lead controller to meet specs on (i) stability (ii) steady-state tracking or closed-loop
bandwidth (iii) percentage overshoot (converted into a Φpm spec).
8. Be able to use the loop-shaping ideas of this chapter to design PI and PD controllers.
9. Understand the performance limitations discussed in Section 9.6 and that non-minimum phase systems
have inherent performance limitations which no controller can overcome.
If this is the only course you take on control then it is hoped that you learned the following.
• What it means for a system to be linear and the central role that linear systems play in engineering.
If you plan to take another course in control, it is hoped that you additionally learned
The sequels to this course are ECE488 Multivariable Control Systems, which develops the state-space method
in continuous time, and ECE481 Digital Control Systems, which treats computer control. There is also ECE486
Robot Dynamics and Control. The subject of control science and engineering is vast and this course can take
you in many directions.
212
Bibliography
[Anderson and Ye, 2019] Anderson, B. and Ye, M. (2019). Recent advances in the modelling and analysis of
opinion dynamics on influence networks. International Journal of Automation and Computing, 16(2):129–149.
2
[Åström and Hägglund, 1995] Åström, K. and Hägglund, T. (1995). PID Controllers. Instrument Society of
America, 2nd edition. 150, 157, 162, 164
[Åström and Hägglund, 2006] Åström, K. and Hägglund, T. (2006). Advanced PID Control. The Instrumenta-
tion, Systems, and Automation Society. 150
[Åström and Murray, 2019] Åström, K. and Murray, R. (2019). Feedback systems: An introduction for scientists
and engineers. Princeton University Press, 2 edition. 7, 8, 150
[Basar and Basar, 2001] Basar, T. and Basar, T. (2001). Control Theory: Twenty-Five Seminal Papers (1932-
1981). Wiley-IEEE Control Systems Society. 166
[Bellman and Kalaba, 1964] Bellman, R. and Kalaba, R. (1964). Selected Papers on Mathematical Trends in
Control Theory. Dover. 166
[Bequette, 2005] Bequette, B. W. (2005). A critical assessment of algorithms and challenges in the development
of a closed-loop artificial pancreas. Diabetes Technology & Therapeutics, 7(1):28–47. 2
[Cannon Jr., 2003] Cannon Jr., R. (2003). Dynamics of Physical Systems. Dover Publications. 18
[Chen, 1999] Chen, C. (1999). Linear System Theory and Design. Oxford University Press, New York, third
edition. 63
[Cobelli et al., 2009] Cobelli, C., Man, C. D., Sparacino, G., Magni, L., Nicolao, G. D., and Kovatchev, B.
(2009). Diabetes: Models, signals, and control. IEEE Reviews in Biomedical Engineering, 2:54–96. 2
[Desborough and Miller, 2002] Desborough, L. and Miller, R. (2002). Increasing customer value of industrial
control performance monitoring–honeywell’s experience. In Sixth International Conference on Chemical Pro-
cess Control, volume 98 of AIChE Symposium Series Number 326. 150
[Dorf and Bishop, 2011] Dorf, R. and Bishop, R. (2011). Modern Control Systems. Prentice Hall, 12th edition.
59
[Doyle et al., 1990] Doyle, J., Francis, B., and Tannenbaum, A. (1990). Feedback Control Theory. Macmillan
Publishing Co. 1, 118
[Dullerud and Paganini, 2000] Dullerud, G. and Paganini, F. (2000). A Course in Robust Control Theory.
Springer. 92, 125
[Evans, 1948] Evans, W. (1948). Graphical analysis of control systems. Transactions of the American Institute
of Electrical Engineers, 67(1):547–551. 137
213
BIBLIOGRAPHY 214
[Evans, 1950] Evans, W. (1950). Control system synthesis by root locus method. Transactions of the American
Institute of Electrical Engineers, 69(1):66–69. 137
[Filieri et al., 2015] Filieri, A., Hoffmann, H., and Maggio, M. (2015). Automated multi-objective control for
self-adaptive software design. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software
Engineering, pages 13–24. 2
[Goodwin et al., 2001] Goodwin, G., Graebe, S., and Salgado, M. (2001). Control System Design. Prentice
Hall. 13, 150
[Gopal, 1963] Gopal, M. (1963). Control Systems: Principles and Design. McGraw-Hill. 27
[Hellerstein et al., 2004] Hellerstein, J., Diao, Y., Parekh, S., and Tilbury, D. M. (2004). Feedback Control of
Computing Systems. Wiley-IEEE Press, New York, U.S.A. 2, 8
[Jia et al., 2015] Jia, P., MirTabatabaei, A., Friedkin, N., and Bullo, F. (2015). Opinion dynamics and the
evolution of social power in influence networks. SIAM Review, 57(3):367–397. 2
[Kim and Kumar, 2012] Kim, K. D. and Kumar, P. R. (2012). Cyber physical systems: A perspective at the
centennial. Proceedings of the IEEE, 100:1287–1308. 2
[Lessard et al., 2016] Lessard, L., Recht, B., and Packard, A. (2016). Analysis and Design of Optimization
Algorithms via Integral Quadratic Constraints. SIAM Journal of Optimization, 26(1):57–95. 8
[Lorenz, 1963] Lorenz, E. N. (1963). Deterministic nonperiodic flow. Journal of the Atmospheric Sciences,
20:130–141. 14
[Lundberg et al., 2007] Lundberg, K., Miller, H., and Trumper, D. (2007). Initial conditions, generalized func-
tions, and the Laplace transform troubles at the origin. IEEE Control Systems Magazine, 27(1):22–35. 59
[MacColl, 1945] MacColl, L. (1945). Fundamental theory of servomechanisms. Van Nostrand. 166
[Ny and Pappas, 2014] Ny, J. L. and Pappas, G. J. (2014). Differentially private filtering. IEEE Transactions
on Automatic Control, 59(2):341–354. 2
[Nyquist, 1932] Nyquist, H. (1932). Regeneration theory. Bell Laboratories Technical Journal, 11:126–147. 166
[Patikirikorala et al., 2012] Patikirikorala, T., Colman, A., Han, J., and Wang, L. (2012). A systematic survey
on the design of self-adaptive software systems using control engineering approaches. In 7th International
Symposium on Software Engineering for Adaptive and Self-Managing Systems, pages 33–42. 2
[Pothukuchi et al., 2018] Pothukuchi, R. P., Pothukuchi, S. Y., Voulgaris, P., and Torrellas, J. (2018). Yukta:
multilayer resource controllers to maximize efficiency. In Proceedings of the 45th Annual International Sym-
posium on Computer Architecture, pages 505–518. 2
[Qiu and Zhou, 2010] Qiu, L. and Zhou, K. (2010). Introduction to Feedback Control. Prentice-Hall, Toronto.
126
[Routh, 1877] Routh, E. (1877). A Treatise on the Stability of a Given State of Motion. Macmillan. 126
[Samad, 2017] Samad, T. (2017). A survey on industry impact and challenges thereof. IEEE Control Systems,
37(1):17–18. 150
[Seierstad and Sydsaeter, 1986] Seierstad, A. and Sydsaeter, K. (1986). Optimal control theory with economic
applications. Elsevier. 2
[Smith, 2015] Smith, B. W. (2015). Human error as a cause of vehicle crashes. http://cyberlaw.stanford.
edu/blog/2013/12/human-error-cause-vehicle-crashes. Retrieved March 25 2015. 1
[Wunsch, 2005] Wunsch, A. (2005). Complex variables with applications. Pearson, Toronto, 3rd edition. 166,
208
[Ziegler and Nichols, 1942] Ziegler, J. and Nichols, N. (1942). Optimum settings for automatic controllers.
ASME Transactions, 64(8). 157
216
217 INDEX
Region of convergence, 40
Reset, 153
Reset time, 150
Rise time, 108
root-locus, 138
Schematic diagram, 15
Settling time, 107
Signals, 15
Stability margin, 184
State of a system, 30
State vector, 29
Steady-state gain, 73
Summing junctions, 16
System, 2