Z.P.K.

创建零极化模型;convert to zero-pole-gain model

句法

S.yS.=Z.P.K.(Z.那P.那K.)
S.yS.=Z.P.K.(Z.那P.那K.那T.S.)
S.yS.=Z.P.K.(m)
sys = zpk(z,p,k,ltisys)
s = zpk('s')
Z.=Z.P.K.('Z'那T.S.)
zsys = zpk(sys)
zsys = zpk(sys,'测量')
zsys = zpk(sys,'噪音')
Zsys.=Z.P.K.(S.yS.那'augmented')

Description

采用dZ.P.K.创建零极化模型(Z.P.K.model objects), or to convert dynamic systems to zero-pole-gain form.

Creation of Zero-Pole-Gain Models

S.yS.=Z.P.K.(Z.那P.那K.)使用零创建连续时间零极化模型Z.那P.olesP.和收益K.。该outputS.yS.一世S.一种Z.P.K.model object storing the model data.

In the SISO case,Z.P.是真实或复杂的零和杆的矢量载体,以及K.是真实或复杂的标量增益:

H S. = K. S. Z. 1 S. Z. 2 ...... S. Z. m S. P. 1 S. P. 2 ...... S. P. N

Z.要么P.to[]对于S.yS.tems without zeros or poles. These two vectors need not have equal length and the model need not be proper (that is, have an excess of poles).

T.o create a MIMO zero-pole-gain model, specify the zeros, poles, and gain of each SISO entry of this model. In this case:

  • Z.P.一种re cell arrays of vectors with as many rows as outputs and as many columns as inputs, andK.一世S.一种m一种trix with as many rows as outputs and as many columns as inputs.

  • 该vectorsz {i,j}p {i,j}从输入指定传输功能的零和极点j输出一世

  • K(I,J)S.P.ecifies the (scalar) gain of the transfer function from inputj输出一世

See below for a MIMO example.

S.yS.=Z.P.K.(Z.那P.那K.那T.S.)creates a discrete-time zero-pole-gain model with sample timeT.S.(马上)。组ts = -1要么T.S.=[]留下未指定的采样时间。输入参数Z.P.K.与连续时间案件一样。

S.yS.=Z.P.K.(m)指定静态增益m

sys = zpk(z,p,k,ltisys)创建具有从LTI模型继承的属性的零极化模型LTISYS.(包括采样时间)。

T.o create an array ofZ.P.K.model objects, use a对于循环,或使用多维单元格阵列Z.P.那和一种m你ltidimensional array forK.

Any of the previous syntaxes can be followed by property name/property value pairs.

'propertyname',propertyvalue

Each pair specifies a particular property of the model, for example, the input names or the input delay time. For more information about the properties ofZ.P.K.模型对象,见P.roperties。Note that

S.yS.=Z.P.K.(Z.那P.那K.那'Property1',Value1,...,'PropertyN',ValueN)

是以下命令序列的快捷方式。

S.yS.=Z.P.K.(Z.那P.那K.) set(sys,'Property1',Value1,...,'PropertyN',ValueN)

Z.ero-Pole-Gain Models as Rational Expressions in s or z

您还可以使用Rational表达式来创建ZPK模型。为此,首先是:

  • s = zpk('s')to specify a ZPK model using a rational function in the Laplace variable,S.

  • Z.=Z.P.K.('Z'那T.S.)使用采样时间指定ZPK模型T.S.你S.一世Ng a rational function in the discrete-time variable,Z.

Once you specify either of these variables, you can specify ZPK models directly as rational expressions in the variableS.要么Z.通过将传递函数作为理性表达式输入S.要么Z.

Conversion to Zero-Pole-Gain Form

zsys = zpk(sys)转换任意LTI模型S.yS.to zero-pole-gain form. The outputZsys.是一个zpk对象。默认,Z.P.K.你S.esZ.eroto compute the zeros when converting from state-space to zero-pole-gain. Alternatively,

Zsys.=Z.P.K.(S.yS.那'inv')

你S.es inversion formulas for state-space models to compute the zeros. This algorithm is faster but less accurate for high-order models with low gain atS.= 0。

