10-29-2012 10:40 AM
Please could can anyone give me any pointers on where I may be slipping up with the constrained nonlinear curve fit function?
A little background: I have data which should fit a resonance curve. I can fit the curve to the data but the results are not convincing me.
I'm using LabVIEW version 8.5 (and don't have access to higher versions).
I have found someone with a similar problem here:
http://forums.ni.com/t5/LabVIEW/constrained-lm-fit-having-problem/m-p/902909#M407092
As far as I can, tell my issue lies with the fact that I only have a few points in the data that I am trying to fit to. This means that I must restrict the output of my model function to the same (low) number of points, as described in the thread I linked above.
The attached files show the output that I get from the fit... it isn't a million miles off the mark, but I know that a better fit can be achieved as I've done it in other software packages (results shown in the vi).
I started off using the non constrained Lev-Mar fit, but found that the solution that the vi converged to, was not physically sensible. again, probably due to the low number of data points.
Unfortunately I can't do much about my low number of data points.
Any suggestions?
Thanks in advance,
Ian
Solved! Go to Solution.
10-30-2012 07:03 AM
Hi Ian,
Are you able to select a bisquare fitting model method? Statistics isn't my strongest field but it seems like a more accurate method for the few points you have.
You also mentioned the similar thread, are you getting the same error (-20039)? Or are you just concerned about the plot inaccuracies?
10-30-2012 11:30 AM
Try passing your original 'x data' to the nonlinear curve fit VI as the X input, instead of generating a new grid.
-Jim
10-30-2012 11:44 AM
Thank you both for your replies.
It was as simple as implementing Jim's suggestion.
I feel stupid now! I am also very relieved - I was getting a bit frustrated!
Thanks again,
Ian
10-30-2012 12:19 PM
Looks like I missed it too, Thanks Jim!
Glad you got it sorted.