Question on setting up a fitting function

We are collecting IV data from a solar cell and need to fit it to a 2 diode model.

The independent experimental variable is current, I
The dependent measured variable is voltage, V

The form of the solution is

I = J1(exp(k(V-RsI))-1) + J2(exp(k/2(V-RsI))-1) + (V-RsI)/Rsh

we need to solve for J1, J2, Rs, and Rsh. k is a known value. Note that I appears in both sides of the equation. How would I set up the fitting function? A twist is that while experimentally the current, I, is set and Voltage, V, is measured in graphing V is on the X axis. I have started the discussion that fitting X by Y versus Y by X yield different answers.

Andy Hegedus
Principal MTS
Alta Devices
After staring at the problem and reading the manual (which is actually quite well written), I have an idea that I would like virtual stones thrown at.

What if a change the problem a bit:

Change
I = J1(exp(k(V-RsI))-1) + J2(exp(k/2(V-RsI))-1) + (V-RsI)/Rsh

to

g(V,I) = J1(exp(k(V-RsI))-1) + J2(exp(k/2(V-RsI))-1) + (V-RsI)/Rsh -I

where the new function g(V,I) has a value of 0 (zero) at all the points. I can then run a multidimensional fit using V and I as input variables. Does this fly or is the error minimization thrown off?

Andy Hegedus
Principal MTS
Alta Devices

That might work. You would fit to a data wave that is simply full of zeroes.

Another approach would be FuncFit/ODR=3 to do an implicit fit. Read about it:
DisplayHelpTopic "Fitting Implicit Functions"

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com