Is there a filter that adjusts filter order based on "slope" but that also, like Savitzky-Golay filter, has forms that lead cleanly to nice estimates of derivatives for the data?
It sounds like a contradiction: using slope to control knobs in estimating slope. My hope is that it has at some point sounded like a mathematically interesting contradiction, and that someone found a reasonable solution for it.
Here is my pain (see images):
- when the slope is low, the filter doesn't remove the effects of
- if the window is any wider then the filter doesn't handle periods of oscillation.
- if the order is lower, the linear area is handled well but the sinusoidal loses amplitude
- when the order is higher the filter doesn't remove the effects of discretization