So I am attempting to filter a signal containing frequencies at 7Hz, 11Hz, and 74Hz. The signal lasts for 30s and looks like this between -1s and 1s: enter image description here

Using a butterworth filter of order 2 with lowcut=8Hz and highcut=4Hz (bandpass) in an attempt to filter the 11Hz component, I get the following overall signal:

enter image description here

Now, of course, if I amplify this signal by 40 and plot it between -1s and 1s, I get the desired signal:

enter image description here

My question is what is causing these apparent "side lobes" in the filtered signal (second picture) at the left and right side? Is there a way to get around this? In the end, I want to subtract the filtered signal from the original signal, to remove this frequency. I can't do this, however, with the "side lobes."

These lobes also occur for order 3+ with lowcut=8 and highcut=14

These lobes also occur for lowcut=7 and highcut=15

  • 2
    $\begingroup$ To remove a particular frequency, subtraction of a component is hard to get right in practice. Use a notch filter instead. $\endgroup$ – Andy Walls Nov 13 '18 at 1:34
  • $\begingroup$ You use a time limited signal and I assume the filter is implemented by a certain tool - the result is not "really" the original signal - the limited 11Hz to 30 seconds result some artifacts. $\endgroup$ – Moti Nov 13 '18 at 5:57
  • $\begingroup$ Those are not "side lobes". Those are filter end transients events, due to a finite length or rectangularly windowed signal. $\endgroup$ – hotpaw2 Nov 13 '18 at 15:46

Your signal appears to be the sum of two sinusoidal components of different frequencies; a low-frequency component and a high-frequency component. In the input, the low-frequency component has a much higher amplitude.

But the bandpass filter reverses the roles of the two frequency components by attenuating the low-frequency component more than it attenuates the high-frequency component. So the output are the same two frequencies, but here the high-frequency sinusoidal component has a much larger amplitude than the low-frequency sinusoid.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.