<<

Frequency Response Analysis & Design • In conventional control-system analysis there are two basic methods for predicting and adjusting a system’s performance without resorting to the solution of the system’s differential equation. They are: – Root-Locus Method – -Response Method • For the comprehensive study of a system by conventional methods it is necessary to use both methods of analysis.

Mechatronics K. Craig Analysis & Design 1 • Root-Locus Method – Precise root locations are known and actual time response is easily obtained by means of the inverse . • Frequency-Response Method – Frequency response is the steady-state response of a system to a sinusoidal input. In frequency-response methods, we vary the frequency of the input signal over a certain range and study the resulting response. – The design of feedback control systems in industry is probably accomplished using frequency-response methods more often than any other, primarily because it provides good designs in the face of uncertainty in the plant model.

Mechatronics K. Craig Frequency Response Analysis & Design 2 – Many times performance requirements are given in terms of frequency response and/or time response. – Noise, which is always present in any system, can result in poor overall performance. Frequency response permits analysis with respect to this. – When the for a component is unknown, the frequency response can be determined experimentally and an approximate expression for the transfer function can be obtained from the graph of the experimental data. – The Nyquist stability criterion enables one to investigate both the absolute and relative stabilities of linear closed-loop systems from a knowledge of their open-loop frequency-response characteristics.

Mechatronics K. Craig Frequency Response Analysis & Design 3 – Frequency-response tests are, in general, simple and can be made accurately by readily-available equipment, e.g., dynamic signal analyzer. – Correlation between frequency and transient responses is indirect, except for 2nd-order systems. – In designing a closed-loop system, we adjust the frequency-response characteristic of the open-loop transfer function by using several design criteria in order to obtain acceptable transient-response characteristics for the system.

Mechatronics K. Craig Frequency Response Analysis & Design 4 • For a stable, linear, time-invariant system, the mathematical model is the linear ODE with constant coefficients: dnqdn1- qdq aooo+a++a+=aq ndtnn-1dtn1- L 1dt 0o dmqdm1- qdq bi+bii+++bbq mdtmm-1dtm1- L 1dt 0i

• qo is the output (response) variable of the system

• qi is the input (excitation) variable of the system

• an and bm are the physical parameters of the system

Mechatronics K. Craig Frequency Response Analysis & Design 5 • If the input to this system is a sine wave, the steady- state output (after the transients have died out) is also a sine wave with the same frequency, but with a different and angle.

• System Input: qii=wQsin(t)

• System Steady-State Output: qoo=Qsin(wt)+f

• Both amplitude ratio, Qo/Qi , and phase angle, f, change with frequency, w. • The frequency response can be determined analytically from the Laplace transfer function: G(s) s = iw Sinusoidal M(w)Ðfw() Transfer Function

Mechatronics K. Craig Frequency Response Analysis & Design 6 • A negative phase angle is called phase lag, and a positive phase angle is called phase lead. • If the system being excited were a nonlinear or time-varying system, the output might contain other than the input frequency and the output-input ratio might be dependent on the input magnitude. • Any real-world device or process will only need to function properly for a certain range of frequencies; outside this range we don’t care what happens.

Mechatronics K. Craig Frequency Response Analysis & Design 7 System Frequency Response

Mechatronics K. Craig Frequency Response Analysis & Design 8 • When one has the frequency-response curves for any system and is given a specific sinusoidal input, it is an easy calculation to get the sinusoidal output. • What is not obvious, but extremely important, is that the frequency-response curves are really a complete description of the system’s dynamic behavior and allow one to compute the response for any input, not just sine waves. • Every dynamic signal has a frequency spectrum and if we can compute this spectrum and properly combine it with the system’s frequency response, we can calculate the system time response.

Mechatronics K. Craig Frequency Response Analysis & Design 9 • The details of this procedure depend on the nature of the input signal; is it periodic, transient, or random? • For periodic signals (those that repeat themselves over and over in a definite cycle), Fourier Series is the mathematical tool needed to solve the response problem. • Although a single sine wave is an adequate model of some real-world input signals, the generic periodic signal fits many more practical situations.

• A periodic function qi(t) can be represented by an infinite series of terms called a Fourier Series.

Mechatronics K. Craig Frequency Response Analysis & Design 10 ¥ a 0 2éùæ2ppnöæö2n qi(t) =++å êúanncosçt÷bsintç÷ TTn1= ëûèTTøèø T 2 æö2np a= qtcostdt niò ( ) ç÷ T èøT - Fourier 2 T Series 2 æö2np = bniò q(t)sinç÷tdt T èøT - 2

Mechatronics K. Craig Frequency Response Analysis & Design 11 q (t) i

Consider the Square Wave 1.5

-0.01 +0.01 t

00.01 -0.5 -+0.5dt1.5dt a òò 0=-0.010==0.5average value T0.02 0æ2ppnö0.01 æö2n a=-0.5costdt+=1.5costdt0 n òòç÷ç÷ -0.010è0.02øèø0.02 0æ2ppnö0.01 æö2n 1-pcosn( ) =-+= bn òò0.5sinçt÷dt1.5sinç÷tdt -0.010è0.02øèø0.0250np 4 4 q(t) =+0.5sin(100pt)+sin(300tp+) i p 3p L

Mechatronics K. Craig Frequency Response Analysis & Design 12 • The term for n = 1 is called the fundamental or first harmonic and always has the same frequency as the repetition rate of the original periodic wave form (50 Hz in this example); whereas n = 2, 3, … gives the second, third, and so forth harmonic frequencies as integer multiples of the first. • The square wave has only the first, third, fifth, and so forth harmonics. The more terms used in the series, the better the fit. An infinite number gives a “perfect” fit.

Mechatronics K. Craig Frequency Response Analysis & Design 13 2

1.5 Plot of the 1 Fourier 0.5 Series for amplitude the square 0 wave

through -0.5 the third harmonic -1 -0.01 -0.008 -0.006 -0.004 -0.002 0 0.002 0.004 0.006 0.008 0.01 time (sec) 44 q(t) =0.5+sin(100pt) +psin(300t) i pp3

Mechatronics K. Craig Frequency Response Analysis & Design 14 • For a signal of arbitrary periodic shape (rather than the simple and symmetrical square wave), the Fourier Series will generally include all the harmonics and both sine and cosine terms. • We can combine the sine and cosine terms using: Acos(wt)+Bsin(wt) =Csint(w+a) C=+AB22 A a=tan -1 B • Thus

qi(tA) =i0+Ai1sin(w1t+a1)+Ai2sin(2tw12+a+) L

Mechatronics K. Craig Frequency Response Analysis & Design 15 • A graphical display of the (Aik) and the phase angles (ak) of the sine waves in the equation for qi(t) is called the frequency spectrum of qi(t).

• If a periodic qi(t) is applied as input to a system with sinusoidal transfer function G(iw), after the transients have died out, the output qo(t) will be in a periodic steady-state given by:

qo(t) =Ao0+Ao1sin(w1t+q1) +Ao2sin(2tw12+q+) L

Aok=wAikkGi( )

qk=akk+ÐwGi( ) • This follows from superposition and the definition of the sinusoidal transfer function.

Mechatronics K. Craig Frequency Response Analysis & Design 16 Review of Frequency-Response Performance Specifications

• Let V be a sine wave (U = 0) and wait for transients to die out. • Every signal will be a sine wave of the same frequency. We can then speak of amplitude ratios and phase angles between various pairs of signals.

CAGG(i)w (i)w= 12 V1+wG12GH(i)

Mechatronics K. Craig Frequency Response Analysis & Design 17 • The most important pair involves V and C. Ideally (C/V)(iw) = 1.0 for all frequencies. • Amplitude ratio and phase angle will approximate the ideal values of 1.0 and 0 degrees for some range of low frequencies, but will deviate at higher frequencies.

Mechatronics K. Craig Frequency Response Analysis & Design 18 Typical Closed-Loop Frequency-Response Curves

As noise is generally in a band of frequencies above the dominant frequency band of the true signal, feedback control systems are designed to have a definite passband in order to reproduce the true signal and attenuate noise.

Mechatronics K. Craig Frequency Response Analysis & Design 19 • The frequency at which a resonant peak occurs, wr, is a speed-of-response criterion. The higher wr, the faster the system response.

• The peak amplitude ratio, Mp, is a relative-stability criterion. The higher the peak, the poorer the relative stability. If no specific requirements are pushing the

designer in one direction or the other, Mp = 1.3 is often used as a compromise between speed and stability. • For systems that exhibit no peak, the bandwidth is used for a speed of response specification. The bandwidth is the frequency at which the amplitude ratio has dropped to 0.707 times its zero-frequency value. It can of course be specified even if there is a peak. It is the maximum frequency at which the output of a system will satisfactorily track an input sinusoid.

Mechatronics K. Craig Frequency Response Analysis & Design 20 • If we set V = 0 and let U be a sine wave, we can measure or calculate (C/U)(iw) which should ideally be 0 for all frequencies. A real system cannot achieve this perfection but will behave typically as shown.

Closed-Loop Frequency Response to a Disturbance Input

Mechatronics K. Craig Frequency Response Analysis & Design 21 • Two open-loop performance criteria in common use to specify relative stability are gain margin and phase margin. • The open-loop frequency response is defined as (B/E)(iw). One could open the loop by removing the summing junction at R, B, E and just input a sine wave at E and measure the response at B. This is valid since (B/E)(iw) =

G1G2H(iw). Open-loop experimental testing has the advantage that open-loop systems are rarely absolutely unstable, thus there is little danger of starting up an untried apparatus and having destructive oscillations occur before it can be safely shut down. • The utility of open-loop frequency-response rests on the Nyquist stability criterion.

Mechatronics K. Craig Frequency Response Analysis & Design 22 • Gain margin (GM) and phase margin (PM) are in the nature of safety factors such that (B/E)(iw) stays far enough away from 1 Ð -180° on the stable side. • Gain margin is the multiplying factor by which the steady- state gain of (B/E)(iw) could be increased (nothing else in (B/E)(iw) being changed) so as to put the system on the edge of instability, i.e., (B/E)(iw)) passes exactly through the -1 point. This is called marginal stability. • Phase margin is the number of degrees of additional phase lag (nothing else being changed) required to create marginal stability. • Both a good gain margin and a good phase margin are needed; neither is sufficient by itself.

Mechatronics K. Craig Frequency Response Analysis & Design 23 Open-Loop Performance Criteria: Gain Margin and Phase Margin

A system must have adequate stability margins. Both a good gain margin and a good phase margin are needed. Useful lower bounds: GM > 2.5 PM > 30°

Mechatronics K. Craig Frequency Response Analysis & Design 24 View of Gain Margin and Phase Margin

Mechatronics K. Craig Frequency Response Analysis & Design 25 • It is important to realize that, because of model uncertainties, it is not merely sufficient for a system to be stable, but rather it must have adequate stability margins. • Stable systems with low stability margins work only on paper; when implemented in real time, they are frequently unstable. • The way uncertainty has been quantified in classical control is to assume that either gain changes or phase changes occur. Typically, systems are destabilized when either gain exceeds certain limits or if there is too much phase lag (i.e., negative phase associated with unmodeled poles or time delays). • As we have seen these tolerances of gain or phase uncertainty are the gain margin and phase margin.

Mechatronics K. Craig Frequency Response Analysis & Design 26 Frequency-Response Curves • The sinusoidal transfer function, a complex function of the frequency w, is characterized by its magnitude and phase angle, with frequency as the parameter. • There are three commonly used representations of sinusoidal transfer functions: – Bode diagram or logarithmic plot: magnitude of output- input ratio vs. frequency and phase angle vs. frequency – Nyquist plot or polar plot: output-input ratio plotted in polar coordinates with frequency as the parameter – Log-magnitude vs. phase plot (Nichols Diagram)

Mechatronics K. Craig Frequency Response Analysis & Design 27 Bode Diagrams • Advantages of Logarithmic Plots: – Rapid manual graphing is possible. – Wide ranges of amplitude ratio and frequency, both low and high, are conveniently displayed. – Amplitude ratio exhibits straight-line asymptote regions of definite slope. These are helpful in identifying model type from experimental data. – Complex transfer functions are easily plotted and understood as graphical sums of simple (zero-order, 1st- order, 2nd-order) basic systems since the dB (logarithmic) technique changes multiplication into addition and division into subtraction.

Mechatronics K. Craig Frequency Response Analysis & Design 28 • A sinusoidal transfer function may be represented by two separate plots:

– Magnitude (dB) vs. frequency (log10)

– Phase angle (degrees) vs. frequency (log10) • The log magnitude (Lm) of a transfer function in

dB () is: 20log10 Gi( w) • Frequency Bands: f2 x – Octave = 2 where x = # of octaves f1 – An octave is a frequency band from f1 to f2 where f2/f1 = 2. f2 x – Decade =10 where x = # of decades f1 – A decade is a frequency band from f1 to f2 where f2/f1 = 10.

Mechatronics K. Craig Frequency Response Analysis & Design 29 – As a number doubles, the dB value increases by 6 dB. – As a number increases by a factor of 10, the dB value increases by 20 dB. 0.01=-40 dB 0.1=-20 dB 0.5=-6 dB Note that, when expressed in dB, the reciprocal of a number differs 1.0= 0 dB from its value only in sign. 2.0= 6 dB 10.0= 20 dB 100.0= 40 dB • Generalized Form of the Sinusoidal Transfer

Function: r K(1i+wT)(1iT+w ) Gi( w=) 12 m2éùæ21z öæö (iw) (1i+wT3 )êú1+ç÷iiw+wç÷2 ( ) ëûèwwnnøèø

