Diode fitting with 5 parameters

조회 수: 8 (최근 30일)
Rosemarie
Rosemarie 2014년 6월 20일
답변: arushi 2024년 8월 12일
I used fsolve function (advised by Mischa Kim) to solve the diode equation and it worked (with small modification on (q/nkT).
fun = @(I) Il - Io * exp((V + I*R)/(n*kT_q)) - (V + I*R)/S - I;
Now I need to do a fitting using the same equation but this time I need Matlab to iterate the values for:
Il , Io, R, n, S,
in order to solve I which will give me the best fit against the experimental I (Iexp) where V is the independent variable. I guess I will need the least square function for that but first how do I ask Matlab to do the iteration and eventually solve the I?
Thank you very much for your help.
Rosemarie
  댓글 수: 1
Rosemarie
Rosemarie 2014년 6월 20일
Further to my question above, the 5 parameter (Il , Io, R, n, S,) values will be the same for all Icalc.
Cheers.
Rosemarie

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

답변 (1개)

arushi
arushi 2024년 8월 12일
Hi Rosemarie,
To perform a fitting using the diode equation and find the parameters (I_l), (I_o), (R), (n), and (S) that best fit your experimental data, you can use the lsqcurvefit function in MATLAB. This function performs non-linear least squares fitting.
Here's a step-by-step guide to achieve this:
  1. Define the diode equation function: Create a function that computes the current (I) given the parameters and the voltage (V).
  2. Define the objective function for lsqcurvefit: The objective function should return the difference between the experimental current (I_{\text{exp}}) and the computed current (I).
  3. Use lsqcurvefit to find the best-fit parameters: Call the lsqcurvefit function with initial guesses for the parameters.
Hope this helps.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by