| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → System Identification Toolbox |
| Contents | Index |
| Learn more about System Identification Toolbox |
n=neuralnet(Network)
neuralnet is an object that stores the neural network nonlinearity estimator for estimating nonlinear ARX and Hammerstein-Wiener models.
You can use the constructor to create the nonlinearity object, as follows:
n=neuralnet(Network) creates a neural network nonlinearity estimator based on the network object you created using the Neural Network Toolbox™ product.
The neural network must meet the following requirements:
Neural network must be created using the Neural Network Toolbox newff or newcf command (feedforward networks used for function approximation).
Neural network must represent a static mapping between the inputs and the output. It should not contain I/O delays or feedback.
Neural network must have one output. If you want to use neural networks for multiple-output nonlinear ARX model, you must assign a separate neuralnet estimator for each output—that is, each estimator must represent a single-output network object.
Use evaluate(n,x) to compute the value of the function defined by the neuralnet object n at x.
Use neuralnet to define
a nonlinear function
, where F is
a multilayer feedforward neural network, as defined in the Neural Network Toolbox documentation.
y is a scalar and x is an m-dimensional row vector.
When you have installed the Neural Network Toolbox product, you can create a multilayer feedforward neural network using the Neural Network Toolbox function newff:
ff = newff(P,T,[nL_1,nL_2,..,nL_r],{tf_1,tf_2,...,tf_r})where P is an m-by-N matrix containing inputs x, and T is a 1-by-N matrix containing output (target) values for one of the model outputs. You can also use the Neural Network Toolbox function newcf.
There are r+1 layers and nL_k neurons in the kth layer, except for the last layer. The last layer has one neuron assigned automatically, such that nL_(r+1)=1. The transfer function (or unit function) in the kth layer is tf_k.
If m is unknown at the time of creation of the network, use P = zeros(0,N) with arbitrary N>0. After this initialization, m is adjusted to the estimation data by nlarx or nlhw. Similarly, you can set T to any vector (number of rows=1).
You include the property as an argument in the constructor to specify the object.
After creating the object, you can use get or dot notation to access the object property values. For example:
% List Network property value get(n) n.Network
You can also use the set function to set the value of particular properties. For example:
set(d, 'Network', net_obj)
The first argument to set must be the name of a MATLAB variable.
| Property Name | Description |
|---|---|
| Network | Neural network object. You must use the Neural Network Toolboxnewff or newcf command to create such an object. |
The newff and newcf commands automatically create a network object configured for use with the System Identification Toolbox software. When you manually configure the network object (net), specify its properties as follows:
net.numInputs=1
The single input can be a vector.
net.numLayers
Must be a positive integer (nL).
net.inputConnect=[1;zeros(nL-1,1)]
The first layer must be connected to the input.
net.outputConnect=[zeros(1,nL-1) 1]
The last layer must be connected to the output.
net.layerConnect
Must be an nL-by-nL logical matrix that satisfies the following conditions:
Each layer, except the last one, must have its output connected to another layer all(any(net.layerConnect(:,1:end-1),1),2) == true
Each layer, except the first one, must have its input connected to another layer all(any(net.layerConnect(2:end,:),2),1) == true
Typical value is diag(true(1,nL-1),-1) and represents a series connection from the first layer to the last layer.
net.trainFcn
Must be set to the MATLAB training function name (MATLAB file, MEX-file, built-in, or P-file).
all(any(net.layerConnect(2:end,:),2),1) == true
net.inputs{1}.size
Must be set zero (undetermined) or a positive integer equal to the number of regressors.
net.initFcn='initlay'
Indicates the use of layer initialization functions.
net.gradientFcn='calcjx'
net.performFcn
Must be set to the MATLAB performance function name (MATLAB file, MEX-file, built-in, or P-file).
any(exist(net.performFcn)==[2 3 5 6]) == true
Typical value is 'mse'.
net.trainParam
Must be a structure with fields:
epochs goal max_fail mem_reduc min_grad mu mu_dec mu_inc mu_max show showCommandLine showWindow time
net.layers(k).initFcn for k=1:nL
Must be set to the MATLAB initialization function name (MATLAB file, MEX-file, built-in, or P-file).
any(exist(net.layers{k}.initFcn)==[2 3 5 6]) == true
Typical value is 'initnw'.
net.biasConnect=logical(net.biasConnect)
Must be a logical value.
Note The layer numbers, namely the values of k in net.layers{k}, are labels referring to the different layers. The layers are not necessarily connected in the natural order indicated by k. It means that, in principle, net.layers{1} is not necessarily the input layer, and net.layers{end} is not necessarily the output layer. However, topologically, there is no loss of generality to assume that net.layers{1} is the input layer and net.layers{end} is the output layer. The previous requirements make these assumptions to simplify how you can validate your network object. |
When the idnlarx property Focus is 'Prediction', neuralnet uses the train method of the network object in the Neural Network Toolbox software for estimating parameters.
You cannot use nerualnet when Focus is 'Simulation' because this nonlinearity estimator is not differentiable. Minimization of simulation error requires differentiable nonlinear functions.
Use neuralnet to specify the neural network nonlinearity estimator in nonlinear ARX and Hammerstein-Wiener models. For example:
% Create network object using Neural Network Toolbox
net_obj=newff(zeros(0,10),rand(1,10),[6 8 2],...
{'logsig','logsig','purelin'})
% Estimate nonlinear ARX model using
% net_obj as the neural network
m=nlarx(z1,[2,6,10],neuralnet(net_obj));| nlarx | |
| nlhw |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |