ECE311S Dynamic Systems & Control: Course Notes by Bruce Francis January 2010

Download as pdf or txt
Download as pdf or txt
You are on page 1of 116

ECE311S Dynamic Systems & Control

Course notes by Bruce Francis


January 2010
Contents

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

2 Mathematical Models of Systems 7


2.1 Block Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 State Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.5 The Laplace Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.6 Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.7 The Impulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
2.8 Interconnections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.9 Nothing is as Abstract as Reality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3 Linear System Theory 38


3.1 Initial-State-Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.2 Input-Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3 Total Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.4 Stability of State Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.5 BIBO Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.6 Frequency Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4 Feedback Control Theory 54


4.1 Closing the Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.2 The Internal Model Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.3 Principle of the Argument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.4 Nyquist Stability Criterion (1932) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.6 Bode Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.7 Stability Margins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

1
CONTENTS 2

5 Introduction to Control Design 92


5.1 Loopshaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.2 Lag Compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
5.3 Lead Compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.4 Buck Converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.5 Loopshaping Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
5.5.1 Bode’s phase formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
5.5.2 The waterbed effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
5.6 Remark on Pole Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Chapter 1

Introduction

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. This course is about the modeling of physical systems and
the analysis and design of control systems.

1.1 Familiar Examples


We begin with some examples that everyone knows. A familiar example of a control system is
the one we all have that regulates our internal body temperature at 37◦ C. As we move from a
warm room to the cold outdoors, our body temperature is maintained. Nature has many other
interesting examples of control systems: Large numbers of fish move in schools, their formations
controlled by local interactions; the population of a species, which varies over time, is a result
of many dynamic interactions with predators and food supplies. And human organizations are
controlled by regulations and regulatory agencies.
Other familiar examples of control systems:

• autofocus mechanism in cameras

• cruise control system in cars

• thermostat temperature control systems.

1.2 DC to DC Voltage Converters


In this section we go into a little detail for a specific, interesting example of a control system in
wide use. You may already have studied this in ECE315 Switched-mode Power Supplies.
Every laptop has a voltage regulator, and so do many other consumer electronic appliances.
The electronic components—hard drive, motherboard, video card, etc.—need electric power, and
the voltage has to be regulated. Typically, an electronic component may need 2 V, while the battery
is rated at 12 V, but is not constant. This raises the problem of stepping down a source voltage Vs ,
such as a battery, to a regulated value at a load.

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

The simplest voltage converter

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.

Switched mode power supply


As a second attempt at a solution, let us try a switching circuit:

S
+ +
Vs Rl vo

Voltage regulation via switching

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 :

. . . , [0, T ), [T, 2T ), [2T, 3T ), . . . .

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

Switched regulator with a filter

This circuit is equivalent to this one


CHAPTER 1. INTRODUCTION 4

+ +
v1 vo
Rl

Square-wave input voltage

where the input is

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

Buck step-down converter

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

1.3 Linear Functions


In this course we deal only with linear systems. Or rather, whenever we get a nonlinear system, we
linearize it as soon as possible. So before we proceed we had all better be very certain about what a
linear function is. Let us recall even what a function is. If X and Y are two sets, a function from
X to Y is a rule that assigns to every element of X an unambiguous element of Y —there cannot
be two possible different values for some x in X. The terms function, mapping, and transformation
are synonymous. The notation

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

f (a1 x1 + a2 x2 ) = a1 f (x1 ) + a2 f (x2 )

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

d(a1 v1 + a2 v2 ) dv1 dv2


C = a1 C + a2 C .
dt dt dt
On the other hand, if we try to view v as a function of i, then we have a problem, because we need
in addition an initial condition v(0) (or some other initial time) to uniquely define v, not just i. Let
us set v(0) = 0. Then v is a linear function of i. You can see this from the integral form of the
capacitor equation:

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

Mathematical Models of Systems

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.

2.1 Block Diagrams


The importance of block diagrams in control engineering can’t be overemphasized. One could easily
argue that you don’t understand your system until you have a block diagram of it.
We shall take the point of view that a block diagram is a picture of a function. We can
draw a picture of the function y = f (x) like this:

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

This means that y is a function of u and v, y = F (u, v).

1
Brief Article
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 9
The Author

December 7, 2007
Example

can of soup free to


d roll on board

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.

2.2 State Models


In control engineering, the system to be controlled is termed the plant. For example, in helicopter
flight control, the plant is the helicopter itself plus its sensors and actuators. The control system is
implemented in an onboard computer. 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.

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

is the state of P . (We’ll define state later.)


As a special case, suppose the air resistance is a linear function of 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

Defining C = 1 0 , we get the state model


 

ẋ = Ax + Bu, y = Cx. (2.2)

This model is of a linear, time-invariant (LTI) system. 2

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

We shall use both.


Generalizing the example, we can say that an important class of models is

ẋ = f (x, u), f : Rn × Rm → Rn Brief Article


y = h(x, u), h : Rn × Rm → Rp .
The Author
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 =December 7, 42007
2, p = 2, n = is

y1 y2

u1 u2
M1 M2
K
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 12

u = (u1 , u2 ), y = (y1 , y2 ), x = (y1 , ẏ1 , y2 , ẏ2 ).


The LTI special case is
ẋ = Ax + Bu, A ∈ Rn×n , B ∈ Rn×m
y = Cx + Du, C ∈ Rp×n , D ∈ Rp×m .
Brief Article
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 < The
t1 , knowing
Authorx(t0 ) and knowing {u(t) :
t0 ≤ t ≤ t1 }, we can compute x(t1 ), and hence y(t1 ).
December 7, 2007
Example

M no force; 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
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

The dynamic equation is

M ÿ = u + M g − K(y − y0 ) − D0 ẏ.

It’s appropriate to take

x = (x1 , x2 ), x1 = y, x2 = ẏ

and then we get the equations

ẋ1 = x2
1 K K D0
ẋ2 = u+g− x1 + y0 − x2
M M M M
y = x1 .

