idnlhw - Class representing Hammerstein-Wiener input-output models

Syntax

m=idnlhw([nb nf nk])
m=idnlhw([nb nf nk],InputNL,OutputNL)
m=idnlhw([nb nf nk],InputNL,OutputNL,P1,V1,...,PN,VN)

Description

idnlhw is an object that stores Hammerstein-Wiener model properties, including model parameters.

Typically, you use the nlhw command to both specify the Hammerstein-Wiener model properties and estimate the model. You can specify the model properties directly in the nlhw syntax.

For information about the Hammerstein-Wiener model structure, see Definition of the Hammerstein-Wiener Model.

The information in these reference pages summarizes the idnlhw model constructor and properties. It discusses the following topics:

Hammerstein-Wiener models describe dynamic systems using one or two static nonlinear blocks in series with a linear block. Only the linear block contains dynamic elements.

The linear block is a discrete-time transfer function and the nonlinear blocks are implemented using nonlinearity estimators, such as saturation, wavenet, and deadzone.

The input signal passes through the first nonlinear block, a linear block, and a second nonlinear block to produce the output signal, as shown in the following figure.

The following general equation describes the Hammerstein-Wiener structure:

which contains the following variables:

If only the input nonlinearity is present, the model is called a Hammerstein model. If only the output nonlinearity is present, the model is called a Wiener model.

idnlhw Constructor

Typically, you use the nlhw estimator command to specify the model properties and estimate the Hammerstein-Wiener model. However, you can also use the idnlhw constructor to create the Hammerstein-Wiener model object in advance, and then estimate the parameters of this object using pem.

m=idnlhw([nb nf nk]) creates an idnlhw object with the specified orders nb, nf, and input delays nk. It uses sigmoidnet as the default input and output nonlinearity estimators.

m=idnlhw([nb nf nk],InputNL,OutputNL) creates an idnlhw object with the specified input and output nonlinearity estimator.

m=idnlhw([nb nf nk],InputNL,OutputNL,P1,V1,...,PN,VN) creates an idnlhw object and specifies idnlhw property-value pairs. For more information about idnlhw properties, see idnlarx Properties.

The constructor arguments have the following specifications:

[nb nf nk]

Model orders and input delays, where nb is the number of zeros plus 1, nf is the number of poles, and nk is the delay from input to output in terms of the number of samples.

For nu inputs and ny outputs, nb, nf and, nk are ny-by-nu matrices whose i-jth entry specifies the orders and delay of the transfer function from the jth input to the ith output.

InputNL and OutputNL

Specify the input and output nonlinearity estimator objects as one of the following: pwlinear, deadzone, wavenet, saturation, customnet, sigmoidnet, poly1d, and unitgain. The nonlinearity estimator objects have properties that you can set in the constructor, as follows:

m=idnlhw([2 2 1],sigmoidnet('num',5),deadzone([-1,2]))

To use default nonlinearity properties, specify the nonlinearity object name as a string. For example:

m=idnlhw([2 2 1],'sigmoidnet','deadzone')
m=idnlhw([2 2 1],'sig','dead') % Abbreviated

The estimator unitgain (can also be entered as []) denotes the absence of nonlinearity. Thus, m=idnlhw([2 2 1],'saturation',[]) gives a Hammerstein model (no output nonlinearities). For more information about nonlinearity properties, see the corresponding reference pages.

idnlhw Properties

You can include property-value pairs in the model estimator or constructor to specify the model structure and estimation algorithm properties.

After creating the object, you can use get or dot notation to access the object property values. For example:

% Get the model B parameters
get(m,'b')
% Get value of InputNonlinearity property
m.InputNonlinearity

The following table summarizes idnlhw model properties. The general idnlmodel properties also apply to this nonlinear model object (see the corresponding reference pages).

Property NameDescription
Algorithm

A structure that specifies the estimation algorithm options, as described in idnlhw Algorithm Properties.

b

B polynomial as a cell array of Ny-by-Nu elements, where Ny is the number of outputs and Nu is the number of inputs. An element b{i,j} is a row vector representing the numerator polynomial for the j:th input to i:th output transfer function. It contains as many leading zeros as there are input delays.

f