Mechatronics K. Craig Frequency Response Analysis & Design 30 • The log magnitude (Lm) of G(iw) is given by:

LmGëûéù(iw) =Lm[K]+Lm[1i+wT12] +(r)Lm[1iT+w ]

éùæ21z öæö 2 -(m)Lm[iw] -Lm[1i+wT3 ]-Lmêú1+ç÷iiw+wç÷2 ( ) ëûèwwnnøèø • The phase angle is given by:

ÐG(iw) =ÐK+Ð(1i+w+T12) (r)Ð(1iT+w )

éùæ21z öæö 2 -(m)Ð(iw)-Ð(1i+wT3 )-Ðêú1+ç÷iiw+wç÷2 ( ) ëûèwwnnøèø • Both the log magnitude and angle are functions of frequency.

Mechatronics K. Craig Frequency Response Analysis & Design 31 • When the log magnitude and angle are plotted as

functions of log10(w), the resulting curves are referred to as Bode Plots. • These two curves can be combined into a single curve of log magnitude vs. angle with frequency as the parameter. This curve is called the Nichols Diagram. • Drawing Bode Plots – The generalized form of a transfer function shows that the numerator and denominator have 4 basic types of factors: ±p ±±mr2éùæ21z öæö K (iww) (1+iT) êú1+ç÷iiw+wç÷2 ( ) ëûèwwnnøèø

Mechatronics K. Craig Frequency Response Analysis & Design 32 – The curves of log magnitude and angle vs. log10(w) can be drawn for each factor. Then these curves can be added together graphically to get the curves for the complete transfer function. Asymptotic approximations to these curves are normally used.

– Gain K (positive) Lm[K] ==20log10 (K) constant ÐK0=° – Integral and derivative factors (iw)± m ±m Lméùiw=±m20logiw=±wm20log ëû( ) 1010 ( ) ± Ðéùiwm =±m90°= constant ëû( ) ( ) • The log magnitude curve is a straight line with a slope ± m(20) dB/decade = ± m(6) dB/octave when plotted against log(w). It goes through the point 0 dB at w = 1.

Mechatronics K. Craig Frequency Response Analysis & Design 33 – 1st-Order Factors (1 + iwT)± 1 ±1 Lm1iéù+wT=±20log1iT+w ëû( ) 10 22 =±20log10 1T+w »w0 dB for << 1

»±20log10 (wwT) for >> 1 ± Ðéù1i+wT1 =±wtanT-1 ëû( ) ( ) • w < 1/T: straight-line asymptote with zero slope • w > 1/T: straight-line asymptote with ± 20 dB/decade slope • w = 1/T: value is 0 dB

• wcf = corner frequency = 1/T = frequency at which the asymptotes to the log magnitude curve intersect

• Phase angle straight-line asymptotes: 0° at w < 0.1wcf, ± 45° at w = wcf, ± 90° at w > 10wcf

• Angle curve is symmetrical about wcf when plotted vs. log10(w)

Mechatronics K. Craig Frequency Response Analysis & Design 34 Bode Plotting of 1st-Order Frequency Response

Note that varying the shifts the corner frequency to the left or to the right, but the shapes of the curves remain the same. dB = 20 log10 (amplitude ratio) decade = 10 to 1 frequency change octave = 2 to 1 frequency change

Mechatronics K. Craig Frequency Response Analysis & Design 35 • For the case where the exponent of the first-order term is ± r, the corner frequency is unchanged, and the asymptotes are still straight lines: the low-frequency asymptote is a horizontal line at 0 dB, while the high-frequency asymptote has a slope of ± (20)r dB/decade. The error involved in the asymptotic expressions is r times that for (1 + iwT)±1. The phase angle is r times that of (1 + iwT)±1 at each frequency point.

nd – 2 -Order Factors ±1 éùæ21z öæö 2 êú1+ç÷iiw+wç÷2 ( ) ëûèwwnnøèø • For z > 1, the quadratic can be factored into two 1st-order factors with real poles which can be plotted as described for a 1st-order factor. • For 0 < z < 1, the quadratic is plotted without factoring, as it is the product of two complex-conjugate factors.

Mechatronics K. Craig Frequency Response Analysis & Design 36 1 ±1 22 éù2 2 éù2zæ12ö2 æwöæözw Lmêú1+iiw+( w) =±20log110 êú-+ wçw22÷çww÷ç÷ ëûnènøëûêúènnøèø 2zw ±1 éù2 21z æö 2 -1 wn Ðêú1+iiw+ç÷2 ( w) =±tan 2 ëûwwnnèø w 1- 2 wn • For w << wn: the log magnitude » 0 dB

• For w >> wn: the log magnitude » ± 40 log10 (w/wn) dB • The low-frequency asymptote is a horizontal line at 0 dB. • The high-frequency asymptote is a straight line with a slope of ± 40 dB/decade.

• The asymptotes, which are independent of z, cross at wcf = wn. These are not accurate for a factor with low values of z.

• Phase angle: 0° at w = 0, ± 90° at w = wn, ± 180° at w = ¥

Mechatronics K. Craig Frequency Response Analysis & Design 37 Frequency Response of a 2nd-Order System

Note: The plots shown are for a 2nd-order term with an exponent of –1. For a 2nd- order term with an exponent of +1, the magnitudes of the log magnitude and phase angle are the same except with a sign change.

Mechatronics K. Craig Frequency Response Analysis & Design 38 • Some Observations on 1st-Order Factors – Time Constant t • Time it takes the step response to reach 63% of the steady-state value

Tr = 2.2 t • Time it takes the step response to go from 10% to 90% of the steady-state value

– Delay Time Td = 0.69 t • Time it takes the step response to reach 50% of the steady-state value

Mechatronics K. Craig Frequency Response Analysis & Design 39 – Bandwidth • The bandwidth is the frequency where the amplitude ratio drops by a factor of 0.707 = -3dB of its gain at zero or low- frequency. • For a 1st -order system, the bandwidth is equal to 1/ t. • The larger (smaller) the bandwidth, the faster (slower) the step response. • Bandwidth is a direct measure of system susceptibility to noise, as well as an indicator of the system speed of response.

Mechatronics K. Craig Frequency Response Analysis & Design 40 • Some Observations on 2nd-Order Factors – When a physical system exhibits a natural oscillatory behavior, a 1st-order model (or even a cascade of several 1st-order models) cannot provide the desired response. The simplest model that does possess that possibility is the 2nd-order dynamic system model. – This system is very important in control design. – System specifications are often given assuming that the system is 2nd order. – For higher-order systems, we can often use dominant pole techniques to approximate the system with a 2nd- order transfer function.

Mechatronics K. Craig Frequency Response Analysis & Design 41 – Damping ratio z clearly controls oscillation; z < 1 is required for oscillatory behavior. – The undamped case (z = 0) is not physically realizable (total absence of energy loss effects) but gives us,

