You are on page 1of 16

A.

Frequency Response Methods


1 Revision

Frequency response analysis aims to determine how a system responds to sine waves of different frequencies, applied at the input terminal. It is, essentially, a steady state approach which yields information about a system's dynamic characteristics. If we observe the output of a system using an oscilloscope, and "switch on" a sinusoidal input signal at time t = 0, we will see a transient period, where the response is not exactly sinusoidal, followed by steady state, where the response has settled to a constant amplitude sinusoid. If we are also observing the input sinusoid on the oscilloscope, we will see that the output sinusoid probably has a different amplitude from the input and is also shifted horizontally relative to the input. The ratio of output amplitude to input amplitude is called the "gain" and the horizontal shift represents the "phase angle", both of these measures vary according to the frequency of the applied sinusoid, thus we should strictly say, for example "... gain at 3 rad/sec..." etc. Typical input (solid line) and output signals (dashed line), obtained from SIMULINK, are shown below. In this example, the input signal is sin t, therefore its amplitude is unity and its frequency is 1 rad/sec. The transient period in this case is quite short (compared to the period of the sinusoid), approximately 2 sec, and the output settles to a sinusoid of amplitude 0.7 with a phase angle of approximately -45O; the "-" indicating that the output lags the input. This is often referred to as "a 45O lag". We also observe that the gain at 1 rad/sec is 0.7/1.0 = 0.7.

1 s+1 sin (t) Transfer Fcn

Mux Auto-Scale Graph

Mux

1 0.5 0 -0.5 -1 5 10 15 Time (second) 20

Frequency Response - Analytical If the TF of the system is known, the gain and phase angle at various frequencies can be obtained analytically. This is done by replacing "s" by "j" everywhere it appears in the TF. The magnitude of the resulting complex number is the gain of the system at rad/sec and the modulus of the complex number is the phase angle at rad/sec. For example, given a system with Laplace TF: G (s) = putting s = j gives: G ( j) = The magnitude (gain) is then: G () = G ( j) = 10 1 + (3) 2 = 10 1 + 92 10 1 + j3 10 1 + 3s

Gain is often represented in dB: G dB () = 20 log10 G () The argument (phase angle) is: () = G ( j) = TF numerator TF denomintor thus: 0 3 () = tan 1 tan 1 = tan 1(3) 10 1

Calculating gain and phase angle for a range of frequencies (selection of these frequencies is discussed later): (rad/sec) 0.02 0.05 () = tan 1(3) (deg) -3.4 -8.5 G () = 10 G dB () 20.0 19.9

1 + 92 9.98 9.89

0.1 0.2 0.5 1.0 2.0 4.0 10.0

-16.7 -31.0 -56.3 -71.6 -80.5 -85.2 -88.1

9.58 8.57 5.55 3.16 1.64 0.83 0.33

19.6 18.7 14.9 10.0 4.3 -1.6 -9.6

This is the "frequency response" of the system, and is usually represented graphically. Several representations are common, we shall plot G dB () vs frequency and phase angle vs frequency - referred to as a "Bode plot". The Bode plot for the system above is: 20 Gain dB 10 0 -10 -2 10 0 Phase deg -90 -180 -270 -360 -2 10 10 10 Frequency (rad/sec)
-1 0

10 10 Frequency (rad/sec)

-1

10

10

System Performance Measures

The performance of a system, and the method of measuring and/or specifying it, depends largely on the application and operating environment. Some popular measures are: Percentage overshoot (normally to a step input) Rise time (time taken to rise from 10% to 90% final value for a step input)

Settling time (time taken to settle within x% of the SS response for a step or ramp input) Steady-state error (final error (%) between input and SS response, e.g. for step or ramp inputs) Disturbance rejection characteristic (% rejected) Integral of Time and Absolute Error (ITAE), or other similar integral measures Closed loop bandwidth (measure of response speed and noise rejection characteristics) Phase margin and/or gain margin (PM / GM - frequency response measures based on the open-loop transfer function)

Normally, the design of a suitable controller for a given plant or process requires several specifications to be met. We consider, below, a typical design procedure based on ramp following error and PM requirements. Firstly, we consider the determination of PM and GM from the open loop TF (OLTF), and go on to discuss how the PM may be improved by a phase lead controller. 3 Relative Stability - Phase Margin and Gain Margin

Consider the control system shown in the diagram, below.

+ -

G(j ) S

(i)

Apply a sinusoidal input: Asin t

A A Asin t

G(j ) S

(ii)

Adjust until the phase shift is -180O; at = 1, say:

A A Asin 1t B

G(j ) S

(iii)

Remove the sinusoidal input and close S at the same instant: B B

G(j ) S

Note that minus sign at the comparator inverts the output sinusoid. (iv) Three things can now happen, depending on the relative values of "A" and "B": If B=A, sinusoid is self-sustaining (critically stable); i.e. open loop gain = 1 (0dB) when = -180O. In this case, G(j) "sees" the same sinusoid as previous. If B>A, sinusoid increases in amplitude (unstable) ); i.e. open loop gain > 1 (0dB) when = -180O If B<A, sinusoid decreases in amplitude (stable) ); i.e. open loop gain > 1 (0dB) when = -180O (v) The gain margin is defined as: GM = -20log10 (B/A) = -20log10G( 1) = -GdB( 1) (vi) +ve GM stable -ve GM unstable Actual GM value measure of relative stability

