ECE311S Dynamic Systems & Control: Course Notes by Bruce Francis January 2010
ECE311S Dynamic Systems & Control: Course Notes by Bruce Francis January 2010
ECE311S Dynamic Systems & Control: Course Notes by Bruce Francis January 2010
1 Introduction 1
1.1 Familiar Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 DC to DC Voltage Converters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Linear Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1
CONTENTS 2
Introduction
1
CHAPTER 1. INTRODUCTION 2
Efficiency
Let’s first model the load as a fixed resistor, Rl (subscript “l” for “load”). Then of course a voltage
dividing resistive circuit suggests itself1 :
+ +
Vs Rl vo
This solution is unsatisfactory for several reasons. First, it is inefficient. Suppose the step-down
ratio is 1/2 and the load resistance Rl is fixed. Then the second resistor is Rl too. The current
equals Vs /2Rl and therefore the power supplied by the input equals (voltage × current)
Vs
Pin = Vs ×
2Rl
while the output power consumed equals
Vs Vs
Po = vo × = Vs × .
2Rl 4Rl
The efficiency is therefore only
Po
η= = 50%
Pin
—it is the ratio of the voltages. A second reason is that the battery will drain and therefore vo will
not be regulated.
S
+ +
Vs Rl vo
1
The output voltage, vo , is written lower case because eventually it’s not going to be perfectly constant.
CHAPTER 1. INTRODUCTION 3
The switch S1 , typically a MOSFET, closes periodically and thereafter opens according to a duty
cycle, as follows. Let T be the period of opening in seconds. The time axis is divided into intervals
of width T :
Over the interval [0, T ), the switch is closed for the subinterval [0, DT ) and then open for [DT, T ),
where D, the duty cycle, is a number between 0 and 1. Likewise, for every other interval. The
duty cycle will have to be adjusted for each interval, but for now let’s suppose it is constant. The
switch S2 is complementary: It is open when S1 is closed, and closed when S1 is open. This second
switch is needed so that there is always a closed circuit around the load. The idea in the circuit
is to choose D to get the desired regulated value of vo . For example, if we want vo to be half the
value of Vs , we choose D = 1/2. In this case vo (t) would look like this:
vo (t) DT
Vs
T t
Square-wave voltage
Clearly, the average value of vo (t) is correct, but vo (t) is far from being constant. How about
efficiency? Over the interval [0, DT ), S1 is closed and the current flowing is Vs /Rl . The input and
output powers are equal. Over the interval [DT, T ), S1 is open and the current flowing is 0. The
input and output powers are again equal. Therefore the efficiency is 100%. However we have not
accounted for the power required to activate the switches.
Inclusion of a filter
Having such large variations in vo is of course unacceptable. And this suggests we need a circuit to
filter out the variations. Let us try adding an inductor:
S L
+ +
Vs vo
Rl
+ +
v1 vo
Rl
v1 (t) DT
Vs
T t
Graph of input
A square wave into a circuit can be studied using Fourier series, which is a fun exercise. Suffice it
to say that the average output voltage vo (t) equals DVs , duty cycle × input voltage, and there’s
a ripple whose first harmonic can be made arbitrarily small by suitable design of the switching
frequency or the circuit time constant.
In practice, the circuit also has a capacitor:
S L
+ +
Vs vo
C Rl
This is called a DC-DC buck converter. The LC filter is lossless and this contributes to the
efficiency of the converter.
Left out of the discussion so far is that in reality Vs is not constant—the battery drains—and
Rl is not a fully realistic model for a load. In practice a controller is designed in a feedback loop
from vo to switch S1 . A battery drains fairly slowly, so it is reasonable to assume Vs is constant and
let the controller make adjustments accordingly. As for the load, a more realistic model includes a
current source, reflecting the fact that the load draws current.
In practice, the controller can be either analog or digital. We’ll return to converters in Chapter 5.
CHAPTER 1. INTRODUCTION 5
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 numbers2 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
1 t
Z
v(t) = i(τ )dτ.
C 0
2
This definition assumes that the vector spaces are over the field of real numbers.
CHAPTER 1. INTRODUCTION 6
1.4 Notation
Generally, signals are written lower case: e.g., x(t). Their transforms are capitalized: X(s) or
X(jω). Resistance values, masses, etc. are capital: R, M , etc. The impulse is δ(t). In signals
and systems the unit step is denoted u(t), but in control u(t) denotes a plant input. Following
Zemanian3 , we denote the unit step by 1+ (t).
3
Distribution Theory and Transform Analysis, A.H. Zemanian, Dover
Chapter 2
The best (only?) way to learn this subject is bottom up—from specific examples to general theory.
So we begin with mathematical models of physical systems. We mostly use mechanical examples
since their behaviour is easier to understand than, say, electromagnetic systems, because of our
experience in the natural world.
x y
f
Brief Article
Thus a box represents a function and the arrows represent variables; the input is the independent
variable, the output the dependent variable.
The Author
Example
December 7, 2007
The simplest vehicle to control is a cart on wheels:
7
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 8
This is a schematic diagram, not a block diagram, because it doesn’t say which of u, y causes
the other. Assume the cart can move only in a straight line on a flat surface. (There may be air
resistance to the motion and other friction effects.) Assume a force u is applied to the cart and let
y denote the position of the cart measured from a stationary reference position. Then u and y are
Brief Article
functions of time t and we could indicate this by u(t) and y(t). We regard the functions u and y as
signals.
The
Newton’s second law tells us that there’s a mathematical relationship Authoru and y, namely,
between
u = M ÿ. 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 graphicallyDecember
by a block7, diagram:
2007
u y
Suppose the cart starts at rest at the origin at time 0, i.e., y(0) = ẏ(0) = 0. Then the position
BriefonArticle
depends only on the force applied. However y at time t depends 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 The at that same time t.
Author 2
December 7, 2007
Block diagrams also may have summing junctions:
u y
stands for y = u + v
u y
stands for y = u − v
-
Brief Article
v
The Author
December 7, 2007
Also, we may need to allow a block to have more than one input:
u
y
v
1
Brief Article
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 9
The Author
December 7, 2007
Example
Brief
θ Article
flat board
on a fulcrum
τ The Author
Suppose a torque τ is applied to the board. Let θ denote the angle December
of tilt and d 7,
the2007
distance of roll.
Then both θ and d are functions of τ . The block diagram could be
Brief Article
d
The Author
τ
December 7, 2007
or
θ
τ
d
1
or initial conditions, if they are not fixed, could be modeled as inputs too. 2
Getting a block diagram is sometimes harder than you think it will be. For example, you’re
riding a skateboard: The system components obviously include you and the skateboard. Anything
else? You need the road to push on, and there must also be the earth to create a gravitation force
on you (you can’t skateboard in space). Would that be it? You, the skateboard, the road/earth.
Does this system have an input? It must, if you’re to move along the road following in, say, the
bike lane. Try drawing a block diagram.
1
Brief Article
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 10
The Author
Example
December 7, 2007
Consider a cart on wheels, driven by a force F and subject to air resistance:
F
M
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 ÿ = F − 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 = F− D(x2 )
M M
y = x1 .
These equations have the form
ẋ = f (x, u), y = h(x) (2.1)
where
x1
x := , u := F
x2
x2
Brief Article
f : R2 × R → R2 , f (x1 , x2 , u) =
M D(x2 )
1 1
Mu − The Author
1
h : R2 → R, h(x1 , x2 ) = x1 .
December 7, 2007
The function f is nonlinear if D is; h is linear. Equation (2.1) constitutes a state model of the
system, and x is called the state or state vector. The block diagram is
u y
P
(x)
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 11
Here P is a possibly nonlinear system, u (applied force) is the input, y (cart position) is the output,
and
cart pos’n
x=
cart velocity
D(x2 ) = D0 x2 , D0 a constant.
Then f is linear:
0 1 0
f (x, u) = Ax + Bu, A := , B := .
0 −D0 /M 1/M
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
y1 y2
u1 u2
M1 M2
K
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 12
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
Brief Article
state vector. In general for mechanical systems it is customary to take x to consist of positions and
velocities of all masses. 2
The Author
Example
December 7, 2007
A mass-spring-damper:
free-body :
K(y − y0 ) D0 ẏ
K D0 y
u
Mg u
1
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 13
M ÿ = u + M g − K(y − y0 ) − D0 ẏ.
x = (x1 , x2 ), x1 = y, x2 = ẏ
ẋ1 = x2
1 K K D0
ẋ2 = u+g− x1 + y0 − x2
M M M M
y = x1 .
ẋ = Ax + Bu + c
y = Cx,
where
0 1 0 0
A= , B= , c= , C = [1 0].
−MK
−D
M
0 1
M g+ K
M y0
The constant vector c is known, and hence is taken as part of the system rather than
as a signal. Brief Article 2
vehicle motion
M2 x1
K2 x2
r
road
surface
Brief Article
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 14
The Author
K1 (x1 − x2 − x10 )
D0 (ẋ1 − ẋ2 )
M1 g u
u
K1 (x1 − x2 − x10 )
D0 (ẋ1 − ẋ2 )
M2 g K2 (x2 − r − x20 )
0 0 1 0 1 0 0
0 0 0 1 0 0
A= , B1 = , B2 = .
− K1 K1
−M D0 D0 1 0
M1 M1 1 M1 M1
K1
M2
K1 +K2
− M2 D0
M2
D0
− M2 − M12 K2
M2
We can regard (2.3) as corresponding to the block diagram
u x
P
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 15
Since c1 is a known constant vector, it’s not taken to be a signal. Here u is the controlled input and
r the uncontrolled input or disturbance.
The output to be controlled might be acceleration or jerk of the chassis. Taking y = ẍ1 = ẋ3
gives
y = Cx + Du + c2 (2.4)
where
h
K1 K1 D0 D0
i 1 K1
C= −M M1 −M M1 , D= , c2 = x10 − g.
1 1 M1 M1
Equations (2.3) and (2.4) have the form
ẋ = f (x, u, r)
y = h(x, u).
Notice that f and h are not linear, because of the constants c1 , c2 . Brief Article 2
x1 M2
θ
L
u
M1
1
The Author
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS December 7, 2007 16
x1 + L sin θ
L − L cos θ
F1
M2 g
M1 ẍ1 = u − F1 sin θ.
d2 d2
sin θ = θ̈ cos θ − θ̇ 2
sin θ, cos θ = −θ̈ sin θ − θ̇2 cos θ
dt2 dt2
to get
multiply the first by cos θ, the second by sin θ, add, and cancel M2 to get
Thus
ẋ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 )
ẋ = f (x, u).
The system is highly nonlinear; as you would expect, it can be approximated by a linear system for
|θ| small enough, say less than 5◦ . 2
Example
This example involves a tank of water, with water flowing it in an uncontrolled way, and water
flowing out at a rate controlled by a valve:
x
u
The signals are x, the height of the water, u, the area of opening of the valve, and d, the flowrate
in. Let A denote the cross-sectional area of the tank, assumed constant. Then conservation of mass
gives
Also
where ∆p denotes the pressure drop across the valve, this being proportional to x. Thus
√
(flow rate out) = c xu
and hence
√
Aẋ = d − c xu.
It is worth noting that not all systems have state models of the form
One example is the differentiator: y = u̇. A second is a time delay: y(t) = u(t − 1). Then of course
there are time-varying systems, meaning systems whose properties change with time. For example,
a mass/force system where the mass is a function of time (the mass of a plane varies as the fuel is
burned):
d
(M (t)ẋ) = u.
dt
Finally, there are PDE models, e.g., the vibrating violin string with input the bow force.
Brief Article
Let us now see how to get a state model for an electric circuit.
The Author
Example
An RLC circuit: December 17, 2007
+ R C L
u
−
There are two energy storage elements, the inductor and the capacitor. It is natural to take the
state variables to be voltage drop across C and current through L:
The Author
x1
+ −
+
u x2
−
2.3 Linearization
So far we have seen that many systems can be modeled by nonlinear state equations of the form
ẋ = f (x, u), y = h(x, u).
(There might be disturbance inputs present, but for now we suppose they are lumped into u.) There
are techniques for controlling nonlinear systems, but that’s an advanced subject. However, many
systems can be linearized about an equilibrium point. In this section we see how to do this. The
idea is to use Taylor series.
Example 1
To review Taylor series, let’s linearize the function y = f (x) = x3 about the point x0 = 1. The
Taylor series expansion is
∞
X f (n) (x0 )
f (x) = cn (x − x0 )n , cn =
n!
n=0
f 00 (x0 )
= f (x0 ) + f 0 (x0 )(x − x0 ) + (x − x0 )2 + ... .
2
Taking only terms n = 0, 1 gives
f (x) ≈ f (x0 ) + f 0 (x0 )(x − x0 ),
that is
y − y0 ≈ f 0 (x0 )(x − x0 ).
Defining ∆y = y − y0 , ∆x = x − x0 , we have the linearized function ∆y = f 0 (x0 )∆x, or ∆y = 3∆x
in this case.
Brief Article
The Author
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 20
December 17, 2007
y
∆y
slope = 3
1
3
x
1 ∆x
Obviously, this approximation gets better and better as |∆x| gets smaller and smaller. 2
Example
f : R3 → R2 , f (x1 , x2 , x3 ) = (x1 x2 − 1, x23 − 2x1 x3 )
Suppose we want to linearize f at the point x0 = (1, −1, 2). Terms n = 0, 1 in the expansion are
∂f
f (x) ≈ f (x0 ) + (x0 )(x − x0 ),
∂x
where
∂f
(x0 ) = Jacobian of f at x0
∂x
∂fi
= (x0 )
∂xj
0
x2 x1
=
−2x3 0 2x3 − 2x1 x
0
1
−1 1 0
= .
−4 0 2
−1 1 0
∂f
A= (x0 ) =
∂x −4 0 2
∆y = y − y0 = f (x) − f (x0 )
∆x = x − x0 .
Summary
Linearizing ẋ = f (x, u), y = h(x, u): Select, if one exists, an equilibrium point. 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, ∆y = C∆x + D∆u.
∆x
Under mild conditions (sufficient smoothness of f and h), this linearized system is a valid approxi-
mation of the nonlinear one in a sufficiently small neighbourhood of the equilibrium point.
Example
ẋ = f (x, u) = x + u + 1
y = h(x, u) = x
An equilibrium point is composed of constants x0 , u0 such that
x0 + u0 + 1 = 0.
So either x0 or u0 must be specified, that is, the analyst must select where the linearization is to
be done. Let’s say x0 = 0. Then u0 = −1 and
A = 1, B = 1, C = 1, D = 0.
Actually, here A, B, C, D are independent of x0 , u0 , that is, we get the same linear system at every
equilibrium point. 2
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 22
Example
We continue the cart-pendulum; see f (x, u) on page 15. An equilibrium point
x30 = 0
x40 = 0
u0 + M2 Lx240 sin x20 − M2 g sin x20 cos x20 = 0
−u0 cos x20 − M2 Lx240 sin x20 cos x20 + (M1 + M2 )g sin x20 = 0.
Multiply the third equation by cos x20 and add to the fourth: We get in sequence
x0 = (arbitrary, 0 or π, 0, 0), u0 = 0.
We have to choose x20 = 0 (pendulum up) or x20 = π (pendulum down). Let’s take x20 = 0. Then
the Jacobians compute to
0 0 1 0
0
0 0 0 1
0
A= , B = .
1
0 −M 2
g 0 0 M1
M1
1
2 g − LM1
0 M1M+M1 L 0 0
The above provides a general method of linearizing. In this particular example, there’s a faster
way, which is to approximate sin θ = θ, cos θ = 1 in the original equations:
d2
M2 (x1 + Lθ) = F1 θ
dt2
0 = M2 g − F1
M1 ẍ1 = u − F1 θ.
These equations are already linear and lead to the above A and B. 2
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 23
2.4 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 also very nice simulation GUIs,
Scicos and SIMULINK, respectively.
Example
The unit step:
1 , t≥0
f (t) = 1+ (t) =
0 , t<0
Actually, the precise value at t = 0 doesn’t matter. The LT is
Z∞ ∞
−st e−st 1
F (s) = e dt = − =
s 0 s
0
and the ROC is
ROC : Re s > 0.
The same F (s) is obtained if f (t) = 1 for all t, even t < 0. This is because the LT is oblivious to
negative time. Notice that F (s) has a pole at s = 0 on the western boundary of the ROC. 2
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.
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 24
Examples
Some other examples: An exponential:
1
f (t) = eat , F (s) = , ROC : Re s > a.
s−a
A sinusoid:
1 jwt
f (t) = cos wt = e + e−jwt
2
s
F (s) = , ROC : Re s > 0.
s2 + w 2
2
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.
Brief Article
Example The Author
We shall use linearity to find the LT of this signal: December 17, 2007
f (t)
1
Thus f = f1 + f2 , where f1 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) + Fs (s). We compute that
1
F1 (s) = , Re s > 0
s2
e−s
F2 (s) = − 2 , Re s > 0.
s
Thus
1 − e−s
F (s) = , Re s > 0.
s2
2
There are tables of LTs. So in practice, if you have F (s), you can get f (t) using a table.
1
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 25
Example
3s + 17
Given F (s) = , let us find f (t). We don’t need the ROC to find f (t), but actually we know
s2 − 4
what it is. Because we’re using the one-sided LT the ROC must be a right half-plane, and because
F (s) must be analytic within its ROC, the ROC of F (s) must be Re s > 2. We have
c1 c2 23 11
F (s) = + , c1 = , c2 = −
s−2 s+2 4 4
and therefore
One use of the LT is in solving initial-value problems involving linear, constant-coefficient dif-
ferential equations. In control engineering we do this by simulation. But let us look briefly at the
LT method.
It is useful to note that if we have the LT pair
f (t) ↔ F (s)
To prove this formula, start with the LT of f˙(t) and integrate by parts:
Z∞ Z∞
f˙(t)dt = e−st f (t)0 + s
−st
∞
e 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).
Example
Consider the initial-value problem
ẏ − 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.5) to get
1
sY (s) − 1 − 2Y (s) = .
s2
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 26
s2 + 1 1 1 5
Y (s) = =− − 2 + .
s2 (s − 2) 4s 2s 4(s − 2)
Therefore
1 1 5
y(t) = − − t + e2t . (2.6)
4 2 4
Since we used the one-sided LT, which is oblivious to negative time, we can assert that (2.6) 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.6) for t ≥ 0.
Let us now modify the forcing term:
ẏ − 2y = 1+ (t), y(0) = 1.
ẏ − 2y = 1+ (t)
ẏ − 2y = 1, t > 0; y(0) = 1.
Then, as in the previous example, since we’re looking for the solution only for t > 0, we may
rephrase the question as
and look for the solution where y(t) is continuously differentiable at t = 0. It 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 .
2 2
2
Example
The equation
1 1 3 1 7 1
= + −
8s−1 4s+1 8s+3
1 3 7
y(t) = et + e−t − e−3t .
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. 2
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
Example
Consider the differential equation
ẏ + (sin t)y = u.
Brief Article
This does not have a transfer function—the system is not time invariant. 2
The Author
Example
An RC filter: December 17, 2007
R
+
i C +
u y
−
−
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 29
RCẏ + y = u.
Therefore the TF is
Y (s) 1
= .
U (s) RCs + 1
Example
A mass-spring-damper:
M ÿ = u − Ky − Dẏ.
We get
Y (s) 1
= .
U (s) M s2 + Ds + K
Let’s look at some other transfer functions: G(s) = 1 represents a pure gain; G(s) = 1/s is
the ideal integrator integrator; G(s) = 1/s2 is the double integrator; G(s) = s is the differentiator
differentiator; G(s) = e−τ s with τ > 0 is a time delay system—note that the TF is not rational;
ωn2
G(s) =
s2 + 2ζωn s + ωn2
We say a transfer function G(s) is proper if the degree of the denominator is at least that of
1
the numerator. The transfer functions G(s) = 1, are proper, G(s) = s is not. We say G(s)
s+1
is strictly proper if the degree of the denominator is greater than that of the numerator. Note
that if G(s) is proper then lim|s|→∞ G(s) exists; if strictly proper then lim|s|→∞ G(s) = 0. These
concepts extend to multi-input, multi-output systems, where the transfer function is a matrix.
Let’s see what the transfer function is of an LTI state model:
ẋ = Ax + Bu, y = Cx + Du
C(sI − A)−1 B + D.
Example
0 0 10 0 0
0 0 01 0 0
A= , B=
1 00 1 0
−1
1 −1 00 0 1
1 0 0 0 0 0
C= , D=
0 1 0 0 0 0
s2 + 1 1
s2 (s2 + 2) s2 (s2 + 2)
C(sI − A)−1 B + D =
1 s2 + 1
s (s + 2)
2 2 s2 (s2 + 2)
2
Summary
Let us recap our procedure for getting the transfer function of a system:
1. Apply the laws of physics etc. 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 are more than one equilibria, you have to select
one. If there isn’t even one, this method doesn’t apply.
4. If the linearized system is time invariant, take Laplace transforms with zero initial state.
In general G(s) is a matrix: If dim u = m and dim y = p (m inputs, p outputs), then G(s) is p × m.
In the SISO case, G(s) is a scalar-valued transfer function.
There is a converse problem: Given a transfer function, find a corresponding state model. That
is, given G(s), find A, B, C, D such that
The state matrices are never unique: Each G(s) has an infinite number of state models. But it is a
fact that every proper, rational G(s) has a state realization. Let’s see how to do this in the SISO
case, where G(s) is 1 × 1.
Example
First, a G(s) with a constant numerator:
1
G(s) = .
2s2 −s+3
The corresponding differential equation model is
2ÿ − ẏ + 3y = u.
ẋ1 = x2
1 3 1
ẋ2 = x2 − x1 + u
2 2 2
y = x1
and thus
0 1 0
A= , B=
−3/2 1/2 1/2
C= 1 0 , D = 0.
Example
Next, a nonconstant numerator:
s−2
G(s) = .
2s2 −s+3
Introduce an auxiliary signal V (s):
1
Y (s) = (s − 2)V (s), V (s) = U (s).
2s2 − s + 3
Then the TF from U to V has a constant numerator. We have
2v̈ − v̇ + 3v = u
y = v̇ − 2v.
Defining
x1 = v, x2 = v̇,
we get
ẋ1 = x2
1 3 1
ẋ2 = x2 − x1 + u
2 2 2
y = x2 − 2x1
and so
0 1 0
A= , B=
−3/2 1/2 1
C= 1 , D = 0.
−2
This extends to any strictly proper rational function. 2
Finally, if G(s) is proper but not strictly proper (deg num = deg denom), then we can write
G(s) = c + G1 (s),
c = constant, G1 (s) strictly proper. In this case we get A, B, C to realize G1 (s), and D = c.
Laurent Schwartz worked out a very nice, consistent way of dealing with the impulse, and more
general “functions.” The impulse is an example of a distribution.
The main idea is that δ(t) is not a function, but rather it is a way of defining the linear
transformation φ 7→ φ(0) that maps a signal φ(t) to its value at t = 0. This linear transformation
should properly be written as δ(φ) = φ(0) (i.e., δ transforms φ to φ(0)) but historically it has been
written as
Z ∞
φ(t)δ(t)dt = φ(0).
−∞
You know this as the “sifting formula.” Let us emphasize that the expression
Z ∞
φ(t)δ(t)dt (2.7)
−∞
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.7) 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.7) does apply for φ(t) = e−st , because it is smooth:
Z ∞
e−st δ(t)dt = 1.
−∞
If g(t) is a smooth function for all t, then expression (2.7) 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 δ ∗ δ = δ.
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 34
Example
Consider a lowpass RC filter:
1
G(s) = .
RCs + 1
The inverse LT of G(s) is
1 − t
e RC .
RC
Since the filter is causal, to get the impulse response we should take that time-function that is zero
for t < 0:
1 − t
g(t) = e RC 1+ (t).
RC
For the highpass filter,
RCs
G(s) =
RCs + 1
1 −t/RC
g(t) = δ(t) − e 1+ (t).
RC
2
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) 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.
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.
2.8 Interconnections
Frequently, a system is made up of components connected together in some topology. This raises
the question, if we have state models for components, how can we assemble them into a state model
for the overall system?
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 35
Example
u A1 B1 y1 A2 B2 y
C1 D1 C2 D2
ẋ1 = A1 x1 + B1 u
y1 = C1 x1 + D1 u
ẋ2 = A2 x2 + B2 y1
y = C2 x2 + D2 y1 .
Then
ẋ = Ax + Bu, y = Cx + Du,
where
0
A1 B1
A= , B=
B 2 C 1 A2 B2 D1
C= , D = D2 D1 .
D 2 C1 C2
2
Parallel connection
A1 B1 y1
C1 D1
u y
A2 B2
C2 D2 y2
Example
r e A1 B1 u A2 B2 y
C1 D1 C2 D2
−
ẋ1 = A1 x1 + B1 e = A1 x1 + B1 (r − C2 x2 )
ẋ2 = A2 x2 + B2 u = A2 x2 + B2 (C1 x1 + D1 (r − C2 x2 ))
y = C2 x2
Taking
x1
x=
x2
we get
ẋ = Ax + Br, y = Cx
where
A1 −B1 C2 B1
A= , B= , C= 0
C2 .
B 2 C1 A2 − B2 D1 C2 B2 D1
2
rigid; that is, rigidity is a concept, an approximation to reality. So if we wanted to make our model
“closer to reality,” we could allow some elasticity by adopting a partial differential equation model
and we may thereby have a better approximation. But no model is real. There could not be a
sequence Mk of models that are better and better approximations of reality and such that Mk
converges to reality. If Mk does indeed converge, the limit is a model, and no model is real.
For more along these lines, see the article “What’s bad about this habit,” N. D. Mermin, Physics
Today, May 2009, pages 8, 9.
Chapter 3
In the preceding chapter we saw nonlinear state models and how to linearize them about an equi-
librium point. The linearized systems have the form (dropping ∆)
ẋ = Ax + Bu, y = Cx + Du.
In this chapter we study such models. The main point is that x is a linear function of (x(0), u). So
is y.
3.1 Initial-State-Response
Let us begin with the state equation forced only by the initial state—the input is set to zero:
1. If n = 1, i.e., A is a scalar, the unique solution of the initial-value problem is x(t) = eAt x0 .
t2
et = 1 + t + + ···
2!
and this converges for every t. Thus
A2 t2
eAt = 1 + At + + ··· .
2!
This second fact suggests that in the matrix case we define the matrix exponential eA to be
1 2 1
eA := I + A + A + A3 + · · · .
2! 3!
It can be proved that the right-hand series converges for every matrix A. If A is n × n, so is eA ; eA
is not defined if A is not square.
38
CHAPTER 3. LINEAR SYSTEM THEORY 39
Example
0 0 1 0
A= , eA =
0 0 0 1
Notice that eA is not obtained by exponentiating A componentwise. 2
Example
1 0 e 0
A= , eA = = eI
0 1 0 e
2
Example
0 1 0
A= 0 0 1
0 0 0
This matrix has the property that A3 = 0. Thus the power series has only finitely many nonzero
terms:
1 1 12
1
e A = I + A + A2 = 0 1 1
2
0 0 1
This is an example of a nilpotent matrix. That is, Ak = 0 for some power k. 2
Replacing A by At (the product of A with the scalar t) gives the matrix-valued function eAt ,
t 7−→ eAt : R −→ Rn×n ,
defined by
t2
eAt = I + At + A2 + ··· .
2!
This function is called the transition matrix.
Some properties of eAt :
1. eAt =I
t=0
2. e e
At1 At2
= eA(t1 +t2 )
Note that eA1 eA2 = eA1 +A2 if and only if A1 and A2 commute, i.e., A1 A2 = A2 A1 .
3. (eA )−1 = e−A , so (eAt )−1 = e−At
4. A, eAt commute
d At
5. e = AeAt
dt
Now the main result:
Theorem 3.1.1 The unique solution of the initial-value problem ẋ = Ax, x(0) = x0 , is x(t) = eAt x0 .
This leaves us with the question of how to compute eAt . For hand calculations on small problems
(n = 2 or 3), it’s convenient to use Laplace transforms.
CHAPTER 3. LINEAR SYSTEM THEORY 40
Example
0 1 0 1 t t2
2
A = 0 0 1 , eAt = 0 1 t
0 0 0 0 0 1
The Laplace transform of eAt is therefore
1/s 1/s2 1/s3
0 1/s 1/s2 .
0 0 1/s
On the other hand,
−1
s −1 0
(sI − A)−1 = 0 s −1
0 0 s
s 1
2
s
1
= 3 0 s2 s .
s
0 0 s2
We conclude that in this example eAt , (sI − A)−1 are Laplace transform pairs. This is true in
general. 2
Example
0 1
A=
−1 0
−1
1 s 1
−1 s −1
(sI − A) = = 2
1 s s +1 −1 s
cos t sin t
=⇒ eAt =
− sin t cos t
2
Another way to compute eAt is via eigenvalues and eigenvectors. Instead of a general treatment,
let’s do two examples.
Example
0 1
A=
−2 −3
The MATLAB command [V, D] = eig (A) produces
1 −1 0
−1
V = , D= .
−1 2 0 −2
CHAPTER 3. LINEAR SYSTEM THEORY 41
The eigenvalues of A appear on the diagonal of the (always diagonal) matrix D, and the columns
of V are corresponding eigenvectors. So for example
1 1
A = −1 .
−1 −1
It follows that AV = V D (check this) and then that eAt V = V eDt (prove this). The nice thing is
that eDt is trivial to determine because D is diagonal. In this case
e 0
−t
e =
Dt
.
0 e−2t
Then
eAt = V eDt V −1 .
Example
0 1 0 1 1 1
j
A= , D= , V =√
−1 0 0 −j 2 j −j
ejt 0
e Dt
=
0 e −jt
cos t sin t
−1
e At
=Ve V Dt
=
− sin t cos t
2
The above method works when A has n linearly independent eigenvectors, so V is invertible.
Otherwise the theory is more complicated and requires the so-called Jordan form of A.
3.2 Input-Response
Now we set the initial state to zero and consider the response from the input:
ẋ = Ax + Bu, x(0) = 0.
Noting that
d −At
[e x(t)] = −Ae−At x(t) + e−At ẋ(t),
dt
we get
d −At
[e x(t)] = e−At Bu(t).
dt
CHAPTER 3. LINEAR SYSTEM THEORY 42
Integrate from 0 to t:
Zt
−e x(t) − x(0) =
At
e−Aτ Bu(τ )dτ.
|{z}
=0 0
Multiply by eAt :
Zt
x(t) = eA(t−τ ) Bu(τ )dτ. (3.1)
0
Equation (3.1) gives the state at time t in terms of u(τ ), 0 ≤ τ ≤ t, when the initial state equals
zero.
Similarly, the output equation y = Cx + Du leads to
Zt
y(t) = CeA(t−τ ) Bu(τ )dτ + Du(t).
0
Special case Suppose dim u = dim y = 1, i.e., the system is single-input, single-output (SISO).
Then D = D, a scalar, and we have
Zt
y(t) = CeA(t−τ ) Bu(τ )dτ + Du(t). (3.2)
0
1 , t≥0
1+ (t) =
0 , t < 0.
y(t) = (g ∗ u)(t).
Example
ÿ + ẏ = u
Take the state to be
x1 y
x= := .
x2 ẏ
CHAPTER 3. LINEAR SYSTEM THEORY 43
Then
0 1 0
A= , B=
0 −1 1
C = [ 1 0 ], D = 0.
Impulse response:
g(t) = CeAt B, t ≥ 0
= 1 − e−t , t ≥ 0.
2
ẋ = 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 +
At
eA(t−τ ) Bu(τ )dτ.
0
Zt
y(t) = CeAt x0 + CeA(t−τ ) Bu(τ )dτ + Du(t).
0
Summary
We began with an LTI system modeled by a differential equation in state form:
ẋ = Ax + Bu, x(0) = x0
y = Cx + Du.
CHAPTER 3. LINEAR SYSTEM THEORY 44
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, i.e., y(t) = g(t − τ )u(τ )dτ
0
where
y
K
M
D
M ÿ = −Ky − Dẏ
CHAPTER 3. LINEAR SYSTEM THEORY 45
or Brief Article
0 1
ẋ = Ax, A = K D . The Author
−M −M
The point x = 0 is an equilibrium point.December 18, 2007
Now suppose a wind gust of finite duration is applied:
d(t)
d
T t
The model is
M ÿ = d − Ky − Dẏ,
or
0
ẋ = Ax + Ed, E = 1 .
M
If x(0) = 0, then at time t = T
ZT
x(T ) = eA(T −τ ) Ed(τ )dτ 6= 0 in general.
0
For t > T , the model is ẋ = Ax. Thus the effect of a finite-duration disturbance is to alter the
initial state. In this way, the stability question concerns the qualitative behaviour of ẋ = Ax for an
arbitrary initial state; the initial time may be shifted to t = 0. 2
So that’s the stability question: For the system ẋ = Ax, will x(t) converge to 0 as t goes to
infinity, for every x(0)? As we saw before, the trajectory is specified by x(t) = eAt x(0). So stability
is equivalent to the condition that eAt → 0 as t → ∞. When that will happen depends only on the
eigenvalues of A.
Proposition 3.4.1 eAt → 0 as t → ∞ iff every eigenvalue of A has negative real part.
1
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. 2
1
Brief Articl
Brief Article
CHAPTER 3. LINEAR SYSTEM THEORY 46
The Author
The Author
Examples
December 18, 20
Here are some quick examples: ẋ = −x is stable; ẋ = 0 is December
unstable; ẋ = x18, 2007
is unstable.
Here are some examples by pictures:
orignasymp.stable
stable Decmber18,207
Brief Article
unstable Brief Article
TheAuthor
BriefArticle
stable unstable
Brief Article
origin asymp. stable origin stable
The Author
origin unstable
Theorem 3.5.1 Assume G(s) is strictly proper, rational. Then the following three statements are
equivalent: 1
1
CHAPTER 3. LINEAR SYSTEM THEORY 47
3. Every pole of the transfer function G(s) has negative real part.
Example
Consider the RC filter with
1 1 −t/RC
G(s) = , g(t) = e 1+ (t).
RCs + 1 RC
According to the theorem, every bounded u produces a bounded y. What’s the relationship between
kuk∞ and kyk∞ ? Let’s see:
t
Z
|y(t)| = g(t − τ )u(τ )dτ
0
Zt
≤ |g(t − τ )||u(τ )|dτ
0
Zt
≤ kuk∞ |g(t − τ )|dτ
0
Z∞
≤ kuk∞ |g(t)|dt
0
Z∞
1 −t/RC
= kuk∞ e dt
RC
0
= kuk∞ .
Example
The integrator has
1
G(s) = , g(t) = 1+ (t).
s
According to the theorem, the system is not BIBO stable. Thus there exists some bounded input
that produces an unbounded output. For example the unit step u(t) = 1+ (t) is bounded, but it
produces the output y(t) = t1+ (t), which is an unbounded ramp. Notice that it is not true that
every bounded input produces an unbounded output, only that some bounded input does. For
example, if the input is u(t) = (sin t)1+ (t), then the output is bounded. 2
CHAPTER 3. LINEAR SYSTEM THEORY 48
The theorem can be extended to the case where G(s) is only proper (and not strictly proper).
Then write
The theorem remains true with the second statement changed to say that g1 (t) is absolutely inte-
grable.
Finally, let’s connect stability of the state model and BIBO stability. Consider a single-input,
single-output system modeled by
ẋ = Ax + Bu, y = Cx + Du
or
From this last expression it is clear that the poles of G(s) are contained in the set of 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 factors. In this case, the two stability concepts are equivalent. (Don’t forget:
We’re discussing only LTI systems.)
Brief Article
The Author
Example
December 18, 2007
Consider the problem of magnetically levitating a steel ball:
+ u −
i
R
L
y
d
M
CHAPTER 3. LINEAR SYSTEM THEORY 49
The signal are these: u is the voltage applied to the electromagnet, i is the current, y is the
position down of the ball, and d is a possible disturbance force. The equations are
di d2 y i2
L + Ri = u, M 2 = M g + d − c 2
dt dt y
where c is a constant (force of magnet on ball is proportional to i2 /y 2 ). The nonlinear state equations
are
ẋ = f (x, u, d)
x2
y d c x23
+
x = ẏ , f =
g − .
M M x21
i R 1
− x3 + u
L L
Let’s linearize about y0 = 1, d0 = 0:
r r
Mg Mg
x20 = 0, x10 = 1, x30 = , u0 =R .
c c
The linearized system is
0 1 0 0 0
A = 2g 0 −2 , B = 0 , E = 1
0 0 −1 1 0
C= 1 0 0 .
Thus
∆D
∆U −2 1 ∆Y
s+1 s2 − 2g
Note that the systems from ∆U to ∆Y and ∆D to ∆Y are BIBO unstable, each having a pole
√
at s = 2g. To stabilize, we could contemplate closing the loop:
∆D
∆U −2 1 ∆Y
s+1 s − 2g
2
If we can design a controller (unknown box) so that the system from ∆D to ∆Y is BIBO stable
(all poles with Re s < 0 ), then we will have achieved a type of stability. We’ll study this further in
the next chapter. 2
Let us assume G(s) is rational, proper, and has all its poles in Re s < 0. Then the system is
BIBO stable.
The first fact we want to see is this: Complex exponentials are eigenfunctions.
Proof
Z∞
u(t) = e jωt
, y(t) = g(t − τ )u(τ )dτ
−∞
Z∞
⇒ y(t) = g(t − τ )ejωτ dτ
−∞
Z∞
= g(τ )ejωt e−jωτ dτ
−∞
= G(jω)ejωt
CHAPTER 3. LINEAR SYSTEM THEORY 51
Thus, if the input is the complex sinusoid ejωt , then the output is the sinusoid
G(jω)ejωt = |G(jω)|ej(ωt+∠G(jw))
which has frequency = ω = frequency of input, magnitude = |G(jω)| = magnitude of the transfer
function at s = jω, and phase = ∠G(jω) = phase of the transfer function at s = jω.
Notice that the convolution equation for this result is
Z∞
y(t) = g(t − τ )u(τ )dτ,
−∞
that is, the sinusoidal 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.
Here’s the important point: Under the stated assumptions about the system (G(s) is rational,
proper, and all poles in Re s < 0), the region of convergence of the Laplace integral 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 g(t). To emphasis this point, let us look at this example:
Example
Consider the differential equation model
ẏ = y + u.
Suppose we know from physical considerations that the system is causal. Let us look for sinusoidal
solutions: Set u(t) = ejωt and then set y(t) = Aejωt and substitute these into the equation:
Ajωejωt = Aejωt + ejωt .
Cancel ejωt and solve for A:
1
A= .
jω − 1
So is
1
y(t) = ejωt
jω − 1
the sinusoidal steady-state solution? Absolutely not! There is no sinusoidal steady state, because
the system is not stable! In mathematical terms, the impulse response function is
g(t) = et 1+ (t),
whose Laplace transform is
1
G(s) = , ROC : Re s > 1.
s−1
Thus evaluating G(s) on the imaginary axis is illegitimate. Furthermore, the function 1/(jω − 1) is
not the Fourier transform of g(t). 2
Next, we want to look at the special frequency response when ω = 0. For this we need the
final-value theorem.
CHAPTER 3. LINEAR SYSTEM THEORY 52
Example
s+2
Let y(t), Y (s) be Laplace transform pairs with Y (s) = .
s(s2 + s + 4)
This can be factored as
A Bs + C
Y (s) = + 2 .
s s +s+4
Note that A equals the residue of Y (s) at the pole s = 0:
1
A = Res (Y, 0) = lim s Y(s) = .
s→0 2
The inverse LT then has the form
2. If Y (s) has no poles in <s ≥ 0 except a simple pole at s = 0, then y(t) converges as t → ∞
and limt→∞ y(t) equals the residue of Y (s) at the pole s = 0.
1 2
Some examples: Y (s) = : final value equals 0; Y (s) = : final value equals 2;
s+1 s(s + 1)
1
Y (s) = : no final value. Remember that you have to know that y(t) has a final value, by
+1
s2
examining the poles of Y (s), before you calculate the residue of Y (s) at the pole s = 0 and claim
that that residue equals the final value.
Return now to the setup
Example
Using MATLAB, plot the step responses of
20 −20s + 20
G1 (s) = , G2 (s) = .
s2 + 0.9s + 50 + 0.9s + 50
s2
They have the same DC gains and the same poles, but notice the big difference in transient response.
2
Chapter 4
Control systems are most often based on the principle of feedback, whereby the signal to be con-
trolled is compared to a desired reference signal and the discrepancy used to compute corrective
control action. When you go from your home to the university you use this principle continuously
without being aware of it. To emphasize how effective feedback is, imagine you have to program
a mobile robot, with no vision capability and therefore no feedback, to go open loop from your
home to your ECE311 classroom; the program has to include all motion instructions to the motors
that drive the robot. The program would be unthinkably long, and in the end the robot would
undoubtedly be way off target:
robot's path
class
home
In this chapter and the next we 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. The stability criterion we will study is the Nyquist criterion, dating from 1932. The Nyquist
criterion is a graphical technique involving the open-loop frequency response function, magnitude
and phase.
There are two main approaches to control analysis and design. The first, the one we’re doing
in this course, is the older, so-called “classical” approach in the frequency domain. Specifications
are based on closed-loop gain, bandwidth, and stability margin. Design is done using Bode plots.1
1
One classical technique is called “root locus.” A root locus is a graph of the closed-loop poles as a function of a
single real parameter, for example a controller gain. In root locus you try to get the closed-loop poles into a desired
54
CHAPTER 4. FEEDBACK CONTROL THEORY 55
The second approach, which is the subject of ECE410 and ECE557, is in the time domain and
uses state-space models instead of transfer functions. Specifications may be based on closed-loop
eigenvalues, that is, closed-loop poles. This second approach is known as the “state-space approach”
or“modern control”, although it dates from the 1960s and 1970s.
These two approaches are complementary. Classical control is appropriate for a single-input,
single-output plant, especially if it is open-loop stable. The state-space approach is appropriate for
multi-input, multi-output plants; it is especially powerful in providing a methodical procedure to
stabilize an unstable plant. Stability margin is very transparent in classical control and less so in the
state-space approach. Of course, simulation must accompany any design approach. For example,
in classical control you typically design for a desired bandwidth and stability margin; you test your
design by simulation; you evaluate, and then perhaps modify the stability margin, redesign, and
test again.
Beyond these two approaches is 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 Gaussian (LQG) control.
For all these techniques of analysis and design there are computer tools, the most popular being
the Control System Toolbox of MATLAB.
x1 M2
x2
u
M1
region (with good damping, say) by manipulating controller poles and zeros. You could easily pick this up if you wish
using MATLAB’s rltool.
CHAPTER 4. FEEDBACK CONTROL THEORY 56
The figure defines x1 , x2 . Now define x3 = ẋ1 , x4 = ẋ2 . Take M1 = 1 kg, M2 = 2 kg, L = 1 m,
g = 9.8 m/s2 . Then the state model is
0 0 1 0 0
0 0 0 1 0
ẋ = Ax + Bu, A = , B =
.
0 −19.6 0 0 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 .
X XX X
-5.4 -3.13 3.13 5.4
Brief Article
The Author
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
January the plant quite difficult to
29, 2008
control. The block diagram of the plant by itself is
u y
P (s)
force on position of cart, m
cart, N Brief Article
The Author
Let us try to stabilize the plant by feeding back the cart position, y, comparing it to a reference
January 29, 2008
r, and setting the error r − y as the controller input:
r u 1 y
C(s) P (s)
−
CHAPTER 4. FEEDBACK CONTROL THEORY 57
Here C(s) is the transfer function of the controller to be designed. One controller that does in fact
stabilize is
10395s3 + 54126s2 − 13375s − 6687
C(s) = . Brief Article
s4 + 32s3 + 477s2 − 5870s − 22170
The controller itself, C(s), is unstable, as is P (s). But when the controller and plant are connected
The Author
in feedback, the system is stable. If the pendulum starts to fall, the controller causes the cart to
move, in the right direction, to make the pendulum tend to come vertical29,
January again.
2008You’re invited to
simulate the closed-loop system; for example, let r be the input
0.1
5 t
which corresponds to a command that the cart move right 0.1 m for 5 seconds, then return to its
original position. Below is a plot of the cart position x1 versus t:
1.5
1.0
0.5
0.0
ï0.5
ï1.0
ï1.5
0 2 4 6 8 10 12
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. 2
Our objective in this section is to give two definitions for what it means for the following feedback
system to be stable: 1
The Author
r e u y
C(s) P (s)
−
(x
(xcc)) (x
(xpp ))
ẋp = Ap xp + Bp u
u = Cc x c + D c e
ẋc = Ac xc + Bc e
e = −Cp xp .
CHAPTER 4. FEEDBACK CONTROL THEORY 59
Internal Stability is defined to mean that the state model ẋcl = Acl xcl is stable, that is, that all
the eigenvalues of Acl have Re λ < 0. Thus the concept means this: With no inputs applied (i.e.,
r = d = 0), the internal states xp (t), xc (t) will converge to zero for every initial state xp (0), xc (0).
Example
Take C(s) = 2, P (s) = 1/(s − 1). Then
Ap = 1, Bp = 1, Cp = 1; Dc = 2
and
Acl = Ap − Bp Dc Cp = −1.
1
Thus the unstable plant is internally stabilized by unity feedback with the pure-gain controller
s−1 Brief Article
2. 2
The Author
Example
February 1, 2008
Let’s see that 1/(s − 1) cannot be internally stabilized by cancelling the unstable pole:
(xc ) (xp )
r s−1 u 1 y
s+1 s−1
Brief Article
The Author
1
The transfer function from r to y equals . Hence the system from r to y is BIBO stable. But
s+1 February 1, 2008
with r = 0, the state model is
(xc ) (xp )
0 -1 1 1 1
-2 1 1 0
CHAPTER 4. FEEDBACK CONTROL THEORY 60
Thus
ẋp = xp − 2xc
ẋc = −xc
1 −2
ẋcl = Acl xcl , Acl = = unstable.
0 −1
Clearly xp (t) doesn’t converge to 0 if xp (0) 6= 0. 2
Input-Output Stability
Now we turn to the second way of thinking about stability of the feedback loop. First, write the
equations for the outputs of the summing junctions:
E = R − PU
U = D + CE.
1 P
E R
= .
−C 1 U D
1 P
−C 1
1 −P
−1
1 P 1 + PC 1 + PC R
E R
= = D .
−C 1
U D C 1
1 + PC 1 + PC
The output is given by
PC P
Y = PU = R+ D.
1 + PC 1 + PC
We just derived the following closed-loop transfer functions:
1 C PC
R to E : , R to U : , R to Y :
1 + PC 1 + PC 1 + PC
−P 1 P
D to E : , D to U : , D to Y : .
1 + PC 1 + PC 1 + PC
The above method of finding closed-loop transfer functions works in general.
Brief Article
CHAPTER 4. FEEDBACK CONTROL THEORY 61
The Author
Example
February 1, 2008
Here’s a somwhat complex block diagram:
P3
r x2 y
P1 P2
x1
− −
P4
P5
Let us find the transfer function from r to y. Label the outputs of the summing junctions, as shown.
Write the equations at the summing junctions:
X1 = R − P2 P5 X2
X2 = P1 X1 − P2 P4 X2
Y = P3 X1 + P2 X2 .
Assemble as
1 0
P2 P5 X1 R
−P1 1 + P2 P4 0 X2 = 0 .
−P3 −P2 1 Y 0
Solve for Y by Cramer’s rule:
1
P2 P5 R
det −P1 1 + P2 P4
0
−P3 −P2 0
Y = .
1 0
P2 P5
det −P1 1 + P2 P4
0
−P3 −P2 1
Simplify: 1
Y P1 P2 + P3 (1 + P2 P4 )
= .
R 1 + P2 P4 + P1 P2 P5
2
February 1, 2008
CHAPTER 4. FEEDBACK CONTROL THEORY 62
r e u y
C P
−
We say this feedback system 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.
This is equivalent to saying that the 6 transfer funtions from (r, d) to (e, u, y) are stable, in the
sense that all poles are in Re s < 0. It suffices to look at the 4 transfer functions from (r, d) to
(e, u), namely,
1 −P
1 + PC 1 + PC
.
C 1
1 + PC 1 + PC
(Proof: If r and e are bounded, so is y = r − e.)
Example
1 s−1
P (s) = , C(s) =
−1
s2 s+1
The 4 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
1
input-output stable. This is in spite of the fact that a bounded r produces a bounded y. Notice
that the problem here is that C cancels an unstable pole of P . As we’ll see, that isn’t allowed.
2
Example
1
P (s) = , C(s) = k
s−1
The feedback system is input-output stable iff k > 1 (check). 2
We now look at two ways to test feedback IO stability. The first is in terms of numerator and
denominator polynomials:
Np Nc
P = , C= .
Dp Dc
CHAPTER 4. FEEDBACK CONTROL THEORY 63
We assume (Np , Dp ) are coprime, i.e., have no common factors, and (Nc , Dc ) are coprime too.
The characteristic polynomial of the feedback system is defined to be Np Nc + Dp Dc .
Example
1 s−1
P (s) = , C(s) =
−1s2 s+1
Notice the unstable pole-zero cancellation. The characteristic polynomial is
Theorem 4.1.1 The feedback system is input-output stable iff the characteristic polynomial has no
roots in Re s ≥ 0.
Proof We have
−P
1
1
1+P C 1+P C
= Dp Dc −Np Dc
. (4.1)
Np Nc + Dp Dc
C 1 Nc Dp Dp Dc
1+P C 1+P C
Np Nc + Dp Dc , Dp Dc , Np Dc , Nc Dp
Theorem 4.1.2 The feedback system is input-output stable iff 1) the transfer function 1 + P C
has no zeros in Re s ≥ 0, and 2) the product P C has no pole-zero cancellations in Re s ≥ 0.
Example
1 s−1
P (s) = , C(s) =
s2 −1 s+1
Check that 1) holds but 2) does not. 2
CHAPTER 4. FEEDBACK CONTROL THEORY 64
r(t) e(t)
C(s) P (s)
−
Example
This time take
1 2s + 1
C(s) = , P (s) =
s s(s + 1)
Let’s generalize:
Theorem 4.2.1 Assume P (s) is strictly proper, C(s) is proper, and the feedback system is stable.
If P (s)C(s) contains an internal model of the unstable part of R(s), then perfect asymptotic tracking
occurs, i.e., e(t) → 0.
Example
r0 1
R(s) = , P (s) =
s2 +1 s+1
Design C(s) to achieve perfect asymptotic tracking of the sinusoid r(t), as follows. From the
theorem, we should try something of the form
1
C(s) = C1 (s),
s2 +1
Brief Article
that is, we embed an internal model in C(s), and allow an additional factor to achieve feedback
stability. You can check that C1 (s) = s works. Notice that we have effectively created a notch filter
from R to E, a notch filter with zeros at s = ±j. The Author 2
u + Lθ
M
θ
L
u Mg
CHAPTER 4. FEEDBACK CONTROL THEORY 66
The equation is
ü + Lθ̈ = M gθ.
Thus
s2 U + s2 Lθ = M gθ.
−s2
.
Ls2 − M g
Step tracking and internal stability are not simultaneously achievable. 2
s-plane
√
but not s or sin s. (The polynomial s+1 is regarded as rational because it can be written (s+1)/1.)
For every point s in the complex plane, G(s) is a point in the complex plane. We draw two copies of
the complex plane to avoid clutter, s in one called the s-plane, G(s) in the other called the G-plane.
As s goes once around D from any starting point, the point G(s) traces out a closed curve denoted
G, the image of D under G(s). Brief Article
Example The Author
For G(s) = s − 1 we could have February 2, 2008
s G(s)
D G
s−1
s-plane G-plane
Notice that G is just D shifted to the left one unit. Since D encircles one zero of G(s), G encircles
the origin once CW. Brief Article 2
s D G
s−1
Example
Now consider
G(s) =
1
.
Brief Article
s−1
The angle of G(s) equals the negative ofThe Author
the angle of s − 1:
February
∠G(s) = ∠1 − ∠(s − 1) = −∠(s − 1). 2, 2008
s
G
s−1
D
From this we get that if D encircles the pole CW, then G encircles the origin once counterclockwise
(CCW). 2
Based on these examples, we now see the relationship between the number of poles and zeros of
G(s) in D and the number of times G encircles the origin.
Theorem 4.3.1 (Principle of the Argument) Suppose G(s) has no poles or zeros on D, but
D encloses n poles and m zeros of G(s). Then G encircles the origin exactly n − m times CCW.
(s − zi )
Q
G(s) = K Qi
i (s − pi )
with K a real gain, {zi } the zeros, and {pi } the poles. Then for every s on D
If zi is enclosed by D, the net change in ∠(s − zi ) is −2π; otherwise the net change is 0. Hence the
net change in ∠G(s) equals m(−2π) − n(−2π), which equals (n − m)2π. 2
1
The Author
CHAPTER 4. FEEDBACK CONTROL THEORY February 2, 2008 69
radius → ∞
Then G is called the Nyquist plot of G(s). If G(s) has no poles or zeros on D, then the Nyquist
plot encircles the origin exactly n − m times CCW, where n equals the number of poles of G(s) in
Re s > 0 and m equals the number of zeros of G(s) in Re s > 0. From this follows
Theorem 4.3.2 Suppose G(s) has no poles on D. Then G(s) has no zeros in Re s ≥ 0 ⇔ G
doesn’t pass through the origin and encircles it exactly n times CCW, where n equals the number of
poles in Re s > 0.
Brief
Note that G(s) has no poles on D iff G(s) is proper and G(s) has Article
no poles on the imaginary axis;
and G(s) has no zeros on D iff G(s) is not strictly proper and G(s) has no zeros on the imaginary
axis. The Author
In our application, if G(s) actually does have poles on the imaginary axis, we have to indent
around them. You can indent either to the left or to the right; weFebruary 2, 2008
shall always indent to the right:
D
poles x
Note that we’re indenting around poles of G(s) on the imaginary axis. Zeros of G(s) are irrelevant
Brief Article
at this point.
The Author
4.4 Nyquist Stability Criterion (1932)
February 2, 2008
Now we apply the principle of the argument. The setup is
KC(s) P (s)
−
CHAPTER 4. FEEDBACK CONTROL THEORY 70
where K is a real gain and C(s) and P (s) are rational transfer functions. We’re after a graphical
test for stability involving the Nyquist plot of P (s)C(s). We could also have a transfer function
F (s) in the feedback path, but we’ll take F (s) = 1 for simplicity.
The assumptions are these:
1. P (s), C(s) are proper, with at least one of them strictly proper.
3. The gain K is nonzero. This is made only because we’re going to divide by K at some point.
Theorem 4.4.1 Let n denote the number of poles of P (s)C(s) in Re s > 0. 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 iff the Nyquist plot doesn’t pass through − K1 and encircles it exactly n
times CCW.
Proof The closed-loop transfer function from reference input to plant output equals
KP (s)C(s)
.
1 + KP (s)C(s)
KP (s)C(s)
.
G(s)
This should have no RHP poles. So G(s) should have no RHP zeros. So we need a test for G(s) to
have this property.
Note that G(s) and P (s)C(s) have the same poles in Re s ≥ 0, so G(s) has precisely n there.
Since D indents around poles of G(s) on the imaginary axis and since G(s) is proper, G(s) has
no poles on D. Thus by Theorem 4.1.2, the feedback system is stable ⇔ the Nyquist plot of G(s)
1 1
doesn’t pass through 0 and encircles it exactly n times CCW. Since P (s)C(s) = G(s) − ,
K K
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. 2
If there had been a nonunity transfer function F (s) in the feedback path, we would have taken
G = 1 + KP CF in the proof.
There is a subtle point that may have occurred to you concerning the Nyquist criterion and
it relates to the discussion about frequency response in Section 3.6. Consider the plant transfer
function P (s). If it has an unstable pole, then the ROC of the Laplace transform does not include
the imaginary axis. And yet the Nyquist plot involves the function P (jω). This may seem to be
a contradiction, but it is not. In mathematical terms we have employed analytic continuation to
extend the function P (s) to be defined outside the region of convergence of the Laplace intergral.
CHAPTER 4. FEEDBACK CONTROL THEORY 71
4.5 Examples
In this section you’ll learn how to draw Nyquist plots and how to apply the Nyquist criterion.
Example
B
D
A 1
B, C A
Nyquist plot of P C
C
As s goes from A to B, P C(s) traces out the curve in the lower half-plane. You can see this by
noting that the imaginary part of P C(jω) remains negative, while the real part changes sign once,
from positive to negative. This segment of the Nyquist plot starts at the point 1, since P C(0) = 1.
As s approaches B, that is, as ω goes to +∞, P C(jω) becomes approximately
1 1
= − 2,
(jω)2 ω
which is a negative real number going to 0. This is also consistent with the fact that P C is strictly
proper.
CHAPTER 4. FEEDBACK CONTROL THEORY 72
Next, the semicircle from B to C has infinite radius and hence is mapped by P C to the origin.
Finally, the line segment from C to A in the left-hand graph is the complex conjugate of the
already-drawn segment from A to B. So the same is true in the right-hand graph. (Why? Because
P C has real coefficients, and therefore P C(s) = P C(s).)
In conclusion, we’ve arrived at the closed path in the right-hand graph—the Nyquist plot. In
this example, the curve has no self-intersections.
Now we’re ready to apply the Nyquist criterion and determine for what range of K the feedback
system is stable. The transfer function P C has no poles inside D and therefore n = 0. So the
feedback system is stable iff the Nyquist plot encircles −1/K exactly 0 times CCW. This means,
does not encircle it. 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 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. 2
Example
Next, we look at
s+1
P C(s) =
s(s − 1)
for which Brief Article
2 1 − ω2
Re P C(jω) = − , Im P C(jω)
The =
Author .
ω2 + 1 ω(ω 2 + 1)
The plots are these: February 2, 2008
A
B
D
B, C
Ax -2
D
-1
C D
Since there’s a pole at s = 0 we have to indent around it. As stated before, we will always indent
to the right.
Let’s look at A, the point jε, ε small and positive. We have
2 1 − ε2
Re P C(jε) = − ≈ −2, Im P C(jε) = ≈ +∞.
ε2 +1 ε(ε2 + 1)
CHAPTER 4. FEEDBACK CONTROL THEORY 73
Example
+1 G
D
Cx
B D D
E A
A 1
G
x
F -1
F B
E
To apply the criterion, we have n = 0. Feedback stability holds iff −1/K > 1; equivalently,
−1 < K < 0. 2
CHAPTER 4. FEEDBACK CONTROL THEORY 74
1. gain: K
2. pole or zero at s = 0 : sn
40s2 (s − 2)
G(s) =
(s − 5)(s2 + 4s + 100)
40 × 2 s2 12 s − 1
= .
5 × 100 15 s − 1 100 (s2 + 4s + 100)
1
polar plot
arg(G(jω))
semilog scale
deg arg(G)
Brief
0
Article ω
0.1 1 10
The Author
|G| K
K <0
1 ω
polar plot 0◦ ω
arg(G)
−180◦
1
CHAPTER 4. FEEDBACK CONTROL THEORY Brief Article 76
The
2. G(s) = sn , n ≥ 1 The polar plot is a radial lineAuthor
from the origin along one of the axes,
depending on the value of n. The magnitude Bode plot is a straight line of slope equal to n; the
phase is constant at 90n degrees. February 2, 2008
10 n
|G| 0.1
1 ω
1 10
n = 1, 5, ... 0.1
n = 2, 6, ... n = 4, 8, ...
arg(G)
n = 3, 7, ... n=3
270
180 n=2
polar plot 90 n=1
1
Brief Article
CHAPTER 4. FEEDBACK CONTROL THEORY
The Author 77
LHP zero
G(jω) = 1 + jτ ω |G| max √
error = |1 + j| = 2 = 3dB
exact
+1
approx
1
1
= corner freq.
τ
1
polar plot
approx
90◦
exact
arg(G)
0◦
0.1 10
τ τ
1 decade
1
Brief Article
CHAPTER 4. FEEDBACK CONTROL THEORY 78
The Author
G(s) = τ s − 1, τ > 0
February 2, 2008
RHP zero
G(jω) = −1 + jτ ω
|G|
same as for τ s + 1
!1
polar plot
180
arg(G)
90
0
0.1 1 10
τ τ τ
1
CHAPTER 4. FEEDBACK CONTROL THEORY 79
4. G(s) = 1
s2 + 2ζωn s + ωn2 , ωn > 0, 0 < ζ < 1
ωn2
1 2
G(jω) = (ωn − ω 2 ) + j2ζωn ω
ωn2
polar plot
j2ζ
at
ω = ωn
approx
2
√
|G| > 1 / 2
ζ
ex a ct
1 ωn
1
exact ζ < √
2
arg(G) approx
180
90
0.1ωn ωn 10ωn
2
CHAPTER 4. FEEDBACK CONTROL THEORY 80
Brief Article
1 2 The Author
G(s) = (s + ωn2 ), ωn > 0 (i.e., ζ = 0)
ωn2 February 2, 2008
polar plot
approx
|G|
exact
ωn
1
arg(G)
180
0
ωn
1
CHAPTER 4. FEEDBACK CONTROL THEORY 81
Brief Article
1 2 The Author
G(s) = (s − 2ζωn s + ωn2 ), ωn > 0, 0 < ζ < 1
ωn2
February 2, 2008
polar plot
1
|G| 1 2
same as for G(s) = (s + 2ζωn s + ωn2 )
ωn2
1
0.1ωn ωn 10ωn
0
-90
-180
1
CHAPTER 4. FEEDBACK CONTROL THEORY 82
Example
A minimum phase TF:
1 1
G1 (s) = = 0.1
s + 10 0.1s + 1
1 10 100
1
|G1 |
0.1
-1
0.01
1 10 100
0
arg(G1 )
-90
2
CHAPTER 4. FEEDBACK CONTROL THEORY 83
Example
An allpass TF:
1−s
G2 (s) =
1+s
polar plot
|G2 |
0.1 1 10
0
arg(G2 )
-180
2
CHAPTER 4. FEEDBACK CONTROL THEORY 84
Example
A nonminimum phase TF:
G3 = G1 G2
Brief Article
1 1−s
G3 (s) =
s + 10 1 + s The Author
|G3 (jω)| = |G1 (jω)|
arg(G3 ) = arg(G1 ) + arg(G2 ) ≤ arg(G1 ) February 2, 2008
0.1 1 10 100
phase lag at ω = 10
arg(G1 )
!90
arg(G2 )
!180
arg(G3 )
!270
Of all TFs having the magnitude plot |G1 |, G1 has the minimum phase lag at every ω. 2
1
CHAPTER 4. FEEDBACK CONTROL THEORY 85
Using the principles developed so far, you should be able to sketch the approximation of the
Bode plot of
40s2 (s − 2)
G(s) =
(s − 5)(s2 + 4s + 100)
s2 ( 12 s − 1)
= 0.16 1 .
( 5 s − 1)[ 100
1
(s2 + 4s + 100)]
Postscript
This and the previous few sections 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. In addition, there will come
times when MATLAB will fail you. For example, poles on the imaginary axis. MATLAB isn’t
smart enough to indent the D-contour around a pole in drawing the Nyquist plot.
critical pt
!1 2
this angle is
called the
phase margin
There are no encirclements of the critical point, so the feedback system is stable. The phase margin
is related to the distance from the critical point −1 to the point where the Nyquist plot crosses the
unit circle. The Bode plot of P C is
The Author
CHAPTER 4. FEEDBACK CONTROL THEORY 86
February 2, 2008
10
0.1
0.1 1 10
0
arg(P C)
phase
-180 margin
1
CHAPTER 4. FEEDBACK CONTROL THEORY 87
Brief Article
Example
The Author
1
C(s) = 2, P (s) =
(s + 1) (0.1s + 1)
2
February 2, 2008
1
− 12.1
Nyquist : (half shown)
crit.pt. 2
-1
1
4.6. STABILITY AND BODE PLOTS 87
Bode Diagrams
!20
!40
Phase (deg); Magnitude (dB)
!60
!80
!100
!50
!100
!150
!200
!250
!300
!1 0 1 2
10 10 10 10
Frequency (rad/sec)
-2 Brief Article
The Author
The critical point is -1 and we need 1 CCW encirclement, so the feedback system2,is 2008
February stable. The
phase margin on the Nyquist plot:
-1
36.9◦
1 1
If C(s) = 2K, K can be reduced until − = −2, i.e., min K = = 6 dB. The Bode plot is shown
K 2
on the next page. MATLAB says the gain margin is negative! So MATLAB is wrong. Conclusion:
We need the Nyquist plot for the correct interpretation of the stability margins.
2
1
CHAPTER 4. FEEDBACK CONTROL THEORY 90
Bode Diagrams
40
30
20
10
Phase (deg); Magnitude (dB)
!10
!20
!100
!150
!200
!250
!300
!2 !1 0 1
10 10 10 10
Frequency (rad/sec)
S(s)
e
r C(s) P (s)
−
An example might be
|S(jω)| 1.7832
stability margin
1
= = 0.56
1.7832
This section concludes with a general remark. Phase margin is widely used to predict “ringing”,
meaning, oscillatory response. But it must be used with caution. It does not measure how close
the feedback loop is to being unstable. More precisely, if the phase margin is small (say 5 or 10
degrees), then you are close to instability and there may be ringing, but if the phase margin is large
(say 60 degrees), then you can’t conclude anything—the Nyquist 1 plot could still be dangerously
close to the critical point.
Chapter 5
In this chapter we develop the basic technique of controller design in the frequency domain. Spec-
ifications are in the form of bandwidth and stability margin. Of course our real interest is how
the system will behave in physical time, and in using the frequency domain we are employing the
duality between the two domains. The design steps are typically these:
4. Evaluate.
5.1 Loopshaping
We start with the unity feedback loop:
r e y
C P
−
The design problem is this: Given P , the nominal plant transfer function, maybe some uncertainty
bounds, and some performance specs, 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 := ,
1 + PC
which is called the sensitivity function.
92
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 93
Aside: Here’s the reason for this name. Denote by T the transfer function from r to y, namely,
PC
T = .
1 + PC
Of relevance is the relative perturbation in T due to a relative perturbation in P :
∆T /T ∆T P
lim = lim
∆P →0 ∆P/P ∆P →0 ∆P T
dT P
= ·
dP T
1 + PC
d PC
= ·P ·
dP 1 + PC PC
= 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 r to the tracking error
e. Thus we want |S(jω)| to be small over the range of frequencies of r. 2) The peak magnitude of
S is the reciprocal of the stability margin. Thus a typical desired magnitude plot of S is
M
|S(jω)| ω1
1
Here ω1 is the maximum frequency of 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 or 3. 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
10
P (s) =
0.2s + 1
This is a typical transfer function of a DC motor. Let’s take a P I controller:
K2
C(s) = K1 + .
s
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 94
5s(0.2s + 1)
S(s) = .
(s + K3 )2
Clearly, if we find a suitable K3 , then we can back-solve for K1 , K2 . Sketch the Bode plot S and
confirm that any M > 1, ε < 1, and ω1 can be achieved. 2
1
ε |P C| = |L|
1 ω1 ω
|P |
In shaping |L|, we don’t have a direct handle on the stability margin, unfortunately. However, we
do have control over the gain and phase margins, as we’ll see.
In the next two sections we present two simple loopshaping controllers.
C1 (s)
r e αT s + 1 y
K P (s)
Ts + 1
−
C(s)
Brief Article
The Author
The parameters in C are α (0 < α < 1), T > 0, K > 0. The approximate Bode plot of C1 is
February 2, 2008
1 1
T αT
1 ω
|C1 |
α
benefit = gain reduction
without phase lag
10
αT
0 ω
arg(C1 )
-90
Example
1
The plant transfer function is P (s) = . Let there be two specs:
s(s + 2)
2. A phase margin of approximately 45◦ for adequate damping in the transient response.
1
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 96
(s + 2)(T s + 1) 1
=
s(s + 2)(T s + 1) + K(αT s + 1) s
2
e(∞) =
K
So spec 1 is satisfied iff 2
K = 0.05, that is, K = 40. Then
40
KP (s) = .
s(s + 2)
Step 2 For the transfer function KP (s) we have the gain crossover frequencyωgc = 6 and the phase
margin PM = 18◦ . To increase the PM (while preserving spec 1), we’ll use a lag compensator C1 (s).
The design is shown on the Bode plots. We want PM ≈ 45◦ .
We proceed as follows. We try for a PM of 50◦ , a bit more than 45 to compensate for the
straight line approximation made in the preceding Bode plot. Now ∠KP = −180 + 50 = −130
when ω = 1.7. So we set the new ωgc to be 1.7. We read from the Bode plot that |KP | = 19 dB
= 8.96 at the new ωgc . We therefore set α = 1/8.96 = 0.111, and then set αT 10
= 1.7. This gives
T = 52.7. Then we read from the Bode plot again that the exact PM is 180-135.4 = 44.6◦ . The
controller is therefore
αT s + 1
C(s) = K , K = 40, α = 0.111, T = 52.7.
Ts + 1
5.2. LAG COMPENSATION 103
Bode plots
150
100
dB 50 |KP|
0 |PC|
!50
!80
!100 arg(KP)
deg !120
!140
arg(PC)
!160
!180
!4 !3 !2 !1 0 1
10 10 10 10 10 10
rad/s
Step response
1.8
1.6
1.4
PC/(1+PC)
1.2
y(t) 1
0.8 KP/(1+KP)
0.6
0.4
0.2
0
0 5 10 15
t
C1 (s)
r e αT s + 1 y
K P (s)
Ts + 1
−
C(s) Brief Article
The Author
The parameters in C are α (α > 1), T > 0, K February 2, 2008 Bode plot of C1 is
> 0. The approximate
α
|C1 |
1
1 ωmax 1
αT T
0 1
The angle ϕmax is defined as the maximum of arg(C1 (jω)), and ωmax is defined as the frequency at
which it occurs.
We’ll need three formulas:
1
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 100
Thus
1 1 1
log ωmax = log + log
2 αT T
1 1
= log
2 αT 2
1
= log √
T α
1
⇒ ωmax = √ .
T α
2. The magnitude of C1 at ωmax : This is the midpoint between 1 and α on the logarithmically
scaled |C1 | axis. Thus
1
log |C1 (jωmax )| = (log 1 + log α)
2 √
= log α
√
⇒ |C1 (jωmax )| = α.
θ √
α
ϕmax
√1
α
1
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 101
But sin θ = √1 .
1+α
Thus
√ 1 1 α−1
sin ϕmax = α− √ √ = ,
α+1
q
α 1+α 1+ 1
α
and hence
α−1
ϕmax = sin−1 .
α+1
Example
Let’s do the same example as we did for lag compensation. Again, we choose K = 40 to achieve
spec 1. The phase margin is then only 18◦ at a gain crossover frequency of 6 rad/s. We design a
lead compensator C1 to bump up the phase margin as follows. The problem is a little complicated
because we can only guess what the new gain crossover frequency will be.
Step 1 We need at least 45 − 18 = 27◦ phase lead. Increase by 10% (a guess). Say 30◦ . We have
α−1
sin 30◦ = ⇒ α = 3.
α+1
Step 2 We want to make ωmax the new gain crossover frequency. Thus at this frequency we will
√ 1
be increasing the gain by α = 1.732 = 4.77 dB. Now |KP | = = −4.77 dB at ω = 8.4 rad/s.
1.732
Thus we set
1
ωmax = 8.4 ⇒ √ = 8.4 ⇒ T = 0.0687.
T α
Bode plots
80
60
40
20
dB
0 |PC|
!20
|KP|
!40
!60
!80
!100
!120
deg
arg(PC)
!140
arg(KP)
!160
!180
!2 !1 0 1 2
10 10 10 10 10
rad/s
Step responses
1.8
1.6
KP/(1+KP)
1.4
1.2
y(t) 1
0.8 PC/(1+PC)
0.6
0.4
0.2
0
0 1 2 3 4 5 6
You can compare the results of lag compensation versus lead compensation. They both increased
the phase margin to the desired value, but the lead compensator produces a faster response.
S L
+ +
Vs vo
C Rl
As mentioned there, a more realistic load model includes a current source, reflecting the fact that
the load draws current.
Consider an analog controller, for which the block diagram is
+ +
Vs vo il
C Rl
−
controller
Vref
The controller’s job is to regulate the voltage vo , ideally making vo = Vref , by adjusting the duty
cycle; the load current il is a disturbance.
ẋ = Ax + B1 il + B2 v1 (5.1)
vo = Cx, (5.2)
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 105
where
1 1
1 0
− Rl C
C −
A= 1 , C = 1 0 .
, B1 = C , B2 =
1
0
− 0 L
L
Thus the transfer function from il to vo is
1
Cs
C(sI − A)−1 B1 = −
s2 + 1
Rl C s + 1
LC
and from v1 to vo is
1
−1
C(sI − A) B2 = LC
.
s2 + 1
Rl C s + 1
LC
Let us emphasize that the system with inputs (v1 , il ) and output vo is linear time-invariant. But
v1 itself depends on the duty cycle. We now allow the duty cycle to vary from period to period.
The controller is made of two parts: a linear time-invariant (LTI) circuit and a nonlinear pulse-
width modulator (PWM):
LTI controller vo
v1 d −
PWM
Vref
Pulse-width modulator
The PWM works like this: The continuous-time signal d(t), which is the output of the LTI controller,
is compared to a sawtooth waveform of period T , producing v1 (t) as shown here:
v1 (t)
d(t)
sawtooth
It is assumed that d(t) stays within the range [0, 1], and the slope of the sawtooth is 1/T .
We have in this way arrived at the block diagram of the control system:
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 106
il
A B1 B2 vo
C 0 0
v1 LTI controller
d −
PWM
Vref
The plant block and notation refer to the state-space equations (5.1), (5.2). Every block here is
linear time-invariant except for the PWM.
îl A B1 B2 Vs
C 0 0
v̂o
LTI controller −
dˆ 0
The transfer function from dˆ to v̂o is second order with the following Bode plot:
20
15
10
5
dB 0
ï5
ï10
ï15
ï20
4 5
10 10
ï0
ï20
ï40
ï60
deg ï80
ï100
ï120
ï140
ï160
ï180
4 5
10 10
Hz
Bode plot of transfer function from dˆ to v̂o
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 108
The frequency range shown is from 10 kHz to 100 kHz and there’s a resonant peak at about 35 kHz.
The gain crossover frequency is 50 kHz, at which the phase is −169◦ . Therefore, if the loop were
closed with the controller transfer function of 1, the phase margin would be only 11◦ .
Typical closed-loop specifications involve the recovery to a step demand in load current. For a
step disturbance in îl , the output voltage v̂o will droop. The droop should be limited in amplitude
and duration, while the duty cycle remains within the range from 0 to 1. The nominal value of load
voltage is Vs D = 3.6 V. Therefore the nominal load current is Vs D/Rl = 1.09 A. For our tests, we
used a step of magnitude 20% of this nominal value. Next shown is the test response of v̂o (t) for
the unity controller:
0.06
0.04
0.02
V 0.00
ï0.02
ï0.04
ï0.06
ï0.08
0e+00 1eï05 2eï05 3eï05 4eï05 5eï05 6eï05
seconds
Response of v̂o to step in îl ; unity controller
The response is very oscillatory, with a long settling time. The problem with this plant is it
is very lightly damped. The damping ratio is only 0.07. The sensible and simple solution is to
increase the damping by using a derivative controller. The controller K(s) = 7 × 10−6 s increases
the damping to 0.8 without changing the natural frequency. Such a controller causes difficulty in
computer-aided design because it doesn’t have a state-space model. The obvious fix is to include a
fast pole:
7 × 10−6 s
K= .
10−10 s + 1
The resulting test response in output voltage is this:
0.005
0.000
10 switching cycles
ï0.005
ï0.010
V ï0.015
ï0.020
ï0.025
ï0.030
ï0.035
ï0.040
0e+00 1eï05 2eï05 3eï05 4eï05 5eï05 6eï05
seconds
Response of v̂o to step in îl ; designed controller
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 109
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
0e+00 1eï05 2eï05 3eï05 4eï05 5eï05 6eï05
Finally, we emphasize that the design must be tested by a full-scale Simulink model.
ω0 = any frequency
ω
u = normalized frequency = ln , i.e., eu = ω
ω0
ω0
M (u) = normalized log magnitude = ln |L(jω0 eu )|.
|u|
W (u) = weighting function = ln coth .
2
Recall that
cosh x ex + e−x
coth x = = x .
sinh x e − e−x
The phase formula is
Z∞
1 dM (u)
arg(L(jω0 )) = W (u)du in radians. (5.3)
Π du
−∞
π2
It turns out we may approximate the weighting function as W (u) ≈ δ(u). Then the phase
2
formula (5.1) gives
π dM (u)
arg(L(jω0 )) ≈ (5.4)
2 du u=0
ω1
1 ω
|S(jω)|
ε
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 111
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. Here’s the result:
Theorem 5.5.1 Suppose P (s) has a zero at s = z with Re z > 0. Let A(s) denote the allpass
factor of S(s). Then there are positive constants c1 , c2 , depending only on ω1 and z, such that
Example
1−s
P (s) = , p > 0, p 6= 1
(s + 1)(s − p)
Let C(s) be a stabilizing controller. Then
1
S= ⇒ S(p) = 0.
1 + PC
s−p
Thus is an allpass factor of S. There may be other allpass factors, so what we can say is that
s+p
A(s) has the form
s−p
A(s) = A1 (s),
s+p
where A1 (s) is some allpass TF (may be 1). In this example, the RHP zero of P (s) is s = 1. Thus
1 − p
|A(1)| = |A1 (1)|.
1 + p
and hence
1 + p
−1
|A(1) | ≥ .
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. 2
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 112
The distances from the closest pole to the imaginary axis are equal, 2. Which set of poles is better?
Obviously the second, right? The first set suggests severe oscillations in the closed-loop response.
But suppose the closed-loop impulse response function is actually
Then the “severe” oscillations will never be observed and the first set is better in terms of speed of
response, which is five times that of the second.
Epilogue
If this is your one and only control course, it is hoped that you take away the following:
If you’re continuing with another control course, it is hoped you take away additionally these:
• How to find equilibria and linearize the model at an equilibrium (if there is one).
• The beautiful Nyquist stability criterion and the meaning of stability margin.
The subject of control science and engineering is vast and from this course you can take off in
many directions.
113