04-14-2014 04:36 AM
Hi
I have a set of measurement data that i wish to fit to a complex curve.
After the fitting i need to find the constants from the curve and use them for further calculations.
equation for my curve is
x= -a* integral(p^n dt) + c.,
where x,p are known data sets at time t. 'a' and 'n' and 'c' are constants. after the fitting i have to find best values for a and n.
somebody please explain how i can accomplish this.
04-14-2014 07:53 AM
You have two main options:
Before you go any further, I would strongly recommend you read the chapters in Numerical Recipes, 10 and 15, about fitting data to parameters. Nonlinear curve fitting can be very finicky, so you need to know what you are doing. LabVIEW has all the algorithms (if you have a student, full, or pro version), so you won't have to code much more than your actual function.
Good luck! Let us know if you run into problems.
04-16-2014 12:11 AM
Thanks for the suggestions DFGray. i will try and update the status
04-16-2014 01:51 AM
@djac91 wrote:
I have a set of measurement data that i wish to fit to a complex curve.
What parts of the function are of complex data type?
04-16-2014 03:46 AM
sorry altenbach . i just meant that it is a non linear curve which has integrals.
08-02-2014 12:00 AM
in order to use Levenberg-Marquart method it is neccessary to specify the formula string. but how to specify formulae containing integral as a labview string.
@DFGray wrote:
You have two main options:
- Convert the integral to an actual equation, then use a non-linear fitting routine, such as the Levenberg-Marquart, to do your fit. You will need approximate values for your parameters before you start.
- Use one of LabVIEW's numeric integrators to do your integral, and use a non-linear fitting routine to find the parameters. This will be slower.
Before you go any further, I would strongly recommend you read the chapters in Numerical Recipes, 10 and 15, about fitting data to parameters. Nonlinear curve fitting can be very finicky, so you need to know what you are doing. LabVIEW has all the algorithms (if you have a student, full, or pro version), so you won't have to code much more than your actual function.
Good luck! Let us know if you run into problems.
08-02-2014 12:13 AM
Inorder to use the Levenberg-Marquart method, it is neccessary to specify the formulae string. but how can i specify a formula containing integral function as a labview string.
Warm regards
Deepu Jacob
@DFGray wrote:
You have two main options:
- Convert the integral to an actual equation, then use a non-linear fitting routine, such as the Levenberg-Marquart, to do your fit. You will need approximate values for your parameters before you start.
- Use one of LabVIEW's numeric integrators to do your integral, and use a non-linear fitting routine to find the parameters. This will be slower.
Before you go any further, I would strongly recommend you read the chapters in Numerical Recipes, 10 and 15, about fitting data to parameters. Nonlinear curve fitting can be very finicky, so you need to know what you are doing. LabVIEW has all the algorithms (if you have a student, full, or pro version), so you won't have to code much more than your actual function.
Good luck! Let us know if you run into problems.
08-02-2014 04:18 PM
you have to use the polymorphic instance where the formula is a vi
you can find the template for the given forumal vi in the help of the nonlinear curve fit vi and you can examine the given example to find out correct wiring inide the vi