Transfer Functions in Linear Systems: A Comprehensive Guide, Exercises of Dynamics

The transfer function is a convenient representation of a linear time invari- ant dynamical system. Mathematically the transfer function is a function.

Typology: Exercises

2021/2022

Uploaded on 08/05/2022

char_s67
char_s67 🇱🇺

4.5

(116)

1.9K documents

1 / 28

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 6
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
This chapter introduces the concept of transfer function which is a com-
pact description of the input-output relation for a linear system. Combining
transfer functions with block diagrams gives a powerful method of dealing
with complex systems. The relations between transfer functions and other
system descriptions of dynamics is also discussed.
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.
6.2 The Transfer Function
An input-output description of a system is essentially a table of all possible
input-output pairs. For linear systems the table can be characterized by one
139
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Transfer Functions in Linear Systems: A Comprehensive Guide and more Exercises Dynamics in PDF only on Docsity!

Chapter 6

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 This chapter introduces the concept of transfer function which is a com- pact description of the input-output relation for a linear system. Combining transfer functions with block diagrams gives a powerful method of dealing with complex systems. The relations between transfer functions and other system descriptions of dynamics is also discussed.

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.

6.2 The Transfer Function

An input-output description of a system is essentially a table of all possible input-output pairs. For linear systems the table can be characterized by one

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.

Transmission of Exponential Signals

Exponential signals play an important role in linear systems. They appear in the solution of the differential equation (6.5) and in the impulse response of a linear systems. Many signals can be represented as exponentials or as sum of exponentials. A constant signal is simply eαt^ with α = 0. Damped sine and cosine signals can be represented by

e(σ+iω)t^ = eσteiωt^ = eσt(sin ωt + i cos ωt)

Many other signals can be represented by linear combination of exponentials. To investigate how a linear system responds to the exponential input u(t) = est^ we consider the state space system

dx dt

= Ax + Bu y = Cx + Du.

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

x(t) = eAtx(0) +

∫ (^) t

0

eA(t−τ^ )Besτ^ dτ = eAtx(0) + eAt

∫ (^) t

0

e(sI−A)τ^ )B dτ

Since s 6 = λ(A) the integral can be evaluated and we get

x(t) = eAtx(0) + eAt(sI − A)−^1

∣∣t τ = e(sI−A)τ^ ))B

= eAtx(0) + eAt(sI − A)−^1

e(sI−A)t^ − I

B

= eAt

x(0) − (sI − A)−^1 B

  • (sI − A)−^1 Best

The output of (6.1) is thus

y(t) = Cx(t) + Du(t) = CeAt

x(0) − (sI − A)−^1 B

  • [D + C(sI − A)−^1 B]est,

a linear combination of exponential functions with exponents est^ and eλit, where λi are the eigenvalues of A. One term of the output is proportional

142 CHAPTER 6. TRANSFER FUNCTIONS

Computing the transfer function of the transformed model we get

G˜(s) = C˜(sI − A˜)−^1 B˜ = CT −^1 T (sI − A)−^1 T −^1 T B = CT −^1 (sI − T AT −^1 )−^1 T B = C(sI − A)−^1 B = G(s)

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.

Transfer Function of a Linear ODE

Consider a linear input/output system described by the differential equation

dny dtn^

  • a 1 dn−^1 y dtn−^1

+... + any = b 0 dmu dtm^

  • b 1 dm−^1 u dtm−^1

+... + bmu, (6.5)

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^ + a 1 sn−^1 + a 2 sn−^2 +... + an− 1 s + an b(s) = b 0 sm^ + b 1 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) = y 0 est. Inserting the signals in (6.5) we find

(sn^ + a 1 sn−^1 + · · · + an)y 0 est^ = (b 0 sm^ + b 1 sm−^1 · · · + bm)e−st

If a(α) 6 = 0 it follows that

y(t) = y 0 est^ =

b(s) a(s) est^ = G(s)u(t). (6.7)

The transfer function of the system (6.5) is thus the rational function

G(s) = b(s) 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

Example 6.1 (Transfer functions of integrator and differentiator). The trans- fer function G(s) = 1/s corresponds to the diffrential equation

dy dt

= u,

which represents an integrator and a differentiator which has the transfer function G(s) = s corresponds to the differential equation

y =

du dt

Example 6.2 (Transfer Function of a Time Delay). Time delays appear in many systems, typical examples are delays in nerve propagation, communi- cation and mass transport. A system with a time delay has the input output relation y(t) = u(t − T ) (6.9)

Let the input be u(t) = est. Assuming that there is an output of the form y(t) = y 0 est^ and inserting into (6.9) we get

