0% found this document useful (0 votes)
9 views18 pages

Control System Lab Experiments in MATLAB

Uploaded by

Stishuk HF
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)
9 views18 pages

Control System Lab Experiments in MATLAB

Uploaded by

Stishuk HF
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

Control System

Department Of Electrical Engineering


Manipur Technical University, Imphal
Department of Electrical Engineering

Course Name: Control System Lab

Course Code: EE3619

Page
Lists of Experiments:
2
1. Simulation of saw tooth wave and sine wave using MATLAB
2. Simulation of triangular wave and ramp wave using MATLAB 4
3. Unity and non-unity feedback system using MATLAB 6
4. Block diagram reduction technique using MATLAB 9
5. Simulation of poles and zeros of a transfer function 12

6. Stability analysis using bode plot using MAT LAB 14

a. 2nd order systems


b. 3rd order systems
c. 4th order systems
d. 5th order systems
7. Stability analysis using root locus using MAT LAB 16
a. 2nd order systems
b. 3rd order systems
c. 4th order systems
d. 5th order systems
8. Stability analysis using nyquist plot using MAT LAB 17

a. 2nd order systems


b. 3rd order systems
c. 4th order systems
d. 5th order systems

1
1. Simulation of saw tooth wave and sine wave using MAT LAB

AIM: To simulate saw tooth wave and sine wave using MATLAB.
SOFTWARE REQUIRED: MATLAB –Computer with MAT LAB

a) Simulation of Saw tooth wave using MAT LAB


Program:
close all;
clc;
n=input('enter the number of cycles');
t1=0:25;
t=[];
for i=1:n,t=[t,t1];
end;
plot(t);

Output:
Enter the no of cycles

Model graph:

2
b) Simulation of SINE wave using MATLAB.

Program:

clear all;

close all;

clc;

n=input('enter the number of cycles');

t1=0:0.05:n;

x=sin(2*pi*t1);

plot(t1,x);

Output:
Enter the no of cycles

Model graph:

3
2. Simulation of Triangular wave and Ramp wave using MAT LAB

AIM: To simulate triangular wave and ramp wave by using MATLAB.


SOFTWARE REQUIRED: MATLAB –Computer with MATLAB

a) Simulation of triangular wave using MATLAB.

Program:

clear all;

close all;

clc;

n=input('enter the number of cycles');

m=input('enter the number of period');

t1=0:0.1:m/2;

t2=m/2:-0.01:0;

t=[];

for i=1:n;

t=[t,t1,t2];

end;

subplot(1,2,1);

plot(t);

Output:
Enter the no of cycles

Enter the no of periods

4
b) Simulation of ramp wave using MATLAB.

Program:

clear all;

close all;

clc;

t=[Link];

y=t;

plot(t,y);

Model graph:

5
3. Unity and Non Unity Feedback System using MAT LAB

AIM: To simulate unity and non-unity feedback transfer function using MATLAB.
SOFTWARE REQUIRED: MATLAB – Personal Computer with MAT LAB

Theory:
A feedback loop is a common and powerful tool when designing a control system.
Feedback loops take the system output into consideration, which enables the system
to adjust its performance to meet a desired output response.
Feedback configuration: If the blocks are connected as shown below then the blocks
are said to be in feedback. Notice that in the feedback there is no transfer function
H(s) defined. When not specified, H(s) is unity. Such a system is said to be a unity
feedback system.

When H(s) is non-unity or specified, such a system is said to be a non-unity feedback


system as shown below:

6
a) Simulation of unity feedback system.

The MATLAB command for implementing a feedback system is “feedback” as shown below:

Block Diagram:

Program:

clear all;
close all;
clc;
numg=[1];deng=[500 0 0];
sys1=tf(numg,deng);
numc=[1 1];denc=[1 2];
sys2=tf(numc,denc);
sys3=series(sys1,sys2);
sys=feedback(sys3,[1])

Result:

7
b) Simulation of unity feedback system.

Block Diagram:

Program:

clear all;
close all;
clc;
numg=[1];deng=[500 0 0];
sys1=tf(numg,deng);
numh=[1 1];denh=[1 2];
sys2=tf(numh,denh);
sys=feedback(sys1,sys2)

Result:

8
4. Block diagram reduction technique using MATLAB

Aim: simulation of multi feedback system


SOFTWARE REQUIRED: MATLAB –Computer with MAT LAB

Series configuration: If the two blocks are connected as shown below then the blocks are said
to be in series. It would be like multiplying two transfer functions. The MATLAB command for
such configuration is “series”.

The series command is implemented as shown below:

Parallel configuration: If the two blocks are connected as shown below then the blocks
are said to be in parallel. It would like adding two transfer functions.

9
The MATLAB command for implementing a parallel configuration is “parallel” as shown
below:

Block Diagram:

Program:
clear all;
close all;
clc;
ng1=[1];dg1=[1 10];sysg1=tf(ng1,dg1);
ng2=[1];dg2=[1 1];sysg2=tf(ng2,dg2);
ng3=[1 0 1];dg3=[1 4 4];sysg3=tf(ng3,dg3);
ng4=[1 1];dg4=[1 6];sysg4=tf(ng4,dg4);
nh1=[1 1];dh1=[1 2];sysh1=tf(nh1,dh1);
nh2=[2];dh2=[1];sysh2=tf(nh2,dh2);
nh3=[1];dh3=[1];sysh3=tf(nh3,dh3);
sys1=sysh2/sysg4;
sys2=series(sysg3,sysg4);
sys3=feedback(sys2,sysh1,+1);
sys4=series(sysg2,sys3);
sys5=feedback(sys4,sys1);
sys6=series(sysg1,sys5);
sys=feedback(sys6,[1])

10
Result:

11
5. Simulation of poles and zeros of a transfer function

Aim: To simulate the Poles and zeros of the given transfer function.
SOFTWARE REQUIRED: MATLAB –Computer with MATLAB.

Theory:
To obtain the poles and zeros of the system use the MAT LAB command “pole” and
“zero” respectively as shown in example 5. You can also use MAT LAB command
“pzmap” to obtain the same.

Program:
ng1=[1];
dg1=[1 10];
sysg1=tf(ng1,dg1);
ng2=[1];
dg2=[1 1];
sysg2=tf(ng2,dg2);
ng3=[1 0 1];
dg3=[1 4 4];
sysg3=tf(ng3,dg3);
p1=pole(sysg1)
z1=zero(sysg1)
p2=pole(sysg2)
z2=zero(sysg2)
p3=pole(sysg3)
z3=zero(sysg3)

12
Output:

13
6. Stability analysis using bode plot using MATLAB

AIM: To find out the Simulation of stability analysis of Linear Time Invariant using
MATLAB.
SOFTWARE REQUIRED: MATLAB – Matrix Laboratory.
BODE PLOT for 2nd, 3rd, 4th & 5th order systems:

2nd order system:


25
The transfer function of 𝐺 𝑠 . Plot the bode plot.
𝑠2 4𝑠 25

Program:
clear all;
close all;
clc;
num=[0 0 25];
den=[1 4 25];
bode(num,den)
title('Bode diagram of G(s)= (25/s^2+4s+25)')

Output:

14
3rd order system:

.
The transfer function is 𝑠 . Plot the bode plot.

Program:

clear all;
close all;
clc;
num=[0 0 25];
den=[1 4 25];
bode(num,den)
title('Bode diagram of G(s)= (25/s^2+4s+25)')

15
7. Stability analysis using root locus using MAT LAB

ROOT LOCUS for 2nd, 3rd, 4th & 5th order systems:

2nd order system:

The transfer function is 𝑠 . Obtain the root locus plot.

Program:
clear all;
close all;
clc;
num=[0 1 2 ];
den=[1 7 12];
rlocus(num,den)
title('Root Locus Plot of G(s)=(K(s+2)/[(s+3)(s+4)])')

Output:

16
8. Stability analysis using nyquist plot using MAT LAB

NYQUIST PLOT for 2nd, 3rd, 4th & 5th order systems:

2nd order system:

The transfer function is 𝑠 . Obtain the Nyquist Plot


.

Program:
clear all;
close all;
clc;
num=[0 1 2 ];
den=[1 7 12];
rlocus(num,den)
title('Root Locus Plot of G(s)=(K(s+2)/[(s+3)(s+4)])')

Output:

17

You might also like