Lab Report#4.: Control Systems
Lab Report#4.: Control Systems
Lab report#4.
(Introduction to Matlab and Simulink, Solution of Differential Equations Using
Matlab
Group memebers
Muhammad zohaib raza
Rana Imran anwar
Syed arif kazmi
FA13-bet-048
FA13-bet-050
Fa13-bet-026
Submitted to
Sir Ali Ajwad
Lab Tasks:
Task-1:
Considering G(s),
G=s+0.25/[s(s+1)(s+2)(s+3)]
Prove that tf2zp() and zp2tf() are inverse of each other. Also, prove that laplace()
and illaplace() exhibits the same property.
ZP2TF
>> num=[- 0.25]
num =
- 0.2500
>> den=[-1 -2 -3 0]
den =
-1 -2 -3
0
>> g=zpk([-0.25],[0 -1 -2 -3],[1])
Zero/pole/gain:
(s+0.25)
------------------s (s+1) (s+2) (s+3)
>> [num den]=zp2tf([-0.25],[0 -1 -2 -3],[1])
num =
0
0
0 1.0000 0.2500
den =
1
6 11
6
0
TF2ZP
>> num=[1 0.25]
num =
1.0000 0.2500
>> den=[1 6 11 6 0]
den =
1
6 11
6
0
>> g=tf(num,den)
Transfer function:
s + 0.25
-------------------------s^4 + 6 s^3 + 11 s^2 + 6 s
>> [z p k]=tf2zp(num,den)
z=
-0.2500
p=
0
-3.0000
-2.0000
-1.0000
k=
1
F( s)=
s5 +8 s 4+ 23 s 3+ 35 s2 +28 s+3
s 3 +6 s 2 +8 s
Ilaplace
>> syms s
>> g=(s^5+8*s^4+23*s^3+35*s^2+28*s+3)/(s^3+6*s^2+8*s)
g=
(s^5 + 8*s^4 + 23*s^3 + 35*s^2 + 28*s + 3)/(s^3 + 6*s^2 + 8*s)
>> ilaplace(g)
ans =
1/(4*exp(2*t)) + 3/(8*exp(4*t)) + 3*dirac(t) + 2*dirac(t, 1) + dirac(t, 2) + 3/8
-4
-2
0
k=
1
Lab Task No 3:
Consider the following RLC circuit (Fig 4.3) and take values of your
choice. Make a mathematical equation of this circuit (taking your own
defined values) and then make its Simulink block diagram.
Simulink model.
Result.