chapter 5 introduction to systems and · pdf fileintroduction to systems and frequency...

35
CHAPTER 5 INTRODUCTION TO SYSTEMS AND FREQUENCY RESPONSE FUNCTIONS When we model the behavior of measurement systems we often break down the system into components that are connected together in series. These components are typically transducers, amplifiers, bridge circuits, demodulation devices, filters, analog to digital converters, oscilloscopes and computers. Many of these components can be modeled with very simple linear ordinary differential equations. Typically we use first and second order differential equations to model these components. If the system is well designed, then it is very straightforward to take models of the components and combine them to derive a model of the whole measurement system. In this chapter the solution of linear ordinary differential equations will be reviewed, and we will introduce the terminology commonly used in instrumentation to describe the response of these equations. By using the response to sinusoidal excitation, we will also describe what is meant by the System's Frequency Response and we will show how this can be used to predict what happens when any sinusoidal excitation is inputted to the system. We will concentrate on two types of excitation: a step input which is what happens when we move from one constant input to another constant input, and a sinusoidal input, which is the simplest dynamic input to study. In Chapter 8 we will show how to take complicated signals and break them down in a sum of sinewaves. The building blocks we use in this chapter will be used again to predict the response of systems to these more complicated inputs. Throughout our analysis we will be assuming that the system is linear. Having performed our calibration (Chapter 2), we should know that we are operating in a region where the system can be modeled as a linear system. One property of linear systems that we will use is that of superposition. Suppose we put two separate signals, 1 2 x and x into the measurement system or a component of the measurement system. Further suppose that the responses were 1 2 y and y , respectively. Now, if the input to the system is a combination of 1 2 x (t) and x (t): 1 2 x(t) x (t) x (t) , (1a) then the output will be: 1 2 y(t) y (t) y (t) , (1b) where and are constants. Another property of linear systems is observed when a sinusoidal excitation is input into the system. The steady state response is a sinewave of the same frequency, though the amplitude and phase may be changed by the system. Input: x(t) = A sin 1 t , Output: y(t) = B sin ( 1 t + ) .

Upload: vuongkhanh

Post on 24-Mar-2018

219 views

Category:

Documents


4 download

TRANSCRIPT

CHAPTER 5

INTRODUCTION TO SYSTEMS

AND FREQUENCY RESPONSE FUNCTIONS

When we model the behavior of measurement systems we often break down the system into

components that are connected together in series. These components are typically transducers,

amplifiers, bridge circuits, demodulation devices, filters, analog to digital converters,

oscilloscopes and computers. Many of these components can be modeled with very simple

linear ordinary differential equations. Typically we use first and second order differential

equations to model these components. If the system is well designed, then it is very

straightforward to take models of the components and combine them to derive a model of the

whole measurement system.

In this chapter the solution of linear ordinary differential equations will be reviewed, and we

will introduce the terminology commonly used in instrumentation to describe the response of

these equations. By using the response to sinusoidal excitation, we will also describe what is

meant by the System's Frequency Response and we will show how this can be used to predict

what happens when any sinusoidal excitation is inputted to the system.

We will concentrate on two types of excitation: a step input which is what happens when we

move from one constant input to another constant input, and a sinusoidal input, which is the

simplest dynamic input to study. In Chapter 8 we will show how to take complicated signals and

break them down in a sum of sinewaves. The building blocks we use in this chapter will be used

again to predict the response of systems to these more complicated inputs.

Throughout our analysis we will be assuming that the system is linear. Having performed our

calibration (Chapter 2), we should know that we are operating in a region where the system can

be modeled as a linear system. One property of linear systems that we will use is that of

superposition. Suppose we put two separate signals, 1 2x and x into the measurement system or

a component of the measurement system. Further suppose that the responses were 1 2y and y ,

respectively. Now, if the input to the system is a combination of 1 2x (t) and x (t) :

1 2x(t) x (t) x (t) , (1a)

then the output will be:

1 2y(t) y (t) y (t) , (1b)

where and are constants.

Another property of linear systems is observed when a sinusoidal excitation is input into the

system. The steady state response is a sinewave of the same frequency, though the amplitude and

phase may be changed by the system.

Input: x(t) = A sin 1 t , Output: y(t) = B sin ( 1 t + ) .

5-2

Before considering the differential equation models, we will revise some complex notation

that we will use. While seeming more abstract, the complex notation approach will simplify the

mathematics considerably and help you solve the equations much faster.

Finally having considered models of components, we will show how, under certain

conditions, we can take the frequency response functions of the individual components and

multiply them together to produce an overall frequency response function for the entire system.

REVISION OF COMPLEX NOTATION

We will use j to denotes the 1 . A complex variable z can be written in two ways:

jz x jy Ae , (2)

where x, y, A and are all real. x is the real part of z, denoted by Real(z), and y is called the

imaginary part of x, denoted by Imag(z). A is called the magnitude, the modulus or the

amplitude, and is denoted by z . is the phase, sometimes denoted by Arg(z). A pictorial

representation of z is shown in Figure 1.

Imaginary

x

z

A y

Real

Figure 1: Representation of a complex variable on an Argand diagram.

From the diagram, using simple trigonometry we can see that:

2 2 2 1 y

A x y , tan ,x

(3a and b)

and

x Acos , y Asin , (3c and d)

5-3

Sines and Cosines

Using this notation we can split up sines and cosines into exponentials. From equations (2) and

(3c and d) we can see that:

j te cos t j sin t , (4a)

and similarly,

j te cos t j sin t , (4b)

Note that we have set to equal t. This is just to be consistent with the way we will see the

sines and cosines appear later on. Adding equations (4a) and (4b) and dividing by two gives:

j t j t1 1

e e cos t .2 2

(5a)

Subtracting equations (4a) and (4b) and dividing by 2j gives:

j t j t1 1e e sin t .

2 j 2 j (5b)

We will use this decomposition of sines and cosines into two complex exponentials later on in

this chapter.

Differentiating and Integrating

In the simple use that we will make of complex variables, we can usually just treat j as a

constant. So if we differentiate exp( j t ) with respect to t, we will obtain:

j t j td

e j edt

, (6a)

