Look up table optimizer

6 visualizaciones (últimos 30 días)
Vick
Vick el 6 de Oct. de 2018
Dear All, I've a simulink model of non-Linear equation with a lookup table in it. Say for example consider the following equation, X=a.x1+b.x2+c.(sqrt(x1));
Where the a,b,c are the independent variable ; X is dependent variable(model value) x1,x2 are the output of two 1D- lookup tables which depends on other independent variable(d,e).
Here the goal is, i've the measured data of X,a,b,c,d,e. I need to optimize the lookup tables for reducing the error between the model (output of the equation) and the measured values of X. In all the solvers available on matlab i could use only nlinfit solver to solve the above problem as many solver doesn't run because of the usage of interp function inside the solver function. Following is the way i use in nlinfit
Lookuptable_BreakPoints=1:8;
Lookuptable1=[10,20,30,40,50,60,70,80]; % Initial dummy value
Lookuptable2=[10,20,30,40,50,60,70,80]; % Initial dummy value
B= [Lookuptable1,Lookuptable2]; % Initial Guess
data= [a,b,c,d,e]; Output=X;
nlinfit( data,Output,@solver_function,B)
function Output= solver_function(B,data)
a=data(:,1);b=data(:,2);c=data(:,3);d=data(:,4);e=data(:,5);
Lookuptable1=B(1:8);
Lookuptable2=B(8:16);
x1=interp1(1:8,Lookuptable1,d);
x2=interp1(1:8,Lookuptable2,e);
Output=a.*x1+b.*x2+c.*(sqrt(x1));
This process is perfectly optimizing my data, but the problem here is i need both the Lookuptables values to be in increasing order only even if some error is available it is ok . Here for reducing the SSE the solver gives a very random value even in first iteration itself
Is there any solver available which increases/decreases the initial guess in a step wise manner so that i can stop the iterations once i find the trend of B changes more ? Or is there any other way to solve using lookup table optimizer?

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by