Using Levenberg-Marquardt algorithm in the optimization

조회 수: 2 (최근 30일)
RAPHAEL OWENS
RAPHAEL OWENS 2020년 4월 22일
댓글: Robert U 2020년 5월 5일
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)).

채택된 답변

Robert U
Robert U 2020년 4월 23일
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
RAPHAEL OWENS
RAPHAEL OWENS 2020년 4월 28일
Hallo Robert, I need further clarity. How can i get the value of a parameter using optimization.
I=i_ph - (c_01 * T^3 * exp(-((e_g*e)/(k*T)))) .* (exp(U./(m_1*Ut))-1);
The parameter is c_01
The real value of c_01 is 170.8
So the optimized value will be also the real value.
Can you kindly break down the explanation also, because the genral idea is to get a parameter when we are just given the vectors that makes up the curve.
If we were just given UI value and the curve, and also some constants, how will i get an X parameter.
I hope my question is clear enough. Thanks
t=25; %temperature (C)
T=t+273; %temperature (K)
i_ph=3.113; %phase current [A]
e_g=1.12; %band gap [eV]
m_1=1.00; %diode factor
e=1.6*10^-(19); %electronvolt [j]
k=1.38*10^-(23); %Boltzmann constant [JK^(-1)]
U=(0:0.001:0.6); %voltage [V]
Ut=(k*T)/e;
Ut=0.0257
I=i_ph - (c_01 * T^3 * exp(-((e_g*e)/(k*T)))) .* (exp(U./(m_1*Ut))-1);
Robert U
Robert U 2020년 5월 5일
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:
  1. Supply U (xdata)
  2. Measure I (ydata)
  3. Give known parameters
  4. Fit to model funcion.
Kind regards,
Robert

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by