Professional Documents
Culture Documents
CS II Lab Manual 4
CS II Lab Manual 4
Lab # 04
Implementation of 1st and 2nd order systems on MATLAB and to analyze their working
Apparatus:
MATLAB Software
Theory:
(a) Block Diagram of a First-order Control System; (b) Simplified Block Diagram
second order systems, energy is stored in the form of inertia whereas in case of electrical systems, energy
can be stored in a capacitor or inductor.
LAB TASKS
Task # 01 Task # 02
Draw the pole zero-map of first order system. To find poles and zeros of 1st order system
Program: Program:
num=(420);
denum=[1 420]; num=(400);
G=tf(num,denum); denum=[1 400];
subplot 121 G=tf(num,denum);
step(G) subplot 121
subplot 122 step(G)
pzmap(G) P=pole(G)
Z=zero(G)
Output:
Output:
Task # 03 Task # 04
2nd order under damp condition 2nd order critical damp condition
Program: Program:
Output: Output:
Figure 3 PZ Map
Task # 05 Task # 06
2nd order over damp condition 2nd order undamped condition
Program: Program:
z=5; %zeta
KDC=1; %damping factor z=0; %zeta
wn=15; %natural freq KDC=1; %damping factor
s=tf('s') wn=15; %natural freq
G=KDC*wn^2/(s^2+2*z*wn*s+wn^2); s=tf('s')
%transfer function of sys G=KDC*wn^2/(s^2+2*z*wn*s+wn^2); %transfer
subplot 121 function of sys
step(G) subplot 121
subplot 122 step(G)
pzmap(G) subplot 122
P=pole(G) pzmap(G)
Z=zero(G) P=pole(G)
Z=zero(G)
Output: Output:
Conclusion:
MATLAB is necessary for performing complex calculations.
We studied about first order and second order system.
We can find the roots and draw pz-map of first order system.
For second order system find the roots and draw pz-map as well as the different
damping condition by changing the value of damping ratio.
Using MATLAB Simulink transfer functions can easily be calculated.