Main Content

idLinear

Linear mapping object for nonlinear ARX models

Description

AnidLinearobject implements an affine function, and is a mapping function for estimating nonlinear ARX models. The mapping function uses a combination of linear weights and an offset. Unlike the other mapping objects for the nonlinear models, theidLinearobject contains no accommodation for a nonlinear component.

数学上,idLinearis a linear function y = F ( x ) that mapsminputsX(t) = [x(t1),x2(t),…,xm(t)]Tto a scalar outputy(t). .Fis a (affine) function ofx:

y ( t ) = y 0 + Χ ( t ) T P L

Here:

  • X(t) is anm-by-1 vector of inputs, orregressors

  • y0is the output offset, a scalar.

  • Pis anm-by-pprojection matrix, wheremis the number of regressors and ispis the number of linear weights.mmust be greater than or equal top

  • Lis ap-by-1 vector of weights.

SetidLinearas the value of theOutputFcnproperty of anidnlarxmodel. For example, specifyidLinearwhen you estimate anidnlarxmodel with the following command.

sys = nlarx(data,regressors,idLinear)
Whennlarxestimates the model, it also estimates the parameters of theidLinearfunction.

Use theidLinearmapping object when you want to create nonlinear ARX models that operate linearly on the regressors. The regressors themselves can be nonlinear functions of the inputs and outputs. ThepolynomialRegressorandcustomRegressorcommands allow you to create such regressors. When theidnlarxmodel has no custom regressors and the output function is set toidLinear, the model is similar to a linear ARX model. However, for the nonlinear ARX model, the offset is an estimable parameter.

You can configure theidLinearobject to disable components and fix parameters. Useevaluateto compute the output of the function for a given vector of inputs.

Creation

Description

example

Lin= idLinearcreates anidLinearobjectLinwith unknown parameters.

Properties

expand all

Input signal names for the inputs to the mapping object, specified as a 1-by-mcell array, wheremis the number of input signals. This property is determined during estimation.

Output signal name for the output of the mapping object, specified as a 1-by-1 cell array. This property is determined during estimation.

Parameters of the linear function, specified as follows:

  • Value— Value ofL', specified as a 1-by-mvector.

  • Free— Option to update entries ofValueduring estimation. specified as a logical scalar. The software honors theFreespecification only if the starting value ofValueis finite. The default value istrue

Parameters of the offset term, specified as follows:

  • Value— Offset value, specified as a scalar.

  • Free— Option to updateValueduring estimation, specified as a scalar logical. The software honors theFreespecification offalseonly if the value ofValueis finite. The default value istrue

Examples

collapse all

Load the data.

loadiddata7z7

Create anidLinearmapping objectL

L = idLinear;

Create model regressors that include nonlinear polynomial regressors.

Reg1 = linearRegressor({'y1','u1'},{1:4, 0:4}); Reg2 = polynomialRegressor({'y1','u1'},{1:2, 0:2},2,false,true,true); Reg3 = polynomialRegressor({'y1','u1'},{2, 1:3},3,false,true);

Estimate the nonlinear ARX model.

sys = nlarx(z7,[Reg1;Reg2;Reg3],L)
sys = Nonlinear ARX model with 1 output and 2 inputs Inputs: u1, u2 Outputs: y1 Regressors: 1. Linear regressors in variables y1, u1 2. Order 2 regressors in variables y1, u1 3. Order 3 regressors in variables y1, u1 List of all regressors Output function: Linear with offset Sample time: 1 seconds Status: Estimated using NLARX on time domain data "z7". Fit to estimation data: 43.22% (prediction focus) FPE: 5.66, MSE: 4.963

Version History

Introduced in R2007a

expand all

Behavior changed in R2022a

Not recommended starting in R2021b

Not recommended starting in R2021a