Accelerating the pace of engineering and science

# arxRegul

Determine regularization constants for ARX model estimation

## Syntax

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

## Description

example

[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.

example

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

example

[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.

example

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

## Examples

expand all

### Determine Regularization Constants for ARX Model Estimation Using Default Kernel

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|].

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.

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.

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

## Input Arguments

expand 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

expand 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.

expand all

### Algorithms

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

$\left({J}^{T}J\right)\theta ={J}^{T}y$

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

$\theta ={\left({J}^{T}J\right)}^{-1}{J}^{T}y$.

Using regularization adds a regularization term:

$\theta ={\left({J}^{T}J+\lambda R\right)}^{-1}{J}^{T}y$

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

## References

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