mathematically, a sustained oscillation at frequency wn. – Natural oscillations of damped systems are at the

damped natural frequency wd, and not at wn. 2 wdn=w1-z – In hardware design, an optimum value of z = 0.64 is often used to give maximum response speed without excessive oscillation.

– Undamped natural frequency wn is the major factor in response speed. For a given z response speed is directly

proportional to wn.

Mechatronics K. Craig Frequency Response Analysis & Design 42 – Thus, when 2nd-order components are used in feedback

system design, large values of wn (small lags) are desirable since they allow the use of larger loop gain before stability limits are encountered. – For frequency response, a resonant peak occurs for z <

0.707. The peak frequency is wp and the peak amplitude ratio depends only on z.

2 K wpn=w1-2z= peak amplitude ratio 2z1-z2 – The phase angle at the frequency where the resonant peak occurs is given by: 12-z2 f=±tan-1 p z

Mechatronics K. Craig Frequency Response Analysis & Design 43 – Bandwidth • The bandwidth is the frequency where the amplitude ratio drops by a factor of 0.707 = -3dB of its gain at zero or low-frequency. • For a 1st-order system, the bandwidth is equal to 1/t. • The larger (smaller) the bandwidth, the faster (slower) the step response. • Bandwidth is a direct measure of system susceptibility to noise, as well as an indicator of the system speed of response. • For a 2nd-order system:

224 BW=wn 1-z2+2-z+z44

• As z varies from 0 to 1, BW varies from 1.55wn to 0.64wn. For a value of z = 0.707, BW = wn. For most design considerations, we assume that the bandwidth of a 2nd-order all pole system can

be approximated by wn.

Mechatronics K. Craig Frequency Response Analysis & Design 44 • Bode Plotting Procedure: – Rewrite the sinusoidal transfer function as a product of

the four basic factors. ±p ±±mr2éùæ21z öæö K (iww) (1+iT) êú1+ç÷iiw+wç÷2 ( ) ëûèwwnnøèø

– Determine the value of 20log10(K) = Lm(K) dB – Plot the low-frequency magnitude asymptote through the point Lm(K) at w = 1 with a slope 20(m) dB per decade. – Complete the composite magnitude asymptotes • Extend the low-frequency asymptote until the first frequency break point, then step the slope by ± r(20) or ± p(40), depending on whether the break point is from a 1st-order or 2nd-order term in the numerator or denominator. Continue through all break points in ascending order.

Mechatronics K. Craig Frequency Response Analysis & Design 45 – Sketch in the approximate magnitude curve: Increase the asymptote value by a factor of +3 dB at 1st-order numerator break points, and decrease it by a factor of -3 dB at 1st-order denominator break points. At 2nd-order break points, sketch in the resonant peak (or valley)

using the relation that at the break point w = wn:

±1 éù21z æö 2 Lmêú1+iiw+ç÷2 ( w) =±z20log210 ( ) ëûwwnnèø – Plot the low-frequency asymptote of the phase curve, f = ± m(90°). – As a guide, sketch in the approximate phase curve by changing the phase by ± 90° or ± 180° at each break point in ascending order.

Mechatronics K. Craig Frequency Response Analysis & Design 46 – Locate the asymptotes for each individual phase curve so that their phase change corresponds to the steps in the phase toward or away from the approximate curve. Sketch in each individual phase curve as indicated by the detailed phase plots for the individual terms. – Graphically add each phase curve. Use grids if an accuracy of about ± 5° is desired. If less accuracy is acceptable, the composite curve can be done by eye. Keep in mind that the curve will start at the lowest- frequency asymptote and end on the highest-frequency asymptote and will approach the intermediate asymptotes to an extent that is determined by how close the break points are to each other.

Mechatronics K. Craig Frequency Response Analysis & Design 47 – Bode Plotting Examples æsiöæöw 2ç++1÷21ç÷ 2000(s+0.5) 0.50.5 ==èøèø s(s++10s)( 50) æsöæsöæiiwwöæö sç+1÷ç+1÷iwç++11÷ç÷ è10øè50øè10øèø50 102.5 = s(s2 ++0.4s4) æös2 0.2 sç÷++s1 èø42 0.01(s2 ++0.01s1) 2 2 æös0.02 sç÷++s1 èø42

Mechatronics K. Craig Frequency Response Analysis & Design 48 • Advantages of Working with Frequency Response in terms of Bode Plots: – Bode plots of systems in series simply add, which is quite convenient. – Bode’s important phase-gain relationship is given in terms of logarithms of phase and gain. – A much wider range of system behavior – from low- to high-frequency behavior – can be displayed. – Bode plots can be determined experimentally. – Dynamic compensator design can be based entirely on Bode plots.

Mechatronics K. Craig Frequency Response Analysis & Design 49 • Why is it important for an engineer to know how to hand-plot frequency responses? – Allows engineer to deal with simple problems but also to check computer results for more complicated cases. – Often approximations can be used to quickly sketch the frequency response and deduce stability as well as determine the form of the needed dynamic compensations. – Hand plotting is useful in interpreting frequency- response data that have been generated experimentally.

Mechatronics K. Craig Frequency Response Analysis & Design 50 Zero-Order Dynamic System Model

Mechatronics K. Craig Frequency Response Analysis & Design 51 Validation of a Zero-Order Dynamic System Model

Mechatronics K. Craig Frequency Response Analysis & Design 52 i i Example: in R out RC Low-Pass Filter e e Time Response & in C out Frequency Response

éùein éùRCs+-1Réùeout êú= êúêú ëûiin ëûCs1- ëûiout

eout 11 === when i0out ein RCs+1t+s1

Mechatronics K. Craig Frequency Response Analysis & Design 53 1st-Order Dynamic System Model

Mechatronics K. Craig Frequency Response Analysis & Design 54 Time Response to Unit Step Input

1

0.9

0.8

0.7

0.6 0.5 R = 15 KW

Amplitude 0.4 C = 0.01 mF 0.3

0.2

0.1

0 0 1 2 3 4 5 6 7 8 -4 Time (sec) x 10 Time Constant t = RC

Mechatronics K. Craig Frequency Response Analysis & Design 55 R = 15 KW Frequency Response C = 0.01 mF

0 0

-5 -20

-10 -40 Gain dB -15 -60 Phase (degrees)

-20 -80

-25 -100 102 103 104 105 102 103 104 105 Frequency (rad/sec) Frequency (rad/sec) Bandwidth = 1/t e KKÐ0Ko out (iw) ===Ð-tan -1 wt ei1wt+ 222-12 in (wt+) 1Ðtan1wt(wt+)

Mechatronics K. Craig Frequency Response Analysis & Design 56 MatLab / Simulink Diagram Frequency Response for 1061 Hz Sine Input

