I have a noisy signal with jumps to high value and back to normal for limited time bins (40 for example) which I want to filter to have a smooth signal with no jumps. Here is the graph, the blue one.
I tried moving average filter (n=20), the green one. Also tried window based (kaiser) LPF with cut-off freq=0.01 (I choose it manually) but still the filtered signal follows the jumps.
Also I tried to flatten the signal by using the average of the past n values whenever there is a jump. But how could I find the start of a jump. I need a threshold. Also there is difficulty with determining the end of a jump. I need another threshold.
- Is there any way to filter the signal in a way that it doesn't follow the jumps?
- Are those jumps and falls caused by low frequencies, since LPF don't eliminate them? So I should use high pass filter? I am confused.
EDIT: Another graph that shows what I want to eliminate (the gray regions).