Control Lab Exp 5
Control Lab Exp 5
: EEE 402
Course Title: Control System Laboratory
Group No.:02
Experiment no:05
Name of the Experiment:
Date of
Performance:12/0
4/2016
Date of
Submission:26/04/
2016
Objective:
The objective of this experiment was to design a DC Motor position controller using Root
Locus Method considering disturbance in the system and reduce the effect of the
disturbance to zero.
Root Locus:
The root locus of an (open loop) transfer H ( s ) function is a plot of the locations (locus)
of all possible closed loop poles with
proportional gain k and unity feedback:
and we say that has zeros at infinity. In that case, the limit of as s tends to infinity, is
zero.
Design requirements:
If simulation was done with the reference r (t ) input by a unit step input, then the motor
speed output should have
Settling time less than 40 milliseconds
Overshoot less than 16%
No steady state error
No steady state error due to a disturbance
Motor Parameters:
1.
2.
3.
4.
5.
6.
7.
8.
Matlab code:
clc;
clear all;
close all;
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
num=K;
den=[(J*L) (J*R)+(L*b) (b*R+K^2) 0];
step(num,den,0:0.001:0.2)
Outputs:
Matlab code:
clc;
clear all;
close all;
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
num=K;
den=[(J*L) (J*R)+(L*b) (b*R+K^2) 0];
sys=tf(num,den);
figure;step(sys,0:.001:0.3);
grid on;
title('stop response for open loop system');
xlabel('Time')
ylabel('Position')
kp=1.7;
closed_sys=feedback(sys*kp,1);
figure;step(closed_sys,0:.001:0.2);
grid on;
title('step response for Kp = 1.7');
xlabel('Time');
ylabel('position');
%%Disturbance response
dist_sys = closed_sys/kp;
figure;step(dist_sys,0:.001:0.2);
grid on;
%%RootLocus
figure;rlocus(sys);
sgrid(0.5,0);
axis([-400 100 -200 200]);
title('Root locus - P controller');
%%Integral Control
numcf = [1];
dencf=[1 0];
controller=tf(numcf,dencf);
I_sys=controller*sys;
figure;rlocus(I_sys);
sgrid(0.5,0);
axis([-400 100 -200 200]);
title('Root locus - I controller');
Outputs:
Step response for Kp=1.7
Step response:
I_sys=controller*sys;
figure;rlocus(I_sys);
sgrid(0.5,0);
axis([-400 100 -200 200]);
title('Root locus - P+I controller');
Output:
Outputs:
Appendix:
Matlab Code:
clc;
clear all;
close all;
J=3.2284E-6;
b=3.5077E-6;
K=0.0274;
R=4;
L=2.75E-6;
num=K;
den=[(J*L) (J*R)+(L*b) (b*R+K^2) 0];
sys = tf(num,den);
numcf = conv([1 60],[1 70]);
dencf = [1 0];
controller = tf(numcf,dencf);
PID_sys = controller*sys;
rlocus(PID_sys,0:.001:1);
sgrid(.5,0);
axis([-400 100 -200 200]);
[k poles] = rlocfind(PID_sys);
feedbk_sys = feedback(k*PID_sys,1);
figure;
step(feedbk_sys,0:.001:1);
figure;
dis_sys = feedbk_sys/(k*controller);
step(dis_sys,0:.001:1);
Outputs:
Class task:
Root Locus with poles (-8) and zeros(-1, -5)