An accelerometer is used on a high vibration environment (a bicycle) to measure gravity. The signal clips, so data higher than a clipping value is clamped to that value.
So, simply filtering the signal gives the wrong
median mean value when the vibration is high.
I want the mean value over a time much longer than the vibration frequency, so a few second filter is fine. I do not care about the vibration waveform itself. Just want the average value. How to remove the error caused by the clipping?
Bad idea one:
I had suggested that the signal's noise distribution be modeled, the amount of clipping predicted based on measured vibration amplitude, and that used to correct the data. Maybe the distribution is Rayliegh, maybe Gaussian, maybe... So maybe that first idea is not a good one.
Possibly brilliant idea two:
But how about just measuring the distribution on the spot? Make a histogram with several bins, accumulating a count in a bin each time the sampled data is in a bin's range.
Then, fit a curve over the top 3 or 5 highest bins, and the position of the peak is
the signal median the modal mean, where the signal mean value would be, if it were not clipped.
Is this crazy? Good? Done before and has a name?