Similarly, it can be argued that, if is adjusted until the open loop gain is unity (or 0dB) and the corresponding phase angle ( ) is measured, then: If = -180O, sinusoid is self sustaining (critically stable)

(vii)

If < -180O, sinusoid increases in amplitude (unstable) If > -180O, sinusoid decreases in amplitude (stable)

The phase margin is defined as: PM = 180O + +ve PM stable -ve PM unstable Actual PM value measure of relative stability

(viii)

Note that the GM and PM are obtained from the open loop transfer function (OLTF); i.e. G(s) for a unity feedback system and G(s)H(s) for a system with a non-unity feedback element: H(s). GM and PM are used to predict the relative stability of the closed loop transfer function (CLTF).

Example A unity feedback system has OLTF: G (s) = Solution The following MATLAB m-file produces the open loop Bode plot and also measures the GM and PM (input value of k = 1). % Interactive determination of gain and phase margins % % Set-up 0.1<w<1000 rad/sec w = logspace(-1,3,20); % Initialise the gain, k=1 k = 1; while k>0 k = input('gain = ') n1 = 1 d1 = [1 3 2 0]; [m,p,w] = bode(n1,d1,w); margin(m,p,w); end 1 , determine the GM and PM. s(s + 1)(s + 2)

Improving the PM (by gain adjustment)

The simplest method of obtaining the required value of PM is to adjust the forward gain. For example, a gain, K, may be added to the OLTF of the previous example, giving the new OLTF: K G (s) = s(s + 1)(s + 2) Obviously, K does not affect the phase angle part of the Bode plot in any way, but it does serve to move the gain plot vertically up or down. That is, the 0dB crossover frequency can be selected by appropriate choice of K. For example, assume we are aiming for a gain margin of 70O for the above system. Selecting K=0.48 reduces the 0dB crossover frequency from 0.445 rad/sec to 0.232 rad/sec, where the phase angle is -110O and the PM is, approximately 70O as required.

4.1

Relative Stability

The GM has a useful engineering interpretation - it tells us how much the forward gain can be increased by before causing the closed loop to become critically stable. But why should we want to increase the forward gain? Simply because the speed with which the closed loop system responds to a change in input signal is related to the forward gain value (higher gain = faster reaction). For example, the natural frequency, n of a 2nd order system is equal to the square root of the steady-state forward gain. The PM has an equally important interpretation, which leads to a useful design rule: A system with phase margin, PM (deg), can be approximated by a 2nd order system with damping coefficient, = 0.01PM. Thus, for example, the above 3rd order system, with K=0.48 and PM = 70O , can be approximated by a 2nd system with = 0.7.

The value of approximating a higher order system by a 2nd order TF is that it allows us to visualise the shape of transient (e.g. step) responses, based on our understanding of standard 2nd order TF's. This helps us with the conceptual aspects of system design. The design rules are further investigated below. Consider the step responses of the above closed loop system, with K=1 (PM=53O) and K=0.48 (PM=70O). These are shown below. K=1

K=0.48

Compare the above plots with the responses of the standard 2nd order TF, 2 n , with n and given by the design rules: 2 s + 2 n s + 2 n 0.01 PM (deg) c = 4 4 + 1 2 2 n These design rules, along with transient and frequency response plots for standard 1st and 2nd order TF's, are given in the Control Data Sheets (Appendix 1). (You might be relieved to know that the Control Data Sheets will be provided at the examination). Where c is the 0dB crossover frequency (0.232 rad/sec and 0.445 rad/sec in the above examples)
2

= 0.53 n = 0.58

= 0.7 n = 0.36

It can be seen that the corresponding responses in each figure are very similar, thus the design rules provide us with 2nd order TF's which approximate the higher order systems with reasonable accuracy.

Phase Lead and Phase Lag Networks

A phase lead network is used to increase the open loop phase angle in the region of the 0dB crossover frequency. The network also increases the loop gain in the region of the original 0dB crossover but, provided it's properly designed, the effect on the phase angle is more pronounced than the effect on the gain. The overall effect is to improve the GM. It has unity DC gain and does not, therefore, affect any of the steady state characteristics such as ramp or position error. The TF of the network is: 1 + s ; with > 1 1 + s Gain and phase angle plots for this network (with a normalised frequency axis: ) for various values of ( = 2, 5 and 10), are shown below: G C (s) =

It can be shown that the frequency where the maximum phase lead occurs is: m = 1 (1)

at this frequency, the amount of phase added will be: 1 m = sin 1 + 1 and the amount of gain added will be: G= 1+ 1+ 1 (3) (2)

An alternative interpretation of (2) is: to obtain a maximum phase addition of m, the value of must be: = 1 + sin m 1 sin m (4)

