How to solve the implicit equation

11 views (last 30 days)
Filimena Jakovleska
Filimena Jakovleska on 25 Nov 2021
Answered: Star Strider on 25 Nov 2021
Hello, my problem is solving the equation:
((alfa*Vt*Vmpp*(2*Impp-Isc))/((Vmpp*Isc+Voc*(Impp-Isc))*(Vmpp-Impp*R)-alfa*Vt(Vmpp*Isc-Voc*Impp)))-exp((Vmpp+Impp*R-Voc)/(alfa*Vt)) =0
I tried a lot of things, but I am still not able to get the solution. I don't know how to use fsolve function, so i used fzero:
R = fzero(@(R) ((alfa*Vt*Vmpp*(2*Impp-Isc))/((Vmpp*Isc+Voc*(Impp-Isc))*(Vmpp-Impp*R)-alfa*Vt(Vmpp*Isc-Voc*Impp)))-exp((Vmpp+Impp*R-Voc)/(alfa*Vt)), Rguess)
It gives me Undefined function or variable 'Rguess'.
Thank you.

Answers (1)

Star Strider
Star Strider on 25 Nov 2021
First, a multiplication operator (my best guess, anyway) is missing:
((alfa*Vt*Vmpp*(2*Impp-Isc))/((Vmpp*Isc+Voc*(Impp-Isc))*(Vmpp-Impp*R)-alfa*Vt(Vmpp*Isc-Voc*Impp)))-exp((Vmpp+Impp*R-Voc)/(alfa*Vt)) = 0
↑ ← HERE
That threw an error when I initially ran it.
None of the variable values are supplied.
syms alfa Vt Vmpp Impp Isc Voc R
Eqn = ((alfa*Vt*Vmpp*(2*Impp-Isc))/((Vmpp*Isc+Voc*(Impp-Isc))*(Vmpp-Impp*R)-alfa*Vt*(Vmpp*Isc-Voc*Impp))) - exp((Vmpp+Impp*R-Voc)/(alfa*Vt))
Eqn = 
Rv = 
The expression will not simplify further, and an analytic (symbolic) solution in terms of R is not possible.
If the objective is to find the root or roots of the equation, as fzero and fsolve are designed to provide, it is possible that with the (unknown) supplied values (assumed to be scalar), no roots exist. One option is to supply ‘Rguess’ as a complex random variable, since this will cause fsolve to consider complex roots. However without knowing more, it is not possible to address this.
If the range of ‘R’ is known, even approximately, plotting the equation as a function of ‘R’ would immediately reveal any real roots that might exist. Plotting ‘R’ as a complex matrix (using surf) would be a bit more of a challenge, however likely possible.
.

Community Treasure Hunt

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

Start Hunting!