t = 1.5E-4 sec

1 output tau.s+1 output First-Order Sine Wave Plant

input t input Clock time

Mechatronics K. Craig Frequency Response Analysis & Design 57 Amplitude Ratio = 0.707 = -3 dB Phase Angle = -45°

Response to Input 1061 Hz Sine Wave 1 Input 0.8

0.6

0.4

0.2

0 amplitude -0.2 Output -0.4

-0.6

-0.8

-1 0 0.5 1 1.5 2 2.5 3 3.5 4 time (sec) -3 x 10

Mechatronics K. Craig Frequency Response Analysis & Design 58 Example: Time Response & Frequency Response 2-Pole, Low-Pass, Active Filter

R R 4 7

C 5 R R 1 3 - R 6 - C + 2 e + in e out

Mechatronics K. Craig Frequency Response Analysis & Design 59 Physical Model Ideal Transfer Function

æR 7 öæö1 ç÷ç÷ e RRRCC out (s) = è6øèø1325 ein 2 æö1111 ss+ç÷+++ èøR3C2R1C2R4C2RRCC3425

R R 4 7

C 5 R R 1 3 - R 6 - C + 2 e + in e out

Mechatronics K. Craig Frequency Response Analysis & Design 60 a 2nd-Order Dynamic w= 0 undamped natural frequency n @ a System Model 2 a1 z=@ damping ratio 2 2aa20 dq00dq a22 +a1+=a0q0bq0i dtdt b0 K@ = steady-state gain 2 a 12dq00z dq 0 22++=q0iKq wwnndtdt

Step Response of a 2nd-Order System

Mechatronics K. Craig Frequency Response Analysis & Design 61 2 Step Response 12dq00V dq +z+=q0iKq of a ww22dtdt nn 2nd-Order System Underdamped éù 1 -zwn t 2-12 qo=Kqisnêú1-esinw1-zt+sin1-z z<1 2 ( ) ëûêú1-z

=éù-+w-wnt z= Critically Damped qoKq1isnëû(1t)e 1

éù2 2 z+z-1 (-z+z-w1t) n êú1e- Over- êú21z-2 damped qo=Kqis êú z>1 2 2 êúz-z-1 (-z-z-w1t) n + e êú2 ëû21z- Mechatronics K. Craig Frequency Response Analysis & Design 62 Kw2 G(s) = n s22+2sVw+w nn Location of Poles s=-Vw±i1w-V2 Of 1,2nn Transfer Function si1,2d=-s±w

-st æös y(t) =1-eç÷coswddt+wsint èøwd 1.8 tr » rise time wn 4.6 ts » settling time Vwn -pV 2 General All-Pole 1-V nd Mp =e (0£z<1) overshoot 2 -Order æöz Step Response =ç÷1- (0£z£0.6) èø0.6 Mechatronics K. Craig Frequency Response Analysis & Design 63 1.8 4.6 w³n s³ t r ts

z³0.6(1-Mp ) 0£z£0.6

Time-Response Specifications vs. Pole-Location Specifications

Mechatronics K. Craig Frequency Response Analysis & Design 64 Frequency Response of a 2nd-Order System

Qo K (s) = 2 Laplace Transfer Function Qi s2sz 2 ++1 wwnn Sinusoidal Transfer Function

Q K2z o (iw) =Ðtan-1 Q 2 2 æöww i éùæöw4zw22 - n êú1-+ ç÷ww ç÷ww2 èøn ëûêúèønn

Mechatronics K. Craig Frequency Response Analysis & Design 65 Frequency Response of a 2nd-Order System

Mechatronics K. Craig Frequency Response Analysis & Design 66 -40 dB per decade slope Frequency Response of a 2nd-Order System

Mechatronics K. Craig Frequency Response Analysis & Design 67 • Minimum-Phase and Nonminimum Phase Systems – Transfer functions having neither poles nor zeros in the RHP are minimum-phase transfer functions. – Transfer functions having either poles or zeros in the RHP are nonminimum-phase transfer functions. – For systems with the same magnitude characteristic, the range in phase angle of the minimum-phase transfer function is minimum among all such systems, while the range in phase angle of any nonminimum-phase transfer function is greater than this minimum. – For a minimum-phase system, the transfer function can be uniquely determined from the magnitude curve alone. For a nonminimum-phase system, this is not the case.

Mechatronics K. Craig Frequency Response Analysis & Design 68 – Consider as an example the following two systems:

1+-T11s1Ts G1(s) = G2(s) = 0<

Bode Diagrams

From: U(1) 0

A small amount -2 of change in magnitude -4 produces a small -6 amount of 0 change in the -50 G (s) phase of G (s) 1 1 Phase (deg); Magnitude (dB) -100 but a much To: Y(1) G (s) larger change in -150 2

-200 the phase of 10-2 10-1 100 T1 = 5 G2(s). Frequency (rad/sec) T2 = 10 Mechatronics K. Craig Frequency Response Analysis & Design 69 – These two systems have the same magnitude characteristics, but they have different phase-angle characteristics. – The two systems differ from each other by the factor: 1-Ts G(s) = 1 1+ Ts1 – This factor has a magnitude of unity and a phase angle that varies from 0° to -180° as w is increased from 0 to ¥. – For the stable minimum-phase system, the magnitude and phase-angle characteristics are uniquely related. This means that if the magnitude curve is specified over the entire frequency range from zero to infinity, then the phase-angle curve is uniquely determined, and vice versa. This is called Bode’s Gain-Phase relationship.

Mechatronics K. Craig Frequency Response Analysis & Design 70 – This does not hold for a nonminimum-phase system. – Nonminimum-phase systems may arise in two different ways: • When a system includes a nonminimum-phase element or elements • When there is an unstable minor loop – For a minimum-phase system, the phase angle at w = ¥ becomes -90°(q – p), where p and q are the degrees of the numerator and denominator polynomials of the transfer function, respectively. – For a nonminimum-phase system, the phase angle at w = ¥ differs from -90°(q – p). – In either system, the slope of the log magnitude curve at w = ¥ is equal to –20(q – p) dB/decade.

Mechatronics K. Craig Frequency Response Analysis & Design 71 – It is therefore possible to detect whether a system is by examining both the slope of the high-frequency asymptote of the log-magnitude curve and the phase angle at w = ¥. If the slope of the log- magnitude curve as w ® ¥ is –20(q – p) dB/decade and the phase angle at w = ¥ is equal to -90°(q – p), then the system is minimum phase. – Nonminimum-phase systems are slow in response because of their faulty behavior at the start of the response. – In most practical control systems, excessive phase lag should be carefully avoided. A common example of a nonminimum-phase element that may be present in a

control system is transport lag: -tdts e1=Ð-wtdt

Mechatronics K. Craig Frequency Response Analysis & Design 72 – Dead-time approximation comparison: Dead-Time Phase-Angle Approximation Comparison 0 tdt = 0.01