These relationships are given in the Control Data Sheets (Appendix 1). Phase Lead Compensation - Rules: G c (s) = 1 + Ts >1 1 + Ts , sin( m ) = 1 +1 m = 1 T

where m is the frequency at which maximum phase angle ( m ) occurs. a) b) c) d) Evaluate the uncompensated PM when design criteria are satisfied (error constants, BW, etc). Determine the additional phase angle required to meet the PM specification (allow a small amount for safety). Evaluate Evaluate 10log and determine where the uncompensated magnitude curve is equal to 10log . This frequency will be the new 0dB cross-over and m simultaneously, since the compensation network adds 10log at m Obtain the compensated loop frequency response, measure the PM and repeat above steps if necessary.

e)

Some Useful Design Relationships

Settling Time: 2% settling time: System 3dB Bandwidth: B 1.6 c 2nd Order Equivalent: 0.01 PM (deg) and c 4 4 + 1 2 2 n where c is the loop (0dB) cross-over frequency Steady-state Errors: Given the loop transfer function, G(s), the system error constants and steady-state errors are:
2

TS 4

4 n

; where c is the loop (0dB) cross-over frequency

Position error constant: Velocity error constant: Acceleration error constant: Steady-state position error: Steady-state velocity error:

K p = G (0)
s 0

K v = lim [ sG (s)

K a = lim s 2 G (s)
s 0

e ss = e ss =

A , for a step input of magnitude, A 1+ K p

A , for a ramp input: At Kv A Steady-state acceleration error: e ss = , for an acceleration input: At 2 Ka

7 1.

Exercises A certain control system has transfer function: 5 G (s ) = 1 + 20s i) Derive expressions for the frequency response gain functions: G(), GdB(), and phase angle, (). ii) Plot the Bode diagram [20log[G()] vs. and () vs ] on log-lin graph paper. iii) A sine wave, 2sin(0.04t), is applied to the system. Sketch the time response. iv) repeat iii) for sine waves: 2sin (0.001t) and 2sin (4t) i) Plot the frequency response for the following transfer function: 1 G (s) = s+2 ii) Sketch the time response for an input signal: sin(5t) Repeat question 2 for the transfer function: G (s) = (s + 2) Why is this transfer function physically unrealisable? The OLTF of a unity feedback control system is: K G (s) = s(5s + 1) i) Obtain the Bode plot for K = 1 ii) Measure the resultant phase margin

2.

3.

4.

iii) iv) v)

Determine the value of gain, K, to provide a phase margin, PM = 200 Obtain the unit step response of the closed loop system, with the value of K determined in iii), and show that this approximates a standard 2nd order, = 0.2 response repeat iii) and iv) for various phase margins and propose an approximate relationship (a "design rule") between and PM. (You might like to use EXCEL to compare and PM)

5.

K Given the OLTF: G (s) = 2 , and the design specification: s i) Settling time, TS 4 sec ii) Damping coefficient, 0.45 Obtain a suitable phase lead compensator. K , and the design specification: s(s + 2)

6.

Given a system with OLTF: G (s) = i) ii)

Steady-state ramp error 5% of the ramp magnitude PM 450

Design a suitable phase lead compensator. 7. The motor speed control system of an ink-jet printer has OLTF: G (s) = 0.15 s(s + 1)(5s + 1)

Design a lead phase lead compensator to provide a system bandwidth of 0.75rad/sec and a phase margin of 300. You may assume = 10.

Appendix:
(i) (ii)

Complex Numbers - Revision

For the complex number: A+jB, "A" is the real part and "B" is the imaginary part. The "modulus" or "magnitude" of a complex number is defined as: A + jB = A 2 + B 2 = A 2 + B 2

If the complex number represents the frequency response of a transfer function, then the above formula represents the gain or amplitude ratio at rad/sec: steady - state output amplitude G () = G ( j) = steady - state input amplitude This is normally expressed in dB: GdB() = 20 log10 G() (iii) The "argument" or "angle" of the complex number is defined as: ( A + jB ) = tan 1 B A If the complex number represents the frequency response of a transfer function, then the above formula gives the phase angle between the input and steady-state output sinusoids at rad/sec, () . A negative phase angle means that the output sinusoid lags the input sinusoid.

( )

(iv)

In general, a frequency response function, evaluated at rad/sec, is: (A + jB)(C + jD)...... (a + jb)(c + jd )....... the gain at is: G () = the phase angle at is: () = tan 1 (B / A) + tan 1 (D / C)....... tan 1 (b / a ) tan 1 (d / c)....... A 2 + B2 C 2 + D 2 a 2 + b 2 c2 + d 2

(v) (vi) (vii)

Special Case: Special Case: Special Case:

A real number, A = A+j0, has G = A; and = 0O An imaginary number, jB = 0+jB, has G = B; = 90O A real number, 1 1 1 = + j0 , has G = ; = 0O a a a 1 1 1 = 0+ , has G = ; = -90O jb jb b 1 a 2 + b2
1 b ; = tan a

(viii)

Special Case:

An imaginary number,

(ix)

Special Case:

A complex number,

1 , has G = a + jb

You might also like