What neural network should I use?

3 views (last 30 days)
raduser
raduser on 2 Nov 2016
Edited: raduser on 5 Nov 2016
My objective is reconstruction of road profiles from acceleration data. I've got as starting data for my problem, measured road profiles (elevations with steps of 1 m or 0.1 m or 0.025 m for each profile). I'm using models such as quarter/half/full car models to determine the relative accelerations. My goal is to use these associated profile accelerations as input to predict each original profile with minimal errors.

Answers (2)

Greg Heath
Greg Heath on 3 Nov 2016
help fitnet
doc fitnet
Hope this helps.
Thank you for formally accepting my answer
Greg
  1 Comment
raduser
raduser on 3 Nov 2016
Edited: raduser on 3 Nov 2016
Thanks. I used the "fitnet" network on the various profiles of 1, 0.1 and 0.025 m steps. So far, I get very bad results. The "best" result is a performance (mse) of 3 for profiles with 1 m steps - smallest dataset, compared to 80 mse for 0.1 steps and over 1000 mse for 0.025 steps - biggest dataset.
X=importdata('profileaccelerations.mat'); X=X'; X = con2seq(X);
T=importdata('profileelevations.mat'); T=T'; T = con2seq(T);
net=fitnet(10);
net=train(net,X,T);
y=net(X);
However, when I tried to plot the 1 m - best solution of 3 mse, comparing the Y - output with the T target.. I got this:
data 1 is target profile, data 2 is network output profile
By the way, I also tried to use different training algorithm trainbr. The performance is not significantly better even if this takes a lot longer to train the net. What should I do to increase this performance?
I understood from one of your previous posts that network performance should be reasonably good if the network is the "right" one.. So, I'm guessing that maybe this is not right network, since results are this bad. In the meantime, while waiting for answers, I did some research on different publications and it seems that many scholars use an other neural network for this specific problem called NARX combined with a Bayesian regulation somehow. From what I red on matlab documentation, it can be used for prediction in a closed form.

Sign in to comment.


raduser
raduser on 4 Nov 2016
Edited: raduser on 5 Nov 2016
@Greg Heath:
While waiting for other suggestions from you on how to improve, if possible, the performance of the fitnet network, I looked more in detail on the NARX option. So, using your suggestions on the NEWSGROUP (here https://it.mathworks.com/matlabcentral/newsreader/view_thread/332147.html?) and using other of your posts that I found in the past days, I managed to set up a neural network for my case.
X=importdata('profileaccelerations.mat'); X=X'; X = con2seq(X);
T=importdata('profileelevations.mat'); T=T'; T = con2seq(T);
d1=[0];
d2=[1];
neto = narxnet(d1,d2,10);
neto.divideFcn = 'divideblock';
neto.trainFcn = 'trainbr';
neto.trainParam.min_grad = 1e-10;
[Xs,Xi,Ai,Ts] = preparets(neto,X,{},T);
neto = train(neto,Xs,Ts,Xi);
Y = sim(neto,Xs,Xi);
perf = perform(neto,Ts,Y)
perf = 0.1993
ts = cell2mat(Ts);
MSE00s = mean(var(ts',1))
MSE00s = 1.5193e+03
R2s = 1 - perform(neto,Ts,Y)/MSE00s;
R2s = 0.9999
netc = closeloop(neto);
[Xcs,Xci,Aci,Tcs] = preparets(netc,X,{},T);
Ycs = netc( Xcs, Xci, Aci );
R2cs1 = 1 - perform(neto,Tcs,Ycs)/MSE00s;
R2cs1 = -22.4185
[ neto tr Ycs Ecs Xcf Acf ] = train( netc, Xcs, Tcs, Xci, Aci );
perfc = perform(neto,Tcs,Ycs)
perfc = 1.5013e+03
R2cs2 = 1 - perform(neto,Tcs,Ycs)/MSE00s
R2cs2 = 0.0373
Notes:
- delays ID and FD: tried more solutions this seems best
- divide function: I saw you suggested to use divideblock. Tried using ' ' but divideblock is slightly better
- training funtion: this training trainbr behaves better than trainlm
The first performance, of the openloop, 0.1993 is great and I was very enthusiastic. If I plot Y and T, the two profiles are almost identical. But when I close the net, the performance is terrible as you can clearly see. What are your advices to improve this?
I wish to sincerely thank you for all your posts. I am new to neural networks and your contributions really helped me until now. I am strugling with this problem and could not find a solution on the community forums NEWSGROUP or ANSWERS.
Thank you in advance.

Categories

Find more on Deep Learning Toolbox 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!