MATLAB Answers

Multi Input Neural Network with delayed target input.

5 views (last 30 days)
Emil
Emil on 13 Mar 2013
I'd like to design a neural network that takes multiple inputs, one of them being a delayed average of the target output.
The below "example" code will make a diagram with what I hope is a real time (no delay) inputs for x1,x3,x4,x5,x6 & a delay of 8 steps in time for y(t). With that delayed step in time made up of an moving average of 1:8 steps.
Thanks for your feedback...
inputDelays = 1:1;
feedbackDelays = 1:1;
hiddenLayerSize = 4;
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);
net.numInputs=6;
net.inputs{1}.name='x1';
net.inputs{2}.name='y';
net.inputs{3}.name='x3';
net.inputs{4}.name='x4';
net.inputs{5}.name='x5';
net.inputs{6}.name='x6';
net.inputConnect=logical([1 1 1 1 1 1; 0 0 0 0 0 0]);
net.inputWeights{1,1}.delays=0;
% delayed 8 steps in time wrt other inputWeights
% when appled value is avg of 1:8 steps
net.inputWeights{1,2}.delays=1:8;
net.inputWeights{1,3}.delays=0;
net.inputWeights{1,4}.delays=0;
net.inputWeights{1,5}.delays=0;
net.inputWeights{1,6}.delays=0;
view(net)

Accepted Answer

Greg Heath
Greg Heath on 15 Mar 2013
To be consistent with MATLAB notation, rename the target t and the output y.
What are the significant correlation delays in the target autocorrelation function?
What are the significant correlation delays in the 5 crosscorrelation functions between the target and the 5 inputs?
Do you realize that
a. For nondelayed inputs min(ID) = 0
b. All 5 inputs will have the same delays but the output feedback delays can be different.
c. Multiple inputs and delays all share the same delay buffer that has the length LDB = max( [ 1+max(ID), max(FD) ])
d. All delays <= LBD do not have to be included in ID or FD
Don't introduce the complication of an 8 point moving average feedback delay input. Just put the delays in the buffer and let the training algorithm decide how to weight them.
Hope this helps.
Thank you for formally accepting my answer
Greg

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!