p一世d
以并行形式创建PID控制器,转换为平行形式的PID控制器
句法
C= pid(kp,,,,k一世,,,,kd,,,,tF)
C = PID(KP,KI,KD,TF,TS)
C= pid(sys)
C= pid(kp)
C= pid(kp,,,,k一世)
C= pid(kp,,,,k一世,,,,kd)
C= pid(。。。,,,,name,Value)
C= pid
description
创建了一个连续时间PID控制器与道具ortional, integral, and derivative gainsC
= pid(kp
,,,,k一世
,,,,kd
,,,,tF
)kp
,,,,k一世
,,,,andkd
and first-order derivative filter time constanttF
:
这个表示形式在parallel form。如果all ofkp
,,,,k一世
,,,,kd
,,,,andtF
are real, then the resultingC
一世sap一世d
控制器对象。如果one or more of these coefficients is tunable (realp
orgenmat
),,,,thenC
一世sa tunable generalized state-space (Genss
)model object.
creates a discrete-time PID controller with sample timeC
= pid(kp
,,,,k一世
,,,,kd
,,,,tF
,,,,ts
)ts
。这controller is:
我F((z)andDF((z)are thed一世screte integrator formulasFor the integrator and derivative filter. By default,
要选择不同的离散集成商公式,请使用我Formula
andDFormula
properties. (SeePropertiesFor more information about我Formula
andDFormula
)。如果DFormula
='ForwardEuler'
(默认值)和tF
≠ 0, thents
andtF
must satisfytF> Ts/2
。此需求确保稳定的导数滤杆。
converts the dynamic systemC
= pid(sys
)sys
to a parallel formp一世d
控制器对象。
与C
= pid(kp
)k一世
= 0,kd
= 0,andtF
=0。
与使用比例和积分(PI)控制器C
= pid(kp
,,,,k一世
)kd
= 0和tF
=0。
与使用比例,积分和衍生(PID)控制器一起使用C
= pid(kp
,,,,k一世
,,,,kd
)tF
=0。
creates a controller or converts a dynamic system to aC
= pid(。。。,,,,name,Value
)p一世d
控制器对象,其中一个或多个指定的其他选项name,Value
配对参数。
我nput Arguments
|
Proportional gain.
When 默认:1 |
|
积分增益。
When 默认:0 |
|
derivative gain.
When 默认:0 |
|
t一世me constant of the first-order derivative filter.
When 默认:0 |
|
采样时间。 创建离散时间
默认:0(连续时间) |
|
SISO动态系统转换为平行
|
名称值参数
Specify optional comma-separated pairs ofname,Value
arguments.name
一世sthe argument name andValue
一世sthe corresponding value.name
must appear inside quotes. You can specify several name and value pair arguments in any order asNAME1,Value1,...,Namen,Valuen
。
Usename,Value
syntax to set the numerical integration formulas我Formula
andDFormula
离散时间p一世d
控制器,或设置其他对象属性,例如输入名
andOutputName
。For information about available properties ofp一世d
controller objects, seeProperties。
Output Arguments
|
PID控制器,表示为
|
Properties
|
PID controller gains. 这 |
|
导数滤波器时间常数。 这 |
|
离散集成商公式我F((z)For the integrator of the discrete-time
When 默认: |
|
离散集成商公式DF((z)用于离散时间的导数滤波器
When 默认: |
|
t一世me delay on the system input. |
|
系统输出的时间延迟。 |
|
采样时间。对于连续时间模型, Changing this property does not discretize or resample the model. Use 默认: |
|
Units for the time variable, the sample time
Changing this property has no effect on other properties, and therefore changes the overall system behavior. Use 默认: |
|
我nput channel name, specified as a character vector. Use this property to name the input channel of the controller model. For example, assign the name C。输入名='错误';
You can use the shorthand notation 我nput channel names have several uses, including:
默认:Empty character vector, |
|
我nput channel units, specified as a character vector. Use this property to track input signal units. For example, assign the concentration units C。我nputUnit ='mol/m^3';
默认:Empty character vector, |
|
输入通道组。PID控制器模型不需要此属性。 默认: |
|
Output channel name, specified as a character vector. Use this property to name the output channel of the controller model. For example, assign the name C。OutputName ='control';
You can use the shorthand notation 我nput channel names have several uses, including:
默认:Empty character vector, |
|
Output channel units, specified as a character vector. Use this property to track output signal units. For example, assign the unit C。outputunit='Volts';
默认:Empty character vector, |
|
Output channel groups. This property is not needed for PID controller models. 默认: |
|
系统名称,指定为字符向量。例如, 默认: |
|
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, if sys1。notes =“ sys1有一个字符串。”;sys2。notes ='sys2 has a character vector.';sys1。notes sys2.Notes ans =“ sys1具有字符串。”ANS ='SYS2具有字符向量。 默认: |
|
您要与系统关联的任何类型的数据,指定为任何MATLAB®data type. 默认: |
|
Sampling grid for model arrays, specified as a data structure. 对于通过采样一个或多个自变量来得出的模型阵列,此属性跟踪与数组中每个模型关联的变量值。this information appears when you display or plot the model array. Use this information to trace results back to the independent variables. 将数据结构的字段名称设置为采样变量的名称。将字段值设置为与数组中每个模型关联的采样变量值。所有采样变量均应为数字和标量值,所有采样值的阵列应与模型数组的尺寸匹配。 例如,s你ppose you create a 11-by-1 array of linear models, sysarr.SamplingGrid = struct('time',,,,0:10)
Similarly, suppose you create a 6-by-9 model array, [zeta,w] = ndgrid(<6 values of zeta>,<9 values of w>) M.SamplingGrid = struct('zeta',,,,zeta,'w',W) When you display 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 ... 对于通过线性化simulink生成的模型阵列万博1manbetx®model at multiple parameter values or operating points, the software populates 默认: |
Examples
t一世ps
Use
p一世d
to:Create a
p一世d
controller object from known PID gains and filter time constant.Convert a
p一世dstd
controller object to a standard-formp一世d
控制器对象。将其他类型的动态系统模型转换为
p一世d
控制器对象。
要设计特定工厂的PID控制器,请使用
p一世dtune
orp一世dt你ner
。要创建可调PID控制器作为控制设计块,请使用tunablePID
。创建阵列
p一世d
控制器对象:我n an array of
p一世d
controllers, each controller must have the same sample timets
and discrete integrator formulas我Formula
andDFormula
。to create or convert to a standard-form controller, use
p一世dstd
。Standard form expresses the controller actions in terms of an overall proportional gainkp,,,,一世ntegral and derivative timest一世andtd和过滤器除数n:这re are two ways to discretize a continuous-time
p一世d
controller:使用
c2d
command.c2d
计算离散控制器的新参数值。离散控制器的离散集成器公式取决于c2d
d一世scretization method you use, as shown in the following table.c2d
d一世scretization Method我Formula
DFormula
'zoh'
向前的人
向前的人
'foh'
trapezoidal
trapezoidal
'tustin'
trapezoidal
trapezoidal
'impulse'
向前的人
向前的人
“匹配”
向前的人
向前的人
有关有关的更多信息
c2d
离散方法,请参阅c2d
reference page. For more information about我Formula
andDFormula
, 看Properties。如果您需要不同的离散集成符公式,则可以直接设置控制器离散
ts
,,,,我Formula
,,,,andDFormula
to the desired values. (Seed一世scretize a Continuous-Time PID Controller)。然而,这种方法不计算新的收获and filter-constant values for the discretized controller. Therefore, this method might yield a poorer match between the continuous- and discrete-timep一世d
控制器比使用c2d
。