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

EEE325 – Control Systems

Lab # 10
Design of Proportional Controller and Lead/Lag Compensator
using Root Locus and Bode Plot Methods on MATLAB
Names UBAID UR REHMAN

Registration Number FA18-BEE-121

Class FA18-BEE-E

Instructor’s Name ABU BAKAR TALHA JALIL


LAB#8: Design of Proportional Controller and Lead/Lag
Compensator using Root Locus and Bode Plot Methods on
MATLAB
OBJECTIVES
To Design Root-Locus of a System
To Design the Bode-plot of a System
To Design the Proportional Controller and Lead-Lag Compensators
METHODOLOGY
The Root Locus method, as the name suggests, looks at the loci of the roots as some
parameter of interest, within the system, is varied. Since we already know that the position of
the roots of the characteristic equation strongly influence the step response of the system, we
can find values of the parameter which will position the roots appropriately, using the method
of Root Locus. MATLAB provides us with 𝑟𝑙𝑜𝑐𝑢𝑠 command to compute and display root
locus of any system. The syntax of this command is as follows >>𝑟𝑙𝑜𝑐𝑢𝑠(𝑛𝑢𝑚, 𝑑𝑒𝑛) Here
𝑛𝑢𝑚 is array of open-loop numerator coefficients and den is array of open-loop denominator
coefficients. Using this command, the root locus is plotted on the Figure window as shown in
Figure 10.2. The gain vector K is automatically determined and contains all the gain values
for which the closed-loop poles are to be computed. However, we can define vector K as per
our own will and provide it to 𝑟𝑙𝑜𝑐𝑢𝑠 command as >>𝑟𝑙𝑜𝑐𝑢𝑠 (𝑛𝑢𝑚, 𝑑𝑒𝑛,𝐾) If this command
is invoked with left-hand arguments, like [𝑟, 𝑘] = 𝑟𝑙𝑜𝑐𝑢𝑠(𝑛𝑢𝑚, 𝑑𝑒𝑛) [𝑟, 𝑘] = 𝑟𝑙𝑜𝑐𝑢𝑠(𝑛𝑢𝑚,
𝑑𝑒𝑛, 𝑘) [𝑟, 𝑘] = 𝑟𝑙𝑜𝑐𝑢𝑠(𝑠𝑦𝑠) the command window will show the matrix r and gain vector K.
The columns of matrix r are equal to length of K and its rows are den 1, containing the
complex root locations. Each row of the matrix corresponds to a gain from vector K. We can
then plot the loci by using the plot commands, lines of constant damping ratio are radial lines
passing through the origin as shown in Figure 4.3. For example, a damping ratio of 0.5
requires that the complex poles lie on the lines drawn through the origin making angles of ±
60ᵒ with negative real axis. If the real part of a pair of complex poles is positive, which means
that the system is unstable, the corresponding ζ is negative. The damping ratio determines the
angular location of the poles, while the distance of the pole from the origin is determined by
the un-damped natural frequency in. The constant ωn loci are circles.
LAB TASK
Lab Task 1
Design a feed-back controller for the system by using the root locus method and our design
criteria are 5% overshoot and 1 second rise time.

MATLAB code
clc
clear all
close alL
num = [1 7];
den = [1 40 475 1500 0];
Tf1 = tf(num , den)
rlocus(Tf1) %plotting rootlocus
axis([-10 10 -10 10])
sgrid(0.7,3.3) % mentioning zeta and wn on the graph
[k , poles] = rlocfind(Tf1); % selecting appropriate gain
constant k on the %graph so that to verify thr criterior
tf2 = series(k , Tf1);
Tf3 = feedback(tf2 , 1)
step(Tf3)
stepinfo(Tf3)
RESULT
COMMENTS
The lab tasks were to design a feedback controller given the design specification through the root locus
method. Corresponding zeta and wn values were mentioned on the root locus graph to select some
optimum value of gain constant k. after that step response were plotted to verify if our system meets the
design criterion.

POST LAB TASK

MATLAB CODE
clc
clear all
close all

num = [1];
den = [1 8 15 0];
Tf1 = tf(num , den)

rlocus(Tf1) %plotting rootlocus


axis([-10 10 -10 10])
sgrid(0.51,4.1) % mentioning zeta and wn on the graph
[k , poles] = rlocfind(Tf1); % selecting appropriate gain
constant k on thr graph so that to verify thr criterior
figure
tf2 = series(k , Tf1);
Tf3 = feedback(tf2 , 1)
step(Tf3)
stepinfo(Tf3)
RESULTS

COMMENTS
The lab tasks were to design a feedback controller given the design specification through the root locus
method. Corresponding zeta and wn values were mentioned on the root locus graph to select some
optimum value of gain constant k. after that step response were plotted to verify if our system meets the
design criterion.

TASK 2
MATLAB CODE
clc
clear all
close all
%LAB 4
%Post Lab 2
%Transfer Function for a Field controlled DC Motor speed and
position
%respectivly

ess = 0.1.*10^-3; % Calculation for K


A = 1.*10^-3;
K = A/ess;
% Motor Speed TF
Tf = 0.1; % field Time constant
Tl = 0.2; %Motor plus load time constant
num = [K];
den = [Tf.*Tl (Tf+Tl) 1];
TF = tf(num , den)
% Ramp signal Generation
t=0:0.1:6;
Signal = A;
ramp = Signal *t; % Your input signal
plot(t , ramp)
figure
[y,t]=lsim(TF,ramp,t);
plot(t,y)
axis([0 10 0 0.5])
l = lsiminfo(y , t)
figure
rlocus(TF)
sgrid([5 , 6] , [5 , 5.5 , 6])

[k1 , poles] = rlocfind(TF)


RESULT

COMMENTS
System’s transfer function was found using control theory. A feedback controller was
designed with respect to requirement of the task using root locus method. The content under
this task is the process which was followed.

CONCLUSION
This lab helped us understand root locus theory. It described how root locus should be used to
determine an optimum value of gain constant. Selecting an optimum value gain constant is
important as it determines properties, stability and poles of the system

You might also like