Similarly, if we integrate we will get:

tt j t j tj t

0 0

e e 1e dt

j j j . (6b)

Notice, as always, the introduction of the constant (1/ j , in this case) after substituting in the

initial condition at t = 0.

5-4

Functions of Complex Variables

Consider the complex function, F(z). Using z = x + jy, we can express F(z) in its real and

imaginary form thus:

j (x,y)F(z) u(x,y) j v(x,y) A(x,y) e , (7)

where u, v, A and are real functions of x and y.

Often in this course, the complex function we are considering will be something we call a

frequency response function and is typically a function of frequency, . If you wish, you could

think of this as having come from a function of a complex variable, x + jy, where x = 0 and y =

. We most often look at this function in its modulus and phase form, and typically, the form of

the complex function is a polynomial in j divided by a polynomial in j . For example:

o 1 o 12 2

1 2 2 1

b b ( j ) b jb.

1 a ( j ) a ( j ) (1 a ) ja (8)

When calculating the magnitude and phase of this function, it is easier to put the numerator and

denominator into magnitude and phase form and use the relationship:

b

b a

a

jj( )

j

B e Be .

AA e (9)

Following from this, the example complex function's magnitude and phase are:

2 21 1o 1 1 1

22 2 2o 22 1

b (b ) b aMagnitude Phase tan tan .

b 1 a(1 a ) (a ) (10)

Complex Conjugates

The complex conjugate of a complex quantity is found by replacing j by -j in the quantity. So if

we have:

j * jf u jv Ae , f u jv Ae . (11)

Notice that we use a * to denote the complex conjugate. Also, taking the conjugate has no effect

on the magnitude (A) and changes the sign of the phase. Multiplying a complex quantity by its

complex conjugate gives:

* 2 2 2f f u v A .

5-5

Use the expressions in (11) to prove this result.

Example

If T = (2 + 4j)/(1 - 3j), calculate the magnitude, the phase and the complex conjugate of T.

Solution

Magnitude = Magnitude of top / Magnitude of bottom.

2 2 2 2 2Magnitude (2 4 ) /(1 ( 3) ) 20/10 2

Magnitude = 2 1.414

Phase = Phase of the top - Phase of the bottom.

Phase = 1 1 1 1tan (4 / 2) tan ( 3/1) tan 2 tan 3 2.356 rads 135

Complex conjugate: replace j by -j.

(2-4j)/(1+3j) = 1.414 j2.356e .

Using MATLAB to Evaluate Complex Functions

When you are evaluating complex functions, MATLAB understands j or i to mean 1 , unless

you use those letters to denote another variable. It will also calculate the magnitude (abs) and

phase (phase). Below is an m-file example of how to evaluate the function above.

%ch4ex1.m program to evaluate a given complex function % %Specify coefficients b0=1;b1=0.9; a1=0.25;a2=0.01; omega=input('Input frequency at which you wish to evaluate function ') F=(b0+j*omega*b1)/(1-omega*omega*a2+j*omega*a1); [abs(F) phase(F)]

We can also plot this as a function of for a set of values of . Suppose we wanted to plot the

function for 0 to 100 in steps of 0.5 rad/s. The m-file for this would be:

%ch4ex2.m program to evaluate a given complex function and plot. % %Specify coefficients b0=1;b1=0.9;a1=0.25;a2=0.01; % %Specify omega omega=(0:0.5:100); % %Evaluate the function, notice the use of the "." to specify %element by element calculations. F=(b0+j*omega*b1)./(1-omega.*omega*a2+j*omega*a1); % %Now plot the magnitude in dB and the phase in degrees. subplot(211); plot(omega,20*log10(abs(F)));

5-6

xlabel('Frequency rad/s') ylabel('Magnitude in dB') title('Example Frequency Response') subplot(212) plot(omega,phase(F)*180/pi) ylabel('Phase in degrees') xlabel('Frequency rad/s')

The result of running this m-file is shown in Figure 2.

Figure 2: Plot of a complex function, magnitude and phase

5-7

SOLUTIONS OF ORDINARY DIFFERENTIAL EQUATIONS

The modeling of the components in the measurement system will usually lead to linear, ordinary

differential equations. The most general form of such an equation is:

n n 1 m m 1

n n 1 1 m m 1 1 on n 1 m m 1

d y d y dy d x d x dxa a a y b b b b x(t)

dt dtdt dt dt dt (13)

y is the response of the measurement system component,

x is the input to the measurement system component,

n is the order of the system.

Many measurement system components can be modeled by either first or second order

differential equations. For example:

dy(t)

y(t) K x(t)dt

(14)

could be an equation that models the dynamic behavior of a thermocouple. is called the time

constant and is related to how quickly the system responds, and K is the static sensitivity, which

is an indication of the gain of the system. In this example its units would be V/ C. It is the same

as the sensitivity calculated from the static calibration.

2

2 2nn

1 d y(t) 2 dy(t)y(t) K x(t)

dtdt (15)

could be the differential equation of a strain-gage accelerometer. n is called the natural

frequency, is called the damping ratio, and K is again the static sensitivity. n and affect

how quickly the system responds and how quickly it settles down after a perturbation.

How do we find y(t) if we know x(t)?

There are two parts to the solution, which come from the superposition principle. The input, x(t),

can be thought of as x(t) + 0.0, and so we need to find a solution with the right hand side as

given, and add to it the solution with the terms involving x(t) set to 0. Since by convention we

put all the terms in x(t) on the right hand side (RHS) of the equation, then this second solution is

formed by setting the RHS to zero.

The first solution is called the particular solution, and will have a form very similar to x(t).

The second solution is called the homogeneous solution. The homogeneous solution will

involve some unknown constants (number equal to the order of the system), which are found by

substituting known initial conditions into the final solution. So the solution steps are outlined

below. Also given is the measurement systems terminology for the particular and homogeneous

solutions.

5-8

Stage 1: Particular Solution (Steady State Solution)

Pick a solution that looks like the function x(t) but is in its most general form. For

example:

If x(t) = A cos 5 t , then choose py (t) B cos (5 t ).

So here the solution has the same frequency of the input but has undergone an

amplitude and a phase change. B and are found by substituting the expressions for

x(t) and y(t) into the differential equation and comparing coefficients.

Another example:

If x(t) = 2t then choose

2p o 1 2y (t) a a t a t .

Again substitute into the differential equation and compare coefficients.

Stage 2: Homogeneous Solution (Transient Solution)

Set the RHS of the differential equation to zero. Choose a solution of the form:

thy (t) e (16)

Substitute into the differential equation (RHS = 0), and divide byte . This will yield

a polynomial in . Consider equation (13) as an example. The resulting polynomial

will be:

n n 1n n 1 1a a a 1 0 (17)

Use a root solver on the computer to find the roots. Let's denote these by:

1 2 n, , .

There are actually n possible homogeneous solutions and we combine them to form

the full homogeneous part of the solution. Since these are all solutions to an

excitation of 0, we can multiply them by constants, which we will need to determine.

So,

1 2 3 nt t t t

h 1 2 3 ny (t) A e A e A e A e (18)

Stage 3: Total Solution

To form the total solution, add the particular and the homogeneous solution. In

measurement language, add the steady state and the transient solution.

5-9

p hy(t) y (t) y (t) (19)

steady state transienty y

Stage 4: Evaluating the constants from initial conditions

To find the total solution you need to evaluate the constants that arose in the

homogeneous solution. Initial conditions are conditions given at t = 0. You need n

initial conditions, where n is the order of the system. We assume that we know x(t),

the input, for all time, t.

1st Order system: y(0) should be known.

2nd Order system: y(0) and y(0) should be known.

3rd Order system: y(0), y(0) and y(0) should be known.

etc.

So take your total solution and differentiate it (n-1) times, substitute in t = 0 and

equate to known initial conditions. You should now have n equations and n

unknowns. Solve for 1 2 nA ,A , A .

Example

Consider a thermocouple with a time constant of .1 seconds and a static sensitivity of 3 mV/ C.

Initially the output is 0.01 Volt. The temperature is suddenly changed to 100 C? What would the

response be?

Solution

The differential equation is:

dy

y K xdt

where 0.1and K 0.003V/ C . Let's assume that the temperature change occurred at time:

t = 0s.

Stage 1: The input is a constant and so the steady state solution (particular solution) will also

be a constant. Set y = C and substitute into the above differential equation. When we

differentiate a constant the result will be zero. The input is 100 after t = 0s. Hence,

C K 100 0.3Volts. Hence, steady statey =0.3Volts.

Stage 2: Set the RHS of the differential equation to 0. Assume a solution of the form te and

substitute into the homogeneous form of the differential equation. Divide through by te . This results in

1 0. Hence, 1 1

10.0.1

5-10

The transient solution (homogeneous solution) is therefore:

t

10ttransienty Ae Ae

Stage 3: The total solution is the sum of the transient and steady state solutions:

10ty(t) 0.3 Ae

Stage 4: The initial condition (only one needed because its a 1st order system) is y(0) = 0.01

Volts. From the expression for the total solution with t = 0 substituted in, we see that,

0.01 = 0.3 + A, implying that A = - 0.29.

The total solution is therefore:

10ty(t) 0.3 0.29e Volts, for t 0,

and

y(t) = 0.01 Volts for t < 0.

The response of this system is shown in Figure 3.

Figure 3: The response of a first order system to be a step change in constant input

5-11

Example: Including bias effects

Suppose that a thermocouple similar to the one in the previous example is being used. The time

constant of .1 seconds and a static sensitivity of 3 mV/ C. Initially the output was 0.01 Volt

when the temperature was 18 C. The temperature is suddenly changed to 100 C? What would

the response be?

Solution

Note that K.18 = 0.054 does not equal 0.01 Volts, i.e., there is a bias in the measurement system.

The differential equation describing this system is:

dy

y b K xdt

where 0.1 and K = 0.003V/ C. b is the bias, which we can determine from knowing that the

output was a constant 0.01 Volts when the temperature was 18 C, prior to the step input. From

the differential equation, this gives:

0.01 b 0.003 18 Volts

Which yields b = 0.044.

We can follow the same solution strategy as before if we do a substitution of variables: z = y – b.

Because b is a constant, z y . The differential equation in z is therefore:

dz

z K x.dt

Stage 1: The input is a constant and so the steady state solution (particular solution) will also

be a constant. Set z = C and substitute into the above differential equation. When we

differentiate a constant the result will be zero. The input is 100 C after t = 0s. Hence,

C = K 100 = 0.3 Volts. Hence, steady statez 0.3 Volts .

Stage 2: Set the RHS of the differential equation to 0. Assume a solution of the form te and

substitute into the homogeneous form of the differential equation. Divide through by te . This results in

The transient solution (homogeneous solution) is therefore:

10ttransientz A e

Stage 3: The total solution is the sum of the transient and steady state solutions:

10tz(t) 0.3 A e .

5-12

Stage 4: The initial condition (only one needed because it’s a 1st order system) is y(0) = 0.01

Volts and hence z(0) = 0.054. From the expression for the total solution with t=0

substituted in, we see that,

0.054 = 0.3 + A, implying that A = - 0.246 .

The total solution is therefore:

10ty(t) b z(t) 0.044 0.3 0.246 e Volts,for t 0.

and

y(t) = 0.01 Volts for t < 0.

Example

An LRC circuit can be modeled as a 2nd order differential equation with a natural frequency of

1000 rad/s and a damping ratio of 0.01. In a calibration test the sensitivity was found to be 2

Volts/Volt. Before t = 0s the input is a constant voltage of 0 Volts. At t = 0 the input is changed

to a sinusoidal voltage of amplitude 6 Volts peak to peak and of frequency 10 Hz: 3 sin(100 t).

Calculate the response.

Solution

The differential equation describing this system is equation (15):

2

2 2nn

1 d y(t) 2 dy(t)y(t) K x(t)

dtdt

which becomes, after substituting in the values for the natural frequency, damping ratio and

sensitivity,

2

6 5

2

d y(t) dy(t)10 2 10 y(t) 2 x(t)

dtdt

Stage 1 We can approach forming the steady state solution in two ways:

(1) Assume a solution of the form: B sin (100 t ) and substitute into the

differential equation. Compare the coefficients of sin(100 t ) and of cos(100 t )

to find B and .

(2) Recognize that we can split the sine into two exponentials:

j100 t j100 t3 3x(t) e e

2j 2 j

5-13

and using the principle of superposition, we can calculate the response to each

exponential separately. We can then combine them to form steady statey (t).

We will adopt the second approach here, because we use a similar approach when

determining system frequency response functions. For ease of notation, let 100 .

j t j t1 1x(t) e produces y(t) T e ,T may be complex.

Hence: j t j t1

3 3x(t) e produces y(t) T e

2j 2j.

j t j t2x(t) e produces y(t) T e ,

hence: j t j t2

3 3x(t) e produces y(t) T e .

2 j 2 j

Therefore, x(t) = 3sin( t) produces

j t j tsteady state 1 2

3 3y (t) T e T e ,

2 j 2 j

We need to find 1 2T and T . Substituting

j t j t1x(t) e , y(t) T e

into the differential equation gives:

6 2 5 j t j t1T 10 ( j ) 2 10 ( j ) 1 e 2 e ,

leading to:

1 6 2 5

2T .

10 ( j ) 2 10 ( j ) 1

Recall that is 100 . Substitution into the above equation yields:

1

2T .

1 0.0987 j 0.0063

The response to the first exponential is:

5-14

1

j100 tsteady state 1

3y T e

2j

Following exactly the same procedure for j t j t2x(t) e and y(t) T e we get:

*2 16 2 5

2T T .

10 ( j ) 2 10 ( j ) 1

That is, 2T is the complex conjugate of 1T .

2

* j100 tsteady state 1

3y T e

2j.

Combining the two solutions gives:

steady state 1 1y 3 T sin(100 t phase(T )),

where:

1

11

T 6.66

0.0063phase(T ) tan 0.007 radians.

0.9013

Stage 2: Now we form the homogeneous or transient solution. Set x terms to 0, assume a

solution of the form te , substitute into the equation, and divide through byte . This

yields:

6 2 510 2 10 1 0.

The roots of this are:

1,2 10 100 1,000,000 10 j999.95

Therefore the transient (homogeneous) solution is:

( 10 j999.95) t ( 10 j999.95) t

transient 1 2y A e A e

Stage 3: The total solution is the sum of the steady state and transient solutions.

( 10 j999.95) t ( 10 j999.95) t1 2y(t) 6.66sin(100 t 0.007) A e A e

5-15

Stage 4: Now use the initial conditions. The system was at rest prior to the application of the

sinusoidal input and so y(0) and y(0) both equal 0. This leads to the two equations:

1 20 6.66 sin( 0.007) A A

1 20 666 cos( 0.007) ( 10 j999.95) A ( 10 j999.95) A .

Solving these equations, we find that *2 1A A and that:

j1.549 j1.5491 2A 1.046 e , A 1.046e .

To do this calculation you could use the following MATLAB m-file.

ch4ex3.m Program to solve two simultaneous equations. % y = [ 6.66*sin(0.007) , -666*pi*cos(0.007) ]'; X = [ 1 1 -10+j*999.95 , -10-j*999.95 ]; a=X\y

Combining these exponential terms we obtain a damped cosine wave.

10t j(999.95t 1.549) j(999.95t 1.549)transient

1 1y 2.092e e e ,

2 2

and hence

10ttransienty 2.092 e cos(999.95t 1.549).

The total solution is therefore:

10ty(t) 6.66sin(100 t 0.007) 2.092 e cos(999.95t 1.549).

The response of this system is shown in Figure 4.

5-16

Figure 4: The response of a second order system to a sinusoidal excitation, turned on at t = 0.

(top) Total solution, (middle) transient solution, (bottom) steady state solution.

5-17

FREQUENCY RESPONSE FUNCTIONS

When characterizing the behavior of measurement systems, we are interested in whether they can

respond fast enough to track the signals we wish to measure. The faster the fluctuations in a

signal, the higher the frequencies are in the signals. This is illustrated in Figure 5.

Figure 5: (a) Slower fluctuations, e.g. a 5 Hz sine wave,

(b) faster fluctuations, e.g., a 100 Hz sine wave

To characterize this, we examine how the steady state response of the system varies with the

frequency of a sine wave input. The system will affect the amplitude and the phase of the

sinewave and hence if the input is

x(t) Asin( t ), (20)

the output will be

y(t) A T sin( t phase(T)). (21)

j phase(T)T T e is complex and varies with . We often write it as T( j ) to emphasize this

frequency dependence. | T | is the magnitude of what is called the frequency response function

and phase (T) is the phase of the frequency response function.

It will become clear that knowledge of T( j ) will give us complete knowledge of the system.

That is, if we know T( j ) , we can also write down the differential equation model of the

measurement system. For the types of measurement system components we are interested in

T( j ) is often in the form:

5-18

2 NB

o 1 2 NB2 NA

1 2 NB

b b ( j ) b ( j ) b ( j )T( j )

1 a ( j ) a ( j ) a ( j ) (22)

Furthermore, NB = 0 or 1 and NA = 1, 2 or 3, are typically values for the types of measurement

component systems that we study.

The Ideal Frequency Response Function

Before going on to calculate frequency response functions, let us discuss what its ideal properties

would be. Ideally we would like the shape of the input signal, x(t), to be preserved as it passes

through the measurement system. This means that we do not mind if x(t) is scaled or time

shifted, but all frequency components present in the signal must be affected in the same way, i.e.,

ideally:

oy(t) K x(t t ) ,

where ot is the delay and K is a constant. If we plotted the ideal frequency response gain versus

frequency, it would be a constant. How does the time delay affect the phase of each frequency

component? If,

ox(T) A sin( t) , then y(t) KAsin( t t ) (23)

The time delay introduces a phase that is a linear function of frequency: ot . So the phase of

an ideal frequency response function is either 0 o(t 0) or a linear function of frequency.

It is unlikely that a system would exhibit these ideal characteristics for all frequencies. When

we purchase or develop our own measurement system we look for the region of frequencies

where these ideal characteristics are almost satisfied. We define that region as the operating

