Professional Documents
Culture Documents
EEE318 Experiment 5
EEE318 Experiment 5
EEE318 Experiment 5
Experiment 5
PID Controller Design using Root Locus Method.
Submitted by-
Abdullah Jubair Bin Iqbal
Roll: 1706058
EEE A2
Level: 3, Term: 2
Compensator Transfer Improvement
0 Root Locus Method of Function
Controller Design PI 𝐾
𝑠 + 𝑍𝑐 Steady State
𝑠
The root locus indicates the achievable Error
Lag 𝑠 + 𝑧𝑐 Steady State
closed-loop pole locations of a system as a 𝐾
𝑠 + 𝑝𝑐
parameter (usually, the controller gain) Error
PD 𝐾(𝑠 + 𝑧𝑐 ) Transient
varies from zero to infinity. For a given plant
Lead 𝑠 + 𝑧𝑐 Transient
it may or may not be possible to implement 𝐾
𝑠 + 𝑝𝑐
a simple proportional control (i.e., select a PID 𝐾
(𝑠 + 𝑧𝑙𝑎𝑔 )(𝑠 + 𝑧𝑙𝑒𝑎𝑑 ) Both
𝑠
gain that specifies closed-loop locations along Lag-lead (𝑠 + 𝑧𝑙𝑎𝑔 )(𝑠 + 𝑧𝑙𝑒𝑎𝑑 ) Both
𝐾
the root locus) to achieve the specified (𝑠 + 𝑝𝑙𝑎𝑔 )(𝑠 + 𝑝𝑙𝑒𝑎𝑑 )
performance constraints. In fact, in most
cases it will not be possible. 1 Lab work 1
In this experiment we obtain the step
response of the following system with a
particular gain corresponding to the damping
ratio of 0.174. Then we use a PI controller to
reduce the SS error to 0.
So, 𝜎 = −1.2043.
4
We know, 𝑇𝑠 =
𝜎
6 Lab Work 6
In this task, we’ve designed a Lead
compensator to meet the specifications:
settling time: 2s and Overshoot: 30% for the
system described below
𝐾
𝐺(𝑠) =
𝑠(𝑠 + 3)(𝑠 + 6)
Here, we can clearly see that for the 6.2 Lead Compensated System
compensated system, the settling time has We’ve implemented the following Lead
halved and the overshoot remained constant. Compensator to reduce the settling time by
a factor of two.
𝐶(𝑠) =
𝑠+5 7 Lab Work 7
𝑠 + 5.602
In this task, we’ve chosen the following Lead
compensator and integrated a PI Controller
to meet the specification of zero steady state
error:
𝑠+5
𝐶(𝑠) =
𝑠 + 5.602
7.1 PI Compensation
We’ve implemented the following PI
Compensator to reduce the steady state error
to 0.
𝑠+1
After adding the compensator, we obtain the 𝐶(𝑠) =
𝑠
root locus as shown above. Here, we again
choose a point that corresponds to the 30%
overshoot requirement and then obtain the
according step response.
Uncompensated Compensated
% OS 19.0583 20.0119
𝑇𝑠 4.0952 2.0529
𝑒𝑠𝑡𝑒𝑝 (∞) 2.0428 × 10−7 3.7842 × 10−14
𝑒𝑟𝑎𝑚𝑝 (∞) 0.5839 0.3982
𝐾 31.37 180.61
From the step response it is evident that the
steady state error has reached zero.
8 Lab Work 8
For this part, we chose two additional zeros
at −0.8 and −0.6.
clc; s = tf('s');
close all; sys = 1/(s*(s+3)*(s+6));
clear all; lead_compensator = (s-
new_zero)/(s-new_pole);
T = 0:0.01:15; lead_sys =
sys*lead_compensator;
OS = 0.20;
zeta = - % Uncompensated
log(OS)/sqrt(pi^2+(log(OS))^2) figure(1)
; rlocus(sys);
theta = rad2deg(acos(-zeta)); sgrid(zeta,50);
Ts = 2; %desired Ts axis([-15 5 -6 6])
[k_sys , poles_sys] =
% Desired point to find Ts = 2; rlocfind(sys);
sigma = -4/Ts; set(findall(gcf,'type','line')
wn = ,'linewidth',1.3);
sigma*tan(deg2rad(theta)); title('Root Locus for
s = sigma + j*wn; uncompensated system',
'Interpreter', 'Latex',
% Designing lead compensator 'Fontsize', 16);
new_zero = -5;
axIm = feedbk_sys =
findall(gcf,'String','Imaginar feedback(k_sys*sys,1);
y Axis (seconds^{-1})'); feedbk_lead_sys =
axRe = feedback(k_lead_sys*lead_sys,1
findall(gcf,'String','Real );
Axis (seconds^{-1})');
set(axIm,'String','Imaginary figure(3);
Axis', 'Interpreter', 'Latex', [y_sys,T] =
'Fontsize', 15); step(feedbk_sys,T); %step
set(axRe,'String','Real Axis', response of the uncompensated
'Interpreter', 'Latex', system.
'Fontsize', 15); [y_lead_sys,T] =
step(feedbk_lead_sys,T);
% Compensated plot(T,y_lead_sys,'DisplayName
figure(2) ',sprintf('Lead
rlocus(lead_sys); compensated'));
sgrid(zeta,50); hold on;
axis([-15 5 -6 6]) plot(T,y_sys,'DisplayName',spr
[k_lead_sys , poles_lead_sys] intf('Uncompensated'));
= rlocfind(lead_sys); xlim([0,T(end)]);
set(findall(gcf,'type','line') grid on;
,'linewidth',1.3); xlabel('t(s)');
title('Root Locus for ylabel('Amplitude');
compensated system', legend;
'Interpreter', 'Latex', title('Step response for Lead
'Fontsize', 16); compensated and
axIm = uncompensated');
findall(gcf,'String','Imaginar
y Axis (seconds^{-1})'); stepinfo(feedbk_sys)
axRe = stepinfo(feedbk_lead_sys)
findall(gcf,'String','Real
Axis (seconds^{-1})'); % Plot Ramp response
set(axIm,'String','Imaginary u = T; % input ramp signal
Axis', 'Interpreter', 'Latex',
'Fontsize', 15); e_ss_step_uncompensated = 1 -
set(axRe,'String','Real Axis', y_sys(end)
'Interpreter', 'Latex', e_ss_step_compensated = 1 -
'Fontsize', 15); y_lead_sys(end)
figure(1)
rlocus(sys);