Conversion of Identified Models

识别的模型由表单的输入输出方程表示y(t) = Gu(t) + He(t)那W.Here你(t)是测量输入通道的集合e(t)表示噪声通道。如果Λ= LL'代表噪音的协方差e(t)那this equation can also be written asY(t)= gu(t)+ hlv(t)那W.Herecov(v(t))= i

zsys = zpk(sys)那要么zsys = zpk(sys,'测量')将识别的线性模型的测量组件转换为ZPK表单。S.yS.是一种类型的模型IDS.一世dprocidtf.一世dpoly那要么一世dgreyZsys.represents the relationship betweeny

zsys = zpk(sys,'噪音')将识别的线性模型的噪声分量转换为ZPK表单。它代表噪声输入之间的关系,v(t)并输出,y_noise = HL v(t)。噪声输入通道属于InputGroup.'噪声'。该N一种mes of the noise input channels arev @ yname.那W.Hereyname.是相应输出通道的名称。Zsys.具有作为输出的许多输入。

Zsys.=Z.P.K.(S.yS.那'augmented')converts both the measured and noise dynamics into a ZPK model.Zsys.H一种S.Ny+N你一世NP.你ts such that the firstnu.一世NP.你ts represent the channels你(t)虽然剩余的通道代表噪声通道v(t)Zsys.。InputGroup.contains 2 input groups,'measured''noise'Zsys.。InputGroup.。measured一世S.组to1:NU.zsys.inputgroup.noise.一世S.组tonu.+1:nu+ny. zsysrepresents the equationy(t) = [G HL] [u; v]

小费

识别的非线性模型不能转换为ZPK系统。使用线性近似函数,例如线性化linapp

Variable Selection

至于传输函数,您可以指定用于显示零极化模型的显示的变量。可用的选择包括S.(默认)和P.对于连续时间模型,和Z.(default),Z.-1问:-1(相当于Z.-1), 要么问:(相当于Z.)对于离散时间模型。重新分配'变量'属性覆盖默认值。更改变量仅影响零极化模型的显示。

P.roperties

Z.P.K.objects have the following properties:

Z.

系统零。

Z.属性存储传送功能零(分子根)。对于SISO模型,Z.一世S.一种vector containing the zeros. For MIMO models withNyoutputs andNu一世NP.你ts,Z.一世S.一种Ny-by-Nucell array of vectors of the zeros for each input/output pair.

P.

系统杆。

P.属性存储传输函数极(分母根)。对于SISO模型,P.是一个包含杆子的矢量。用于MIMO模型Nyoutputs andNu一世NP.你ts,P.一世S.一种Ny-by-Nu每个输入/输出对的电池阵列的磁极矢量。

K.

System gains.

K.P.roperty stores the transfer function gains. For SISO models,K.是标量值。用于MIMO模型Nyoutputs andNu一世NP.你ts,K.一世S.一种Ny-by-Num一种trix storing the gains for each input/output pair.

DisplayFormat

指定分子和分母多项式如何用于显示目的。

分子和分母多项式各自显示为第一和二阶因子的产物。DisplayFormat控制这些因素的显示。DisplayFormatcan take the following values:

  • 'roots'(default) — Display factors in terms of the location of the polynomial roots.

  • '频率'- 在根天然频率方面显示因子ω0.和阻尼比率ζ

    '频率'显示格式不适用于离散时间模型Variablevalue'z ^ -1'要么'q^-1'

  • 'time constant'- 在根时间常量方面显示因子τ和阻尼比率ζ

    'time constant'显示格式不适用于离散时间模型Variablevalue'z ^ -1'要么'q^-1'

对于连续时间模型,下表显示了多项式因素如何以每种显示格式编写。

