Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

05-20-2020 03:33 AM - edited 05-20-2020 03:34 AM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

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.

Solved! Go to Solution.

05-20-2020 11:29 AM - edited 05-20-2020 11:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Is VT a parameter or constant?

What is the typical range for V and I?

What are typical values for the parameters?

05-20-2020 08:43 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.

05-21-2020 07:05 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

"If you weren't supposed to push it, it wouldn't be a button."

05-21-2020 04:51 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@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.

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

05-21-2020 10:45 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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

05-22-2020 06:53 AM - edited 05-22-2020 07:06 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@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

05-22-2020 12:00 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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.)*

Solution

Accepted by JesusIbarra

05-22-2020 12:04 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

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:

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.

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

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

Solution

Accepted by JesusIbarra

05-22-2020 12:49 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

@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.