13 Freq Response AIC

Download as pdf or txt
Download as pdf or txt
You are on page 1of 84

Frequency Response Analysis

Week 12
Introduction

What is frequency response analysis?


- Frequency Response: the steady-state response to a sinusoidal
input.
- How to do it? : we vary the frequency of the input signal over
a certain range and study the resulting response.

Advantages:
1. We can use the data obtained from measurements on the
physical system without deriving its mathematical model.
2. Simple and can be made accurately by use of readily available
sinusoidal signal generators and precise measurement
equipment.
Advantages (cont’d):

3. The transfer functions of complicated components can be


determined experimentally by frequency-response tests.

4. A system may be designed so that the effects of undesirable


noise are negligible and that such analysis and design can be
extended to certain nonlinear control systems.

How to do?:
 We are going to adjust the frequency-response characteristic
of the open-loop transfer function by to obtain acceptable
transient-response characteristics for the system.
Obtaining Steady-State Outputs to Sinusoidal Inputs
 The steady-state output of a transfer function system can be
obtained directly from the sinusoidal transfer function, that is,
the transfer function in which s is replaced by j, where  is
frequency.

Figure 8-1 Stable, linear, time-invariant system.

- If the input x(t) is a sinusoidal signal, the steady-state output


will also be a sinusoidal signal of the same frequency, but with
possibly different magnitude and phase angle.
Obtaining Steady-State Outputs to Sinusoidal Inputs
 The steady-state output of a transfer function system can be
obtained directly from the sinusoidal transfer function, that is,
the transfer function in which s is replaced by j, where  is
frequency.
x(t) = X sin t

Steady-state response
The partial fraction
expansion of
Equation (8-1)

Smaller and smaller!


The inverse
Laplace
transform of
Equation (8-2)

The steady-state
response

From
where?
Phase Shifting
Amplitude gain
Figure 8-2 Input and output sinusoidal signals.

Sinusoidal Transfer
Function!
Figure 8-3 First-order system.
The curves are drawn on semilog paper, using the log scale for
frequency and the linear stale for either magnitude (but in
decibels) or phase angle (in degrees).

The main advantage of using the Bode diagram

1. Multiplication of magnitudes can be converted into addition.


2. A simple method for sketching an approximate log-magnitude
curve is available.
3. It is based on asymptotic approximations.
4. The experimental determination of a transfer function can be
made simple if frequency-response data are presented in the
form of a Bode diagram.
1. A number greater than unity has a positive value in decibels,
while a number smaller than unity has a negative value.
2. The log-magnitude curve for a constant gain K is a horizontal
straight line at the magnitude of 20 logK decibels.
3. The phase angle of the gain K is zero.
4. The effect of varying the gain K in the transfer function is that it
raises or lowers the log-magnitude curve of the transfer
function by the corresponding constant amount, but it has no
effect on the phase curve.
Figure 8-4 Number–decibel conversion line.
- In Bode diagrams, frequency ratios are expressed in terms of
octaves or decades.
- An octave is a frequency band from 1 to 21
- A decade is a frequency band from 1 to 101
- The phase angle of j is constant and equal to 90°.
- The log-magnitude curve is a straight line with a slope of 20
dB/decade.
Figure 7-5 (a) Bode diagram of G(jω) = 1/jω; (b) Bode diagram of G(jω) = jω.
Thus, the value of -20 log T
- At  = 1/T, the log magnitude equals 0 dB.
dB decreases by 20 dB for
- At  = 10/T, the log magnitude is -20 dB.
every decade of 

For  » 1/T, the log-magnitude curve is thus a straight line


with a slope of -20 dB/decade (or -6 dB/octave).
Figure 8-6 Log-magnitude curve, together with the asymptotes, and phase-angle
curve of 1/(1+jωT).
 The error at one octave below or above the corner frequency is
approximately equal to -1 dB.
 Similarly, the error at one decade below or above the corner
frequency is approximately -0.04 dB.
Figure 8-7 Log-magnitude error in the asymptotic expression of the frequency-
response curve of 1/(1+jωT).
 In practice, an accurate frequency-response curve can be
drawn by introducing a correction of 3 dB at the corner
frequency and a correction of 1 dB at points one octave
below and above the corner frequency and then connecting
these points by a smooth curve.

 Note that varying the time constant T shifts the corner


frequency to the left or to the right, but the shapes of the log-
magnitude and the phase-angle curves remain the same.

 The transfer function 1/(1 + jT) has the characteristics


of a low-pass filter.
 Therefore, if the input function contains many
harmonics, then the low-frequency components are
reproduced faithfully at the output, while the high frequency
components are attenuated in amplitude and shifted in phase.
 An advantage of the Bode diagram is that for reciprocal
factors-for example, the factor 1 + jT-the log-magnitude
and the phase-angle curves need only be changed in sign,
since
Figure 8-8 Log-magnitude curve, together with the asymptotes, and
phase-angle curve for 1+jωT.
 If  > 1, this quadratic factor can be expressed as a
product of two first-order factors with real poles.
 If 0 <  < 1, this quadratic factor is the product of two
complex conjugate factors.
 Errors obviously exist in the approximation by straight-
line asymptotes. The magnitude of th error depends on the
value of .
Figure 7-9 Log-magnitude curves, together with the asymptotes, and phase-
angle curves of the quadratic transfer function given by Equation (8–7).
 First rewrite the sinusoidal transfer function G(j)H(j)
as a product of basic factors discussed above.
 Then identify the corner frequencies associated with these
basic factors.
 Finally, draw the asymptotic log-magnitude curves with
proper slopes between the corner frequencies.
The exact curve, which lies close to the asymptotic curve,
can be obtained by adding proper corrections.

 The phase-angle curve of G(j)H(j) can be drawn by


adding the phase-angle curves of individual factors.
Figure 7-11 Bode diagram of the system considered in Example 7–3.


EXAMPLE 8-5
Figure 8-20 Bode diagram of
Figure 8-22 Bode diagram of
Figure 8-23 Bode diagram of
Figure 8-24 Bode diagram of the system considered in Example 8–7.
Gain and Phase Margin
Let's say that we have the following system:

where K is a variable (constant) gain and G(s) is the plant under consideration.

The gain margin is defined as the change in open loop gain required to make the
system unstable. Systems with greater gain margins can withstand greater changes
in system parameters before becoming unstable in closed loop. Keep in mind that
unity gain in magnitude is equal to a gain of zero in dB.

The phase margin is defined as the change in open loop phase shift required to make
a closed loop system unstable.

The phase margin is the difference in phase between the phase curve and -180 deg
at the point corresponding to the frequency that gives us a gain of 0dB (the gain
cross over frequency, Wgc).

Likewise, the gain margin is the difference between the magnitude curve and 0dB at
the point corresponding to the frequency that gives us a phase of -180 deg (the
phase cross over frequency, Wpc).
Gain and Phase Margin

-180
Gain and Phase Margin
We can find the gain and phase margins for a system directly, by using
MATLAB. Just enter the margin command.
This command returns the gain
and phase margins, the gain and
phase cross over frequencies, and
a graphical representation of these
on the Bode plot.

margin(50,[1 9 30 40])
The Nyquist Stability Criterion
The Nyquist plot allows us also to predict the stability and performance of a closed-loop system by
observing its open-loop behavior. The Nyquist criterion can be used for design purposes regardless
of open-loop stability (Bode design methods assume that the system is stable in open loop).
Therefore, we use this criterion to determine closed-loop stability when the Bode plots display
confusing information.

The Nyquist diagram is basically a plot of G(j* w) where G(s) is the open-loop transfer function and
w is a vector of frequencies which encloses the entire right-half plane. In drawing the Nyquist
diagram, both positive and negative frequencies (from zero to infinity) are taken into account. In the
illustration below we represent positive frequencies in red and negative frequencies in green. The
frequency vector used in plotting the Nyquist diagram usually looks like this (if you can imagine the
plot stretching out to infinity):

However, if we have open-loop poles or zeros on the jw axis, G(s) will not be defined at those
points, and we must loop around them when we are plotting the contour. Such a contour would
look as follows:
The Cauchy criterion

The Cauchy criterion (from complex analysis) states that when taking a closed
contour in the complex plane, and mapping it through a complex function G(s),
the number of times that the plot of G(s) encircles the origin is equal to the
number of zeros of G(s) enclosed by the frequency contour minus the number of
poles of G(s) enclosed by the frequency contour. Encirclements of the origin are
counted as positive if they are in the same direction as the original closed contour
or negative if they are in the opposite direction.

When studying feedback controls, we are not as interested in G(s) as in the


closed-loop transfer function:
G(s)
---------
1 + G(s)
If 1+ G(s) encircles the origin, then G(s) will enclose the point -1.
Since we are interested in the closed-loop stability, we want to know if there are
any closed-loop poles (zeros of 1 + G(s)) in the right-half plane.

Therefore, the behavior of the Nyquist diagram around the -1 point in the real axis
is very important; however, the axis on the standard nyquist diagram might
make it hard to see what's happening around this point
Gain and Phase Margin
Gain Margin is defined as the change in open-loop gain expressed in decibels (dB),
required at 180 degrees of phase shift to make the system unstable. First of all, let's say
that we have a system that is stable if there are no Nyquist encirclements of -1, such as :
50
-----------------------
s^3 + 9 s^2 + 30 s + 40

