-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
probe_eddy_current: filter noisy calibration points #7119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
probe_eddy_current: filter noisy calibration points #7119
Conversation
305a16c to
10e27d9
Compare
Signed-off-by: Timofey Titovets <[email protected]>
10e27d9 to
901e17f
Compare
|
Hmmm, I decided to do more testing: So, to avoid a zone where my bed is oscillating +100ms from the move, and 400ms to collect the data. |
Signed-off-by: Timofey Titovets <[email protected]>
f128999 to
b0c6e16
Compare
|
I've added the total frequency range over calibrated 4mm. I'm not sure if it is required to make suggestions here, so just data for comparison: |
|
Some samples. BTT Eddy Coil, coil height from the surface to the closest PCB side. Results are without the patch in #7119 (comment) Original (coil starting height 3.6mm) |
|
With the patch #7119 (comment). Z=0, coil height +1.6mm. |

After the: https://klipper.discourse.group/t/make-btt-eddy-great-again/25139
I wanted to implement a way to give the user feedback if the calibration is poor.
But it seems that "bad" is too hard to define for everyone.
Instead of a sophisticated and probably not really required slope analysis.
There is now a pure analytical implementation, we have samples, we have stddev, we can try to calculate standard error, and if the standard error for the difference between samples is too large, bail out earlier.
Goals of this change:
A fast local test would look like:
As my sensor has a pretty low noise level, with the default test and patched max Z (https://github.com/Klipper3d/klipper/blob/master/klippy/extras/probe_eddy_current.py#L95),
bails out at:
And normal calibration up to 4mm
It is questionable if this sort of SNR metric is correct,
mad_mm, but this is what I've come up with for now.I moved the sensor up by 1 mm:
Ah, well, it is as expected, larger distance - larger noise (in mm).
So, I think it is an okay metric, at least it is correlated with what I would expect.
Thanks.
My sensor output distribution at a standstill looks like below. Because it is not a normal distribution, and does not even seem to be any sort of distribution to me. So, I chose the conservative approach with Median absolute deviation/and Medians, which I hope so, would work okay with such a distribution.
An alternative (I guess) would be to calculate buckets and do something with the frequency of samples ... but I guess it's not worth it.