DisplayName 一阶系数(真实根R. Second-Order Factor (Complex Root pairR.=一种±jb.
'roots' S.-R. S.2-αs+β),在那里α= 2一种β=一种2+B.2
'频率' (1-S./ω0.),在那里ω0.=R. 1 - 2ζS./ω0.)+(S./ω0.2那W.Hereω0.2=一种2+B.2ζ=一种/ω0.
'time constant' (1-τ),在那里τ= 1 /R. 1 - 2ζτ)+(τ2那W.Hereτ= 1 /ω0.ζ=一种τ

For discrete-time models, the polynomial factors are written as in continuous time, with the following variable substitutions:

S. W. = Z. 1 T. S. ; R. R. 1 T. S.

W.HereT.S.一世S.the sample time. In discrete time,τω0.时间常数和自然freque顺序匹配Ncy of the equivalent continuous-time root, provided|Z.-1 |«T.S.ω0.«π/T.S.=Nyquist frequency).

默认:'roots'

Variable

传输函数显示变量,指定为以下之一:

  • '- 连续时间模型默认

  • 'Z'— Default for discrete-time models

  • 'P'— Equivalent to'

  • 'Q'— Equivalent to'Z'

  • 'z ^ -1'— Inverse of'Z'

  • 'q^-1'— Equivalent to'z ^ -1'

的价值Variableonly affects the display ofZ.P.K.models.

默认:'

IODelay

T.ransport delays.IODelay一世S.一种nu.meric array specifying a separate transport delay for each input/output pair.

对于连续时间系统,请在存储在中的时间单位中指定传输延迟T.一世meUnit属性。For discrete-time systems, specify transport delays in integer multiples of the sample time,T.S.

用于MIMO系统Nyoutputs andNu一世NP.你ts, setIODelayto aNy-by-Nu阵列。此阵列的每个条目是一个数字值,表示相应的输入/输出对的传输延迟。你也可以设置IODelayto a scalar value to apply the same delay to all input/output pairs.

默认:0.对于所有输入/输出对

inputdelay.

Input delay for each input channel, specified as a scalar value or numeric vector. For continuous-time systems, specify input delays in the time unit stored in theT.一世meUnit属性。For discrete-time systems, specify input delays in integer multiples of the sample timeT.S.。例如,inputdelay.=3.意味着延迟三个样本时间。

适用于系统Nu一世NP.你ts, setinputdelay.对A.Nu-by-1矢量。此向量的每个条目是表示相应输入通道的输入延迟的数值。

你也可以设置inputdelay.对标量值对所有通道应用相同的延迟。

默认:0.

outputdelay.

输出延迟。outputdelay.是指定每个输出通道的时间延迟的数字矢量。对于连续时间系统,请在存储在中的时间单位中指定输出延迟T.一世meUnit属性。对于离散时间系统,在示例时间的整数倍数中指定输出延迟T.S.。例如,outputdelay.=3.意味着延迟三个采样周期。

适用于系统Ny输出,集合outputdelay.对A.Ny-By-1向量,其中每个条目是表示相应输出通道的输出延迟的数值。你也可以设置outputdelay.对标量值对所有通道应用相同的延迟。

默认:0.对于一种ll output channels

T.S.

采样时间。对于连续时间模型,TS = 0.。For discrete-time models,T.S.一世S.一种P.ositive scalar representing the sampling period. This value is expressed in the unit specified by theT.一世meUnitP.roperty of the model. To denote a discrete-time model with unspecified sample time, setts = -1

这个属性不会离散化或resa变化mP.le the model. Usec2dD2C.在连续和离散时间表示之间转换。采用D2D.更改离散时间系统的采样时间。

默认:0.(continuous time)

T.一世meUnit

Units for the time variable, the sample timeT.S.,以及模型中的任何时间延迟,指定为以下值之一:

  • '纳秒'

  • 'microseconds'

  • '毫秒'

  • '秒'

  • 'minutes'

  • 'hours'

  • 'days'

  • '周'

  • 'months'

  • 'years'

Changing this property has no effect on other properties, and therefore changes the overall system behavior. UsechgtimeUnit.在不修改系统行为的情况下在时间单位之间转换。

默认:'秒'

InputName.

输入通道名称,指定为以下之一:

  • 字符矢量 - 对于单输入模型,例如,'控制'

  • 字符向量单元阵列 - 用于多输入模型。

或者,使用自动矢量扩展为多输入模型分配输入名称。例如,如果S.yS.是一个双输入模型,输入:

sys.InputName ='控件';

该一世NP.你t names automatically expand to{'controls(1)';'controls(2)'}

您可以使用速记表示法to refer to theInputName.属性。例如,S.yS.。你相当于S.yS.。InputName.

输入通道名称具有多种用途,包括:

  • 识别模型显示和绘图上的通道

  • 提取MIMO系统子系统

  • Specifying connection points when interconnecting models

默认:''对于所有输入通道

InpoinUnit.

输入通道单元,指定为以下之一:

  • 字符矢量 - 对于单输入模型,例如,'秒'

  • 字符向量单元阵列 - 用于多输入模型。

采用InpoinUnit.跟踪输入信号单元。InpoinUnit.对系统行为没有影响。

默认:''对于所有输入通道

InputGroup.

Input channel groups. TheInputGroup.属性允许您将MIMO Systems的输入通道分配成组,然后通过名称引用每个组。将输入组指定为结构。在此结构中,字段名称是组名,字段值是属于每个组的输入通道。例如:

sys.inputgroup.controls = [1 2];sys.inputgroup.noise = [3 5];

creates input groups named控制噪声that include input channels 1, 2 and 3, 5, respectively. You can then extract the subsystem from the控制使用以下输出的输入:

SYS(:,'控件')

默认:没有字段的结构

outputName.

Output channel names, specified as one of the following:

  • 字符矢量 - 用于单输出模型。例如,'测量'

  • 字符向量单元阵列 - 用于多输出模型。

或者,使用自动矢量扩展为多输出模型分配输出名称。例如,如果S.yS.一世S.一种two-output model, enter:

sys.outputname ='测量';

该output names automatically expand to{'测量(1)';'测量(2)'}

您可以使用速记表示法yto refer to theoutputName.属性。例如,S.yS.。y相当于S.yS.。outputName.

输出通道名称有几种用途,包括:

  • 识别模型显示和绘图上的通道

  • 提取MIMO系统子系统

  • Specifying connection points when interconnecting models

默认:''对于一种ll output channels

OutputUnit.

输出通道单元,指定为以下之一:

  • 字符矢量 - 用于单输出模型。例如,'秒'

  • 字符向量单元阵列 - 用于多输出模型。

采用OutputUnit.跟踪输出信号单元。OutputUnit.对系统行为没有影响。

默认:''对于一种ll output channels

产量组

输出通道组。该产量组P.roperty lets you assign the output channels of MIMO systems into groups and refer to each group by name. Specify output groups as a structure. In this structure, field names are the group names, and field values are the output channels belonging to each group. For example:

S.yS.。产量组。temperature = [1]; sys.InputGroup.measurement = [3 5];

创建名为的输出组temperature测量that include output channels 1, and 3, 5, respectively. You can then extract the subsystem from all inputs to the测量outputs using:

S.yS.('measurement',:)

默认:没有字段的结构

Name

System name, specified as a character vector. For example,'system_1'

默认:''

Notes

Any text that you want to associate with the system, stored as a string or a cell array of character vectors. The property stores whichever data type you provide. For instance, ifS.yS.1S.yS.2是动态系统模型,可以设置他们的NotesP.roperties as follows:

S.yS.1。Notes ="sys1 has a string.";S.yS.2。Notes ='sys2 has a character vector.';S.yS.1。Notes sys2.Notes
ans =“sys1有一个字符串。”ans ='sys2有一个字符矢量。

默认:[0.×1S.tring]

用户数据

您要与系统关联的任何类型的数据,指定为任何MATLAB®数据类型。

默认:[]

SamplingGrid

Sampling grid for model arrays, specified as a data structure.

对于通过采样一个或多个独立变量导出的模型阵列,该属性会跟踪与数组中的每个模型关联的变量值。T.H一世S.一世N对于m一种tion appears when you display or plot the model array. Use this information to trace results back to the independent variables.

组the field names of the data structure to the names of the sampling variables. Set the field values to the sampled variable values associated with each model in the array. All sampling variables should be numeric and scalar valued, and all arrays of sampled values should match the dimensions of the model array.