Looking at the roots, we find that we have no open loop poles in the right half plane and
therefore no closed-loop poles in the right half plane if there are no Nyquist encirclements of -
1. Now, how much can we vary the gain before this system becomes unstable in closed
loop?

The open-loop system represented by this plot will become unstable in closed loop if the gain
is increased past a certain boundary.
The Nyquist Stability Criterion
and that the Nyquist diagram can be viewed by typing:
nyquist (50, [1 9 30 40 ])
Gain and Phase Margin
Phase margin as the change in open-loop phase shift required at unity gain to make
a closed-loop system unstable.

From our previous example we know that this particular system will be unstable in
closed loop if the Nyquist diagram encircles the -1 point. However, we must also
realize that if the diagram is shifted by theta degrees, it will then touch the -1 point
at the negative real axis, making the system marginally stable in closed loop.
Therefore, the angle required to make this system marginally stable in closed loop
is called the phase margin (measured in degrees). In order to find the point we
measure this angle from, we draw a circle with radius of 1, find the point in the
Nyquist diagram with a magnitude of 1 (gain of zero dB), and measure the phase
shift needed for this point to be at an angle of 180 deg.
The Nyquist Stability Criterion

w  100 99.9 100 j  1 s ( w)  j w f ( w)  1


50 4.6
G( w) 
3 2
s ( w)  9 s ( w)  30 s ( w)  40
5

Im ( G( w) )
0
0

5
2 1 0 1 2 3 4 5 6
Re( G( w ) )
Consider the Negative Feedback System

Remember from the Cauchy criterion that the number N of times that the plot of G(s)H(s) encircles -1 is
equal to the number Z of zeros of 1 + G(s)H(s) enclosed by the frequency contour minus the number P of
poles of 1 + G(s)H(s) enclosed by the frequency contour (N = Z - P).
Keeping careful track of open- and closed-loop transfer functions, as well as numerators and denominators,
you should convince yourself that:
• the zeros of 1 + G(s)H(s) are the poles of the closed-loop transfer function
• the poles of 1 + G(s)H(s) are the poles of the open-loop transfer function.
The Nyquist criterion then states that:
• P = the number of open-loop (unstable) poles of G(s)H(s)
• N = the number of times the Nyquist diagram encircles -1
• clockwise encirclements of -1 count as positive encirclements
• counter-clockwise (or anti-clockwise) encirclements of -1 count as negative encirclements
• Z = the number of right half-plane (positive, real) poles of the closed-loop system
The important equation which relates these three quantities is:

Z = P + N
The Nyquist Stability Criterion - Application
Knowing the number of right-half plane (unstable) poles in open loop (P), and
the number of encirclements of -1 made by the Nyquist diagram (N), we can
determine the closed-loop stability of the system.

If Z = P + N is a positive, nonzero number, the closed-loop system is


unstable.

We can also use the Nyquist diagram to find the range of gains for a closed-
loop unity feedback system to be stable. The system we will test looks like
this:

where G(s) is :
s^2 + 10 s + 24
---------------
s^2 - 8 s + 15
The Nyquist Stability Criterion
This system has a gain K which can be varied in order to modify the response of the
closed-loop system. However, we will see that we can only vary this gain within certain
limits, since we have to make sure that our closed-loop system will be stable. This is what
we will be looking for: the range of gains that will make this system stable in the closed
loop.

The first thing we need to do is find the number of positive real poles in our open-loop
transfer function:

roots([1 -8 15])
ans =
5
3
The poles of the open-loop transfer function are both positive. Therefore, we need two anti-
clockwise (N = -2) encirclements of the Nyquist diagram in order to have a stable closed-
loop system (Z = P + N). If the number of encirclements is less than two or the
encirclements are not anti-clockwise, our system will be unstable.

Let's look at our Nyquist diagram for a gain of 1:

nyquist([ 1 10 24], [ 1 -8 15])

There are two anti-clockwise encirclements of -1.


Therefore, the system is stable for a gain of 1.
The Nyquist Stability Criterion
Time-Domain Performance Criteria Specified
In The Frequency Domain
Open and closed-loop frequency responses are related by:

G  j
T j
1  G  j
1
Mpw   0.707
2
2   1  

G   u  j v M M  

G  j
2 2
u  jv u v
M  
1  G  j 1  u  jv 2 2
( 1  u)  v

Squaring and rearrenging


2 which is the equation of a
 M 
2
2  M 
2 circle on u-v planwe with a
u v 
 2 2 center at
 1M  1M  M