This has the form

ẋ = 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

Example The Author

This example concerns active suspension


Decemberof 7,
a 2007
vehicle for passenger comfort.

vehicle motion

M1 M1 = mass of chassis & passengers


M2 = mass of wheel carriage
u
K1 D0
u

M2 x1

K2 x2

r
road
surface
Brief Article
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 14
The Author

To derive the equations of motion, December


bring in free body diagrams:
7, 2007

M1 M1 ẍ1 = u − K1 (x1 − x2 − x10 ) − M1 g − D0 (ẋ1 − ẋ2 )

K1 (x1 − x2 − x10 )
D0 (ẋ1 − ẋ2 )
M1 g u

u
K1 (x1 − x2 − x10 )
D0 (ẋ1 − ẋ2 )

M2 ẍ2 = K1 (x1 − x2 − x10 ) + D0 (ẋ1 − ẋ2 )


M2
−u − M2 g − K2 (x2 − r − x20 )

M2 g K2 (x2 − r − x20 )

Define x3 = ẋ1 , x4 = ẋ2 . Then the equations can be assembled as


ẋ = Ax + B1 u + B2 r + c1 (2.3)
where
0
   
x1
 x2  0
x=  , c1 = 
 
K

M1 x10 − g
 x3   1 
x4 − M2 x20 − g + M2 x20
K1 K2

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

Example The Author

A favourite toy control problem is to get a cart to automatically balance a pendulum.


December 7, 2007

x1 M2

θ
L

u
M1

The natural state is

x = (x1 , x2 , x3 , x4 ) = (x1 , θ, ẋ1 , θ̇).

Again, we bring in free body diagrams:

1
The Author
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS December 7, 2007 16

x1 + L sin θ

L − L cos θ

F1
M2 g

Newton’s law for the ball in the horizontal direction is


d2
M2 (x1 + L sin θ) = F1 sin θ
dt2
and in the vertical direction is
d2
M2 (L − L cos θ) = M2 g − F1 cos θ
dt2
and for the cart is

M1 ẍ1 = u − F1 sin θ.

These are three equations in the four signals x1 , θ, u, F1 . Use

d2 d2
sin θ = θ̈ cos θ − θ̇ 2
sin θ, cos θ = −θ̈ sin θ − θ̇2 cos θ
dt2 dt2
to get

M2 ẍ1 + M2 Lθ̈ cos θ − M2 Lθ̇2 sin θ = F1 sin θ 1


M2 Lθ̈ sin θ + M2 Lθ̇2 cos θ = M2 g − F1 cos θ
M1 ẍ1 = u − F1 sin θ.
We can eliminate F1 : Add the first and the third to get

(M1 + M2 )ẍ1 + M2 Lθ̈ cos θ − M2 Lθ̇2 sin θ = u;

multiply the first by cos θ, the second by sin θ, add, and cancel M2 to get

ẍ1 cos θ + Lθ̈ − g sin θ = 0.

Solve the latter two equations for ẍ1 and θ̈:

M1 + M2 M2 L cos θ u + M2 Lθ̇2 sin θ


    
ẍ1
= .
cos θ L θ̈ g sin θ
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 17

Thus

u + M2 Lθ̇2 sin θ − M2 g sin θ cos θ


ẍ1 =
M1 + M2 sin2 θ

−u cos θ − M2 Lθ̇2 sin θ cos θ + (M1 + M2 )g sin θ


θ̈ = .
L(M1 + M2 sin2 θ)
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


   
x1 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◦ . 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

Aẋ = d − (flow rate out).


CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 18

Also

(flow rate out) = (const) × ∆p × (area of valve opening)


p

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.

The state equation is therefore


1 c√
ẋ = f (x, u, d) = d− xu.
A A
2

It is worth noting that not all systems have state models of the form

ẋ = f (x, u), y = h(x, u).

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

CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMSDecember 17, 2007 19

x1
+ −

+
u x2

Then KVL gives


−u + Rx2 + x1 + Lẋ2 = 0
and the capacitor equation is
x2 = C ẋ1 .
Thus
0 1
0
   
ẋ = Ax + Bu, A= C , B= 1 .
− L1 −RL L
2

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

Taylor series extends to functions f : Rn → Rm .

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

Thus the linearization of y = f (x) at x0 is ∆y = A∆x, where

−1 1 0
 
∂f
A= (x0 ) =
∂x −4 0 2
∆y = y − y0 = f (x) − f (x0 )
∆x = x − x0 .

By direct extension, if f : Rn × Rm → Rn , then


∂f ∂f
f (x, u) ≈ f (x0 , u0 ) + (x0 , u0 )∆x + (x0 , u0 )∆u.
∂x ∂u
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 21

Now we turn to linearizing the differential equation


ẋ = f (x, u).
First, assume there is an equilibrium point, that is, a constant solution x(t) ≡ x0 , u(t) ≡ u0 . This
is equivalent to saying that 0 = f (x0 , u0 ). Now consider a nearby solution:
x(t) = x0 + ∆x(t), u(t) = u0 + ∆u(t), ∆x(t), ∆u(t) small.
We have
ẋ(t) = f [x(t), u(t)]
= f (x0 , u0 ) + A∆x(t) + B∆u(t) + higher order terms
where
∂f ∂f
A := (x0 , u0 ), B := (x0 , u0 ).
∂x ∂u
Since ẋ = ∆ẋ and f (x0 , u0 ) = 0, we have the linearized equation to be
˙ = A∆x + B∆u.
∆x
Similarly, the output equation y = h(x, u) linearizes to
∆y = C∆x + D∆u,
where
∂h ∂h
C= (x0 , u0 ), D = (x0 , u0 ).
∂x ∂u

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

x0 = (x10 , x20 , x30 , x40 ), u0

satisfies f (x0 , u0 ) = 0, i.e.,

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

−M2 g sin x20 cos2 x20 + (M1 + M2 )g sin x20 = 0

