Determine regularization constants for ARX model estimation


  • [lambda,R] = arxRegul(data,orders)
  • [lambda,R] = arxRegul(data,orders,options)
  • [lambda,R] = arxRegul(data,orders,Name,Value)
  • [lambda,R] = arxRegul(data,orders,options,Name,Value)



[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

Determine Regularization Constants for ARX Model Estimation Using Default Kernel

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 a Regularization Kernel

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('RegulKernel','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 Noise Source Integrator

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 Regularization Kernel And Noise Integrator

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('RegulKernel','DC');
[Lambda,R] = arxRegul(z1,orders,opt,'IntegrateNoise',true);

Related Examples

Input Arguments

collapse all

data — Estimation dataiddata object

Estimation data, specified as an iddata object.

orders — ARX model ordersmatrix of nonnegative integers

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

options — Regularization optionsarxRegulOptions options set

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

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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

'InputDelay' — Input delay0 (default) | positive integer

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

'IntegrateNoise' — Noise source integratorfalse (default) | true

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

lambda — Constant that determines bias versus variance trade-offpositive scalar

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

R — Weighting matrixvector of nonnegative numbers | square positive semi-definite matrix

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

More About

collapse all


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 a regularization term:


where, λ and R are the regularization constants. See arxOptions for more information on the regularization constants.


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

Introduced in R2013b

Was this topic helpful?