Professional Documents
Culture Documents
Exp-3 19-39873-1 SL-25
Exp-3 19-39873-1 SL-25
UNIVERSITY-BANGLADESH
Faculty of Engineering
Lab Report Title: Introduction to design and simulation of open loop and close loop control systems using a
Computer Aided Design (CAD) tool---MATLAB.
Lab Report No: 03 Date of Submission: 6 March 2021
Course Title: Modern control systems lab
Course Code: EEE4102 Section: E
Semester: Spring 2020-21 Course Teacher: Bishwajit Banik Pathik
* Student(s) must complete all details except the faculty use part.
** Please submit all assignments to your course teacher or the office of the concerned teacher.
Submitted by:
Marks Obtained
Total Marks
OUTPUT:
2
PART 2:
CODE:
OUTPUT:
CODE:
clear all; %Clears all variables (i.e. p1,r1,p2 etc.)
OL_TRF_num = [1 1] %Define the numerator of a transfer function
OL_TRF_den = conv([1 4], [1 6]) %Define the denominator of a transfer function
printsys(OL_TRF_num, OL_TRF_den, 's')
%Outputs the transfer function (open-loop) in
%symbolic form, where the variable is "s"
[y, x, t]=step(OL_TRF_num, OL_TRF_den);
%Simulate this system for a step input.It will
%store the simulation results in certain
%variables like y,x,t
figure (1) %Label the figure
plot(t, y) %Display the simulation in a 2-D plot
grid %Add gridlines in the figure
title('Unit step response for open loop') %Add a title to the figure
ylabel('y(t)') %Label y axis
xlabel('time in seconds') %Label x axis
OUTPUT:
4
PART 4:
CODE:
%Simulating a close loop control system
%This control system has unity feedback
clear all; %Clears all variables (i.e. p1,r1,p2,Gnum,
%Gden,y,x,t etc.)
G = [1 1] %Define the feedforward transfer function
H = conv([1 4], [1 6]) %Define the feedback transfer function
[CL_TRF_num, CL_TRF_den] = cloop(G, H)
%Form the resulting close-loop transfer function
printsys(CL_TRF_num, CL_TRF_den, 's')
%Outputs the transfer function (open-loop) in
%symbolic form where the variable is "s"
[y, x, t]=step(CL_TRF_num, CL_TRF_den);
%Simulate this system for a step input.It will
%store the simulation results in certain
%variables like y,x,t
figure (2) %Label the figure
plot(t, y) %Display the simulation in a 2-D plot
grid %Add gridlines in the figure
title('Unit step responce for close loop') %Add a title to the figure
ylabel('y(t)') %Label y axis
xlabel('time in seconds') %Label x axis
OUTPUT:
In this experiment we came to know about the use CAD tool-MATLAB and also how it could be used to
describe control system functions. We have learnt Creating polynomial functions, finding roots of a
polynomial function, evaluating polynomials, calculating product of two polynomial functions in
MATLAB. We have obtained transfer functions and step responses of open-loop and closed-loop control
systems. Our faculty helps us a lot to learn all of these and also gave us solutions which we have faced
during the experiment. Overall, the experiment is enough to understand about MATLAB.