LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Polynomial Fit with Slope and Intercept outputs

Folks,
 
I have a project that requires linearizing the output of a high voltage amplifier using the 2nd order Slope and Intercept equations with 20 points.  Unfortunately, I need to use a Poly-fit function rather than a Linear fit.  I admit, I really don't know the difference, but the designer of the PWA insist that only a polynomial fit with 2nd order Slope and Intercept calculations can be used.  I have Labview 8.2 Professional, but I do not have a V.I. that has this function.  Any suggestion or help is greatly appreciated.
 
 
Regards,
 
 
Rick H.
0 Kudos
Message 1 of 8
(6,639 Views)
Sure you have it! 🙂 Two possibilities:
  1. Curve fitting express VI (configure for polynomial fit on the express panel)
  2. General Polynomial Fit VI

Both are from the "Mathematics..Fitting" palette and are easy to use. See how far you get.

If you still have problems, attach a simple VI containing typical data in a diagram constant.

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

Thanks, but no dice!  Both Polyfit VIs that you suggested do not have an Intercept or Slope output.  As I mentioned in my first email, only the linear fit has this output.  Please advise

 

 

Rick H

 

 

0 Kudos
Message 3 of 8
(6,626 Views)
Well, a second order polynomial does not have a "slope" per se. You just get the coefficients of the polynomial.
 
For second order, just look at the array of coefficients.
 
y(x)= A + Bx+ Cx^2
  • Element 0 is the intercept (A)
  • element 1 is the linear term (B)
  • Element 2 is the quadratic term (C).

All clear? Since the polynomial fit can be used for any order, it would be inconvenient to create seperate outputs for each coefficient, since their number depends on the order.

You can use the coefficient array directly as input into "polynomial evaluation" to calculate the y for any x later. 🙂

Message Edited by altenbach on 01-24-2007 11:13 AM

0 Kudos
Message 4 of 8
(6,624 Views)
Thanks for the suggestion.  My knowledge in this area is limited at best and I appreciate your time in explaining this in detail.  I'll give it a spin.  Thanks again,
 
Rick H.
 
0 Kudos
Message 5 of 8
(6,617 Views)

Hi

 

You have also the possibilty to calculate the polynomial fit and in a second step to derivate from its best fit result.

0 Kudos
Message 6 of 8
(6,283 Views)

Well, this thread is almost 3 years old and I am not quite sure what you are trying to say here, because the problem seems solved.

 

What do you mean by "derivate"?

0 Kudos
Message 7 of 8
(6,264 Views)

Yes surely, i have to implement a similar problem and maybe other person have interrest to see a solution. See the example

 

With best regards


0 Kudos
Message 8 of 8
(6,254 Views)