LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to calculate gain error, offset and non-linearity

Hi everyone, I made this script on labview which shows the temperature values ​​calculated with the use of a multimeter and a calibrator. These values ​​are stored in an array and plotted on an XY graph to obtain the calibration curve.
Now note the curve and the vectors, how can I calculate the gain, offset and non-linearity errors?

0 Kudos
Message 1 of 19
(2,315 Views)

Your VI (this is not a script!) makes little sense, for example if there is a permanent error, your while loop cannot be stopped. We also don't have any of the subVIs. Does it work correctly?

 

I assume you are talking about the xy data exiting the FOR loop. We don't have that data. Can you include it?

 

I assume you want to do a linear fit, so have a look in the math...fitting palette. How do you define non-linearity errors?

0 Kudos
Message 2 of 19
(2,311 Views)

I have already tested the VI and it works perfectly. I have not entered the data in the arrays because I need to perform a new calibration test.
On output on the XY graph I get a linear curve, could you be clearer about the errors?

0 Kudos
Message 3 of 19
(2,305 Views)

@giu95se wrote:

On output on the XY graph I get a linear curve, could you be clearer about the errors?


Well, once you have actual data, just do a linear fit. Do you have problems with that?

 

You said you wanted to measure "non-linearity errors", but you didn't say how you define that term. Please do.

0 Kudos
Message 4 of 19
(2,291 Views)

what do you mean by term?
On the output XY graph I already have a linear curve why should I fit it?

0 Kudos
Message 5 of 19
(2,284 Views)

@giu95se wrote:

On the output XY graph I already have a linear curve why should I fit it?


To get the slope and offset.

0 Kudos
Message 6 of 19
(2,279 Views)

these are the values ​​i got, i hope the setting is right, now how should i proceed?

0 Kudos
Message 7 of 19
(2,264 Views)

OK, so now you have a linear fit, something your original VI did not include. It's difficult to tell anything from a picture of a front panel.

 


@giu95se wrote:

... now how should i proceed?


 

What other items are in the requirements document?

0 Kudos
Message 8 of 19
(2,238 Views)

what elements are you referring to? I have to calculate gain error, offset error and non-linearity error.
How can I do with this model? What else do i need? Or what else would you need to see?

0 Kudos
Message 9 of 19
(2,219 Views)

Ah, OK. When you said:

 


@giu95se wrote:

Now note the curve and the vectors, how can I calculate the gain, offset and non-linearity errors?

This sentence was ambiguous! You actually meant "...gain error, offset error and non-linearity", already having the gain and offset. You still have not defined what you mean by "non-linearity".( If you suspect some curvature, you could see how much the fit would improve by adding a quadratic term, for example.)

 

There are plenty of hits when using a google search for e.g. "linear fit slope offset error". for example this document gives you some formulas. Have you tried implementing them?

 

You can also use "Linear Fit Intervals VI" To further analyze the fit. Try it! Do all points have the same error in Y? Can we assume that X is error free?

0 Kudos
Message 10 of 19
(2,203 Views)