Answer the question
In order to leave comments, you need to log in
How to write an algorithm for calculating an almost linear correction factor for sensor readings?
Hello.
There is a sensor that gives indicators in "parrots" (capacity) cur_cap, the dependence of these readings on the sensor supply voltage (there is a slight drift) with the reference cur_cap has been empirically established. We got two dependent data arrays int cap(x1,x2,.....) and volt(y1,y2,.....) . How to write a function to correct sensor readings depending on voltage using array data? Thanks in advance.
Answer the question
In order to leave comments, you need to log in
If I understood correctly.
There are two sets of data X(voltage), Y(capacitance). We understand that Y is measured with some error.
It is necessary to find a function F(X), such that Ф(Ymod-Y) -- in fact, the error between the measured (Y) and calculated (Ymod) values at given points from X -- would be in some sense optimal (for example - minimum).
F () - in the simplest case, a linear function, in more complex cases, not necessarily.
If so, then we have the classical problem of building a regression model. Having such a model, it is possible for arbitrary x to "predict" the expected value of y.
If by Y we mean not the values themselves (capacity), but the corrections that you make at given points X, then the regression model constructed in a similar way will "predict" the correction that must be taken into account at an arbitrary point x.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question