Control System
Control System
MANAGEMENT
YELAHANKA – BANGALORE - 64
DEPARTMENT OF ELECTRONICS AND COMMUNICATION
ENGINEERING
CONTROL SYSTEM
AAT-2
BY
P V SAI ESHWAR-1BY22EC067
VISHNU A SHARMA-1BY22EC124
VISHNU RAJU B-1BY22EC125
CODE: clc
clear all
close all
num1=[1]
den1=[1 0 4]
sys1=tf(num1, den1)
num2=[0 0 6]
den2=[0 1 0]
sys2=tf(num2, den2)
num3=[0 0 3]
den3=[0 1 2]
sys3=tf(num3, den3)
res2=series(sys3,res1)
num4=[0 0 1]
den4=[0 1 1]
sys4=tf(num4, den4)
res1=feedback(res2, sys4)
RESULT:
num1 =
den1 =
1 0 4
sys1 =
1
-------
s^2 + 4
num2 =
0 0 6
den2 =
0 1 0
sys2 =
6
-
s
res1 =
6 s^2 + 24
-------------
s^3 + 4 s - 6
num3 =
0 0 3
den3 =
0 1 2
sys3 =
3
-----
s + 2
res2 =
18 s^2 + 72
------------------------------
s^4 + 2 s^3 + 4 s^2 + 2 s - 12
num4 =
0 0 1
den4 =
0 1 1
sys4 =
1
-----
s + 1
res1 =
18 s^3 + 18 s^2 + 72 s + 72
----------------------------------------
s^5 + 3 s^4 + 6 s^3 + 24 s^2 - 10 s + 60
PROBLEM NO:2
Determine rise time, peak time, peak overshoot and settling time
for the given transfer function.
CODE: clc;
clear all;
close all;
num=input('enter the numerator coefficients');
den=input('enter the denominator coefficients');
system=tf(num,den);
system
step(system)
grid on;
wn=sqrt(den(1,3));
zeta= den(1,2)/(2*wn);
wd=wn*sqrt(1-zeta^2);
disp('Delay time in seconds is')
td=(1+0.7*zeta)/wd
disp('Rise time in seconds is')
theta=atan(sqrt(1-zeta^2)/zeta);
tr=(pi-theta)/wd disp('Peak time in seconds');
tp=pi/wd disp('Peak overshoot is');
mp=exp(-zeta*pi/sqrt(1-zeta^2))*100
disp('settling time in seconds is');
ts=4/(zeta*wn)
RESULT:
enter the numerator coefficients
[100]
enter the denominator coefficients
[1 12 100]
system =
100
----------------
s^2 + 12 s + 100
td =
0.1775
tr =
0.2768
tp =
0.3927
Peak overshoot is
mp =
9.4780
ts =
0.6667
PROBLEM NO:3
Determination of frequency response of a second order System
THEORY:
a)Unit step and Unit ramp response of a closed loop control system
using direct method
CODE: clc
close all
clear all
num=[0 0 4]
den=[1 5 4]
t=0:0.005:2;
r=t;
c1=step(num,den,t);
c2=lsim(num,den,r,t);
subplot(2,1,1)
plot(t,c1)
title('Unit Step response')
xlabel('t in secs')
ylabel('c1(t)');
subplot(2,1,2)
plot(t,c2)
title('Unit Ramp response')
xlabel('t in secs')
ylabel('c2(t)');
RESULT:
b)Unit step and Unit ramp response of a closed loop control system
using Inverse Laplace transform command.
CODE: clc
close all
clear all
syms s
complex t=0:0.005:2;
R1=1/s;
T=4/(s^2+5*s+4);
C1=R1*T;
c1=ilaplace(C1)
x1=exp(-4*t)/3 - (4*exp(-t))/3 + 1;
R2=1/s^2; T=4/(s^2+5*s+4);
C2=R2*T;
c2=ilaplace(C2)
x2=t + (4*exp(-t))/3 - exp(-4*t)/12 - 5/4;
subplot(2,1,1)
plot(t,x1)
title('Unit Step response')
xlabel('t in secs')
ylabel('c1(t)');
subplot(2,1,2)
plot(t,x2)
title('Unit Ramp response')
xlabel('t in secs')
ylabel('c2(t)')
RESULT: c1 =
exp(-4*t)/3 - (4*exp(-t))/3 + 1
c2 =
CODE:
a)Given Transfer fuction : 36 / (s3+6s2+11s+6) .
Program :
num = [36];
den = [1 6 11 6];
sys = tf (num , den)
bode (sys)
margin(sys)
RESULT: sys =
36
----------------------
s^3 + 6 s^2 + 11 s + 6