Main Content

pidtuneOptions

Define options forpidtune命令

Syntax

opt = pidtuneOptions
opt = pidtuneOptions(Name,Value)

Description

opt= pidtuneOptionsreturns the default option set for thepidtune命令。

opt= pidtuneOptions(Name,Value)creates an option set with the options specified by one or moreName,Value配对参数。

Input Arguments

Name-Value Pair Arguments

Specify optional comma-separated pairs ofName,Valuearguments.Nameis the argument name and价值是相应的值。Namemust appear inside quotes. You can specify several name and value pair arguments in any order asNAME1,Value1,...,Namen,Valuen

“PhaseMargin”

Target phase margin in degrees.pidtuneattempts to design a controller such that the phase margin is at least the value specified forPhasemargin。选定的交叉频率可能限制可实现的相位边缘。通常,高相位边距可以提高稳定性和过冲,但限制了带宽和响应速度。

Default:60

“ DesignFocus”

Closed-loop performance objective to favor in the design. For a given target phase margin,pidtunechooses a controller design that balances the two measures of performance, reference tracking and disturbance rejection. When you change theDesignFocusoption, the tuning algorithm attempts to adjust the PID gains to favor either reference tracking or disturbance rejection while achieving the same target phase margin. In the control architecture assumed bypidtune, shown in the following diagram, reference tracking is the response atyto signals atr, and disturbance rejection is the suppression atyof signals atd

TheDesignFocus选项可以采用以下值:

  • 'balanced'(默认值) - 对于给定的鲁棒性,请调整控制器以平衡参考跟踪和干扰拒绝。

  • 'reference-tracking'— Tune the controller to favor reference tracking, if possible.

  • “干扰拒绝”— Tune the controller to favor disturbance rejection, if possible.

系统中的可调参数越多,PID算法就越有可能在不牺牲鲁棒性的情况下实现所需的设计焦点。例如,与P或PI控制器相比,设置设计焦点对PID控制器更有效。在所有情况下,您可以如何微调系统的性能很大程度上取决于植物的特性。

For an example illustrating the effect of this option, seeTune PID Controller to Favor Reference Tracking or Disturbance Rejection (Command Line)

Default:'balanced'

'numunstablepoles'

Number of unstable poles in the plant. When your plant is afrdmodel or a state-space model with internal delays, you must specify the number of open-loop unstable poles (if any). Incorrect values might result in PID controllers that fail to stabilize the real plant. (pidtuneignores this option for other model types.)

Unstable poles are poles located at:

  • Re(s) > 0, for continuous-time plants

  • |z| > 1, for discrete-time plants

A pure integrator in the plant (s= 0) or (|z| > 1) does not count as an unstable pole forNumUnstablePoles。If your plant is afrdmodel of a plant with a pure integrator, for best results, ensure that your frequency response data covers a low enough frequency to capture the integrator slope.

Default:0

Output Arguments

opt

Object containing the specified options forpidtune

Examples

Tune a PIDF controller with a target phase margin of 45 degrees, favoring the disturbance-rejection measure of performance.

sys = tf(1,[1 3 3 1]); opts = pidtuneOptions(“PhaseMargin”,45,“ DesignFocus”,“干扰拒绝”); [C,info] = pidtune(sys,'pid',opts);

Tips

  • When using thepidtune如果您的植物模型是以下一个:

    • Afrdmodel

    • Assmodel with internal delays that cannot be converted to I/O delays

    then usepidtuneOptions指定全国矿工工会ber of unstable poles in the plant.

Introduced in R2010b