Experiment No.1 - Introduction To MATLAB and Simulink Software Tools
Experiment No.1 - Introduction To MATLAB and Simulink Software Tools
Objectives
• To familiarise with the use of MATLAB for determining the transfer function, poles and
zeros and transient reponse of control systems.
• To familiarise with the use of Simulink Toolbox in obtaining the transient reponse of
Control Systems.
Procedure
s 2 + 3s + 2
G (s) =
s 3 + 3s 2 + 4s + 12
2. In the MATLAB command window enter the following commands and observe the
output:
Num=[1 3 2];
Den=[1 3 4 12];
Sys=tf(num,den);
5s 4 + 4s 3 + 2s 2 + 4s + 8
G (s) =
s 5 + 2s 4 + 5s 3 + 3s 2 + 2s + 15
R 5 C
+ 10
- 2s + 1
4
s
Fig.1.1
5. To determine the closed loop transfer function of the above system, open a new m-
file and enter the following in MATLAB:
nsys1=[10];
dsys1=[1];
sys1=tf(nsys1,dsys1)
nsys2=[5];
dsys2=[2 1];
sys2=tf(nsys2,dsys2)
sys3=series(sys1,sys2)
nsys4=[4];
dsys4=[1 0];
sys4=tf(nsys4,dsys4);
sys=feedback(sys3,sys4)
Instructor’s Signature.........................................
AEEC345
Exp.1 Introduction to MATLAB and SIMULINK
6. Write a MATLAB program to obtain the closed loop transfer function of the system
shown in Fig.1.2.
R 4 3 C
+ 2s + 3
- s+1
Fig.1.2
1. Open a New m-file from the File Menu and enter the following transfer function
.
s + 10
G (s) =
s + 2s + 1
2
2. Enter the following commands to obtain the zeros and poles of the above transfer
function:
p=pole(sys)
z=zero(sys)
6s 2 + 1
G (s) =
s 3 + 3s 2 + 3s + 1
1. Run the SIMNULINK toolbox by entering the command simulink in the MATLAB
Command window.
2. Draw the 1st order control system shown in Fig.1.1.
2 s+1
S te p T ra n sfe r Fcn S co p e
Fig.1.1
Hint: Use the Continuous, Sinks and Sources libraries to obtain the transfer function, step
input and scope blocks.
3. Simulate the system via the simulation menu and obtain the unit step response of the
system.
4. Obtain the transient reponse of the feedback control system shown in Fig.1.2, using
Simulink toolbox
Theory:
Mathematical model of Systems in “Modern Control Systems” by R.C. Dorf and R.H.
Bishop, 9th Ed., Prentice Hall, (2001).