# idCustomNetwork

Custom network function for nonlinear ARX and Hammerstein-Wiener models

## Description

An `idCustomNetwork`

object implements a custom network function,
and is a nonlinear mapping function for estimating nonlinear ARX and Nonlinear
Hammerstein-Wiener models. The mapping function, which is also referred to as a
*nonlinearity*, uses a combination of linear weights, an offset and a
nonlinear function to compute its output. The nonlinear function contains custom unit
functions that operate on a ridge combination (weighted linear sum) of inputs.

Mathematically, `idCustomNetwork`

is a function that maps
*m* inputs *X*(*t*) =
[*x*(*t*_{1}),*x*_{2}(*t*),…,*x _{m}*(

*t*)]

^{T}to a scalar output

*y*(

*t*) using the following relationship:

$$y(t)={y}_{0}+{\rm X}{(t)}^{T}PL+C({\rm X}(t))$$

Here:

*X*(*t*) is an*m*-by-1 vector of inputs, or*regressors*.*y*is the output offset, a scalar._{0}*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.*C*(*X*) is a sum of dilated and translated custom unit functions. The total number of unit functions is referred to as the*number of units**n*of the network.

For the definition of the unit function term *C*(*X*) ,
see More About.

Use `idCustomNetwork`

as the value of the `OutputFcn`

property of an `idnlarx`

model or the
`InputNonlinearity`

and `OutputLinearity`

properties
of an `idnlhw`

object. For example, specify
`idCustomNetwork`

when you estimate an `idnlarx`

model with
the following
command.

sys = nlarx(data,regressors,idCustomNetwork)

`nlarx`

estimates the model, it essentially estimates the parameters
of the `idCustomNetwork`

function.
You can configure the `idCustomNetwork`

function to disable components and
fix parameters. To omit the linear component, set `LinearFcn.Use`

to
`false`

. To omit the offset, set `Offset.Use`

to
`false`

. To specify known values for the linear function and the offset,
set their `Value`

attributes directly and set the corresponding
`Free`

attributes to `False`

. Use `evaluate`

to compute the output of the function for a given vector of
inputs.

## Creation

### Syntax

### Description

creates a nonlinear mapping object with a user-defined unit function using the function
handle `C`

= idCustomNetwork(`H`

)`H`

. `H`

must point to a function of the form
`[f,g,a] = function_name(x)`

, where `f`

is the value
of the function, `g = df/dx`

, and `a`

indicates the unit
function active range `[-a a]`

where `g`

is
significantly nonzero. Hammerstein-Wiener models require that your custom function have
only one input and one output.

specifies whether the function uses a linear function as a subcomponent.`C`

= idCustomNetwork(`H`

,`numUnits`

,`UseLinearFcn`

)

specifies whether the function uses an offset term
`C`

= idCustomNetwork(`H`

,`numUnits`

,`UseLinearFcn`

,`UseOffset`

)*y _{0}* parameter.

### Input Arguments

## Properties

## Examples

## More About

## Algorithms

`idCustomNetwork`

uses an iterative search technique for estimating
parameters.

## Version History

**Introduced in R2007a**