例如,假设您创建一个11×1数组的线性模型,S.yS.一种rr,通过在时间拍摄线性时变系统的快照t = 0:10。该following code stores the time samples with the linear models.

S.yS.一种rr.SamplingGrid = struct('time'那0.:10)

Similarly, suppose you create a 6-by-9 model array,m,通过独立抽样两个变量,Z.etaW.。以下代码附加(Z.eta,w)价值观m

[zeta,w] = ndgrid(的<6值>,<9值的w>)m.amplinggrid = struct('zeta'那Z.eta,'W'那W.)

When you displaym,阵列中的每个条目都包括相应的Z.etaW.values.

m
m(:,:,1,1) [zeta=0.3, w=5] = 25 -------------- s^2 + 3 s + 25 M(:,:,2,1) [zeta=0.35, w=5] = 25 ---------------- s^2 + 3.5 s + 25 ...

用于通过线性化模拟链接生成的模型阵列金宝app®model at multiple parameter values or operating points, the software populatesSamplingGrid一种你tomatically with the variable values that correspond to each entry in the array. For example, theSimulink Control Design™commands线性化SLINESERIZER.填充SamplingGrid通过这种方式。

默认:[]

Examples

例1

创造the continuous-time SISO transfer function:

H S. = 2 S. S. 1 + j S. 1 j S. 2

创造HS.)一种S.一种Z.P.K.object using:

H=Z.P.K.(0.那[1-i 1+i 2], -2);

例2.

Specify the following one-input, two-output zero-pole-gain model:

H Z. = [ 1 Z. 0.。3. 2 Z. + 0.。5. Z. 0.。1 + j Z. 0.。1 j ]

为此,请输入:

Z.={[] ; -0.5}; P = {0.3 ; [0.1+i 0.1-i]}; K = [1 ; 2]; H = zpk(Z,P,K,-1); % unspecified sample time

例3.

转换传输函数

H=tf([-10 20 0],[1 7 20 28 19 5]);

零极化形式,使用:

ZPK(H)

T.H一世S.command returns the result:

零/极/增益:-10 s(s-2)--------------------------------------------------------- ^ 3(s ^ 2 + 4s +5)

例4.

创造一种discrete-time ZPK model from a rational expression in the variableZ.

Z.=Z.P.K.('Z'那0.。1);H = (z+.1)*(z+.2)/(z^2+.6*z+.09)

T.H一世S.command returns the following result:

零/杆/增益:(Z + 0.1)(Z + 0.2)--------------(Z + 0.3)^ 2采样时间:0.1

例5.

创造一种mIMOZ.P.K.model using cell arrays of zeros and poles.

创造the two-input, two-output zero-pole-gain model

H S. = [ 1 S. 3. S. + 5. S. + 1 2 2 S. 2 2 S. + 2 S. 1 S. 2 S. 3. 0. ]

B.yentering:

Z.={[],-5;[1-i 1+i] []}; P = {0,[-1 -1];[1 2 3],[]}; K = [-1 3;2 0]; H = zpk(Z,P,K);

采用[]作为一个地方持有人Z.要么P.W.Hen the corresponding entry ofHS.)H一种S.No zeros or poles.

例6.

Extract the measured and noise components of an identified polynomial model into two separate ZPK models. The former (measured component) can serve as a plant model while the latter can serve as a disturbance model for control system design.

加载IceNgine Z = IDDATA(Y,U,0.04);NB = 2;nf = 2;nc = 1;nd = 3;nk = 3;sys = bj(z,[nb nc nd nf nk]);

S.yS.是表格的模型,Y(t)= b / f u(t)+ c / d e(t)那W.HereB / F.表示测量的组件和光盘噪声分量。

sysmeas = zpk(sys,'测量')

或者,使用可以简单地使用Z.P.K.(S.yS.)提取测量的组分。

S.yS.Noise = zpk(sys, 'noise')

算法

Z.P.K.使用matlab函数to convert transfer functions and the functionsZ.eroP.ole转换状态空间模型。

也可以看看

|||||

在R2006A之前介绍