You are on page 1of 9

Center for Advanced Studies in Engineering, Islamabad

Control Systems Lab

Experiment # 13: Control System Analysis by Frequency Response


Method Using MATLAB

Name of Student: …………………………………………………….

Roll No.: ……………………………………………………………….

Date of Experiment: ………………………………………………….

Report submitted on: ………………………………………………..

Marks obtained: ……………………………………

Remarks: ……………………………………………

Instructor’s Signature: ……………………………...

Fall 2018-Semester V
CASE

Experiment # 13
Control System Analysis by Frequency Response Method
Using MATLAB

Objectives
1. Study the closed loop stability by frequency response method
2. Study frequency response analysis using bode and nyquist plot
3. Study the stability margins using gain and phase margins

Frequency Response Method


By 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. The information we get from such analysis is different
from what we get from root-locus analysis. In fact, the frequency response and root-locus
approaches complement each other. One advantage of the frequency-response approach is that
we can use the data obtained from measurements on the physical system without deriving its
mathematical model. In many practical designs of control systems both approaches are
employed. Control engineers must be familiar with both.
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.

Types of Frequency Response Analysis Approaches


The sinusoidal transfer function, a complex function of the frequency v, is characterized by its
magnitude and phase angle, with frequency as the parameter. There are three commonly used
representations of sinusoidal transfer functions:
1. Bode diagram or logarithmic plot
2. Nyquist plot or polar plot
3. Log-magnitude-versus-phase plot (Nichols plots)

1. Bode Diagrams
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.
The standard representation of the logarithmic magnitude of G(jω) is 20 log |G(jω)|, where the
base of the logarithm is 10.The unit used in this representation of the magnitude is the decibel,
usually abbreviated dB. Expanding the low-frequency range by use of a logarithmic scale for the
frequency is highly advantageous, since characteristics at low frequencies are most important in
practical systems. Although it is not possible to plot the curves right down to zero frequency
because of the logarithmic frequency (log (0) =–ꝏ), this does not create a serious problem.
Note that the experimental determination of a transfer function can be made simple if frequency-
response data are presented in the form of a Bode diagram.

Control Systems Lab 2


CASE

The magnitude of the open loop transfer function in dB is -


M=20log|G(jω)H(jω)|
The phase angle of the open loop transfer function in degrees is -
ϕ=∠G(jω)H(jω)

Plotting Bode Diagrams Using MATLAB


The command bode computes magnitudes and phase angles of the frequency response of
continuous-time, linear, time invariant systems.
num = [25];
den = [1 4 25];
bode(num,den)
title('Bode Diagram of G(s) = 25/(s^2 + 4s + 25)')

Figure-1: Bode Plot

Bode Plot Stability Margins


The majority of control system designs behave similarly with regard to stability. Most often, if
the gain exceeds a certain critical point, the system loses stability. Gain margin and phase margin
both measure a system’s stability margin and tell you how close the system is to oscillation
(instability).

Phase crossover frequency (wpc )


The phase crossover frequency, wpc , is the frequency where phase shift is equal to -180o.

Gain crossover frequency (wgc)


The gain crossover frequency, wgc, is the frequency where the amplittude ratio is 1, or when log
modulus is equal to 0 dB.

Control Systems Lab 3


CASE

Gain Margin
It is the gain which can be varied before the system becomes just stable(i.e, after varying the gain
up to a certain threshold, the system becomes marginally stable and then further variation of
gain leads to unstability). Gain Margin occurs at phase cross over frequency (phase crossover
frequency is the frequency at which the phase angle G(s)H(s) is -180 degrees)

Phase Margin
It is the phase that can be varied before the system becomes just stable (i.e, after varying the
phase up to a certain threshold, the system becomes marginally stable and then further variation
of phase leads to unstability). Phase margin occurs at gain crossover frequency (gain crossover
frequency is the frequency at which the magnitude of the G(s)H(s) is 1 or 0 dB).

Figure-2: Stability Margins

Stability conditions for Bode Plot


1. For Stable System: Both the margins should be positive or phase margin should be greater than
the gain margin.
2. For Marginal Stable System: Both the margins should be zero and phase margin should be
equal to the gain margin.
3. For Unstable System: If any of them is negative or phase margin should be less than the gain
margin.

Example-1
Plot bode diagrams and stability margins for a given system.
1
-------------------
s^3 + 2 s^2 + s

Control Systems Lab 4


CASE

2. Nyquist Plot
Nyquist plots are the continuation of polar plots (The Polar plot is a plot, which can be drawn
between the magnitude and the phase angle of by varying ω from zero to ꝏ.) for finding the
stability of the closed loop control systems by varying ω from −ꝏ to ꝏ. That means, Nyquist plots
are used to draw the complete frequency response of the open loop transfer function. Nyquist
plots, just like Bode diagrams, are commonly used in the frequency-response representation of
linear, time-invariant, feedback control systems. Nyquist plots are polar plots, while Bode
diagrams are rectangular plots.

Drawing Nyquist Plot Using MATLAB


The MATLAB command nyquist computes the frequency response for continuous time, linear,
time-invariant systems. When invoked without left-hand arguments, nyquist produces a Nyquist
plot on the screen.
Example-1
num = [1];
den = [1 0.8 1];
nyquist(num,den)
grid
title('Nyquist Plot of G(s) = 1/(s^2 + 0.8s + 1)')

