I am looking for an algorithm or a filter to remove sharp peaks from my data. I am collecting raw data after every 1 second from an sensor through an ADC. The ADC has an internal FIR filter. I use this filter to remove the 50-Hz noise. So, if there is huge disturbance or jerk to the sensor, it gives out sharp values. I want to filter out these sharp values. Also, I want the raw values to be sensitive to small changes but avoid a sharp jump in the value. Why do I want to remove these sharp peaks or impulses from the raw data? - Because it disturbs the Kalman filter ;- the Kalman filter estimates position and velocity. I am interested in velocity values of my Kalman filter. These values try to follow the sharp peak either up or down. Hence, velocity output is affected and then needs few more samples to determine a proper actual value.