y(t) = y 0 est^ = es(t−T^ )^ = e−sT^ est^ = e−sT^ u(t)

The transfer function of a time delay is thus G(s) = e−sT^ which is not a rational function.

Steady State Gain

The transfer function has many useful physical interpretations. The steady state gain of a system is simply the ratio of the output and the input in steady state. Assuming that the the input and the output of the system (6.5) are constants y 0 and u 0 we find that any 0 = bnu 0. The steady state gain is y 0 u 0

bn an

= G(0). (6.10)

The result can also be obtained by observing that a unit step input can be represented as u(t) = est^ with s = 0 and the above relation then follows from Equation (6.7).

Poles and Zeros

Consider a linear system with the rational transfer function

G(s) = b(s) a(s)

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 ∂θ ∂t

∂^2 θ ∂^2 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

sψ(x) = d^2 ψ dx^2

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 est^ = e−

√s u(t)

The system thus has the transfer function G(s) = e−

√s .

6.3 Frequency Response

Frequency response is a method where the behavior of a system is character- ized by its response to sine and cosine signals. The idea goes back to Fourier, who introduced the method to investigated heat propagation in metals. He observed that a periodic signal can be approximated by a Fourier series. Since eiωt^ = sin ωt + i cos ωt

it follows that sine and cosine functions are special cases of exponential functions. The response to sinusoids is thus a special case of the response to exponential functions. Consider the linear time-invariant system (6.1). Assume that all eigen- values of the matrix A have negative real parts. Let the input be u(t) = eiωt

146 CHAPTER 6. TRANSFER FUNCTIONS

−0.1 0 5 10 15

0

−1 0 5 10 15

−0.

0

1

PSfrag replacements

t

u^

y

Figure 6.1: Response of a linear time-invariant system with transfer function G(s) = (s + 1)−^2 to a sinusoidal input (full lines). The dashed line shows the steady state output calculated from (6.13).

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

Since u(t) = sin ωt = Im

eiωt

we can obtain the response to a sinusoid by taking the imaginary parts, hence y(t) = Im

G(iω)eiωt

= Im

|G(iω)|ei^ arg^ G(iω)eiωt

= |G(iω)|Im

ei(arg^ G(iω)+ωt)

= |G(iω)| sin

ωt + arg G(iω)

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.

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

log G(s) = log b(s) − log a(s)

Since a polynomial is a product of terms of the type :

k, s, s + a, s^2 + 2ζas + a^2

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

G(s) = k s

We have G(iω) = k/iω which implies

log |G(iω)| = log k − log ω, arg G(iω) = −π/ 2

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.

Example 6.5 (Bode Plot of a Differentiator). Consider the transfer function

G(s) = ks

We have G(iω) = ikω which implies

log |G(iω)| = log k + log ω, arg G(iω) = π/ 2

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

10 −1^100

10 −

100

101

10 −1^100

0

90

10 −1^100

10 −

100

101

10 −1^100

0

90

PSfrag replacements

ω ω

|G

(iω

)|

|G

(iω

)|

arg

G

(iω

)

arg

G

(iω

)

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.

log

G

= − log G = − log |G| − i arg G

Example 6.6 (Bode Plot of a First Order System). Consider the transfer function G(s) = a s + a We have log G(s) = log a − log s + a

Hence

log |G(iω)| = log a −

log (ω^2 + a^2 )), arg G(iω) = − arctan ω/a

The Bode Plot is shown in Figure 6.4. Both the gain curve and the phase

6.5. FREQUENCY RESPONSES FROM EXPERIMENTS 151

Hence

log |G(iω)| = 2 log a −

log

ω^4 + 2a^2 ω^2 (2ζ^2 − 1) + a^4

arg G(iω) = − arctan

2 ζaω a^2 − ω^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

log |G(iω)| ≈

0 if ω << a, −2 log ω if ω >> a

arg G(iω) ≈

0 if ω << a, −π if ω >> a

The Bode plot is shown in Figure 6.4.

Interpretations of Bode Plots

The Bode plot gives a quick overview of a system. Many properties can be read from the plot. Because logarithmic scales are used the plot gives the properties over a wide range of frequencies. Since any signal can be decomposed into a sum of sinusoids it is possible to visualize the behavior of a system for different frequency ranges. Furthermore when the gain curves are close to the asymptotes the system can be approximated by integrators of differentiators. Consider for example the Bode plot in Figure 6.2. For low frequencies the gain curve of the Bode plot has the slope -1 which means that the system acts like an integrator. For high frequencies the gain curve has slope +1 which means that the system acts like a differentiator.

6.5 Frequency Responses from Experiments

Modeling can be difficult and time consuming. One reason why control has been so successful is that the frequency response of a system can be deter- mined experimentally by perturbing the input sinusoidally. When steady

152 CHAPTER 6. TRANSFER FUNCTIONS

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

G(s) = kω^22 ω^23 ω^25 (s^2 + 2ζ 1 ω 1 + ω^21 )(s^2 + 2ζ 4 ω 4 + ω 42 ) ω^21 ω^24 (s^2 + 2ζ 2 ω 2 + ω 22 )(s^2 + 2ζ 3 ω 3 + ω^23 )(s^2 + 2ζ 5 ω 5 + ω^25 )

e−sT

with ω 1 = 2420, ζ 1 = 0.03, ω 2 = 2550, ζ 2 = 0.03, ω 3 = 6450, ζ 3 = 0.042, ω 4 = 8250, ζ 4 = 0.025, ω 5 = 9300, ζ 5 = 0.032, T = 10−^4 , and k = 5. was fitted to the data. The frequencies associated with the zeros are located where the gain curve has minima and the frequencies associated with the poles are located where the gain curve has local maxima. The relative damping are adjusted to give a good fit to maxima and minima. When a good fit to the gain curve is obtained the time delay is adjusted to give a good fit to the phase curve. The fitted curve is shown i dashed lines. Experimental determination of frequency response is less attractive for systems with slow dynamics because the experiment takes a long time.

154 CHAPTER 6. TRANSFER FUNCTIONS

Example 6.9 (Pupillary Light Reflex Dynamics).

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. 08 s)^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

G(s) =

(1 + 0.08)^3

e−^0.^2 s.

ƒ^ 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 ˚Angstr¨om 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 ˚Angstr¨om’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 ∂t

= κ

∂^2 T

∂x^2

− μT, (6.14)

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

PSfrag replacements ω |G(iω)| arg G(iω)

0.01 2 5 10 20

2 5 10 20

0

PSfrag replacements

ω

|G

(iω

)|

arg

G

(iω

)

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?

and the frequency response is given by

log |G(iω)| = −a

μ +

ω^2 + μ^2 2 κ

arg G(iω) = −a

−μ +

ω^2 + μ^2 2 κ

Multiplication of the equations give

log |G(iω)| arg G(iω) = a^2 ω 2 κ

Notice that the parameter μ which represents the thermal losses disappears in this formula. ˚Angstr¨om remarked that (6.16) is indeed a remarkable simple formula. Earlier values of thermal conductivity for copper obtained by Peclet was 79 W/mK. ˚Angstr¨om 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 ˚Angstr¨om quickly became the standard method for determining thermal conductivity.

6.6. BLOCK DIAGRAMS AND TRANSFER FUNCTIONS 157

PSfrag replacements

u (^) y

e

G 1

−G 2

G 2

G 1

PSfrag replacements

u y

e G 1 −G 2

G 2

G 1

PSfrag replacements

u e y

G 1

−G 2

G 2 G 1

Figure 6.10: Series (left), parallel (middle) and feedback (right) connections of two linear systems.

The transfer function of the system is thus G = G 1 G 2 , i.e. the product of the transfer functions. Consider a parallel connection of systems with the transfer functions G 1 and G 2 , see Figure 6.10b. Let u = est^ be the input to the system. The pure exponential output of the first system is then y 1 = G 1 u and the output of the second system is y 2 = G 2 u. The pure exponential output of the parallel connection is thus

y = G 1 u + G 2 u = (G 1 + G 2 )u.

The transfer function of the parallel connection is thus G = G 1 + G 2. Consider a feedback connection of systems with the transfer functions G 1 and G 2 , as shown in Figure 6.10c. Let r = est^ be the input to the system, y the pure exponential output, and e be the pure exponential part of the error. Writing the relations for the different blocks and the summation unit we find

y = G 1 e e = r − G 2 y.

Elimination of e gives y = G 1 (r − G 2 y), hence (1 + G 1 G 2 )y = G 1 r, which implies y =

G 1

1 + G 1 G 2

r.

The transfer function of the feedback connection is thus

G(s) = G 1 (s) G 1 (s) + G 2 (s)

158 CHAPTER 6. TRANSFER FUNCTIONS

PSfrag replacements

Σ C Σ P Σ

r e u x y

n

− 1

d

Figure 6.11: Block diagram of a feedback system.

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,

where x is the output of the process, i.e.

x = P v = P (d + u),

where u is the output of the controller, i.e.

u = Ce.

Combining the equations gives

e = r − y = r − (n + x) = r −

n + P (d + u)

= r −

n + P (d + Ce)