主要内容

MPCstate

MPC controller state

描述

MPCstateobject represents the state of an implicit or explicit MPC controller. Use anMPCstate对象在仿真之前初始化控制器对象。

控制器状态包括:

  • 控制器的植物状态,干扰和噪声模型。

  • 在先前的控制间隔中使用的操纵变量。

  • 控制器的状态协方差矩阵。

MPCstateobjects are updated during simulation using the internal state observer based on the extended prediction model. The overall state is updated from the measured outputym(k)通过线性状态观察者。有关模式信息,请参阅控制器状态估计

Creation

描述

example

x= mpcstate(mpcobj)为隐式或显式MPC控制器创建控制器状态对象mpcobj, setting the state object properties to their default values.

x= mpcstate(mpcobj,plant,disturbance,噪音,lastMove,协方差)设置特性of the state object to specified nondefault values. To use default values for a given property, set the corresponding input argument to[]

Input Arguments

expand all

MPC控制器对象, specified as either anMPC或者explicitMPC目的。

Properties

expand all

植物模型状态估计, specified as a vector. The plant state estimate values are in engineering units and are absolute; that is, they include state offsets. By default, thePlantproperty is equal to theModel.Nominal.X属性controller used to create theMPCstate目的。

If the controller plant model includes delays, thePlant属性包括模拟延迟的状态。因此,Plantis greater than the order of the nondelayed controller plant model.

干扰模型状态估计,指定为向量。干扰状态估计值包括输入干扰模型的状态,然后是输出干扰模型的状态。默认情况下,骚乱property is a zero vector if the controller has disturbance model states and empty otherwise.

To view the input and output disturbance models of your controller, use thegetindistGetOutdistfunctions, respectively.

输出测量噪声模型状态估计, specified as a vector. By default, theNoise如果控制器具有噪声模型状态,则属性为零向量。

最佳操纵变量控制从先前的控制间隔移动, specified as a vector with length equal to the number of manipulated variables. By default, theLastMove属性等于操纵变量的名义值。

During simulation, theMPCmovefunction automatically sets the value ofLastMove

When the actual control signals sent to the plant in the previous control interval do not match the calculated optimal value, do not useLastMove指定实际控制信号。相反,请使用mpcmoveopt

Covariance matrix for controller state estimates, specified as anNs-经过-Nssymmetric matrix, whereNsis the sum of the number states contained in thePlant,骚乱, 和Noisefields. T

如果控制器使用默认状态估计,则默认协方差矩阵是根据根据假设计算的稳态协方差控制器状态估计。有关更多信息,请参见P输出参数Kalmdfunction.

If the controller uses custom state estimation, theCovariance属性是空的,未使用。

During simulation, do not modifyCovariance。这MPCmovefunction automatically sets the value ofCovarianceat each control interval.

Object Functions

MPCmove Compute optimal control action and update controller states
MPCmoveAdaptive 使用预测模型更新计算最佳控制
mpcmovemultiph 如果计算增益调度MPC控制动作ngle time instant
mpcmovesplicit Compute optimal control using explicit MPC

例子

全部收缩

为单输入单输出(SISO)工厂创建模型预测控制器。在此示例中,该工厂包括0.4个时间单元的输入延迟,控制间隔为0.2个时间单元。

h = tf(1,[10 1],,'InputDelay',0.4);MPCOBJ = MPC(H,0.2);
-->The "PredictionHorizon" property is empty. Assuming default 10. -->The "ControlHorizon" property is empty. Assuming default 2. -->The "Weights.ManipulatedVariables" property is empty. Assuming default 0.00000. -->The "Weights.ManipulatedVariablesRate" property is empty. Assuming default 0.10000. -->The "Weights.OutputVariables" property is empty. Assuming default 1.00000.

Create the corresponding controller state object in which all states are at their default values.

xmpc = mpcstate(mpcobj)
- >将“ model.plant”属性转换为状态空间。- >将模型转换为离散时间。- >将延迟转换为状态。- >假设添加到测量的输出通道#1中的输出干扰是集成的白噪声。- >“ model.noise”属性为空。假设每个测得的输出上都有白噪声。MPCSTATE对象带有田间工厂:[0 0 0]干扰:0噪声:[1x0 double] LastMove:0协方差:[4x4 double]

这plant model,H,是一阶连续时传递函数。这Plant属性MPCstate对象包含两个其他状态,以建模两个延迟间隔。默认情况下,控制器包含一阶输出干扰模型(骚乱属性是标量)和静态增益噪声模型(Noiseproperty is empty).

You can access the properties of the controller state object using dot notation. For example, view the default covariance matrix.

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

Version History

在R2006a之前引入