0% found this document useful (0 votes)
118 views3 pages

Commands

The document contains examples of converting transfer functions (G) between polynomial (tf), factored (zpk) and state space (ss) representations. It demonstrates converting transfer functions with real coefficients as well as symbolic coefficients.

Uploaded by

betoy00
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views3 pages

Commands

The document contains examples of converting transfer functions (G) between polynomial (tf), factored (zpk) and state space (ss) representations. It demonstrates converting transfer functions with real coefficients as well as symbolic coefficients.

Uploaded by

betoy00
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Program:

'Factored'
Gzpk=zpk([-15 -26 -72],[0 -55 roots([1 5 30])' roots([1 27 52])'],5)
'Polynomial'
Gp=tf(Gzpk)

Program:
'Polynomial'
Gtf=tf([1 25 20 15 42],[1 13 9 37 35 50])
'Factored'
Gzpk=zpk(Gtf)

Program:
numg=[-10 -60];
deng=[0 -40 -30 (roots([1 7 100]))' (roots([1 6 90]))'];
[numg,deng]=zp2tf(numg',deng',1e4);
Gtf=tf(numg,deng)
G=zpk(Gtf)
[r,p,k]=residue(numg,deng)

Program:
syms s
'(a)'
Ga=45*[(s^2+37*s+74)*(s^3+28*s^2+32*s+16)]...
/[(s+39)*(s+47)*(s^2+2*s+100)*(s^3+27*s^2+18*s+15)];
'Ga symbolic'
pretty(Ga)
[numga,denga]=numden(Ga);
numga=sym2poly(numga);
denga=sym2poly(denga);
'Ga polynimial'
Ga=tf(numga,denga)
'Ga factored'
Ga=zpk(Ga)
'(b)'
Ga=56*[(s+14)*(s^3+49*s^2+62*s+53)]...
/[(s^2+88*s+33)*(s^2+56*s+77)*(s^3+81*s^2+76*s+65)];
'Ga symbolic'
pretty(Ga)
[numga,denga]=numden(Ga);
numga=sym2poly(numga);
denga=sym2poly(denga);
'Ga polynimial'
Ga=tf(numga,denga)
'Ga factored'
Ga=zpk(Ga)

Program:
'a'
num=100;
den=[1 20 10 7 100];

G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)
'b'
num=30;
den=[1 8 9 6 1 30];
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)

Program:
'a'
num=[5 10];
den=[1 2 1 5 10]
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)
'b'
num=[1 2 12 7 3];
den=[1 9 10 8 0 0]
G=tf(num,den)
[Acc,Bcc,Ccc,Dcc]=tf2ss(num,den);
Af=flipud(Acc);
A=fliplr(Af)
B=flipud(Bcc)
C=fliplr(Ccc)

You might also like