Electronics > Beginners
Need help figuring out how to compare value against a known curve
MatCat:
I am working with a sensor that I have graphed and found it's curve across the points of measurement, but my problem is trying to figure this out against different calibrations. In one medium the plots will be different values then another, but it all follows the same curve. My issue is I am not sure how to programatically / mathematically take a calibration value at a known point, and use that to correlate to the known curve. Here I have a screenshot of 3 collected datasets, the orange line has data for each point, for the other 2 datasets I did not collect all points.
rstofer:
Quadratic Regression Analysis (QRA). There are a number of calculators available via Google.
Once it comes up with the equation of the line, you can plug in an 'x' and get a good fitting 'y' for anything in the domain.
https://keisan.casio.com/exec/system/14059932254941
You are going to have to come up with an explanation for the 3 curves or you are going to have to do 3 different QRAs and have 3 separate equations.
There are higher order versions if a quadratic doesn't fit well. Search for more info with 'higher order regression analysis'
http://www.xuru.org/rt/pr.asp
Mr. Scram:
--- Quote from: rstofer on September 10, 2018, 01:50:14 am ---Quadratic Regression Analysis (QRA). There are a number of calculators available via Google.
Once it comes up with the equation of the line, you can plug in an 'x' and get a good fitting 'y' for anything in the domain.
https://keisan.casio.com/exec/system/14059932254941
You are going to have to come up with an explanation for the 3 curves or you are going to have to do 3 different QRAs and have 3 separate equations.
There are higher order versions if a quadratic doesn't fit well. Search for more info with 'higher order regression analysis'
http://www.xuru.org/rt/pr.asp
--- End quote ---
I just learnt a bunch. I would have chosen a sloppy interpolation approach, but this is much more elegant.
Thanks!
Mechatrommer:
--- Quote from: MatCat on September 09, 2018, 11:23:14 pm ---My issue is I am not sure how to programatically / mathematically take a calibration value at a known point, and use that to correlate to the known curve. Here I have a screenshot of 3 collected datasets, the orange line has data for each point, for the other 2 datasets I did not collect all points.
--- End quote ---
your data seem to follow y = (A / (x + B)) + C curve, try to find value for A, B and C (start with B and C = 0) that closely match your curve and use the values for interpolation purpose.
CatalinaWOW:
Beware when fitting data to an arbitrary equation. It is easy to convince yourself that the equation, not the data, is correct.
Your data seems to follow a simple curve, but may indicate different behavior for low values of the x coordinate. Either be suspicious of fitted behavior in this region, or look for reasons for changed behavior. A zener threshold crossed, or a stage saturated, or .....
Navigation
[0] Message Index
[#] Next page
Go to full version