LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fitting transcendental equation

Solved!
Go to solution
Highlighted

Hello everybody,

 

I have experimental I-V data from a solar cell in the dark (basically a diode). I would like to fit this data into the following equation to obtain the optimized parameters Rs, Rsh and J01.

 

eq.PNG

As you can see, this is a transcendental equation and cannot be expressed as

I = I(V, I01, Rs, Rsh)

 

Is there any curve optimization VI that could help me fit this model?

I believe that all the non-linear fitting VIs in Labview require the function to be non-transcendental. Is there any alternative I could use?

 

Thank you very much for your help.

0 Kudos
Message 1 of 11
(652 Views)
Highlighted

Is VT a parameter or constant?

What is the typical range for V and I?

What are typical values for the parameters?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 11
(602 Views)
Highlighted

Is VT a parameter or constant?

What is the typical range for V and I?

What are typical values for the parameters?

 

Hi,

 

Thanks for the reply. VT is a constant.

Let's say that V = [-2, 2] V and I = [0, 0.045]

Typical values for the parameters let's say for example: I01= 50E-15 A/cm2, Rsh=800 Ohms*cm2, Rs= 4 Ohm*cm2.

 

 

0 Kudos
Message 3 of 11
(570 Views)
Highlighted

Decades ago (I think about 4), I wrote this.

"If you weren't supposed to push it, it wouldn't be a button."
Message 4 of 11
(550 Views)
Highlighted

@JesusIbarra wrote:

Hello everybody,

 

I have experimental I-V data from a solar cell in the dark (basically a diode). I would like to fit this data into the following equation to obtain the optimized parameters Rs, Rsh and J01.

 

eq.PNG

As you can see, this is a transcendental equation and cannot be expressed as

I = I(V, I01, Rs, Rsh)

Sure it can -- you just did, above (assuming Vt is a constant).

 

Is there any curve optimization VI that could help me fit this model?

How about "Nonlinear Curve Fit on the Mathematics/Fitting Palette?

I believe that all the non-linear fitting VIs in Labview require the function to be non-transcendental. Is there any alternative I could use?

Your belief is erroneous.  Read the Help.

Thank you very much for your help.


Bob Schor

0 Kudos
Message 5 of 11
(523 Views)
Highlighted

Hi, thanks for the reply.

 

I apologize if I was not clear. On the right side of the equation there is I*Rs (they are separate variables). So we have I inside the exponential function and at the end of the equation as well. The equation cannot be solved for I because of the variable inside the exponential.

Thanks again.

 

Jesus

 

 

0 Kudos
Message 6 of 11
(505 Views)
Highlighted

@JesusIbarra wrote:

On the right side of the equation there is I*Rs (they are separate variables).


Sorry, my mistake.  Re-thinking ...

This is from a review of Solving Transcendental Equations: The Chebyshev Polynomial Proxy and Other Numerical Rootfinders, Perturbation Series, and Oracles, by John P. Boyd, 2014: 

 

"Transcendental equations arise in every branch of science and engineering. While most of these equations are easy to solve, some are not, and that is where this book serves as the mathematical equivalent of a skydiver's reserve parachute—not always needed, but indispensible when it is. The author's goal is to teach the art of finding the root of a single algebraic equation or a pair of such equations."

 

There are clearly methods to do what you are asking, but you are correct, it is considerably more difficult (and highly specialized) that it might be "reasonable" to expect that most Programming Languages would not have built-in routines for doing this task.

 

The most sophisticated "M" (as in "Mathematics", including Mathematica, MathCad, Maple, and Matlab) with which I have some experience is Mathematica, which has some discussion of this topic.  You might find some useful information on the Web -- search for Transcendental Equation Mathematica.

 

Bob Schor

Message 7 of 11
(479 Views)
Highlighted

Assuming the function s well behaved, you can place all terms to the right and use Newton-Raphson to find the value of I where the term is zero.

 

Basically find "I" where:

 

{right side equation} - I = 0

 

Given all other constants. repeat for all possible V's. Graph I vs V.

 

Now create a fit model model that uses this to solve for I given a V and all other parameters)

 

Do you know how the function is approximately supposed to look like? What is the value for VT?

 

(Also watch your terminology. You problem is not the transcendental equation but the fact that you cannot solve for I. Fitting typical transcendental functions (e.g. y=e^x) is no problem.)


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 8 of 11
(453 Views)
Solution
Accepted by JesusIbarra

I think it is possible to sidestep the transcendental part of this problem entirely. As I understand it you are not trying to solve for x if given y, or y if given x. You are trying to find the parameters of the model that best fit your equation. So perhaps rearrange your equation slightly by subtracting I from both sides and call the left side Y, recognizing that Y should always be zero:

Solar Eqn.png

 

Now treat this as your model for curve fitting. You will have an array of Y values that are all 0. I and V are treated as your X input to the Nonlinear Curve Fit.vi

Nonlinear curve fit.vi only allows a 1D array of values for X and Y, but does not check to make sure they are the same length (Thanks Christian!!!), so this allows you to concatenate your V and I arrays into a single "X" array. Below is a snippet that shows what I mean.

Solar model fit.png

 

Now your model must unpack the X array so you can evaluate your model.

 

solar model.png

 

 

So the nonlinear curve fit will adjust the model parameters to make the model as close as possible to the Y values which are 0. This is the same way that we solve for a best fit circle or ellipse using Nonlinear Curve Fit. Ellipse fit is a shipping example (...\examples\Mathematics\Fitting\Ellipse fit.vi), but the code is a bit harder to read and the modeling aspect of the problem is not explicitly called out.

 

-Jim

 

 

Message 9 of 11
(452 Views)
Highlighted
Solution
Accepted by JesusIbarra

@DSPGuy wrote:

So perhaps rearrange your equation slightly by subtracting I from both sides and call the left side Y, recognizing that Y should always be zero:

 


While that will give the best fit parameters, there is still the difficulty of graphing the original data and the corresponding fit on an "I vs. V" XY graph. For that we can still use my suggestion above.

 

On a side note, I would simplify some of the details (fewer primitives and coercions). I doubt there is a noticeable performance penalty. In most cases, we don't even need the FOR loop in the model, of course.

 

altenbach_0-1590169588584.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 10 of 11
(442 Views)