0% found this document useful (0 votes)
10 views

006_kalpana _CS_File[1]

This document outlines a series of control system experiments conducted using MATLAB, focusing on system responses to various inputs such as unit-step, unit-ramp, and unit-impulse. Each experiment includes MATLAB code, plots, and conclusions regarding system stability and behavior based on different damping ratios and system types. The document serves as a comprehensive lab report for control system analysis at Indira Gandhi Delhi Technical University for Women.

Uploaded by

kkalpanaa02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

006_kalpana _CS_File[1]

This document outlines a series of control system experiments conducted using MATLAB, focusing on system responses to various inputs such as unit-step, unit-ramp, and unit-impulse. Each experiment includes MATLAB code, plots, and conclusions regarding system stability and behavior based on different damping ratios and system types. The document serves as a comprehensive lab report for control system analysis at Indira Gandhi Delhi Technical University for Women.

Uploaded by

kkalpanaa02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

INDIRA GANDHI DELHI TECHNICAL

UNIVERSITY FOR WOMEN


DELHI-110006

CONTROL SYSTEM LAB

SUBMITTED TO: Dr. Pankaj Gupta


SUBMITTED BY: Kalpana
ENROLLMENT NO.: 00611182023
B.Tech ECE-AI 2 (3rd yr)
SEMESTER-5
INDEX

Sno Program Sign


1.
Where zeta= 0,0.2,0.4,0.6,0.8and 1.0
Write a MATLAB program using a “for loop” to
obtain the two-dimensional and three-
dimensional plots of the system output. The
input is the unit-step function.

Obtain the response of the given system


2. .

Obtain the response of the closed-loop system


3.

4.
5.

6.

7.

Consider the control system shown in figure .


8. Draw the root locus of the system

9.

10.

11.
12.

Using MATLAB, plot Bode diagrams for the


13. closed-loop system shown in figure for K=1,
K=10 and K=20. Plot three magnitude curves in
one diagram and three phase-angle curves in
another diagram.

14.

15.
Experiment -1

SOLUTION:
clc;
clear;
t = 0:0.2:12;
for n = 1:6
num = [0 0 1];
den = [1 2*(n-1)*0.2 1];
[y(1:61,n),x,t] = step(num,den,t);
end
plot(t,y);
grid
title('Unit-Step Response Curves')
xlabel('t Sec')
ylabel('Outputs')
gtext('\zeta = 0'),
gtext('0.2')
gtext('0.4')
gtext('0.6')
gtext('0.8')
gtext('1.0')

