MOTA, Shona Pauline M 02February2015
EXERCISE NO. 8
Frequency Response Analysis
Objectives:
To plot Bode Diagrams for the transfer functions using MATLAB.
Introduction:
Frequency Response:
The term frequency response, we mean 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.
Frequency-response methods were developed in 1930s and 1940s by Nyquist, Bode,
Nichols, and many others. The frequency-response methods are most powerful in conventional
control theory. They are also indispensable to robust control theory.
The Nyquist stability criterion enables us to investigate both the absolute and relative
stabilities of linear closed-loop systems from a knowledge of their open-loop frequencyresponse
characteristics. An advantage of the frequency-response approach is that frequency-response
tests are, in general, sirnple and can be made accurately by use of readily available sinusoidal
signal generators and precise measurement equipment. Often the transfer functions of
complicated components can be determined experimentally by frequency-response tests. In
addition, the frequency-response approach has the advantages that 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.
Although the frequency response of a control system presents a qualitative picture of the
transient response, the correlation between frequency and transient responses is indirect, except
for the case of second-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.
Bode Plots:
A Bode diagram consists of two graphs: One is a plot of the logarithm of the magnitude of a
sinusoidal transfer function; the other is a plot of the phase angle; both are plotted against the
frequency on a logarithmic
scale.
Control Systems Engineering Lab: Frequency Response Analysis
The standard representation of the logarithmic magnitude of G(jw) is 20 log|(jw)|, where the base
of the logarithm is 10. The unit used in this representation of the magnitude is the decibel,
usually abbreviated dB. In the logarithmic representation, 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 frequency range of interest determines the number of logarithmic
cycles required on the abscissa.)
The main advantage of using the Bode diagram is that multiplication of magnitudes can be
converted into addition.
A number-decibel conversion line is given in Figure 8-4. The decibel value of any number can
be obtained from this line. As a number increases by a factor of 10, the corresponding decibel
value increases by a factor of 20. This may be seen from the following:
20log(K x 10) = 20 log K + 20
Feedback and Control Systems – Dennis [Link] 2
Control Systems Engineering Lab: Frequency Response Analysis
Bode Diagrams:
20log10(|A|)
20log10(|j . ω . τ1|), where τ1 is a real number
20log10(|1 ∓j . ω . τ1|), where τ1 is a real number
Feedback and Control Systems – Dennis [Link] 3
Control Systems Engineering Lab: Frequency Response Analysis
Bode Phase Diagram
< A, where A is a positive real number
< B, where A is a positive real number
< (j . ω . τ3), where τ3 is a real number
Feedback and Control Systems – Dennis [Link] 4
Control Systems Engineering Lab: Frequency Response Analysis
< (1 + j . ω . τ4), where τ4 is a real number
< (1 - j . ω . τ4), where τ4 is a real number
Feedback and Control Systems – Dennis [Link] 5
Control Systems Engineering Lab: Frequency Response Analysis
Bode Plots Using MATLAB
The command bode computes magnitudes and phase angles of the frequency response of
continuous-time, linear, time-invariant systems. When the command bode (without left-hand
arguments) is entered in the computer, MATLAB produces a Bode plot on the screen. Most
commonly used bode commands are
When invoked with left-hand arguments, such as
bode returns the frequency response of the system in matrices mag, phase, and w. No plot is
drawn on the [Link] matrices mag and phase contain magnitudes and phase angles of the
frequency response of the system, evaluated at user-specified frequency [Link] phase angle
is returned in degrees. The magnitude can be converted to decibels with the statement
Other Bode commands with left-hand arguments are
To specify the frequency range, use the command logspace(d1 ,d2) or logspace (dl ,d2,n).
logspace(d1 ,d2) generates a vector of 50 points logarithmically equally spaced between decades
10d1and 10d2. (50 points include both endpoints. There are 48 points between the endpoints.) To
generate 50 points between 0.1 rad/sec and 100 rad/sec. enter the command
Feedback and Control Systems – Dennis [Link] 6
Control Systems Engineering Lab: Frequency Response Analysis
Example 1:
Consider the Transfer Function
25
G ( s )= 2
s +4 s+ 25
Plot a Bode diagram for this transfer function using MATLAB. Write the script below and attach
the bode plot.
MATLAB Script for Example 1:
Bode(25,[1 4 25])
Bode Plot for Example 1:
Feedback and Control Systems – Dennis [Link] 7
Control Systems Engineering Lab: Frequency Response Analysis
Example 2:
Consider the system below
Plot a Bode diagram for this transfer function using MATLAB. Write the script below and attach
the bode plot. Note: Indicate the proper title for the graph.
MATLAB Script for Example 2:
>> num2=[9 1.8 9];
>> den2=[1 1.2 9 0];
>> sys2=tf(num2,den2);
>> sys=feedback(sys2,[1])
Transfer function:
9 s^2 + 1.8 s + 9
Bode Plot for Example 2:
Feedback and Control Systems – Dennis [Link] 8
Control Systems Engineering Lab: Frequency Response Analysis
Conclusion:
Upon performing the 8th experiment entitled “Frequency Response Analysis” we were
able to learn how to plot Bode Diagrams for the transfer functions using MATLAB. We first
have to get its transfer functions before using the comand bode(sys) or other syntax that can be
used in order to get the bode plot of certain block diagrams. We were able to see that the
command bode computes magnitudes and phase angles of the frequency response of continuous-
time, linear, time-invariant systems. Also, a Bode diagram consists of two graphs: One is a plot
of the logarithm of the magnitude of a sinusoidal transfer function; the other is a plot of the phase
angle; both are plotted against the frequency on a logarithmic scale.
Frequency Response of an electric or electronics circuit allows us to see exactly how the
output gain and the phase changes at a particular single frequency, or over a whole range of
different frequencies from 0Hz, to many thousands of mega-hertz, MHz depending upon the
design characteristics of the circuit.
The frequency response of a system can be measured by applying a test signal, for example:
applying an impulse to the system and measuring its response
Frequency response requirements differ depending on the application In high fidelity audio, an
amplifier requires a frequency response of at least 20–20,000 Hz, with a tolerance as tight as
±0.1 dB in the mid-range frequencies around 1000 Hz, however, in telephony, a frequency
response of 400–4,000 Hz, with a tolerance of ±1 dB is sufficient for intelligibility of speech.
Feedback and Control Systems – Dennis [Link] 9
Control Systems Engineering Lab: Frequency Response Analysis
Problem:
1. Plot a Bode diagram for this transfer function using MATLAB. Write the script below
and attach the bode plot. Note: Indicate the proper title for the graph.
The transfer functions are given as:
G1 (s) = 1/(s + 7)
G2 (s) = 1/(s2 + 3s + 5)
G3 (s) = 1/(s + 8)
G4 (s) = 1/s
G5 (s) = 7/(s+3)
G6 (s) = 1/(s2 + 7s + 5)
G7 (s) = 5/(s + 5)
G8 (s) = 1/(s + 9)
Use separate sheet for the MATLAB script and for the Bode plot.
Feedback and Control Systems – Dennis [Link] 10
Control Systems Engineering Lab: Frequency Response Analysis
MATLAB Script for Problem 1:
>> ng1=[1];dg1=[1 7];g1=tf(ng1,dg1);
>> ng2=[1];dg2=[1 3 5];g2=tf(ng2,dg2);
>> ng3=[1];dg3=[1 8];g3=tf(ng3,dg3);
>> ng4=[1];dg4=[1];g4=tf(ng4,dg4);
>> ng5=[7];dg5=[1 3];g5=tf(ng5,dg5);
>> ng6=[1];dg6=[1 7 5];g6=tf(ng6,dg5);
>> ng7=[-5];dg7=[1 5];g7=tf(ng7,dg7);
Bode Plot for Problem 1:
2. Why plotting the curves right down to zero frequency because of the logarithmic
frequency (log0 = -infinity), does not create a serious problem?
Expanding the low frequencies range by the use of logarithmic scale of frequency is highly
advantages so, the characteristic of amplifiers can be easily explained on low frequencies.
Although it is not possible to curves right down to zerofrequency because of logarithmic
frequency (log 0 = -infinity). But this does not create a serious problem.
Feedback and Control Systems – Dennis [Link] 11