Main Content

mpcstate

MPC控制器状态

Description

mpcstate对象表示隐式或显式MPC控制器的状态。使用mpcstate目的to initialize the controller object before simulation.

这controller state includes the:

  • States of the plant, disturbance, and noise models of the controller.

  • Manipulated variables used in the previous control interval.

  • State covariance matrix for the controller.

mpcstate在模拟使用对象被更新ternal state observer based on the extended prediction model. The overall state is updated from the measured outputym((k)by a linear state observer. For mode information, seeController State Estimation

创建

Description

例子

X= mpcstate(mpcobjcreates a controller state object for the implicit or explicit MPC controllermpcobj,将状态对象属性设置为其默认值。

X= mpcstate(mpcobj,,,,植物,,,,骚乱,,,,noise,,,,LastMove,,,,covariancesets theproperties指定非默认值的状态对象。要使用给定属性的默认值,请将相应的输入参数设置为[]

输入参数

展开全部

MPC控制器对象,指定为mpcorexplicitmpc目的。

特性

展开全部

植物模型状态估计,指定为矢量。植物状态估计值是工程单位,是绝对的;也就是说,它们包括州偏移。默认情况下,植物财产等于型号用于创建的控制器的属性mpcstate目的。

如果控制器工厂的模型包括延迟,则植物property includes states that model the delays. Therefore the number of elements in植物大于非删除控制器植物模型的顺序。

干扰模型状态估计,,,,specified as a vector. The disturbance state estimates include the states of the input disturbance model followed by the states of the output disturbance model. By default, theDisturbance如果控制器具有干扰模型,则属性为零矢量,否则为空。

要查看控制器的输入和输出干扰模型,请使用Getindistandgetoutdist函数分别。

输出测量噪声模型状态估计值,指定为矢量。默认情况下,噪音property is a zero vector if the controller has noise model states and empty otherwise.

最佳操纵变量控制从先前的控制间隔移动,该间隔指定为矢量,长度等于操纵变量的数量。默认情况下,LastMove财产等于nominal values of the manipulated variables.

在模拟过程中,mpcmove函数会自动设置LastMove

当以前的控制间隔发送到工厂的实际控制信号与计算出的最佳值不符时,请勿使用LastMoveto specify the actual control signals. Instead, do so usingmpcmoveopt

控制器状态估计值的协方差矩阵,指定为ns-by-ns对称矩阵,其中ns是在植物,,,,Disturbance,,,,and噪音字段。t

If the controller is employing default state estimation the default covariance matrix is the steady-state covariance computed according to the assumptions inController State Estimation。For more information, see the description of thepoutput argument of thekalmd功能。

如果控制器使用自定义状态估计,则协方差property is empty and not used.

在模拟过程中,请勿修改协方差。这mpcmove函数会自动设置协方差在每个控制间隔。

对象功能

mpcmove 计算最佳控制动作和更新控制器状态
mpcmoveadaptive Compute optimal control with prediction model updating
mpcmoveMultiple 在一次瞬间计算增益制定的MPC控制动作
mpcmoveExplicit 使用显式MPC计算最佳控制

Examples

collapse all

Create a model predictive controller for a single-input-single-output (SISO) plant. For this example, the plant includes an input delay of 0.4 time units, and the control interval to 0.2 time units.

H= tf(1,[10 1],“ inputdelay',,,,0.4); MPCobj = mpc(H,0.2);
- >“ MPC”对象的“预测曲线”属性为空。尝试预测Horizo​​n =10。->“ MPC”对象的“ ControlHorizo​​n”属性为空。假设2.  - >“ weights.manipulationVariobles”属性“ MPC”对象是空的。假设默认为0.00000。- >“ weights.manipulationVariablesrate”属性“ MPC”对象是空的。假设默认为0.10000。- >“ MPC”对象的“ weight.outputvariables”属性为空。假设默认为1.00000。

创建相应的控制器状态对象,其中所有状态处于其默认值。

XMPC = mpcstate(MPCobj)
-->Converting the "Model.Plant" property of "mpc" object to state-space. -->Converting model to discrete time. -->Converting delays to states. -->Assuming output disturbance added to measured output channel #1 is integrated white noise. -->The "Model.Noise" property of the "mpc" object is empty. Assuming white noise on each measured output channel. MPCSTATE object with fields Plant: [0 0 0] Disturbance: 0 Noise: [1x0 double] LastMove: 0 Covariance: [4x4 double]

植物模型,H,,,,is a first-order, continuous-time transfer function. The植物property of thempcstate目的contains two additional states to model the two intervals of delay. By default, the controller contains a first-order output disturbance model (Disturbanceproperty is a scalar) and a static gain noise model (噪音属性为空)。

您可以使用点表示法访问控制器状态对象的属性。例如,查看默认协方差矩阵。

XMPC.Covariance
ans =4×40.0624 0.0000 0.0000 -0.0224 0.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 1.0000 -0.0000 -0.0000 -0.0224 0.0000 -0.0000 0.2301
Introduced before R2006a