(sin x20 )(M1 + M2 sin2 x20 ) = 0


sin x20 = 0
x20 = 0 or π.
Thus the equilibrium points are described by

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.

2.5 The Laplace Transform


You have already met Laplace transforms in your circuit theory course. So we only have to give a
brief review here.
In signal processing, the two-sided Laplace transform (LT) is used, but in control only the one-
sided LT is used. Let f (t) be a real-valued function defined for all t ≥ 0; it could of course be
defined for all −∞ < t < ∞. Its Laplace transform is the integral
Z∞
F (s) = f (t)e−st dt.
0
Here s is a complex variable. Normally, the integral converges for some values of s and not for
others. That is, there is a region of convergence (ROC). It turns out that the ROC is always an
open right half-plane, of the form {s : Re s > a}. Then F (s) is a complex-valued function of s.

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

f (t) = c1 e2t + c2 e−2t .

We do not know if f (t) equals zero for t < 0. 2

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)

and f is continuously differentiable at t = 0, then

f˙(t) ↔ sF (s) − f (0). (2.5)

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).

This proves (2.5).

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

Solving for Y (s) we get

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.

This is not well defined, because the differential equation

ẏ − 2y = 1+ (t)

is ambiguous at t = 0. The correct way to state the problem is

ẏ − 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

ẏ − 2y = 1, t > −ε; y(0) = 1

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

If f (t) is twice continuously differentiable at t = 0, then

f¨(t) ←→ s2 F (s) − sf (0) − f˙(0).


CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 27

Example
The equation

ÿ + 4ẏ + 3y = et , y(0) = 0, ẏ(0) = 2

can be solved as follows. We assume y(t) is twice continuously differentiable at t = 0. Then


1
s2 Y (s) − 2 + 4sY (s) + 3Y (s) = .
s−1
So
2s − 1
Y (s) =
(s − 1)(s + 1)(s + 3)

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

We also frequently use the star notation h = f ∗ g or h(t) = f (t) ∗ g(t).

Theorem 2.5.1 The LT of f ∗ g is F (s)G(s).

Proof Let h := f ∗ g. Then the LT of h is


Z∞
H(s) = h(t)e−st dt.
0

Substituting for h we have


Z∞ Zt
H(s) = f (t − τ )g(τ )e−st dτ dt.
0 0
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 28

Now change the order of integration:


Z∞ Z∞
H(s) = f (t − τ )e−st dtg(τ )dτ.
0 τ

In the inner integral change variables, r = t − τ :


Z∞ Z∞
H(s) = f (r)e−sr dre−sτ g(τ )dτ.
0 0

Thus
Z∞
H(s) = F (s)e−sτ g(τ )dτ.
0

Pull F (s) out and you get H(s) = F (s)G(s). 2

2.6 Transfer Functions


Linear time-invariant (LTI) systems, and only LTI systems, have transfer functions. The transfer
function (TF) of an LTI system is defined to be the ratio Y (s)/U (s) where the LTs are taken with
zero initial conditions.

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

The circuit equations are


dy
−u + Ri + y = 0, i = C .
dt
Therefore

RCẏ + y = u.

Apply Laplace transforms with zero initial conditions:

RCY (s) + Y (s) = U (s).

Therefore the TF is
Y (s) 1
= .
U (s) RCs + 1

Or, by the voltage-divider rule using impedances:


1
Y (s) 1
= Cs
1 = RCs + 1 .
U (s) R + Cs

This transfer function is rational, a ratio of polynomials. 2

Example
A mass-spring-damper:

M ÿ = u − Ky − Dẏ.

We get

Y (s) 1
= .
U (s) M s2 + Ds + K

This transfer function also is rational. 2

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

is the standard second order TF, where ωn > 0 and ζ ≥ 0; and


K2
G(s) = K1 + + K3 s
s
is the TF of the proportional-integral-derivative (PID) controller.
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 30

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

sX(s) = AX(s) + BU (s), Y (s) = CX(s) + DU (s)


⇒ X(s) = (sI − A)−1 BU (s)
Y (s) = [C(sI − A)−1 B + D]U (s).
We conclude that the transfer function from u to x is (sI − A)−1 B and from u to y is

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.

3. Linearize about the equilibrium point.

4. If the linearized system is time invariant, take Laplace transforms with zero initial state.

5. Solve for the output Y (s) in terms of the input U (s).


CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 31

The transfer function from input to output satisfies

Y (s) = G(s)U (s).

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

G(s) = C(sI − A)−1 B + D.

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.

Taking x1 = y, x2 = ẏ, we get

ẋ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.
 

This technique extends to


1
G(s) = .
poly of degree n
2
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 32

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.

2.7 The Impulse


Now we take a little time to discuss the problematical object, the impulse δ(t). The impulse, also
called the Dirac delta function, is not really a legitimate function, because its “value” at t = 0 is
not a real number. And you can’t rigorously get δ as the limit of a sequence of ever-narrowing
rectangles, because that sequence does not converge in any ordinary sense. Yet the impulse is a
useful concept in system theory and so we have to make it legitimate. The French mathematician
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 33

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.
−∞

Thus the LT of δ equals 1.


Initial-value problems involving δ, such as
ẏ + 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 modeled 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.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

f˙(t) ←→ sF (s) − f (0− )

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

This diagram stands for the equations

ẋ1 = A1 x1 + B1 u
y1 = C1 x1 + D1 u
ẋ2 = A2 x2 + B2 y1
y = C2 x2 + D2 y1 .

Let us take the overall state to be


 
x1
x= .
x2

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

is very similar and is left for you.


CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 36

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

2.9 Nothing is as Abstract as Reality


