Delays in the Neural Network Toolbox

Hey everyone,
after reading a lot of docs about this, I still can't figure out precisely how delays in the NN toolbox work.
Following problem given: I need to predict the outside temperature 6 hours ahead, given temperature measurements of the last 24 hours and the (fuzzy) time of day that will be in 6 hours. Therefore, I'm looking for a function
tempIn6Hours(temp(now), temp(now - 1 hour), temp(now - 2 hours), ... , temp(now - 24 hours), dayTime(now + 6 hours))
I have a vector of temperature measurements with time steps of 15 mins and another vector of the same length containing the corresponding daytimes.
Currently, I do the following:
valsPerHour = 4; % 60 / 15 mins
inputDelays = 0;
feedbackDelays = (6 * valsPerHour) : valsPerHour : (29 * valsPerHour);
hiddenLayerSize = 100;
net = narxnet(inputDelays, feedbackDelays, hiddenLayerSize);
As you can see, I specified as 'delays' the timesteps at which I want the values to be fed back into the network: 6 hours later, 7 hours later,...
Is this correct? If not, how should I do it?
Greetings and thanks a lot in advance,
Eike

7 Kommentare

Eike
Eike am 5 Feb. 2012
Hum, can I provide any further information? Is the problem not clear enough? Or why does noone answer?
Eike
Eike am 14 Feb. 2012
I've done even more reading and research and now I'm a bit more sure that what I did is correct, but still... I'd appreciate any comment on the above code very much, even if it's simply "No, that's wrong."!
Eike
Eike am 14 Feb. 2012
My idea on the further proceeding now would be to keep the system in open loop form, since I need to provide current temperature measurements while the prediction is running.
I would then try to convert the ANN to a Simulink block (I've read somewhere that this is possible...?) and integrate it in a heating control model.
Do these steps sound reasonable?
Eike
Eike am 16 Feb. 2012
Please, anyone talk to me... or at least vote the question up, so someone who knows about the topic will see and answer it...
Greg Heath
Greg Heath am 4 Mär. 2012
Just curious:
Have you determined that using 1 hour delay intervals is just as good as half or quarter hour intervals?
Greg
Eike
Eike am 6 Mär. 2012
I did some experiments some time ago that indicated that one-hour intervals were sufficient. However, I've changed a lot of parameters since then so I guess I'll do another test run. I'll inform you of the results. Might take 2-3 weeks, though.
Greetings, Eike
Eike
Eike am 19 Mär. 2012
Okay, I tested it again and 1-hour intervals still seem to be sufficient.
Eike

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Mark Hudson Beale
Mark Hudson Beale am 1 Mär. 2012

0 Stimmen

Yes you are correct. The way you have set delays the network at each time step will be responsive to the current fuzzy time of day (the external input) and the previous temperatures from 6 hours ago, 7 hours ago, ... 29 hours ago (the feedback).
If you simulate the network in open loop mode, it will be responding to the actual temperatures from 6, 7, .. 29 hours ago.
If you convert the network to closed loop (net = closeloop(net)) then it will be responding to its own predictions of temperature 6, 7, ... 29 hours ago in simulation time. You can use this mode to to multi-step ahead prediction, although because it is making new predictions based on old predictions it will not be as accurate as the open loop simulation, and due to drift will only be accurate for a certain number of time steps depending on how complicated the prediction is.

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by