Need help to solve and plot implicit diode equation
26 views (last 30 days)
Show older comments
Hey everyone!
I need some help trying to solve the following equation for I, given different values of V.
I = Il - Io * exp(q * (V + IR) / (n * k * T)) - (V + I*R) / S
This is the equation of a diode with a constant photo-current (Il) and injection current moving through it. The circuit has a series and a shunt resistance.
The trouble with this equation is that current depends on the voltage drop across components (V is the applied forward bias) and to evaluate that I need to use the relation V = IR (Ohm's Law).
This makes it a recursive equation of sorts. Can someone please help me understand how to plot I as a function of V? I'm new to this so it is possible that the solution is straightforward.
Thanks! :D
0 Comments
Answers (4)
Mischa Kim
on 16 Jun 2014
Edited: Mischa Kim
on 17 Jun 2014
Something like
V = 0:0.1:10;
% define function you want to solve for: fun = 0
fun = @(I) Il - Io * exp((V + I*R)/(n*kT_q)) - (V + I*R)/S - I;
% get solution for all V
I_sol = fsolve(fun, Il*ones(size(V)));
plot(V,I_sol)
3 Comments
Tanmay
on 27 Aug 2014
Hi Rosemarie, I am also working on similar problem as yours. I have some doubt in building the equations for infinite diode ladder equation. Could you please, show me your circuit ?
Rosemarie
on 27 Aug 2014
Hi Tanmay. I used the single diode circuit for my solar cell J-V data fitting just like the one on this link:
Roger Stafford
on 17 Jun 2014
An explicit solution for I as a function of V can be found using matlab's 'solve'. The solution involves the 'lambertw' function.
1 Comment
lloyd mukunza
on 20 Sep 2014
everytime I try to use the solve fuction it gives [sysm empty] and says the explicit solution can not be found. I noticed the moment I introduce the + in the exp component that's when this error occurs. so I have tried this simple equation to solve for x: take for example x = exp(x+y) and try to solve for x using
syms x y
solve('x = exp(x+y)',x)
it gives
[sym empty].
How then do I solve for x in this simple equation.
Roger Stafford
on 21 Sep 2014
@Abhi. The explicit solution for I in the equation
Il-Io+exp(q*(V+I*R)/(n*k*T))-(V+I*R)/S = I
which I obtained using my (ancient) 'solve' function is:
I = ((Il-Io)*S-V)/(R+S) - ...
n*k*T/q/R*lambertw(-exp(S*q*(V+R*(Il-Io))/n/k/T/(R+S))*S*q*R/n/k/T/(R+S))
The 'lambertw' function in this should be a part of your Symbolic Toolbox or MuPad. Note that for some values of its argument there are two possible real answers. The function provides a flag for selecting which of these answers (which "branch") you wish to use.
2 Comments
lloyd mukunza
on 23 Sep 2014
Abhi can you explain to me how you used the solve function. help me with the code. I have tried it som many times but I get [syms empty]
lozkane
on 26 Sep 2016
Roger, I am interested in the explicit Lambert solution. When I test this, however, I find the solution for the Lambert part of the equation fails with any voltage value above ~ 1. This appears to be the case regardless of which branch is used. I am testing with a module (Munchen MSP290AS-36.EU) at STC ratings. Can you offer any further information to assist in debugging this?
Han
on 17 Nov 2022
current-voltage and capacitance-voltage characteristics of Au/n-GaAs and Au/GaN/n-GaAs Schottky diodes in wide temperature rang (Need solve and plot diod equation - MATLAB ANSWERES)
0 Comments
See Also
Categories
Find more on Equation Solving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!