Using Levenberg-Marquardt algorithm in the optimization
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
RAPHAEL OWENS
am 22 Apr. 2020
Kommentiert: Robert U
am 5 Mai 2020
How can I use the optimization tool preferable to find a given value in an equation. This is the main equation I=i_ph-Is.*(exp(U./(m_1*Ut))-1) and I have a IU curve, but i want to get the value of 'c_01' in the sub equation Is=c_01*T^(3)*exp((-e_g*eV)/(k*T)).
0 Kommentare
Akzeptierte Antwort
Robert U
am 23 Apr. 2020
Hi RAPHAEL OWENS,
there are several solvers and methods available. One of the available functions in Matlab is lsqcurvefit(). Below there is a sketch of how to apply the function on your (supposedly) available data.
% known parameters
T
e_g
eV
k
i_ph
m_1
Ut
% underlying equation
Is = @(c_01) c_01 * T^3 * exp((-e_g*eV)/(k*T));
I = @(c_01,U) i_ph - Is(c0_1) .* (exp(U./(m_1*Ut))-1);
% start value(s) for optimization
c_01_guess = 1;
% choose algorithm, and possibly other options for optimization solver
opt = optimoptions('lsqcurvefit');
opt.Algorithm = 'levenberg-marquardt';
% run optimization
c_01_opt = lsqcurvefit(I,c_01_guess,U_measured,I_measured,[],[],opt);
Kind regards,
Robert
9 Kommentare
Robert U
am 5 Mai 2020
Hi RAPHAEL OWENS,
I am not sure whether I understood your question correctly: Where do I acquire xdata and ydata on real data?
Usually you are measuring the U-I-curve by supplying U and measuring I. In that case the real data are "U" (xdata) and "I" (ydata). The grid does not matter since you are trying to fit the data to a model function. It just needs to be fine enough to cover the overall model function characteristics.
In a nutshell:
- Supply U (xdata)
- Measure I (ydata)
- Give known parameters
- Fit to model funcion.
Kind regards,
Robert
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Optimization Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!