-50

-100

-150

-200 Q2s-t o(s) = dt -250 Qi2s+tdt phase angle (degress)

-300

-350

-400 2 -1 0 1 2 3 4 5 (tdt s) 10 10 10 10 10 10 10 2s-t+dt frequency (rad/sec) Qo 8 -t s (s) = dt =Ð-wt 2 e1 dt Qi (t s) 2s+t+dt dt 8

Mechatronics K. Craig Frequency Response Analysis & Design 73 Unit Step Responses Step Response From: U(1) 1.4

s1+ 1.2 2 s++s11

0.8 1 2 0.6 s++s1

To: Y(1) 0.4 Amplitude

0.2

0 -+s1 2 -0.2 s++s1

-0.4 0 2 4 6 8 10 12 Time (sec.)

Mechatronics K. Craig Frequency Response Analysis & Design 74 Unit Step Responses Step Response From: U(1) 1.4 s1+ 1.2 s2 ++s1 1

0.8 1 s2 ++s1 0.6 To: Y(1) Amplitude 0.4 s 2 0.2 s++s1

0

-0.2 0 2 4 6 8 10 12 Time (sec.)

Mechatronics K. Craig Frequency Response Analysis & Design 75 Unit Step Responses Step Response From: U(1) 1.4 1 1.2 s2 ++s11 0.8 -+s1 0.6 s2 ++s1 0.4 To: Y(1) Amplitude 0.2

0

-0.2 -s 2 -0.4 s++s1

-0.6 0 2 4 6 8 10 12 Time (sec.)

Mechatronics K. Craig Frequency Response Analysis & Design 76 • System Type and Gain as Related to Log Magnitude Curves – Consider a unity-feedback control system. – The steady-state error of this closed-loop system depends on the system type and the gain. The system error coefficients are determined by these two characteristics. For any given log magnitude curve the system type and gain can be determined. – The steady-state step, ramp, and parabolic error coefficients describe the low-frequency behavior of type 0, type 1, and type 2 systems, respectively. – For a given system, only one of the static error constants is finite and significant.

Mechatronics K. Craig Frequency Response Analysis & Design 77 – The larger the value of the finite static error constant, the higher the loop gain is as w approaches zero. – The type of the system determines the slope of the log- magnitude curve at low frequencies. – Information concerning the existence and magnitude of the steady-state error of a control system to a given input can be determined from the observation of the low-frequency region of the log-magnitude curve.

Mechatronics K. Craig Frequency Response Analysis & Design 78 – Type 0 System K0 • The slope at low frequencies is zero. Gs( ) = Ts1+ • The magnitude at low frequencies is 20log10K0.

• The gain K0 is the steady-state step error coefficient.

– Type 1 System • The slope at low frequencies is –20 dB/decade. • The intercept of the low-frequency slope of –20 dB/decade (or its extension) with the 0 dB axis occurs at the frequency w =

K1. • The value of the low-frequency slope of –20 dB/decade (or its

extension) at the frequency w = 1 is equal to 20log10K1.

• The gain K1 is the steady-state ramp error coefficient. K Gs( ) = 1 s(Ts1+ )

Mechatronics K. Craig Frequency Response Analysis & Design 79 – Type 2 System • The slope at low frequencies is –40 dB/decade. • The intercept of the low-frequency slope of –40 dB/decade (or its extension) with the 0 dB axis occurs at a frequency w = 1/2 (K2) . • The value on the low-frequency slope of –40 dB/decade (or its

extension) at the frequency w = 1 is equal to 20log10K2.

• The gain K2 is the steady-state parabolic error coefficient. K Gs( ) = 2 s2 (Ts1+ )

Mechatronics K. Craig Frequency Response Analysis & Design 80 Frequency-Response Design

• Here we consider the design and compensation of SISO, linear, time-invariant control systems by the frequency-response approach. • In this approach, transient-response performance, which is usually most important, is specified in an indirect manner. • Phase margin, gain margin, and resonant peak magnitude give a rough estimate of system damping.

Mechatronics K. Craig Frequency Response Analysis & Design 81 • Gain crossover frequency, resonant frequency, and bandwidth give a rough estimate of the speed of . • Static error constants give the steady-state accuracy. • Although the correlation between the transient response and frequency response is indirect, the specifications can be conveniently met in the Bode diagram approach.

Mechatronics K. Craig Frequency Response Analysis & Design 82 • Design the open loop by the frequency response method, determine the closed-loop poles and zeros, and check that the transient-response specifications have been met. If not, then iterate. • This method can be used for systems or components whose dynamic characteristics are given in the form of frequency-response data. • When dealing with high-frequency noises, this approach is more convenient. • Two approaches in frequency-domain design: – Polar-plot approach – Bode-diagram approach

Mechatronics K. Craig Frequency Response Analysis & Design 83 • Polar-Plot Approach – When a compensator is added, the polar plot does not retain the original shape, and, therefore, we need to draw a new polar plot, which is time consuming and inconvenient. • Bode-Diagram Approach – The compensator can simply be added to the original Bode diagram, and thus plotting the complete Bode diagram is a simple matter. – If the open-loop gain is varied, the magnitude curve is shifted up or down without changing the slope of the curve, and the phase curve remains the same. – For design purposes, the Bode diagram is preferred.

Mechatronics K. Craig Frequency Response Analysis & Design 84 • A common approach to the Bode Diagram is: – First adjust the open-loop gain so that the requirement on the steady-state accuracy is met. – Then plot the magnitude and phase curves of the uncompensated, but gain-adjusted, open-loop system. – Reshape the open-loop transfer function with the addition of a suitable compensator to meet gain margin and phase margin specifications. – Try to meet other specifications, if any.

Mechatronics K. Craig Frequency Response Analysis & Design 85 • The open-loop frequency response indicators:

– Low-frequency region (<< wgc) : indicates the steady- state behavior of the closed-loop system – Medium-frequency region: indicates relative stability

– High-frequency region (>> wgc ): indicates the complexity of the system • Compensation is a compromise between steady- state accuracy and relative stability. The open- loop frequency-response curve needs to be reshaped.

Mechatronics K. Craig Frequency Response Analysis & Design 86 • The gain in the low-frequency region should be large enough for steady-state error and disturbance rejection properties. • Near the gain crossover frequency, chosen for speed of response requirements, the slope of the log-magnitude curve should be -20 dB/decade and should extend over a sufficiently wide frequency band to assure a proper phase margin. • In the high-frequency region, the gain should be attenuated as rapidly as possible to minimize noise effects.

Mechatronics K. Craig Frequency Response Analysis & Design 87 • Consider the following design problem: Given a

plant transfer function G2(s), find a compensator transfer function G1(s) which yields the following: – stable closed-loop system – good command following – good disturbance rejection – insensitivity of command following to modeling errors (performance robustness) – stability robustness with unmodeled dynamics – sensor noise rejection

