I need to optimize the parameters of pid controller using neural network. I am using the following code for my work.
load inpload outfile1=inp./20;file2=out;p=file1';t=file2';H = 15; % trial No. of hidden nodes for I-H-O node topology
net = newff(minmax(p),[ H 1 ], {'tansig' 'purelin'}, 'trainlm' ); net.trainParam.epochs=1000;net.trainParam.goal=0;net.trainParam.min_grad=1e-10;net.trainParam.mu=0.001;net.trainParam.mu_max=1e10;net.trainParam.show=100;net.trainParam.showCommandLine=0;net.trainParam.lr=0.02;net.divideFcn='';[ net tr Y E ] = train(net,p,t);sim(net,p)
where "inp" and "out" data are collected from the model as input and output of pid block. inp and out are a matrix of 775 X 1 elements.
But in the regression plot obtained after running the code, I only get a cluster of data at the bottom left corner, while it should be uniformly distributed along the fit line
Kindly help..
Best Answer