You are on page 1of 10

EEE-Control Systems

Lab #10

Design of Proportional Controller and Lead/Lag Compensator using Root


Locus and Bode Plot Methods on MATLAB

Name Muhammad Afzaal

Registration Number FA18-BEE-093

Class FA18-BSEE-E

Instructor’s Name Sir Abubakar Talha Jalil


Lab #10: 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

Requirements
Software

 MATLAB

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.
 In this Lab we implement the root locus on MATLAB by using command and check the
stability of the system also implemented the Bode Plot Then Find the Gain Margin and
Phase Margin from Bode Plot.
 We also design the lead and lag compensators by using the commands in Matlab.

Conclusion
In this lab we know about the root locus. Root Locus assisted with checking the stability of
various system. In control system, stability of a system is the principle concern and with the
assistance of root locus the stability of system can be seen at various estimations of gain. Lab
assignments likewise incorporates the bode plots of various systems. With the help of bode plot
least changes can undoubtedly be recognized and noticed.
In-Lab Tasks
Task-1: Design Using Root Locus
Consider an open-loop system which has a transfer function of T(s)= Y(s)R(s)=
K(s+7)s(s+5)(s+15)(s+20).
We want to 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.
Design a controller in MATLAB which meets the given criteria. Attach Matlab Code and Results
MATLAB Code
clc
clearall
closeall
num=[1 7];
den=[1 40 475 1500 0];
sys=tf(num,den);
rlocus(num,den);
axis([-10 10 -10 10]);
sgrid(0.7,3.29);
[k,poles]=rlocfind(num,den)
sys2=k;
sys3=series(sys2,sys)
sys4=feedback(sys3,1);
step(sys4)
stepinfo(sys4)
Results
(Root locus of given system)
(Step Response and Parameters of System at K=559.2349)

In root locus, we examine system’s stability against all possible values of K. No matter what we
pick K to be, the closed-loop system must always have n poles, where n is the number of poles of
open-loop transfer function, (𝑠)(𝑠). The root locus must have n branches; each branch starts at a
pole of (𝑠)(𝑠) and goes to a zero of 𝐺(𝑠)𝐻(𝑠). Since the root locus is actually the locations of all
possible closed-loop poles, from the root locus we can select a gain such that our closed-loop
system will perform the way we want. If any of the selected poles is on the right half plane, the
closed-loop system will be unstable. The poles that are closest to the imaginary axis have the
greatest influence on the closed-loop response, so even though the system has three or four poles,
it may still act like a second or even first order system depending on the location(s) of the
dominant pole(s).

Post Lab Tasks

Task-1:

Given is a plant described by the transfer function


1
Gp(s) =
s(s + 3)(s + 5)
For this plant a controller must be designed, such that the step response of the closed loop shows
the following properties:
P.O=16% and tr,50 = 0.6s

Matlab code
clc
clearall
closeall
num=[1]
den=[1 8 15 0]
rlocus(num,den)
axis([-2 2 -2 2])
sgrid(0.45,6)
[k,poles]=rlocfind(num,den)
num1=[k]
den1=[1 8 15 0]
tf1=tf(num1,den1)
sys=feedback(tf1,1)
step(sys)
stepinfo(sys)

Results:
Root Locus is actually the locations of all possible closed-loop poles.

(Root Locus of the system)

Step Response of the system is shown which shows the behavior of system in the form input and
output relationship as a transfer function
(Unit Step Response of the system)

Fig.5 (System Properties)

Task-2:

Matlab code:
clc
clearall
closeall
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)

Results

(System Properties)
(Ram Input)

(Root Locus)

System has been designed to meet the criteria of steady-state error and good response we select
motor with constant zeta=0.1s and motor plus load time constant zeta2=0.2s. desired value of K
was selected to meet the criteria of problem.

You might also like