09-07-2016 03:12 AM - last edited on 09-08-2016 09:11 AM by acordero0710
Hello, I am trying to use lev-mar to fit my data. I think lev-mar is suitable for my non-linear data of diode I-V curve. How can I connect the input of the lev-mar VI? what should I put in the data/ initial parameters/ covarience? I have seen examples in the labview , but still can't find the solution.
Solved! Go to Solution.
09-07-2016 03:18 AM
09-07-2016 08:47 PM
Hello, thanks! I have fixed the connection. But the fitted curve doesn't plot. As the i-v curve only nonlinear at first until 2.5V (refer to the graph) , right after 2.5 V it increases drastically (start to linearly increase). I wonder if this Lev-Mar method is suitable for my data. Kindly assist me.
09-08-2016 07:33 AM
When you do "curve-fitting", what you generally are trying to do is to come up with a "rule" (which I will call a "function") that will provide a description of a set of data over some finite range. This function generally approximates the data points, largely because it has far fewer free parameters (often 2-5) than there are data points (often 20-1000). Indeed, if you have as many parameters as there are points, you can create a function that will pass through all of the points (though it will probably wiggle wildly between the points).
The choice of the function is a key step in any curve-fitting routine. For example, if I wanted to fit a function to the distribution of heights for all of the undergraduates at the University of North Oshkosh, I should probably not use a simple polynomial, but rather a Gaussian, a two-parameter function involving exponentials.
What function did you choose for your I-V curve?
Bob Schor
09-08-2016 05:05 PM
We do not know why we do not know what does not work we do not know with what. (attach VIs, data you try to fit, specify function you want to use and parameter ranges you might have).
General considerations.
Your task can be solved using this method. How efficient and universal will it be, depends on your description of the model (vi or formula string).
For all fits initial guess is crucial.
For lev-mar you specify vi that calculates residue based on input parameters and data you want to fit. Help: "Use the VI template located at labview\vi.lib\gmath\NumericalOptimization\LM model function and gradient.vit to create the VI from a template".
You have to limit parameters inside your vi: for wrong parameter values it should at least generate huge residue.
09-09-2016 12:46 AM - edited 09-09-2016 09:24 AM
It is completely pointless to show us broken code images. I also don't recognize the fitting function in your third image (with the L-M on the icon). Where is it in the palette? (I've seen it before, but dont quite remember where).
Please attach a simplfied version of your VI and model (code, no image!) and some typical data. I guarantee you that we will be able to fit it once the model is correctly implemented and the starting values are reasonable. Did you ever try to graph the model function with your initial guess parameters? How similar does it look to your data?
09-18-2016 11:27 PM
Sorry for late reply, the paper really helps me a lot! Thank you 🙂