F polynomial as a cell array of Ny-by-Nu elements, where Ny is the number of outputs and Nu is the number of inputs. An element f{i,j} is a row vector representing the denominator polynomial for the j:th input to i:th output transfer function.

LinearModel

(Read only) The linear model is an Output-Error (OE) model. For single output, represented as an idpoly object. For muliple output, represented as an idss object.

EstimationInfo

A read-only structure that stores estimation settings and results, as described in idnlhw EstimationInfo Properties.

InputNonlinearity

Nonlinearity estimator object. Assignable values include pwlinear, deadzone, wavenet, saturation, customnet, sigmoidnet, poly1d, and unitgain. For more information, see the corresponding reference pages.

For ny outputs, Nonlinearity is an ny-by-1 array, such as [sigmoidnet;wavenet]. However, if you specify a scalar object, this nonlinearity object applies to all outputs.

OutputNonlinearity

Same as InputNonlinearity.

nb
nf
nk

Model orders and input delays, where nb is the number of zeros plus 1, nf is the number of poles, and nk is the delay from input to output in terms of the number of samples.

For nu inputs and ny outputs, nb, nf and, nk are ny-by-nu matrices whose i-jth entry specifies the orders and delay of the transfer function from the jth input to the ith output.

idnlhw Algorithm Properties

The following table summarizes the fields of the Algorithm idnlhw model properties. Algorithm is a structure that specifies the estimation-algorithm options.

Property NameDescription
Advanced

A structure that specifies additional estimation algorithm options, as described in idnlhw Advanced Algorithm Properties.

Criterion

