Transfer Functions
Transfer Functions
Transfer Functions
As a matter of idle curiosity, I once counted to find out what the order of the
set of equations in an amplifier I had just designed would have been, if I had
worked with the differential equations directly. It turned out to be 55.
Henrik Bode, 1960
6.1 Introduction
The transfer function is a convenient representation of a linear time invari-
ant dynamical system. Mathematically the transfer function is a function
of complex variables. For finite dimensional systems the transfer function
is simply a rational function of a complex variable. The transfer function
can be obtained by inspection or by by simple algebraic manipulations of
the differential equations that describe the systems. Transfer functions can
describe systems of very high order, even infinite dimensional systems gov-
erned by partial differential equations. The transfer function of a system
can be determined from experiments on a system.
139
140 CHAPTER 6. TRANSFER FUNCTIONS
input pair only, for example the impulse response or the step response. In
this section we will consider another interesting pairs of signals.
Let the input signal be u(t) = est and assume that s 6= λi (A), i = 1, . . . , n,
where λi (A) is the ith eigenvalue of A. The state is then given by
Z t Z t
At A(t−τ ) sτ At At
x(t) = e x(0) + e Be dτ = e x(0) + e e(sI−A)τ ) B dτ
0 0
to the input u(t) = est . This term is called the pure exponential response.
If the initial state is chosen as
the output only consists of the pure exponential response and both the state
and the output are proportional to the input
This system has the same form as (6.1) but the matrices A, B and C are
different
à = T AT −1 , B̃ = T B, C̃ = CT −1 , D̃ = D (6.4)
142 CHAPTER 6. TRANSFER FUNCTIONS
which is identical to the transfer function (6.2) computed from the system
description (6.1). The transfer function is thus invariant to changes of the
coordinates in the state space.
dn y dn−1 y dm u dm−1 u
+ a 1 + . . . + a n y = b 0 + b 1 + . . . + bm u, (6.5)
dtn dtn−1 dtm dtm−1
where u is the input and y is the output. Note that here we have generalized
our previous system description to allow both the input and its derivatives
to appear. The differential equation is completely described by two polyno-
mials
a(s) = sn + a1 sn−1 + a2 sn−2 + . . . + an−1 s + an
(6.6)
b(s) = b0 sm + b1 sm−1 + . . . + bm−1 s + bm ,
where the polynomial a(s) is the characteristic polynomial of the system.
To determine the transfer function of the system (6.5), let the input be
u(t) = est . Then there is an output of the system that also is an exponential
function y(t) = y0 est . Inserting the signals in (6.5) we find
b(s) st
y(t) = y0 est = e = G(s)u(t). (6.7)
a(s)
The transfer function of the system (6.5) is thus the rational function
b(s)
G(s) = , (6.8)
a(s)
where the polynomials a(s) and b(s) are given by (6.6). Notice that the
transfer function for the system (6.5) can be obtained by inspection.
6.2. THE TRANSFER FUNCTION 143
The transfer function of a time delay is thus G(s) = e−sT which is not a
rational function.
The roots of the polynomial a(s) are called poles of the system and the
roots of b(s) are called the zeros of the system. If p is a pole it follows
that y(t) = ept is a solution to the (6.5) with u = 0 (the homogeneous
equation). The function ept is called a mode of the system. The free motion
of the system after an arbitrary excitation is a weighted sum of the modes.
Since the pure exponential output corresponding to the input u(t) = est
with a(s) 6= 0 is G(s)est it follows that the pure exponential output is zero
if b(s) = 0. Zeros of the transfer function thus blocks the transmission of
the corresponding exponential signals.
The poles of the transfer function are the eigenvalues of the system ma-
trix A in the state space model. They depend only on the the dynamics
matrix A, which represents the intrinsic dynamics of the system. The zeros
depend on how inputs and outputs are coupled to the states. The zeros thus
depend on all matrices A, B, C and D in the state space description.
To find the zeros of the state space system (6.1) we observe that the
zeros are complex numbers s such that the input u(t) = est gives zero
output. Inserting the pure exponential response x(t) = x0 est and y(t) = 0
in (6.1) gives.
This equation has a solution with nonzero x0 , u0 only if the matrix on the
left does not have full rank. The zeros are thus the values s such that
· ¸
sI − A B
det =0 (6.11)
C D
Notice in particular that if the matrix B has full rank the matrix has n
linearly independent rows for all values of s. Similarly there are n linearly
independent columns if the matrix C has full rank. This implies that systems
where the matrices B or C are of full rank do not have zeros. In particular
it means that a system has no zeros if it is fully actuated or of the full state
Ä is measured.
Example 6.3 (Transfer Function for Heat Propagation). Consider the one
dimensional heat propagation in a semi-infinite metal rod. Assume that the
6.3. FREQUENCY RESPONSE 145
input is the temperature at one end and that the output is the temperature
at a point on the rod. Let θ be the temperature at time t and position x.
With proper choice of scales heat propagation is described by the partial
differential equation
∂θ ∂2θ
= 2 , (6.12)
∂t ∂ x
and the point of interest can be assumed to have x = 1. The boundary
condition for the partial differential equation is
θ(0, t) = u(t)
To determine the transfer function we assume that the input is u(t) = est .
Assume that there is a solution to the partial differential equation of the
form θ(x, t) = ψ(x)est , and insert this into (6.12) gives
d2 ψ
sψ(x) = ,
dx2
with boundary condition ψ(0) = est . This ordinary differential equation has
the solution √ √
ψ(x) = Aex s + Be−x s .
Matching the boundary conditions gives A = 0 and that B = est and the
solution is
√ √
y(t) = x(1, t) = θ(1, t) = ψ(1)est = e− s st
e = e− s
u(t)
√
The system thus has the transfer function G(s) = e− s.
0.2
0.1
y
0
−0.1
0 5 10 15
0.5
u
0
PSfrag replacements
−0.5
−1
0 5 10 15
t
and let G(s) be the transfer function of the system. It follows from (6.3)
that the output is
³ ´
y(t) = Cx(t) + Du(t) = CeAt x(0) − (sI − A)−1 B + G(iω)eiωt .
Since the matrix all eigenvalues of A have negative real parts the first term
decays exponentially and the solution converges to the steady state response
y(t) = Im G(iω)eiωt .
¡ ¢
The steady state output generated by the input u(t) = sin (ωt) is thus
y(t) = |G(iω)| sin (ωt + arg G(iω)), (6.13)
where |G(iω)| is called the gain of the system and arg G(iω) is called the
phase of the system. This is illustrated in Figure 6.1 which shows the re-
sponse of a linear time-invariant system to a sinusoidal input. The figure
shows the output of the system when it is initially at rest and the steady
state output given by (6.13). The figure shows that after a transient the
output is indeed a sinusoid with the same frequency as the input.
6.4. THE BODE PLOT 147
3
10
|G(iω)|
2
10
1
10
−2 −1 0 1 2
10 10 10 10 10
90
arg G(iω)
0
PSfrag replacements
−90
−2 −1 0 1 2
10 10 10 10 10
ω
Figure 6.2: Bode plot of the transfer function C(s) = 20 + 10/s + 10s of an
ideal PID controller. The top plot is the gain curve and bottom plot is the
phase curve. The dashed lines show straight line approximations of the gain
curve and the corresponding phase curve.
10 10(s + 1)2
C(s) = 20 + + 10s = .
s s
The Bode plot is shown in full lines and the straight line approximation
in dashed lines. For ω < 0.1 we have G(s) ≈ 10/s, the approximation of
148 CHAPTER 6. TRANSFER FUNCTIONS
the gain curve is a line with slope -1, and the phase curve is horizontal
arg G(iω) = −90◦ . For ω > 10 we have G(s) ≈ 10/s, the approxima-
tion of the gain curve is a straight line, and the phase curve is horizontal,
arg G(iω) = 90◦ .
It is easy to sketch Bode plots because they have linear asymptotes.
This is useful in order to get a quick estimate of the behavior of a system.
It is also a good way to check numerical calculations. Consider a transfer
function which is a polynomial G(s) = b(s)/a(s). We have
k, s, s + a, s2 + 2ζas + a2
it suffices to be able to sketch Bode diagrams for these terms. The Bode
plot of a complex system is then obtained by adding the gains and phases
of the terms.
Example 6.4 (Bode Plot of an Integrator). Consider the transfer function
k
G(s) =
s
The gain curve is thus a straight line with slope -1 and the phase curve is a
constant at −90◦ . Bode plots of a differentiator and an integrator are shown
in Figure 6.3
Example 6.5 (Bode Plot of a Differentiator). Consider the transfer function
G(s) = ks
The gain curve is thus a straight line with slope 1 and the phase curve is a
constant at 90◦ . The Bode plot is shown in Figure 6.3.
6.4. THE BODE PLOT 149
1 1
10 10
|G(iω)|
|G(iω)|
0 0
10 10
−1 −1
10 10
−1 0 1 −1 0 1
10 10 10 10 10 10
90 90
arg G(iω)
arg G(iω)
0 0
PSfrag replacements
−90 −90
−1 0 1 −1 0 1
10 10 10 10 10 10
ω ω
Figure 6.3: Bode plot of the transfer functions G(s) = 1/s (left) and G(s) =
s (right).
Compare the Bode plots for the differentiator in and the integrator in
Figure 6.3. The plot for the differentiator is obtained by mirror imaging the
gain and phase curves for the integrator in the horizontal axis. This follows
from the following property of the logarithm.
1
log = − log G = − log |G| − i arg G
G
Example 6.6 (Bode Plot of a First Order System). Consider the transfer
function
a
G(s) =
s+a
We have
log G(s) = log a − log s + a
Hence
1
log |G(iω)| = log a − log (ω 2 + a2 )), arg G(iω) = − arctan ω/a
2
The Bode Plot is shown in Figure 6.4. Both the gain curve and the phase
150 CHAPTER 6. TRANSFER FUNCTIONS
1 1
10 10
|G(iω)|/a
|G(iω)|/a
0 0
10 10
−1 −1
10 10
−1 0 1 −1 0 1
10 10 10 10 10 10
0 0
arg G(iω)
arg G(iω)
−90 −90
−180 −180
−1 0 1 −1 0 1
10 10 10 10 10 10
ω/a ω/a
Figure 6.4: Bode plots of the systems G(s) = a/(s + a) (left) and G(s) =
a2 /(s2 + 2ζas + a2 ) (right). The full lines show the Bode plot and the
dashed lines show the straight line approximations to the gain curves and the
corresponding phase curves. The plot for second order system has ζ = 0.1,
0.2, 0.5 and 1.0.
Notice that a first order system behaves like a constant for low frequencies
and like an integrator for high frequencies. Compare with the Bode plot in
Figure 6.3.
Example 6.7 (Bode Plot of a Second Order System). Consider the transfer
function
a2
G(s) = 2
s + 2aζs + a2
We have
log G(iω) = 2 log a − log (−ω 2 + 2iaζω + a2 ).
6.5. FREQUENCY RESPONSES FROM EXPERIMENTS 151
Hence
1
log ω 4 + 2a2 ω 2 (2ζ 2 − 1) + a4
¡ ¢
log |G(iω)| = 2 log a −
2
2ζaω
arg G(iω) = − arctan 2
a − ω2
The gain curve has an asymptote with zero slope for ω << a. For large
values of ω the gain curve has an asymptote with slope -2. The largest
gain Q = maxω |G(iω)| = 1/(2ζ), called the Q value, is obtained for ω =
a. The phase is zero for low frequencies and approaches 180◦ for large
frequencies. The curves can be approximated with the following piece-wise
linear expressions
(
0 if ω << a,
log |G(iω)| ≈ ,
−2 log ω if ω >> a
(
0 if ω << a,
arg G(iω) ≈ ,
−π if ω >> a
Figure 6.5: The Hewlett Packard signal analyzer can be used to determine
frequency response experimentally.
state is reached the amplitude ratio and the phase lag gives the frequency
response for the excitation frequency. The complete frequency response is
obtained by sweeping over frequency. By using correlation techniques it is
possible to determine the frequency response very accurately. An analytic
transfer function can be obtained from the frequency response by curve fit-
ting. Nice instruments are commercially available, see Figure 6.5.
Example 6.8 (A Piezoelectric Drive). Experimental determination of fre-
quency responses is particularly attractive for systems with fast dynamics.
A typical example is given if Figure 6.6. In this case the frequency was
obtained in less than a second. The full line shows the measured frequency
response. The transfer function
1
10
Gain
0
10
2 3 4
10 10 10
0
Phase
−90
−270
2 3 4
10 10 10
Frequency [Hz]
Figure 6.7: Light stimulation of the eye. In A the light beam is so large
that it always covers the whole pupil. This experiment gives the closed loop
dynamics. In B the light is focused into a beam which is so narrow that it
is not influenced by the pupil opening. This experiment gives the open loop
dynamics. In C the light beam is focused on the edge of the pupil opening.
The pupil will oscillate if the beam is sufficiently small. From [?].
Figure 6.8. Fitting a transfer function to the gain curves gives a good fit for
G(s) = 0.17/(1 + 0.08s)3 . This curve gives a poor fit to the phase curve as
as shown by the dashed curve in Figure 6.8. The fit to the phase curve is
improved by adding a time delay. Notice that a time delay does not change
the gain curve. The final fit gives the model
0.17
G(s) = e−0.2s .
(1 + 0.08)3
Ä
The Bode plot of this is shown with dashed curves in Figure 6.8.
Example 6.10 (Determination of Thermal Diffusivity). The Swedish Physi-
cist Ångström used frequency response to determine thermal conductivity
in 1861. A long metal rod with small cross section was used. A heat-wave is
generate by periodically varying the temperature at one end of the sample.
Thermal diffusivity is then determined by analyzing the attenuation and
phase shift of the heat wave. A schematic diagram of Ångström’s apparatus
is shown in Figure 6.9. The input was generated by switching from steam
to cold water periodically. Switching was done manually because of the low
frequencies used. Heat propagation is described by the one-dimensional heat
equation
∂T ∂2T
= κ 2 − µT, (6.14)
∂t ∂x
λ
where κ = ρC , and λ the thermal conductivity, ρ density, and C specific
heat. The term µT is an approximation of heat losses due to radiation, and
convection. The transfer function relating temperatures at points with the
distance a is √
G(s) = e−a (s+µ)/κ , (6.15)
6.5. FREQUENCY RESPONSES FROM EXPERIMENTS 155
0.2
|G(iω)|
0.1
0.05
0.02
0.01
2 5 10 20
arg G(iω)
PSfrag replacements PSfrag replacements −180
ω
|G(iω)| −360
arg G(iω) 2 5 10 20
ω
Figure 6.8: Sample curves from open loop frequency response of the eye
(left) and Bode plot for the open loop dynamics (right). Redrawn from the
data of [?]. The dashed curve in the Bode plot is the minimum phase curve
corresponding to the gain curve.Perhaps both Bode and Nyquist plots?
a2 ω
log |G(iω)| arg G(iω) = . (6.16)
2κ
Notice that the parameter µ which represents the thermal losses disappears
in this formula. Ångström remarked that (6.16) is indeed a remarkable
simple formula. Earlier values of thermal conductivity for copper obtained
by Peclet was 79 W/mK. Ångström obtained 382 W/mK which is very
close to modern data. Since the curves shown in Figure 6.9 are far from
sinusoidal Fourier analysis was used to find the sinusoidal components. The
procedure developed by Ångström quickly became the standard method for
determining thermal conductivity.
156 CHAPTER 6. TRANSFER FUNCTIONS
Notice that both for the piezo drive and for the pupillary dynamics it is
not easy to derive appropriate models from first principle. It is often fruitful
to use a combination.
y = G2 (G1 u) = G1 G2 u
PSfrag replacements PSfrag replacements PSfrag replacements
e e
6.6. BLOCK DIAGRAMS
G1 AND TRANSFER FUNCTIONS
G1 157
−G2 −G2
G1 G2 u e y
Σ G1
G1 u y
Σ
Σu y Σ
G1 G2 G 2 −G2
Σ Σ
Figure 6.10: Series (left), parallel (middle) and feedback (right) connections
of two linear systems.
y = G1 u + G2 u = (G1 + G2 )u.
y = G1 e
e = r − G2 y.
Elimination of e gives
y = G1 (r − G2 y),
hence
(1 + G1 G2 )y = G1 r,
which implies
G1
y= r.
1 + G 1 G2
The transfer function of the feedback connection is thus
G1 (s)
G(s) = .
G1 (s) + G2 (s)
PSfrag replacements
d n
r e u x y
Σ C Σ P Σ
−1
With a little practice the equation relating the signals of interest can be
written by inspection. We illustrate this by an example
Example 6.11 (Relations Between Signals in a Block Diagram). Consider the
system in Figure 6.11. The system has two blocks representing a process P
and a controller C. There are three external signals, the reference r, the load
disturbance d and the measurement noise n. A typical problem is to find
out how the error e related to the signals r d and n? To derive the transfer
function we simply assume that all signals are exponential functions and we
drop the arguments of signals and transfer functions.
To obtain the desired relation we simply trace the signals around the
loop. We begin with the signal we are interested in, i.e. e. The error e is
given by
e = r − y.
The signal y is the sum of n and x
y = n + x,
x = P v = P (d + u),
u = Ce.
Hence
¡ ¢
e = r − n + P (d + Ce) = r − n − P d − P Ce.
Solving this equation for e gives
1 1 P
e= r− n− d = Ger r + Gen n + Ged d (6.17)
1 + PC 1 + PC 1 + PC
The error is thus the sum of three terms, depending on the reference r, the
measurement noise n and the load disturbance d. The function
1
Ger =
1 + PC
is the transfer function from reference r to error e, Gen is the transfer func-
tions from measurement noise n to error e and Ged is the transfer functions
from load disturbance d to error e.
The example illustrates an effective way to manipulate the equations to
obtain the relations between inputs and outputs in a feedback system. The
general idea is to start with the signal of interest and to trace signals around
the feedback loop until coming back to the signal we started with. With a
some practice the equation (6.17) can be written directly by inspection of
the block diagram. Notice that all terms in Equation (6.17) formally have
the same denominators, there may, however, be factors that cancel.
The combination of block diagrams and transfer functions is a powerful
tool because it is possible both to obtain an overview of a system and find
details of the behavior of the system. When manipulating block diagrams
and transfer functions it may happen that poles and zeros are canceled.
Some care must be exercised as is illustrated by the following example.
Example 6.12 (Cancellation of Poles and Zeros). Consider a system de-
scribed by the equation.
dy du
−y = −u (6.18)
dt dt
Integrating the equation gives
Y (s) s−1
= =1
U (s) s−1
160 CHAPTER 6. TRANSFER FUNCTIONS
y(t) = u(t)
In the next section we will give a fundamental results that gives insight
into the cancellation problem.
Ä
Diagonal Systems
We will show this in the special case of systems where the matrix A has
distinct eigenvalues. Such a system can be represented as
Λro 0 0 0 βro
dz 0 Λrō 0
0
βro u
= z +
dt 0 0 Λr̄o 0 0
0 0 0 Λr̄ō 0
£ ¤
y = γro 0 γr̄o 0 z + Du.
All states zk such that βk 6= 0 are controllable and all states such that γk 6= 0
are observable. The system can be represented as The transfer function of
the system is
G(s) = γro (sI − Aro )−1 βro + D.
It is uniquely given by the subsystem which is reachable and observable. A
block diagram of the system is given in Figure 6.12.
6.7. THE KALMAN DECOMPOSITION 161
dx
=x
dt
This system is unstable and the unstable state will appear in the output.
xr̄ō
A block diagram of the system is shown in Figure 6.13. By tracing the
arrows in the diagram we find that the input influences the systems Soc and
Sōc and that the output is influenced by Soc and Soc̄ . The system Sōc̄ is
neither connected to the input nor the output. The transfer function of the
system is
G(s) = C1 (sI − A11 )−1 B1 (6.22)
It thus follows that the transfer function is uniquely given by the reachable
and observable subsystem Soc . When cancellations occur it means that there
ares subsystems that are not reachable and observable.
Ä
6.8. LAPLACE TRANSFORMS 163
The transform has some properties that makes it very well suited to deal
with linear systems. First we observe that the transform is linear because
Z ∞
L(af + bg) = e−st (af (t) + bg(t))dt
0
Z ∞ Z ∞ (6.24)
−st
=a e f (t)dt + b e−st g(t)dt = aLf + bLg
0 0
164 CHAPTER 6. TRANSFER FUNCTIONS
The result can be written as Y (s) = G(s)U (s) where G, U and Y are the
Laplace transforms of g, u and y. The system theoretic interpretation is
that the Laplace transform of the output of a linear system is a product
of two terms, the Laplace transform of the input U (s) and the Laplace
transform of the impulse response of the system G(s). A mathematical
interpretation is that the Laplace transform of a convolution is the product
of the transforms of the functions that are convoluted. The fact that the
formula Y (s) = G(s)U (s) is much simpler than a convolution is one reason
why Laplace transforms have become popular in control.
6.10 Exercises
1. The linearized model of the pendulum in the upright position is char-
acterized by the matrices
· ¸ · ¸
0 1 0 £ ¤
A= , B= , C = 1 0 , D = 0.
1 0 1
Determine the transfer function of the system.
2. Consider the differential equation
dn y dn−1 y dn−2 y
+ a 1 + a 2 + . . . + an y = 0
dtn dtn−1 dtn−2
Let λ be a root of the polynomial
sn + a1 sn−1 + · · · + an = 0.
Show that the differential equation has the solution y(t) = eλt .
3. Consider the system
dn y dn−1 y dn−1 u dn−2 u
+ a 1 + . . . + a n y = b 1 + b 2 + . . . + bn u,
dtn dtn−1 dtn−1 dtn−2
Let λ be a zero of the polynomial
b(s) = b1 sn−1 + b2 sn−2 + · · · + bn
Show that if the input is u(t) = eλt then there is a solution to the
differential equation that is identically zero.
4. Consider the linear state space system
ẋ = Ax + Bu
y = Cx.
Show that the transfer function is
b1 sn−1 + b2 sn−2 + · · · + bn
G(s) =
sn + a1 sn−1 + · · · + an
where
b1 = CB
b2 = CAB + a1 CB
b3 = CA2 B + a1 CAB + a2 CB
..
.
bn = CAn−1 B + a1 CAn−1 B + . . . + an−1 CB