0% found this document useful (0 votes)
40 views8 pages

%EJEMPLO1 Num (10) Den (1 4) Sys TF (Num, Den)

The document contains examples of creating continuous-time transfer functions from numerator and denominator polynomials in MATLAB. It also shows converting transfer functions to zero-pole-gain form using the tf2zp function. Key steps include: 1) Defining numerator and denominator polynomials 2) Using the tf function to create transfer functions 3) Using convolution to combine multiple polynomials 4) Converting transfer functions to zero-pole-gain form

Uploaded by

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

%EJEMPLO1 Num (10) Den (1 4) Sys TF (Num, Den)

The document contains examples of creating continuous-time transfer functions from numerator and denominator polynomials in MATLAB. It also shows converting transfer functions to zero-pole-gain form using the tf2zp function. Key steps include: 1) Defining numerator and denominator polynomials 2) Using the tf function to create transfer functions 3) Using convolution to combine multiple polynomials 4) Converting transfer functions to zero-pole-gain form

Uploaded by

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

>> %EJEMPLO1

>> num=[10];

>> den=[1 4];

>> sys=tf(num,den)

sys =

10

-----

s+4

Continuous-time transfer function.

>> %EJEMPLO2

>> num=[1 4];

>> den=[1 1 10];

>> sys=tf(num,den)

sys =

s+4

------------

s^2 + s + 10

Continuous-time transfer function.


>> %EJEMPLO3

>> num=[3 2 1];

>> den1=[1 4 1];

>> den2=[1 5];

>> den3=conv(den1,den2);

>> sys=tf(num,den3)

sys =

3 s^2 + 2 s + 1

----------------------

s^3 + 9 s^2 + 21 s + 5

Continuous-time transfer function.

>> %EJEMPLO5

>> k=4;

>> z=[-1;-2];

>> p=[-3;-4;-5];

>> [NUM,DEN]=zp2tf(z,p,k)

NUM =

0 4 12 8
DEN =

1 12 47 60

>> home

>> %caso1

>> k=20;

>> help tf2zp

tf2zp - Convert transfer function filter parameters to zero-pole-gain form

This MATLAB function finds the matrix of zeros z, the vector of poles p, and the

associated vector of gains k from the transfer function parameters b and a:

[z,p,k] = tf2zp(b,a)

Reference page for tf2zp

See also sos2zp, ss2zp, tf2sos, tf2ss, tf2zpk, zp2tf

>> %CASO1

>> num1=[20];

>> num2=[1 10];

>> num3=[1 0 0 1];


>> num4=conv(num1,num2);

>> numT=conv(num4,num3);

>> den1=[1 0];

>> den2=[1 4 4];

>> den3=[1 10 100];

>> den4=[1 2 0 0 -10];

>> den5=conv(den1,den2);

>> den6=conv(den3,den4);

>> denT=conv(den5,den6);

>> sys=tf(numT,denT)

sys =

20 s^4 + 200 s^3 + 20 s + 200

------------------------------------------------------------------------------------

s^9 + 16 s^8 + 172 s^7 + 728 s^6 + 1270 s^5 + 660 s^4 - 1440 s^3 - 4400 s^2 - 4000 s

Continuous-time transfer function.

>> [z,p,k] = tf2zp(numT,denT)

z=

-10.0000 + 0.0000i

0.5000 + 0.8660i
0.5000 - 0.8660i

-1.0000 + 0.0000i

p=

0.0000 + 0.0000i

-5.0000 + 8.6603i

-5.0000 - 8.6603i

1.4287 + 0.0000i

-0.4237 + 1.5912i

-0.4237 - 1.5912i

-2.5814 + 0.0000i

-2.0000 + 0.0000i

-2.0000 - 0.0000i

k=

20

>> %CASO2

>> num1=[1 1];

>> num2=[1 2 1];

>> numT=conv(num1,num2);
>> den1=[1 4];

>> den2=[1 3];

>> den3=[1 3];

>> den4=[1 1 1 0 2];

>> den5=conv(den1,den2);

>> den6=conv(den3,den4);

>> denT=conv(den5,den6);

>> sys=tf(numT,denT)

sys =

s^3 + 3 s^2 + 3 s + 1

------------------------------------------------------------

s^7 + 11 s^6 + 44 s^5 + 79 s^4 + 71 s^3 + 56 s^2 + 66 s + 72

Continuous-time transfer function.

>> [z,p,k] = tf2zp(numT,denT)

z=

-1.0000 + 0.0000i

-1.0000 + 0.0000i

-1.0000 - 0.0000i
p=

-4.0000 + 0.0000i

-3.0000 + 0.0000i

-3.0000 - 0.0000i

0.5000 + 0.8660i

0.5000 - 0.8660i

-1.0000 + 1.0000i

-1.0000 - 1.0000i

k=

>> %CASO3

>> %CASO3.1

>> num1=[1 2];

>> den1=[1 2 5];

>> sys1=tf(num1,den1);

>> num2=[1];

>> den2=[1];

>> sys2=tf(num2,den2);

>> sysT=feedback(sys1,sys2)
sysT =

s+2

-------------

s^2 + 3 s + 7

Continuous-time transfer function.

>> [z,p,k] = tf2zp(sys)

You might also like