Main Content

idLinear

Linear mapping object for nonlinear ARX models

Description

An idLinear object 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, the idLinear object contains no accommodation for a nonlinear component.

Mathematically, idLinear is a linear function y=F(x) that maps m inputs X(t) = [x(t1),x2(t),…,xm(t)]T to a scalar output y(t). F is a (affine) function of x:

y(t)=y0+Χ(t)TPL

Here:

  • X(t) is an m-by-1 vector of inputs, or regressors.

  • y0 is the output offset, a scalar.

  • P is an m-by-p projection matrix, where m is the number of regressors and is p is the number of linear weights. m must be greater than or equal to p.

  • L is a p-by-1 vector of weights.

Set idLinear as the value of the OutputFcn property of an idnlarx model. For example, specify idLinear when you estimate an idnlarx model with the following command.

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

Use the idLinear mapping 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. The polynomialRegressor and customRegressor commands allow you to create such regressors. When the idnlarx model has no custom regressors and the output function is set to idLinear, the model is similar to a linear ARX model. However, for the nonlinear ARX model, the offset is an estimable parameter.

You can configure the idLinear object to disable components and fix parameters. Use evaluate to compute the output of the function for a given vector of inputs.

Creation

Description

example

Lin = idLinear creates an idLinear object Lin with unknown parameters.

Properties

expand all

Input signal names for the inputs to the mapping object, specified as a 1-by-m cell array, where m is 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 of L', specified as a 1-by-m vector.

  • Free — Option to update entries of Value during estimation. specified as a logical scalar. The software honors the Free specification only if the starting value of Value is finite. The default value is true.

Parameters of the offset term, specified as follows:

  • Value — Offset value, specified as a scalar.

  • Free — Option to update Value during estimation, specified as a scalar logical. The software honors the Free specification of false only if the value of Value is finite. The default value is true.

Examples

collapse all

Load the data.

load iddata7 z7

Create an idLinear mapping object L.

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

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