Nyquist Stability Criterion


The Nyquist stability criterion determines the stability of a closed-loop system from its open-loop
frequency response and open-loop poles. The closed-loop system and transfer function is,

For stability, all roots of the characteristic equation must lie in the left-half s plane. The Nyquist
stability criterion relates the open-loop frequency response to the number of zeros and poles of
1+G(s)H(s) that lie in the right-half s plane. This criterion, derived by H. Nyquist, is useful in control
engineering because the absolute stability of the closed-loop system can be determined
graphically from open-loop frequency-response curves, and there is no need for actually
determining the closed-loop poles. The Nyquist stability criterion is based on a theorem from the
theory of complex variables. To understand the criterion, we shall first discuss mappings of
contours in the complex plane.

Control Systems Lab 5


CASE

Mapping Theorem
Let F(s) be a ratio of two polynomials in s. Let P be the number of poles and Z be the number of
zeros of F(s) that lie inside some closed contour in the s plane, with multiplicity of poles and zeros
accounted for. Let the contour be such that it does not pass through any poles or zeros of F(s).This
closed contour in the s plane is then mapped into the F(s) plane as a closed curve.The total
number N of clockwise encirclements of the origin of the F(s) plane, as a representative point s
traces out the entire contour in the clockwise direction, is equal to Z-P. (Note that by this mapping
theorem, the numbers of zeros and of poles cannot be found—only their difference.)

Figure-3: Closed contours in the s plane and their corresponding closed curves in the F(s)
plane, where (F(s)=(s+1)/(s-1)).

Control Systems Lab 6


CASE

Application of the Mapping Theorem to the Stability Analysis of Closed-Loop Systems


For analyzing the stability of linear control systems, we let the closed contour in the s plane
enclose the entire right-half s plane.The contour consists of the entire jw axis from w=–ꝏ to +ꝏ
and a semicircular path of infinite radius in the right-half s plane. Such a contour is called the
Nyquist path.

Figure-4: Nyquist Contour


This criterion can be expressed as
Z= P-Z
Where
Z=number of zeros of 1+G(s)H(s) in the right-half s plane
N=number of counter clockwise encirclements of the –1+j0 point
P=number of poles of G(s)H(s) in the right-half s plane

Example-1
Plot nyquist plot and determine the number of poles that lie in the right half plane for closed loop
transfer function and comment on stability for given system.
1
(a) G(s)=-------
s-2
5
(b) G(s)=-------
s-2

Control Systems Lab 7


CASE

Labs Rubrics
Control System
Lab # 13
Control System Analysis by Frequency Response Method
Using MATLAB
Lab #13: Marks distribution
Criteria ER1 ER4 ER7 ER9 RR2
Marks

Lab #13: Marks obtained


Criteria ER1 ER4 ER7 ER9 RR2 Total
Marks

Lab Evaluation Rubrics


# Qualities & Criteria 0 < Poor <=40 40< Satisfactory <= 70 70 < Good <= 90 90< Excellent <=100
No Tasks were Some tasks were Few tasks were left All tasks completed in
completed/ completed. Could not to be completed. due time. All goals
ER1 Task Completion minimal effort justify the reasons for Provided acceptable achieved.
shown uncompleted tasks and justification for the
goals. uncompleted tasks
and goals.
ER4 System model/ None of the Incomplete diagrams Diagrams without Correct Diagrams,
Mathematical model/ requirements are and partially correct labels and few properly labeled
Network model/ Block fulfilled/ labels/Circuit doesn’t details. showing all the
diagram/ Circuit Demonstrates incorporate required Construction is necessary details and
Diagram/ Simulation minimal or no components/ Blocks not fairly good / Input/Outputs/
Diagram understanding of connected correctly/ Chooses a Chooses an optimal
the connection Chooses a mathematical mathematical mathematical model
between model that applies to an model that applies that applies to an
mathematical engineering problem, to an engineering engineering problem,
models and but requires assistance problem, and has and develops new
engineering in model development. some success in models.
problems/ minimal model
effort shown development.
ER7 Code indentation, No indentation of Computationally Working code and Good structure,
optimization and code, no complex routine with good indentation or optimized code and
descriptive variable optimization and improper indentation structure, but not good variable names
name no descriptive and variable names optimized resulting and comments
variable names/ in unnecessary
minimal effort computations
shown

Control Systems Lab 8


CASE

ER9 Results and Plots Unable to produce Inaccurate plots and Correct plots Good presentation of
any plots or results results without any the correct plots with
/minimal efforts necessary proper labels,
shown identifying features captions & visibility
such as labels,
captions & visibility
RR2 Content/Information The report is not The report is objective The report is The report is
objective based based and for some part objective based and objective based and
and addresses the addresses the issues for most part addresses the issues
issues referred in referred in the addresses the referred in the
the proposed topic proposed topic with an issues referred in proposed topic with
poorly. The acceptable the proposed topic in depth analysis and
provided engineering/theoretical with an acceptable reasoning. The
information & analysis. The provided engineering/theore provided information
results is not information & results tical analysis and & results is necessary,
coherent rather for some parts is reasoning. The relevant and
irrelevant. Little necessary and sufficient provided sufficient to discuss
engineering/theore to discuss these issues information & these issues. The
tical analysis is results for most details are easily
presented part is necessary understood at peer
and sufficient to level.
discuss these issues

Control Systems Lab 9

You might also like