The title of this section is a quote from the artist Giorgio Morandi.
Models of physical systems are approximations of reality. For example, suppose we want to
model a swinging pendulum. The model involves the length L of the pendulum. Suppose we
measure L. It is a common viewpoint that there is an error between our measurement and the real
length. But let us think further. Let us imagine what the real length of the pendulum is: We start
at one end and proceed in a straight line toward the other end; as we approach the other end, we
have to find the “last” molecule of the pendulum, the one farthest from where we started; suppose
we do find the last molecule; it is composed of atoms, so we have to find the last atom; but atoms
are composed of smaller particles, such as electrons; so we have to find the last electron; but the
electrons are whizzing around the nucleus, so the last one isn’t standing still.1 So, what is the real
length of the pendulum at this subatomic scale? The question may not make sense because the
concept of length may not be real; real things may not possess the attribute we call length.
Returning to our model of a swinging pendulum and going past the issue of what L is, our model
assumes perfect rigidity of the pendulum. From what we know about reality, nothing is perfectly
1
All this assumes physics is correct which is another philosophical question.
CHAPTER 2. MATHEMATICAL MODELS OF SYSTEMS 37

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

Linear System Theory

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:

ẋ = Ax, x(0) = x0 , A ∈ Rn×n .

Recall two facts:

1. If n = 1, i.e., A is a scalar, the unique solution of the initial-value problem is x(t) = eAt x0 .

2. The Taylor series of the function et at t = 0 is

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

If A is n × n, eAt is an n × n matrix function of t and (sI − A)−1 is an n × n matrix of rational


functions of s.

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.

Here’s a derivation of the solution: Multiply by e−At :

e−At ẋ = e−At Ax + e−At Bu.

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

If u = δ, the unit impulse, then

y(t) = CeAt B1+ (t) + Dδ(t),

where 1+ (t) denotes the unit step,

1 , t≥0

1+ (t) =
0 , t < 0.

We conclude that the impulse response of the system is

g(t) := CeAt B1+ (t) + Dδ(t) (3.3)

and equation (3.2) is a convolution equation:

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.

The transition matrix:


1 1
 
 s s(s + 1) 
(sI − A)−1 = 
 1 
0
s+1
1 1 − e−t
 
eAt = , t ≥ 0.
0 e−t

Impulse response:

g(t) = CeAt B, t ≥ 0
= 1 − e−t , t ≥ 0.
2

3.3 Total Response


Consider the state equation forced by both an initial state and an input:

ẋ = 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

Similarly, the output y = Cx + Du is given by

Zt
y(t) = CeAt 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 modeled by a differential equation in state form:

ẋ = Ax + Bu, x(0) = x0
y = Cx + Du.
CHAPTER 3. LINEAR SYSTEM THEORY 44

We solved the equations to get


Zt
x(t) = e x0 +
At
eA(t−τ ) Bu(τ )dτ
0
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, i.e., y(t) = g(t − τ )u(τ )dτ
0

where

g(t) = CeAt B1+ (t) + Dδ(t)


1+ (t) = unit step.

3.4 Stability of State Models


Stability theory of dynamical systems is an old subject, dating back several hundred years. The goal
in stability theory is to draw conclusions about the qualitative behaviour of trajectories without
having to solve analytically or simulate exhaustively for all possible initial conditions. There are
two different notions of stability. The one we study in this section concerns state models.
Brief Article
To get an idea of the stability question, imagine a helicopter hovering under autopilot control.
Suppose the helicopter is subject to a wind gust. Will it return to its original hovering state? If so,
we say the hovering state is a stable state. The Author
Let’s look at a much simpler example.
December 18, 2007
Example

y
K

M
D

The model with no external forces:

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

origin asymp.The Author origin stable


stable The Author

December 18, 2007 December 18, 2007

stable unstable
Brief Article
origin asymp. stable origin stable
The Author

December 18, 2007


unstable

origin unstable

3.5 BIBO Stability


There’s another stability concept, that concerns the response of a system to inputs instead of initial
conditions. We’ll study this concept for a restricted class of systems.
Consider an LTI system with a single input, a single output, and a strictly proper rational
transfer function. The model is therefore y = g ∗ u in the time domain, or Y (s) = G(s)U (s) in
the s-domain. We ask the question: Does a bounded input (BI) always produce a bounded output
(BO)? Note that u(t) bounded means that |u(t)| ≤ B for some B and all t. The least upper bound
B is actually a norm, denoted kuk∞ .
Some examples: For the unit stepu(t) = 1+ (t), of course kuk∞ = 1. Likewise for a simusoid:
u(t) = sin(t), kuk∞ = 1. Note that the peak value is attained. For the rising exponential u(t) =
(1 − e−t )1+ (t), kuk∞ = 1. Notice that the peak value is never attained in finite time. The signal
u(t) = t1+ (t) is not bounded.
We define the system to be BIBO stable if every bounded u produces a bounded y.

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

1. The system is BIBO stable.


Z∞
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
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∞ .

Thus kyk∞ ≤ kuk∞ for every bounded u. 2

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

G(s) = c + G1 (s), G1 (s) strictly proper.

Then the impulse response has the form

g(t) = cδ(t) + g1 (t).

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

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


G(s) = C(sI − A)−1 B + D
1
= C adj (sI − A)B + D.
det(sI − A)

From this last expression it is clear that the poles of G(s) are contained in the set of eigenvalues of
A. Thus

stability of the state model ⇒ BIBO stability.

Usually, the poles of G(s) are identical to the eigenvalues of A, that is, the two polynomials

det(sI − A), C adj (sI − A)B + D det(sI − A)

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

∆ẋ = A∆x + B∆u + E∆d


∆y = C∆x
0 1 0
 
0 0
   
r
g 1 
A =  2g 0 −2 M c , B =  0 , E = 
 
    
1 M

R
 
0 0 − L 0
 L
C= 1 0 0 .


To simplify notation, let’s suppose R = L = M = 1, c = g. Then

0 1 0 0 0
     

A =  2g 0 −2  , B =  0  , E =  1 
0 0 −1 1 0
C= 1 0 0 .
 

Thus

∆Y (s) = C(sI − A)−1 B∆U (s) + C(sI − A)−1 E∆D(s)