Specifies criterion used during minimization. Criterion can have the following values:

  • 'Det': Minimize det(E'*E), where E represents the prediction error. This is the optimal choice in a statistical sense and leads to the maximum likelihood estimates in case nothing is known about the variance of the noise. It uses the inverse of the estimated noise variance as the weighting function. This is the default criterion used for all models, except idnlgrey which uses 'Trace' by default.

  • 'Trace': Minimize the trace of the weighted prediction error matrix trace(E'*E*W), where E is the matrix of prediction errors, with one column for each output, and W is a positive semi-definite symmetric matrix of size equal to the number of outputs. By default, W is an identity matrix of size equal to the number of model outputs (so the minimization criterion becomes trace(E'*E), or the traditional least-squares criterion. You can specify the relative weighting of prediction errors for each output using the Weighting field of the Algorithm property.

IterWavenet

(For wavenet nonlinear estimator only)
Toggles performing iterative or noniterative estimation.
Default: 'auto'.
Assignable values:

  • 'auto' — First estimation is noniterative and subsequent estimation are iterative.

  • 'On' — Perform iterative estimation only.

  • 'Off' — Perform noniterative estimation only.

LimitError

Robustification criterion that limits the influence of large residuals, specified as a positive real value. Residual values that are larger than 'LimitError' times the estimated residual standard deviation have a linear cost instead of the usual quadratic cost.
Default: 0 (no robustification).

MaxIter

Maximum number of iterations for the estimation algorithm, specified as a positive integer.
Default: 20.

MaxSize

The number of elements (size) of the largest matrix to be formed by the algorithm. Computational loops are used for larger matrices. Use this value for memory/speed trade-off.
MaxSize can be any positive integer. Default: 250000.

    Note   The original data matrix of u and y must be smaller than MaxSize.

SearchMethod

Method used by the iterative search algorithm.
Assignable values:

  • 'Auto' — Automatically chooses from the following methods.

  • 'gn' — Gauss-Newton method.

  • 'gna' — Adaptive Gauss-Newton method.

  • 'grad' — A gradient method.

  • 'lm' — Levenberg-Marquardt method.

  • 'lsqnonlin' — Nonlinear least-squares method (requires the Optimization Toolbox™ product). This method handles only the 'Trace' criterion.

Tolerance

Specifies to terminate the iterative search when the expected improvement of the parameter values is less than Tolerance, specified as a positive real value in %.
Default: 0.01.

Trace

Toggles displaying or hiding estimation progress information in the MATLAB® Command Window.
Default: 'Off'.
Assignable values:

  • 'Off' — Hide estimation information.

  • 'On' — Display estimation information.

Weighting

Positive semi-definite matrix W used for weighted trace minimization. When Criterion = 'Trace', trace(E'*E*W) is minimized. Weighting can be used to specify relative importance of outputs in multiple-input multiple-output models (or reliability of corresponding data) when W is a diagonal matrix of nonnegative values. Weighting is not useful in single-output models. By default, Weighting is an identity matrix of size equal to the number of outputs.

idnlhw Advanced Algorithm Properties

The following table summarizes the fields of the Algorithm.Advanced model properties. The fields in the Algorithm.Advanced structure specify additional estimation-algorithm options.

Property NameDescription
GnPinvConst

When the search direction is computed, the algorithm discards the singular values of the Jacobian that are smaller than GnPinvConst*max(size(J))*norm(J)*eps. Singular values that are closer to 0 are included when GnPinvConst is decreased.
Default: 1e4.
Assign a positive, real value.

LMStartValue

(For Levenberg-Marquardt search algorithm) The starting level of regularization when using the Levenberg-Marquardt search method (Algorithm.SearchMethod='lm').
Default: 0.001.
Assign a positive real value.

LMStep

(For Levenberg-Marquardt search algorithm) Try this next level of regularization to get a lower value of the criterion function. The level of regularization is LMStep times the previous level. At the start of a new iteration, the level of regularization is computed as1/LMStep times the value from the previous iteration.
Default: 10.
Assign a real value >1.

MaxBisections

Maximum number of bisections performed by the line search algorithm along the search direction (number of rotations of search vector for 'lm'). Used by 'gn', 'lm', 'gna' and 'grad' search methods (Algorithm.SearchMethod property).
Default: 10.
Assign a positive integer value.

MaxFunEvals

The iterations are stopped if the number of calls to the model file exceeds this value.
Default: Inf.
Assign a positive integer value.

MinParChange

The smallest parameter update allowed per iteration.
Default: 1e-16.
Assign a positive, real value.

RelImprovement

The iterations are stopped if the relative improvement of the criterion function is less than RelImprovement.
Default: 0.
Assign a positive real value.

    Note   This does not apply when Algorithm.SearchMethod='lsqnonlin'.

StepReduction

(For line search algorithm) The suggested parameter update is reduced by the factor 'StepReduction' after each try until either 'MaxBisections' tries are completed or a lower value of the criterion function is obtained.
Default: 2.
Assign a positive, real value >1.

    Note   This does not apply when Algorithm.SearchMethod='lsqnonlin'.

idnlhw EstimationInfo Properties

The following table summarizes the fields of the EstimationInfo model properties. The read-only fields of the EstimationInfo structure store estimation settings and results.

Property NameDescription
Status

Shows whether the model parameters were estimated.

Method

Shows the estimation method.

LossFcn

Value of the loss function, equal to det(E'*E/N), where E is the residual error matrix (one column for each output) and N is the total number of samples.

FPE

Value of Akaike's Final Prediction Error (see fpe).

DataName

Name of the data from which the model is estimated.

DataLength

Length of the estimation data.

DataTs

Sampling interval of the estimation data.

DataDomain

'Time' means time domain data. 'Frequency' is not supported.

DataInterSample

Intersample behavior of the input estimation data used for interpolation:

  • 'zoh' means zero-order-hold, or piecewise constant.

  • 'foh' means first-order-hold, or piecewise linear.

WhyStop

Reason for terminating parameter estimation iterations.

UpdateNorm

Norm of the search vector (gn-vector) in the last iteration. Empty when 'lsqnonlin' is the search method.

LastImprovement

Criterion improvement in the last iteration, shown in %. Empty when 'lsqnonlin' is the search method.

Iterations

Number of iterations performed by the estimation algorithm.

Warning

Any warnings encountered during parameter estimation.

InitRandState

The value of randn('state') at the last randomization of the initial parameter vector.

EstimationTime

Duration of the estimation.

Definition of idnlhw States

The Hammerstein-Weiner model structure consists of static nonlinearities around linear model as shown in the following figure.

The dynamic element of the model consists of the linear model alone. The states of the idnlhw model are the states of this linear component of the model. If this linear model is not a state-space structure (such as with single-input single-output cases), the states are defined as those of model Mss where Mss = idss(Model.LinearModel) and Model is the idnlhw object. The concept of states is useful for functions such as sim, predict, compare, findstates, data2state, findop, and linearize.

See Also

pem 
predict(idnlhw) 

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS