0% found this document useful (0 votes)
30 views6 pages

Compute The Partial Fraction of The Following : Source Code

This document describes a lab report on analyzing systems using Laplace transforms in MATLAB. It includes: 1) Using residue() to find the partial fraction expansion of two functions. 2) Converting a function to a transfer function, finding its poles and zeros, and plotting them. 3) Using tf2zp() to find the poles, zeros and gain of a transfer function. 4) Using zp2tf() to convert given zeros, poles and gain into a transfer function. The document demonstrates using MATLAB functions to analyze linear time-invariant systems in the Laplace domain.

Uploaded by

Areeb Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views6 pages

Compute The Partial Fraction of The Following : Source Code

This document describes a lab report on analyzing systems using Laplace transforms in MATLAB. It includes: 1) Using residue() to find the partial fraction expansion of two functions. 2) Converting a function to a transfer function, finding its poles and zeros, and plotting them. 3) Using tf2zp() to find the poles, zeros and gain of a transfer function. 4) Using zp2tf() to convert given zeros, poles and gain into a transfer function. The document demonstrates using MATLAB functions to analyze linear time-invariant systems in the Laplace domain.

Uploaded by

Areeb Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

AREEB HUSSAIN LAB 12 CMS:439-2015

1. Compute the Partial fraction of the following

s 2+2 s+3
 F ( s) =
s3 +2 s 2+ 4 s+6

Source Code
num = [1 2 3];
den =[1 2 4 6];
[R, p, k]=residue(num, den);

Outcome

R=

0.2891 - 0.2157i

0.2891 + 0.2157i

0.4218 + 0.0000i

p=

-0.1443 + 1.8669i

-0.1443 - 1.8669i

-1.7113 + 0.0000i

k = []
AREEB HUSSAIN LAB 12 CMS:439-2015

s3 +2 s 2 +4 s+ 6
 F ( s) =
s2 +2 s +3

Source Code
num = [1 2 4 6];
den =[1 2 3];
[R, p, k]=residue(num, den);

Outcome

R=

0.50 - 1.76i

0.50 + 1.76i

p=

-1.00 + 1.41i

-1.00 - 1.41i

k = [1,0]

2. Convert the following H(s) into a transfer function and Find out the values of
poles and zeros of H(s) and also plot the poles and zeros of H(s).

s2 −4
 H ( s )=
s 3 +5 s 2+ 8 s+12

Source Code

num = [1 -4];
den=[1 5 8 12];
tf(num,den)
zeros = roots(num);
poles = roots(den);
pzmap(num,den)
AREEB HUSSAIN LAB 12 CMS:439-2015

Outcome

s-4

---------------------- Continuous-time transfer function.

s^3 + 5 s^2 + 8 s + 12

Poles=

-3.71 + 0.00i

-0.64 + 1.67i

-0.64 - 1.67i

Zeroes= 4

s 3 +2 s2 + 4 s+6
 H ( s )= 2
s + 2 s+3

Source Code

Outcome

s^3 + 2 s^2 + 4 s + 6
---------------------
s^2 + 2 s + 3
AREEB HUSSAIN LAB 12 CMS:439-2015

Continuous-time transfer function.

Poles=

-1.00 + 1.41i

-1.00 - 1.41i

Zeroes=

-0.14 + 1.86i

-0.14- 1.86i

-1.71 + 0.00i

3. Solve the following with help of [zeros, poles, gain] = tf2zp (num, den)

s 2+ s+2
 H ( s )=
s 3 +10 s 2+ 4 s+1

Source Code
AREEB HUSSAIN LAB 12 CMS:439-2015

clc;
close all;
clear all;
num = [1 1 2];
den = [1 10 4 1];
tf(num,den)
[z,p,k]=tf2zp(num,den)
pzmap(num,den)

Outcome

s^2 + s + 2
----------------------
s^3 + 10 s^2 + 4 s + 1

Continuous-time transfer function.

z=

-0.5000 + 1.3229i

-0.5000 - 1.3229i

p=

-9.5939 + 0.0000i

-0.2030 + 0.2510i

-0.2030 - 0.2510i

k =1

4. Solve the following with help of [num, den] = zp2tf (zeros, poles, gain)

 When One Zero lie at ‘-2’, poles at -3, -5 and -10, gain = 15
AREEB HUSSAIN LAB 12 CMS:439-2015

Source Code
clc;
close all;
clear all;
z=-2;
p=[-3 -5 -10];
k=15;
[n, d] = zp2tf(z, p, k);

Outcome

Num = [0,0,15,30]
Den = [1,18,95,150]

LEARNING OUTCOMES :
In this lab we learnt Visualization and Analysis of poles and zeros in Laplace Transform by using
MATLAB & Partial Fraction Expansion by using MATLAB.

You might also like