Main Content


Determine regularization constants for ARX model estimation



[lambda,R] = arxRegul(data,orders) returns the regularization constants used for ARX model estimation. Use the regularization constants in arxOptions to configure the regularization options for ARX model estimation.


[lambda,R] = arxRegul(data,orders,options) specifies regularization options such as regularization kernel and I/O offsets.


[lambda,R] = arxRegul(data,orders,Name,Value) specifies model structure attributes, such as noise integrator and input delay, using one or more Name,Value pair arguments.


[lambda,R] = arxRegul(data,orders,options,Name,Value) specifies both regularization options and model structure attributes.


collapse all

load iddata1 z1;
orders = [10 10 1];
[Lambda,R] = arxRegul(z1,orders);

The ARX model is estimated using the default regularization kernel TC.

Use the Lambda and R values for ARX model estimation.

opt = arxOptions;
opt.Regularization.Lambda = Lambda;
opt.Regularization.R = R;
model = arx(z1,orders,opt);

Specify 'DC' as the regularization kernel and obtain a regularized ARX model of order [|10 10 1|].

load iddata1 z1;
orders = [10 10 1];
option = arxRegulOptions('RegularizationKernel','DC');
[Lambda,R] = arxRegul(z1,orders,option);

Use the Lambda and R values for ARX model estimation.

arxOpt = arxOptions;
arxOpt.Regularization.Lambda = Lambda;
arxOpt.Regularization.R = R;
model = arx(z1,orders,arxOpt);

Specify to include a noise source integrator in the noise component of the model.

load iddata1 z1;
orders = [10 10 1];
[Lambda,R] = arxRegul(z1,orders,'IntegrateNoise',true);

Specify the regularization kernel and include a noise source integrator in the noise component of the model.

load iddata1 z1;
orders = [10 10 1];
opt = arxRegulOptions('RegularizationKernel','DC');
[Lambda,R] = arxRegul(z1,orders,opt,'IntegrateNoise',true);

Input Arguments

collapse all

Estimation data, specified as an iddata object.

ARX model orders [na nb nc], specified as a matrix of nonnegative integers. See the arx reference page for more information on model orders.

Regularization options, specified as an options set you create using arxRegulOptions.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: [Lambda, R] = arxRegul(z1,orders,option,'InputDelay',10);

Input delay, specified as a positive, nonzero numeric value representing the number of samples.

Example: [Lambda, R] = arxRegul(z1,orders,'InputDelay',10);

Data Types: double

Noise source integrator, specified as a logical. Specifies whether the noise source e(t) should contain an integrator. The default is false, indicating the noise integrator is off. To turn it on, change the value to true.

Example: [Lambda, R] = arxRegul(z1,orders,'IntegrateNoise',true);

Data Types: logical

Output Arguments

collapse all

Constant that determines the bias versus variance trade-off, returned as a positive scalar.

Weighting matrix, returned as a vector of nonnegative numbers or a positive definite matrix.


Without regularization, the ARX model parameters vector θ is estimated by solving the normal equation


where J is the regressor matrix and y is the measured output. Therefore,


Using regularization adds the regularization term


where λ and R are the regularization constants. For more information on the regularization constants, see arxOptions.


[1] T. Chen, H. Ohlsson, and L. Ljung. “On the Estimation of Transfer Functions, Regularizations and Gaussian Processes - Revisited”, Automatica, Volume 48, August 2012.

Version History

Introduced in R2013b