frequency range of the measurement system. That is, all frequency components in the signals we

wish to measure should lie in that region.

Calculating the Frequency Response Function from the Differential Equation

We will derive this frequency response function for the general system model (without bias) as

given in equation (13). We adopt an approach seen in a previous example where we split a

sinewave excitation into two complex exponential terms.

Consider only one of the exponentials: j tx(t) e , and denote the steady state response by

j ty(t) T e . Alternatively, we could consider the steady state response of the system to an

excitation j tx(t) X e to be j ty(t) Y e . Because this is a linear system and the excitation is

a single frequency, we know that Y = X.T, and hence we can find T, the frequency response

5-19

function of the system, from Y/X. Substitute these expressions for x(t) and y(t) into equation

(13).

n j t n 1 j t j t j tn n 1 oa ( j ) Ye a ( j ) Ye Ye b Xe

j t m j t1 mb ( j )Xe b ( j ) Xe

Comparing coefficients of j te and collecting terms in Y and X we obtain

n n 1 n 2 mn n 1 n 2 1 o 1 ma ( j ) a ( j ) a ( j )n a ( j ) 1 Y b b ( j ) b ( j ) X

Dividing by X times the polynomial in the brackets in front of Y, we can express T, the system

frequency response function, as:

2 m

o 1 2 m2 n

1 2 n

Y b b ( j ) b ( j ) b ( j )T( j )

X 1 a ( j ) a ( j ) a ( j ) (24)

Derivatives in the Differential Equation and (jω) Terms in the Frequency Response Function

Each time we took a derivative of j te we increased the power of the (jω) in the term.

m

m j td y( j ) Y e etc.

dt (25)

So by seeing a term 56( j ) , which is equal to 56j , in the denominator of the frequency

response function we know that there was a 5

5

d y6

dt term in the differential equation. Similarly, if

we see a term 22.3 , which is equal to –2.3 2( j ) , in the numerator of the frequency response

function we know that there was a 2

2

d x2.3

dt term on the RHS of the differential equation.

Example

What is the differential equation model relating the excitation, f(t), to the response, z(t), of a

linear system, if the frequency response function, H( j ) , is given by:

2

4 j 3

1 0.02 j .

5-20

Solution

Expressing f(t) and z(t) as j t j tFe and Ze , respectively, then H( j ) Z / F. Therefore:

2 j t j t1 0.02j Z e 4j 3 F e .

j t 2 j t j t j t j tZ e ( j ) Z e 0.02( j ) Z e 4( j ) F e 3 F e .

Therefore the differential equation is:

z z 0.02z 4 f 3f .

Response to sine waves

If we have an input 1j te , the response is 1j t

1T( j ) e . By similar argument, if we have an input

1j te , the response is

1 1 1 1j t j t j phase(T( j )) j t*1 1 1T( j ) e T( j ) e T( j ) e e ,

where * denotes complex conjugate. So the response to

1x(t) Bsin( t ) (26)

is the sum of the responses to

1 1j t j tj jB Be e and e e

2j 2j

which is

1 1 1 1j phase(T( j )) j t j phase(T( j )) j tj j1 1

B By(t) T( j ) e e e T( j ) e e e

2j 2j

Combining these complex exponentials into a sinewave we have

1 1 1y(t) T( j ) Bsin t phase(T( j )) . (27)

The frequency response function tells us how the amplitude and phase of a sinewave change as

the sinewave passes through a system. So once we have the frequency response function, the

steady state response of the system, to any sinusoidal excitation, can be calculated.

Example

5-21

Calculate the steady state response to x(t) = 3 sin 100t of the system whose behavior is

described by:

5y y 40x

Solution

Step 1: Calculate the frequency response function, G( j ).

Let j t j tx(t) X e and y(t) Y e . Substitute into the differential equation.

j t j t j t5( j )Ye Ye 40Xe

Y 40

G( j )X 5 j 1

Step 2: Evaluate G( j ) at 100 rad/s.

40

G( j100)1 j 500

Step 3: Calculate the Magnitude and Phase of G( j100).

1

2 2 2

40G( j100) 0.0800

1 500

phase 1 500

(G( j100)) 0 tan 1.5688 rads.1

Step 4: Write down the steady state response to x(t) = 3 sin 100t.

y(t) 3 0.0800sin(100t 1.5688) 0.2400sin(100t 1.5688).

Example

The frequency response of a thermocouple plus an AC amplifier measurement system is

3

1 2 3

K jT( j )

(1 j )(1 j )(1 j ) (28)

(a) What was the differential equation model of the system?

(b) What is the steady state response of this system to a sinusoidal fluctuation about a mean

temperature,

x(t) 20 5sin30t C

5-22

Solution

(a) Expand factors in the frequency response function and multiply both sides of (28) by the

denominator of the frequency response function.

2 31 2 3 1 2 2 3 1 3 1 2 3 3

Y1 ( ) j ( )( j ) ( )( j ) K ( j )

X

Multiply both sides by j tX e and use the results shown in equation (22) to give the differential

equation:

2 3

1 2 3 1 2 2 3 1 3 1 2 3 32 2

dy d y d y dxy ( ) ( ) K

dt dtdt dt

(b) Split this input up into the steady state response to the constant: 1x (t) 20 C and the steady

state response to the sinewave: 2x (t) 5sin 30t C, giving 1 2y (t) and y (t) , respectively.

The total steady state response is then

1 2y (t) y (t)

Steady state response to 1x (t)

Either, consider 1x (t) to be 20 cos t where 0, hence the steady state response is

