Transfer Function, partial fraction
expansion, pole zero plot
Hi!
Program:
1) Write a MATLAB program to display the transfer function, location of poles and zeroes, transfer function in factored form, partial fraction expansion from transfer function, transfer function from partial fraction expansion, get system information and pole-zero plot of the system function.
Editor
num=[2 5 3 6];
den=[1 7 20 8];
sys1=tf(num,den)
[z,p,k]=tf2zp(num,den)
sys2=zpk(sys1)
[r,p,k]=residue(num,den)
r1=[-5;-4;2];p1=[-3;2;-1];k1=3;
[num1,den1]=residue(r1,p1,k1);
sys3=tf(num1,den1)
get(sys1);
pzmap(sys1);
sgrid;
[num2,den2]=tfdata(sys3,'v')
printsys(num,den);
Command Window -
>> tf1
sys1 =
2 s^3 + 5 s^2 + 3 s + 6
-----------------------
s^3 + 7 s^2 + 20 s + 8
Continuous-time transfer function.
z =
-2.3965 + 0.0000i
-0.0518 + 1.1177i
-0.0518 - 1.1177i
p =
-3.2635 + 2.5024i
-3.2635 - 2.5024i
-0.4730 + 0.0000i
k =
2
sys2 =
2 (s+2.396) (s^2 + 0.1035s + 1.252)
-----------------------------------
(s+0.473) (s^2 + 6.527s + 16.91)
Continuous-time zero/pole/gain model.
r =
-4.6953 + 0.8914i
-4.6953 - 0.8914i
0.3906 + 0.0000i
p =
-3.2635 + 2.5024i
-3.2635 - 2.5024i
-0.4730 + 0.0000i
k =
2
sys3 =
3 s^3 - s^2 - 24 s - 32
-----------------------
s^3 + 2 s^2 - 5 s - 6
Continuous-time transfer function.
Numerator: {[2 5 3 6]}
Denominator: {[1 7 20 8]}
Variable: 's'
IODelay: 0
InputDelay: 0
OutputDelay: 0
Ts: 0
TimeUnit: 'seconds'
InputName: {''}
InputUnit: {''}
InputGroup: [1×1 struct]
OutputName: {''}
OutputUnit: {''}
OutputGroup: [1×1 struct]
Name: ''
Notes: {}
UserData: []
SamplingGrid: [1×1 struct]
num2 =
3 -1 -24 -32
den2 =
1 2 -5 -6
num/den =
2 s^3 + 5 s^2 + 3 s + 6
-----------------------
s^3 + 7 s^2 + 20 s + 8
2 - For
the given transfer function F(s) = s + 6
-----------------
s^3 + 4 s^2 + 3 s
i)
find the partial fraction form, poles and zeroes and map them in s-plane.
ii)
Write the given transfer function in MATLAB and generate the numerator and
denominator coefficients back.
Editor
clc;
clear all;
close all;
num=[0 0 1 6];
den=[1 4 3 0];
sys1=tf(num,den)
[z,p,k]=tf2zp(num,den)
sys2=zpk(sys1)
[r,p,k]=residue(num,den)
[num1,den1]=residue(r,p,k);
sys3=tf(num1,den1)
get(sys1);
pzmap(sys1);
sgrid;
[num2,den2]=tfdata(sys3,'v')
printsys(num,den)
Command Window -
sys1 =
s + 6
-----------------
s^3 + 4 s^2 + 3 s
Continuous-time transfer function.
z =
-6
p =
0
-3
-1
k =
1
sys2 =
(s+6)
-------------
s (s+3) (s+1)
Continuous-time zero/pole/gain model.
r =
0.5000
-2.5000
2.0000
p =
-3
-1
0
k =
[]
sys3 =
s + 6
-----------------
s^3 + 4 s^2 + 3 s
Continuous-time transfer function.
Numerator: {[0 0 1 6]}
Denominator: {[1 4 3 0]}
Variable: 's'
IODelay: 0
InputDelay: 0
OutputDelay: 0
Ts: 0
TimeUnit: 'seconds'
InputName: {''}
InputUnit: {''}
InputGroup: [1×1 struct]
OutputName: {''}
OutputUnit: {''}
OutputGroup: [1×1 struct]
Name: ''
Notes: {}
UserData: []
SamplingGrid: [1×1 struct]
num2 =
0 0 1 6
den2 =
1 4 3 0
num/den =
s + 6
-----------------
s^3 + 4 s^2 + 3 s
0 comments:
Post a Comment