Mechatronics K. Craig Frequency Response Analysis & Design 88 • Without closed-loop stability, a discussion of performance is meaningless. It is critically important to realize that the

compensator G1(s) is actually designed to stabilize a * nominal open-loop plant G 2 (s) . Unfortunately, the true plant is different from the nominal plant due to

unavoidable modeling errors, denoted by dG2(s). Thus the * true plant may be represented by G 2 (s ) = G 22 (s ) +d G (s).

• Knowledge of dG2(s) should influence the design of G1(s). We assume here that the actual closed-loop system, represented by the true closed-loop transfer function is absolutely stable. éù* G1(s)Gëû22(s)+dG(s) éù* (unity feedback assumed) 1+G1(s)Gëû22(s)+dG(s)

Mechatronics K. Craig Frequency Response Analysis & Design 89 • stable closed-loop system Design a Good • good command following Single-Input, • good disturbance rejection • insensitivity of command following Single-Output to modeling errors Control Loop • stability robustness with unmodeled dynamics • sensor noise rejection

Smooth transition from the low to high-frequency range, i.e., -20 dB/decade slope near the gain crossover frequency

Mechatronics K. Craig Frequency Response Analysis & Design 90 Lead Compensation

• Lead compensation approximates PD control. A PD compensator transfer function has the form:

Gc(sK) =+pdKs • The PD compensator was shown to have a stabilizing effect on the root-locus of a second-order system. • The Bode diagram shows the stabilizing influence in the increase in phase at frequencies above the break point. We use this compensation by locating the break point so that the increased phase occurs in the vicinity of crossover (where the log magnitude = 0 dB), thus increasing the phase margin. • The magnitude of this compensation continues to grow with increasing frequency thus amplifying high-frequency noise.

Mechatronics K. Craig Frequency Response Analysis & Design 91 Bode Diagram: Bode Diagrams From: U(1) PD Controller 50

40

30

20

10

0

100

80

60 Phase (deg); Magnitude (dB)

40 To: Y(1)

20

0 10-2 10-1 100 101 102 Gc(sK) =+pdKs Frequency (rad/sec)

Kp =1 Kd = 1

Mechatronics K. Craig Frequency Response Analysis & Design 92 • In order to alleviate the high-frequency amplification of the PD compensation, a first-order pole is added in the denominator at frequencies higher then the breakpoint of the PD compensator. The phase increase (or lead) still occurs, but the amplification at high frequencies is limited. • Lead Compensation Characteristics – improves stability margins; adds damping to the system – yields a small change in steady-state accuracy – yields a higher gain crossover frequency which means higher bandwidth which means a reduction in settling time – is more susceptible to high-frequency noise because of increase in high-frequency gain due to the increase in bandwidth – raises the order of the system by one

Mechatronics K. Craig Frequency Response Analysis & Design 93 • Lead Compensator: A high-pass filter 1 + Ts1+ s G(s) =Ka=aKT (0 < < 1) ccc1 a+Ts1 s + aT • The minimum value of a (usually 0.05) is limited by the physical construction of the compensator. Therefore the maximum phase lead that may be produced by a lead compensator is about 65°. • Lead Compensator Polar Plot: 1-a jw+T1 1-a Kca (0

Mechatronics K. Craig Frequency Response Analysis & Design 94 Im

fm w m 1 (1- a) 2 Re 0 a 1

w = 0 w = ¥ 1 (1+ a) 2 Polar Plot of Lead Compensator

with Kc = 1

Mechatronics K. Craig Frequency Response Analysis & Design 95 1 Bode Diagrams Bode Diagram: MagK=ac a (jTw+1) 0 Kca (jwa+T1) -5 a=0.1 -10 T1= -15 -20 K1c =

50

Phase (deg); Magnitude (dB) 40

30 fm 20

10

-1 0 1 2 10 10 10 10

Frequency (rad/sec) wm occurs midway between the æ--1öæö11 2 break-point frequencies on a wm ==ç÷ç÷ èTTøèøa T a log scale.

Mechatronics K. Craig Frequency Response Analysis & Design 96 • The amount of phase lead at the midpoint depends only on a. Our task is to select a value of a that is a good compromise between an acceptable phase margin and an acceptable noise sensitivity at high frequencies. • If a phase lead greater than 65° is required, then a double lead compensator would be required. • In lead-network designs, there are 3 primary design parameters:

– Gain crossover frequency wgc, which determines bandwidth, rise time, and settling time. – Phase margin, which determines the damping coefficient and the . – Low-frequency gain, which determines the steady-state error characteristics.

Mechatronics K. Craig Frequency Response Analysis & Design 97 Lead Compensation Design Procedure • Primary function is to reshape the frequency- response curve to provide sufficient phase-lead angle to offset the excessive phase lag associated with the components of the fixed system. • Assume performance specifications are given in terms of phase margin, gain margin, static error constant, and so on. • Assume the following lead compensator: 1 + Ts1+ s G(s) =Ka=aKT (0 < < 1) ccc1 a+Ts1 s + aT Mechatronics K. Craig Frequency Response Analysis & Design 98 • Let Kca = K. Determine gain K to satisfy steady- state error requirements. • Draw the Bode diagram of the gain-adjusted, but uncompensated, system, i.e., KG(s). Evaluate the phase margin. • Determine the necessary phase lead angle f to be added to the system. Add 5° to this value to

compensate for the shift in wgc. • Determine the attenuation factor a by using

1-a1-fsin()m sin()fm =Þa= 1+a1+fsin()m

Mechatronics K. Craig Frequency Response Analysis & Design 99 • Determine the frequency where the magnitude of KG(s) is equal to æö1 -20log10 ç÷ èøa

Select this frequency as the new wgc. This 1 corresponds to w= m T a

and the maximum phase shift fm occurs at this frequency. • Determine pole and zero frequencies of the lead compensator: 11 w= w= zeroTTpole a

Mechatronics K. Craig Frequency Response Analysis & Design 100 • Calculate Kc = K/a. • Check the gain margin to be sure it is satisfactory. If not, modify the pole-zero location of the compensator.

Mechatronics K. Craig Frequency Response Analysis & Design 101 Lag Compensation

• Lag Compensation Characteristics – reduces the system gain at higher frequencies without reducing the system gain at low frequencies – reduces the system bandwidth and so the system has a slower response speed – has improved steady-state accuracy since the total system gain and hence, low-frequency gain, can be increased because of the reduced high-frequency gain – is less susceptible to high-frequency noise since the high-frequency gain is reduced

Mechatronics K. Craig Frequency Response Analysis & Design 102 • Lag Compensator: A low-pass filter

1 + Ts1+ s G(s) =Kb=KT (b> 1) ccc1 b+Ts1 s + bT

• Lag Compensator Polar Plot:

jw+T1 Kb (b> 1) c jwb+T1

Mechatronics K. Craig Frequency Response Analysis & Design 103 Im Polar Plot of Lag Compensator

K K b c c Re 0

w = ¥ w = 0

Mechatronics K. Craig Frequency Response Analysis & Design 104 Bode Diagram:

Bode Diagrams

(jw+T1) K b 20 c (jwb+T1) 15 b=10 10 T1= 5 K1= c 0

-10

Phase (deg); Magnitude (dB) -20

-30

-40

-50

-2 -1 0 1 10 10 10 10

Frequency (rad/sec)

Mechatronics K. Craig Frequency Response Analysis & Design 105 • A lag compensator is essentially a low-pass filter. It permits a high gain at low frequencies which improves steady-state performance and reduces gain in the higher range of frequencies so as to improve the phase margin. The phase-lag characteristic is of no consequence for compensation purposes. • The exact location of the lag compensator pole and zero is not critical provided they are close to the origin (but not too close) and their ratio is that required to meet steady-state error requirements.

Mechatronics K. Craig Frequency Response Analysis & Design 106 • The closed-loop pole created by the lag compensator will adversely affect the transient response (settling time) to both a command and a disturbance. • The attenuation due to the lag compensator will

shift wgc to a lower frequency point where the phase margin is acceptable. The bandwidth of the system will be reduced and this will result in a slower transient response. • A lag-compensated system tends to be less stable as it acts approximately as PI controller. To avoid this, T should be made sufficiently larger than the largest time constant of the system.

Mechatronics K. Craig Frequency Response Analysis & Design 107 • Conditional stability may occur when a system having saturation or limiting, which reduces the effective loop gain, is compensated by use of a lag compensator. To avoid this, the system must be designed so that the effect of lag compensation becomes significant only when the amplitude of the input to the saturating element is small. This can be done by means of minor feedback-loop compensation.

Mechatronics K. Craig Frequency Response Analysis & Design 108 Lag Compensation Design Procedure • Lag Compensator: 1 + Ts1+ s G(s) =Kb=KT (b> 1) ccc1 b+Ts1 s + bT

• Define Kcb = K. Determine gain K to satisfy steady-state error requirements. • Draw the Bode diagram of the gain-adjusted, but uncompensated, system, i.e., KG(s). Evaluate the phase margin and gain margin.

Mechatronics K. Craig Frequency Response Analysis & Design 109 • If the specifications on gain margin and phase margin are not satisfied, find the frequency where the phase angle of KG(s) is -180° plus the required phase margin plus 5° to 12° (to compensate for the phase lag of the lag compensator). Choose this frequency as the new

wgc. • The pole and zero of the lag compensator must be

located substantially lower than the new wgc to prevent detrimental effects of phase lag due to the lag compensator. Choose the zero location 1

octave to 1 decade below the new wgc.

Mechatronics K. Craig Frequency Response Analysis & Design 110 • Determine the attenuation necessary to bring the

magnitude curve down to 0 dB at the new wgc. Since this attenuation is -20 log10b, determine b. The pole of the compensator is now determined.

• Calculate Kc = K/b. • Example: 1 G(s) = s(s++1)(0.5s1) Performance Specifications: PM > 40° GM > 10 dB unit-ramp-input steady-state error < 0.2 Compensator: 10s1+ G(s)5= c 100s1+

Mechatronics K. Craig Frequency Response Analysis & Design 111 Lead-Lag Compensation • Lead-Lag Compensator: æ11öæö ss++ çTT÷ç÷ G(s)=Kè12øèø (gb > 1, > 1) ccæg öæö1 çss++÷ç÷ èTT12øèøb • We often choose g = b in designing a lead-lag compensator, although this is not necessary.

Mechatronics K. Craig Frequency Response Analysis & Design 112 Im Polar Plot of Lead-Lag Compensator

Kc = 1 and g = b

1 w=1 TT12 w = ¥ Lead Compensator 1 Re 0 Lag Compensator w = 0

w = w1

Mechatronics K. Craig Frequency Response Analysis & Design 113 Lead-Lag Compensator Bode Diagrams Kc = 1, g = b = 10

T2 = 10T1 0 T1 = 1 -5

-10

-15

50 Phase (deg); Magnitude (dB)

0

-50 -3 -2 -1 0 1 2 10 10 10 10 10 10 Frequency (rad/sec) 1 w= 1 TT Mechatronics 12 K. Craig Frequency Response Analysis & Design 114 Lead-Lag Compensator Design Procedure

• Procedure is based on the combination of the design techniques for the lead and lag compensators. • Assume g = b. Then

æ11öæö ss++ çTT÷ç÷ G(s)=Kè12øèø (gb > 1, > 1) ccæg öæö1 çss++÷ç÷ èTT12øèøb

Mechatronics K. Craig Frequency Response Analysis & Design 115 • The phase lead portion (involving T1) alters the frequency-response curve by adding phase lead angle and increasing the phase margin at the gain

crossover frequency, wgc.

• The phase lag portion (involving T2) provides attenuation near and above wgc and thereby allows an increase of gain at the low-frequency range to improve the steady-state performance.

Mechatronics K. Craig Frequency Response Analysis & Design 116 • Example: K G(s) = s(s++1)(s2)

Performance Specifications: GM > 10 dB PM > 50° unity-ramp-input steady-state error < 0.1 Compensator: (s++0.7)(s0.15) G(s)== K20 c (s++7)(s0.015)

Mechatronics K. Craig Frequency Response Analysis & Design 117 Comparison: Lead, Lag, Lead-Lag Compensators

• Lead compensation achieves the desired result through the merits of its phase-lead contribution. • Lag compensation accomplishes its result through the merits of its attenuation property at high frequencies. • In some design problems both lag compensation and lead compensation may satisfy the specifications.

Mechatronics K. Craig Frequency Response Analysis & Design 118 • Lead Compensation: – improves stability margins – yields a higher gain crossover frequency which means higher bandwidth which means a reduction in settling time – is more susceptible to high-frequency noise because of increase in high-frequency gain due to the increase in bandwidth – requires a larger gain than a lag network to offset the attenuation inherent in the lead network. This means larger space, greater weight, and higher cost.

Mechatronics K. Craig Frequency Response Analysis & Design 119 • Lag Compensation: – reduces the system gain at higher frequencies without reducing the system gain at low frequencies – reduces the system bandwidth and so the system has a slower response speed – has improved steady-state accuracy since the total system gain and hence, low-frequency gain, can be increased because of the reduced high-frequency gain – is less susceptible to high-frequency noise since the high-frequency gain is reduced

Mechatronics K. Craig Frequency Response Analysis & Design 120 • Lead - Lag Compensators: – can result in both fast response and good static accuracy – can result in an increase in low-frequency gain (which improves steady-state accuracy) while at the same time the system bandwidth and stability margins can be increased.

Mechatronics K. Craig Frequency Response Analysis & Design 121