2
u v 0
2
1M
Time-Domain Performance Criteria Specified
In The Frequency Domain
Frequency Response Design Method

Stability Margins
Phase margin can be read from phase plot
directly.
PM is equal to the additional phase lag required
before the closed-loop system become
unstable.
A positive phase margin indicates stability. A
phase angle of -180° means PM=0, the
neutral stability point.
Frequency Response Design Method
Stability

4 K=2
K=10

0 K=0.1
dB -0

-
40-90
(), degrees

+80°
- -35°

180
PM=0, Neutral stable
-
 0.1 1 10 100
270
Frequency Response Design Method
Stability
The effect of gain changes on stability can
be evaluated with relative ease in the
Bode plot. One does not have to
redraw the magnitude and phase
curve.
In the existing magnitude plot, draw a new
line for KG ( j )  1 . 1 divided by the
magnitude for that line is the new gain
K.
Frequency Response Design Method
Stability

4 K=0.05 26 dB= 1/K or


0 K=1
K=0.05
dB -0 K=5 -14 dB=1/K or
K=5
-
40-90
(), degrees

+80°
- -35°

180
-
 0.1 1 10 100
270
Frequency Response Design Method

Relationships between phase margin and


damping ratio
For open-loop second-order system G(s)  s(s 2)
2

with unity feedback and the closed


loop transfer function T (s)   2

s 2  2s   2

there is an approximate relationship for


phase margins less than 60°:   PM
100
Frequency Response Design Method

Note: PM=30 is the recommended


minimum for stability consideration.

Bode’s Gain-phase Relationship


Theorem: For any stable minimum-phase
system (with no RHP zeros or poles),
the phase of G(j) is uniquely related
to the magnitude of G(j).
Frequency Response Design Method

Bode’s Gain-phase Relationship


Practical Application: if the curve |G(j)|
versus  on a log-log scale persists at
a constant slope (20n dB/decade) for
approximately a decade of frequency,
then the approximate relationship
holds G( j )  n  900
Frequency Response Design Method
Stability

4 Slope n= -1
0
dB -0 K=5

Slope n= -3
-
40 G( j )  900
(), degrees

-90
-
-180 G ( j )  2700
270  0.1 1 10 100
Frequency Response Design Method

Bode’s Gain-phase Relationship


Practical Application: when adjusting the
magnitude curve in design, try to give
it a slope of –1 (or –20 dB/decade) at
the crossover frequency (|G(j)|=1). If
the slope remains –20 dB/decade for a
decade centered at the crossover
frequency, then the PM is close to 90°.
Frequency Response Design Method

Application Example
Output,
Referenc
e Speed, Y
R E(s)
+ KD(s) 1/s2
_

This is the spacecraft altitude control. Design


a controller that provides good damping and a
bandwidth of 0.2 rad/sec.
Frequency Response Design Method
Application Example
Step 1: draw the magnitude curve of the open loop plant
8 Slope n= -2, or –40
0 dB/decade
dB 60

40

20

0
0.01  0.1 1
Frequency Response Design Method
Application Example.
Step 2:
• We see -40 dB/decade slope in the Bode
plot. There is a need to reshape the curve
to provide -20 dB/decade slope at
crossover frequency.
• Use a PD compensator to raise the slope to
–20 dB/decade: KD(s) = K(Ts+1)
• Adjust breakpoint 1=1/T to provide desired
slope at crossover frequency.
• Adjust the gain K to produce desired
bandwidth.
Frequency Response Design Method
Application Example.
Step 2:
• Adjust breakpoint 1=1/T to provide desired
slope at crossover frequency: choose to be
4 times lower than the crossover frequency,
so the slope will be –20 dB/decade in the
vicinity of the crossover (this provides more
than a decade of frequency centered at
crossover where the slope will stay –20
dB/decade).
• Hence, 1=0.2 / 4 = 0.05 rad/sec. T=1/ 1
=20.
Frequency Response Design Method
Application Example
Step 2: modify the plot to include the compensator. Start at
8 1 Slope n= -2, or –40
0 dB/decade
dB 60
1
40
Slope n= -1, or –20
dB/decade
20

0
0.01  0.05 0.1 0.2 1
Frequency Response Design Method
Application Example
Step 3: determine the magnitude at crossover frequency 0.2
rad/s
8 Slope n= -2, or –40
0 dB/decade
dB 60
1
40
Slope n= -1, or –20
dB/decade
20

0
0.01  0.05 0.1 0.2 1
Frequency Response Design Method
Application Example
Step 4: compute the gain K
1
K
D( j )G ( j )  0.2
1
  0.01
100
The designed controller is 0.01(20S+1).

You might also like