mesh(y)
title('Three-Dimensional Plot of unit-step response
curves using command "mesh(y)"')
xlabel('n, where n=1,2,3,4,5,6')
ylabel('Computation Time points')
zlabel('Outputs')

mesh(y')
title('Three-Dimensional Plot of unit step response
curves using command "mesh(y transpose)"')
xlabel('Computation Time points')
ylabel('n, where n=1,2,3,4,5,6')
zlabel('Outputs')
Conclusion:
For second order system the following cases arises:
1. When =0, then system is said to be undamped.
2. When =1,then system is a critically damped case.
3. When 0<<1, then system is underdamped.
 For unit step response, on increasing the value of  system will
turn out to be more stable.
Experiment 02
Obtain the response of the given system shown in figure for input r(t)

SOLUTION:
num=[0 0 2];
den=[1 1 2];
t=0:0.2:10;
r=0.5*t.^2;
y=lsim(num,den,r,t);
plot(t,r,'-',t,y,'o',t,y,'-')
grid
title('Unit acceleration Response')
xlabel('t Sec')
ylabel('Input and Output')
text(2.1,27.5,'Unit acceleration Input')
text(7.2,7.5,'Output')
Conclusion:
 The given system is type 1 system. Hence, the steady state error
for parabolic input is infinity.
 Therefore, the given system is unsteady for unit parabolic input.
Experiment 03

SOLUTION:

num=[0 0 5];
den=[1 1 5];
t=0:0.05:10;
r=2+t;
c=lsim(num,den,r,t);
plot(t,r,'-',t,c,'o')
grid
title('Response to input r(t) =2+t ')
xlabel('t Sec')
ylabel('Output c(t) and Input r(t) = 2+t ')
Conclusion:
 The given system is type 1 system.
 The steady state error for unit step input is finite i.e 0.2.
 Therefore, the given system is stable for unit step input.
Experiment 04

SOLUTION:
%-------Unit-Ramp Response -------- %
num = [0 0 1 10];
den = [1 6 9 10];
t = 0:0.1:10;
r=t;
y = lsim(num,den,r,t);
plot(t,r,'-',t,y,'o')
grid
title('Unit-Ramp Response by Use of Command "lsim"')
xlabel('t Sec')
ylabel('Output')
text(3.2,6.5,'Unit-Ramp Input')
text(6.0,3.1, 'Output')

Conclusion:
The given system is stable because steady state error is finite.
%--------Response to Input r1 = exp(-0.5t) --------- %

num = [0 0 1 10];
den = [1 6 9 10];
t = 0:0.1:12;
r1 = exp(-0.5*t);
y1 = lsim(num,den,r1,0);
plot(t,r1,'-',t,y1,'o')
grid
title('Response to Input r1 = exp(-0.5t)')
xlabel('t Sec')
ylabel('Input and Output')
text(1.4,0.75,'Input r1 exp(-0.5t)')
text(6.2,0.34,'Output')

Conclusion:
The given system is stable because steady state error is zero.
Experiment 05

SOLUTION:

a = [1 4 16 36];
b = [0.6 2 5.6 9.6];
t = 0:0.1:8;
y = zeros(81,4);
for i = 1:4
num = [0 0 a(i)];
den = [1 b(i) a(i)];
y(:,i) = step(num,den,t);
end

plot(t,y(:,1),'o',t,y(:,2),'x',t,y(:,3),'-
',t,y(:,4),'-.')
grid
title('Unit-Step Response Curves for Four Cases')
xlabel('T Sec')
ylabel('Outputs')
gtext('1')
gtext('2')
gtext('3')
gtext('4')
Conclusion:
 When n increases, rise time decreases. On increasing ωn , the
speed of the system improves and steady state is accomplished
quicker. Moreover, the oscillations and the amplitude of peak
overshoot in the system is inversely proportional to ζ(damping
factor).
 Case 1 has the minimum value of ωn and ζ -> its curve has
maximum amplitude of peak overshoot and maximum settling
time.
 In all other cases (2, 3 and 4), the values of ωn and ζ keeps on
increasing in each case. This reduces the oscillations and steady
state is achieved faster. Case 4 is the most stable of all cases.
Experiment 06

SOLUTION:
%-------Unit-Step Response ------ %
num = [0 10 4];
den = [1 4 4];
t = 0:0.02:10;
r=t>=0;
y = step(num,den,t);
subplot(2,1,1)
plot(t,r,'--',t,y)
grid on
title('Unit-Step Response')
xlabel('t (sec)')
ylabel('Unit-Step Input and Output')
text(1,0.8,'Unit-step Input')
text(2,2,'Output')

%-------Unit-Ramp Response ------ %


num1 = [0 0 10 4];
den1 = [1 4 4 0];
r1=t;
y1 = step(num1,den1,t);
subplot(2,1,2)
plot(t,r1,'--',t,y1)
grid on
title('Unit-Ramp Response')
xlabel('t (sec)')
ylabel('Unit-Ramp Input and Output')
text(7,5,'Unit-Ramp Input')
text(4,9,'Output')
Conclusion:
 The system is stable because the unit-step response has one
overshoot which reaches the steady state at 4seconds. The
steady state error now is zero.
 The unit ramp response has finite steady state error.
Experiment 07

Solution:
%---------Unit-impulse Responce -------- %
t=0:0.02:10;
num=[0 0 10];
den=[1 2 10];
r=t==0;
y=impulse(num,den,t);
subplot(2,2,1)
plot(t,r,'--',t,y)
grid
title('Unit-impulse Response')
xlabel('t (sec)')
ylabel('Unit-impulse Input and Output')

%---------Unit-Step Responce -------- %


t=0:0.02:10;
num=[0 0 10];
den=[1 2 10];
r1=t>=0;
y1=step(num,den,t);
subplot(2,2,2)
plot(t,r1,'--',t,y1)
grid
title('Unit-step Response')
xlabel('t (sec)')
ylabel('Unit-step Input and Output')

%---------Unit-Ramp Responce -------- %


t=0:0.02:10;
num=[0 0 0 10];
den=[1 2 10 0];
r1=t;
y1=step(num,den,t);
subplot(2,2,3)
plot(t,r1,'--',t,y1)
grid
title('Unit-ramp Response')
xlabel('t (sec)')
ylabel('Unit-ramp Input and Output')

Conclusion:
 The unit-impulse response has some overshoot but the system
achieves steady state after some time. The system is stable.
 The unit step response has some overshoot and then enters
steady state with zero steady state error.
 The unit-ramp response has finite steady state error.
Experiment 08
Consider the control system shown in figure

Draw the root locus of the system.

SOLUTION:

num = [0 0 1 0.4];
den = [1 3.6 0 0];
rlocus(num,den);
v= [-5 1 -3 3];
axis(v)
grid
title('Root-Locus Plot of G(s) = K(s + 0.4/[s^2(s +
3.6)])')
Conclusion:
 There are two poles at origin, one pole at -3.6 and one zero at -
0.4 .
 Number of branches=>3
 Number of asymptote =>2
 Centroid of asymptote =>-1.6
 Angle of asymptotes => 90,270
 System will be stable as all the roots are at left hand side of s
plane and for k > 0 system will be stable.
Experiment 09

Solution:
clc;
clear;
num = [0 0 0 1];
den = [1 3 2 0];
rlocus(num,den);
v = [-5 1 -3 3];
axis(v)
grid on
title('Root-Locus Plot of G(s) = K/(s(s+1)(s+2))');

Conclusion:
 Poles at 0,-1 and -2 and no Zeroes.
 No of branches=3
 No of asymptote =3
 Centroid of asymptote=-1
 Angles of asymptote= 60, 180, 300
 System will be stable if k>0
Experiment 10

Solution:

num = [0 0 1 4 4];
den = [1 10 29 40 100];
r = rlocus(num,den);
plot(r, 'o')
hold
current plot held
plot(r,'-')
v= [-8 4 -6 6];
axis(v);
axis('square')
grid
title('Root-Locus Plot of G(s) = (s + 2)^2/[(s^2 +
4)(s + 5)^2]')

xlabel('Real Axis')
ylabel('Imaginary Axis')
Conclusion:
 Two poles at imaginary axis at +2j,-2j and two poles at -5.
 Two zeroes at -2
 No of branches=4
 No of asymptote=2
 Angles of asymptote= 90, 270
 For the system to be stable k>-20
Experiment 11

Solution:
num = [0 0 1 2];
den = [1 9 8 0];
K=0:0.2:200;
rlocus( num,den,K);
v =[-10 2 -6 6]; axis(v); axis('square');
sgrid
title('Root-Locus Plot with Constant \zeta Lines and
Constant \omega_n Circles')
gtext('\zeta = 0.9')
gtext('0.7')
gtext('0.5')
gtext('0.3')
gtext('\omega_n = 10')
gtext('8')
gtext('6')
gtext('4')
gtext('2')
Conclusion:
 Poles at 0,-8,-1
 Zero at -2
 No of branches=3
 No of asymptote=2
 Angles of asymptote= 90, 270
 System will be stable as all the roots are at left hand side of s
plane
Experiment 12

Solution:

% Root-Locus Plot %
num = [0 1 0 25 0];
den = [ 1 0 404 0 1600];
K = 0:0.4:1000;
rlocus(num,den, K)
v = [-30 20 -25 25]; axis(v); axis('square')
grid
title('Root-Locus Plot of G(s) = K(s^2 +
25)s/(s^4+404s^2 + 1600)')
Conclusion:
 Two poles at imaginary axis at +2j,-2j and two poles at +20j,-
20j.
 Two zeroes at imaginary axis =5j,-5j and 0
 No of branches=4
 No of asymptote=1
 Angles of asymptote= 180
 System will be stable as all the roots are at left hand side of s
plane
Experiment 13

Solution:
w = logspace(-1,2,200);
for i = 1:3
if i == 1; K = 1;[mag,phase,w] = bode([0 0 0 K],[1 6 5
K],w);
mag1dB = 20*log10(mag); phase1 = phase; end
if i == 2; K = 10;[mag,phase,w] = bode([0 0 0 K],[1 6 5
K],w);
mag2dB = 20*log10(mag); phase2 = phase; end
if i == 3; K = 20;[mag,phase,w] = bode([0 0 0 K],[1 6 5
K],w);
mag3dB = 20*log10(mag); phase3 = phase; end
end
subplot(2,1,1)
semilogx(w,mag1dB,'-',w,mag2dB,'-',w,mag3dB,'-')
grid
title('Bode Diagrams of G(s) = K/[s(s + 1)/(s + 5)],
where K=1, K= 10, and K = 20')
xlabel('Frequency (rad/sec)')
ylabel('Gain (dB)')
text(1.2,-31,'K = 1')
text(1.1,-8, 'K = 10')
text(11,-31, 'K = 20')
subplot(2,1,2)
semilogx(w,phase1,'-',w,phase2,'-',w,phase3,'-')
grid
xlabel('Frequency (rad/sec)')
ylabel('Phase (deg)')
text(0.2,-90,' K= 1')
text(0.2,-20,' K= 10')
text(1.6,-20,' K= 20')
Experiment 14

Solution:
num=[0 20 20 10];
den=[1 11 10 0];
nyquist(num,den)
v=[-2 3 -3 3]; axis(v)
grid
Experiment 15

Solution:
num=[-1 -4 -6];
den=[1 5 4];
nyquist(num, den);
grid
title('Nyquist Plot of G(s)=-(s^2+4s+6)/(s^2+5s+4)')

You might also like