SSLEXP4
SSLEXP4
Student Name
Roll Number
Grade and Subject
Teacher’s Signature
Bode plot is the representation of the magnitude and phase of G(j*w) (where the frequency
vector w contains only positive frequencies). To see the Bode plot of a transfer function, you
can use the Matlab bode command. For example,
bode(50,[1 9 30 40])
displays the Bode plots for the transfer function:
P age |1
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 for making 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).
P age |2
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).
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. Let's check
it out: margin(50,[1 9 30 40])
P age |3
Basics of Root Locus
Root locus plot of dynamic system
Syntax
rlocus(sys)
rlocus(sys1,sys2,...)
[r,k] = rlocus(sys)
r = rlocus(sys,k)
Description
Rlocus computes the root locus of a SISO open-loop model. The root locus gives the closed-
loop pole trajectories as a function of the feedback gain k (assuming negative feedback).
Root loci are used to study the effects of varying feedback gains on closed-loop pole
locations. In turn, these locations provide indirect information on the time and frequency
responses.
rlocus (sys) calculates and plots the root locus of the open-loop SISO model sys. This
function can be applied to any of the following negative feedback loops by
setting sys appropriately.
P age |4
rlocus(sys1,sys2,...) draws the root loci of multiple LTI models sys1, sys2,... on a single plot.
You can specify a color, line style, and marker for each model, as in
rlocus(sys1,'r',sys2,'y:',sys3,'gx').
[r,k] = rlocus(sys) and r = rlocus(sys,k) return the vector k of selected gains and the complex
root locations r for these gains. The matrix r has length(k) columns and its jth column lists
the closed-loop roots for the gain k(j).
Examples
Root Locus Plot of Dynamic System
Plot the root-locus of the following system.
You can use the right-click menu for rlocus to add grid lines, zoom in or out, and invoke the
Property Editor to customize the plot. Also, click anywhere on the curve to activate a data
marker that displays the gain value, pole, damping, overshoot, and frequency at the selected
point.
ALGORITHM:
P age |5
parameters.
FLOWCHART:
clc; clc;
clear all; clear all;
close all; close all;
s=tf('s'); …declaration of function variable s=tf('s'); …declaration of function
variable
h= tf ([100 300],[1 6 5]);
g= tf ([10],[0.04 0.5 1 0]); h= tf ([100 300],[1 6 5]);
i= tf ([30],[0.4505 1.38 1 0]); T.F.’s g= tf ([10],[0.04 0.5 1 0]);
j= tf ([2],[0.2 1.2 1 0]); i= tf ([30],[0.4505 1.38 1 0]); T.F.’s
j= tf ([2],[0.2 1.2 1 0]);
subplot(2,2,1)
bode(h); bode plot for T.F. 1 subplot(2,2,1) Root Locus of T.F. 1
margin(h) rlocus(tf1);
grid on
subplot(2,2,2) Root Locus of T.F. 2
subplot(2,2,2) rlocus(tf2);
bode(tf2) bode plot for T.F. 2
margin(tf2) subplot(2,2,3) Root Locus of T.F. 3
grid on rlocus(tf3);
subplot(2,2,4)
bode(tf4) bode plot for T.F. 4
P age |6
margin(tf4)
grid on
ROOT LOCUS
P age |7
CONCLUSION:
P age |8
P age |9