Identify Plant from Data
When designing a model predictive controller, you can specify the internal predictive plant model using a linear identified model. You use System Identification Toolbox™ software to estimate a linear plant model in one of these forms:
You can estimate the plant model programmatically at the command line or interactively using the系统识别应用程序。
Identify Plant from Data at the Command Line
此示例显示如何在命令行中识别工厂模型。有关使用系统标识应用识别模型的信息,请参阅Identify Linear Models Using System Identification App(系统识别工具箱)。
Load the measured input/output data.
loadplantIO
This command imports the plant input signal,u
,植物输出信号,y
和采样时间,Ts
to the MATLAB® workspace.
Create aniddata.
来自输入和输出数据的对象。
mydata = Iddata(y,u,ts);
You can optionally assign channel names and units for the input and output signals.
mydata.InputName ='Voltage';mydata.InputUnit ='V';mydata.outputname =.'位置';mydata.OutputUnit ='厘米';
Typically, you must preprocess identification I/O data before estimating a model. For this example, remove the offsets from the input and output signals by detrending the data.
mydatad = detrend(mydata);
您也可以通过创建偏移来删除偏移量SSEST.Options
对象并指定InputOffset.
和outputOffset.
options.
对于此示例,估计使用下行数据的二阶线性状态空间模型。要估算离散时间模型,请指定示例时间Ts
。
ss1 = ssest(mydatad,2,'ts',TS)
SS1 =离散时间识别的状态空间模型:x(t + ts)= x(t)+ b u(t)+ k e(t)y(t)= c x(t)x(t)+ d u(t)+ e(t)a = x12 x1 0.8942-0.1575 x2 0.1961 0.7616 b =电压x1 6.008e-05 x2 -0.01219 c = x2 -0.0124-0.3835 d =电压位置0 k =位置x1 0.0223采样时间:0.1秒参数化:免费表格(A,B,C中的所有系数)。馈通:无干扰组件:估计自由系数的数量:10使用“idsdata”,“getpvec”,“getcov”的参数及其不确定性。状态:使用SSEST在时域数据“MyDatad”估计。适合估算数据:89.85%(预测焦点)FPE:0.0156,MSE:0.01541
You can use this identified plant as the internal prediction model for your MPC controller. When you do so, the controller converts the identified model to a discrete-time, state-space model.
默认情况下,MPC控制器丢弃任何unmeasured noise components from your identified model. To configure noise channels as unmeasured disturbances, you must first create an augmented state-space model from your identified model. For example:
SS2= ss(ss1,'augmented')
SS2= A = x1 x2 x1 0.8942 -0.1575 x2 0.1961 0.7616 B = Voltage v@Position x1 6.008e-05 0.004448 x2 -0.01219 0.002777 C = x1 x2 Position 38.24 -0.3835 D = Voltage v@Position Position 0 0.1245 Input groups: Name Channels Measured 1 Noise 2 Sample time: 0.1 seconds Discrete-time state-space model.
This command creates a state-space model,SS2
,有两个输入组,Measured
和Noise
, for the measured and noise inputs respectively. When you import the augmented model into your MPC controller, channels in theNoise
input group are defined as unmeasured disturbances.
使用脉冲响应模型
You can use System Identification Toolbox software to estimate finite step-response or finite impulse-response (FIR) plant models using measured data. Such models, also known asnonparametric models, are easy to determine from plant data ([1]和[2]) and have intuitive appeal.
Use the暂时
(系统识别工具箱)function to estimate an FIR model from measured data. This function generates the FIR coefficients encapsulated as anidtf
(系统识别工具箱)目的;也就是说,仅具有分子系数的传递函数模型。暂时
is especially effective in situations where the input signal used for identification has low excitation levels. To design a model predictive controller for this plant, you can convert the identified FIR plant model to a numeric LTI model. However, this conversion usually yields a high-order plant, which can degrade the controller design. For example, the numerical precision issues with high-order plants can affect estimator design. This result is particularly an issue for MIMO systems.
模型预测控制器使用低阶参数模型工作。因此,要设计使用测量的工厂数据的模型预测控制器,可以:
参考
[1]Cutler, C., and F. Yocum, "Experience with the DMC inverse for identification,"Chemical Process Control — CPC IV(Y. Arkun and W. H. Ray, eds.), CACHE, 1991.
[2] Ricker, N. L., "The use of bias least-squares estimators for parameters in discrete-time pulse response models,"Ind。Eng。化学。res。, Vol. 27, pp. 343, 1988.
[3]王,L.,P. Gawthrop,C. Chessari,T. Podsiadly和A. Giles,“连续时间系统识别食物挤出机”的间接方法,“J.过程控制, Vol. 14, Number 6, pp. 603–615, 2004.
See Also
Apps
- 系统识别(系统识别工具箱)