idPiecewiseConstant
Description
The idPiecewiseConstant object stores the piecewise-constant
nonlinearity estimator for estimating Hammerstein-Wiener models. You can use piecewise
constant nonlinearity in Hammerstein-Wiener models to model hysteretic behavior, quantization
nonlinearity, and gain-scheduled linear models.
Use idPiecewiseConstant to define a nonlinear function , where y and x are scalars. The
nonlinearity function, F, is a piecewise constant function of
x. There are n break points
(xk,yk),
k = 1,...,n, such that yk =
F(xk). F is calculated at each break point and remains constant
until the next break point. F is also constant to the left and right of the
extreme break points.
The break points are ordered by ascending x values, which is important to consider when you want to set a specific break point to a different value. There are minor differences between the break point values you set and the values stored in the object because the toolbox has a different internal representation of break points.
For example, in this plot, the break points are xk = [-2,1,4] and the corresponding nonlinearity values are yk = [4,3,5].

You compute the value of F(x) using evaluate(NL,x),
where NL is the idPiecewiseConstant object. When using
evaluate, you have to initialize the break points manually. Use the
stairs command to obtain the plot.
For idPiecewiseConstant object properties, see Properties.
Creation
Syntax
Description
creates a default
piecewise-constant nonlinearity estimator object with 10 break points for estimating
Hammerstein-Wiener models. The break points and their nonlinearities are set to
NL = idPiecewiseConstant[]. The initial values of the nonlinearities are determined from the
estimation data range during estimation using nlhw.
creates a piecewise-constant nonlinearity estimator object for estimating
Hammerstein-Wiener models with the number of break points equal to
NL = idPiecewiseConstant(numberOfUnits)numberOfUnits. The break points and their nonlinearities are set to
[].
creates a piecewise-constant nonlinearity estimator object with the break points and their
corresponding nonlinearity values as specified in NL = idPiecewiseConstant(BreakPoints=breakPoints)breakPoints.
Input Arguments
Properties
Examples
Version History
Introduced in R2025a