1y (t) 20 T( j0) cos(0t phase (T(0)) 0. Or, notice that dx

0dt

and that the steady state

response to a constant is a constant, and therefore m

m

d y0

dt for all m 1. So the L.H.S. of the

differential equation becomes y and the right hand side is zero, giving a solution 1y 0.

Steady state response to 2x (t)

Here the frequency is 30 rad/s so the steady state response is

2y (t) 5 T( j30) sin(30t phase(T( j30)))

Evaluate the T( j ) at 30 rad/s, the frequency of the excitation.

3

1 2 3

K j30T( j30)

(1 j30)(1 j30)(1 j 30)

31 1 1

2 2 22 2 21 2 3

30 KT( j30)

1 (30 ) 1 (30 ) 1 (30 )

phase(T(j30)) = phase (top) – phase (bottom)

5-23

1 1 1 131 2 3

30tan (tan 30 tan 30 tan 30 )

0

1 1 11 2 3(tan 30 tan 30 tan 30 )

2

Note that we calculated the phase of each of the factors in the denominator:

1 iiphase{1 j } tan

1

and summed them up. This is faster than expanding out the denominator. We are using the

property of products of complex variables. If iji iz A e then

3 1 2 31 2 j j( )j j1 2 3 1 2 3 1 2 3z z z A e A e A e (A A A )e

so 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3z z z A A A i.e., z z z and phase(z z z ) i.e.,

1 2 3phase(z ) phase(z ) phase(z ).

So the total response is

1 2y(t) y (t) y (t) 0 5 T( j30) sin 30t phase(t( j30))

where T( j30) and phase(T( j30)) are given above.

Example

An accelerometer can be modeled as a second order system:

2

2

d v dvm c kv Ba

dtdt (29)

where v is the output voltage and a is the acceleration. m, c and k are the physical properties of

the accelerometer: mass, damping coefficient and stiffness respectively.

(a) What is the natural frequency, damping ratio and sensitivity of the accelerometer?

(b) Calculate the frequency response function.

(c) Plot the frequency response function. Plot the magnitude in dB, the phase in degrees and

plot both against a log frequency axis. This allows us to better see trends and makes it

easier to combine plots of different frequency response functions. Decibels (dB) are defined

as 20 10log (magnitude).

5-24

Plot over a range that highlights all the features of the frequency response function. Choose

2n 10,000 rad/s, .7, .1, and .001 and K 10mV/(m/s ).

Solution

(a) The standard form for a second order differential equation is

2

2 2nn

1 d v(t) 2 dv(t)v(t) K a(t)

dtdt (30)

where n is the undamped natural frequency, is the damping ratio and K is the

sensitivity. To put (28) in this form divide through by k. Equating coefficients we get:

2nn

m 1 c 2 B, and K

k k k

Therefore nn

k c c Band K

m 2k k2 km.

(b) To calculate the frequency response function assume that j ta(t) A e and j tv(t) V e .

The frequency response function is then given by T = V/A. Substitute into (30) to get

2 j t j t2

nn

1 2( j ) ( j ) 1 V e K Ae

Therefore,

2

2nn

V KT

A 21 j

(31)

(c) Since the natural frequency is 10,000 rad/s, let's plot from 2 610 to 10 rad/s. You

will notice that when 4

n 10 rad/s the real part of the denominator is zero and hence

the phase of T is 90 . Also T is close to a maximum here. As gets much larger than

n the terms in the denominator become large and T becomes very small. Hence, by

plotting from 2 orders of magnitude below n to 2 orders of magnitude above n , we

should see all the interesting features of the frequency response diagram.

Let's plot 5000 points of the frequency response function. To make the values equally

spaced on a log scale, we choose the i so that

5-25

6 22 10

10 ii log (10 10 )

log 10 , i 0, 1, 49994999

2 6 2 (i / 4999)i 10 (10 10 ) (32)

In general,

i /(N 1)i min max min( ) i 0,1, N 1 (33)

In MATLAB a function logspace creates, the i for you. To create a vector, om, of 5000

frequency values, equally spaced on a logarithmic scale from 2 610 to 10 type:

>>om=logspace(2,6,5000);

Since we will be calculating T for different values of , and also because we will be using

this form of the frequency response function many times, it would be a good idea to create

a MATLAB function to calculate the frequency response given nK, , and the frequency

vector om. We can then call this function from other m-files. To do this create an m-file of

the same name as the function as shown below.

%sndord.m function to calculate the value of a second order % system at values in the array om. % function [T] = sndord(K,omn,zeta,om); T=K./((1-(om/omn).^2)+j*(2*zeta*om/omn));

The function (m-file) has to be in a directory MATLAB can find, e.g. the directory you are

working in. The MATLAB m-file to do the plotting will now look something like that

shown below.

% ch5fig6.m program to calculate a second order function % for different values of zeta. % Function: sndord.m is used % omn=10000; K=0.01; zeta=[ 0.7 0.1 0.001 ]; om=logspace(2,6,5000); t1=sndord(K,omn,zeta(1),om); t2=sndord(K,omn,zeta(2),om); t3=sndord(K,omn,zeta(3),om); subplot(211) semilogx(om,20*log10(abs(t1)),om,20*log10(abs(t2)),om,20*log10(abs(t3))); axis(([100 1000000 -120 20]) set(gca,'YTick',-120:20:20) grid

5-26

xlabel('Frequency - rad/s') ylabel('Mag (dB - V/(m/s^2))') subplot(212) semilogx(om,angle(t1)*180/pi,om,angle(t2)*180/pi,om,angle(t3)*180/pi); axis([100 1000000 -180 0]) set(gca,'YTick',-180:30:0) grid xlabel('Frequency - rad/s') ylabel('Phase - degrees')

The result of running this m-file is shown in Figure 6. Notice that as decreases the peak

in the magnitude plot becomes more pronounced and the majority of the 90 phase shift

occurs over a shorter region of frequencies. At 0.7 the peak in the frequency response

magnitude has nearly disappeared.

Figure 6: Second order system frequency response for different

values of damping ratio. (a) magnitude ref 1mV/ 2(m/s ) , (b) phase.

Characteristics of a second order frequency response diagram

5-27

(a) Peak in the magnitude

A peak will occur when the magnitude of the frequency response denominator in (31) is at a

minimum. At this value of , the square of this quantity will also have a minimum. To

find this minimum differentiate with respect to and set the result to zero. That is,

differentiate

2 22

2nn

21

to get

2 2

2 2 2n n n

2 82 1

Setting this equal to zero and solving for gives

2 2 2n(1 2 )

This gives the resonant natural frequency

2res n1 2

When 2 1/2 ( .7071) this becomes imaginary, and a peak no longer appears. If is

very small res approaches n .

(b) Phase change

The phase is 1 n2 2n

2tan , if K 0

( ). When n the phase change is 90 or

/2 rads. This is often used as a method of finding the natural frequency of a second order

system.

As the phase tends to 180 or radians.

(c) Roll-off in magnitude at high frequencies

A decade is an increase in frequency by a factor of 10. When is large the magnitude of

the transfer function is dominated by the 2 2

n/ term, i.e.

n

2 42 n

4

KT( j )

and

5-28

n

2 210 10 n 1010log T( j ) 20log K 40log

A decade above this ( 10 ) ,

n

2 210 10 n 1010log T( j10 ) 20log K 40log 10

210 n 10 1020log K 40log 40log 10

2

10 n 1020log K 40log 40

So at high frequencies the magnitude drops by 40 dB every time we increase the frequency

by a factor of 10. We say that the roll-off is 40 dB/decade.

Example for the Reader

A first order system (RTD + bridge circuit) may be modeled by the differential equation

shown below,

dyy x(t)

dt

(a) What are the time constant ( ) and static sensitivity (K)?

(b) Derive the frequency response function in terms of and K.

(c) If the cut-off frequency c( ) is defined as the point where the frequency response function

magnitude drops 3 dB from its value at 0 , show that c 1/ . Prove that the phase of

the frequency response function is 45 at the cut-off frequency.

(d) Plot the frequency response function over a region that illustrates all its main features.

(Choose .05 seconds and K 35mV/ C).

(e) At high frequencies, prove that the roll-off is 20 dB/decade. Check on your plot that this is

so.

(f) What is the steady state response of this system to

x(t) 5sin2t 20sin300t C?

Calculating a useful operating frequency range

We have noted earlier that to determine which signals we can measure accurately, we must

determine the operating frequency range of a system. That is, where the frequency response

function gain is constant and the phase is zero or a linear function of frequency. To simplify

5-29

matters, consider operating frequency regions where the phase is close to zero, i.e., systems

without time delays. Signals we wish to measure must only have frequency content in the

operating frequency range, if we wish to be able to measure the signals without distortion.

Usually a system will not exhibit this desirable behavior exactly in any frequency region, and

we must define an acceptable error in gain and phase that we are willing to accept. We then find

at what frequencies this measurement system lies within these error bounds; this defines the

operating frequency range. This is illustrated in Figure 7, where the measurement system is a

second order system and in this example we are setting the acceptable error to be that the gain is

flat within 1.0%. Note: though not shown here, there is a significant phase error in the region

defined by this error bound on the gain.

Figure 7: Acceptable error bounds on the frequency response of a

second order system, used to define an operating frequency range

(a) 0.1, (b) 0.9 and (c) 0.66

The "flat" part of the frequency response function of a second order system is approximately

equal to K, the static sensitivity and the value of the frequency response function gain at zero

5-30

rad/s. We wish to find at which frequency the magnitude becomes 0.99 K or 1.01 K, whichever

is the lower frequency. If the damping ratio is less than 0.7071 then the frequency response gain

will peak and thus it is likely that by solving T( j ) 1.01 K we will find the upper limit of the

operating frequency region. If the peak value of the frequency response function is less than

1.01 K or the damping ratio is larger than 0.7071, we will find the upper frequency limit by

solving T( j ) 0.99 K .

What is an acceptable error depends on the application and the cost of measurement errors.

While 1% error in the gain was used here, it is by no means a standard definition of an

acceptable error.

Example

A measurement system behaves as a first order system with a frequency response function:

20G( j )

1 j0.01

The operating frequency range is defined as the frequency region where the gain error is less

than 0.5% and the phase error is less than1 . What is the operating frequency range?

Solution

A first order system frequency response gain drops from its value at low frequencies. To find the

upper frequency limit as defined by the gain error, we solve:

22

2

20(0.995 20)

1 (0.01 )

Note that we are using the square of the frequency response gain. Inverting both sides of this

equation and multiplying by 400 gives:

2 21 0.0001 0.995 ,

giving a solution of:

2100 0.995 1 10.04 rad/s.

Now consider a phase error of 1 0.0175 radians. The phase of a first order system drops from

0 at DC (0 rad/s) to 90 at high frequencies. Hence, to find the upper frequency limit defined

by this phase error, we solve:

1 0.010.0175 0 tan

1

This results in:

100 tan(0.0175) 1.75 rad/s

5-31

So the phase error limit restricts the operating frequency range much more than the gain error

limit. The operating frequency range for this first order system, as defined by the error criteria

specified, is 0 to 1.75 rad/s.

PUTTING SYSTEMS TOGETHER

T(t) y1(t) y2(t) v(t)

Figure 8: Block diagram of the measurement system

Suppose we know the frequency response of each of the components: 1 2 3G ,G and G . Can we

say what the frequency response function of the entire system is?

When we connect the components together the voltage we measure at the output of each system

will drop. So,

1y > 1y , and

disconnected connected

from amp to amp

2y > 2y ,

disconnected connected

from filter to filter

This is caused by current flowing from the circuitry in one system to the next system. This is

discussed more fully in Chapter 7. If the subsystems are designed properly we can reduce the

voltage change so that the disconnected and connected voltages are approximately equal. If this

is the case, then the output of the subsystem component, when disconnected, becomes the input

to the next subsystem component, when it is connected.

Consider the steady state response of the measurement system to j te . Passing this input

through the first component (thermocouple), the steady state response will be j t

1 1y (t) G e .

We will assume connection effects are negligible and this becomes the input to the second

component. j te input into the second component produces a steady state output j t

2G e .

From linear system theory, j t

1G e input into the second stage will produce a steady state output

1G times that produced by j te , and so,

2 1 2 j ty (t) G G e

G1 (jω)

Thermocouple G2 (jω)

Amplifier

G3 (jω)

Filter

5-32

Again we will assume that connection effects are negligible and this becomes the input to the

third component (filter). j te input to the filter produces a steady state output j t3G e .

Therefore, j t1 2G G e will produce a steady state output 1 2G G times this, i.e.,

j t1 2 3v(t) G G G e

So we input j te into the thermocouple, and j t1 2 3G G G e is the steady state response of the

measurement system, if we can ignore connection effects. The frequency response function of

the entire system is therefore

1 2 3G(j ) G ( j ) G ( j ) G ( j ) ,

i.e. the product of the individual frequency response functions. Note also, therefore,

1 2 3G( j ) G ( j ) G ( j ) G ( j )

and

1 2 3phase (G( j )) phase(G ( j )) phase(G ( j )) phase(G ( j ))

The steady state response of the entire system to oT(t) Asin is

ooov(t) A G sin( t phase(G) )

1 o 2 o 3 o o 1 o 2 o 3 oA G ( j ) G ( j ) G ( j ) sin t phase(G ( j )) phase(G ( j )) phase(G ( j ))

This approach to putting systems together can be applied to many problems, not only

measurement system design. It is attractive to look at simpler subcomponents and then connect

them together using this block diagram approach. However, caution must be exercised when

doing this. The fundamental assumption, that there is no interaction between the systems when

connected, may not be true. Below is an example of using this block diagram approach to an

office noise problem.

Example

A printer in an office is making a noise that can be modeled by the sum of two sinewaves.

1 2p(t) 0.25sin t 0.125sin( t ) Pascal

1 2720 rad/s and 1080 rad/s. This is measured with a microphone that has a constant

frequency response function with a sensitivity of 50 mV/Pascal attached to an amplifier with a

constant frequency response function = 100 V/V. (This is not true at very high frequencies, but

is a sufficient model for this problem.)

John and Felicity share an office that is separated from the printer by a partition. The

transmission path from the printer to John and Felicity's desks is approximately modeled by the

frequency response function.

5-33

1T( j ) Pascal/Pascal

1 j /800

In addition, Felicity is wearing headphones with a frequency response function,

0.9H( j ) Pascal/Pascal

(1 j / 600

Calculate the steady state sound pressure that Felicity will sense from the printer. If you

measured this with a microphone placed inside the headphones, what output voltage would you

measure. Assume as you used the same microphone to make this measurement, as you used to

measure the printer noise.

Solution

There are two systems here; (1) the sound pressure measurement and (2) the transmission path

through the partition and the headphones.

(1) (2)

p(t) v(t) p(t) p1(t)

p1(t) v1(t)

Figure 9: Block diagrams of two systems. (1) MIC plus amp,

(2) transmission path plus headphones

The first system is attached to the second to make the measurement of the sound at Felicity's ear.

Assuming that no interaction effects occur between the systems when connected, the frequency

response function relating 1p (t) to p(t) is

11 .9

G ( j ) T( j )H( j ) Pascal/Pascal1 j /800 1 j / 600

and the frequency response function relating 1 1p (t) to v (t) is

24.5

G ( j ) T( j ) H( j ) 0.05 100 V/Pascal(1 j /800) (1 j / 600)

and

2 1G (j ) 5 G ( j )

Since we are interested in the steady state response to sinewaves at 720 rad/s and 1080 rad/s, let's

evaluate the frequency response function at these values.

10.9

G ( j720) ,(1 j720 /800) (1 j720 / 600)

mic

K=50mv/pascal Amp

K=100V/V

Transmission

through

partition

T(jω)

Headphone

H(jω)

5-34

1 1 12 22 2

0.9G ( j720) 0.4283 ,

(1 0.9 ) (1 1.2 )

1 1

1phase(G ( j720)) tan 0.9 tan 1.2 1.6089 rads

Similarly,

10.9

G ( j1080) ,(1 j1080 /800) (1 j1080 / 600)

1 1 12 22 2

.9G ( j1080) 0.2602 ,

(1 1.35 ) (1 1.8 )

1 1

1phase(G ( j1080)) tan 1.35 tan 1.8 1.9969 rads

The steady state response of 1G to the input is therefore

1p (t) 0.25 0.4283 sin (720t 1.6089) 0.125 0.2602 sin (1080t 9.9969) Pascal

The measured signal will be 15p (t) since the microphone plus amplifier's response is considered

frequency independent in this example. So the measured voltage is

1v (t) 0.5353sin(720t 1.6089) 0.1626 sin(1080t 1.9969) Volts

Note how the partition and headphones had a more significant effect on the 1080 rad/s

component than they did on the 720 rad/s component.

When solving these "wordy" problems, sketching out a block diagram of the system components

and their connections will help you to sort out what is actually happening. Associated with each

of the blocks should be enough information to write down or derive a frequency response

function. Once you have connected the system and derived the overall frequency response

function you know everything about the system. From this you can write down the differential

equation of the system, or you can quickly calculate the steady state response to a sinusoidal

excitation.

5-35

SUMMARY

In this chapter we have reviewed basic complex variable relationships and the solution to linear

ordinary differential equations. In particular, we have focused on steady state response

(particular solution) to sinusoidal and step inputs, though we have derived transient

(homogeneous) solutions as well.

Building on the response to sinusoidal excitation we derived the frequency response function

associated with a system by solving for the steady state response to j te . This function is

directly related to the differential equation model of the system and its magnitude and phase tell

us how a particular frequency component is affected by the system, i.e.

o o o ox(t) Asin t, y(t) A T( j ) sin t phase(T( j ))

where x(t) is the input, y(t) the response and T( j ) the frequency response function.

We also noted that, for measurement systems, the useful frequency operating range was the

range where the gain of the frequency response function was flat and the phase was either zero or

a linear function of frequency, the latter corresponding to the system introducing a time shift into

the measurement. It is therefore very important to measure the frequency response function of

the measurement system to determine the useful frequency range.

At the end of the chapter we briefly looked at combining frequency response functions of

components of measurement systems to generate an overall system frequency response function.

If the components are well designed and voltages between subcomponents in the measurement

system do not drop when connections are made, then the frequency response function of a

measurement system, consisting of subsystems connected in series with frequency response

functions: 1 2 3 4G (j ),G ( j ),G ( j ),and G ( j ) , will be

1 2 3 4G(j ) G ( j ) G ( j ) G ( j ) G ( j )

This allows us to look at the simpler system components in isolation and model them separately.

Then, by putting them together we can derive the more complicated frequency response function

(model) of the whole system.