−2 1
= ∆U (s) + 2 ∆D(s).
(s + 1)(s2 − 2g) s − 2g

The block diagram is


CHAPTER 3. LINEAR SYSTEM THEORY 50

∆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

3.6 Frequency Response


Consider a single-input, single-output LTI system. It will then be modeled 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 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

Y (t) = A1+ (t) + y1 (t),

where y1 (t) → 0 as t → ∞. Thus

lim y(t) = A = Res (Y, 0).


t→∞

The general result is the final-value theorem:

Theorem 3.6.1 Suppose Y (s) is rational.

1. If Y (s) has no poles in <s ≥ 0, then y(t) converges to 0 as t → ∞.

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.

3. If Y (s) has a repeated pole at s = 0, then y(t) doesn’t converge as t → ∞.

4. If Y (s) has a pole at <s ≥ 0, s 6= 0, then y(t) doesn’t converge as t → ∞.

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

Y (s) = G(s)U (s), G(s) proper, no poles in Re s ≥ 0.


1 1
Let the input be the unit step, u(t) = 1+ (t), i.e., U (s) =
. Then Y (s) = G(s) . The final-value
s s
theorem applies to this Y (s), and we get lim y(t) = G(0). For this reason, G(0) is called the DC
t→∞
gain of the system.
CHAPTER 3. LINEAR SYSTEM THEORY 53

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

Feedback Control Theory

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.

4.1 Closing the Loop


As usual, we start with an example.
Brief Article

Example The Author

Here again is the linearized cart-pendulum: January 29, 2008

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 .
 

The transfer function from u to y is


s2 − 9.8
Brief Article
P (s) = .
s (s2 − 29.4)
2
The Author

The poles and zeros of P (s) are January 29, 2008

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

January 29, 2008


CHAPTER 4. FEEDBACK CONTROL THEORY 58

r e u y
C(s) P (s)

The notation is this:

systems P (s), plant transfer function


C(s), controller transfer function

signals r(t), reference (or command) input


e(t), tracking error
d(t), disturbance
u(t), plant input
y(t), plant output.
Brief Article
The two definitions look quite distinct, but it turns out that they are exactly equivalent under mild
conditions. We shall assume throughout that P (s), C(s) are rational, C(s) is proper, and P (s)
is strictly proper. The Author
Internal Stability January 29, 2008
For this concept, set r = d = 0 and bring in state models for P and C:

(x
(xcc)) (x
(xpp ))

e AAcc Bcc u App B


A Bpp y

− CCcc Dcc 1 CCpp O0

The closed-loop equations are

ẋ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

Defining the closed-loop state xcl = (xp , xx ), we get simply


 
Ap − Bp Dc Cp Bp Cc
ẋcl = Acl xcl , Acl = .
−Bc Cp Ac

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.

Assemble into a vector equation:

1 P
    
E R
= .
−C 1 U D

In view of our standing assumptions (P strictly proper, C proper), the determinant of

1 P
 

−C 1

is not identically zero (why?). Thus we can solve for E, U :

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

Now back to the basic feedback loop:


The Author

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

s − 1 + (s2 − 1)(s + 1) = (s − 1)(s2 + 2s + 2).

This has a right half-plane root. 2

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

(⇐ Sufficiency) If Np Nc + Dp Dc has no roots in Re s ≥ 0, then the four transfer functions on the


left-hand side of (4.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 (4.1) are 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 (4.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

do not have a common root. This part is left for you. 2

The second way to test feedback IO stability is as follows.

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.

(Proof left to you.)

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

The Routh-Hurwitz Criterion


In practice, one checks feedback stability using MATLAB to calculate the eigenvalues of Acl or
the roots of the characteristic polynomial. However, it is sometimes useful, and also of historical
interest, to have an easy test for simple cases.
Consider a general characteristic polynomial
p(s) = sn + an−1 sn−1 + ... + a1 s + a0 , ai real.
Let’s say p(s) is stable if all its roots have Re s < 0. The Routh-Hurwitz criterion is an algebraic
test for p(s) to be stable, without having to calculate the roots. Instead of studying the complete
criterion, here are the results for n = 1, 2, 3:
1. p(s) = s + a0 : p(s) is stable (obviously) iff a0 > 0
2. p(s) = s2 + a1 s + a0 : p(s) is stable iff (∀i) ai > 0
3. p(s) = s3 + a2 s2 + a1 s + a0 : p(s) is stable ⇐⇒ (∀i) ai > 0 and a1 a2 > a0 .

4.2 The Internal Model Principle


Brief Article
Cruise control in a car regulates the speed to a prescribed setpoint. What is the principle underlying
The Author
its operation? The answer lies in the final value theorem (FVT).
February 1, 2008
Example

r(t) e(t)
C(s) P (s)

Take the controller and plant


1 1
C(s) = , P (s) = .
s s+1
Let r be a constant, r(t) = r0 . Then we have
1
E(s) = R(s)
1 + P (s)C(s)
s(s + 1) r0
= 2
s +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 perfect
asymptotic tracking of a step input! 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) exactly to cancel the unstable pole
of R(s). (This isn’t illegal pole-zero cancellation.) 2
CHAPTER 4. FEEDBACK CONTROL THEORY 65

Example
This time take
1 2s + 1
C(s) = , P (s) =
s s(s + 1)

and take r to be a ramp, r(t) = r0 t. Then R(s) = r0 /s2 and so


s+1
E(s) = r0 .
s3 + s2 + 2s + 1
Again e(t) → 0; perfect tracking of a ramp. Here C(s) and P (s) together provide the internal
model, a double integrator. 2

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

Example February 1, 2008


An inverted pendulum balanced on your hand.

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θ.

So the transfer function from u to θ equals

−s2
.
Ls2 − M g
Step tracking and internal stability are not simultaneously achievable. 2

4.3 Principle of the Argument


Brief Article
The Nyquist criterion is a test for a feedback loop to be stable. The criterion is based on the
principle of the argument from complex function theory.2
The principle of the argument involves two things: a curve in the complex plane and a transfer
The Author
function.
Consider a closed path (or curve or contour) in the s-plane, with no2,self-intersections
February 2008 and with
negative, i.e., clockwise (CW) orientation. We name the path D:

s-plane

Now let G(s) be a rational function, a ratio of polynomials such as


s+1 1
, s + 1,
s+2 s
2
Harry Nyquist was born in 1889 in Sweden. He attended the University of North Dakota and received the B.S.
and M.S. degrees in electrical engineering. He attended Yale University and was awarded the Ph.D. degree in 1917.
From 1917 to 1934 Nyquist was employed by the American Telephone and Telegraph Company in the Department
of Development and Research Transmission, where he was concerned with studies on telegraph picture and voice
transmission. From 1934 to 1954 he was with the Bell Telephone Laboratories, where he continued in the work
of communications engineering, especially in transmission engineering and systems engineering. At the time of his
retirement from Bell Labs in 1954, Nyquist was Assistant Director of Systems Studies.
During his 37 years of service with the Bell System, he received 138 U. S. patents and published twelve technical
articles. His many important contributions to the radio art include the first quantitative explanation of thermal noise,
signal transmission studies which laid the foundation for modern information theory and data transmission, and the
invention of the vestigial sideband transmission system now widely-used in television broadcasting.
CHAPTER 4. FEEDBACK CONTROL THEORY 67


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

Example The Author


Let’s keep G(s) = s − 1 but change D:
February 2, 2008

s D G

s−1

Now D encircles no zero of G(s) and G has no encirclements of the origin. 2


1
CHAPTER 4. FEEDBACK CONTROL THEORY 68

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.

Proof Write G(s) in this way

(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

∠G(s) = ∠K + Σ ∠(s − zi ) − Σ ∠(s − pi ).

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

The special D we use for the Nyquist contour is

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.

2. The product P (s)C(s) has no pole-zero cancellations in Re s ≥ 0. We have to assume


this because the Nyquist criterion doesn’t test for it, and such cancellations would make the
feedback system not stable.

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)

Define G(s) = 1 + KP (s)C(s). Because we have assumed no unstable pole-zero cancellations,


feedback stability is equivalent to the condition that G(s) has no zeros in Re s ≥ 0. So we’re going
to apply the principle of the argument to get a test for G(s) to have no RHP zeros.
Please note the logic so far: The closed-loop transfer function is

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

The first example is this:


1
P C(s) = .
(s + 1)2
Below is shown the curve D and the Nyquist diagram. The curve D is divided into segments whose
ends are the points A, B, C. We map D one segment at a time. The points in the right-hand plot are
also labelled A, B, C, so don’t be confused: the left-hand A is mapped by P C into the right-hand
A.
The first segment is from A to B, that is, the positive imaginary axis. On this segment, s = jω
and you can derive from
1
P C(jω) =
(jω + 1)2 Brief Article
that
The Author
1 − ω2 −2ω
Re P C(jω) = , Im P C(jω) = .
(1 − ω ) + (2ω) February 2, 2008
2 2 2 (1 − ω )2 + (2ω)2
2

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

This point is shown on the right-hand graph.


The mapping of the curve segment ABCD follows routinely.
Finally, the segment DA. On this semicircle, s = εejθ and θ goes from π/2 to +π/2; that is,
the direction is CCW. We have
1
PC ≈ − = −εe−jθ = εej(π−θ) .
εejθ
Since θ is increasing from D to A, the angle of P C, namely π − θ decreases, and in fact undergoes
a net change of −π. Thus on the right-hand graph, the curve from D to A is a semicircle of infinite
radius and the direction is CW. There’s another, quite nifty, way to see this. Imagine a particle
making one round trip on the D contour in the left-hand graph. As the particle goes from C to D,
at D it makes a right turn. Exactly the same thing happens in the right-hand graph: Moving from
C to D, the particle makes a right turn at D. Again, on the left-hand plot, the segment DA is a
half-revolution turn about a pole of multiplicity one, and consequently, the right-hand segment DA
is a half-revolution too, though opposite direction.
Now to apply the Nyquist criterion, n = 1. Therefore we need exactly 1 CCW encirclement of
the point −1/K. Thus feedback stability holds iff −1 < −1/K < 0; equivalently, K > 1. 2

Example

The third example is


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

for which Brief Article


1 −ω
Re P C(jω) = , Im P C(jω) = The Author
.
1−ω 4 1 − ω4
February 2, 2008
You should be able to draw the graphs based on the preceding two examples. They are

+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

4.6 Bode Plots


Control design is typically done in the frequency domain using Bode plots. For this reason it’s
useful to translate the Nyquist criterion into a condition on Bode plots.
First, let’s review the drawing of Bode plots. (You’re likely to be unfamiliar with these when
the plant has right half-plane poles or zeros.) We consider only rational G(s) with real coefficients.
Then G(s) has a numerator and denominator, each of which can be factored into terms of the
following forms:

1. gain: K

2. pole or zero at s = 0 : sn

3. real nonzero pole or zero : τ s ± 1


1 2
4. complex conjugate pole or zero : (s ± 2ζωn s + ωn2 ), ωn > 0, 0 ≤ ζ < 1
ωn2
For example

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

As an intermediate step, we introduce the polar plot: ImG(jω) vs Re G(jω) as ω : 0 → ∞. We


now look at polar and Bode plots for each of the four terms. We draw the magnitude Bode plots
in absolute units instead of dB.
CHAPTER 4. FEEDBACK CONTROL THEORY 75
Brief Article
1. G(s) = K. Below, from left to right, we see, first, in a box the stipulation that the plots are
The Author
for positive gain; next, the polar plot, which is a stationary point; then the magnitude Bode plot
above the phase Bode plot. February 2, 2008

|G(jω)| loglog scale


K
1 ω
0.1 1 10
K >0
K

polar plot
arg(G(jω))
semilog scale
deg arg(G)
Brief
0
Article ω
0.1 1 10

The Author

If K is negative, the plots are these: February 2, 2008

|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

3. G(s) = τ s + 1, τ > 0 February 2, 2008

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

polar plot is a semicircle:

0.1 |G(jω) − 0.05| = 0.05

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.

4.7 Stability Margins


If a feedback system is stable, how stable is it? In other words, how far is it from being unstable?
This depends entirely on our plant model, how we got it, and what uncertainty there is about the
model. In the frequency domain context, uncertainty is naturally measured in terms of magnitude
and phase as functions of frequency. In this section we look at this issue. The Nyquist plot is the
most revealing, but we also will use the Bode plot.
Let’s first see how to deduce feedback stability from Bode plots.

Example Brief Article


Consider the usual feedback loop with
1
The Author
C(s) = 2, P (s) = .
(s + 1)2
February 2, 2008
The Nyquist plot of P C is

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

2 this is called the gain


|P C| crossover frequency ωgc
1
1

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

The feedback loop is stable for C(s) = 2K if


1 1
− <− .
K 12.1
Thus K can be increased from K = 1 up to K = 12.1 = 21.67 dB before instability occurs. This
number, 21.67 dB, is called the gain margin. The gain margin is related to the distance from the
critical point −1 to the point where the Nyquist plot crosses the negative real axis. See how this
appears on the Bode plot on the next page.

1
4.6. STABILITY AND BODE PLOTS 87

CHAPTER 4. FEEDBACK CONTROL THEORY 88

Bode Diagrams

Gm=21.656 dB (at 4.5826 rad/sec), Pm=84.6 deg. (at 0.99507 rad/sec)


20

!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)

Figure 4.1: Example 4.6.5


CHAPTER 4. FEEDBACK CONTROL THEORY 89
Brief Article
Example
s+1 The Author
C(s) = 2, P (s) =
s(s − 1)
The Nyquist plot of P C has the form February 2, 2008

-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

Gm=!6.0206 dB (at 1 rad/sec), Pm=36.87 deg. (at 2 rad/sec)


50

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)

Figure 4.2: Example 4.6.6


91
CHAPTER 4. FEEDBACK CONTROL THEORY
Brief Article
Let’s recap: The phase margin is related to the distance from
The the critical point to the Nyquist
Author
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
February 2, 2008the stability margin to
be the distance from the critical point to the closest point on the Nyquist plot:

S(s)
e
r C(s) P (s)

Define S to be the TF from the reference input r to the tracking error e:


1
S= .
1 + PC
Assume feedback system is stable. Then the distance from −1 to the Nyquist plot can be expressed
as follows:

min | − 1 − P (jω)C(jω)| = min |1 + P (jω)C(jω)|


ω ω
h i−1
= max |S(jω)|
ω
= reciprocal of peak magnitude on Bode plot of 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

Introduction to Control Design

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:

1. Select frequency domain specs.

2. Design a controller for the specs.

3. Simulate for an appropriate number of test cases.

4. Evaluate.

5. If necessary modify the specs and return to step 2.

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

Then any M, ε, ω1 are achievable by suitable K1 , K2 . To see this, start with


1
S(s) = 10(K1 s+K2 )
1+ s(0.2s+1)
s(0.2s + 1)
= .
0.2s2 + (1 + 10K1 )s + 10K2

We can simplfy by reducing to two equal real poles:

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

In practice it is common to combine interactively the shaping of S with a time-domain simulation.


Now, S is a nonlinear function of C. So in fact it is easier to design the loop transfer function
1
L := P C instead of S = . Notice that if the loop gain is high, i.e., |L|  1, then
1+L
Brief Article
1
|S| ≈ .
|L| The Author
A typical desired plot is February 2, 2008

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.

5.2 Lag Compensation


We separate the controller into two parts, K and C1 , the latter having unity DC gain:
Brief Article
The Author
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 95
February 2, 2008

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

An example design using this type of compensator follows next.


1

Example
1
The plant transfer function is P (s) = . Let there be two specs:
s(s + 2)

1. When r(t) is the unit ramp, the steady-state tracking error ≈ 5 %.

2. A phase margin of approximately 45◦ for adequate damping in the transient response.
1
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 96

Step 1 Choose the gain K to get spec 1:


1
E= R
1 + PC
1 1
E(s) =
1 + s(s+2) T s+1
K αT s+1 s2

(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

CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 97

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

Figure 5.1: Example 5.2.1


CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 98
104 CHAPTER 5. INTRODUCTION TO CONTROL DESIGN
Step responses are shown on the next plot. The step response of KP/(1 + KP ), that is, the plant
compensated only by the gain for spec 1, is fast but oscillatory. The step response of P C/(1 + P C)
is slower but less oscillatory, which was the goal of spec 2.

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

Figure 5.2: Example 5.2.1


Brief Article
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 99
The Author

5.3 Lead Compensation February 2, 2008

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

90 benefit = phase lead


ϕmax
arg(C1 )

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. ωmax : This is the midpoint between 1


αT and 1
T on the logarithmically scaled frequency axis.

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 )| = α.

3. ϕmax : This is the angle of C1 (jωmax ). Thus

ϕmax = arg C1 (jωmax )



1 + αj
= arg .
1 + √1α j
Brief Article
By the sine law
sin ϕmax sin θ The Author
√ 1 = :
q
α− α√
1 + α1
February 2, 2008

θ √
α
ϕ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 α

The PM achieved is 44◦ . See the Bode plots. The controller is


αT s + 1
C(s) = K , K = 40, α = 3, T = 0.0687.
Ts + 1
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 102

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

Figure 5.3: Example 5.3.1

Finally, see the closed-loop step responses.


5.4. LOOPSHAPING THEORY 109

CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 103

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

Figure 5.4: Example 5.3.1

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.

5.4 Buck Converter


Let us return to the DC voltage regulator of Chapter 1. We had the switched mode power supply
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 104

S L

+ +
Vs vo
C Rl

Buck step-down converter

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

Analog controller for voltage regulation

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.

Analog control block diagram


As in Section 1.2 let v1 denote the square-wave input voltage to the circuit. Also, let iL denote the
inductor current. Then Kirchoff’s current law at the upper node gives
vo dvo
iL = il + +C
Rl dt
and Kirchoff’s voltage law gives
diL
L + vo = v1 .
dt
Define the state x = (vo , iL ). Then the preceding two equations can be written in state-space form
as

ẋ = 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

Analog form of PWM

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

Block diagram of analog control system

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.

Linear approximation for analog control


The task now is to linearize the system in the preceding block diagram. But the system does not
have an equilibrium, that is, a state where all signals are constant. This is because by its very
nature v1 (t) cannot be constant because it’s generated by a switch. What we should do is linearize
about a periodic solution.
Current practice is not to linearize exactly, but to approximate and linearize in an ad hoc
manner. Consider the figure titled “Block diagram of analog control system.” To develop a small-
signal model, assume the controller signal d(t) equals a constant, d(t) = D, the nominal duty cycle
about which we shall linearize, assume the load current il (t) equals zero, and assume the feedback
system is in steady state; of course, for this to be legitimate the feedback system has to be stable.
Then v1 (t) is periodic, and its average value equals DVs . The DC gain from v1 to vo equals 1, and
so the average value of vo (t) equals DVs too. Assume D is chosen so that the average regulation
error equals 0, i.e., DVs = Vref .
Now let d(t) be perturbed away from the value D:
ˆ
d(t) = D + d(t).
ˆ can be approximated by a constant
Assume the switching frequency is sufficiently high that d(t)
for any switching period [kT, (k + 1)T ). Looking at the figure titled “Analog form of PWM,” we
see that, over the period [kT, (k + 1)T ), the average of v1 (t) equals Vs d(t). Thus, without a very
strong justification we approximate v1 (t) via
ˆ
v1 (t) = Vs d(t) = DVs + Vs d(t).
ˆ
Define v̄1 = DVs and v̂1 (t) = Vs d(t). Likewise we write x, il , and vo as constants plus perturbations:
x = x̄ + x̂
il = 0 + îl
vo = v̄o + v̂o .
With these approximations, the steady state equations of the plant become
0 = Ax̄ + B2 v̄1 = AVs D + B2 v̄1
v̄o = DVs
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 107

and the small-signal model is


x̂˙ = Ax̂ + B1 îl + B2 Vs dˆ
v̂o = C x̂.
The block diagram of this small-signal linear system is as follows:

îl A B1 B2 Vs
C 0 0
v̂o
LTI controller −
dˆ 0

Block diagram of linear analog control system

Analog controller design example


The design of a buck converter is quite involved, but engineering firms have worked out recipes
in equation form for the sizing of circuit components. We are concerned only with the feedback
controller design, so we start with given parameter values. The following are typical:
Vs 8V
L 2 µH
C 10 µF
Rl 3.3 Ω
D 0.45
1/T 1 mHz

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

Moreover, the duty cycle stayed within the required range:

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

Response of duty cycle d(t)

Finally, we emphasize that the design must be tested by a full-scale Simulink model.

5.5 Loopshaping Theory


In this section we look at some theoretical facts that we have to keep in mind while designing
controllers via loopshaping.

5.5.1 Bode’s phase formula


It is a fundamental fact that if L = P C is stable and minimum phase and normalized so that
L(0) > 0 (positive DC gain), then the magnitude Bode plot uniquely determines the phase Bode
plot. The exact formula is rather complicated, and is derived using Cauchy’s integral theorem. Let

ω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
−∞

This shows that arg(L(jω0 )) can be expressed as an integral involving |L(jω)|.


CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 110

π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

As an example, consider the situation where


c
L(jω) = near ω = ω0 .
ωn
Thus −n is the slope of the magnitude Bode plot 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
π
⇒ arg(L(jω0 )) = −n from (5.2).
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 . Warning This derivation required L(s) to be stable, minimum
2
phase, positive DC gain.
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
Brief Articlenear gain crossover. If we do,
arg(P C) will be too large near crossover, resulting in a negative phase margin and hence instability.
The Author
5.5.2 The waterbed effect
February
This concerns the ability to achieve the following spec 2, 2008 function S:
on the sensitivity

ω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

c1 log ε + c2 log M ≥ log |A(z)−1 | ≥ 0.

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

Now |A1 (1)| ≤ 1 (why?), so


1 − p

|A(1)| ≤
1 + p

and hence
1 + p

−1
|A(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. 2
CHAPTER 5. INTRODUCTION TO CONTROL DESIGN 112

5.6 Remark on Pole Assignment


It may have occurred to you that closed-loop pole locations would be a good performance measure.
Designing a controller to put the closed-loop poles in a desired region is indeed a widely used method,
often in conjunction with the root locus tool. But it isn’t without limitations. For example, consider
the following two sets of closed-loop poles:

1. {−2 ± 10j, −10}

2. {−2, −2, −2}

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

50e−10t + 0.001e−2t cos(10t).

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:

• The value of block diagrams.

• What it means for a system to be linear.

• The value of graphical simulation tools like Simulink.

• Why we use transfer functions and the frequency domain.

• What stability means.

• What feedback is and why it’s important.

• What makes a system easy or hard to control.

If you’re continuing with another control course, it is hoped you take away additionally these:

• How to model a system using differential equations.

• How to put the model in the form of a state equation.

• How to find equilibria and linearize the model at an equilibrium (if there is one).

• How to determine if a feedback system is stable by checking poles or eigenvalues.

• The beautiful Nyquist stability criterion and the meaning of stability margin.

• How to design a simple feedback loop using frequency-domain methods.

The subject of control science and engineering is vast and from this course you can take off in
many directions.

113

You might also like