Correct the values of a measurement


I built a measuring device with which I can measure the insulation in MOhm. Up to a value of 10MOhm, the device is very precise, the only way to make it more and more inaccurate. from a measured value of 10, the measured value deviates more and more from the real value.

I set up a series of measurements with the deviation in percent.

real value measured value Deviation in percent %
0 0 0
1 1 0,0
4,8 4,8 0,0
10 10 0,0
11 10,9 -0,9
14,8 14,3 -3,4
50 45,7 -8,6
60 50 -16,7
100 81,2 -18,8
110 84,4 -23,3
150 110 -26,7
200 130 -35,0

Is it possible to correct the value with Node red so that I can not only measure exactly up to 10 but up to 200?

Greetings Volker

plotting them on a chart I can see that the deviation is not changing linearly

so the simple range node we have may help but will not be accurate.

The simplest way might be to fit it to maybe three straight line segments, then use the measured value to determine which segment to use.

This looks like it should do the job
Use as many line segments as you need to get the best fit.

1 Like

Taking either the plot from @dceejay or using the raw data, you could likely work out a good fit to the error curve, and use that to correct your values.

If possible though, it might be better to work out why the values are inaccurate and to make some design changes to improve them. Are the errors due to limitations of your underlying sensor, or the circuitry around it?

Yes, I was going to suggest that, or considering the design and working out what mathematical formula the error actually is, then using that knowledge to correct the measurements in software.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.