0% found this document useful (0 votes)
87 views

Lab - 4 .. Partialfraction .. Find Poles/zeros Using Matlab

This document summarizes objectives and tasks completed in a lab involving MATLAB. It demonstrates using MATLAB to: 1) Perform partial fraction expansion of transfer functions. 2) Find poles and zeros of transfer functions. 3) Obtain the inverse Laplace transform and transfer function from poles and zeros. 4) Solve a differential equation by converting it to a transfer function.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views

Lab - 4 .. Partialfraction .. Find Poles/zeros Using Matlab

This document summarizes objectives and tasks completed in a lab involving MATLAB. It demonstrates using MATLAB to: 1) Perform partial fraction expansion of transfer functions. 2) Find poles and zeros of transfer functions. 3) Obtain the inverse Laplace transform and transfer function from poles and zeros. 4) Solve a differential equation by converting it to a transfer function.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Ctrl sys - lab 4

Submitted to: Mam Sania Saeed


Muhammad Abbas (38)
Section B

Objectives:
1- Partial fraction Expantion using Matlab.
2- Find Pole/Zero of a transfer function in Matlab.

Obj 1 : Partial fraction Expantion using Matlab.

num = [2 5 3 6];
den = [1 6 11 6];
printsys(num,den);
[r p k]= residue(num,den)
Where :

r = residue
P = poles
K = dc value

Results:

Tf =

6 4
3
+
+
+2
s +3 s+2 s+ 1

Now if r p and k are given and we are suppose to find the its associated numenator
and denomenator i-e the transfer function.

[num,den]=residue(r,p,k);
printsys(num,den);
Result :

Obj 2 : Find Pole/Zero of a transfer function in Matlab.


Given the the transfer function

num = [0 0 4 16 12];
den = [1 12 44 48 0];
printsys(num,den);
[z p k]= tf2zp(num,den)

Result :

Where : z = zeros
P = poles
K = dc value

Now if z p and k are given and we are suppose to find the its associated numenator
and denomenator i-e the transfer function.

z=[-3 ;-1];
p = [0 ;-6 ;-4; -2];
k=4;
[num, den]=zp2tf(z,p,k);
printsys(num,den);

Note : Defined matrices should be colomn matrices .

Result :

Tasks :
1- Obtain the inverse laplace of the given transfer function

One way of doing this is by using built in function of Matlab .


F=(s^5 + 8*s^4 + 23*s^3 + 35*s^2 + 28*s +3)/(s^3+6*s^2+8*s);
ilaplace(F,s,t)

Result:

Secondly we can carry it out by finding its residues of partial praction .. and do
some hand calculations .
num=[1 8 23 35 28 3];

den=[0 0 1 6 8 0];
printsys(num,den);
[r p k]= residue(num,den)

Result:

Here we go .. you can see as the function is improper so k has got the value of the
resultant function .

Task 2 : Obtain the transfer function if poles and zeros are given
1- There is no zero and poles are at -1+2j , -1-2j and k =10 .
z=[];
p=[-1+2*j ; -1-2*j];
k=10;
[num,den]=zp2tf(z,p,k);
printsys(num,den);

Result :

2- There is zero at -1 and poles are at -1+2j , -1-2j and k =10 .

z=[-1];
p=[-1+2*j ; -1-2*j];
k=10;
[num,den]=zp2tf(z,p,k);
printsys(num,den);

Result:

3- There is zero at 0

and poles are at -2 ,- 4 , -8 and k

=12.

z=[0];
p=[-2;-4;-8];
k=12;
[num,den]=zp2tf(z,p,k);
printsys(num,den);

Result :

Task 3 : Solving of the differential equation :


Given the differential equation
diff(x,2)+diff(x,1)+ x == t^2
initial conditions diff(x,1)=0 for t= 0
x(t)=0 for t = 0

one way to solve it just by using built in matlab commonds :


syms x(t)
Dy=diff(y);
x(t)=dsolve(diff(x,2)+diff(x,1)+ 10*x == t^2 , x(0)==0,Dy(0)==0);
x(t)=simplify(x)

Result :

Second method is to convert it into respective transfer function .. and then find its
partial resdidues and taking its inverse laplace will give us the above results ..
Coverted transfer functon :

Zeros/poles :
num=[1 0 0];
den=[1 1 10];
[r p k]=residue(num,den)

Results :

Now after doing a tough handy calculations you will get to result ..

You might also like