Вы находитесь на странице: 1из 9

Clase de ingeniera de control con

matlab (practica)
>> help zpk

zpk Constructs zero-pole-gain model or converts to zero-pole-gain format.

Construction:

SYS = zpk(Z,P,K) creates a continuous-time zero-pole-gain (zpk) model

SYS with zeros Z, poles P, and gains K. SYS is an object of class @zpk.

SYS = zpk(Z,P,K,Ts) creates a discrete-time zpk model with sampling

time Ts (set Ts=-1 if the sample time is undetermined).

S = zpk('s') specifies H(s) = s (Laplace variable).

Z = zpk('z',TS) specifies H(z) = z with sample time TS.

You can then specify zpk models directly as expressions in S or Z,

for example,

z = zpk('z',0.1); H = (z+.1)*(z+.2)/(z^2+.6*z+.09)

SYS = zpk creates an empty zero-pole-gain model.

SYS = zpk(D) specifies a static gain matrix D.

You can set additional model properties by using name/value pairs.

For example,

sys = zpk(1,2,3,'Variable','p','DisplayFormat','freq')

also sets the variable and display format. Type "properties(zpk)"

for a complete list of model properties, and type

help zpk.<PropertyName>

for help on a particular property. For example, "help zpk.ioDelay"

provides information about the "ioDelay" property.

Data format:

For SISO models, Z and P are the vectors of zeros and poles (set
Z=[] when there are no zeros) and K is the scalar gain.

For MIMO systems with NY outputs and NU inputs,

* Z and P are NY-by-NU cell arrays where Z{i,j} and P{i,j}

specify the zeros and poles of the transfer function from

input j to output i

* K is the 2D matrix of gains for each I/O channel.

For example,

H = zpk( {[];[2 3]} , {1;[0 -1]} , [-5;1] )

specifies the two-output, one-input zpk model

[ -5 /(s-1) ]

[ (s-2)(s-3)/s(s+1) ]

Arrays of zero-pole-gain models:

You can create arrays of zpk models by using ND cell arrays for Z,P

and a ND double array for K. For example, if Z,P,K are 3D arrays

of size [NY NU 5], then

SYS = zpk(Z,P,K)

creates the 5-by-1 array of zpk models

SYS(:,:,m) = zpk(Z(:,:,m),P(:,:,m),K(:,:,m)), m=1:5.

Each of these models has NY outputs and NU inputs.

To pre-allocate an array of zero zpk models with NY outputs and NU

inputs, use the syntax

SYS = zpk(ZEROS([NY NU k1 k2...])) .

Conversion:

SYS = zpk(SYS) converts any dynamic system SYS to the zpk

representation. The resulting SYS is of class @zpk.

See also zpk/exp, zpkdata, zpk, ss, frd, DynamicSystem.

Overloaded methods:
DynamicSystem/zpk

mfilt.zpk

adaptfilt.zpk

idParametric/zpk

dfilt.zpk

Reference page in Help browser

doc zpk

>> G=zpk([-2],[0 0 -1 -10],[0])

G=

Static gain.

>> G=zpk([-2],[0 0 -1 -10])

Error using zpk (line 301)

Invalid syntax for the "zpk" command. Type "help zpk" for more information.

>> G=zpk([-2],[0 0 -1 -10],[0])

G=

Static gain.

>> g

Undefined function or variable 'g'.

Did you mean:


>> G

G=

Static gain.

>> clear

>> clear all

>> G=zpk([-2],[0 0 -1 -10],[0])

G=

Static gain.

>> G=zpk([0 0 -1 -10],[-2],0)

G=

Static gain.

>> G=zpk([-2],[0 -1 -3 -3],10)

G=

10 (s+2)

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

s (s+1) (s+3)^2
Continuous-time zero/pole/gain model.

>> pole(G)

ans =

-1

-3

-3

>> zero(G)

ans =

-2

>> Gz=zpk(G)

Gz =

10 (s+2)

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

s (s+1) (s+3)^2

Continuous-time zero/pole/gain model.

>> pzmap(G)

Warning: MATLAB has disabled some advanced graphics rendering features by switching to
software OpenGL. For more

information, click here.

>> Gp=tf(G)
Gp =

10 s + 20

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

s^4 + 7 s^3 + 15 s^2 + 9 s

Continuous-time transfer function.

Otros ejemplos
>> help series
series - Series connection of two models

This MATLAB function connects two model objects in series.

series
sys = series(sys1,sys2)
sys = series(sys1,sys2,outputs1,inputs2)

Reference page for series

See also append, feedback, parallel

>> n1=10;
>> n1=[0 0 10];
>> d1=[1 2 10];
>> n2=[0 5];
>> d2=[1 5];
>> s=tf('s');
>> Gl=tf(n1,d1)
Gl =

10
--------------
s^2 + 2 s + 10

Continuous-time transfer function.

>> G2=tf(n2,d2)

G2 =

5
-----
s+5

Continuous-time transfer function.

>> printsys(ni,d1)
Undefined function or variable 'ni'.

>> printsys(n1,d1)

num/den =

10
--------------
s^2 + 2 s + 10
>> printsys(n2,d2)
num/den =

5
-----
s+5
>> [N,D]=series(n1,d1,n2,d2);
>> printsys(N,D)

num/den =

50
-----------------------
s^3 + 7 s^2 + 20 s + 50
>> [Np,Dp]=parallel(n1,d1,n2,d2);
>> printsys(Np,Dp)

num/den =

5 s^2 + 20 s + 100
-----------------------
s^3 + 7 s^2 + 20 s + 50
>> [Nc,Dc]=feedback(n1,d1,n2,d2);
>> printsys(Nc,Dc)

num/den =

10 s + 50
------------------------
s^3 + 7 s^2 + 20 s + 100
>>

Вам также может понравиться