LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Curve Fitting

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.

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 1 of 8
(2,758 Views)

You have two main options:

 

  1. 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.
  2. 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.

 

Message 2 of 8
(2,737 Views)

Thanks for the suggestions DFGray. i will try and update the status

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 3 of 8
(2,725 Views)

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

0 Kudos
Message 4 of 8
(2,704 Views)

sorry altenbach . i just meant that it is a non linear curve which has integrals.

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 5 of 8
(2,694 Views)

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:

 

  1. 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.
  2. 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.

 



 

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 6 of 8
(2,549 Views)

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:

 

  1. 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.
  2. 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.

 



 

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 7 of 8
(2,549 Views)

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

__________________
Engage! using LV2015
0 Kudos
Message 8 of 8
(2,542 Views)