www.gusucode.com > ident 案例代码 matlab源码程序 > ident/EstimateNonlinearARXModelAndAvoidLocalMinimaExample.m

    %% Estimate Nonlinear ARX Model and Avoid Local Minima
% If an estimation stops at a local minimum, you can perturb the model
% using |init| and reestimate the model.

% Copyright 2015 The MathWorks, Inc.


%%
% Load the estimation data.
load iddata1;

%%
% Estimate the initial nonlinear model using specific nonlinear
% regressors.
sys1 = nlarx(z1,[4 2 1],'sigmoidnet','NonlinearRegressors',[1:3]);

%%
% Randomly perturb the model parameters to avoid local minima.
sys2 = init(sys1);

%%
% Estimate the new nonlinear model with the perturbed values.
sys2 = nlarx(z1,sys2);