Mechatronics Frequency Response Analysis & Design K. Craig 1
Mechatronics Frequency Response Analysis & Design K. Craig 1
Mechatronics K. Craig
Frequency Response Analysis & Design 1
Root-Locus Method
Precise root locations are known and actual time
response is easily obtained by means of the inverse
Laplace Transform.
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 transfer function 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:
dnqo d n 1q o dq o
an n
+ a n 1 n 1 + L + a1 + a0 qo =
dt dt dt
d m qi d m 1q i dq
b m m + b m 1 m 1 + L + b1 i + b 0 qi
dt dt dt
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 amplitude and phase angle.
System Input: q i = Qi sin( t)
System Steady-State Output: qo = Qo sin(t + )
Both amplitude ratio, Qo/Qi , and phase angle, ,
change with frequency, .
The frequency response can be determined
analytically from the Laplace transfer function:
G(s) s = i Sinusoidal M()( )
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
frequencies 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 dont 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 systems 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 systems 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 q i(t) can be represented by an
infinite series of terms called a Fourier Series.
Mechatronics K. Craig
Frequency Response Analysis & Design 10
a0 2 2 n 2 n
q i ( t ) = + a n cos t + b n sin t
T T n =1 T T
T
2n
2
a n = qi ( t ) cos t dt
T T Fourier
2
T Series
2 n
2
b n = q i ( t ) sin t dt
T T
2
Mechatronics K. Craig
Frequency Response Analysis & Design 11
q i (t)
1.5
Consider the Square Wave
-0.01 +0.01
t
0 0.01 -0.5
a0 0.5dt + 1.5dt
= 0.01 0
= 0.5 = average value
T 0.02
2n 2n
0 0.01
Mechatronics K. Craig
Frequency Response Analysis & Design 13
2
1.5
Plot of
1
the
Fourier amplitude
0.5
Series for
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)
4 4
qi ( t ) = 0.5 + sin (100t ) + sin ( 300t )
3
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:
A cos ( t ) + Bsin ( t ) = C sin ( t + )
C = A 2 + B2
1 A
= tan
B
Thus
q i ( t ) = Ai0 + Ai1 sin ( 1 t + 1 ) + Ai 2 sin ( 21 t + 2 ) +L
Mechatronics K. Craig
Frequency Response Analysis & Design 15
A graphical display of the amplitudes (Aik) and the
phase angles (k) 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(i), after the
transients have died out, the output q o(t) will be in
a periodic steady-state given by:
q o ( t ) = Ao0 + Ao1 sin ( 1 t + 1 ) + Ao2 sin ( 21 t + 2 ) + L
A ok = Aik G ( ik )
k = k + G ( ik )
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.
C AG1G2 (i)
(i) =
V 1 + G1G 2 H(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, r, is a
speed-of-response criterion. The higher r, 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)(i) which should
ideally be 0 for all frequencies. A real system
cannot achieve this perfection but will behave
typically as shown.
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)(i).
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)(i) =
G1G2H(i). 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)(i) 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)(i) could be increased (nothing else in
(B/E)(i) being changed) so as to put the system on the
edge of instability, i.e., (B/E)(i)) 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
Bode Plot 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 , 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 (decibel) is: 20log10 G ( i)
Frequency Bands: f
Octave
2
= 2x
where x = # of octaves
f1
An octave is a frequency band from f1 to f2 where f2/f1
= 2. f2
Decade = 10 x
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:
K (1 + i T1 )(1 + i T2 )
r
G ( i ) =
2 1 2
( i ) (1 + i T3 ) 1 + i + 2 ( i)
m
n n
Mechatronics K. Craig
Frequency Response Analysis & Design 30
The log magnitude (Lm) of G(i) is given by:
Lm G ( i ) = Lm [ K ] + Lm [1 + i T1 ] + ( r ) Lm [1 + i T2 ]
2 1 2
( m ) Lm [i ] Lm [1 + i T3 ] Lm 1 + i + 2 ( i )
n n
The phase angle is given by:
G ( i) = K + (1 + i T1 ) + ( r ) (1 + i T2 )
2 1 2
( m ) ( i ) (1 + i T3 ) 1 + i + 2 ( i )
n n
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(), 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
2 1 2
K ( i ) (1+iT ) 1 + i + 2 ( i )
m r
n n
Mechatronics K. Craig
Frequency Response Analysis & Design 32
The curves of log magnitude and angle vs. log10() 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
K = 0
Integral and derivative factors (i) m
Lm ( i ) = m20log10 i = m20log10 ( )
m
( i) = m ( 90 ) = constant
m
The log magnitude curve is a straight line with a slope m(20)
dB/decade = m(6) dB/octave when plotted against log(). It
goes through the point 0 dB at = 1.
Mechatronics K. Craig
Frequency Response Analysis & Design 33
1st-Order Factors (1 + iT) 1
Lm (1 + i T ) = 20log10 1 +i T
1
= 20log10 1 + 2 T 2
0 dB for << 1
20log10 ( T ) for >> 1
(1 + i T ) = tan 1 ( T )
1
< 1/T: straight-line asymptote with zero slope
> 1/T: straight-line asymptote with 20 dB/decade slope
= 1/T: value is 0 dB
cf = corner frequency = 1/T = frequency at which the
asymptotes to the log magnitude curve intersect
Phase angle straight-line asymptotes: 0 at < 0.1cf, 45 at
= cf, 90 at > 10cf
Angle curve is symmetrical about cf when plotted vs. log10()
Mechatronics K. Craig
Frequency Response Analysis & Design 34
Bode Plotting of
1st-Order
Frequency
Response
2nd-Order Factors 1
2 1 2
1 + i + 2 ( i )
n n
For > 1, the quadratic can be factored into two 1 st-order
factors with real poles which can be plotted as described for a
1st-order factor.
For 0 < < 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
2 1 2
2
2
2 2 2
Lm 1 + i + 2 (i ) = 20log10 1 2 +
n n n n
2
1
2 1 2 2
1 + i + 2 ( i) = tan 1 n
n 2
n
1 2
n
For << n: the log magnitude 0 dB
For >> n: the log magnitude 40 log 10 (/n) 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 , cross at cf = n.
These are not accurate for a factor with low values of .
Phase angle: 0 at = 0, 90 at = n, 180 at =
Mechatronics K. Craig
Frequency Response Analysis & Design 37
Frequency Response
of a
2nd-Order System
Mechatronics K. Craig
Frequency Response Analysis & Design 38
Some Observations on 1st-Order Factors
Time Constant
Time it takes the step response to reach 63% of the steady-state
value
Rise Time Tr = 2.2
Time it takes the step response to go from 10% to 90% of the
steady-state value
Delay Time Td = 0.69
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 1 st -order system, the bandwidth is equal to 1/ .
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 clearly controls oscillation; < 1 is
required for oscillatory behavior.
The undamped case ( = 0) is not physically realizable
(total absence of energy loss effects) but gives us,
mathematically, a sustained oscillation at frequency n.
Natural oscillations of damped systems are at the
damped natural frequency d, and not at n.
d = n 1 2
In hardware design, an optimum value of = 0.64 is
often used to give maximum response speed without
excessive oscillation.
Undamped natural frequency n is the major factor in
response speed. For a given response speed is directly
proportional to n.
Mechatronics K. Craig
Frequency Response Analysis & Design 42
Thus, when 2nd-order components are used in feedback
system design, large values of n (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 <
0.707. The peak frequency is p and the peak amplitude
ratio depends only on .
K
p = n 1 2 2
peak amplitude ratio =
2 1 2
The phase angle at the frequency where the resonant
peak occurs is given by:
1 2 2
p = tan 1
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 1 st-order system, the bandwidth is equal to 1/.
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 2 nd-order system:
BW = n 1 2 2 + 2 4 2 + 4 4
As varies from 0 to 1, BW varies from 1.55n to 0.64n. For a
value of = 0.707, BW = n. For most design considerations,
we assume that the bandwidth of a 2 nd-order all pole system can
be approximated by n.
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
2 1 2
K ( i ) (1+iT ) 1 + i + 2 ( i )
m r
n n
Determine the value of 20log10(K) = Lm(K) dB
Plot the low-frequency magnitude asymptote through
the point Lm(K) at = 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 1 st-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 = n:
1
2 1 2
Lm 1 + i + 2 (i ) = 20log10 ( 2 )
n n
Plot the low-frequency asymptote of the phase curve,
= 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
s i
2 + 1 2 + 1
2000 ( s + 0.5 ) 0.5 0.5
= =
s ( s + 10 )( s + 50 ) s s i i
s + 1 + 1 i + 1 + 1
10 50 10 50
10 2.5
=
s ( s + 0.4s + 4)
2
s 2 0.2
s + s + 1
4 2
0.01 ( s 2 + 0.01s + 1)
s 2
0.02
s +
2
s + 1
4 2
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.
Bodes 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 in iout
Example: R
RC Low-Pass Filter
Time Response & e in C e out
Frequency
Response
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
Amplitude
0.5 R = 15 K
0.4 C = 0.01 F
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8
Time (sec) -4
x 10
Time Constant = RC
Mechatronics K. Craig
Frequency Response Analysis & Design 55
R = 15 K
Frequency Response C = 0.01 F
0 0
-5 -20
Phase (degrees)
-10 -40
Gain dB
-15 -60
-20 -80
-25 -100
2 3 4 5 2 3 4 5
10 10 10 10 10 10 10 10
Frequency (rad/sec) Frequency (rad/sec)
Bandwidth = 1/
eout K K0o K
( )
i = = = tan 1
ein i + 1 ( ) + 1 tan
2 2 1
( )
+ 1
2
2
Mechatronics K. Craig
Frequency Response Analysis & Design 56
MatLab / Simulink Diagram
Frequency Response for 1061 Hz Sine Input
= 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
amplitude
-0.2
-0.4
Output
-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
R4 R7
C5
R1 R3
- R6
-
C2 +
e in +
e out
Mechatronics K. Craig
Frequency Response Analysis & Design 59
Physical Model Ideal Transfer Function
R 7 1
R R R C C
eout 6 1 3 2 5
()
s =
ein 1 1 1 1
s +
2
+ + s+
R 3 C2 R1C2 R 4 C2 R 3 R4 C2 C5
R4 R7
C5
R1 R3
- R6
-
C2 +
e in +
e out
Mechatronics K. Craig
Frequency Response Analysis & Design 60
a0
2nd-OrderDynamic n @ = undamped natural frequency
a2
System Model
a1
@ = damping ratio
d 2q 0 dq 2 a 2a 0
a 2 2 + a1 0 + a0 q0 = b0 q i
b
dt dt K @ 0 = steady-state gain
1 d 2q 0 2 dq 0 a0
+ + q 0 = Kq i
n dt
2 2
n dt
Step Response
of a
2nd-Order System
Mechatronics K. Craig
Frequency Response Analysis & Design 61
1 d 2q 0 2 dq 0 Step Response
+ + q 0 = Kq i of a
n dt
2 2
n dt
2nd-Order System
Underdamped
q o = Kqis 1
1
1 2
(
e n t sin n 1 2 t + sin 1 1 2 )
<1
+ 2 1 (+ 2 1) n t
1 e
Over- 2 1
2
damped q o = Kqis >1
2 1 ( 1) n t
2
+ e
2 2
1
Mechatronics K. Craig
Frequency Response Analysis & Design 62
K2n
G(s) = 2
s + 2 n s + 2n
Location of Poles
s1,2 = n in 1 2 Of
Transfer Function
s1,2 = id
y (t ) = 1 e t
cos d t + sin d t
d
1.8
tr rise time
n
4.6
ts settling time
n
General All-Pole
Mp = e 1 2
( 0 < 1) overshoot 2nd-Order
Step Response
= 1 ( 0 0.6)
0.6
Mechatronics K. Craig
Frequency Response Analysis & Design 63
1.8 4.6
n
tr ts
0.6 (1 M p ) 0 0.6
Qo K
(s ) = 2
Laplace Transfer Function Qi s 2s
+ +1
n n
2
Qo K 2
( i ) = tan 1
Qi 2 2
4 22 n
1 +
n
n 2
n
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 + T1s 1 T1s
G1 ( s ) = G2 ( s) = 0 < T1 < T2
1 + T2 s 1 + T2 s
Bode Diagrams
From: U(1)
0
A small amount -2
of change in
Phase (deg); Magnitude (dB)
magnitude -4
produces a small -6
amount of 0
-100
but a much G2(s)
larger change in -150
Mechatronics K. Craig
Frequency Response Analysis & Design 71
It is therefore possible to detect whether a system is
minimum phase by examining both the slope of the
high-frequency asymptote of the log-magnitude curve
and the phase angle at = . If the slope of the log-
magnitude curve as is 20(q p) dB/decade and
the phase angle at = 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: dt s
e = 1 dt
Mechatronics K. Craig
Frequency Response Analysis & Design 72
Dead-time approximation comparison:
Dead-Time Phase-Angle Approximation Comparison
0 dt = 0.01
-50
-100
phase angle (degress)
-150
-200
Qo 2 dt s
(s ) =
-250 Qi 2 + dt s
-300
-350
( s)
2
-400
2 dt s + dt
-1 0 1 2 3 4 5
10 10 10 10 10 10 10
Qo
dt s
= 1 dt
frequency (rad/sec) (s ) = 8
e ( dts )
2
Qi
2 + dt s +
8
Mechatronics K. Craig
Frequency Response Analysis & Design 73
Unit Step Responses Step Response
From: U(1)
1.4
s +1 1.2
s2 + s + 1 1
0.8
1
s2 + s + 1
Amplitude
0.6
To: Y(1)
0.4
0.2
0
s + 1
-0.2 s2 + s + 1
-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
s +1
1.2
s2 + s + 1
1
0.8 1
s2 + s + 1
Amplitude
To: Y(1)
0.6
0.4
s
0.2 s2 + s + 1
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 + s + 1 1
s + 1
0.8
s2 + s + 1
0.6
Amplitude
To: Y(1)
0.4
0.2
-0.2
s
-0.4 s2 + s + 1
-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 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. G (s) =
Ts + 1
The magnitude at low frequencies is 20log 10K0.
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 =
K1.
The value of the low-frequency slope of 20 dB/decade (or its
extension) at the frequency = 1 is equal to 20log10K1.
The gain K1 is the steady-state ramp error coefficient.
K1
G (s) =
s ( Ts + 1)
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 =
(K2)1/2.
The value on the low-frequency slope of 40 dB/decade (or its
extension) at the frequency = 1 is equal to 20log10K2.
The gain K2 is the steady-state parabolic error coefficient.
K2
G (s) = 2
s ( Ts + 1)
Mechatronics K. Craig
Frequency Response Analysis & Design 80
Frequency-Response Design
Mechatronics K. Craig
Frequency Response Analysis & Design 81
Gain crossover frequency, resonant frequency, and
bandwidth give a rough estimate of the speed of
transient response.
Static error constants give the steady-state
accuracy.
Although the correlation between the transient
response and frequency response is indirect, the
frequency domain 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 (<< gc) : indicates the steady-
state behavior of the closed-loop system
Medium-frequency region: indicates relative stability
High-frequency region (>> gc ): 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 G2 (s) . Unfortunately, the true
plant is different from the nominal plant due to
unavoidable modeling errors, denoted by G2(s). Thus the
true plant may be represented by G 2 (s) = G2 (s) + G 2 (s) .
Knowledge of G2(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 2 (s) + G 2 (s)
(unity feedback assumed) 1 + G 1 (s)
2 (s) + G 2 (s)
G
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
Mechatronics K. Craig
Frequency Response Analysis & Design 91
Bode Diagrams
Bode Diagram:
From: U(1)
PD Controller 50
40
30
10
100
80
To: Y(1)
60
40
20
G c (s ) = K p + K ds 10-2 10 -1 10 0 101 10 2
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
s+
Ts + 1
G c (s ) = K c = Kc T (0 < < 1)
Ts + 1 s+
1
T
The minimum value of (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
j T + 1 1
Kc (0 < < 1) sin(m ) = 2 =
jT + 1 1 + 1+
= tan 1 ( T ) tan 1 ( T) 2
Mechatronics K. Craig
Frequency Response Analysis & Design 94
Im
m
m
1
(1 )
2
Re
0 1
=0 =
1
(1 + )
2 Polar Plot of Lead Compensator
with Kc = 1
Mechatronics K. Craig
Frequency Response Analysis & Design 95
1
Bode Diagram: Bode Diagrams Mag = K c
( j T + 1) 0
Kc
( jT + 1) -5
= 0.1 -10
T =1 -15
Kc = 1
-20
50
40
30
m
20
10
-1 0 1 2
10 10 10 10
m occurs midway between the
1 1 1 Frequency (rad/sec)
m = = 2 break-point frequencies on a
T T T log scale.
Mechatronics K. Craig
Frequency Response Analysis & Design 96
The amount of phase lead at the midpoint depends only on
. Our task is to select a value of 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 gc, which determines bandwidth, rise
time, and settling time.
Phase margin, which determines the damping coefficient and the
overshoot.
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
s+
Ts + 1
G c (s ) = K c = Kc T (0 < < 1)
Ts + 1 s+
1
T
Mechatronics K. Craig
Frequency Response Analysis & Design 98
Let Kc = 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 to be
added to the system. Add 5 to this value to
compensate for the shift in gc.
Determine the attenuation factor by using
1 1 sin(m )
sin( m ) = =
1+ 1 + sin( m )
Mechatronics K. Craig
Frequency Response Analysis & Design 99
Determine the frequency where the magnitude of
KG(s) is equal to 1
20log10
Select this frequency as the new gc. This
corresponds to 1
=
T
m
Mechatronics K. Craig
Frequency Response Analysis & Design 100
Calculate Kc = K/.
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
s+
Ts + 1
G c ( s ) = K c = Kc T ( > 1)
Ts + 1 s+
1
T
j T + 1
K c ( > 1)
j T + 1
Mechatronics K. Craig
Frequency Response Analysis & Design 103
Im
Polar Plot of Lag Compensator
Kc K c
Re
0
= =0
Mechatronics K. Craig
Frequency Response Analysis & Design 104
Bode Diagram:
Bode Diagrams
( jT + 1)
K c
( jT + 1)
20
15
= 10
10
T =1
Phase (deg); Magnitude (dB)
Kc = 1 0
-10
-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 gc 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
s+
Ts + 1
G c ( s ) = K c = Kc T ( > 1)
Ts + 1 s+
1
T
Define Kc = 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
gc.
The pole and zero of the lag compensator must be
located substantially lower than the new gc to
prevent detrimental effects of phase lag due to the
lag compensator. Choose the zero location 1
octave to 1 decade below the new gc.
Mechatronics K. Craig
Frequency Response Analysis & Design 110
Determine the attenuation necessary to bring the
magnitude curve down to 0 dB at the new gc.
Since this attenuation is -20 log10, determine .
The pole of the compensator is now determined.
Calculate Kc = K/.
Example:
1
G(s) =
s(s + 1)(0.5s + 1)
Performance Specifications:
PM > 40 GM > 10 dB
unit-ramp-input steady-state error < 0.2
Compensator: 10s + 1
G c (s) = 5
100s + 1
Mechatronics K. Craig
Frequency Response Analysis & Design 111
Lead-Lag Compensation
Lead-Lag Compensator:
1 1
s + T s + T
G c (s) = K c 1 2
( > 1, > 1)
1
s + T s + T
1 2
Mechatronics K. Craig
Frequency Response Analysis & Design 112
Im Polar Plot of Lead-Lag Compensator
Kc = 1 and =
1
1 =
T1T2
=
Lead Compensator
1 Re
0
Lag Compensator
=0
= 1
Mechatronics K. Craig
Frequency Response Analysis & Design 113
Lead-Lag Compensator
Kc = 1, = = 10 Bode Diagrams
T2 = 10T1 0
T1 = 1
-5
-10
Phase (deg); Magnitude (dB)
-15
50
-50
-3 -2 -1 0 1 2
10 10 10 10 10 10
Frequency (rad/sec)
1
1 =
Mechatronics
T1T2 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 = . Then
1 1
s + T s + T
G c (s) = K c 1 2
( > 1, > 1)
1
s + T s + T
1 2
Mechatronics K. Craig
Frequency Response Analysis & Design 115
The phase lead portion (involving T 1) alters the
frequency-response curve by adding phase lead
angle and increasing the phase margin at the gain
crossover frequency, gc.
The phase lag portion (involving T 2) provides
attenuation near and above gc 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)(s + 2)
Performance Specifications:
GM > 10 dB PM > 50
unity-ramp-input steady-state error < 0.1
Compensator:
(s + 0.7) (s + 0.15)
G c (s) = K = 20
(s + 7) (s + 0.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