09-19-2014 01:34 AM
Hi,
I have a rather complex question... at least i think it is. I've solved this once way back in LabVIEW 7. But when i look at my old vi's i can't recall what i did.
The problem: I have a large set of data let's say 4000 samples, my data should go from 10Volts to -10Volts but my recorded data goes from 12,8Volts to --6,4Volts, i can use a lineair calibration, with a calculated gain and offset:
Offset = (12,8 + -6,4) / 2 = 3,2
gain = (10 - -10) / (12,8 - -6,4) = 1,041
applied for max value: 12,8 - 3,2(offset) * 1,041 (gain) = 10
applied for min value: -6,4 -3,2 (offset) * 1,041(gain) = -10
See example:
But now i know there is a way to do a non-lineair calibration with more data points let's say 5, i thought it was something with a polynomal fit, but i can't rember...
Does anyone know how to do that?
Best regards,
Thijs
Solved! Go to Solution.
09-19-2014 02:14 AM
Hi Thijs,
you could use a LUT (look-up table) from your 5 samples and Array-Interpolation functions to "scale" your measurement values.
Or you use the polynomial fit function on your 5 samples to calculate polynomial coefficients and apply them on your measurement data. The GeneralPolynomialFit function comes with an example in the example finder…
09-19-2014 04:32 AM
Okay, but where do i place the polynomial function in my given "lineair calibration" example?
I have 4000 samples and only 3 to 5 fitting points...
Best regards,
Thijs
09-19-2014 04:37 AM
09-19-2014 04:40 AM
Here is a version 2011
Thanks for your help!
09-19-2014 04:48 AM
09-19-2014 04:58 AM
Do you mean with the XY values, the one that it should be and the raw one...?
09-19-2014 05:01 AM
And what is the name of the VI you are using...?
09-19-2014 05:08 AM
Thank you so much, i figured it out!
Best regards!
Thijs