| Contents | Index |
m = nlhw(data,[nb nf nk])
m = nlhw(data,[nb nf nk],InputNL,OutputNL)
m = nlhw(data,[nb nf nk],InputNL,OutputNL,'PropertyName',PropertyValue)
m = nlhw(data,LinModel)
m = nlhw(data,LinModel,InputNL,OutputNL)
m = nlhw(data,LinModel,InputNL,OutputNL,'PropertyName',PropertyValue)
m = nlhw(data,[nb nf nk]) creates and estimates a Hammerstein-Wiener model using piecewise linear functions as its input and output nonlinearity estimators. data is a time-domain iddata object. nb, nf, and nk are positive integers that specify the model orders and delay. nb is the number of zeros plus 1, nf is the number of poles, and nk is the input delay.
m = nlhw(data,[nb nf nk],InputNL,OutputNL) specifies input nonlinearity InputNL and output nonlinearity OutputNL, as a nonlinearity estimator object or string representing the nonlinearity estimator type.
m = nlhw(data,[nb nf nk],InputNL,OutputNL,'PropertyName',PropertyValue) creates and estimates the model using options specified as idnlhw property name and value pairs. Specify PropertyName inside single quotes.
m = nlhw(data,LinModel) creates and estimates a Hammerstein-Wiener model using a linear model (in place of [nb nf nk]), and default piecewise linear functions for the input and output nonlinearity estimators. LinModel is a discrete-time input-output polynomial model of Output-Error (OE) structure (idpoly) or state-space model with no disturbance component (idss with K = 0) for single-output systems, and idss model with K = 0 for multi-output systems. LinModel sets the model orders, input delay, B and F polynomial values, input-output names and units, sampling time and time units of m.
m = nlhw(data,LinModel,InputNL,OutputNL) specifies input nonlinearity InputNL and output nonlinearity OutputNL.
m = nlhw(data,LinModel,InputNL,OutputNL,'PropertyName',PropertyValue) creates and estimates the model using options specified as idnlhw property name and value pairs.
data |
Time-domain iddata object. | ||||||||||||||||
nb, nf nk |
Order of the linear transfer function, where nb is the number of zeros plus 1, nf is the number of poles, and nk is the input delay. 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, OutputNL |
Input and output nonlinearity estimators, respectively, specified as a nonlinearity estimator object or string representing the nonlinearity estimator type.
Specifying a string creates a nonlinearity estimator object with default settings. Use object representation to configure the properties of a nonlinearity estimator. For ny output channels, you can specify nonlinear estimators individually for each output channel by setting InputNL or OutputNL to an ny-by-1 cell array or object array of nonlinearity estimators. To specify the same nonlinearity for all outputs, specify a single input and output nonlinearity estimator. |
LinModel |
Discrete time linear model, typically estimated using the oe or n4sid command:
|
Estimate a Hammerstein-Wiener model:
load iddata3 m1=nlhw(z3,[4 2 1],'sigmoidnet','deadzone')
Estimate a Hammerstein model with saturation:
load iddata1
% Create a saturation object with lower limit of 0
% and upper limit of 5:
InputNL = saturation('LinearInterval', [0 5]);
% Estimate model with no output nonlinearity.
m = nlhw(z1,[2 3 0],InputNL,[]);
Estimate a Wiener model with a nonlinearity containing 5 sigmoid units:
load iddata1
m2 = nlhw(z1,[2 3 0],[],sigmoidnet('num', 5))
Estimate a Hammerstein-Wiener model with a custom network nonlinearity:
% Define custom unit function and save it as gaussunit.m. function [f, g, a] = GAUSSUNIT(x) [f, g, a] = gaussunit(x) f = exp(-x.*x); if nargout>1 g = - 2*x.*f; a = 0.2; end % Estimate Hammerstein-Wiener model using the custom % Gauss unit function. H = @gaussunit; CNetw = cutomnet(H); m = nlhw(data,[na nb nk],CNetw)
Estimate a MISO Hammerstein model with a different nonlinearity for each input:
m = nlhw(data,[nb,nf,nk],...
[sigmoidnet;pwlinear],...
[])Refine a Hammerstein-Wiener model using successive calls of nlhw:
load iddata3 m3 = nlhw(z3,[4 2 1],'sigmoidnet','deadzone') m3 = nlhw(z3,m3) LinearBlock = m3.LinearModel % retrieves the linear block
Estimate a Hammerstein-Wiener model and avoid local minima:
load iddata3 M1 = nlhw(z3, [2 2 1], 'sigm','wave'); % original model M1p = init(M1); % randomly perturbs parameters about nominal values M2 = pem(z3, M1p); % estimates parameters of perturbed model
Estimate default Hammerstein-Wiener model using an input-output polynomial model of Output-Error (OE) structure:
% Estimate linear OE model.
load throttledata.mat
Tr = getTrend(ThrottleData);
Tr.OutputOffset = 15;
DetrendedData = detrend(ThrottleData, Tr);
opt = oeOptions('Focus','simulation');
LinearModel = oe(DetrendedData,[1 2 1],opt);
% Estimate Hammerstein-Wiener model using OE model as
% its linear component and saturation as its output nonlinearity.
NonlinearModel = nlhw(ThrottleData, LinearModel, [], 'saturation') customnet | deadzone | findop(idnlhw) | idnlhw | linapp | linearize(idnlhw) | pem | poly1d | pwlinear | saturation | sigmoidnet | unitgain | wavenet

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |