Professional Documents
Culture Documents
Systems Theory
Systems Theory
Systems Theory
Concept of a System
According to the Web Dictionary of Cybernetics and Systems, a system is defined by various authors
as:
A set of variables selected by an observer, [Ashby, 1960]
A set or arrangement of entities so related or connected so as to form a unity of organic whole
[Iberall]
Any definable set of components, [Maturana and Varela, 1979]
A few examples are shown in Figure 1.1.
Figure 1.1: System examples: Global Positioning System, Solar System, Truck
A dynamical system is a system whose behavior changes over time, often in response to external
stimulation or forcing, (Astrom and Murray, 2009). Examples of such systems, that occur in every
branch of science, include: the weather, the stock market, street traffic, robots, chemical reactors, power
systems etc.
All systems have a set of inputs, a set of outputs and a boundary that separates them from the
environment (Figure 1.2). Inputs are those quantities that are acting on the system from the environment
and the outputs are the results of the input acting on the system. Some of the inputs are not easily
understood or cannot be controlled and are not within the capabilities of the operator to manipulate it to
achieve a desired output or end result. These inputs are usually called disturbances. The boundary that
separates the system from the environment can be a physical one like that of a machine or a geographical
area. But in many systems, this boundary can be purely imaginary or conceptual rather than a physical
1
1.2
Systems theory is the transdisciplinary study of the abstract organization of phenomena, independent
of their substance, type, or spatial or temporal scale of existence. It investigates both the principles
common to all complex entities, and the (usually mathematical) models which can be used to describe
them, (F.Heylighen and C.Joslyn, 1992).
Systems theory studies physical systems based on their mathematical models aiming to understand
their behavior and to control it in such a way that the system behavior meets specified standards.
The general systems theory was developed by the biologist Ludwig van Bertalanffy who published
General Systems Theory in 1931 at the University of Chicago. Further work in the field has been done
2
by Norbert Wiener who publishes Cybernetics or Control and Communication in the Animal and the
Machine in 1948, and Ross Ashby (Introduction to Cybernetics, 1955).
Among the system theory developers are also: Anatol Rapoport, Kenneth Boulding, Ross Ashby,
Margaret Mead, Gregory Bateson, Ralph Gerardin.
1.3
Historically, engineers have developed specialized methods for analyzing the behavior of systems within
their own discipline. For example, electrical engineers have developed and refined circuit analysis methods in order to determine the response of voltages and currents in electronic circuits; and mechanical
engineers have developed methods of computing forces and displacements within systems assembled from
mechanical components.
The generalized discipline of system dynamics has been developed over the past five decades to
provide a unified method of system representation and analysis that can be applied across a broad
range of technologies. System dynamics concepts are now used in the analysis and design of many
types of interconnected systems including electric, mechanical, thermal and fluid systems. The general
methodologies arising from this field have recently also been extended to the analysis of many other
types of systems including economics, biology, ecology, the social sciences, and medicine (Jeltsema and
Scherpen, 2007).
System dynamics, or systems theory is the study of the dynamics or time-varying behavior of a system
and includes at least the following components (Jeltsema and Scherpen, 2007):
Definition of the system, system boundaries, input variables, and output variables.
Formulation of a dynamic model of the physical system, usually in the form of mathematical or
graphical relationships determined analytically or experimentally.
Determination of the dynamic behavior of the system model and the influence of system inputs on
the system output variables of interest.
Derivation of approximating models, like linearization and model reduction.
Study of features like controllability, reachability and observability for controller design and model
realizability.
Stability analysis.
Control Systems Engineers are concerned with understanding the segments of their environment, called
systems to provide useful economic products for society. Control Engineering must often consider the
control of poorly understood systems such as chemical process systems. The current challenge to Control
Systems Engineering is the modeling and the control of modern, complex, interrelated systems such as
3
traffic control systems, chemical processes, robotic systems and industrial automation systems. All the
challenges aim to solve control problems that affect the whole of society. Control Systems Engineering
is based on the foundations of feedback theory and linear systems analysis. It is an interconnection
of components forming a system configuration that will provide a desired system response, (Dorf and
Bishop, 1995).
1.3.1
Feedback control can be said to have originated with the float valve regulators of the Hellenic and Arab
worlds. They were used by the Greeks and Arabs to control such devices as water clocks, oil lamps and
wine dispensers, as well as the level of water in tanks, (Bissell, 2009).
The Greek inventor and mathematician Ctesibius (or Ktesibios) invents the first artificial automatic
regulatory system, a water clock around the year 300 BC, Figure 1.7.
In his water clocks, water flowed from a source such as a holding tank into a reservoir, then from the
reservoir to the mechanisms of the clock. Ktesibioss device used a cone-shaped float to monitor the level
of the water in its reservoir and adjust the rate of flow of the water accordingly to maintain a constant
level of water in the reservoir, so that it neither overflowed nor was allowed to run dry. This was the
first artificial truly automatic self-regulatory device that required no outside intervention between the
feedback and the controls of the mechanism (Wikipedia article on Cybernetics).
1.3.2
Control Systems Engineering is a multi-disciplinary field. It covers areas as, Mechanical Engineering,
Chemical Engineering, Electrical and Electronic Engineering, Environmental, Civil, Physics, Economics
4
and Finance, Artificial Intelligence and Computer Science. Control Systems Engineering is still taught
in main stream Engineering and Physics courses. Within the last decade or so it has started to appear
in Computer Science courses and as post-graduate papers in Real-Time Computer Control.
One of the emerging fields of Control Systems Engineering is Financial Engineering Control. This
branch of engineering deals with the dynamic modeling of finance and economic systems. The majority of
courses in Financial Engineering Control are still taught at post-graduate level in Mathematics, Physics
and Engineering. Engineers in Financial Engineering Control use the same models and concepts as
feedback and feed-forward control that are found in aircraft control systems or chemical process systems
and apply them to financial and economic dynamic systems.
Computer Control Systems is one of the most complex fields in control engineering. For example,
designing the control systems for a chemical process system would involve different types of engineers
from the beginning. A mechanical engineer would specify and design most of the machinery parts and
the electrical engineer will figure out how all these complex parts are wired together, what type of sensors
and actuators to specify, and also how it all function as a whole. An actuator is a device that provides the
motive power to the process, example is a dc motor. The chemical engineer will specify the time reaction
of certain chemicals and the optimal temperature and pressure for operations. The software engineer will
play the role of integrating all specifications by writing the software that meets the functional requirement
of the other engineers. All these engineers, must communicate before and during the whole project, with
each and every one understanding the language of Control Systems Engineering. Control Systems design
parameters such as process rise-time, peak-time, settling-time, percentage-overshoot and so on, must be
well understood by all engineers involved.
Concepts in Control Systems Engineering overlap with concepts in the branch of Physics and Electrical
Engineering known as Digital Signal Processing (DSP) and Communication Systems, where analysis is
done in frequency domain or time domain exactly as is done in Control Systems. There are disciplines
that a DSP or a Communication Systems engineer would also use in designing embedded Real-Time
Computer Control Systems.
1.4
As an illustrative system we choose to consider the control of an inverted pendulum, (Dutton et al.,
1997). One version of this problem will be familiar, in that it requires someone to balance a broom
handle vertically on the palm of his or her hand. After placing the point of the handle on the palm
in approximately the required vertical position, appropriate eye-hand coordination produces the desired
result. The study of such mechanisms is the theme of all control texts.
Before looking at the mechanisms, let us look at the broom handle. If its shape changed it would cease
to be a broom handle. In control engineering terms the handle is the plant (or process) to be controlled.
Control engineers like to use block diagrams to simplify the understanding of complex systems by breaking
down into smaller, interconnected subsystems.
eyes which send an appropriate message to the brain. There is a communication system, the neurological
system which sends messages, or signals, from the eye to the brain. In Figure 1.8 the signals are indicated
by connecting lines entering or leaving various blocks. The brain performs two main functions. It
compares the measured position of the handle with the desired position (the setpoint or reference value),
and it calculates the appropriate action to be taken. In the language of control, the brain performs the
function of both a comparator and a compensator. Finally the signal emanating from the compensator
portion of the brain activates the muscles in the arm which position the hand carrying the lower end of
the handle. The arm is the actuator, providing both power amplification and motion.
When looking at Figure 1.8, notice how information circulates around the control system. In this
context a control system refers to the plant and all the associated blocks. Measurement information
taken from the plant is, in turn, acted on by the comparator, compensator and actuator before being fed
back into the plant. The resulting control system is called closed-loop system and is characterized by the
feedback signal which carries information from the measurement device to the comparator. In contrast,
an open-loop control system does not have such a feedback path.
1.5
1.5.1
The temperature control of the oven in an electric cooker is an example of a closed-loop regulatory system.
Here the main objective is to maintain the oven temperature at, or near, the manually adjusted setpoint
temperature. A sensor within the oven measures the oven temperature. The resulting temperature
signal is compared with the setpoint and a very simple compensator provides a signal which is used to
switch (actuate) power to the ovens heating elements. The heating elements are switched on if the oven
temperature is somewhat less than the setpoint temperature, an off is the temperature is somewhat above
the setpoint. For a domestic cooker this strategy appears adequate and has, for many years been the
main method of oven temperature control, (Dutton et al., 1997).
1.5.2
A basic domestic washing machine typifies an open-loop system. Here the preset washing cycle activates
various washing operations for a set period of time. It is assumed that if the set sequence of operations is
followed correctly, then the clothes inserted into the machine will emerge clean and undamaged. However,
because the system is essentially open-loop the manufacturers provide copious instructions to try to deal
with all the variables that can occur in a typical wash, (Dutton et al., 1997).
1.5.3
For those living in a colder climate, examination of a domestic central heating reveals a number of
control loops. Water heated by the boiler is continuously pumped round the house. There is invariably
regulatory control on the exit temperature of the water from the boiler. If the boiler is oil, or gas fired,
this temperature control system is similar to that found in the oven of an electric cooker. (Example 1)
Solid fuel boilers use a different closed-loop control strategy to regulate circulating water temperatures.
A bimetallic strip, whose initial position can be set manually senses temperature changes. Deflections
of this strip are used to open or close a damper (basically a flap acting as a throttle valve) altering the
flow of air into the combustion chamber. The control signals are mechanical and the control action is
continuous (like the handle balancing problem, but unlike the on-off control in examples 1 and 2).
Heat carried by the circulating water is dissipated by means of heat radiators. When a radiator is
fitted with a thermostatically controlled valve, the heat dissipation process from that radiator is closedloop. If the radiator has no means of detecting the room temperature, the process is open-loop, (Dutton
et al., 1997).
1.5.4
A simple block diagram of an automobile steering control system is shown in Figure 1.9. The desired
Desired direction
of travel
Actual direction
of travel
Desired
course of
travel
Error
Driver
Steering
mechanism
Automobile
Actual
course of
travel
Measurement,
visual and tactile
Bibliography
Astrom, K. J. and Murray, R. M. (2009). Feedback Systems. An Introduction for Scientists and Engineers.
Princeton University Press.
Bissell, C. (2009). Springer Handbook of Automation, volume LXXVI, chapter A History of Automatic
Control. Springer.
Dorf, R. C. and Bishop, R. H. (1995). Modern Control Systems. Addison-Wesley.
Dutton, K., Thompson, S., and Barraclough, B. (1997). The Art of Control Engineering. Addison-Wesley.
F.Heylighen and C.Joslyn (1992). Principia Cibernetica Web. What is Systems Theory?
Jeltsema, D. and Scherpen, J. (2007). Lecture motes on Modeling and system analysis.
Mohandas, K. P. (2009). Linear System Analysis. Course notes. Nalanda Digital Library.
Contents
2 Introduction to System Modeling
2.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2
Lumped-parameter models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3
2.4
2.5
Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.6
Input/output models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.6.1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12
2.6.2
System response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
2.6.3
17
State-space models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.7.1
19
2.7.2
23
2.7.3
26
2.7.3.1
27
2.7.3.2
Time-domain method . . . . . . . . . . . . . . . . . . . . . . . .
30
2.7.4
30
2.7.5
32
2.7.5.1
33
2.7.5.2
35
39
40
2.8.1
Basic connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
2.8.2
44
2.8.3
45
2.8.3.1
46
2.7
2.7.6
2.8
Chapter 2
Introduction
y(t)
u(t)
Dynamic System
input
output
When fundamental physical laws are applied to the lumped-parameter model, the resulting
equations may be nonlinear in which case further assumptions may have to be made in order
to produce an ordinary linear differential equation model which is soluble. In such cases, it is
not unusual to assume that system operation will be restricted to small perturbations about a
given operating point. If the assumed operating region is small enough, most nonlinear plants
may be described by a set of linear equations. If these assumptions cannot be made, nonlinear
control techniques are needed.
2.2
Lumped-parameter models
1
L
v(t)dt or v(t) = L
i(t) = C
dv(t)
dt
di(t)
dt
displacement
k
Friction
f
Mass
M
y(t)
Force
r(t)
dy(t)
d2 y(t)
= f
ky(t) + r(t)
2
dt
dt
where f is the friction coefficient, M - the mass, k - the stiffness of the linear spring. The
2
and dy(t)
derivatives d dty(t)
2
dt represent the acceleration and velocity of the mass, respectively.
Alternatively, the former equation may be rewritten into an input-output form:
M
d2 y(t)
dy(t)
+f
+ ky(t) = r(t)
dt2
dt
It is a relationship between the (input) force r(t) and the (output) displacement y(t).
2.3
A great majority of physical systems are linear within some domain of variables. However, all
systems ultimately become nonlinear as the variables are increased without limit.
A system is defined as linear in terms of the system variables. In the case of an electrical
network, the excitation is the input current and the response is the voltage. In general a necessary
condition for a linear system can be determined in terms of and excitation x(t) and a response
y(t). When a system at rest is subjected to an excitation x1 (t), it provides a response y1 (t).
Furthermore, when the system is subjected to an excitation x2 (t), it provides a corresponding
response y2 (t). For a linear system, it is necessary that the excitation x1 (t) + x2 (t) result in a
response y1 (t) + y2 (t). This is usually called the principle of superposition.
Furthermore, it is necessary that the magnitude scale factor be preserved in a linear system.
Again, consider a system with an input x and an output y. Then it is necessary that the response
of a linear system to a constant multiple of an input x be equal to the response to the input
multiplied by the same constant so that the output is equal to y. This is called the property
of homogeneity.
4
Example 2.3.1 , (Dorf and Bishop, 2008). A system characterized by the relation y = x2 is
not linear because the superposition property is not satisfied. A system represented by the relation
y = mx + b is not linear because it does not satisfy the homogeneity property. However, this
device may be considered linear about an operating point x0 , y0 for small changes x and y.
When x = x0 + x and y = y0 + y, we have
y = mx + b
or
y0 + y = mx0 + mx + b
and because
y0 = mx0 + b
then:
y = mx
which satisfies the necessary conditions (Figure 2.3).
Consider a general element with an input x(t) and a response y(t). The relationship of the
two variables is written as:
y(t) = g(x(t))
where g(x(t)) is a continuous function of x(t).
In general, Taylor series may be used to expand a nonlinear function g(x(t)) about an
operating value x0 . An operating value could be the equilibrium position in a spring-massdamper, a fixed voltage in an electrical system, steady-state pressure in a fluid system, and so
on.
Because the function is continuous over the range of interest, a Taylor series expansion about
the operating point x0 may be utilized. Then we have:
y = g(x) = g(x0 ) +
dg
x x0
|x=x0
+ higher order terms
dx
1!
(2.1)
dg
|x=x0 ,
dx
is a good approximation to the curve over a small range of (x x0 ), the deviation from the
operating point. Then, as a reasonable approximation, the expression from example 1 becomes:
m=
y = g(x0 ) +
dg
|x=x0 (x x0 ) = y0 + m(x x0 ),
dx
5
where m is the slope at the operating point. Finally, this equation can be rewritten as the linear
equation
(y y0 ) = m(x x0 )
or
y = mx.
Example 2.3.2 Pendulum oscillator model, (Dorf and Bishop, 2008).
Consider the pendulum oscillator shown in Figure 2.4. The torque on the mass is
T = M gLsin(x)
where g is the gravity constant. The equilibrium condition for the mass is x0 = 0o . The first
derivative evaluated at equilibrium provides the linear approximation, which is:
sinx
|x=x0 (x x0 ),
T T0
= M gL
x
where T0 = 0. Then, we have
T = M gL(cos0o )(x 0o ) = M gLx
The approximation is reasonably accurate for /4 x /4. For example, the response of the
linear model for the swing through 30o is within 2% of the actual nonlinear pendulum response
(check in simulations).
If the variable y depends upon several excitation variables x1 , x2 , ..., xn , then the functional
relationship is written as:
y = g(x1 , x2 , ..., xn ).
The Taylor series expansion about the operating point x10 , x20 , ..., xn0 is useful for a linear
approximation to a nonlinear function or a nonlinear differential equation. When the higherorder terms are neglected, the linear approximation is written as
y = g(x10 , x20 , ..., xn0 )+
g
g
g
|x=x0 (x1 x10 )+
|x=x0 (x2 x20 )+...+
|x=x0 (xn xn0 ) (2.2)
x1
x2
xn
where x0 = [x10 , x20 , ..., xn0 ] is the operating point. An example will illustrate this method.
6
i2 (t)
z 2 (t)
i2 (t)
=0
z 2 (t)
(2.3)
The first step in linearizing this equation is setting the desired operating point. If the ball
is at equilibrium for z0 , then the speed and acceleration of the ball are zero for this distance:
z0 = 0. The current that keeps the ball floating at the distance z0 is obtained from the nonlinear
equation for z(t) = z0 and z(t) = z0 :
m
z0 = mg C
or
i2
0 = mg C 02 , i0 =
z0
i20
z02
mg
z0 = 0.1A
C
0 = g(
z (t), z(t), i(t)) g(
z0 , z0 , i0 ) +
+
or:
0 0 + m (
z (t) z0 ) 2C
i20
i0
(z(t) z0 ) + 2C 2 (i(t) i0 )
3
z0
z0
We denote by
z (t) = z(t) z0 , z(t) = z(t) z0 and i(t) = i(t) i0 the variations of
variables around the operating point, and re-arranging the equation above, we obtain:
m
z(t) = 2C
i20
i0
z(t) 2C 2 i(t)
3
z0
z0
(2.4)
All coefficients are constant and the relation (2.4) is a linear and homogeneous differential
equation. By replacing the constant values, the equation (2.4) is:
0.1
z (t) = 200z(t) 20i(t)
2.4
The ability to obtain linear approximations of physical systems allows the analyst to consider
the use of Laplace transformation. The Laplace transform method substitutes the more difficult
8
differential equations with the relatively easily solved algebraic equations. The basic Laplace
transform of a time signal f (t) is defined as:
F (s) =
f (t)est dt
It is common practice to use a capital letter F which is a function of the new variable s for
the transform of the time signal f (t). Also it is assumed that f (t) is zero for all times before
t=0. In the definition of Laplace transform the exponent st must be dimensionless otherwise
the expression est is meaningless. Thus the variable s has dimension of 1/time which is the
dimension of frequency. Since s is also a complex quantity it is often referred to as the the
complex frequency.
f (t)est dt or [f (t)]
Transform integral
f(t)
Linearity
f1 (t) f2 (t)
Constant multiplication
af(t)
aF(s)
eat f (t)
F(sa)
f(t-T)
eT s F (s), T0
Scaling theorem
f( at )
aF(as)
First derivative
d
dt f(t)
sF(s) - f(0)
n-th derivative
dn
dtn f (t)
First integral
Rt
0
F1 (s) F2 (s)
sn F (s)
dr1
nr
r=1 dtr1 f (0)s
Pn
1
s F (s)
f (t)dt
1
s
1
s2
eat
1
sa
cost
s
s2 + 2
sint
s2 + 2
2.5
Signals
0, t < 0
1, t 0
The Laplace transform of the step function, according to Table 2.2, is:
1
[u(t)] = ,
s
10
(2.5)
(2.6)
v(t) =
0, t < 0
t, t 0
(2.7)
1
s2
(2.8)
3. The ideal impulse also called Dirac impulse is shown in Figure 2.9 It is defined by:
(t) =
where ideally
lim
0 0
(2.9)
(t)dt = 1 and A
(2.10)
The Dirac impulse is a signal with unit area and infinite amplitude.
The Laplace transform of the unit impulse is:
[(t)] = 1
11
(2.11)
2.6
2.6.1
Input/output models
The transfer function
The transfer function of a linear system is defined as the ratio of the Laplace transform
of the output variable to the Laplace transform of the input variable, with all the initial
conditions assumed to be zero.
A transfer function may be defined only for a linear stationary system. A transfer function
is an input-output description of the behavior of a system.
A linear differential equation that describes such a system can be:
a0 r(t) + a1
dr(t)
dm r(t)
dy(t)
dn y(t)
+ ... + am
=
b
y(t)
+
b
+
...
+
b
0
1
n
dt
dtm
dt
dtn
where r(t) and y(t) are the input and output variables, as shown in Figure 2.10 where R(s) =
[r(t)] and Y (s) = [y(t)] .
R(s)
H(s)
Y(s)
Applying the Laplace transform for the initial conditions zero, the differential equation becomes:
(a0 + a1 s + ... + am sm )R(s) = (b0 + b1 s + ... + bn sn )Y (s)
and the transfer function will then be:
H(s) =
Y (s)
a0 + a1 s + ... + am sm
=
R(s)
b0 + b1 s + ... + bn sn
d2 y(t)
dy(t)
+f
+ ky(t) = r(t)
dt
dt
H(s) =
Y (s)
1
=
R(s)
M s2 + f s + k
The block diagram now contains all the information given in the transfer function model,
that is, output = contents input. H(s) is called a transfer function. It shows how the input
is transferred to the output.
12
diL
1
= vL
dt
L
dvC
1
= iC
dt
C
Resistor: vR = RiR
Capacitor:
(2.12)
(2.13)
(2.14)
(2.15)
(2.16)
= vR = vout
(2.17)
Assume the initial conditions zero, replace (2.17) and apply the Laplace transform to the relations
(2.12) - (2.16):
1
VL (s)
L
1
sVout (s) =
IC (s)
C
Vout (s) = RIR (s)
sIL (s) =
(2.18)
(2.19)
(2.20)
(2.21)
(2.22)
1
L
Vout ) + Vout = (LCs2 + s + 1)Vout
R
R
(2.23)
Vout (s)
1
R
=
=
L
2
2
Vin (s)
RLCs + Ls + R
LCs + R s + 1
(2.24)
For a real physical system the function H(s) is a ratio of two polynomials such that
H(s) =
13
N (s)
D(s)
with the degree of the denominator D(s) being greater than or equal to the degree of the
numerator polynomial N (s). Such a system is called proper. In a proper system, the system
order is the degree of the denominator polynomial.
If the denominator polynomial is extracted and set equal to zero, that is: D(s) = 0, the
resulting equation is called the systems characteristic equation, since it can be shown
to characterize the systems dynamics. Its roots are the poles of H(s). The roots of the
numerator polynomial are the zeros of the transfer function. Both the poles and zeros of H(s)
can be complex values, s = + j.
Example 2.6.3 Consider a system described by the transfer function
H(s) =
s3
s+2
+ s2 + s + 1
It is a third order system because the degree of the denominator polynomial is 3. The system
is proper since the degree of the denominator is greater than the degree of the numerator. The
characteristic polynomial is:
D(s) = s3 + s2 + s + 1
The systems characteristic equation is:
s3 + s2 + s + 1 = 0
and the roots of the characteristic equation are the system poles, that result from:
s3 + s2 + s + 1 = (s + 1)(s2 + 1) = 0, and the poles are: p1 = 1, p2,3 = j
The numerator polynomial has one root, that is the zero of the system:
s + 2 = 0, and the zero is: z1 = 2
Example 2.6.4 Consider a system described by the transfer function
H(s) =
2
+ 3)
s3 (s
It is a fourth order system because the degree of the denominator polynomial is 4. The system
is proper since the degree of the denominator is greater than the degree of the numerator. The
characteristic polynomial is:
D(s) = s3 (s + 3) = s4 + 3s3
The systems characteristic equation is:
s4 + 3s3 = 0
and the roots of the characteristic equation are the system poles, that result from:
s4 + 3s3 = s3 (s + 3) = 0, and the poles are: p1 = p2 = p3 = 0, p4 = 3
The numerator is a zero-order polynomial, i.e. system has no zeros.
14
2.6.2
System response
The transfer function can be easily used for the calculation of system response to an input
signal. Given the input signal r(t) and the transfer function model of a system H(s), we are
interested in finding the system behavior, that is the output signal y(t) (see Figure 2.10). From
the definition of the transfer function:
Y (s) = H(s) R(s)
(2.25)
(2.26)
Y (s)
1
=
.
2
R(s)
Ms + fs + k
We shall obtain the system response or output variable, when the input r(t) is a Dirac impulse
and the system constants M, f, k are:
1. M = 1, f = 3, k = 2
2. M = 1, f = 1, k = 2 (smaller friction coefficient)
If r(t) is a unit impulse, the Laplace transform will be R(s) = 1 and the output variable y(t)
is:
y(t) = 1 [H(s) R(s)] = 1 [H(s) 1] = 1 [H(s)]
1. In the first case the transfer function has two real poles
Y (s) =
1
(s + 1)(s + 2)
k1
k2
+
s+1 s+2
where k1 and k2 are the coefficients of the expansion, or the residues, and are evaluated
by multiplying through by the denominator factor corresponding to ki and setting s equal
to the root.
1
k1 =
|s=1 = 1
s+2
1
k2 =
|s=2 = 1
s+1
The inverse Laplace transform of Y (s) is then
y(t) =
1
1
1
s+1
s+2
1
s2 + s + 2
1 7j
=
2
The system response will be called underdamped (damped oscillations) as the poles of the
transfer function are complex and, as in the previous case, is computed from:
y(t) = 1 [H(s)]
Using a table with Laplace transform properties, and writing Y (s) as
7
2
2
Y (s) =
7 (s + 1 )2 + ( 7 )2
2
2
2 t/2
7
y(t) = e
sin(
t)
2
7
0.25
0.4
0.2
0.3
0.15
0.2
0.1
0.1
0
0.05
0.1
0
0
0.2
0
t (sec)
6
t (sec)
10
12
Figure 2.12: Spring-mass-damper response. Overdamped case (left). Underdamped case (right)
16
2.6.3
Because of the great number of systems with multiple inputs and outputs (MIMO systems),
calculus techniques specific for this kind of systems were developed. In case of linear systems
the mathematical techniques use transfer matrices instead of transfer functions.
Figure 2.13 illustrates a system with m inputs and n outputs.
y1(t)
r1(t)
y2(t)
...
linear multiple
input multiple
output (MIMO)
system
...
r2(t)
rm(t)
yn(t)
If the signal transfer is unidirectional and each input influences each output, as shown in
Figure 2.14, we can write the following equation system:
R1(s)
Y1(s)
H11
H12
R2(s)
Y2(s)
...
Hn1
Hn2
...
...
H22
Yn(s)
Rm(s)
Hnm
Yj (s)
Rk (s)
where
R(s) = [R1 (s) R2 (s) ... Rm (s)]T
is the (m 1) input vector,
H=
is called the transfer matrix.
Example 2.6.6 Consider a system with one input r(t) and two outputs y1 (t) and y2 (t). If a
linear relationship can be determined between the input and each output, then the system can be
described by a transfer matrix having the size 2 1. As an example (Figure 2.15) consider the
transfer functions between the input and each output as follows:
H11 (s) =
s
1
, H21 (s) =
s+1
s+2
The relation between the input and outputs written in a matrix form is then:
Y(s) =
"
"
H(s) =
"
s
s+1
1
s+2
Y1 (s)
Y2 (s)
H11 (s)
H21 (s)
U (s)
18
2.7
State-space models
A modern complex system may have many inputs and many outputs, and these may be interrelated in a complicated manner. To analyze such a system, it is essential to reduce the complexity
of the mathematical expressions, as well as to use computers for most of the complicated computations necessary in the analysis. The state-space approach to system analysis is best suited
from this viewpoint.
With the ready availability of computers it is convenient to consider the time-domain formulation of the equations representing dynamical systems. The time-domain formulation can
be readily utilized for nonlinear, time-varying and multivariable systems.
The time-domain representation of control systems is an essential basis for modern control
theory and system optimization. In this section we shall develop the time-domain representation
of control systems and illustrate several methods for the solution of the system time-response,
(Dorf and Bishop, 2008).
2.7.1
The time-domain analysis and design of a control system utilize the concept of the state of a
system.
The state of a system is a set of numbers such that the knowledge of these numbers and
the input functions will, with the equations describing the dynamics, provide the future state
and output of the system.
For a dynamic system, the state of a system is described in terms of a set of state variables
[x1 (t), x2 (t),..., xn (t)]. The state variables are the variables that determine the future behavior
of a system when the present state of a system and the excitation signals are known. Consider
the system shown in Figure 2.16, where y1 (t) and y2 (t) are the output signals and u1 (t) and
u2 (t) are the input signals. A set of state variables (x1 ,x2 ,...xn ) for the system shown in the
19
Example 2.7.2 Spring-mass-damper, (Dorf and Bishop, 2008). The concept of a set of state
variables that represent a dynamic system can be illustrated in terms of the spring-mass-damper
system (see Figure 2.2). The number of state variables chosen to represent this system should be
as few as possible in order to avoid redundant state variables. A set of state variables sufficient
to describe this system is the position and the velocity of the mass. Therefore we will define a
set of state variables as (x1 , x2 ), where
dy(t)
dt
The differential equation describes the behavior of this system and is usually written as
x1 (t) = y(t) and x2 (t) =
dy(t)
d2 y(t)
+f
+ ky(t) = r(t)
2
dt
dt
To write this equation in terms of the state variables, we substitute the state variables as already
defined and obtain:
dx2 (t)
M
+ f x2 (t) + kx1 (t) = r(t)
dt
Therefore we can write the differential equations that describe the behavior of the spring-massdamper system as a set of two first-order differential equations as follows:
M
dx1 (t)
= x2 (t)
dt
dx2 (t)
f
k
1
= x2 (t)
x1 (t) +
r(t)
dt
M
M
M
This set of differential equations describes the behavior of the state of the system in terms of the
rate of change of each state variable.
In this case, the output is connected to the states directly by the relation:
y(t) = x1 (t)
Example 2.7.3 RLC Circuit. (Dorf and Bishop, 2008) As another example of the state variable
characterization of a system, let us consider the RLC circuit shown in Figure 2.17.
The state of this system can be described in terms of a set of state variables (x1 , x2 ) where
x1 is the capacitor voltage vc (t) and x2 is equal to the inductor current iL (t). For a passive RLC
network, the number of state variables required is equal to the number of independent energystorage elements. This choice of state variables is intuitively satisfactory because the stored
energy of the network can be described in terms of these variables as:
1
1
E = Li2L (t) + Cvc2 (t)
2
2
20
Utilizing Kirchoff s current law at the junction, the source current i0 (t) is the sum of capacitor current iC (t) and the inductor current iL (t):
i0 (t) = iC (t) + iL (t)
Using the relation between the capacitor current and voltage we obtain a first-order differential
equation by describing the rate of change of the capacitor voltage as:
dvc
+ iL (t)
dt
i0 (t) = C
(2.27)
diL (t)
+ RiL (t)
dt
(2.28)
The output of this system is the voltage drop accross the resistor and is represented by the
linear algebraic equation
vR (t) = RiL (t)
We can rewrite equations (2.27) and (2.28) as a set of first-order differential equations in
terms of vc and iL :
dvc (t)
dt
diL (t)
dt
1
1
iL (t) + i0 (t)
C
C
1
R
vC (t) iL (t)
L
L
=
=
or in terms of the state variables x1 (t) and x2 (t), when the input i0 (t) is denoted by i0 (t) = u(t),
as follows:
dx1 (t)
dt
dx2 (t)
dt
1
1
x2 (t) + u(t)
C
C
1
R
x1 (t) x2 (t)
L
L
(2.29)
(2.30)
(2.31)
At the moment t0 = 0, the capacitor voltage x1 (t0 ) = vC (t0 ) and the inductor current
x2 (t0 ) = iL (t0 ) are considered to be known.
Utilizing equations (2.29), (2.30) and (2.31) the initial conditions of the network represented
by [x1 (t0 ), x2 (t0 )] we can determine the systems future behavior and its output.
The state variables that describe a system are not a unique set!
21
Several alternative sets of state variables can be chosen. For example, for the RLC circuit
we might choose the set of state variables as the two voltages vC (t) and vL (t), where vL (t) is the
voltage drop across the inductor. Then, the state variables x1 and x2 are related to the old state
variables x1 and x2 , as
x1 = vC = x1
x2 = vL = vC RiL = x1 Rx2
Thus, in the actual system, there are several choices of a set of variables that specify the energy
stored in a system and therefore adequately describe the dynamics of a system.
A widely used choice is a set of state variables that can be readily measured.
Example 2.7.4 To illustrate the non uniqueness of state variable models, consider again the
RLC circuit presented in Example 2.7.3. The input is the source current i0 (t) as before, and the
output is the voltage on the resistor vR (t). As in the previous example, the relations describing
the system dynamics are given by Kirchoff s laws for current and voltage together with the
equations describing each element separately:
dvC
i0 (t) = C
+ iL (t)
(2.32)
dt
diL (t)
vC (t) = L
+ RiL (t)
(2.33)
dt
The state variables may be chosen as x1 (t) = iL (t) and x2 (t) = diLdt(t) (the inductor current
and its first derivative). A set of two first-order differential equations describing the system in
terms of the newly chosen state variables can be obtained as follows:
Eliminate all the variables except for the chosen states and the input. Computing the first
derivative of (2.33) and combining it with (2.32) gives:
dvC (t)
d2 iL (t)
diL (t)
1
=L
+R
= (u(t) iL (t))
dt
dt2
dt
C
or, rearranged:
L
d2 iL (t)
diL (t)
1
1
+R
+ iL (t) = u(t)
dt2
dt
C
C
(2.34)
diL (t)
dt
dx1 (t)
dt
in (2.34),
dx2 (t)
1
1
+ Rx2 (t) + x1 (t) = u(t)
dt
C
C
Write the system of two first-order differential equations resulted from the relations above:
dx1 (t)
= x2 (t)
dt
dx2 (t)
1
R
1
=
x1 (t) x2 (t) +
u(t)
dt
LC
L
LC
and the relation giving the output:
y(t) = vR (t) = RiL (t) = Rx1 (t)
(2.35)
(2.36)
(2.37)
The same RLC circuit as in Example 2.7.3 is described now by the relations (2.35), (2.36)
and (2.37). The input and output signals are the same, but the state variables are chosen in a
different manner, therefore the model is not unique.
22
2.7.2
The state of a system is described by the set of first-order differential equations written in terms
of the state variables (x1 (t), x2 (t), ..., xn (t)) and the inputs (u1 (t), u2 (t), ..., um (t)). These first
order differential equations can be written in the general form:
x1 (t) = a11 x1 (t) + a12 x2 (t) + ...a1n xn (t) + b11 u1 (t) + ... + b1m um (t)
x2 (t) = a21 x1 (t) + a22 x2 (t) + ...a2n xn (t) + b21 u1 (t) + ... + b2m um (t)
...
xn (t) = an1 x1 (t) + an2 x2 (t) + ...ann xn (t) + bn1 u1 (t) + ... + bnm um (t)
i (t)
where xi (t) = dxdt
. Thus, this set of simultaneous differential equations can be written in
matrix form as follows:
x 1 (t)
x 2 (t)
..
.
x n (t)
a11
.
= .
.
an1
... a1n
..
..
.
.
... ann
x1 (t)
x2 (t)
..
.
xn (t)
b11
.
+ .
.
bn1
... b1m
..
..
.
.
... bnm
u1 (t)
u2 (t)
..
.
um (t)
(2.38)
The column matrix consisting of the state variables is called the state vector and is written
as:
x(t) =
x1 (t)
x2 (t)
..
.
xn (t)
(2.39)
where the boldface indicates a matrix. The matrix of input signals is defined as u(t):
u(t) =
u1 (t)
u2 (t)
..
.
um (t)
Then, the system can be represented by the compact notation of the state differential equation
as:
x(t)
= Ax(t) + Bu(t)
(2.40)
The differential equation (2.40) is also commonly called the state equation.
The state differential equation relates the rate of change of the state of the system to the
state of the system and the input signals.
In general, the outputs of a linear system can be related to the state variables and the input
signals by the output equation:
23
(2.41)
where y(t) is the set of output signals expressed in column vector form:
y(t) =
y1 (t)
y2 (t)
..
.
yp (t)
x(t)
= Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
(2.42)
are the standard form of the state-space model or the state-space representation of the
linear system.
In equations (2.42):
x(t) is an (n 1) state vector, where n is the number of states or system order
u(t) is an (m 1) input vector, where m is the number of input functions
y(t) is a (p 1) output vector where p is the number of outputs
A is an (n n) square matrix called the system matrix or state matrix
B is an (n m) matrix called the input matrix
C is a (p n) matrix called the output matrix
D is a (p m) matrix which represents any direct connection between the input and the
output. It as called the feedthrough matrix.
Example 2.7.5 RLC Circuit. Consider again the RLC circuit from Example 2.7.3. We obtained the equations (2.29), (2.30) and (2.31) to describe the system dynamics.
In a vector-matrix notation the state variable differential equation for the RLC circuit of
Figure 2.11 is:
"
# "
#"
# "
#
x 1 (t)
0
1/C
x1 (t)
1/C
=
+
u(t)
x 2 (t)
1/L R/L
x2 (t)
0
and the output is
y(t) =
0 R
"
x1 (t)
x2 (t)
Using the compact form for state variable vector, input and output vectors, the state-space
model is:
"
#
"
#
0
1/C
1/C
x(t)
=
x(t) +
u(t)
1/L R/L
0
24
and
y(t) =
0 R
"
0
1/C
1/L R/L
, B=
"
1/C
0
x(t)
, C=
0 R
, and D = [0]
Example 2.7.6 Consider the same RLC circuit as above, but with the model computed in Example 2.7.4 and given by the equations (2.35), (2.36) and (2.37). The state-space model can be
written in a matrix form as:
x(t)
=
"
0
1
1/LC R/L
and
y(t) =
The matrices A, B, C, D are:
A=
"
0
1
1/LC R/L
, B=
"
x(t) +
"
R 0
x(t)
0
1/LC
0
1/LC
C=
u(t)
R 0
, and D = [0]
Example 2.7.7 Inverted pendulum (Dorf and Bishop, 2008) The problem of balancing a broomstick on a persons hand is similar to the classic problem of the inverted pendulum mounted on
a cart as shown in Figure 2.18. The cart must be moved so that the mass m is always in the
Mass m
my
mg
u(t)
y(t)
frictionless
surface
(2.43)
where u(t) equals the force on the cart and l is the distance from the mass to the pivot point.
The sum of the torques about the pivot point is
ml
y(t) + ml2 q(t) mlgq(t) = 0
(2.44)
The state variables for the equations (2.43) and (2.44) are chosen as
q(t), q(t)),
(2.45)
(2.46)
and
To obtain the necessary first-order differential equations we extract lx4 from (2.45) and substitute
in (2.46):
M lx2 (t) + mgx3 (t) = u(t)
since M m. Substituting x2 we have:
M lx4 (t) M gx3 (t) + u(t) = 0.
The four first order differential equations can be written as:
x1 (t) = x2 (t)
mg
1
x2 (t) =
x3 (t) +
u(t)
M
M
x3 (t) = x4 (t)
g
1
x4 (t) =
x3 (t)
u(t)
l
Ml
The system matrices are:
A=
0
0
0
0
1
0
0 mg/M
0
0
0
g/l
0
0
1
0
b=
0
1/M
0
1/M l
The outputs of this system are the position of the cart x1 (t) and the angle of rotation q(t).
y=
2.7.3
"
1 0 0 0
0 0 1 0
x1
x2
x3
x4
C=
"
1 0 0 0
0 0 1 0
, D=
"
0 0
0 0
The solution of the state differential equation can be obtain by using the Laplace transform or
in a manner similar to the approach we utilize for solving a first-order differential equation.
26
2.7.3.1
In this section we use the Laplace transform to solve the state equations for the state and output
vectors. Consider the state equation:
x(t)
= Ax(t) + Bu(t)
(2.47)
(2.48)
Taking the Laplace transform of both sides of the state and output equations (2.47) and
(2.48) for non-zero initial conditions yields:
sX(s) x(0) = AX(s) + BU(s)
Y(s) = CX(s) + DU(s)
In order to separate X(s) in the state equation replace sX(s) with sIX(s) where I is an n n
identity matrix and n is the order of the system. Rearranging we obtain:
(sI A)X(s) = BU(s) + x(0)
or
X(s) = (sI A)1 (BU(s) + x(0))
(2.49)
Taking the inverse Laplace transform, the state vector, as a function of time is:
x(t) = 1 [X(s)]
Replacing (2.49) into the output equation, the output vector is:
Y(s) = C[(sI A)1 BU(s) + x(0))] + DU(s)
or
Y(s) = [C(sI A)1 B + D]U(s) + C(sI A)1 x(0)
(2.50)
The output vector, as a function of time, is computed by taking the inverse Laplace transform
of (2.50):
y(t) = 1 [Y(s)]
Note that, when the initial conditions x(0) are zero, C[(s I A)1 B + D] is the transfer
function matrix mapping the input vector U(s) to the output vector Y(s). Moreover, the poles
of this transfer function are the same as the eigenvalues of the A matrix of the state space
representation of the same system.
From
Y(s) = [C(sI A)1 B + D]U(s),
the transfer matrix will be:
27
Y(s) = H(s)U(s)
(2.51)
1
adj(sI A)
det(sI A)
(2.52)
The poles of the system are given by the solution of (2.52). Also, the poles can be determined
as the eigenvalues of matrix A.
Example 2.7.8 Given the system represented in spate-space by:
x(t)
"
y(t) =
0
1
2 3
i
1 0
x(t) +
"
0
1
u(t)
x(t)
"
x(0) =
1
2
Solve the state equation and obtain the output when the input is a unit step u(t) = 1, t 0.
Find the eigenvalues of the state matrix and the system poles.
Solution:
The system matrices are:
A=
"
0
1
2 3
, B=
"
0
1
, C=
1 0
, D = [0]
We will solve the problem by finding the component parts of (2.50). Compute:
(sI A) =
"
s 0
0 s
"
0
1
2 3
"
s 1
2 s+3
"
s+3 1
2 s
(sI A)
"
s+3
(s+1)(s+2)
2
(s+1)(s+2)
1
(s+1)(s+2)
s
(s+1)(s+2)
"
"
s+3
(s+1)(s+2)
2
(s+1)(s+2)
s+3
(s+1)(s+2)
2
(s+1)(s+2)
"
s+3
s2 +3s+2
s(1/s+2)
s2 +3s+2
1
(s+1)(s+2)
s
(s+1)(s+2)
1
(s+1)(s+2)
s
(s+1)(s+2)
1/s+2
s2 +3s+2
2
s2 +3s+2
(2.53)
#
# "
0
1
#"
1
+2
X1 (s)
X2 (s)
"
1
s
1
+
s
"
1
2
#!
The inverse Laplace transform of X1 (s) and X2 (s) will give the time variations of the state
variables.
5
1
x1 (t) = 1 (X1 (s)) = 3et e2t +
2
2
1
2t
t
x2 (t) = (X2 (s)) = 5e
3e
The output equation from this example is y(t) = [1 0]x(t) = x1 (t). So the system output
is already computed.
Otherwise, the output may be obtained from the output equation:
Y(s) = CX(s) + DU(s) =
=
1 0
"
X1 (s)
X2 (s)
+ [0]U(s) = X1 (s)
and
y(t) = 1 [Y (s)] = 1 [X1 (s)] = x1 (t)
The eigenvalues of the state matrix are given by:
det(sI A) = s(s + 3) + 2 = (s + 1)(s + 2) = 0
so they are:
s1 = 1, s2 = 2
The system transfer function is computed from the relation (2.51) where D = [0], thus:
H(s) = C(sI A)1 B
=
1 0
"
s+3
(s+1)(s+2)
s+3
(s+1)(s+2)
2
(s+1)(s+2)
1
(s+1)(s+2)
1
(s+1)(s+2)
s
(s+1)(s+2)
"
0
1
#"
0
1
1
(s + 1)(s + 2)
(2.54)
Because the system has one input and one output signal, the transfer function is a scalar
function of s. The poles are 1 and 2 the same as the eigenvalues of the system matrix
A.
29
2.7.3.2
Time-domain method
The solution of equation (2.40) can be also obtained in a similar manner to solving a first order
differential equation
x = ax + bu
(2.55)
where x(t) and u(t) are scalar functions of time. We expect an exponential of the form eat .
Taking the Laplace transform of equation (2.55), we have:
sX(s) x(0) = aX(s) = bU (s)
and therefore
x(0)
b
+
U (s).
sa sa
The inverse Laplace transform of (2.56) results in the solution:
X(s) =
at
x(t) = e x(0) +
ea(t ) bu( )d
(2.56)
(2.57)
We expect the solution of the state differential equation to be similar to equation (2.57).
The matrix exponential function can be calculated by a Taylor series expansion as:
A2 t2
Ak tk
+ ... +
+ ...
eAt = exp(At) = I + At +
2!
k!
which converges for all finite t and any A. Then the solution of the state differential equation is
found to be
Z
t
x = exp(At)x(0) +
exp(A(t ))Bu( )d
(2.58)
The matrix exponential function describes the unforced response of the system and is called
the fundamental or state transition matrix, (t). The solution of the unforced system (that
is, when u=0)
x = Ax
is simply
x(t) = exp(At)x(0) = (t)x(0).
2.7.4
The method of conversion from state-space models to transfer function (or transfer matrix)
models was already presented in section 2.7.3.1. Summarizing, the method is as follows:
Write the state-space model in the matrix form:
x(t)
= Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)
Consider the initial conditions equal to zero (x(0) = 0) and taking the Laplace transform
of both sides of the state and output equations:
sX(s) = AX(s) + BU(s)
Y(s) = CX(s) + DU(s)
30
Separate X(s) from the state equation and replace it in the output equation:
(sI A)X(s) = BU(s)
or
X(s) = (sI A)1 BU(s)
The output vector is:
Y(s) = C(sI A)1 BU(s) + DU(s)
or
Y(s) = [C(sI A)1 B + D]U(s)
(2.59)
(2.60)
(2.61)
The size of the transfer matrix will be p m where p is the number of output signals
and m the number of inputs. For a single-input single-output (SISO) system, the transfer
matrix is a scalar transfer function.
Example 2.7.9 Find the transfer function for a system with the state-space representation:
x(t)
"
2 2
1
0
y(t) =
1 2
x(t) +
"
1
0
u(t)
x(t) + 0 u(t)
The size of the system matrix A is 2 2, therefore we have two state variables. The size of
B is 2 1 so the number of inputs is 1. The size of C is 1 2 so the number of outputs is also
1. This is a SISO system with a transfer function that can be computed from (2.61) as follows:
Compute sI A and its inverse:
sI A =
"
s 0
0 s
"
2 2
1
0
(sI A)1 =
"
s+2 2
1 s
det(sI A)
adj(sI A)
det(sI A) = s2 + 2s + 2
adj(sI A) =
1
(sI A)
"
31
"
s 2
1 s+2
s
s2 +2s+2
1
s2 +2s+2
2
s2 +2s+2
s+2
s2 +2s+2
Replace all the matrices in (2.61). Note that D = 0, therefore the relation is:
H(s) = C(sI A)1 B
H(s) =
=
2.7.5
1 2
"
s
s2 +2s+2
1
s2 +2s+2
s2 +2s+2
s+2
s2 +2s+2
#"
1
0
s+2
s2 + 2s + 2
s+2
s2 +2s+2
2s+2
s2 +2s+2
"
1
0
Although the transformation from transfer function to a state-space model is not unique, in
this section we will present only one method to obtain the state variables in the form of phase
variables. The state variables are phase variables when each subsequent state is defined to be
the derivative of the previous state variable.
At first, we show how to represent a general n-th order linear differential equation with
constant coefficients in state space in the phase variable form. This method will be applied then
to transfer functions.
Consider a system with the input u(t) and the output y(t) described by the differential
equation:
dn y(t)
dn1 y(t)
dy(t)
+
a
+ + a1
+ a0 y(t) = b0 u(t)
(2.62)
n1
n
n1
dt
dt
dt
A convenient way to chose the state variables is to choose the output y(t) and its n1 derivatives
as the state variables. They are called phase variables:
x1 (t) = y(t)
dy(t)
x2 (t) =
dt
..
.
(2.63)
dn1 y(t)
dtn1
xn (t) =
di x(t)
dti
dn y(t)
dtn
(2.64)
dn1 y(t)
dtn1
=
32
dxn1 (t)
= x n1 (t)
dt
(2.65)
(2.66)
The n-th order differential equation (2.62) is equivalent to a system of n first order differential
equations obtained from the definitions of the derivatives from (2.65) together with the x n (t)
that results from (2.66):
x 1 (t) = x2 (t)
x 2 (t) = x3 (t)
..
.
(2.67)
x n1 (t) = xn (t)
x n (t) = a0 x1 (t) a1 x2 (t) an1 xn (t) + b0 u(t)
In a matrix-vector form equations (2.67) become:
x 1 (t)
x 2 (t)
x 3 (t)
..
.
x n1 (t)
x n (t)
0
0
0
..
.
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
a0 a1 a2 a3 an1
x1 (t)
x2 (t)
x3 (t)
..
.
xn1 (t)
xn (t)
0
0
0
..
.
+
0
b0
u(t) (2.68)
Equation (2.68) is the phase-variable form of the state equation. This form is easily recognized
by the pattern of 1s above the main diagonal and 0s for the rest of the state matrix, except for
the last row that contains the coefficients of the differential equation written in reverse order,
(Nise, 2004).
The output equation is:
y(t) = x1 (t)
or, in a vector form:
y(t) =
1 0 0 0
x1 (t)
x2 (t)
x3 (t)
..
.
xn1 (t)
xn (t)
2.7.5.1
+ 0 u(t)
(2.69)
For a system with an input u(t) and an output y(t) consider a general transfer function with
constant term at numerator:
H(s) =
sn
+ an1
sn1
b0
Y (s)
=
+ + a1 s + a0
U (s)
33
(2.70)
Choosing the state variables as successive derivatives (phase variable form) we get:
x1 (t) = y(t)
dy(t)
dx1 (t)
x2 (t) =
=
= x 1 (t)
dt
dt
d2 y(t)
dx2 (t)
x3 (t) =
=
= x 2 (t)
2
dt
dt
and the derivative of the last state variable is:
x 3 (t) =
d3 y(t)
dt3
x 1 (t)
0
1
0
x1 (t)
0
0
1 x2 (t) + 0 u(t)
x 2 (t) = 0
x 3 (t)
4 3 2
x3 (t)
2
y(t) =
1 0 0
x1 (t)
x2 (t)
x3 (t)
(2.71)
(2.72)
x 1 (t)
x(t) = x 2 (t)
x 3 (t)
0
1
0
0
0
1 x(t) + 0 u(t)
x(t)
= 0
4 3 2
2
y(t) =
2.7.5.2
1 0 0
x(t)
Although the method presented below can be applied for systems of any order, to simplify the
demonstration, consider a third-order transfer function with a second-order polynomial in the
numerator:
b2 s2 + b1 s + b0
H(s) = 3
s + a2 s2 + a1 s + a0
Notice that the denominator is a monic polynomial (the leading coefficient or the coefficient
of highest degree is equal to 1). If the polynomial in the numerator is of order less than the
polynomial in the denominator, the numerator and denominator can be handled separately.
First, separate the transfer function into two cascaded transfer functions, as shown in Figure
2.19: the first is the denominator and the second one is just the numerator, (Nise, 2004).
output and the rest of the phase variables are the internal variables of the first block as shown
in Figure 2.19.
The first transfer function is:
X1 (s)
1
= 3
2
U (s)
s + a2 s + a1 s + a0
(2.73)
Y (s)
= b2 s2 + b1 s + b0
X1 (s)
(2.74)
Following the procedure described in the previous section, the state equation resulting from
(2.73) will be:
x 1 (t)
0
1
0
x1 (t)
0
0
1 x2 (t) + 0 u(t)
x 2 (t) = 0
x 3 (t)
a0 a1 a2
x3 (t)
1
(2.75)
d2 x1 (t)
dx1 (t)
+ b0 x1 (t)
+ b1
2
dt
dt
But the derivative terms are the definitions of the phase variables obtained in the first block.
Thus, writing the terms in reverse order, the output equation is:
y(t) = b0 x1 (t) + b1 x2 (t) + b2 x3 (t)
or, in a matrix form:
y(t) =
b0 b1 b2
x1 (t)
x2 (t)
x3 (t)
(2.76)
Hence, the second block simply forms a specified linear combination of the state variables
developed in the first block.
From another perspective, the denominator of the transfer function yields the state equations
while the numerator yields the output equation.
If the order of the polynomial in the numerator is equal to the order of the polynomial in
the denominator, the third-order transfer function will be written in the general form:
H(s) =
b3 s3 + b2 s2 + b1 s + b0
s3 + a2 s2 + a1 s + a0
36
d3 x1 (t)
d2 x1 (t)
dx1 (t)
+ b0 x1 (t)
+
b
+ b1
2
3
2
dt
dt
dt
Using the definitions of the state variables resulted in the first block and re-arranging the terms:
y(t) = b0 x1 (t) + b1 x2 (t) + b2 x3 (t) + b3 x 3 (t)
The output equation must not contain any derivatives of the state variables, but we can replace
x 3 (t) with the last equation of the system (2.75):
x 3 (t) = a0 x1 (t) a1 x2 (t) a2 x3 (t) + u(t)
so it will become:
y(t) = b0 x1 (t) + b1 x2 (t) + b2 x3 (t) + b3 (a0 x1 (t) a1 x2 (t) a2 x3 (t) + u(t))
Re-arranging the output equation is:
y(t) = (b0 b3 a0 )x1 (t) + (b1 b3 a1 )x2 (t) + (b2 b3 a2 )x3 (t) + b3 u(t)
or, in the matrix form:
y(t) =
b0 b3 a0 b1 b3 a1 b2 b3 a2
x1 (t)
(2.77)
Note that the output equation (2.76) is the same as (2.77) for b3 = 0. Also, note that the
matrix D is no longer equal to zero. If the system has one input and one output, D is a scalar
value and in this case D = b3 .
If the system is represented by a transfer function, the minimum number of state variables
that have to be chosen is equal to the order of the system (or the order of the polynomial
in the denominator of the transfer function).
Example 2.7.11 Consider a system with the input u(t) and an output y(t) described by the
transfer function:
s+2
H(s) = 2
s + 2s + 2
Determine the state-space model in the phase variable form.
37
Y (s)
=s+2
X1 (s)
Find the state equations for the first block. From the first transfer function we have:
(s2 + 2s + 2)X1 (s) = U (s)
and the differential equation obtained by taking the inverse Laplace transform is:
x
1 (t) + 2x 1 (t) + 2x1 (t) = u(t)
The first state variable was already chosen as the output of the first block x1 (t) and the
number of state variables is 2, equal to the order of the system. Therefore we choose the
second state in the phase variable form:
x2 (t) = x 1 (t)
Replacing in the differential equation we obtain:
x 2 (t) + 2x2 (t) + 2x1 (t) = u(t)
Re-arranging and taking also the definition of the second state variable we obtain the state
equations:
x 1 (t) = x2 (t)
x 2 (t) = 2x1 (t) 2x2 (t) + u(t)
or
"
"
x(t)
"
x 1 (t)
x 2 (t)
or
0
1
2 2
0
1
2 2
#"
#
x1 (t)
x2 (t)
x(t) +
"
0
1
"
0
1
u(t)
u(t)
Introduce now the block with the numerator. From the transfer function we obtain:
Y (s) = (s + 2)X1 (s)
38
(2.78)
or, in time-domain:
y(t) = x 1 (t) + 2x1 (t) = x2 (t) + 2x1 (t)
The output equation can be written also as:
y(t) =
2 1
or
y(t) =
2.7.6
"
2 1
x1 (t)
x2 (t)
i
x(t)
(2.79)
State variable models are a completely generic form of representation in which the system (linear
or nonlinear, time varying or time invariant) is decomposed into a set of first-order differential
equations.
There are many advantages to modeling systems in state space. The most important advantage for linear systems is the matrix formulation. Computers can easily manipulate matrices.
Having the A, B, C, D matrices one can calculate stability, controllability, observability and
many other useful attributes of a system. The second most important aspect of state space
modeling is that it allows us to model the internal dynamics of the system, as well as the overall
input/output relationship as in transfer functions. State space modeling makes the vast, existing, linear system knowledge such as estimation and optimal control theory available to the
user.
39
2.8
Since control systems are concerned with the control of specific signals, the interrelationship
of the control variables to the controlling variables is required. This relationship is typically
represented by the transfer function of the subsystem relating the input and output variables.
Therefore one can correctly assume that the transfer function is an important relation for control
engineering.
The importance of the cause-effect relationship of the transfer function is evidenced by the
facility to represent the relationship of the system variables by schematic means. The block
diagram representation of the system relationship is prevalent in control system engineering.
Block diagrams consist of unidirectional, operational blocks that represent the transfer functions
of the variables of interest, (Dorf and Bishop, 2008).
The block diagram representation of a given system can often be reduced, using block diagram reduction techniques. The resulting diagram obeys the law of superposition because of
the linear behavior of each subsystem.
In control engineering, the block diagram is a primary tool that together with transfer
functions can be used to describe cause-and-effect relationships throughout a dynamic system.
The manipulation of block diagrams adheres to a mathematical system of rules often known as
block diagram algebra (Mei, 2002).
In general, the block diagram of a linear time invariant system consists of four components,
namely signal, block (with transfer function), summing point and pickoff point as shown in
Figure 2.21, (Mei, 2002).
2.8.1
Basic connections
In Figure 2.22 are shown the three basic connections: series (cascade), parallel and feedback.
The equivalent transfer function from the input R(s) to the output Y (s) for each of these cases
can be determined as follows:
1. Series connection.
H1 (s) =
Y1 (s)
Y2 (s)
; H2 (s) =
; Y1 (s) = R2 (s)
R1 (s)
R2 (s)
H(s) =
Y (s)
R(s)
40
{z
H(s)
For n systems connected in cascade the equivalent transfer function will be:
H(s) =
n
Y
Hj (s)
j=1
2. Parallel connection.
H1 (s) =
Y1 (s)
Y2 (s)
; H2 (s) =
; Y (s) = Y1 (s) Y2 (s)
R(s)
R(s)
Y (s)
= H1 (s) H2 (s)
R(s)
n
X
(Hj (s))
j=1
If E(s) is eliminated between the previous two relations, the overall transfer function will
be:
41
H(s) =
Y (s)
Hd (s)
=
R(s)
1 Hd (s) Hr (s)
Note that in the relation above the sign is + for negative feedback and for positive
feedback.
Example 2.8.1 Consider a system represented by the block diagram shown in Figure 2.23.
Determine the closed-loop transfer function H(s) = Y (s)/R(s).
(2.80)
and the two summing points can be reduced to a single one, as shown in Figure 2.24 (right)
10
s+5
10
1 + s+5
42
10
s + 55
(2.81)
This resulting block, is in a series connection with 1/s and the equivalent of these two is the
product Gin /s. The new block diagram is presented in Figure 2.25.
Note that the feedback path has a transfer function equal to 1, therefore it is a unity feedback
loop. The equivalent transfer function from the input R(s) to the output Y (s) is calculated as
follows:
10
Gin (s) 1s
10
Y (s)
s(s+55)
H(s) =
= 2
=
=
(2.82)
1
10
R(s)
s
+
55s
+ 10
1 + Gin (s) s 1
1 + s(s+55)
Diagram transformations
1. Point behind a block - Figure 2.26
X3
X1
X3
X1
G
X2
X2
X2
X1
X2
X2
X2
X1
X2
X1
X2
1/G
43
X1
X3
X1
X2
X3
G
1/G
X2
2.8.2
If a system has more than one input, than the output can be considered a result of all effects of
these signals.
Consider the system shown in Figure 2.30 a). Since all linear systems satisfy the principle of
superposition, the total output of the system is the algebraic sum (superposition) of the outputs
due to each of the inputs. In a general case, all inputs except one are set equal to zero, and then
the output due to the non-zero input is determined.
For the system considered above, a transfer function relating each input and the output can
be calculated, when the other input is considered zero (Figure 2.30 b)).
Y (s) = R1 (s) H01 (s)|R2 (s)=0 + R2 (s) H02 (s)|R1 (s)=0
The block diagram from Figure 2.30 will be re-arranged for each non-zero input.
When R2 = 0 (see Figure 2.31) the equivalent transfer function between R1 (s) and its effect,
or output, Y1 (s) is:
H01 (s) =
H1 (s)H2 (s)
and the output: Y1 (s) = H01 (s)R1 (s)
1 + H1 (s)H2 (s)H3 (s)
When R1 = 0 (see Figure 2.32) the equivalent transfer function between R2 (s) and the
output Y2 (s) is:
H02 (s) =
H2 (s)
and the output: Y2 (s) = H02 (s)R2 (s)
1 + H1 (s)H2 (s)H3 (s)
Thus, the output of the system shown in Figure 2.30 is given by:
Y (s) =
H1 H2
H2
R1 (s) +
R2 (s)
1 + H1 H2 H3
1 + H1 H2 H3
44
2.8.3
In case of connecting linear MIMO systems, we can use transfer matrices instead of transfer
functions, obeying the rules of matrix calculus.
Y(s)
Y1(s)
R(s)
H1(s)
H2(s)
R2(s)
Y1(s)
H1(s)
R(s)
Y(s)
H2(s)
R(s)
Y2(s)
Y(s)
E(s)
Hd(s)
Hr(s)
For example consider the three basic connections shown in Figure 2.33.
1. Series connection.
Y1 = H1 R; Y = H2 R2 ; R2 = Y1 ; Y = H2 H1 R
The equivalent transfer matrix will be:
H = H2 H1
For n linear systems connected in series, the equivalent transfer matrix is:
H=
1
Y
Hj
j=n
2. Parallel connection.
Y1 = H1 R; Y2 = H2 R; Y = Y1 Y2
The equivalent transfer matrix will be:
H = H1 H2
45
3. Feedback connection.
E = R Hr Y; Y = Hd E; Y = Hd (R Hr Y)
(1 Hd Hr ) Y = Hd R; Y = (1 Hd Hr )1 Hd R
The equivalent transfer matrix will be:
H = (1 Hd Hr )1 Hd
2.8.3.1
The matrix-form state equations express the derivatives of the state-variables in terms of the
states themselves and the inputs. In this form, the state vector is expressed as the direct result
of a vector integration.
The block diagram representation is shown in Figure 2.34 where a vector signal is represented
by a thick arrow (). This general block diagram shows the matrix operations from input to
output in terms of the A, B, C, D matrices, but does not show the path of individual variables.
In state-determined systems, the state variables may always be taken as the outputs of integrator
blocks. The derivatives of the state variables are the inputs to the integrator blocks, and each
state equation expresses a derivative as a sum of weighted state variables and inputs.
46
Bibliography
Dorf, R. C. and Bishop, R. H. (2008). Modern Control Systems. Pearson Prentice Hall, 11th
edition.
Dutton, K., Thompson, S., and Barraclough, B. (1997). The Art of Control Engineering.
Addison-Wesley.
Mei, C. (2002). On teaching the simplification of block diagrams. International Journal of
Engineering Education, 18(6):697703.
Nise, N. S. (2004). Control Systems Engineering. Wiley, 4th edition.
Xie, Y. (2009). Maglev demonstration. web: web.mit.edu/2.737/www/MagLev/.
47
Contents
3 Analysis of linear continuous systems
3.1
3.2
3.3
System response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1.1
3.1.2
First-order systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2.1
3.2.2
3.2.3
3.2.4
Second-order systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.1
3.4
3.5
Steady-state error
. . . . . . . . . . . . . . . 14
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.5.1
3.5.2
3.5.3
3.6
3.7
3.8
3.9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Chapter 3
System response
The first step in analyzing a control system was to derive a mathematical model of the process. Once such
a model is obtained, various methods are available for the analysis of system performance.
In analyzing and designing control systems we must have a basis for performance comparison of various
control systems. This basis may be set up by specifying particular test input signals and by comparing the
responses of various systems to these signals. The use of test signals can be justified because of a correlation
existing between the response characteristics of a system to a typical test input signal and the capability of
the system to cope with the actual input signal.
The aim of analysis is the study of systems behavior in transient and steady-state when the model of
the system and the input signals are known, (Dorf and Bishop, 2008), (Ogata, 2002).
In the following we will consider systems described by transfer functions H(s) with one known input
signal r(t). The output c(t) will be computed from:
c(t) = L1 [H(s)R(s)]
3.1.1
The commonly used test input signals are those of step functions, ramp functions, impulse functions, sinusoidal functions and the like. With these test signals, mathematical and experimental analysis of control
systems can be carried out easily since the signals are very simple functions of time.
If the input of a control system are gradually changing functions of time, then a ramp function of time
may be a good test signal. Similarly, if a system is subjected to sudden disturbances a step function may be
a good test signal, and for a system subjected to shock inputs, an impulse function may be a test. Once a
control system is designed on the basis of test signals, the performance of the system in response to actual
inputs is generally satisfactory, (Ogata, 2002).
The use of such test signals enables one to compare the performance of all systems on the same basis.
3.1.2
The time response of a system consists of two parts: the transient and the steady-state response, as
shown in Figure 3.1. By transient response we mean that which goes from the initial to the final state. By
steady-state response we mean the manner in which the system output behaves as t approaches infinity.
In designing a control system, we must be able to predict the dynamic behavior of the system from a
knowledge of the components.
2
Usually the system is decomposed in simple elements of at most second order, that simplifies the method
of analysis and also we can know the contribution of each element to the system behavior.
The behavior of simple systems can be studied using some characteristic parameters:
Time constant, T
Time delay constant, Tm
Damping factor
Natural frequency n
Gain constant, K
The main steps in system analysis are:
Write the equation or system of equations that define the relationship between the input and output
signals. In the case of linear systems, these are differential equations.
Determine the transfer function or transfer matrix and identify the system parameters: gain factors,
damping factors, natural frequencies, time constants etc.
Determine the output signal for a test input signal (step, ramp, impulse, sine etc.)
Graphical or analytical study of each element behavior emphasizing the influence of system parameters.
3.2
First-order systems
Physically, this system may represent an RC circuit, a thermal system, or the like. The input-output
model, or the transfer function, is given by:
H(s) =
C(s)
K
=
R(s)
Ts + 1
3
(3.1)
In equation (3.1), the constant K is the gain, and the coefficient of s in the first-order polynomial in the
denominator, T , is the time constant. In this section, the time constant T is a positive real number.
Example 3.2.1 Electrical system. Consider the RC circuit shown in Figure 3.3. The differential equation
dVout (t)
dt
and we obtain:
dVout (t)
+ Vout (t)
dt
If we apply the Laplace transform to this equation, when all the initial conditions are zero, the transfer
function is:
1
Vout (s)
=
H(s) =
Vin (s)
RCs + 1
Vin (t) = RC
Example 3.2.2 Mechanical system. Consider the mechanical system shown in Figure 3.4, where m is the
mass of the car, u(t) is an external force (the input signal), y(t) is the velocity of the car (the output signal)
and b is the friction coefficient.
dy(t)
dy(t)
= u(t) by(t) or m
+ by(t) = u(t)
dt
dt
If we apply the Laplace transform, considering the initial conditions to be zero, the transfer function
results as:
Y (s)
1
H(s) =
=
U (s)
ms + b
4
The gain and time constant of the transfer function obtained above can be determined by dividing the denominator by b. Thus:
H(s) =
1
b
m
bs
+1
3.2.1
Since the Laplace transform of the unit step function is 1/s, substituting R(s) = 1/s into equation (3.1), we
obtain:
K 1
C(s) =
Ts + 1 s
Expanding C(s) into partial fraction gives:
1
T
C(s) = K
s Ts + 1
Taking the inverse Laplace transform, we obtain the system response as:
t/T
c(t) = K 1 e
, (t 0)
(3.2)
The exponential response curve c(t) given by equation (3.2) is shown in Figure 3.5.
Equation (3.2) states that initially the output c(t) is zero and finally approaches K. One important
characteristic of such an exponential response curve c(t) is that at t = T the value of c(t) is 0.632K, or the
response has reached 63.2% of its total change. This may be easily seen by substituting t = T in c(t). That
is:
c(T ) = K(1 e1 ) = K(1 0.368) = 0.632K
5
In one time constant, the exponential response curve has gone from 0 to 63.2% of the final value. For
t 4T the response remains within 2% of the final value. As seen from equation (3.2), the steady-state
is reached mathematically only after an infinite time. In practice, however, a reasonable estimate of the
response time is the length of time the response curve needs to reach the 2% line of the final value, or four
time constants. This can be seen by substituting t = 4T in c(t) given by relation (3.2):
c(4T ) = K(1 e4T /T ) = K(1 e4 ) = K(1 0.018) = 0.982K
The time required for the output to reach 98% from its final value (and to remain within 2% of its final
value) is called the settling time. For a first-order system it is equal to 4 time constants:
ts = 4T
Another important characteristic of the exponential response curve is that the slope of the tangent at
t = 0 is K/T , since:
K
K
dc(t)
= et/T |t=0 =
(3.3)
dt
T
T
If the line crossing the origin and having this initial slope is extended until it intersects the steady-state
asymptote (see Figure 3.5), the intersection will occur exactly at one time constant t = T .
From equation (3.3) we see that the slope of the response curve c(t) decreases monotonically from K/T
at t = 0 to zero at t = .
Notice that the smaller the time constant T , the faster the system response (see Figure 3.6).
c(t)
0.8
T=1
T=2
T=3
T=4
T=5
0.6
0.4
0.2
0
0
10
15
t (sec)
20
25
30
Figure 3.6: First-order system step response for various time constants
3.2.2
Since the Laplace transform of the unit ramp function is 1/s2 , we obtain the output of the system of Figure
3.2 as:
K 1
C(s) =
T s + 1 s2
Expanding C(s) into partial fraction gives
C(s) = K
T
T2
1
+
s2
s
Ts + 1
(3.4)
A plot of the unit ramp response of a general first-order system is shown in Figure 3.7.
When time approaches infinity t , the exponential term in (3.4) will approach 0 and the system
response will follow asymptotically a line with the equation:
c(t) = K (t T )
In practice, the steady-state of the system response occurs also at 4 time constants, similar to the step
response of the first-order system, because at this moment of time the exponential term is sufficiently close
to zero:
e4T /T = e4 = 0.0183
thus, the settling time is ts = 4T .
3.2.3
For the unit-impulse input, R(s) = 1 and the output of the system of Figure 3.2 can be obtained as:
C(s) =
or,
c(t) =
K
1
Ts + 1
K t/T
e
,
T
(t 0)
(3.5)
3.2.4
1
Ts + 1
K
= K H(s)
Ts + 1
7
When the input is a unit step R(s) = 1/s, the step response for the first system is:
c(t) = L1 [H(s)R(s)] = L1 [
and
ck (t) = L1 [Hk (s) R(s)] = L1 [
H(s)
]
s
K H(s)
H(s)
] = K L1 [
] = K c(t)
s
s
(3.6)
(3.7)
K
s+1
The system has a time constant T = 1 and the settling time: ts = 4T = 4sec, for any value of K. The system
responses for a unit step input and values of K = 1, 2, 3, 4 are illustrated in Figure 3.9. The steady-state
value of the output, for a unit step input is K.
4
K=1
K=2
K=3
K=4
0
0
3
t (sec)
3.3
Second-order systems
Consider the second-order system shown in Figure 3.10 where the system transfer function is written in the
R(s)
C(s)
H(s)
C(s)
=
R(s)
1
1 2
2s
n
2
n s
+1
n2
s2 + 2n s + n2
(3.8)
The system gain is 1, but any other value of the gain will change only the magnitude of the system response,
as discussed in section 3.2.4.
All coefficients of the polynomial in the denominator are positive. The special case when some of them
have negative values will be discussed in the section presenting the problem of system stability.
The dynamic behavior of the second-order system can be described in terms of two parameters: the
natural frequency n , and the damping factor .
Example 3.3.1 Consider the system with the transfer function:
H(s) =
1
s2 + s + 1
The natural frequency and the damping factor are calculated from:
1
= 1;
n2
2
= 1;
n
n = 1; =
1
2
2 1
3.3.1
C(s)
n2
= 2
R(s)
s + 2n s + n2
and consider the input r(t) = 1, (t 0) a unit step. Then R(s) = 1/s and the system response is:
C(s) =
n2
s(s2 + 2n s + n2 )
s + 2n
1
s + n
n
1
s s2 + 2n s + n2
s (s + n )2 + d2 (s + n )2 + d2
(3.9)
= en t cos d t
(s + n )2 + d2
d
1
= en t sind t
(s + n )2 + d2
Hence, the inverse Laplace transform of equation (3.9) is obtained as:
#
"
1
n t
[C(s)] = c(t) = 1 e
sin d t
cos d t + p
1 2
en t
c(t) = 1 p
sin d t + arctan
1 2
!
p
1 2
, (t 0)
(3.10)
From
p equation (3.10), the frequency of transient oscillation is the damped natural frequency d =
n 1 2 and thus varies with the damping ratio and the natural frequency n . Since for the
underdamped case is positive and smaller than 1, the frequency of oscillations is mainly influenced
by n . See for example the step responses of second-order systems for various values of n when is
kept constant, illustrated in Figure 3.11. Notice also that a variable n does not change the maximum
value of the system output.
The step responses of second order systems when n is constant and takes various values between 0
and 1 is presented in Figure 3.12. The frequency of oscillations is slightly changed by the variable ,
but the maximum value of the system response depends on the damping factor.
2. Undamped case ( = 0). If the damping ratio is equal to zero, the response is undamped and
oscillations continue indefinitely. The transfer function is:
H(s) =
n2
s2 + n2
and it has two complex poles on the imaginary axis s1,2 = n j. The response c(t) for the zero
damping case may be obtained by substituting = 0 in equation (3.9), yielding:
C(s) =
n2
1
s
= 2
2
2
s(s + n )
s s + n2
1.4
1.2
1
0.8
0.6
n=1
n=2
0.4
=3
n
0.2
n=7
0
0
6
t (sec)
10
12
Figure 3.11: Step response of an underdamped second order system for various values of n
1.8
=0.1
=0.2
=0.5
=0.7
=0.9
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0
10
t (sec)
12
14
16
18
20
Figure 3.12: Step response of an underdamped second order system for various values of
c(t) = 1 cos n t, (t 0)
(3.11)
Thus, from equation (3.11) we see that n is the undamped natural frequency of the system. That is,
n is that frequency at which the system would oscillate if the damping were decreased to zero.
The step responses of three undamped second-order systems ( = 0) for various values of the natural
frequency n are illustrated in Figure 3.13.
2
1.5
1
n=1
0.5
n=2
n=3
0
0
6
t (sec)
10
12
Figure 3.13: Step response of an undamped second order system for various values of n
3. Critically damped case, ( = 1)
If = 1 the transfer function of the second-order system is:
H(s) =
s2
n2
n2
=
2
+ 2n s + n
(s + n )2
The system poles are real and equal: s1 = s2 = n and the system is critically damped.
11
For a unit step input R(s) = 1/s, the output C(s) can be written as:
C(s) =
n2
(s + n )2 s
(3.12)
, (t 0)
(3.13)
The step response of a critically damped system ( = 1) is shown in Figure 3.14 for various values of
n .
1
0.8
n=1
0.6
n=2
0.4
n=3
0.2
0
0
4
t (sec)
Figure 3.14: Step response of critically damped second order system for various values of n
4. Overdamped case, ( > 1)
In this case, the two poles of H(s) = C(s)/R(s) are negative real and unequal:
p
s1,2 = n n 2 1
n2
s(s s1 )(s s2 )
(3.14)
n2 1
n2
1
n2
1
+
s1 s2 s s1 (s1 s2 ) s s1 s2 (s1 s2 ) s s2
s1 s2 = (n + n
and:
s1 s2 = n + n
2 1)(n n
2 1 + n + n
2 1) = n2
2 1 = 2n
2 1
1
n
1
1
C(s) = + p
s 2 2 1 s1 (s s1 ) s2 (s s2 )
Taking the inverse Laplace transform, the system output c(t) is:
s1 t
n
e
es2 t
c(t) = 1 + p
(3.15)
s2
2 2 1 s1
p
p
where s1 = n ( 2 1) and s2 = n ( + 2 1) are the system poles having negative real
values. Thus, the response c(t) includes two decaying exponential terms.
The step response of an overdamped second order system is illustrated in Figure 3.15 for various valued
of the damping factor .
12
1
0.8
0.6
0.4
=2
=4
=6
=8
0.2
0
0
10
15
t (sec)
20
25
30
Figure 3.15: Step response of an overdamped second order system for various values of
All cases presented above for a second-order system are summarized in Figure 3.16 for various values of
the damping ratio , when the natural frequency is constant n = 1.
2
=0
=0.1
=0.5
=0.7
=1
=2
=3
1.8
1.6
1.4
0.6
0.4
0.2
imag
1.2
0.8
0.8
0.2
0.6
0.4
0.4
0.6
0.2
0.8
10
t (sec)
15
1
6
20
=0
=0.1
=0.5
=0.7
=1
=2
=3
3
real
Figure 3.16: Step response of a second-order system Figure 3.17: Poles of a second-order system for various
values of damping ratio
for various values of damping ratio
As decreases, the system poles approach the imaginary axis (see Figure 3.17) and the response becomes
increasingly oscillatory.
3.4
In many practical cases, the desired performance characteristics of control systems are specified in terms of
time-domain quantities. The following transient response characteristics to a unit step input are commonly
used:
1. Rise time
2. Peak time
3. Maximum overshoot
4. Settling time
13
These specifications are defined in what follows and are shown graphically in Figure 3.18.
1. Rise time, tr : the time required for the response to rise from 10% to 90%, or 0% to 100% of its final
value. For underdamped systems the 0% to 100% rise time is normally used. For overdamped systems,
the 10% to 90% rise time is commonly used.
2. Peak time, tp : the time required for the response to reach the first, or maximum, peak. The peak
time is not defined for overdamped systems.
3. Maximum overshoot Mp : the maximum peak value of the response curve measured from the steadystate value of the response. Very often the overshoot is expressed as percentage of the steady-state
value (percent overshoot, Mp% ) and computed from:
Mp% =
c(tp ) c()
100%
c()
3.4.1
In the following we shall obtain the rise time, peak time, maximum overshoot and settling time of the step
response of an underdamped second-order system. The values will be obtained in terms of and n .
1. Rise time, tr . Referring to equation (3.10) we obtain the rise time tr by letting c(tr ) = 1 or
!
p
en tr
1 2
c(tr ) = 1 p
sin d tr + arctan
=1
1 2
14
Since en tr 6= 0, we obtain:
or
!
p
1 2
=0
sin d tr + arctan
p
1 2
= k, k Z
d tr + arctan
(3.16)
where = arctan
1 2
pis
!
p
1 2
arctan
=
(3.17)
are s1,2 = n jn 1p 2 . The real part of the poles is negative and equal to n and the
imaginary part is d = n 1 2 , as presented in Figure 3.19. The angle is the angle between the
negative real axis and the line that connects the pole s1 to the origin.
2. Peak time, tp . From equation (3.10) we may obtain the peak time by differentiating c(t) with respect
to time and letting the derivative equal zero (the peak time is the time of the first maximum). The
output signal c(t) is:
en t
c(t) = 1 p
sin (d t + )
1 2
2
1
where = arctan , as shown in Figure 3.19. Notice also, from the same figure that: cos =
p
and sin = 1 2 .
dc(t)
n en t
en t
= p
sin (d t + ) p
d cos (d t + )
dt
1 2
1 2
en t
p
dc(t)
n en t
n
= p
sin (d t + ) 1 2 cos (d t + ) = p
sin(d t + )
2
dt
1
1 2
15
sin(d tp ) = 0
or
d tp = k, k = 0, 1, 2, ...
Since the peak time corresponds to the first peak overshoot, d tp = . Hence
tp =
(3.18)
The peak time corresponds to one half cycle of the frequency of damped oscillation.
3. Maximum overshoot, Mp , occurs at the peak time or at t = tp = d . The steady-state value of the
output is c() = 1. Thus, from equation (3.10) the value of the maximum overshoot Mp is obtained
as the difference between the maximum value and the steady-state value of the output:
or
en /d
Mp = c(tp ) c() = c(tp ) 1 = p
sin(d /d + )
1 2
2
2
2
e/ 1
e/ 1
e/ 1 p
Mp = p
sin( + ) = p
( sin ) = p
1 2
1 2
1 2
1 2
2
Mp = e/ 1
For a second-order system having the gain 1 and a unit step input, the percent overshoot is:
Mp% =
c(tp ) c()
c(tp ) 1
2
100% =
100% = e/ 1 100%
c()
1
(3.19)
The overshoot is a function only of the damping ratio and the relationship between them is shown
in Figure 3.20. As illustrated in the figure, the percent overshoot decreases as the damping ratio
increases.
100
Mp (%)
80
60
40
20
0
0
0.2
0.4
0.6
0.8
16
4. Settling time, ts . For an underdamped second-order system, the transient response is obtained from
equation (3.10):
en t
c(t) = 1 p
sin (d t + )
(3.20)
1 2
p
The curves c1,2 (t) = en t / 1 2 are the envelope curves of the transient response for a unit-step
input. The response curve c(t) always remains within a pair of the envelope curves as shown in Figure
3.21. The time it takes the decaying sinusoid in relation (3.20) to reach 2% of its steady-state value is
Figure 3.21: Step response of an underdamped second-order system and the envelope curves
the settling time. It is the time when the envelope curves reach 0.02, or:
Then:
en ts
p
= 0.02
1 2
p
ln 0.02 1 2
ts =
n
p
As varies between 0 and 0.9, the expression ln 0.02 1 2 varies between 3.9 and 4.7, (Nise,
2004). Then, a common approximation of the settling time is:
ts =
4
n
Example 3.4.1 Consider the closed-loop system with the transfer function:
H(s) =
s2
25
+ 6s + 25
n2
s2 + 2n + n2
= 0.6
Then we obtain:
17
(3.21)
s1,2 = n
1 2 j = 3 4j
2. The damped natural frequency (the imaginary part of the poles) is:
p
p
d = n 1 2 = 5 1 0.62 = 4
and the poles negative real part:
n = 3.
According to Figure 3.19, the angle is:
= arctan
3. The rise time is:
tr =
3.14 0.93
=
= 0.55 (sec)
d
4
d
= 0.93 (rad)
n
3.14
=
= 0.78 (sec)
d
4
2
Mp = e/ 1 = 0.095
4
4
4
=
= = 1.33sec
n
3
In Figure 3.22 is shown the step response of the system. The values of the system parameters can be seen
also from the plot.
Step Response
1.4
1.2
Mp
Amplitude
0.8
0.6
0.4
0.2
0
0
tr
0.2
0.4
tp
0.6
ts
0.8
1.2
Time (sec)
18
1.4
1.6
1.8
3.5
3.5.1
Steady-state error
Introduction. The final value theorem
One of the objectives of most control systems is that the system output response follows a specific reference
signal accurately in the steady state. If the output of a system at steady state does not exactly agree with
the input, the difference between the reference signal and the output in the steady state is defined as the
steady-state error, (Burns, 2001). This error is indicative of the accuracy of the system. Errors in control
systems can be attributed to many factors, for example because of friction and other imperfections, or the
natural structure of the system, (Burns, 2001; Ogata, 2002).
The steady-state error can be computed only for systems that have a steady state, i.e. are stable.
Stability analysis of linear continuous systems will be presented in 3.10, but consider a stable system one
that has all poles with negative real parts, or located in the left half s-plane.
Example 3.5.1 The unit step response of three systems is presented in Figure 3.23, together with the step
input (green). The difference between the prescribed input signal (unit step) and the the output at steady
state is the steady-state error.
Step Response
2.5
ess3
Amplitude
1.5
ess2
1
ess1
0.5
0
0
Time (sec)
For a system having the input r(t) and the output c(t), the error signal is:
e(t) = r(t) c(t)
and the steady-state value of the error, ess is:
The Laplace transform of the error signal for the system shown in Figure 3.24 is:
E(s) = R(s) C(s) = R(s) G0 (s)R(s) = (1 G0 (s))R(s)
The final value theorem states that:
19
s0
3.5.2
For unity feedback systems, the steady-state error can be calculated from the closed-loop transfer function
G0 (s) or the open-loop transfer function G(s) (see Figure 3.25), where:
G0 (s) =
G(s)
1 + G(s)
G(s)
1
1 + G(s)
R(s) =
1
R(s)
1 + G(s)
To calculate the steady-state error, we utilize the final value theorem, which is:
lim e(t) = lim sE(s)
s0
20
ess = lim s
s0
1
R(s)
1 + G(s)
Example 3.5.2 The advantage of the closed-loop system in reducing the steady-state error of the system
resulting from parameter changes and calibration errors may be illustrated by an example, (Dorf and Bishop,
2008). Let us consider a system with a process transfer function
G(s) =
k
Ts + 1
which would represent a thermal control process, a voltage regulator, or a water-level control process. For
a specific setting of the desired input variable, which may be represented by the normalized unit step input
function, we have R(s) = 1/s.
For the closed-loop system of Figure 3.25, the steady-state error is:
ess = lim s
s0
1
1
1
1
1
=
=
=
k
1 + G(s) s
1 + G(0)
1
+
k
1 + T 0+1
For the closed-loop system a large gain k, for example k = 100, will reduce the steady-state error to a
small value. In this case the closed-loop system steady-state error is ess = 1/101.
3.5.3
Consider a unity feedback closed-loop control system (Figure 3.26) with the open-loop transfer function:
Q
k M
i=1 (s + zi )
G(s) =
Q
sN Q
j=1 (s + pj )
The transfer function G(s) involves the term sN in the denominator, that represents a pole of multiplicity
N at the origin. The zeros of the transfer function: zi , i = 1, M and the poles: pj , j = 1, Q can be real
or complex conjugate numbers.
We define the system type to be the value of N in the denominator, or, equivalently, the number of
pure integrations in the forward path. A system with no poles at the origin, or N = 0 is a Type 0 system,
a system having one pole at the origin, or N = 1, is a Type 1 system, a system with N = 2 is a Type 2
system, etc.
The steady state error may be calculated according to:
ess = lim sR(s)
s0
1
1 + G(s)
where R(s) is the system input. For typical test inputs, the steady-state error can be written in terms of
static error constants. In this chapter, only the unit step and unit ramp inputs will be considered.
21
Step input. When R(s) = 1/s, the steady-state error for a unit step input is:
ess = lim s
s0
1
1
1
1
1
= lim
=
=
s 1 + G(s) s0 1 + G(s)
1 + lims0 G(s)
1 + Kp
The steady-state error and the static error constants depend upon the type-number N .
Type 0 system: N = 0. The steady-state error for a unit step input is:
1
= lim
s0 1 + G(s)
s0
ess = lim
1
QM
(s + zi )
k
1 + QQi=1
j=1 (s + pj )
1
QM
zi
k
1 + QQi=1
j=1 pj
= constant
Q
Q
k M
k M
zi
i=1 (s + zi )
= QQi=1 = constant
Kp = lim G(s) = lim QQ
s0
s0
j=1 (s + pj )
j=1 pj
Type 1 or higher: N 1. The steady-state error for a unit step input is:
Q
sN Q
1
1
j=1 (s + pj )
=0
ess = lim
= lim
= lim
QM
QM
Q
Q
s0 1 + G(s)
s0
s0 sN
k i=1 (s + zi )
(s
+
p
)
+
k
(s
+
z
)
j
i
i=1
j=1
1+
Q
sN Q
(s
+
p
)
j
j=1
and the static position error constant is:
s0 sN
s0
QM
i=1 (s
+ zi )
j=1 (s
+ pj )
Ramp input. When R(s) = 1/s2 , the steady-state error for a ramp input is:
1
1
1
1
= lim
=
=
s0 s(1 + G(s))
s0 sG(s)
lims0 sG(s)
Kv
ess = lim
s0
1
1
= lim
=
Q
sG(s) s0 k M
i=1 (s + zi )
s QQ
j=1 (s + pj )
Q
k M
(s + zi )
Kv = lim sG(s) = lim s QQi=1
=0
s0
s0
j=1 (s + pj )
22
QQ
1
1
j=1 pj
= lim
= lim
= constant
= QM
QM
s0 sG(s)
s0 k
k i=1 zi
i=1 (s + zi )
s QQ
s j=1 (s + pj )
QM
(s + zi )
lim s QQi=1
s0 s
j=1 (s + pj )
Q
k M
zi
= QQi=1 = constant
j=1 pj
Q
sN 1 Q
j=1 (s + pj )
=
= lim
= lim
=0
QM
QM
s0
lims0 sG(s) s0 k i=1 (s + zi )
k i=1 (s + zi )
s QQ
sN j=1 (s + pj )
1
QM
(s + zi )
lim s Qi=1
Q
s0 sN
j=1 (s + pj )
Step input
Type 0, N = 0
Kp = const, ess
Type 1, N = 1
Type 2 or higher, N 2
QM
i=1 (s + zi )
=
Q
Q
s0 sN 1
(s
+
p
)
j
j=1
= lim
1
=
1 + Kp
Kp = , ess = 0
Kp = , ess = 0
Ramp input
Kv = 0, ess =
1
Kv
=0
Kv = const, ess =
Kv = , ess
Example 3.5.3 Consider a unity negative feedback closed-loop system with the open-loop transfer function
G(s) =
2
s(s + 10)
Evaluate system type, static error constants Kp , Kv and the steady-state errors for a unit step and a
ramp input.
The open-loop system G(s) has one pole at the origin, therefore it is a Type 1 system.
23
For a unit step input, compute the static position error constant:
Kp = lim G(s) = lim
s0
s0
2
=
s(s + 10)
1
=0
1 + Kp
For a unit ramp input compute the static velocity error constant
Kv = lim sG(s) = lim s
s0
s0
2
2
1
= lim
=
s(s + 10) s0 s + 10
5
3.6
1
=5
Kv
Although the stability of linear continuous systems will be presented in a following section 3.10, consider a
system with the transfer function H(s) and all poles having negative real parts, or located in the left half
s-plane.
The static gain or the DC gain of the system is the ratio of the steady-state output of the system to
its steady-state input.
Example 3.6.1 Consider two systems having the transfer functions H1 (s) and H2 (s) and the systems response for a unit step input shown in Figure 3.28.
input
output of H (s)
output of H (s)
2
0.8
0.6
0.4
0.2
10
t (sec)
15
20
4.5
input
output of H (s)
output of H2(s)
3.5
3
2.5
2
1.5
1
0.5
0
10
t (sec)
15
20
The steady-state value of the output can be computed using the final value theorem:
1
c() = lim c(t) = lim sC(s) = lim sH(s) = lim H(s)
t
s0
s0
s s0
and the DC gain is:
DCgain =
c()
= lim H(s)
s0
1
For any constant (step) input r(t) = A, the output is given by:
C(s) = H(s)
A
s
s0
s0
A
= A lim H(s)
s0
s
c()
= lim H(s)
s0
A
25
s + 10
(s + 2)(s + 4)(s2 + s + 5)
If a unit step input is applied to this system, the steady-state value of the output will be:
c() = DCgain = 0.25
If the input is a constant signal r(t) = 5, the steady-state value of the output is:
c() = 0.25 5 = 1.25
3.7
Consider a system with the transfer function H(s), a unit step input R(s) = 1/s and the output C(s).
[C(s)] =
H(s)
s
Now suppose we add a zero at a and divide the transfer function with a so the DC gain (or the steady-state
value) of the new system is unchanged. The new transfer function is:
Hz (s) =
s+a
s
H(s) = H(s) + H(s)
a
a
If a is small, or the zero is close to the imaginary axis, 1/a is large and the step response of Hz (s) will
increase with the quantity 1/a c(t).
System 2: H2 (s) =
26
s2
1
+s+1
s2
s+1
+s+1
1.4
1.2
1
0.8
step response of H1
step response of H
0.6
0.4
0.2
0
6
t (sec)
10
12
0.1(s + 10)
s2 + s + 1
0.8
step response of H
0.6
step response of H
0.4
0.2
0
6
t (sec)
10
12
in the total response is small and the step response of the system with a zero at 10 resembles the step
response of the original system.
3.8
Consider a system with unit step input R(s) = 1/s an output C(s) and the transfer function H(s). Then
C(s) can be written:
am sm + ... + a1 s + a0
C(s) = H(s) R(s) =
, (m n)
(3.22)
s(bn sn + ... + b1 s + b0 )
The transient response of this system to any given input can be obtained by computer simulation. If an
analytical expression for the transient response is desired then it is necessary to factor the denominator
27
polynomial. The poles of C(s) consist of real poles and complex conjugates poles. A pair of complexconjugates poles yields a second order term in s. Since the factored form of the higher-order characteristic
equation consists of first- and second-order terms, equation (3.22) can be rewritten, (Ogata, 2002):
Q
K m
(s + zi )
Q
Qi=1
C(s) =
s qj=1 (s + pj ) rk=1 (s2 + 2k k s + k2 )
where q + 2r = n. If the poles are distinct C(s) can be expanded into partial fractions as follows:
q
q
r b (s + ) + c
1 k2
X
X
k
k
k
k
k
a
aj
C(s) = +
+
s
s + pj
s2 + 2k k s + k2
j=1
k=1
From this last equation we see that the response of a higher-order system is composed of a number of terms
involving the simple functions found in the responses of first- and second-order systems. The unit-step
response c(t), the inverse Laplace transform of C(s) is then, (Ogata, 2002):
c(t) = a +
q
X
aj epj t +
j=1
r
X
bk ek k t cosk
k=1
1 k2 t +
r
X
ck ek k t sink
k=1
1 k2 t
(3.23)
If all the poles lie in the left-half s-plane, then the exponential terms and the damped exponential terms
will approach zero as time increases. The steady-state value of the output is c() = a.
Let us assume that the system considered is a stable one. Then the poles that are located far from the
j (imaginary) axis have large negative real parts. The exponential terms that correspond to these poles
decay very rapidly to zero.
The poles located nearest the j axis correspond to transient response terms that decay slowly. Those
poles that have dominant effects on the transient-response behavior are called dominant poles.
Example 3.8.1 A real pole located at 1 will contribute to the total response of a system (3.23) with a
(weighted) exponential et , and a pole at 10 will contribute with an exponential e10t . A complex pole
having the real part 1 and the imaginary part 20 gives a term of the type et sin 20t and a complex pole
with the real part 10 and the same imaginary part gives e10t sin 20t. As presented in Figure 3.34, if the
absolute value of the real part of the pole is large, the exponential approaches zero fast and its contribution in
the system response vanishes quickly. These poles are located far from the imaginary axis. When the absolute
value of the real part of the pole is smaller, or the pole is located near the imaginary axis, the corresponding
exponential term decays slowly to zero and has a significant contribution to the system output.
1
et sin(20t)
e10t sin(20t)
t
e
e10t
0.5
0.5
1
0
0.5
1.5
t (sec)
28
2.5
3.8.1
k(s + a)
( 12 s2 +
n
2
n s
+ 1)(T s + 1)
p
It has a zero at z1 = a and three poles: two complex poles p1,2 = n jn 1 2 and one real pole
at p3 = 1/T . If, for example, the real pole is far from the j axis and the complex poles are dominant,
the system order can be reduced by neglecting the real pole. Because the steady-state value of the system
response to test inputs must remain the same, the gain factor must be multiplied by the absolute value of
the time constant or 1/pole (divided by the absolute value of the pole).
Example 3.8.2 Consider a third-order system with the transfer function:
H1 (s) =
(s2
s+2
+ 2s + 2)(s + 10)
The system poles are: p1 , 2 = 1 j and p3 = 10. Because the real pole is located 10 times far from the
imaginary axis than the complex poles, p3 can be neglected. The system gain will be divided by |p3 | = 10 and
obtain:
0.1(s + 2)
H2 (s) = 2
s + 2s + 2
The step responses obtained for the two systems are almost the same, as shown in Figure 3.35.
0.12
0.1
step response of H1
0.08
step response of H
0.06
0.04
0.02
3
t (sec)
(s2
62.5(s + 2.5)
+ 6s + 25)(s + 6.25)
The system poles are: p1 , 2 = 3 4 j and p3 = 6.25. The gain is equal to 1 and the steady state value
for a step input must be maintained. As an approximation we neglect the real pole and obtain:
H2 (s) =
10(s + 2.5)
s2 + 6s + 25
Using a computer simulation the step responses of the two systems are shown in Figure 3.36. The effect of
neglecting the real pole was to increase the overshoot and reduce the settling time. This happened because
the real pole was not very far from the complex poles and cannot be neglected for a good approximation.
29
1.6
1.4
1.2
1
0.8
step response of H
0.6
step response of H2
0.4
0.2
0
0.5
1.5
2.5
t (sec)
3.9
Figure 3.37 shows a thermal system in which hot water is circulated to keep the temperature of a chamber
constant. In this system, the measuring element is placed downstream a distance L from the furnace, the
air velocity is v and = L/v sec would elapse before any change in the furnace temperature was sensed
by the thermometer. Such a delay in measuring, delay in controller action, or delay in actuator operation,
and the like is called time delay, transport lag or dead time. The time delay is present in most process
control systems.
L
thermometer
Furnace
fuel
blower
A time delay is the time interval between the start of an event at one point in a system and its resulting
action at another point in the system.
The input u(t) and the output y(t) of a time delay element are related by
y(t) = u(t )
where is the time delay. The transfer function of pure time delay element is given by:
H(s) =
[u(t )]
U (s)es
=
= es
[u(t)]
U (s)
30
A linear system which exhibits time delay, is defined by the differential equation:
m
X
aj
j=0
dj u(t ) X dj y(t)
=
bj
dtj
dtj
j=0
where u(t) is the input signal, y(t) is the output, and the time delay. The Laplace transform of the
differential equation which describes the system will give:
s
m
X
aj s [u(t)] =
j=0
n
X
bj sj [y(t)]
j=0
H(s) = e
Pm
Pj=0
n
aj sj
j=0 bj
es = 1 s +
sj
= es
Y (s)
U (s)
1 2 2
1
s 3 s3 + ...
2!
3!
1 12 s +
1 + 12 s +
1 2 2
12 s
1 2 2
12 s
3.10
3.10.1
One of the most important characteristics of the dynamic behavior of a system is the stability. For linear
systems the stability is related to the location of the roots of the characteristic equation.
Whether a linear system is stable or unstable is a property of the system itself and does not depend on
the input or driving function of the system. The input contributes only to the steady-state response terms
in the solution.
A system is BIBO stable if for a bounded input it has a bounded output (response).
A bounded input may be, for example, a step signal, or a sinusoidal signal. A ramp or an impulse are
not bounded and cannot be used for stability analysis using this criterion.
Example 3.10.1 , (Dorf and Bishop, 2008). The concept of stability can be illustrated by considering a
right circular cone placed on a plane horizontal surface. If the cone is resting on its base and is tipped
slightly, it returns to its original equilibrium position. This position and response is said to be stable. If the
cone rests on its side and is displaced slightly, it rolls with no tendency to leave the position on its side.
This position is designated as the neutral stability. On the other hand, if the cone is placed on its tip and
released, it falls onto its side. This position is said to be unstable.
31
For a stable system the steady-state value of the impulse response is zero (Figure 3.39 a)):
lim c(t) = 0
For a marginally (critically) stable system the steady-state value of the impulse response is
different from zero, but it is limited, (Figure 3.39 b)):
0 < lim c(t) <
t
For an unstable system the steady-state value of the impulse response is not limited, (Figure 3.39
c)):
lim c(t) =
t
The system poles are either real: pj = j , complex conjugates pk1,2 = k jk , or poles at the origin of
multiplicity N . The output response for an impulse input is then:
c(t) =
q
X
j=1
Aj epj t +
r
X
k=1
32
Bk (
1 k t
)e sink t
k
(3.24)
The location of the poles in the s-plane indicate the system response. The poles in the left-hand portion
of the s-plane result in a decreasing response for disturbance inputs. Similarly, poles on the j axis and in
the right-hand plane result in a neutral and an increasing response, respectively, for an impulse input.
This division of the s-plane is shown in Figure 3.40 where the location of the poles and the corresponding
impulse response are represented with the same color.
Real positive poles (pj ) and complex poles with positive real parts (k ) contribute in the system
response with terms of the type epj t or ek t sink t that increase towards infinity.
Real negative poles (pj ) and complex poles with negative real parts (k ) contribute in the system
response with terms of the type epj t or ek t sink t that approach zero as time approaches infinity.
Complex poles located on the imaginary axis (jk ) give an undamped sinusoidal term in the system
output
One pole at the origin (pj = 0) contributes with a constant term in the system response
Poles at the origin of multiplicity greater than one n > 1 contribute in the system response with terms
of the type Atn1 which increase towards infinity
Complex poles located on the imaginary axis of multiplicity greater than one will give terms in the
system response of the form Atn cos(t + ) which also approach infinity as time approaches infinity.
The last two cases in the list above are not included in Figure 3.40, but the following example shows the
impulse response for systems having double poles on the imaginary axis.
Example 3.10.2 Consider two system with double poles on the imaginary axis, with the transfer functions:
H1 (s) =
1
,
s2
H2 (s) =
1
(s2 + 1)2
H1 has a double pole at the origin and H2 has two pairs of complex poles at j. The impulse responses,
shown in Figure 3.41, increase towards infinity in both cases.
33
60
40
20
0
20
H (s)=1/s2
1
H2(s)=1/(s +1)
40
0
10
20
30
t (sec)
40
50
60
Clearly, to obtain a zero steady-state of the impulse response, all exponentials in (3.24) must approach
zero as time approaches infinity, or, all the poles of the system must be in the left-hand portion of the
s-plane.
A necessary and sufficient condition for a system to be stable is that all the poles of the system transfer
function have negative real parts.
We will call a system not stable if not all the poles are in the left-hand s-plane. If the characteristic
equation has roots on the imaginary axis, with all the other roots in the left-hand plane, the steady-state
output will be sustained oscillations for an impulse input. Such a system is called marginally stable or
critically stable. For an unstable system, the characteristic equation has at least one root in the right-hand
half plane or repeated j (imaginary) roots or multiple poles at the origin; for this case, the output is
unbounded for any input.
To determine the stability of a dynamical system, one could determine the roots of the characteristic
equation.
Example 3.10.3
1
(s + 1)(s + 2)
(s +
1
+ 2s + 2)
1)(s2
is stable because all the poles are located in the left half s-plane: one real negative poles p1 = 1 and
a pair of complex poles p2,3 = 1 j with negative real parts.
A system with the transfer function:
H3 (s) =
1
s(s + 1)
is marginally stable because it has one pole at the origin p1 = 0 while the second pole is negative
p2 = 1.
A system with the transfer function:
1
s2 + 4
is marginally stable because it has a pair of complex poles on the imaginary axis p1,2 = 2j.
H3 (s) =
34
1
(s + 1)(s + 2)(s 1)
is unstable because not all the poles are located on the left half s-plane: one pole is positive p1 = 1 and
the other poles p2 = 1, p3 = 2 are negative. The impulse response will still approach infinity as
time approaches infinity due to the positive pole.
3.10.2
The discussion and determination of stability has occupied the interest of many engineers. In the late
1800s, A. Hurwitz and E.J.Routh published independently a method of investigating the stability of linear
systems. The Routh-Hurwitz stability method provides an answer to the question of stability by considering
the characteristic equation of the system, (Dorf and Bishop, 2008).
The characteristic polynomial in the Laplace variable is written as:
q(s) = an sn + an1 sn1 + ... + a1 s + a0
(3.25)
To analyze the stability of the system, it is necessary to determine whether any one of the roots of q(s)
lies in the right-hand half of the s-plane.
The procedure in the Rouths stability criterion is as follows:
1. Write the polynomial in s in the form (3.25) where the coefficients are real quantities. We assume that
a0 6= 0 that is, any zero root has been removed.
2. Necessary conditions.
(a) All the coefficients of the polynomial q(s) must have the same sign if all the roots are in the
left-hand half plane.
(b) All the coefficients of q(s) for a stable system are nonzero.
However, although necessary, these requirements are not sufficient. That is, we immediately know the
system is unstable if they are not satisfied, yet if they are satisfied, we must proceed to ascertain the
stability of the system.
Example 3.10.4 For example, in the characteristic polynomial q(s) = s3 + s2 + 1 the coefficient of
s1 is zero. In the polynomial q(s) = s 2, the coefficients do not have the same sign. Therefore, the
roots of these characteristic polynomials are not (all) located in the left-hand s-plane and the systems
are not stable.
3. Sufficient condition. If all the coefficients are positive, arrange the coefficients of the polynomial in
the Routh array according to the following pattern:
sn
sn1
sn2
sn3
.
.
s2
s1
s0
.
.
.
.
.
.
.
.
.
.
.
.
The process is continued until the n-th row is completed. The complete array of coefficients is triangular.
Rouths stability criterion states that the number of roots of the characteristic polynomial q(s)
with positive real parts is equal to the number of changes in sign of the coefficients in the first
column of the array.
:
:
:
:
:
1
2
3
4
2314
=1
2
1425
= 6
1
6510
=5
6
2510
2
5
0
=5
In this example, the number of changes in sign of the coefficients in the first column is two (1 6
and 6 5). This means that there are two roots with positive real parts. Indeed, if we calculate the
roots of the polynomial we obtain: p1 = 0.2878 + 1.4161j, p2 = 0.2878 1.4161j, p3 = 1.2878 + 0.8579j,
p4 = 1.2878 0.8579j.
36
Example 3.10.6 Special case, (Ogata, 2002). If a first-column term in any row is zero, but the remaining
terms are not zero or there is no remaining term, then the zero term is replaced by a very small positive
number and the rest of the array is evaluated. For example consider the characteristic equation:
s3 + 2s2 + s + 2 = 0
All coefficients have the same sign (are positive) and none of them is zero. The necessary conditions are
fulfilled.
The Routh array of coefficients is:
s3
s2
s1
s0
:
1
1
:
2
2
: 0
:
2
If the sign of the coefficient above the zero () is the same as the one below it, it indicates that there are a
pair of imaginary roots. Actually, this equation has two roots at j.
If, in other cases, the sign of the coefficient above zero is opposite that below it, it indicates that there is
one sign change.
Example 3.10.7 Application of Rouths stability criterion to control system analysis, (Ogata, 2002) Routh
stability criterion is useful to determine the effects of changing one or two parameters by examining the
values that cause instability. In the following, we shall consider the problem of determining the stability
range of a parameter value.
Consider the system shown in Figure 3.42. Let us determine the range of k for stability. The closed-loop
R(s)
C(s)
s(s+2)(s2+s+1)
s4
s3
s2
s1
s0
:
1
3 k
:
3
2 0
:
7/3
k
: 2 9k/7
:
k
For stability, k must be positive (also imposed by the necessary condition), and all coefficients in the first
column must be positive. Therefore:
9k
2
>0
7
37
or
14
9
When k = 14/9, the system becomes marginally stable, the system response is oscillatory with constant
amplitude.
0<k<
3.11
3.11.1
The basic characteristic of the transient response of a closed-loop system is closely related to the location
of the closed-loop poles. If the system has a variable loop gain, then the location of the closed-loop poles
depends on the value of the gain chosen. It is important therefore, that the designer knows how the closedloop poles move in the s-plane as the loop gain is varied.
Example 3.11.1 Consider a closed-loop negative feedback control system (Figure 3.43) with the open-loop
transfer function kG(s) where:
1
G(s) =
s(s + 2)
and k is a positive variable gain.
The poles of the open-loop transfer function are 0 and 2 and do not depend on the value of the variable
system parameter k. The closed-loop transfer function is:
G0 (s) =
kG(s)
k
= 2
1 + kG(s)
s + 2s + k
Clearly, the poles of the closed-loop system depend on k and thus, the system response, for example to a unit
step input, will change for various values of k.
A method for finding the roots of the characteristic equation has been developed by W.R. Evans and
used extensively in control engineering. The method, called the root-locus method, is one in which the roots
of the characteristic equation are plotted for all values of a system parameter. The roots corresponding to
a particular value of this parameter can then be located on the resulting graph. Note that the parameter is
usually the gain, but any other variable of the open-loop transfer function may be used, (Ogata, 2002).
1
k=1
0.8
For k = 1:
1
+ 2s + 1
The closed-loop poles are real and equal s1,2 = 1 and
the step response of the closed-loop system is critically
damped.
G0 (s) =
s2
0.6
0.4
0.2
0
0
4
t(sec)
1.5
k=3
For k = 3:
G0 (s) =
3
2
s + 2s + 3
1
0.5
0
0
4
t(sec)
For k = 50:
1.5
50
+ 2s + 50
The closed-loop poles complex s1,2 = 1 7j and
the step response of the closed-loop system is underdamped with a large overshoot and more oscillations.
G0 (s) =
s2
0.5
0
0
3
t(sec)
3.11.2
Consider the closed-loop system shown in Figure 3.47, where k is the open-loop gain, and the open-loop
transfer function is:
Hd (s) = kG(s)H(s)
R(s)
G(s)
C(s)
H(s)
Figure 3.47: Closed-loop control system
(3.26)
The characteristic equation for this closed-loop system is obtained by setting the denominator of the
right side of equation (3.26) equal to zero. That is,
1 + kG(s)H(s) = 0
or
kG(s)H(s) = 1
39
(3.27)
The basic idea behind the root-locus method is that the values of s that make the transfer function
around the loop kG(s)H(s) equal 1 must satisfy the characteristic equation of the system.
kG(s)H(s) is a ratio of polynomials in s. Since kG(s)H(s) is a complex quantity, equation (3.27) can
be split in two equations by equating the angles and magnitudes of both sides, to obtain:
| kG(s)H(s) | 6 kG(s)H(s) = 1 + j0
or:
Angle condition:
6
q = 0, 1, 2, ...
(3.28)
Magnitude condition:
|kG(s)H(s)| = 1
(3.29)
The values of s that fulfill the angle and magnitude conditions are the roots of the characteristic equation,
or the closed-loop poles. A plot of points of the complex plane satisfying the angle condition alone is the
root-locus. The roots of the characteristic equation (the closed-loop poles) corresponding to a given value
of the gain can be determined from the magnitude condition, (Ogata, 2002).
Remember 1 . Complex numbers.
A complex number s = a + jb, with the real part a and the imaginary part b (Figure 3.48) has the
absolute value (or magnitude or modulus):
p
|s| = |a + jb| = a2 + b2
and the phase (or angle, or argument):
6
b
s = arg(s) = arctan , if a > 0
a
s1 |s1 |
a2 + b2
=
=
s2 |s2 |
c2 + d2
and the phase:
s1
= 6 s1 6 s2 = 6 (a + jb) 6 (c + jd)
s2
Consider, for example, a complex number r and we want to compute the phase of r + 3. As shown in
Figure 3.49, the points r, r + 3, 0 and 3 form a parallelogram. Therefore, the phase of r + 3 can be
obtained as the angle (measured counterclockwise) from the positive real axis to the line that connects
r and the root of r + 3, i.e. 3.
Example 3.11.2 , (Ogata, 2002) Consider a closed-loop system with the open-loop transfer function
kG(s)H(s) given by:
k(s + 3)
kG(s)H(s) =
(s + 5)(s2 + 2s + 2)
The open-loop poles are: p1 = 5 and p2,3 = 1 j. The open-loop zero is z1 = 3.
For a testpoint s = r (in general a complex number), the angle of kG(s)H(s) is:
6
kG(s)H(s)|s=r = 6 k + 6 (r + 3) 6 (r + 5) 6 (r + 1 j) 6 (r + 1 + j) = 0 + 1 2 3 4
kM1
M2 M3 M4
where M1 , M2 , M3 , M4 are the magnitudes of complex quantities in the numerator and denominator of the
open-loop transfer function, as shown in Figure 3.50:
M1 = |r + 3|, M2 = |r + 5|, M3 = |r + 1 j|, M4 = |r + 1 + j|
Example 3.11.3 Root locus of a second order system
A root-locus plot of a simple second-order system is illustrated. Consider the closed-loop system shown
in Figure 3.51. The open-loop transfer function G(s) is:
G(s) =
k
s(s + 2)
41
Figure 3.50: Angle measurement from a test point r to the open-loop poles and zeros
G(s)
k
s(s+2)
G0 (s) =
=
= 2
k
1 + G(s)
s + 2s + k
1 + s(s+2)
The characteristic equation is:
1+
k
=0
s(s + 2)
or s2 + 2s + k = 0
We wish to find the locus of the roots of this system as k is varied from zero to infinity.
We shall first obtain analytically the roots of the characteristic equation in terms of k and analyze them
when k varies from 0 to . In general, this is not a proper method to construct a root locus. An analytical
solution of the characteristic equation is, in general, hard to find and complicated for systems of order higher
than 2. The root locus method for systems of any order will be presented in the next section. This example
introduces only the main ideas for a simple application.
The roots of the characteristic equation are:
s1 = 1 + 1 k,
s2 = 1
1k
The roots are real for k 1 and complex for k > 1. The locus of the roots corresponding to all positive
values of k is plotted in Figure 3.52. The gain k is a parameter on the root locus. The motion of the poles
with increasing k is shown by arrows.
For k = 0, the closed-loop poles are the same as the poles of the open-loop transfer function G(s), i.e.,
s1 = 0, s2 = 2.
As k increases in the interval (0, 1), the closed-loop poles move towards the point (1, 0). Because the
poles have real values, the system response in overdamped.
42
Figure 3.52: Root locus plot (left). Angles measured from a test point P (right)
For k = 1, the closed-loop poles are real and equal s1 = s2 = 1. The system is critically damped.
As k increases from 1 to , the
closed-loop poles break away from the real axis and become complex.
They are given by s1,2 = 1 k 1j. Since the real part of the poles is constant at 1, the closedloop poles move along the vertical line s = 1. Because the poles are complex conjugates, they will
move symmetrically with respect to the real axis. For k > 1 the system becomes underdamped and the
system response is oscillatory.
We shall show that any point on the root locus satisfies the angle condition. The angle condition given
by equation (3.28) is:
6
k
= 6 s 6 s + 2 = 180o (2q + 1),
s(s + 2)
q = 0, 1, 2, ..
Consider point P on the root locus shown in Figure 3.52 (- right). The complex quantities s and s + 2
have angles 1 and 2 respectively. Note that all angles are considered positive if they are measured in the
counterclockwise direction. The sum of angles 1 and 2 is clearly 180o , thus:
6
k
|s=P = 1 2 = 180o
s(s + 2)
If the point P is located on the real axis between 1 and 0, then 1 = 180o and 2 = 0o . Thus, we see
that any point on the root locus satisfies the angle condition. We also see that if the point P is not located
on the root locus, then the sum of 1 and 2 is not equal to 180o (2k + 1). Thus, points that are not on the
root locus do not satisfy the angle condition, and therefore, they cannot be closed-loop poles for any value of
k.
Once we draw such a root locus plot we can determine the value of k that will yield a root, or a closed-loop
pole, at a desired point. The corresponding value of k is determined from the magnitude condition, equation
(3.29)
If, for example the closed-loop poles selected are s = 1 j, then the corresponding value of k is found
from:
k
|G(s)H(s)|s=1+j =
=1
s(s + 2) s=1+j
43
or
k = |s(s + 2)|s=1+j = | 1 + j| | 1 + j + 2| = | 1 + j| |1 + j| =
12 + 12
12 + 12 = 2
From the root-locus diagram of Figure 3.52 we see the effects of changes in the value of k on the transient
response behavior of the second-order system. An increase in the value of k will decrease the damping ratio
, resulting in an increase in the overshoot of the response. An increase in the value of k will also result in
increases in the damped and undamped natural frequencies.
From the root-locus plot, it is clear that the closed-loop poles are always in the left-half of the s-plane;
thus, no matter how much k is increased, the system remains always stable.
3.11.3
Consider a closed-loop system with a variable parameter k [0, ) as shown in Figure 3.53.
R(s)
G(s)
C(s)
H(s)
Figure 3.53: Closed-loop control system
3. Locate the open-loop poles and zeros of P (s) in the s-plane with symbols: - open-loop poles, o open-loop zeros.
4. Determine the number of separate loci SL. SL = np , when np nz , where np is the number of
open-loop poles and nz the number of open-loop zeros.
5. Locate the segments of the real axis that are root loci:
(a) On the real axis the locus lies to the left of an odd number of open-loop poles and zeros
(b) Locus begins at an open-loop pole and ends at an open-loop zero (or infinity along to asymptotesin case the number of zeros is smaller than the number of poles)
6. The root locus is symmetrical with respect to the horizontal real axis.
44
7. The loci proceed to infinity along asymptotes centered at A and with angles A .
P
P
(pj ) (zi )
A =
np nz
A =
2q + 1
180o , q = 0, 1, 2, ...(np nz 1)
np nz
8. By utilizing the Routh-Hurwitz criterion, determine the point at which the locus crosses the imaginary
axis (if it does so).
9. Determine the breakaway or break-in points on the real axis (if any)
(a) Set k = P 1(s) = p(s), (from the characteristic equation 1 + kP (s) = 0)
(b) Obtain dp(s)/ds = 0
(c) Determine roots of (b) or use graphical method to find maximum of p(s).
10. Determine the angle of locus departure from complex poles and the angle of locus arrival at complex
zeros, using the phase criterion
6
11. If required, determine the root locations that satisfy the phase criterion
6
12. If required, determine the parameter value kx at a specific root sx using the magnitude condition:
Qnp
j=1 | s + pj |
kx = Qnz
|s=sx
i=1 | s + zi |
Example 3.11.4 Consider a closed-loop system as the one shown in Figure 3.53, where H(s) = 1, and the
open-loop transfer function:
k
G(s) =
s(s + 1)(s + 2)
Let us sketch the root-locus plot and determine the value of k so that the damping factor of a pair of
dominant complex-conjugate closed-loop poles is 0.5.
By following the procedure presented above section we obtain:
1. The characteristic equation is written as:
1 + kG(s) = 0
or
1+
k
=0
s(s + 1)(s + 2)
2. The open-loop transfer function has no zeros, thus nz = 0, and three poles, p1 = 0, p2 = 1, p3 = 2,
thus np = 3.
3. Locate the open-loop poles of the open-loop transfer function with symbol , as shown in Figure 3.54.
4. The locus has np = 3 branches.
45
5. Locate the segments of the real axis that are root loci:
On the negative real axis, the locus exists between p1 = 0 and p2 = 1, and from p3 = 2 to
(see Figure 3.55). All points on these segments are located on the left of an odd number of open-loop
poles (or zeros). The points in (0, 1) are on the left of one open-loop pole (p1 = 0). The points in
(2, ) are on the left all of 3 open-loop poles. All the points between p2 = 1 and p3 = 2 are on
the left of 2 (an even number) open loop poles therefore, this segment does not belong to the root locus.
The three branches of the root locus begin (for k = 0) at the open-loop poles and end (for k ) at
infinity along to some asymptotes that will be computed. The arrows placed on the colored branches of
the root locus in Figure 3.55 show the direction of k increasing from 0.
6. The root locus is symmetrical with respect to the horizontal real axis. The points on the root locus are
either real poles of the closed-loop system, located on the real axis, or complex conjugate poles located
in the complex plane symmetrically with respect to the real axis.
7. The locus proceeds to infinity along asymptotes centered at A and with angles A . Compute the center
of the asymptotes and the angles:
P
P
(pj ) (zi )
012
A =
=
= 1
np nz
3
A =
or
2q + 1
180o , q = 0, 1, 2
np nz
A = 60o , 180o , 300o
Thus, there are three asymptotes. The one having the angle 180o is the negative real axis. The
asymptotes are shown in Figure 3.56.
8. The points at which the locus crosses the imaginary axis can be determined using the Routh-Hurwitz
criterion. We shall compute the value of k for which the closed-loop system is marginally stable and
the complex solutions of the characteristic equation located on the imaginary axis for this value of k.
The characteristic equation is:
1+
k
= 0 or s3 + 3s2 + 2s + k = 0
s(s + 1)(s + 2)
46
s3
s2
s1
s0
:
1
2
:
3
k
: (6 k)/3
:
k
The crossing points on the imaginary axis that makes the s1 term in the first column equal zero is
obtained from (6 k)/3 = 0, or k = 6. Replacing this value in the characteristic equation we obtain:
s3 + 3s2 + 2s + 6 = 0
or
(s + 3)(s2 + 2) = 0
The crossing points on the imaginary axis are the imaginary roots of the characteristic equation when
k = 6:
s1,2 = j 2
9. Compute the breakaway point. From the the characteristic equation compute k:
1+
k
=0
s(s + 1)(s + 2)
The breakaway point on the real axis will be determined from the solution of
p (s) = 0
dp(s)
= (3s2 + 6s + 2) = 0
ds
yields
s1 = 0.4226,
s2 = 1.5774
Since the breakaway point must lie between 0 and -1, s1 = 0.4226 corresponds to the actual breakaway
point (Figure 3.57).
47
Figure 3.57: Intersection with the imaginary axis and the breakaway point
Based on the information obtained in the foregoing steps, the root locus obtained is shown in Figure 3.58.
In order to determine a pair of complex conjugate closed-loop poles such that the damping ratio = 0.5
we have to remember some properties of the complex poles of the second order system:
The complex poles of a general second-order transfer function with the characteristic equation:
s2 + 2n s + n2 = 0
are
s1,2 = n jn
The complex poles are represented in Figure 3.59.
1 2
From the figure, the distance between the origin and the pole s1 is:
the damping factor results as follows:
cos =
48
n
=
n
(n )2 + n2 (1 2 ) = n , and
or
= arccos
Closed-loop poles with = 0.5 lie on the lines passing through the origin and making the angles
arccos = arccos0.5 = 60o with the negative real axis, as shown in Figure 3.60.
[b]
Figure 3.59: Location of complex poles
Figure 3.60: Root-locus plot and the poles with = 0.5
From Figure 3.60, such closed-loop poles having = 0.5 are obtained as follows:
s1,2 = 0.3337 j0.5780
Note that these accurate values of the poles with = 0.5 can be obtained only from a very accurate root locus
plot, constructed using a computer. From a root locus plot sketched following the procedure presented in this
section we can only approximate the values of the required poles.
The value of k that yields such poles is found from the magnitude condition:
k = |s(s + 1)(s + 2)|s1,2 = | 0.3337 + j0.5780| | 0.3337 + j0.5780 + 1| | 0.3337 + j0.5780 + 2| = 1.0383
Using this value of k, the third pole is found at s3 = 2.3326 by replacing k = 1.0383 in the characteristic
equation and computing the solutions.
49
3.11.4
In some cases the variable parameter k may not appear as a multiplying factor of the open-loop transfer
function G(s)H(s). In such cases it may be possible to rewrite the characteristic equation such that the
procedure described in the previous section can be applied. The next example illustrates how to proceed in
this case.
Example 3.11.5 Consider a closed-loop system shown in Figure 3.61.
20(1 + ks)
s(s + 1)(s + 4)
Notice that the adjustable variable k does not appear as a multiplying factor of the open-loop transfer function.
The characteristic equation of this system is:
1 + G(s)H(s) = 1 +
20(ks + 1)
s(s + 1)(s + 4) + 20(ks + 1)
=
=0
s(s + 1)(s + 4)
s(s + 1)(s + 4)
or
s3 + 5s2 + 4s + 20 + 20ks = 0
By defining 20k = K and dividing by the sum of terms that do not contain k, we get:
1+
Ks
= 0 which is in the general form: 1 + KP (s) = 0
s3 + 5s2 + 4s + 20
We shall now sketch the root locus of the system, from the new characteristic equation.
Factor P (s) and obtain:
P (s) =
s3
5s2
s
s
=
+ 4s + 20
(s + 5)(s2 + 4)
The poles and zeros of P (s) are: one zero at z1 = 0 and three poles: p1,2 = j2, p3 = 5. Thus the
number of open-loop zeros and poles are nz = 1, np = 3, respectively.
The root locus will have np = 3 branches.
On the real axis the region which starts at pole 5 to the origin (open-loop zero) belongs to the final
root locus. The other two branches start on the imaginary axis, at the poles j2 and approach the
asymptotes for increasing K.
The intersection of the two (np nz = 3 1 = 2) asymptotes with the real axis (the center of the
asymptotes) can be found from:
A =
5 j2 + j2 0
5
= = 2.5
2
2
50
180o (2q + 1)
, q = 0, 1
2
or
A = 90o , 270o
With this information available the root locus may be sketched and is presented in Figure 3.62.
51
Bibliography
Burns, R. S. (2001). Advanced Control Engineering. Butterworth-Heinemann.
Dorf, R. C. and Bishop, R. H. (2008). Modern Control Systems. Pearson Prentice Hall, 11th edition.
Nise, N. S. (2004). Control Systems Engineering. Wiley, 4th edition.
Ogata, K. (2002). Modern Control Engineering. Prentice Hall - Pearson Education International, 4th edition.
52
Chapter 4
Frequency response
4.1
Introduction
We have examined the use of test signals such as a step, an impulse and a ramp signal. In this chapter we
will use a sinusoidal input signal and consider the steady-state response of the system as the frequency of
the sinusoid is varied. Thus, we will look at the response of the system to a changing frequency, .
We will examine the transfer function G(j), when s = j and develop a form of plotting the complex
number for G(j) when is varied, (Dorf and Bishop, 2008)
Industrial control systems are often designed by use of frequency-response methods. Frequency-response
tests are, in general, simple and can be made accurately by use of readily available sinusoidal generators and
precise measurement equipment. Often, the transfer function of complicated components can be determined
experimentally by frequency-response tests.
The frequency response of a system is defined as the steady-state response of the system to a sinusoidal
input signal. The sinusoid is a unique input signal and the resulting output signal, for a linear system,
as well as signals throughout the system, is sinusoidal in the steady-state; it differs from the input
waveform only in amplitude and phase angle, (Dorf and Bishop, 2008).
Consider the system shown in Figure 4.1 where the input r(t) is a sinusoid: r(t) = Asint. The Laplace
r(t)
A
t
s2
A
+ 2
m(s)
m(s)
= Qn
q(s)
i=1 (s + pi )
C(s) = G(s)R(s)
1
k1
kn
s +
+ ... +
+
s + p1
s + pn s 2 + 2
If the system is stable, then all pi have negative nonzero real parts and the terms corresponding to the poles
in c(t) will be zero at steady-state, or:
ki
=0
lim 1
t
s + pi
C(s) =
where = 6 G(j).
Example 4.1.1 Consider a first-order system with the transfer function
G(s) =
1
s+1
The input is sinusoidal: r(t) = A sin t. We shall calculate the output signal c(t) at steady state (t ).
R(s) = [Asint] =
s2
A
+ 2
A
A
1
A 1 s
= 2
+ 2
2
+ )(s + 1)
+ 1 s + 1 + 1 s2 + 2
A
1
1s
1
1
c(t) = [C(s)] = 2
+
+1
s + 1 s2 + 2
A t
A
1s
c(t) = 2
e + 2
1 2
+1
+1
s + 2
C(s) = R(s)G(s) =
(s2
At steady state (t ), the exponential et 0. The steady state of the output signal is given by:
A
1s
A
1
s
1
1
c(t) = 2
= 2
+1
s2 + 2
+1
s2 + 2 s2 + 2
A
1
c(t) = 2
sin t cos t
+1
If we replace s = j into G(s) we obtain a complex quantity with the magnitude and phase angle:
1
= 1
|G(j| =
j + 1
2 + 1
1
= arctan
j + 1
sin
1
tan = ;
= ; cos =
cos
2 + 1
By replacing these results into c(t):
G(j) = = 6
c(t) =
A sin t cos t
A
1
= 2
[sin t cos + sin cos t]
2 + 1
+ 1 cos
c(t) =
A
1
A
sin(t + ) =
sin(t + )
+ 1 cos
2 + 1
c(t) = A|G(j)| sin (t + 6 G(j))
Thus, the steady-state output signal depends only on the magnitude and phase of G(j) at a specific frequency
. Notice that the steady-state response as described before is true only for stable systems, G(s).
2
We see that a stable linear time-invariant system subjected to a sinusoidal input will, at steady-state,
have a sinusoidal output of the same frequency as the input. But the amplitude and phase of the output
will be different from those of the input. In fact, the amplitude of the output is given by the product of that
of the input and |G(j)| while the phase angle differs from that of the input by the amount = 6 G(j).
An example of input and output sinusoidal signals is shown in Figure 4.2.
Thus, for sinusoidal inputs the amplitude ratio of the output sinusoid to the input sinusoid is:
C(j)
|G(j| =
R(j)
and the phase shift of the output sinusoid with respect to the input sinusoid:
6
G(j) = 6
C(j)
R(j)
Hence, the response characteristics of a system to a sinusoidal input can be obtained directly from:
C(j)
= G(j)
R(j)
The function G(j) is called the sinusoidal transfer function. It is a complex quantity and can be
represented by the magnitude and phase angle with frequency as a parameter. A negative phase angle is
called phase lag and a positive phase angle is called phase lead.
The sinusoidal transfer function of a linear system is obtained by substituting j for s in the transfer
function of the system. To completely characterize a linear system in the frequency domain, we must specify
both the amplitude ratio and the phase angle as functions of the frequency .
k
Ts+1
C(s)
k
Ts + 1
For the sinusoidal input r(t) = Asint, the steady-state output css (t) can be found as follows:
- Substituting j for s in G(s) yields:
k
G(j) =
jT + 1
- The amplitude ratio of the output is:
k
|G(j)| =
1 + T 22
while the phase angle of the output is
= 6 G(j) = arctanT
Thus, for the input r(t), the steady-state output css (t) can be obtained as:
Ak
css (t) =
sin(t arctanT )
1 + T 22
4.2
The sinusoidal transfer function, a complex function of the frequency is characterized by its magnitude
and phase angle, with frequency as parameter. A sinusoidal transfer function may be represented by two
separate plots, one giving the magnitude versus frequency and the other the phase angle versus frequency.
The logarithmic plots are called Bode plots in the honor of H.W.Bode who used them extensively in his
studies of feedback amplifiers.
The transfer function in the frequency domain is:
G(j) = |G()|ej()
A Bode diagram consists of two graphs: one is the plot of the logarithm of the magnitude of a sinusoidal
transfer function, and the other one is a plot of the phase angle, both are plotted against the frequency in
logarithmic scale, or decades:
dec = log10
The standard representation of the logarithmic magnitude of G(j), denoted M dB , is 20log10 |G(j)|.
The unit used in this representation is the decibel, usually abbreviated dB:
M dB = |G(j)|dB = 20log10 |G(j)|
The phase angle of the transfer function, (), is represented (in degrees or radians) versus the logarithmic frequency.
The axes for a Bode diagram are shown in Figure 4.4.
The main advantage of using the logarithmic plot is that multiplication of magnitudes can be converted
into addition. Furthermore, a simple method for sketching an approximate log-magnitude curve is available.
It is based on asymptotic approximations.
The general form of a sinusoidal transfer function emphasizing first and second order factors as well as
the poles (or zeros) at the origin, is:
k
G(j) =
Qm1
+ 1)
Qm2
1
2
p=1 ( p2 (j)
2p
p (j)
Q 1
Q 2 1
(j)n nl=1
(Tl (j) + 1) nk=1
( 2 (j)2 +
4
+ 1)
2k
k (j)
+ 1)
m2
X
log|(
p=1
20
n1
X
l=1
m1
X
log|Ti (j) + 1| +
i=1
2p
1
(j)2 +
(j) + 1| 20log|j|n
2
p
p
log|Tl (j) + 1| 20
n2
X
log|
k=1
1
2k
(j)2 +
(j) + 1|
2
k
k
1
X
k
6 (Ti (j) + 1) +
= (G(j)) =
+
(j)n
i=1
m2
X
p=1
((
2p
1
(j)2 +
(j) + 1)
2
p
p
n2
X
6
k=1
n1
X
l=1
(Tl (j) + 1)
1
2k
(j)2 +
(j) + 1)
2
k
k
Therefore three different kinds of factors that may occur in a transfer function are as follows:
1. Gain k and the integral or derivative factors k/(j)n , (n can be positive or negative)
2. First-order factors, (T (j) + 1)1
3. Quadratic factors [( 12 (j)2 +
n
2
n (j)
+ 1)]1
It is possible to construct composite plots for any general form of G(j) by sketching the plot for each
factor and adding individual curves graphically because adding the logarithm of the gains correspond to
multiplying them together.
1. Gain k and the integral or derivative factors k/(j)n . The logarithmic gain, in decibels, is written as:
k
dB
= 20logk 20nlog = kdB 20n dec
M1 = 20log
(j)n
In a coordinate system (M1dB , dec ) as shown in figure 4.4, this is the equation of a straight line which
crossed the vertical axis at kdB and has the slope 20n (dB/dec), because
dM1dB
= 20n, (dB/dec)
d dec
5
= 90o n
0
The Bode diagram corresponding to integral or derivative factors plus the gain is shown in Figure 4.5.
1 = n arctan
For low frequencies, such that 1/T , the log-magnitude may be approximated by:
M2dB |
= 20log1 = 0 dB
Thus, the log-magnitude curve at low frequencies is the constant 0 dB line. For high frequencies, such
that 1/T , the magnitude in decibels may be approximated by:
M2dB |
= 20logT dB.
or
M2dB |
= 20log 20logT = 20 dec 20logT
Since the representation is made for M dB versus dec , this is the equation of a straight line with the
slope:
dM2dB
= 20, (dB/dec)
d dec
The frequency c , at which the two asymptotes meet is called the corner frequency or break frequency,
and is calculated from:
M2dB | = M2dB |
or
0 = 20cdec 20logT
and we get:
cdec = logT = log
1
T
The error in the magnitude curve caused by the use of asymptotes can be calculated. The maximum error occurs at the corner frequency and is calculated by replacing the expression of the corner
frequency in the exact relation for log-magnitude:
r
1
dB
M2 |=c = 20log 1 + T = 20log 2
= 3.03 dB
T
Since the asymptotes are quite easy to draw and are sufficiently close to the exact curve, the use of
such approximations in drawing Bode diagrams is convenient in establishing the general nature of the
frequency-response characteristics.
The exact phase angle 2 of the factor 1/(T j + 1) is:
2 = arctan T
At zero frequency, the phase angle is 0o . At the corner frequency, the phase angle is
2 = arctan
T
= arctan 1 = 45o
T
The exact log-magnitude curve, the asymptotes and the phase angle curve are shown in Figure 4.6.
(T j + 1) = 6
1
T + 1
the corner frequency is the same for both cases. The slope of the high-frequency curve is 20 dB/dec
and the phase angle varies from 0 to 90o as the frequency is increased from zero to infinity. The
log-magnitude, together with the asymptotes and the phase angle curve for the factor T j + 1 are
shown in Figure 4.7.
7
2
n (j)
2
n (j)
+1
If > 1 this quadratic factor can be expressed as a product of two first-order ones with real poles.
If 0 < < 1, this quadratic factor has complex-conjugate poles. The asymptotic frequency-response
curve may be obtained as follows: Since:
s
1
2
M3dB = 20log 1
= 20log (1 2 )2 + (2 )2
2
2 (j)2 + (j) + 1
n
n
n
The low-frequency asymptote is thus a horizontal line at 0dB. For high frequencies such that n ,
the log-magnitude becomes:
M3dB | = 20log
= 40log
= 40log 40logn dB
2
n
n
The equation for high-frequency asymptote is a straight line having the slope 40 dB/dec since:
dM3dB
= 40 dB/dec
d dec
The high-frequency asymptote intersects the low-frequency asymptote when:
M3dB | = M3dB |
or
40logc 40logn = 0
The corner (or break) frequency c is:
c = n
The two asymptotes just derived are independent of the value of . Near the corner frequency c , a
resonant peak occurs as may be expected. The damping ration determines the magnitude of this
peak.
8
The maximum error caused by the use of asymptotes occurs at the corner frequency and is calculated by
replacing the expression of the corner frequency = c = n in the exact relation for log-magnitude:
s
2
n
M3dB |=c = 20log (1 n2 )2 + (2 )2
n
n
= 20log(2) = 20log2 20log
= 6dB dB
The magnitude of the error depends on the value of . It is large for small values of . Figure 4.8
shows the exact log-magnitude curves together with the aymptotes for several values of .
The phase angle of the quadratic factor 1/[( 12 (j)2 +
n
3 =
6
1
( 12 (j)2 +
n
2
n (j)
+ 1)
2
n (j)
+ 1)] is:
2 n
= arctan
2
1 n
2
= arctan = 90o
0
At , the phase angle becomes 180o . The phase angle is skew symmetric about the inflexion
point, where 3 = 90o . Figure 4.8 shows the exact phase angle for different values of .
103 (s + 10)
s(s + 1)(s2 + 10s + 100)
First write the transfer function in the general form shown before, emphasizing the time constants, natural
frequencies, damping factors and the gain:
G(s) =
1
102 ( 10
s + 1)
1 2
1
s(s + 1)( 100 s + 10
s + 1)
102
k
=
;
j
(j)1
1
(j) + 1 = T1 (j) + 1;
10
1
1
=
;
G3 (j) =
j + 1
T2 j + 1
1
1
G4 (j) = 1
= 1
1
2
2
(j) + 2 (j) + 1
100 (j) + 10 (j) + 1
2
G2 (j) =
(4.1)
The Bode diagram is plotted for every one of these factors and than the curves are added graphically.
For simplicity reasons, only the asymptotes will be plotted for the log-magnitude curves. The gain k, time
constants T1 and T2 , the damping factor and the natural frequency n , can be identified from equations
(4.1), and we obtain:
1
k = 102 ; T1 = ; T2 = 1; n = 10; = 0.5.
10
The log-magnitude curve of G1 (j)) is a straight line with the slope 20 dB/dec which crosses the
vertical axis at kdB = 20log102 = 40dB. The phase angle corresponding to this factor is a constant line at
90o . The plots are shown in Figure 4.10.
10
The magnitude curve of the first order factor at the numerator G2 (j) has two asymptotes: one at 0 dB
for low frequencies and the other is a line with the slope 20 dB/dec. Both meet at the corner frequency
dec
c1
= logT1 = log
1
= log10 = 1 dec
10
The phase angle is an arctangent function which approaches the 0 dB line at low frequencies and 90o at
very high frequencies with an inflexion point at (c1 , 45o ).
For the first-order factor at the denominator G3 (j) we obtain in a similar way the corner frequency
dec
c2
= logT2 = log1 = 0 dec
and the asymptotes (the one at high frequencies will have a slope of 20 dB/dec).
The phase angle is an arctangent function which approaches the 0 dB line at low frequencies and 90o
at very high frequencies with an inflexion point at (c2 , 45o ).
The log-magnitude curve of the second order factor at the denominator G4 (j) has a corner frequency:
c3 = n = 10;
dec
c3
= log 10 = 1dec;
and two asymptotes: at 0 dB for low frequencies and one with a slope of -40 dB/dec at high frequencies.
The phase angle approaches 0 dB at low frequencies and 180o at high frequencies with an inflexion
point at (c3 , 90o ).
asymptote at high frequency of G3 (j) (which has a slope of -20 dB/dec) was added. The final plot changes
again the slope at dec = 1, where another two asymptotes at high frequencies add their slope to the resultant
(-40dB/dec +20 dB/dec). Thus, for frequencies higher than dec = 1 the final plot will have a slope of -60
dB/dec.
For plotting the complete phase-angle curve, the phase angle curves for all factors have to be sketched.
The algebraic sum of these curves provides the complete phase-angle curve as shown in Figure 4.10.
Reading Bode Diagrams. If a sinusoidal signal X(j) with frequency is applied as the input to an
open-loop system with the sinusoidal transfer function G(j) the output signal, Y (j) will have the same
frequency. The amplitude of the output can be obtained by reading from a Bode diagram the magnitude of
the transfer function corresponding to frequency and we obtain:
|Y (j)| = |G(j)| |X(j)|
If |G(j)| > 1 (or M dB = |G(j)|dB > 0), the output will be amplified. If |G(j)| < 1 (or M dB =
|G(j)|dB < 0), the output is attenuated.
The phase shift of the output signal with respect to in input is the phase angle of the transfer function
represented in a Bode diagram. When > 0 the output is shifted with a positive angle comparing to the
input and the system has phase lead. If < 0 the output is shifted with a negative angle with respect to
the input (phase lag).
The log-magnitude curve shown in Figure 4.10 is positive for frequencies lower than dec = 1 or =
10 rad/sec and negative for the high frequencies. This means that for all low frequencies the system will
amplify the input signal and will attenuate the signals with high frequencies. The system in this case is a
low-pass filter.
A system which amplifies the high frequencies and attenuate the low ones is a high-pass filter.
12
Bibliography
Dorf, R. C. and Bishop, R. H. (2008). Modern Control Systems. Pearson Prentice Hall, 11th edition.
13
Contents
5 Controller design
5.1
5.2
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.1
5.1.2
5.1.2.1
5.1.2.2
5.1.3
5.1.4
5.1.5
PID Control
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2.2
P action
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.2.2.2
I action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2.2.3
D action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.2.2.4
5.2.3
5.2.4
5.2.4.2
Chapter 5
Controller design
5.1
The performance of a feedback control system is of primary importance. A suitable control system is stable,
and it results in an acceptable response to input commands, is less sensitive to system parameter changes,
results in a minimum steady-state error for input commands and is able to reduce the effect of undesirable
disturbances.
A feedback control system that provides an optimum performance without any necessary adjustments
is rare indeed. Usually we find it necessary to compromise among many conflicting and demanding specifications and adjust the system parameters to provide a suitable and acceptable performance when is not
possible to obtain all the desirable optimum specifications.
The design of a control system is concerned with the arrangement, or the plan, of the system structure
and the selection of suitable components and parameters.
In redesigning a control system to alter the system response, an additional component is inserted within
the structure of the feedback system. It is this additional component or device that equalizers or compensates
for the performance deficiency. The compensating device may be an electric, a mechanical, a hydraulic, a
pneumatic or other type of device or network and is often called a compensator. Commonly an electric
circuit serves as a compensator in many control systems.
5.1.1
The performance of a control system can be described in terms of time-domain performance measures or
the frequency-domain performance measures. The performance of a system can be specified by requiring
a certain peak time, Tp , a maximum overshoot and settling time for a step input. It is usually necessary
to specify the maximum allowable steady-state error for several test signal inputs and disturbance inputs.
These performance specifications can be defined in terms of the desirable location of the poles and zeros of
the closed-loop transfer function.
As we found in a previous chapter, the locus of the roots of the closed-loop system can be readily obtained
for the variation of one system parameter. When the locus of the roots does not result in a suitable root
configuration, we must add a compensating network transfer function so that the resultant root locus results
in the desired closed-loop configuration.
Alternatively, we can describe the performance of a feedback control system in terms of frequency
performance measures. Then, a system can be described in terms of the peak of the closed-loop frequency
response, Mp , the resonant frequency, r , the bandwidth, and the phase margin of the system. We can
add a suitable compensation network, if necessary, in order to satisfy the system specifications. Thus, in
this case, we use compensation networks to alter and reshape the system characteristics represented on the
2
Bode diagram.
In the following sections we will assume that the process has been improved as much as possible and the
transfer function representing the process is unalterable.
If a compensator is needed to meet the performance specifications, the designer must realize a physical
device that has the prescribed transfer function of the compensator.
Numerous physical devices have been used for such purposes. In fact, many useful ideas for physically
constructing compensators may be found in the literature.
Among many kinds of compensators, widely employed compensators are the lead compensators, lag
compensators and lead-lag compensators. In this chapter we shall limit the discussion mostly to these
types. Lead, lag and lead-lag compensators may be electronic devices (such as circuits using operational
amplifiers) or RC networks (electrical, mechanical, hydraulic, pneumatic or combinations) and amplifiers.
In the trial-and-error approach to system design, we set up a mathematical model of the control system
and adjust the parameters of a compensator. The most time-consuming part of such work is the checking
of the performance specifications by analysis with each adjustment of the parameters. The designer should
use a digital computer to avoid much of the numerical problems necessary for this checking.
Once a mathematical model has been obtained, the designer must construct a prototype and test the
open-loop system. If the absolute stability of the closed-loop is assured, the performance of the closed-loop
system will be tested. Because of neglected loading effects among the components, nonlinearities, and so
on, which were not taken into consideration in the original design work, the actual performance of the
prototype system will probably differ from the theoretical predictions. By trial and error, the designer must
make changes in the prototype until the system meets the specifications, is reliable and economical.
5.1.2
The root-locus method is a graphical method for determining the locations of all closed-loop poles from
knowledge of all locations of the open-loop poles and zeros as some parameter (usually the gain) is varied
from zero to infinity.
The method yields a clear indication of the effects of parameter adjustment. An advantage of the rootlocus method is that we find that it is possible to obtain information on the transient response as well as
on the frequency response from the pole-zero configuration of the system in the s-plane.
In practice, the root-locus plot of a system may indicate that the desired performance cannot be achieved
just by the adjustment of gain. In fact, in some cases, the system may not be stable for all values of gain.
Then, it is necessary to reshape the root loci to meet the performance specifications.
In designing a control system, if other than a gain adjustment is required, we must modify the original
root-locus by inserting a suitable compensator. Once the effects on the root locus of the addition of poles
and/or zeros are fully understood, we can readily determine the locations of the pole(s) and zeros(s) of the
compensator that will reshape the root locus as desired.
In essence, in the design via the root-locus method the root loci of the system are reshaped through the
use of a compensator so that a pair of dominant closed-loop poles can be placed at the desired location.
(Often the damping ratio and undamped natural frequency of a pair of dominant closed-loop poles are
specified).
5.1.2.1
The addition of a pole to the open-loop transfer function has the effect of pulling the root-locus to the right,
tending to lower the systems relative stability and to slow down the settling of the response.
3
The addition of integral control adds a pole at the origin, making the system less stable.
Figure 5.1 shows examples of root loci illustrating effects of the addition of a pole to a single-pole system,
and the addition of two poles to a single-pole system.
The addition of a zero to the open-loop transfer function has the effect of pulling the root-locus to the left,
tending to make the system more stable and to speed up the settling of the response. Physically, the addition
of a zero in the feed-forward transfer function means the addition of derivative control to the system. The
effect of such control is to introduce a degree of anticipation into the system and speed up the transient
response.
Figure 5.2 shows the root loci for a system that is stable for all small gains but unstable for large gain,
and the root-locus plots for the system when a zero is added in the open-loop transfer function. Notice that
5.1.3
The compensation network Gc (s) is cascaded with the unalterable process G(s) in order to provide a suitable
loop transfer function Gc (s)G(s)H(s) as shown in figure 5.3.
R(s)
G(s)
Gc(s)
C(s)
H(s)
Figure 5.3: Closed-loop control system
The compensator Gc (s) can be chosen to alter the shape of the root locus or the frequency response.
The network may be chosen to have a transfer function:
Q
k M
(s + zi )
Gc (s) = QNi=1
j=1 (s + pj )
Then, the problem reduces to the selection of the poles and zeros of the compensator. To illustrate
the properties of the compensation network we will consider a first-order compensator. The compensation
approach developed on the basis of a first-order compensator can be extended to higher-order compensators,
for example by cascading several first-order compensators. A compensator Gc (s) is used with a plant G(s)
so that the overall loop gain can be set to satisfy the steady-state error requirement and then Gc (s) is used
to adjust the system dynamics favorably without affecting the steady-state error.
Consider the first-order compensator with the transfer function:
Gc (s) =
k(s + z)
s+p
When |z| < |p| the network is called a phase-lead network and has a pole-zero configuration as shown
in Figure 5.4.
If the pole was neglijible, that is |p| >> |z| and the zero occurred at the origin of the s-plane we have a
differentiator so that
k
Gc (s) = s
p
It is often useful to add a cascade compensation network that provides a phase-lag characteristic. The
phase-lag network has a transfer function:
Gc (s) =
k(s + z)
s+p
5
20
15
10
5
0
60
40
20
0
-1
10
10 1
10 0
Frequency (rad/sec)
10 2
40
35
30
25
20
0
-20
-40
-60 -1
10
0
1
10
10
Frequency (rad/sec)
10
5.1.4
Consider the problem of finding a suitable compensation network for the case where the system exhibits
satisfactory transient-response characteristics but unsatisfactory steady-state characteristics (see section
3.5.3 in Chapter 3).
Compensation in this case essentially consists of increasing the open-loop gain without appreciably
changing the transient response characteristics. This can be accomplished if a lag compensator is put in
6
s+z
s+p
The steady-state error of un uncompensated system with the open-loop transfer function G(s) (Figure
5.8) is:
sR(s)
s0 1 + G(s)
ss = lim
k
s
QM
i=1 (s
i=1 (s
+ zi )
+ pi )
We will now add the phase-lag network as a compensator and determine the compensated velocity constant.
If the velocity constant of the compensated system is designated as Kvcomp we have:
Q
k z zi
Q
Kvcomp = lim sGc (s)G(s) = lim (Gc (s))Kv =
s0
s0
pj
p
The gain of the compensated root locus at the desired root location will be kz/p. Now, if the pole and zero
of the compensator are chosen so that |z| = |p| < 1, the resultant Kvcomp will be increased at the desired
root location by the ratio z/p = . Then, for example, z = 0.1 and p = 0.01, the velocity constant at the
desired root location will be increased by a factor of 10. However, if the compensator pole and zero appear
relatively close together on the s-plane, their effect on the location of the desired root will be negligible.
Therefore, the compensator pole-zero combination near the origin of the s-plane, comparing to n can be
used to increase the error constant of a feedback system by the factor , while altering the root location
very slightly.
The steps necessary for the design of a phase-lag compensator on the s-plane are as follows:
7
Examining Figure 5.10 we find that we might set z = 0.1 and then p = 0.1/8. The difference of the
angles from p and z at the desired root is approximately 1o , and therefore s = 1 j2 is still the location
of the dominant roots. A sketch of the compensated root locus is shown also in Figure 5.10. Therefore the
compensated system transfer function is:
Gc (s)G(s) =
5(s + 0.1)
s(s + 2)(s + 0.0125)
5.1.5
The root-locus approach to design is very powerful when the specifications are given in terms of time domain
quantities, such as the damping ratio and undamped natural frequency of the desired dominant closed-loop
poles, maximum overshoot, rise time and settling time.
Consider a design problem in which the original system either is unstable for all values of gain or it is
stable but has undesirable transient response characteristics. In such a case, the reshaping of the root locus
is necessary in the broad neighborhood of the j axis and the origin in order that the dominant closed-loop
poles be at desired locations in the complex plane. This problem may be solved by inserting an appropriate
lead compensator in cascade with the feed-forward transfer function.
The procedure for designing a lead compensator may be stated as follows:
1. List the system specifications and translate them into a desired root location for the dominant roots.
2. Sketch the uncompensated root locus and determine whether the desired root locations can be realized
with an uncompensated system.
3. If a compensator is necessary, place the zero of the phase-lead network directly below the desired root
location (or to the left of the first two real poles).
4. Determine the pole location so that the total angle at the desired root location is 180o and therefore
is on the compensated root locus.
5. Evaluate the total system gain at the desired root location and then calculate the steady-state error.
6. Repeat steps if the error is not satisfactory.
Therefore, we first locate our desired dominant root locations so that the dominant roots satisfy the
specifications in terms of and n , as shown in Figure 5.11.
The root locus of the uncompensated system is sketched as illustrated in Figure 5.12.
9
of 180o . Then, locating a line at an angle p intersecting the desired root, we are able to evaluate the
compensator pole, p, as shown in Figure 5.14.
Example 5.1.2 Lead compensation using root locus. Let us consider a single-loop feedback control system
with the open-loop transfer function
k
G(s) = 2
s
The response of the uncompensated system is an undamped oscillation because
T (s) =
G(s)
k
= 2
1 + G(s)
s +k
Therefore, the compensation network is added so that the loop transfer function is Gc (s)G(s).
The specifications for the system are:
Settling time, ts 4 seconds
Percent overshoot for a step input Mp 35%.
We desire to compensate this system with a network Gc (s), where
Gc (s) =
s+z
s+p
2
Mp = e/ 1 0.35
We obtain, 0.32.
4
4
n
and therefore, n 1.
Thus we choose the real part of the dominant closed-loop poles equal to 1 and they will be placed in the
left-hand s-plane at an angle of maximum = arccos = 71.3o , measured from the negative real axis.
11
Thus, = 0.45 and 64o . Now we place the zero of the compensator below the desired location at
s = z = 1 as shown in Figure 5.16.
The total angle at the desired root location is:
6
To have a total of 180o at the desired root (such that r1,2 are on the compensated root locus) we evaluate
the angle from the undetermined pole p as:
180o = 142o p
or
p = 38o
Then, a line is drawn at an angle p = 38o intersecting the desired root location and the real axis as
shown in Figure 5.17. The point of intersection with the real axis is then s = p = 3.6.
s+1
s + 3.6
and the compensated transfer function for the system is:
Gc (s) =
Gc (s)G(s) =
k(s + 1)
+ 3.6)
s2 (s
Example 5.1.3 Lead compensation using root locus. Let us consider a single-loop feedback control system
as shown in Figure 5.18 with the open-loop transfer function
G(s) =
r(t)
k
s(s + 2)
G(s)
c(t)
R(s)
1 + G(s)
The steady-state error for a ramp input R(s) = 1/s2 can be calculated with the final value theorem
ss = lim sR(s)
s0
Thus,
0.05 = lim s
s0
1
1 + G(s)
1
1
s+2
2
= lim 2
=
2
s0
s 1 + k/s(s + 1)
s + 2s + k
k
To satisfy the error requirement, the gain of the uncompensated system must be k = 2/0.05 = 40. when
k = 40, toe roots of the closed-loop uncompensated system are given by:
s2 + 2s + 40 = 0
and
s1,2 = 1 j6.25 = n
1 2
The damping ratio of the uncompensated roots is approximately 0.16, and therefore a compensation network
must be added.
13
The zero of the compensator is placed at s = z = 4 directly below the desired root location. Then the
angle criterion at the root r1 is:
180o = 6 (r1 + z) 6 (r1 + 0) 6 (r1 + 2) =
4
8.03
= 90o (180o arccos ) (180o arctan
) p
9
2
= 90o 1160 1040 p
The angle from the undetermined pole is:
p = 50o
This angle is drawn to intersect the desired root location, and p is evaluated as s = p = 10.6, (for example
from tanp = 8.03/(p 4)). The compensator is:
Gc (s) =
s+4
s + 10.4
k(s + 4)
s(s + 2)(s + 10.4)
s(s + 2)(s + 10.4)
k =
= 96.5
s+4
s=4+8.03j
1
1
(s + 2)(s + 10.4)
= lim
2
s 1 + 96.5(s + 4)/(s(s + 2)(s + 10.4)) s0 s(s + 2)(s + 10.4) + 96.5(s + 4)
ss =
21.2
= 0.054
386
The steady-state error of the compensated system is greater than the desired value 0.05. Therefore we
must repeat the design procedure for a second choice of a desired root. If we choose n = 10 (and ts = 0.88)
the process can be repeated and the resulting gain k will be increased. The compensator pole and zero location
will also be altered. Then the steady-state error can be again evaluated.
Exercise. show that for n = 10 the steady-state error for a ramp input is 0.4 when z = 4.5 and p = 11.6.
The addition of an integration as Gc (s) = k2 + k3 /s can also be used to reduce the steady-state error for
a ramp input r(t) = t, t 0. For example, if the uncompensated system G(s) possessed one integration, the
additional integration due to Gc (s) would result in a zero steady-state error for a ramp input.
14
Example 5.1.4 The uncompensated loop transfer function of a control system is:
G(s) =
k1
(2s + 1)(0.5s + 1)
where k1 can be adjusted. To maintain zero steady-state error for a step input, we will add a PI compensation
network
k3
s + k3 /k2
= k2
Gc (s) = k2 +
s
s
Furthermore, the transient response of the system is required to have an overshoot less than or equal to 10%.
Therefore the dominant complex roots must be on, or below the = 0.6 line (or at an angle < 53o
measured from the origin) as shown in Figure 5.20.
Gc (s)G(s)
2.08(s + 0.75)
=
1 + Gc (s)G(s)
(s + 1)(s + r1 )(s + r2 )
where r1,2 = 0.75 j1. The effect of the zero is to increase the overshoot to a step input. If we wish to
attain an overshoot of 5%, we may use a pre-filter (an element placed in series with T(s)) so that the zero
is eliminated in T(s) by setting
0.75
Gp (s) =
s + 0.75
The overshoot without pre-filter is 17.6% and with the pre-filter it is 2%.
15
5.2
A feedback controller is designed to generate an output that causes some corrective effort to be applied
to a process so as to drive a measurable process variable towards a desired value known as the setpoint.
The controller uses an actuator to affect the process and a sensor to measure the results. Figure 5.21
shows a typical feedback control system with blocks representing the dynamic elements of the system and
arrows representing the flow of information, generally in the form of electrical signals. Virtually all feedback
controllers determine their output by observing the error between the setpoint and the actual process
variable measurement, (VanDoren, 1997).
setpoint
error
Controller
r(t)
e(t)
controller
output
u(t)
Plant +
actuator
Load
process
variable
c(t)
Sensor
5.2.1
PID Control
PID (proportional-integral-derivative) is the control algorithm most often used in industrial control. Despite the abundance of sophisticated tools, including advanced controllers, the PID controller is still the
most widely used in modern industry,controlling more than 95 % of closed-loop industrial processes. It
is implemented in industrial single loop controllers, distributed control systems and programmable logic
controllers (PLC).
A PID controller performs much the same function as a thermostat but with a more elaborate algorithm
for determining its output. It looks at the current value of the error, the integral of the error over a recent
time interval, and the current derivative of the error signal to determine not only how much of a correction
to apply, but for how long. Those three quantities are each multiplied by a tuning constant and added
together to produce the current controller output u(t) as in equation 5.1:
u(t) = KP e(t) + KI
e( )d + KD
de(t)
dt
(5.1)
In this equation:
KP is the proportional tuning constant,
KI is the integral tuning constant,
KD is the derivative tuning constant,
the error e(t) is the difference between the setpoint r(t) and the process variable c(t) at time t (see
Figure 5.21).
If the current error is large or the error has been sustained for some time or the error is changing rapidly,
the controller will attempt to make a large correction by generating a large output. Conversely, if the process
variable has matched the setpoint for some time, the controller will leave well enough alone.
The parallel structure described by the equation (5.1) is presented as a block diagram in Figure 5.23.
U (s)
1
= KP + KI + KD s
E(s)
s
(5.3)
5.2.2
Consider a unity-feedback closed loop system with a process having the transfer function G(s) and a PID
controller as shown in Figure 5.25. The effect of each term will be presented in the following sections.
17
r(t)
e(t) Controller
u(t)
GPID(s) controller
setpoint
c(t)
Plant
output
P action
A P controller is obtained from (5.1) by setting the integral and derivative tuning constants to zero: KD = 0,
KI = 0. The output of a P controller is then:
u(t) = KP e(t)
and the transfer function:
GP (s) = KP
The control action (command) is proportional to the error. A typical example of proportional control is
presented in Figure 5.26. The figure shows the error signal and the controller output, as well as the process
output for different values of KP , after a step change in the setpoint.
2
6
Error
Control signal
1.5
1
0.5
10
15
time
20
25
Error
Control signal
30
10
15
time
20
25
30
1.5
Output
0.8
Output
1
0.6
0.4
0.5
0.2
0
10
15
time
20
25
30
10
15
time
20
25
30
5.2.2.2
I action
A PI controller is obtained from (5.1) by setting the derivative tuning constants to zero: KD = 0. The
output of a PI controller is then:
Z t
e( )d
u(t) = KP e(t) +
0
KI
s
The value of the control variable at each moment of time is given by the current value of the error and the
area under the error signal, both weighted with the constants KP and KI , respectively.
GP I (s) = KP +
A typical example of proportional-integral control is presented in Figure 5.27. The figure shows the error
signal and the controller output, as well as the process output for different values of KI , after a step change
in the setpoint.The value of KP was kept constant, KP = 1.
1.5
3
Error
Control signal
1
0.5
0.5
10
15
time
20
25
Error
Control signal
30
1.5
10
15
time
20
25
30
2
Output
Output
1.5
1
0.5
0.5
10
15
time
20
25
30
10
15
time
20
25
30
D action
A PD controller is obtained from (5.1) by setting the integral tuning constants to zero: KI = 0. The output
of a PD controller is then:
de(t)
u(t) = KP e(t) + KD
dt
and the transfer function:
GP I (s) = KP + KD s
The value of the control variable at each moment of time is given by the current value of the error and
the derivative of the error signal, both weighted with the constants KP and KD , respectively.
19
The purpose of the derivative action is to improve the closed-loop stability. The instability can be
described as follows. Because of the process dynamics, it will take some time before a change in the control
variable is noticeable in the process output. Thus, the control system will be late in correcting for an error.
The action of a controller with a proportional and derivative action may be interpreted as if the control is
made proportional to the predicted process output, where the prediction is made by extrapolating the error
by the tangent to the error curve, as shown in Figure 5.28, (Astrom and Hagglund, 1995).
3
Error
Control signal
2
1
10
15
time
20
25
Error
Control signal
30
1.5
10
15
time
20
25
1.5
Output
Output
0.5
0.5
30
10
15
time
20
25
30
10
15
time
20
25
30
U (s)
1
= KP + KI + KD s
E(s)
s
20
(5.4)
or
GP ID (s) = KP
KI 1 KD
+
1+
s
KP s
KP
1
1+
+ Td s
Ti s
(5.5)
(5.6)
KI
KP
Td =
KD
KP
We have assumed that a D behavior can be realized by a PID controller. This is an ideal assumption
and in reality the ideal D element cannot be realized. In real PID controllers a lag in included in the D
behavior. An element with the transfer function
GD (s) =
Td s
Td
Ns+1
is introduced in the block diagram in Figure 5.3 instead of the D element, where N has a large value such
that the time constant at the denominator is a small. The transfer function of the real PID controller is
then:
!
1
Td s
GP ID = KP 1 +
+ T
d
Ti s
Ns+1
5.2.3
21
on the derivative of the oscillating error signal. The proportional term too will come and go as the error
increases or decreases.
Now suppose the process responds quickly to the controllers efforts. The integral term in equation 5.1
will not play as dominant a role in the controllers output since the errors will be so short lived. On the
other hand, the derivative term will tend to be larger since the error will change rapidly.
Clearly, the relative importance of each term in the controllers output depends on the behavior of the
controlled process. Determining the best mix suitable for a particular application is the essence of controller
tuning. For the sluggish process, a large value for the derivative tuning constant KD might be advisable to
accelerate the controllers reaction to an error that appears suddenly. For the fast-acting process, however,
an equally large value for KD might cause the controllers output to fluctuate as every change in the error
(including extraneous changes caused by measurement noise) is amplified by the controllers derivative
action.
Hundreds of mathematical and heuristic techniques for selecting appropriate values for the tuning constants have been developed over the last 50 years.
There are basically three schools of thought on how to select KP , KI , and KD values to achieve an
acceptable level of controller performance.
1. The first method is the simple trial-and-error approach. Experienced control engineers seem to know
just how much proportional, integral, and derivative action to add or subtract to correct the performance of a poorly tuned controller. Unfortunately, intuitive tuning procedures can be difficult to
develop since a change in one tuning constant tends to affect the performance of all three terms in the
controllers output.
For example, turning down the integral action reduces overshoot. This in turn slows the rate of change
of the error and thus reduces the derivative action as well.
2. The analytical approach to the tuning problem is more rigorous. It involves a mathematical model of
the process that relates the current value of the process variable to its current rate of change plus a
history of the controllers output.
There are hundreds of analytical techniques for translating model parameters into tuning constants.
Each approach uses a different model, different controller objectives, and different mathematical tools.
3. The third approach to the tuning problem is a compromise between purely heuristic trial-and-error
techniques and the more rigorous analytical techniques. It was originally proposed in 1942 by John
G. Ziegler and Nathaniel B. Nichols of Taylor Instruments and remains popular today because of its
simplicity and its applicability to many real-life processes.
5.2.4
r(t)
setpoint
e(t) Controller
u(t)
GPID(s) controller
Plant
output
22
c(t)
1
e(t) +
Ti
de(t)
e( )d + Td
dt
(5.7)
Kp = proportional gain
Ti = integral time
Td = derivative time
If a mathematical model of the plant can be derived, then it is possible to apply various design techniques
for determining parameters of the controller that will meet the transient and steady-state specifications of
the closed-loop system.
If the plant is so complicated and its mathematical model cannot be easily obtained, then analytical
approach to the design of a PID controller is not possible. Then we must resort to experimental approaches
to the design of PID controllers.
The process of selecting the controller parameters to meet given performance specifications is known as
controller tuning.
Ziegler and Nichols (1942) proposed rules for tuning PID controllers (for determining values of Kp , Ti and
Td ) based on the transient response characteristics of a given plant. Such determination of the parameters
of PID controller can be made by engineers on site by experiments on the plant.
There are two methods called Ziegler-Nichols tuning rules. In both they aimed at obtaining 25% maximum overshoot in step response.
5.2.4.1
The goal is to achieve a marginally stable controller response. A P-controller is used first to control the
system as shown in Figure 5.31. Set Ti = , and Td = 0.
r(t)
setpoint
u(t)
Kp
c(t)
Plant
controller
output
23
ultimate period
T0
r(t)
controller
output
c(t)
process
output
u(t)
Kp
0.5K0
Ti
Td
0
PI
0.45K0
1/1.2T0
PID
0.6K0
0.5T0
0.125T0
r(t)
1
s(s+1)(s+5)
GPID(s)
c(t)
Controller
obtain a unit-step response curve and check to see if the designed system exhibits approximately 25% maximum overshoot. If the maximum overshoot is excessive, make a fine tuning and reduce the amount of the
maximum overshoot to approximately 25%.
By setting Ti = and Td = 0, we obtain the closed-loop transfer function as follows:
Kp
C(s)
=
R(s)
s(s + 1)(s + 5) + Kp
The value of Kp that makes the system marginally stable so that sustained oscillation occurs can be obtained
by use of Rouths stability criterion. Since the characteristic equation for the closed-loop system is:
s3 + 6s2 + 5s + Kp = 0
the Routh array becomes as follows:
s3
s2
s1
s0
:
1
5
:
6
Kp
: (30 Kp )/6
:
Kp
Examining the coefficients of the first column of the Routh table, we find that sustained oscillation will
occur if Kp = 30. Thus, the critical gain is K0 = 30.
With the gain Kp set equal to K0 (= 30), the characteristic equation becomes:
s3 + 6s2 + 5s + 30 = 0
or
(s + 1)(s2 + 5) = (s + 1)(s + n2 ) = 0
from which we find the frequency of the sustained oscillation to be n =
sustained oscillation is:
2
2
= = 2.81
T0 =
n
5
25
1.8
1.4
1
0.6
0.2
00
5
10
Time (sec.)
15
1.4
1.4
0.6
0.6
0.2
00
0.2
1.4
2.8 4.2
Time (sec.)
5.6
3
4
Time (sec.)
The method is also known as reaction curve (open-loop) method. The philosophy of open loop testing is to
begin with a steady-state process, make a step change to the final control element and record the results of
the process output, as shown in Figure 5.36.
26
Plant
c(t)
tangent line at
inflection point
t
L
Kp
T /L
Ti
Td
0
PI
0.9T /L
L/0.3
PID
1.2T /L
2L
0.5L
Ziegler-Nichols tuning methods, however, tend to produce systems whose transient response is rather
oscillatory and so will need to be tuned further prior to putting the system into closed-loop operation.
27
Bibliography
Astrom, K. and Hagglund, T. (1995). PID Controllers: Theory, Design and Tuning. ISA: The Instrumentation, Systems, and Automation Society; 2 Sub edition.
VanDoren, V. (1997). PIDthe basic technique for feedback control. www.controleng.com.
VanDoren, V. (1998).
www.controleng.com.
Tuning fundamentals:
28
Contents
6 Control systems in state space
6.1
6.2
6.1.1
Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1.2
6.1.2.1
Controllability test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1.2.2
Observability test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2.1
6.2.2
6.2.3
Tracking systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Chapter 6
The standard state-space description of a linear continuous system is given by a state equation that relates
the rate of change of the state of the system to the state of the system and the input signals and the output
equation where the outputs are related to the state variables and the input signals. The state-space model
is a set of two matrix equations written in the compact form as:
x(t)
= Ax(t) + Bu(t)
(6.1)
y(t) = Cx(t) + Du(t)
where the state vector x(t), the input vector u(t) and the output vector y(t) are:
In equations (6.1):
x(t) =
x1 (t)
x2 (t)
..
.
xn (t)
, u(t) =
u1 (t)
u2 (t)
..
.
um (t)
, y(t) =
y1 (t)
y2 (t)
..
.
yp (t)
(6.2)
6.1.1
Stability
In a previous chapter we have examined stability for systems described by input-output output models in
the form of transfer functions. The system stability was analyzed by examining the location of the system
poles.
2
In Chapter 2 we mentioned that the values of the systems poles are equal to the eigenvalues of the
system matrix A. The demonstration is presented in Chapter 2 and summarized below.
Taking the Laplace transform of both sides of the state and output equations (6.1) for zero initial
conditions yields:
sX(s) = AX(s) + BU(s)
Y(s) = CX(s) + DU(s)
If we separate X(s) in the state equation we obtain:
X(s) = (sI A)1 BU(s)
and then the output is:
Y(s) = [C(sI A)1 B + D]U(s)
For a system with more than one input or more than one output, the transfer matrix is:
H(s) = C(sI A)1 B + D
and if the system has one input and one output, the relation above will result in a scalar transfer function:
H(s) = C
adj(sI A)
B+D
det(sI A)
=
x(t) +
u(t)
2 3
1
y(t) =
1 0 x(t)
we will determine the eigenvalues of the system matrix, the transfer function and the poles of the transfer
function.
The eigenvalues of the matrix A are obtained from:
1
(I A) =
and det(I A) = ( + 3) + 2 = ( + 1)( + 2) = 0
2 +3
and result as:
1 = 1, 2 = 2
The system transfer function is computed from
"
s+3
H(s) = C(sI A)1 B = 1 0 (s+1)(s+2)
2
(s+1)(s+2)
1
(s+1)(s+2)
s
(s+1)(s+2)
#
1
0
=
1
(s + 1)(s + 2)
The poles are 1 and 2 the same as the eigenvalues of the system matrix A.
3
In special cases, it is possible that a part of the system poles are canceled by some of the system
zeros when transforming a state-space model into a transfer function. A state-space formulation will give
more information about the system than the input-output formulation described by a transfer function.
The (internal) system poles, that are the eigenvalues of the system matrix, should be distinguished from
the poles of the transfer function as there may be some pole/zero cancelation in computing the transfer
function. Then, the denominator of the transfer function is not the same as det(sI A) since some poles
do not occur in the transfer function, (Lewis, 2008).
Example 6.1.2 Consider a system with the input u(t) and the output y(t) having the state-space model:
0 1
0
x(t)
= Ax(t) + Bu(t) =
x(t) +
u(t)
1 0
1
y(t) = Cx(t) = 1 1 x(t)
det(sI A) = det
s 0
0 1
s 1
= det
= s2 1 = (s 1)(s + 1)
0 s
1 0
1 s
The eigenvalues of the system matrix, or the system poles are 1 = 1 and 2 = 1.
or
1
(s1)(s+1)
s
(s1)(s+1)
#
0
1
s1
1
=
(s 1)(s + 1)
s+1
The transfer function has only one pole at 1 because the other pole (s = 1) was canceled with the zero at
s = 1.
The concept of stability will be modified to differentiate internal stability (given by the eigenvalues of
the system matrix) from external stability (given by the transfer function poles).
An outline of the stability conditions is given in Table 6.1 in terms of system poles or eigenvalues of the
system matrix: i = i + ji .
Stability condition
Stable
Marginally stable
Unstable
Root values
i < 0, for all i = 1, n (All the roots are in the left-half s-plane)
i = 0 for any i for simple roots and no i > 0, for i = 1, n (At least one
simple root and no multiple roots on the j axis and the other roots on
the left-half s-plane)
i > 0 for any i or i = 0 for any multiple-order root, i = 1, n (At least
one simple root in the right-half s-plane or at least one multiple-order
root on the j axis)
Table 6.1: Stability conditions for linear continuous systems, (Golnaraghi and Kuo, 2010)
When we use state-space descriptions of dynamic systems we discuss the following types of stability:
Internal stability that refers to the state variables. Stability conditions in this case are presented in
Table 6.1 and applied for the eigenvalues of system matrix i = i + ji (or the system poles)
External stability that refers to the output signal. Stability conditions are the same as those
presented in Table 6.1 but analyzed for the transfer function poles pi = i + ji .
4
Transfer functions can only be used to analyze the external stability of systems. State-space descriptions
can be used to analyze both internal and external stability. As will be presented in the following examples,
it is possible for systems to have external stability but not internal stability.
Example 6.1.3 Consider again the system given in Example 6.1.2. The system is externally stable because
it has one negative pole p = 1 of the transfer function. It has, however, two eigenvalues of the matrix A:
1 = 1 and 2 = 1. Since one of them is positive (1 > 0), the system is internally unstable. Indeed, if
we compute the states using for example the Laplace transform method we obtain:
"
#
"
#
s
1
1
0
(s1)(s+1)
X(s) = (sI A)1 BU (s) = (s1)(s+1)
U (s) = (s1)(s+1)
U (s)
1
s
s
1
(s1)(s+1)
(s1)(s+1)
(s1)(s+1)
For example, for an ideal impulse input u(t) = (t) or U (s) = 1 the states are:
n
o
1 t
1
1
1 1
(e et )
2 s1
s+1 o
1
2
n
= 1 t
x(t) = X(s) =
t
1
1
1 12 s1
+ s+1
2 (e + e )
Both states involve an exponential term et that increases indefinitely towards infinity for an ideal impulse
input, therefore the states are unstable.
The output is obtained as a function of s:
Y (s) = 1 1 X(s) = X1 (s) + X2 (s)
1
1
1
y(t) = x1 (t) + x2 (t) = (et et ) + (et + et ) = (et + et + et + et ) = et
2
2
2
For an impulse input, the output will approach zero in steady-state, thus the system is externally stable.
Example 6.1.4 Consider the system in state-space form:
2 0
1
x(t)
=
x(t) +
u(t)
0 3
2
y(t) = 1 0 x(t)
The system matrix is diagonal and the eigenvalues are 2 and 3. Because one of the eigenvalues is positive,
the system is internally unstable.
If we compute the transfer function for this system we have:
adj(sI-A)
z
}|
{
s3
0
0
s+2 1
s3
1
1
H(s) = C(sI-A) B = 1 0
=
=
(s 3)(s + 2) 2
(s 3)(s + 2)
s+2
After the pole-zero cancelation, the transfer function has only one stable pole at 2, therefore the system is
externally stable.
From the output equation notice that the output is equal to the first state, and decoupled from the second
state: y(t) = x1 (t). A block diagram of this system showing the states and the output is presented in Figure
6.1.
6.1.2
The time-domain representation of a system, expressed in terms of state variables, can also be used to design
a suitable compensation scheme for a control system. We are interested in controlling the system with a
control signal u(t) that is a function of several measurable state variables. Then, a state variable controller
operates on the information available in the measured form. If all the state variables are measurable we can
utilize them in a full-state feedback control law as shown in Figure 6.2, (Dorf and Bishop, 2008).
The conditions of controllability and observability may govern the existence of a complete solution to the
control system design problem. The solution to this problem may not exist if the system considered is not
controllable. Although most physical systems are controllable and observable, corresponding mathematical
models may not possess the property of controllability and observability. Then it is necessary to know the
conditions under which a system is controllable and observable, (Ogata, 2002).
6.1.2.1
Controllability test
The system is controllable if the input coupling in the system is sufficiently strong, which depends on the
matrix pair (A, B).
Example 6.1.5 , (Paraskevopoulos, 2002) Consider the following system:
1 0
x1 (t)
0
x 1 (t)
=
+
u(t)
0 2 x2 (t)
1
x 2 (t)
From the first equation:
x 1 (t) = x1 (t)
it is obvious that the state variable x1 is not a function of the control input u(t). Therefore, the behavior of
x1 (t) cannot be affected by the input u(t) and hence the state variable x1 is uncontrollable. From the second
state equation:
x 2 (t) = 2x2 (t) + u(t)
it follows that the variable x2 is controllable since the input u(t) affects x2 and therefore, we can select an
input u(t) such that the state reaches any predefined value in a finite period of time.
For an n-th order system:
x(t)
= Ax(t) + Bu(t)
we can determine whether the system is controllable by examining the controllability matrix:
PC = B AB A2 B An1 B
The matrix A is an n n matrix and B is an n m matrix. If the system has more than one inputs (or
m > 1) then the matrix PC is an n nm matrix; it has more columns than rows and is called a flat matrix.
The system is controllable if PC has full rank n:
rank PC = n
If the system has one input, then PC is an n n matrix. In this case it is easy to test whether PC has
rank n by making sure the determinant of PC is non-zero.
PC = B AB
1
where B =
and
0
2 3
AB =
0 5
1
2
1 2
=
PC =
0
0
0 0
Since det PC = 0, the rank of PC is less than 2. Hence, the system is not controllable.
=
x(t) +
u(t)
2 1
1
The matrix PC is
PC = B AB
0
where B =
and
1
1 1
0
1
0 1
AB =
=
PC =
2 1 1
1
1 1
Observability test
The concept of observability is useful in solving the problem of reconstructing unmeasurable state variables
from measurable variables in the minimum possible length of time. In practice, the difficulty encountered
with state feedback control is that some of the state variables are not accessible for direct measurement,
with the result that it becomes necessary to estimate the unmeasurable state variables in order to construct
the control signals. Such estimates of state variables are possible if and only if the system is completely
observable, (Ogata, 2002).
For an n-th order system:
x(t)
= Ax(t) + Bu(t)
y(t) = Cx(t)
we can determine whether the system is observable by examining the observability matrix:
C
CA
PO =
CAn1
The matrix A is an n n matrix and C is an n p matrix. If the system has more than one outputs (or
p > 1) then the matrix PO is an np n matrix; it has more rows than columns and it is called a sharp
matrix.
The system is completely observable (all states are observable) if PO has rank n:
rank PO = n
Example 6.1.8 , (Nise, 2004). Consider a system described by the state and output equations:
0
1
0
0
x(t)
= Ax(t) + Bu(t) = 0
0
1 x(t) + 0 u(t)
4 3 2
1
y(t) = Cx(t) = 0 5 1 x(t)
C
1
0
0
PO = CA , where C = 0 5 1 , CA = 0 5 1 0
0
1 = 4 3 3
CA2
4 3 2
0
1
0
0
5
1
CA2 = 4 3 3 0
0
1 = 12 13 9 PO = 4 3
3
4 3 2
12 13 9
Since the determinant det PO = 344, PO is full rank equal to 3. The system is thus observable.
8
If a system is observable, it is possible to design a state observer that will estimate the unmeasurable
states. The structure and design of a state observer will not be presented in this course, but details can be
found in most control books as (Ogata, 2002), (Dorf and Bishop, 2008), (Nise, 2004).
6.2
We shall present a design method commonly called pole placement. We assume that all state variables are
measurable and available for feedback. If the system is completely state controllable, the poles of the closedloop system may be placed at any desired location by means of state feedback through an appropriate state
feedback matrix. The method will be presented for single-input-single output systems where the control
signal u(t) and the output y(t) are scalars, (Ogata, 2002).
The purpose of the control law is to allow us to assign a set of pole locations for the closed-loop system
that will correspond to satisfactory dynamic response in terms of transient response specifications.
We will consider first that the reference input is zero r(t) = 0 and then, we shall discuss the case when
the reference is non-zero.
6.2.1
The selection of pole locations is the first step in pole-placement design approach. It is always useful to keep
in mind that the control effort required in related to how far the open-loop poles are moved by the feedback.
Furthermore, when a zero is near a pole, the system may be nearly uncontrollable and moving such poles
requires large control gains and a large control effort. The approach presented here - dominant second-order
poles - deals with poles selection without explicit regard for their effect on control effort; however, the
designer is able to temper the choices to take control effort into account, (Franklin et al., 2006).
The step response corresponding to the second-order transfer functions with natural frequency n and
damping ratio was discussed in Chapter 3 (Section 3.4). The overshoot, rise time, peak time and settling
time can be related directly to the poles location. We can choose the closed-loop poles for a higher order
system as a desired pair of dominant second-order poles and select the rest of the poles to have real parts
corresponding to sufficiently damped exponential terms in the system response, so that the system will
mimic a second-order response with reasonable control effort. We also must make sure that the zeros are
far enough into the left half-plane to avoid any appreciable effect on the second-order behavior, (Franklin
et al., 2006).
The relations between the second-order poles and the response specifications are presented in Chapter 3
(sect.3.4) and outlined below. For a second order system:
G(s) =
n2
s2 + 2n s + n2
p
1 2j
The relations between the system parameters and n and the system response specifications are as
follows:
The settling time ts is related to the real part of the poles n by:
ts =
4
n
tr =
p
=
d
n 1 2
1 2
p
=
d
n 1 2
where is the angle between the line connecting the pole s1 and the origin and the negative real axis.
The overshoot Mp is related to the damping ratio :
2
Mp = e/ 1
The relation between them is such that a large damping will give a small overshoot while a small
damping will result in a large overshoot. The damping ratio is related to the location of the complex
poles, as resulted from Figure 6.4, by:
p
1 2
cos = , or tan =
6.2.2
= Ax(t) + Bu(t)
y(t) = Cx(t)
(6.3)
where x(t) is the n 1 state vector, u(t) is the (scalar) control signal, y(t) the (scalar) output signal, A is
an n n scalar matrix (the system matrix), B is an n 1 constant matrix (the input matrix) and C is an
1 n constant matrix (the output matrix).
The reference input is considered zero: r(t) = 0, i.e. the control law will be designed such that all state
variables will approach zero in steady-state from non-zero initial conditions caused for example by external
disturbances.
We shall choose the control law (control signal) to be a linear combination of the state variables:
x1
x2
u(t) = Kx(t) = k1 k2 kn
(6.4)
= k1 x1 k2 x2 kn xn
xn
10
(a)
(b)
Substituting the feedback law given by (6.4) into the state equation of system (6.3) we obtain the state
equation for the closed-loop system:
x(t)
(6.5)
The stability of the closed-loop system (6.5) and its transient characteristics are determined by the
eigenvalues of the closed-loop system matrix A BK. If the matrix K is chosen properly, the poles of the
closed-loop system can be placed in any desired location.
The characteristic equation of the closed-loop system is:
det[sI (A BK)] = 0
(6.6)
When evaluated, this gives an n-th order polynomial in s containing the elements of the gain matrix K: k1 ,
k2 , ..., kn . The control law design then consists of computing the gain K so that the roots of equation (6.6)
are in desirable locations.
Assume that the desired location of the closed-loop poles are known:
desired poles: p1 , p2 , , pn
The corresponding desired characteristic equation is:
(s p1 )(s p2 ) (s pn ) = 0
(6.7)
The required elements of K are obtained by matching coefficients of equations (6.6) and (6.7). This will
result in the closed-loop system characteristic equation to be identical to the desired one and the poles to
be placed in the desired location.
Example 6.2.1 , (Ogata, 2002) Consider the
0
x(t)
= 0
1
1
0
0
0
1 x(t) + 0 u(t)
5 6
1
We will design a state feedback control law u(t) = Kx(t) such that the closed-loop poles are located at:
p1 = 2 + j4,
p2 = 2 j4;
11
p3 = 10
0 0
PC = B AB A2 B = 0 1
1 6
1
6
31
and we find the determinant is det PC = 1. Since the rank of the controllability matrix is rank PC = 3,
the system is controllable.
If we consider that the output of this system is the first state variable y(t) = x1 (t), the system response
for a zero input u(t) = 0 and initial conditions x(0) = [1 0 0]T is shown in Figure 6.6.
Response to Initial Conditions
Amplitude
0.8
0.6
0.4
0.2
0
0
10
15
20
25
Time (sec)
and the characteristic equation of the closed-loop system, given by equation (6.6) is:
det[sI (A BK)] = 0
or
s 0 0
0
1
0
0
1
0
0
1 + 0
0
1 k1 k2 k3 = 0
det 0 s 0 0
0 0 s
1 5 6
1 5 6
s
1
0
= s3 + (6 + k3 )s2 + (5 + k2 )s + 1 + k1 = 0
s
1
det 0
1 + k1 5 + k2 s + 6 + k3
(6.8)
The characteristic equation of the closed-loop system for the desired poles is:
(6.9)
If we set the characteristic equation of the closed-loop system (6.8) equal to the characteristic equation
for the desired poles (6.9) we obtain:
6 + k1 = 14,
5 + k2 = 60,
1 + k1 = 200
k2 = 55,
k3 = 8
K = 199 55 8
Response to Initial Conditions
1.2
1
Amplitude
0.8
0.6
0.4
0.2
0
0.2
0
10
15
20
25
Time (sec)
Figure 6.7: Response of the closed-loop system to initial conditions (green line) compared to the response
of the open-loop system (blue line)
The settling time is indeed about 2 seconds, although the response of the closed-loop system exhibits some
oscillations
Example 6.2.2 Consider the problem of balancing the inverted pendulum shown in Figure 6.8. The angle
=
x(t) +
u(t)
9 0
2
T
The system poles are: 3 and 3. One of them is positive therefore the open-loop system is unstable.
We check first the controllability matrix:
0 2
PC = B AB =
2 0
13
The determinant is det PC = 4 and the rank of the controllability matrix is 2, thus the system is controllable.
The design specifications are to design a state variable feedback matrix K that will give a closed-loop
response with an overshoot of about 4.3% and a settling time of about 1 second. This will make the rod of
the inverted pendulum balance upright: the states will approach zero in steady-state, i.e. the angle and the
angular velocity will be zero in steady state.
We compute the desired poles of the closed-loop system that will give the desired behavior:
The damping ratio that gives an overshoot of 4.3% can be computed as equal to = 2/2.
The settling time is
ts =
4
=
n
2
2
8
n =
2
1 2 = 4 4j
+
k1 k2 = 0
0 s
9 0
2
or
det
and:
s 0
0
1
s
1
= det
=0
0 s
9 + 2k1 2k2
9 2k1 s 2k2
s(s 2k2 ) (9 + 2k2 ) = s2 2sk2 9 2k1 = 0
By setting the characteristic equation of the closed loop system equal to the characteristic equation for
the desired poles we obtain:
2k2 = 8,
K = 20.5 4
The block diagram of the closed loop system with the state feedback control law is the same as in Figure
6.5. A plot of the closed-loop system response to initial conditions (and zero input) is shown in Figure 6.9.
From the figure, the settling time is about 1 second. The overshoot is, in this case, the difference between
Response to Initial Conditions
1.2
1
Amplitude
0.8
0.6
0.4
0.2
0
0.2
0
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
Time (sec)
6.2.3
Tracking systems
= Ax(t) + Bu(t)
y(t) = Cx(t)
(6.10)
where x(t) is the n 1 state vector, u(t) is the (scalar) control signal, y(t) the (scalar) output signal, A is
an n n scalar matrix (the system matrix), B is an n 1 constant matrix (the input matrix) and C is an
1 n constant matrix (the output matrix).
The goal now, is to drive the output y(t) to a given reference input r, with zero-steady-state error.
One solution is to scale the reference input r and choose the control law (control signal) to be a linear
combination of the state variables (see Figure 6.10):
x1
x2
(6.11)
u(t) = N r Kx(t) = N r k1 k2 kn
= N r k1 x1 k2 x2 kn xn
xn
where r and N are scalar values for a SISO system.
The feedback matrix K is determined by pole placement so that the closed-loop system has a characteristic equation given by a set of desired closed-loop poles.
At steady-state the derivative of the state vector is zero (x = 0). If the steady-state value of the state
vector is xss and the steady-state value of the output is yss , we have:
0 = (A BK)xss + BN r
yss = Cxss
or
(A BK)xss = BN r,
xss = (A BK)1 BN r
The steady-state error is zero if yss = r, so the value of N can be computed from:
yss = C(A BK)1 BN r = r, N =
15
1
C(A BK)1 B
state-space by:
3
1
x(t) +
u(t)
0
0
1 x(t)
We will design a control system using state-feedback so that the closed-loop system has two poles located at
p1,2 = 1 j and the steady-state error for a step input is zero.
We check controllability first. The controllability matrix, the determinant and the rank are:
1 2
PC = B AB =
, det PC = 1, rankPC = 2
0 1
The system is controllable.
The feedback gain matrix K is obtained by pole placement. If the desired poles of the closed-loop system
are p1,2 = 1 j, the characteristic equation for these poles is:
(s + 1 j)(s + 1 + j) = s2 + 2s + 2 = 0
The characteristic equation of the closed-loop system with the feedback gain K = k1 k2 is:
s 0
2 3
1
det[sI (A BK)] = det
+
k1 k2 =
0 s
1 0
0
s 2 + k1 3 + k2
=
=0
1
s
or:
s(s 2 + k1 ) (1)(3 + k2 ) = s2 + (2 + k1 )s 3 + k2 = 0
By setting the characteristic equation of the closed loop system equal to the characteristic equation for
the desired poles we obtain:
2 + k1 = 2,
and the feedback gain matrix is:
3 + k2 = 2, and k1 = 4, k2 = 5
K= 4 5
Note that this matrix will only ensure the desire transient characteristics (according to the desired
closed-loop poles). The zero steady-state error for a step input is not guaranteed. Therefore, we
will compute the gain N that will scale the reference input so that the output equals the reference at
steady-state.
Compute N from:
1
N =
C(A BK)1 B
2 3
1
2 2
(A BK) =
4 5 =
1 0
0
1
0
0
1
(A BK)1 =
1/2 1
1
0
1
1
1
C(A BK) B = 1 1
= 1/2 1
= 1/2
1/2 1 0
0
1
N =
= 2
1/2
The step response of the closed-loop system, implemented according to Figure 6.10, is shown in Figure 6.11.
The output follows the unit step, thus yss = 1 and the steady-state error is zero: ess = 0.
16
Step Response
Amplitude
0.5
0.5
0
Time (sec)
17
Bibliography
Dorf, R. C. and Bishop, R. H. (2008). Modern Control Systems. Pearson Prentice Hall, 11th edition.
Franklin, G. F., Powell, J. D., and Emami-Naeini, A. (2006). Feedback Control of Dynamic Systems. Pearson
Prentice Hall, 5th edition.
Golnaraghi, F. and Kuo, B. (2010). Automatic Control Systems. John Wiley and Sons, 9th edition.
Lewis, F. L. (2008).
EE 4314 Control Systems, University of Texas at Arlington.
http://www.uta.edu/utari/acs/ee4314/ee4314shd.htm.
online:
18
Contents
7 Digital control systems
7.1
Sampled-data systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1.1
Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1.2
Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1.2.1
7.1.2.2
The sampler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1.3
Signal reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1.4
The z-Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7.1.5
7.1.6
Blocks in cascade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.1.7
Inverse transformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.1.8
7.1.9
7.1.7.1
7.1.7.2
7.1.8.2
Simple substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
7.1.8.3
Tustin substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
7.2
7.3
7.4
Digital controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
7.5
7.4.1
7.4.2
7.4.3
Exercises
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
7.5.1
7.5.2
7.5.3
Chapter 7
Sampled-data systems
Introduction
The control strategies that have been presented before were described by Laplace transform which are
assumed to be built using analog electronics. However, most control systems systems today use digital
computers (usually microprocessors) to implement the controllers. The use of a digital computer as a
compensator (controller) device has grown during the past two decades as the price and reliability of digital
computers has improved, (Franklin et al., 2006; Dorf and Bishop, 2008). The intent of this chapter is to
expand on the design of control systems that will be implemented in a digital computer.
Figure 7.1(a) shows the topology of the typical continuous system. The computation of the error signal e
and the dynamic compensation can all be accomplished in a digital computer as shown in Figure 7.1(b). The
fundamental differences between the two implementations are that the digital system operates on samples
of the sensed plant output rather than on the continuous signal and that the control provided by the
compensator must be generated by algebraic recursive equations, (Franklin et al., 2006).
We consider first the action of the analog-to-digital (A/D) converter on a signal. This device samples a
physical variable, most commonly an electrical voltage, and converts it into a binary number that usually
consists of 10 to 16 bits. Conversion of the measured output from the analog signal m(t) to the samples,
m(kT ), occurs repeatedly at instants of time T seconds apart. T is the sample period, and 1/T is the sample
rate in Hertz.
The sampled signal is m(kT ), where k can take on any integer value. It is often written simply as m(k).
We call this type of variable a discrete signal to distinguish it from a continuous signal such as m(t), which
changes continuously in time. A system having both discrete and continuous signals is called a sampled
data system.
Usually, the computer logic includes a clock that supplies a pulse, or interrupt, every T seconds, and the
A/D converter sends a number to the computer each time the interrupt arrives. An alternative implementation, often referred to as free running, is to access the A/D converter after each cycle of code execution has
been completed. In the former case the sample period is precisely fixed; in the latter case the sample period
is fixed essentially by the length of the code, provided that no logic branches are present, which could vary
the amount of code executed.
There also may be a sampler and an A/D converter for the input command r(t), which produces the
discrete r(kT ), from which the sensed output m(kT ) will be subtracted to arrive at the discrete error signal
e(kT ).
The continuous compensation is approximated by difference equations, which are the discrete version of
differential equations and can be made to duplicate the dynamic behavior of the continuous compensator if
2
(a)
(b)
Figure 7.1: Block diagrams for a basic control system: (a) continuous and (b) with a digital computer,
(Franklin et al., 2006)
the sample period is short enough. The result of the difference equations is a discrete u(kT ) at each sample
instant. This signal is converted to a continuous u(t) by the digital-to-analog (D/A) converter and the hold:
the D/A converter changes the binary number to an analog voltage, and a zero-order hold maintains that
same voltage throughout the sample period. The resulting u(t) is then applied to the actuator in precisely
the same manner as the continuous implementation, (Franklin et al., 2006).
There are two basic techniques for finding the difference equations for the digital controller:
One technique, called discrete equivalent, consists of designing a continuous compensation using methods described in the previous chapters, then approximating the compensator transfer function using
methods that will be described in the following sections.
The other technique is discrete design. Here the difference equations are found directly without
designing the continuous compensator first.
7.1.2
Sampling
In choosing the sampling period T , or the sampling frequency s = 2/T , most authors approaching this
field refer to Shannons sampling theorem. It states that:
A function f (t) that has a bandwidth b is uniquely determined by a discrete set of sample values
provided that the sampling frequency is greater than s = 2b . The sampling frequency s = 2b is called
the Nyquist frequency (Burns, 2001).
It is rare in practical situations to work near the limit given by Shannons theorem. A useful rule in
applications is to sample the signal at about 10 times higher than the highest frequency thought to be present
(Burns, 2001).
Example 7.1.1
For the original signal in Figure 7.2(a): u(t) = cos 2t, the frequency is b = 2 rad/s.
The sampling frequency was chosen the Nyquist frequency: s = 2b = 4 rad/s, that is sufficient
to capture each peak (positive and negative) of the signal. The sampling period is: T = 2/s =
1.57s.
If we sample the signal higher than the Nyquist frequency, with s = 10b = 20 rad/s, i.e the
sampling period is T = 2/s = 0.314s, then, there are more than enough samples to capture all
variations in the signal.
For the signal shown in Figure 7.2(b): u(t) = cos t + cos 2t + cos 4t, the highest frequency is b = 4
rad/s.
The sampling frequency was chosen the Nyquist frequency: s = 2b = 8 rad/s, that is sufficient
to reproduce the peaks of the original signal. The sampling period is: T = 2/s = 0.78s.
If we sample the signal higher than the Nyquist frequency, with s = 10b = 40 rad/s, i.e the
sampling period is T = 2/s = 0.157s, then, all variations in the signals are captured.
s = 2b
1
0.5
0
0.5
1
0
4
time
= 10
s
1
0.5
0
0.5
1
0
4
time
(a)
s = 2b
3
2
1
0
1
2
0
4
time
s = 10b
3
2
1
0
1
2
0
4
time
(b)
Figure 7.2: Sampled signals. (a) u(t) = cos 2t, (b) u(t) = cos t + cos 2t + cos 4t
If a signal is sampled below Shannons limit, then a lower frequency signal, called an alias may be
constructed as shown in Figure 7.3.
4
Example 7.1.2 The original signal in Figure 7.3(a) is u(t) = cos(2t), thus the frequency is b = 2 rad/s,
and in Figure 7.3(b) the signal is u(t) = cos t + cos 2t + cos 4t, with the highest frequency b = 4rad/s.
The sampling frequency was chosen in both cases as s = 1.5b . The information on the sampled signals is
misleading and apparently the signal has a different form, with a lower frequency. This situation is known
as aliasing.
(a)
= 1.5
s
1
0.5
0
0.5
1
0
10
15
10
15
time
= 1.5
s
3
2
1
0
1
2
0
5
time
(b)
Figure 7.3: Alias due to undersampling (a) u(t) = cos 2t, (b) u(t) = cos t + cos 2t + cos 4t
To ensure that aliasing does not take place, it is common practice to place an anti-aliasing filter before
the A/D converter. This is an analog low-pass filter with a break frequency of 0.5s (and s > 10b ). The
higher s is in comparison to b , the more closely the digital system resembles an analog one (Burns, 2001).
7.1.2.1
In choosing the sampling frequency (or the sampling time) for a continuous system, several approaches
are available. It is rather a problem of experience than some exact procedure. In general, it has a strong
influence on the dynamic properties of the controlled system as well as on the whole closed-loop system.
Shannons theorem usually gives a lower limit for the sampling frequency.
One rule is to choose the sampling frequency s , as, (Landau and Zito, 2006):
6b < s < 25b
This corresponds to the existence of two to nine samples on the rise time of a step response, (Landau and
Zito, 2006).
Although the methods to obtain a discrete equivalent of a continuous transfer function will be presented
in the following sections, the choice of the sampling time for a continuous system is illustrated here with
some examples.
Example 7.1.3 Consider a first order and a second order system with the transfer functions:
G1 (s) =
1
1
, G2 (s) =
T0 s + 1
n2 s + 2n s + 1
For T0 = 1, = 0.7 and n = 1. For these values of system parameters, the systems bandwidth
frequency may be approximated by b1 = 1/T0 and b2 = n (an attenuation higher than 3dB is introduced
for frequencies higher than b ).
5
Note that for other values of the system parameters (gain, damping factor, natural frequency) the system
bandwidth may be different from the approximations we made before.
The Shannon theorem will give the following sampling frequency (and the sampling period), for each
system:
2
2
2T0
s1 = 2b1 =
, Ts =
=
= T0
Ts
2b1
2
2
2
2
s2 = 2b2 =
, Ts =
=
=
Ts
2b2
2n
n
The step responses of these two systems are presented in Figure 7.4 - continuous system response and the
discrete system response.
=2
s
=2
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0
0
10
time
10
time
s=25b
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0
0
10
time
10
time
s=6b
s=25b
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
0
0
10
time
10
time
The sampler
A sampler is basically a switch that closes every T seconds for one instant of time.
Consider an ideal sampler as shown in Figure 7.7.
Sampler
r(t)
r*(t)
sampled signal
continuous signal
r(kT )(t kT )
k=0
r(t)
r(kT)
r(2T)
r(3T)
r(4T)
r(T)
Time (kT)
Time (t)
Figure 7.8: (a) An input r(t) and (b) the sampled signal
7.1.3
Signal reconstruction
A digital-to-analog (D/A) converter serves as a device that converts the sampled signal r (t) to a continuous
signal p(t). The D/A converter can usually be represented by a zero-order hold (ZOH) circuit, as shown in
Figure 7.9.
zero-order hold
r(t)
r*(t)
G 0 (s)
p(t)
p(t)
1
Sampler
T
Time
Figure 7.9: A sampler and zero-order circuit (left); the response of a zero-order hold to an impulse input
r(kT), which equals 1 when k=0 and equals zero when k6=0 (right)
The ZOH takes the value r(kT ) and holds it constantly for kT t (k + 1)T as shown in Figure 7.9
for k=0. Thus we use r(kT )during the sampling period.
A sampler and ZOH can accurately follow the input signal if T is small compared to the transient changes
in the signal. The response of a sampler and ZOH for a ramp input is shown in Figure 7.10.
2T 3T
Time
Figure 7.10: The response of a sampler and zero-order hold for a ramp input r(t)=t
A ZOH converts a series of impulses into a series of pulses of width T . As shown in Figure 7.11, a unit
impulse, at time t, is converted into a pulse of width T , which may be created by a positive unit step at
time t (1(t)) followed by a negative unit step (1(t T )).
{u(t)}
1 1
1 esT
= {1(t) 1(t T )} = esT =
{(t)}
s s
s
(7.1)
7.1.4
The z-Transform
The z-transform is the main analytical tool for SISO discrete-time systems and it analogous to the Laplace
transform for continuous systems. The symbol z can be associated with a discrete time shifting in a difference
equation in the same way that s can be associated with differentiation in a differential equation.
Because the output of the ideal sampler, r (t), is a series of impulses with values r(kT ) we have:
r (t) =
r(kT )(t kT )
(7.2)
k=0
[r (t)] =
r(kT )eksT
(7.3)
k=0
We now have an infinite series that involves factors of esT and its powers. We define
z = esT
(7.4)
where this relationship involves a conformal mapping from the s-plane to the z-plane. We then define a new
transform, called the z-Transform, so that:
Z[r(t)] = Z[r (t)] = R(z) =
r(kT )z k
(7.5)
k=0
As an example, let us determine the z-transform of the unit step function u(t)=1. We obtain:
Z[u(t)] =
u(kT )z k =
k=0
z k
(7.6)
k=0
since u(kT)=1, for k0. This series can be written in closed form as:
U (z) =
1
z
=
1
1z
z1
(7.7)
Obs. Recall that the infinite geometric series may be written: (1 bx)1 = 1+ bx+ (bx)2 + ... if (bx)2 < 1
Z[e
] = F (z) =
akT k
k=0
(zeaT )k
(7.8)
k=0
1
z
=
aT
1
1 (ze )
z eaT
(7.9)
(7.10)
Table 1. z-Transforms
x(t)
X(s)
1, t = 0
(t) = {
1
0, t = kT, k 6= 0
1, t = kT
0, t 6= kT,
X(z)
1
ekT s
z k
1
s
z
z1
1
s2
Tz
(z1)2
eat
1
s+a
z
zeaT
1 eat
1
s(s+a)
(1eaT )z
(z1)(zeaT )
sint
s2 + 2
zsinT
z 2 2zcosT +1
(t kT ) = {
X(z)
kX(z)
x1 (t) + x2 (t)
X1 (z) + X2 (z)
x(t + T )
zX(z) zx(0)
tx(t)
T z dX(z)
dz
eat x(t)
X(zeaT )
7.1.5
Consider the block diagram shown in Figure 7.12. The signal U (s) is a sampled input to G(s) which gives
a continuous output Y (s) which when sampled becomes Y (s). Figure (b) shows the pulse transfer function
where U (z) is equivalent to U (s) and Y (z) is equivalent to Y (s), (Burns, 2001).
7.1.6
Y (z)
U (z)
(7.11)
Blocks in cascade
In Figure 7.13 there are samplers either side of the blocks G1 (s) and G2 (s). The pulse transfer function is:
Y (z)
= G1 (z)G2 (z)
U (z)
(7.12)
(7.13)
7.1.7
Inverse transformation
z2
,
z 2 1.36z + 0.36
(7.14)
(7.15)
(7.16)
k=0
Thus:
x(0) = 1,
7.1.7.2
x(T ) = 1.36,
x(2T ) = 1.5,
etc
(7.17)
Y (z)
b0 + b1 z 1 + b2 z 2 + ...
=
X(z)
1 + a1 z 1 + a2 z 2 + ...
(7.18)
By cross-multiplication we get:
(1 + a1 z 1 + a2 z 2 + ...)Y (z) = (b0 + b1 z 1 + b2 z 2 + ...)X(z)
(7.19)
(7.20)
(7.21)
or
(7.22)
or simply:
yk = a1 yk1 + a2 yk2 + ... + b0 xk + b1 xk1 + b2 xk2 + ...
(7.23)
z
Y (z)
=
X(z)
z 0.368
(7.24)
(7.25)
(7.26)
or
It can be expressed as a difference equation:
yk = 0.368yk1 + xk
If the first two samples are known, the values for yk can be determined by an iterative procedure.
12
(7.27)
7.1.8
7.1.8.1
The conversion of an analog transfer function to a digital one is generally best done by one of the approximations of the z-transform. Just as the Laplace transform maps continuous time quantities into the complex
frequency domain, thus allowing linear transfer function models to be written in terms of the variable s, so
the z-transform maps linear transfer function models into discrete time, and allows transfer function models
for discrete time systems to be written in terms of a variable z.
One approach in digitizing an analog transfer function is transformation into z-domain, as described in
the previous subsections. Given an s-domain transfer function G(s), the z-transform can be obtained from:
1 esT
G(s)
1
G(s) = (1 z )Z
(7.28)
G(z) = Z (G0 (s)G(s)) = Z
s
s
where G0 (s) is the transfer function of a zero-order hold, and T is the sampling time.
Example 7.1.7 Let us consider the system in Figure 7.15, for T = 1.
zero-order hold
r(t)
process
p(t)
r*(t)
G 0(s)
T=1
G P (s)=
c(t)
1
s(s+1)
1 esT
s
(7.29)
G(s) = (1 e
G(z) = Z[G(s)] = (1 z
1
1
1
+
2
s
s s+1
1
1
1
)Z 2 +
s
s s+1
(7.30)
(7.31)
Using the entries of Table 1 to obtain the z-transform of each term we have:
G(z) = Z[G(s)] = (1 z
Tz
z
z
+
2
(z 1)
z 1 z eaT
(zeT z + T z) + (1 eT T eT )
(z 1)(z eT )
(7.32)
ze1 + 1 2e1
0.3678z + 0.2644
0.3678z + 0.2644
=
= 2
1
(z 1)(z e )
(z 1)(z 0.3678)
z 1.3678z + 0.3678
13
(7.33)
The response of this system to unit impulse is obtained for R(z)=1 so that C(z)=G(z)1. We may obtain
C(z) by dividing the denominator into the numerator as:
(7.34)
The calculation yields the response at the sampling instants and can be carried out asfar as is needed for
C(z). From equation (7.5) we have:
C(z) =
c(kT )z k
(7.35)
k=0
In this case we have obtained c(kT) as follows: c(0) = 0, c(T ) = 0.3678, c(2T ) = 0.7675, c(3T ) =
0.9145...
Note that c(kT ) provides the values of c(t) at t = kT .
R(z)
G(z)
C(z)
(7.36)
Simple substitution
This variable z, strictly arises from a discrete time summation expression related to the definition of the
Laplace transform. However, it is usually approximated by various substitutions for s in the linear transfer
function model. These different possible derivations lead to different possible z-transform models of the
same system, each having slightly different properties.
The variable z is first introduced in the simplest manner possible. That is, a multiplication by z 1 is
used as a notation to represent a delay of one time step in a discrete-time signal.
In obtaining z-transfer functions from linear transfer functions by making substitutions for s, many of
the generally used substitutions depend on the property that multiplying by s implies differentiation in
the time domain. Multiplying the z-transform by z 1 implies an additional delay of one sampling interval.
The argument for the simplest of the substitutions suggests that the gradient of the time response of, for
example, a signal e(t) at the present time (instant k) is given by:
de
(latest sample of e) (last sample of e)
ek ek1
|k =
=
dt
sampling interval
T
In the z-domain, when ek becomes E(z) (that is, the z-transform of ek ) this will convert to:
E(z) E(z) z 1
T
14
(7.37)
or
E(z)
1 z 1
T
Multiplying E(z) by 1zT is therefore equivalent to differentiation, that is, to multiplying E(s) by s.
This means that substituting the following expressions for s in a linear transfer function:
1
1 z 1
T
s=
(7.38)
will give an approximately equivalent discrete-time version (in z) for the analog linear transfer function.
It is then easy to convert the z-transfer function to an algorithm from which a computer program can be
written.
7.1.8.3
Tustin substitution
2(1 z 1 )
T (1 + z 1 )
(7.39)
This more complicated substitution often allows close approximation of the behavior of the analog
controller using a longer sampling interval (T ) than would be the case with the simpler substitution for
s. The longer sampling interval is beneficial in that either a slower processor can be used to perform the
calculation, or a given processor can cope with a faster sampling rate.
Example 7.1.8 Consider a continuous system having the transfer function:
G(s) =
1
s+4
(7.40)
First we shall determine the pulse transfer function using the ZOH method:
G1 (z) = Z{G0 (s)G(s)} = Z{
1 esT 1
1 1
1
} = (1 z 1 ) Z{
}
s
s+4
4 s s+4
(7.41)
z11 z
z
1 1 e4T
(
)
=
z 4 z 1 z e4T
4 z e4T
1z 1
T ,
G2 (z) =
(7.42)
+4
T
1 + 4T z 1
(7.43)
Using the Tustin substitution, the pulse transfer function result as:
G3 (z) =
1
2(1z 1 )
T (1+z 1 )
+4
T (1 + z 1 )
2 + 4T + (4T 2)z 1
(7.44)
For T = 0.1, the pulse transfer functions (written in z instead of z 1 ) in all cases above are:
G1 (z) =
0.08242
,
z 0.6703
G2 (z) =
0.1z
0.04167z + 0.04167
, G3 (z) =
1.4z 1
z 0.6667
The simulated unit step response in all three cases is shown in Figure 7.17.
15
(7.45)
Step Response
0.25
continuous
ZOH
simple
Tustin
Amplitude
0.2
0.15
0.1
0.05
0.5
1.5
2.5
Time (sec)
G2 (z) = (1 z
or
G1 (s)
s
= (1 z 1 )Z
16
1
s2
= (1 z 1 )
Tz
T
=
(z 1)2
z1
1
1
1
1
)Z
= (1 z )Z
= (1 z )Z
s(s + 1)
s s+1
z1
z
z
1 eT
G2 (z) =
=
z
z 1 z eT
z eT
G2 (s)
s
T 1 eT
z 1 z eT
(b) In the second case, the continuous equivalent transfer function is:
G1 G2 (s) =
1
s(s + 1)
Then:
G1 G2 (s)
1
1
1
1
} = (1 z 1 )Z{ 2
} = (1 z 1 )Z{
+ 2 }
s
s (s + 1)
s+1 s
s
z1
z
Tz
z
G0b (z) =
+
T
2
z
ze
(z 1)
z1
and:
G0b (z) =
z1
T
(z 1)2 + (z eT (z 1)(z eT ))
zeT + 1 2eT
+
1
=
=
z eT
z1
(z 1)(z eT )
(z 1)(z eT )
It is clear that G0a (z) 6= G0b (z) for any positive value of T .
7.1.9
Consider the sampled data z-transform model of a system with sampled output signal C(z) shown in Figure
7.19. The closed-loop transfer function T (z) (using block diagram reduction) is:
R(z)
G(z)
C(z)
(7.46)
We assume that G(z) is the z-transform of G0 (s)Gp (s), where G0 (s) is the zero-order hold and Gp (s) is
the plant transfer function.
A feedback control system with a digital controller is shown in Figure 7.20. The z-transform of the block
diagram model is:
C(z)
G(z)D(z)
= T (z) =
(7.47)
R(z)
1 + G(z)D(z)
C(z)
R(z)
D(z)
G(z)
17
zero-order hold
r(t)
e(t)
process
e*(t)
G 0(s)
T=1
G P (s)=
c(t)
1
s(s+1)
z
z1
(7.49)
z(0.3678z + 0.2644)
0.3678z 2 + 0.2644z
= 3
2
(z 1)(z z + 0.6322)
z 2z 2 + 1.6322z 0.6322
(7.50)
R(z) =
then
C(z) =
(7.48)
(7.51)
The values of c(kT) are shown in Figure 7.22 (b). The complete response of the sampled-data closed-loop
system is shown and contrasted to the response of a continuous system (where T=0). The overshoot of the
sampled data system is 40% in contrast to 17% for a continuous system. Furthermore, the settling time is
twice as long as of the continuous system.
1.4
1.2
(b)
(a)
c(t)
0.8
0.6
0.4
0.2
Time(seconds)
1
0
Figure 7.22: The response of a second-order system (a)continuous T=0 (b) sampled system T=1
18
7.2
The s-plane and the z-plane are related by a conformal mapping specified by the analytic complex function
z = esT = e(+j)T = eT ejT
where T is the sampling time and:
Re[s] = , Im[s] = j, and |z| = eT ,
6
z = T
7.3
A linear continuous feedback control system is stable if all the poles of the closed-loop transfer function T (s)
lie in the left half of the s-plane. The s-plane is related to the z-plane by the transformation:
z = esT = e(+j)T
19
(7.52)
(7.53)
z = T
(7.54)
and
6
In the left-hand s-plane, the real part of s, < 0 and therefore the related magnitude of z varies between
0 and 1 (0 < eT < 1). Therefore the imaginary axis of the s-plane corresponds to the unit circle in the
z-plane, and the inside of the unit circle corresponds to the left half of the s-plane.
Therefore we can state that a sampled data system is stable if all the poles of the closed-loop transfer
function T (z) lie within the unit circle of the z-plane.
As shown in Figure 7.25 (Nise, 2004), each region of the s-plane can be mapped into a corresponding
region on the z-plane. Points that have negative values of (left half s-plane, region A) map into the inside
of the unit circle on the z-plane. Points on the j axis, region B, have zero values of and yield points on
the unit circle on the z-plane. The points that have positive values of are in the right half of the s-plane,
region C. The magnitudes of the mapped points are esigmaT > 1, thus they are mapped into points outside
the circle on the z-plane.
Example 7.3.1 Consider a feedback control system as the one shown in Figure 7.26, where G(z) is the
z-transform of open-loop transfer function:
G(s) =
k
s(s + 1)
1 esT
k
s
s(s + 1)
(7.55)
= (1 z
)Z
k
s2 (s + 1)
(7.56)
For T = 1, we have:
G(z) =
k(0.367z + 0.264)
z 2 1.367z + 0.367
(7.57)
G(z)
k(0.367z + 0.264)
= 2
1 + G(z)
z + (0.367k 1.367)z + 0.264k + 0.367
(7.58)
The poles of the closed-loop transfer function T (z) are the roots of the equation q(z) = 1 + G(z) = 0 (the
characteristic equation).
20
R(z)
G(z)
C(z)
(7.59)
The roots of q(z) = 0 are: z1 = 0.5 + 0.6173j and z2 = 0.5 0.6173j. The system is stable because the roots
lie within the unit circle.
When k = 10 we have:
q(z) = z 2 + (0.367k 1.367)z + 0.264k + 0.367 = z 2 + 2.31z + 3.01
(7.60)
The roots of q(z) = 0 are: z1 = 1.1550 + 1.2946j and z2 = 1.1550 + 1.2946j. The system is not stable
because the roots lie outside the unit circle.
21
7.4
Digital controllers
The general form of the pulse transfer function between an input X(z) and an output Y (z) is given by:
Y (z)
b0 + b1 z 1 + + bm z m
=
X(z)
1 + a1 z 1 + + an z n
where ai s and bi s are real coefficients. By cross multiplication we obtain:
Y (z)(1 + a1 z 1 + + an z n ) = X(z)(b0 + b1 z 1 + + bm z m )
In terms of difference equation:
y(kT ) = a1 y((k 1)T ) + + an y((k n)T ) = b0 x(kT ) + b1 x((k 1)T ) + + bm x((k m)T )
or, by simplifying the notation kT k, and in general (k p)T k p, we obtain:
y(k) = a1 y(k 1) + + an y(k n) = b0 x(k) + b1 x(k 1) + + bm x(k m)
7.4.1
Consider an ideal PID controller in continuous time domain, where u(t) is the control signal and e(t), the
error signal:
Z t
de(t)
u(t) = KP e(t) + KI
e( )d + KD
dt
0
e( )d |t=kT
0
k1
X
T e(nT )
n=0
If the notation is simplified by taking kT k, and (k 1)T k 1 the discrete PID algorithm is then:
u(k) = KP e(k) + KI T
k1
X
e(n) + KD
n=0
e(k) e(k 1)
T
(7.61)
7.4.2
The digital PID controller can also be formulated from the Laplace domain. The ideal PID algorithm is
written as:
U (s)
KI
= KP +
+ KD s
E(s)
s
We can apply s z transformations to get an equivalent discrete PID controller. If, for example, the
transformation is:
1 z 1
s=
T
then, the discrete PID pulse transfer function is:
U (z)
KI T
1 z 1
= KP +
+
K
D
E(z)
1 z 1
T
or
KD
U (z)
= KP (1 z 1 ) + KI T +
(1 z 1 )2
E(z)
T
(1 z 1 )U (z) = KP (1 z 1 )E(z) + KI T E(z) +
KD
(1 z 1 )2 E(z)
T
KD
(e(k) 2e(k 1) + e(k 2))
T
(7.62)
The digital PID controller given by (7.62) is different in structure to that obtained from time-domain
considerations and is known as the velocity PID algorithm.
7.4.3
Y (s)
10
= 3
U (s)
s + 7s2 + 6s
(7.63)
is to be controlled in the closed-loop with unity negative feedback, using a forward path lead compensator
of transfer function
D(s) =
w(t)
e(t)
1.5(s + 1)
s+3
Controller
D(s)
u(t)
(7.64)
Plant
y(t)
H P (s)
s=
with T=0.1s gives
s = 10(1 z 1 )
and so
D(z) =
(7.65)
1.5[10(1 z 1 ) + 1]
1.2692 1.1538z 1
16.6 15z 1
=
=
10(1 z 1 ) + 3
13 10z 1
1 0.7692z 1
(7.66)
s=
(7.67)
i
+1
1.3696 1.2391z 1
i =
1 0.7391z 1
+3
2(1z 1 )
T (1+z 1 )
2(1z 1 )
T (1+z 1 )
(7.68)
(7.69)
The step responses of the controlled systems may be compared by means of an appropriate computer
package or by means of Matlab. Graphs of the step responses are shown in Figure 7.29 and the following
table compares them for the maximum overshoot at the time at which it occurs.
1.4
Tustin algorithm
1.2
simple algorithm
1
0.8
analog controller
0.6
0.4
0.2
0
0
Time(seconds)
simple
3.6
3.2
Tustin
2.9
3.35
24
For comparison, the analog controller would give an overshoot of 1.6% at 3.5 seconds, so all the digital
implementations produce some degree of performance degradation.
In order to produce a digital control system arrangement for one of the above transfer functions in z, it
will be necessary to produce a suitable program for the processor. A first step in doing so is to convert the
transfer function into a discrete time (difference) equation from which an algorithm or pseudo-code may be
developed.
The compensator transfer function in z is, by definition, equal to the ratio U (z)/E(z) of the z-transform
of the controller action u and the error signal e, respectively, thus:
D(z) =
U (z)
1.2692 1.1538z 1
=
E(z)
1 0.7692z 1
(7.70)
25
7.5
7.5.1
Exercises
Example 1: Pulse transfer function and system stability
G(s) =
(7.71)
Compute the pulse transfer function and analyze the system stability.
Solution. We shall determine the pulse transfer function G(z) using two methods (ZOH and simple
substitution), as shown in Chapter 6 (Digital control systems).
Using the ZOH method, G(z) is obtained from:
1 esT 1
1 1
1
} = (1 z 1 ) Z{
}
s
s+4
4 s s+4
Using a table of the z-transforms of basic signals we obtain:
G1 (z) = Z{G0 (s)G(s)} = Z{
G1 (z) =
Using the simple substitution s =
G2 (z) =
z11 z
z
1 1 e4T
(
)
=
z 4 z 1 z e4T
4 z e4T
1z 1
T ,
(7.73)
1
1z 1
T
(7.72)
+4
Tz
T
=
1 + 4T z 1
(1 + 4T )z 1
(7.74)
For T = 0.1, the pulse transfer functions (written in z instead of z 1 ) in all cases above are:
G1 (z) =
0.08242
0.1z
, G2 (z) =
z 0.6703
1.4z 1
(7.75)
The continuous system (7.24) is clearly stable, since it has only one negative pole at 4.
The discrete system is described by any of the pulse transfer functions G1 (z), G2 (z). Each of them has
one pole that is located inside the unit circle:
G1 (z) : z1 = 0.6703 < 1,
G2 (z) : z2 =
1
<1
1.4
(7.76)
7.5.2
1
< 1, for any T > 0
1 + 4T
s2
1
+1
The system has two poles on the imaginary axis, s1,2 = j, thus it is critically stable.
26
(7.77)
We shall determine the pulse transfer function G(z) and analyze the stability of the discrete system.
Solution.Using the ZOH method, the pulse transfer function result as:
G1 (z) = Z{G0 (s)G(s)} = Z{
1 esT 1
1
s
} = (1 z 1 )Z{ 2
}
2
s
s +1
s s +1
Using a table of the z-transforms of basic signals (a step and a cosine) we obtain:
z1
z
z(z cosT )
G1 (z) =
2
z
z 1 z 2zcosT + 1
(7.78)
(7.79)
z2
s2
s
+ 2
z(z cos T )
, with = 1
2z cos T + 1
The poles of the discrete system are the roots of the denominator:
p
z1,2 = cos T (cos T )2 1 = cos T j sin T
(7.80)
(7.81)
1
z1 2
zT
+1
z2T 2
(T 2 + 1)z 2 2z + 1
1 (T 2 + 1)
1 Tj
= 2
T2 + 1
T +1
(7.82)
(7.83)
It is clear that z1,2 will have a magnitude of 1 only for T = 0. For other values of the sampling time, the
simple transformation is an inaccurate approximation. If, for example T = 0.1:
z1,2 =
1 0.1j
= 0.9901 0.0990j, and |z1,2 | = 0.995 < 1
0.12 + 1
For T = 0.01:
1 0.01j
= 0.9999 0.0100j, and |z1,2 | = 0.99995 < 1
0.012 + 1
The approximation is better when the sampling period decreases towards 0.
z1,2 =
27
7.5.3
Consider a system with input u and output y whose behavior can be described with a difference equation:
3
y(k) + 2y(k 1) + y(k 2) = u(k 1)
4
(7.84)
If the initial conditions are considered zero, the following property of the Z transform is
Shift right: Z{f (k n)T } = z n F (z)
or
and the transfer function:
3
Y (z) + 2z 1 Y (z) + z 2 Y (z) = z 1 U (z)
4
(7.85)
3
Y (z)(1 + 2z 1 + z 2 ) = z 1 U (z)
4
(7.86)
Y (z)
z 1
z
=
= 2
3
1
2
U (z)
1 + 2z + 4 z
z + 2z +
3
4
(7.87)
1
z1,2 = 1 , z1 = 1.5, z2 = 0.5
2
One pole is located inside the unit circle while the other one is outside, therefore the system is unstable.
28
Bibliography
Burns, R. S. (2001). Advanced Control Engineering. Butterworth-Heinemann.
Dorf, R. C. and Bishop, R. H. (2008). Modern Control Systems. Pearson Prentice Hall, 11th edition.
Franklin, G., Powell, D., and Emami-Naeini, A. (2006). Feedback Control of Dynamic Systems. Pearson Prentice Hall, 5th edition.
Landau, I. D. and Zito, G. (2006). Digital Control Systems, Design, Identification and Implementation,
chapter Computer Control Systems, pages 2584. Springer.
Nise, N. S. (2004). Control Systems Engineering. Wiley, 4th edition.
29