Spice project
Description
Unformatted Attachment Preview
PROJECT-2
Root Locus
In this project, you will learn how to use MATLAB to sketch the Root Locus of a
system and find the critical points.
I.
Sketching the Root Locus
First, you need to find the loop transfer function ??(??)??(??). The coefficients of the
numerator and denominator of the loop transfer function must be stored in the
vectors µm!nd %n respectively. You can then define the loop transfer function
by using &&unction in MATLAB.
As an example, suppose that num=[1 -2 7] and den=poly([-3 -5]). Then the
transfer function can be defined as GH=tf(num,den).
Remark: Pleases note that you can either define the numerator and the denominator
directly by their coefficients (like the numerator in the example above) or by their
roots (like the denominator in the example above where the roots are -3 and -5).
After defining the loop transfer function, you can easily plot the root-locus by
executing rlocus(tf,K), where K is a vector containing the values of the gain from
zero up to a large number. In general, we do not have to define the vector K. The
function generates K automatically if we just use rlocus(tf). In case if the
resolution of the plot is not enough, you can define K with smaller steps.
II.
Generating the Grid of Constant Damping Ratios
To find the value of the natural frequency for a given damping ratio, we can use the
Data Cursor on the plot window and find the gain, damping ratio, percent overshoot
and natural frequency of each pole on the root locus. Fig. 1 shows the root locus of the
loop transfer function given in the previous section.
To visualize the locations of the damping ratios on the plot, we can draw the grid of
constant damping ratios by using the function sgrid. We need to define vectors for
the damping ratios and the natural frequencies separately and feed them into sgrid.
1
The entire MATLAB code for the above root locus is given as follows:
clear;
clc;
close all;
num = [1 -2 7];
den = poly([-3 -5]);
% The Numerator
% The Denominator
GH = tf(num,den);
K = [0:0.0001:30, Inf];
rlocus(GH,K);
% The Loop Transfer Function
% The Gain Vector
z=0.2:0.1:0.9;
wn=0:2:26;
sgrid(z,wn)
% Define damping ratio values: 0.2 to 0.5 in steps of 0.05
% Define natural frequency values: 0 to 10 in steps of 1
Fig. 1: The root locus of the loop transfer function given in Section I.
2
II. Questions
1. Consider the system of Fig. 2:
Use MATLAB to sketch the Root Locus when:
(a) ?? (??) =
(b) ?? (?? ) =
!(#$%)(# ! $’)
(#$()(#)*)
!(#$()
(# ! $+)(#)+)(#$*)
2. For the system of Fig.2., assume:
?? (??) =
??
??(?? + 5)(?? + 8)
(a) Calculate the following points by hand:
–
j?? axis crossings and the corresponding gain.
Real axis breakaway point.
Real axis intercept for the asymptotes.
The angle of the asymptotes.
(b) Draw a rough sketch of the root locus using the above points by hand.
(c) Use MATLAB to plot an accurate sketch of the root locus. Use the cursor to
show the above points on the sketch. (Take snapshots and include them in your
project).
(d) Use the cursor to find:
– The value of K and the closed loop poles that have a damping ratio of 0.401.
(Take snapshots and include them in your project).
– The value of K and the closed loop poles that have a damping ratio of 0.602.
(Take snapshots and include them in your project).
3
3.
Consider the system of Fig. 3:
(a) Calculate the following points by hand:
– j?? axis crossings and the corresponding gain.
– The range of K to keep the system stable.
– Real axis breakaway and break-in points.
(b) Use MATLAB to plot an accurate sketch of the root locus. Use the cursor to
show the above points on the sketch. (Take snapshots and include them in your
project).
(c) Use the cursor to find the value of K that yields a stable system with critically
damped second order poles. (Take snapshots and include them in your project).
4
Purchase answer to see full
attachment
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."