How to improve neural network closedloop performance?

2 views (last 30 days)
I'm trying to simulate a Thermal Storage with Matlab NARX to predicting a time series problem. My input data are ambient Temp. , Direct Sun Radiation and Diffuse Sun Radiation [3*1440]. My Output is 4 surface Temp of the storage [4*1440]. 1440 time points of a day. I'm trying to build a network to predict the Output for another day. My problem is that the closedloop Performance is really high (about 10) , although the network performance is good (about 0.005 ). My network has three layers [30 25 20]. Second Layer has 'logsig' as transfer function. I've trained the network twice before closing the loop. I've used 'trainbr' for function and 'divideblock' for dividing the data. I've tried to train the Network also after closing the loop but the performance got poorer.
X = tonndata(ID,true,false);
T = tonndata(OD,true,false);
trainFcn = 'trainbr'
inputDelays = 1:4;
feedbackDelays = 1:4;
hiddenLayerSize = [30 25 20];
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize,'open',trainFcn);
net.layers{2}.transferFcn = 'logsig';
net.inputs{1}.processFcns = {'removeconstantrows','mapminmax'};
net.inputs{2}.processFcns = {'removeconstantrows','mapminmax'};
[x,xi,ai,t] = preparets(net,X,{},T);
net.divideFcn = 'divideblock';
net.divideMode = 'time'
net.divideParam.trainRatio = 90/100;
net.divideParam.valRatio = 5/100;
net.divideParam.testRatio = 5/100;
net.performFcn = 'mse'
net.plotFcns = {'plotperform','plottrainstate', 'ploterrhist', ...
'plotregression', 'plotresponse', 'ploterrcorr', 'plotinerrcorr'};
net.trainParam.goal=.05;
net.trainParam.max_fail=6;
[net,tr] = train(net,x,t,xi,ai);
net.trainParam.goal=.005;
net.trainParam.max_fail=6;
[net,tr] = train(net,x,t,xi,ai);
y = net(x,xi,ai);
e = gsubtract(t,y);
performance = perform(net,t,y)
I've tried many different layer size and different delays different functions ... that was the best one till now! Can anyone help me with this problem? how should I train the network after closing the loop? is this correct?
[xc,xic,aic,tc] = preparets(netc,X,{},T);
yc = netc(xc,xic,aic);
closedLoopPerformance = perform(net,tc,yc)
netc.trainParam.goal=1;
netc.trainParam.max_fail=6;
[net,tr] = train(netc,xc,tc,xic,aic);
  3 Comments
Shar
Shar on 11 Nov 2015
Thanks for your comment Greg, sorry, but I don't get your first comment, what are cross-correlation and autocorrelation lags? and how should I estimate them?
Greg Heath
Greg Heath on 13 Nov 2015
The obvious answer is to search the NEWSGROUP and ANSWERS using those terms. For example, start with the NEWSGROUP searches
greg crosscorrelation 46 hits
greg cross-correlation 48 hits
greg cross correlation 73 hits
etc
Greg

Sign in to comment.

Answers (0)

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!