I'm very new to digital signal processing, I've been reading a text book to try to figure out this assignment at work (avionics related). I'm supposed to implement a two-pole low-pass filter with a fixed cutoff frequency (of 0.02Hz)

I'm not sure if my current output is correct, given my understanding of how low pass filters are supposed to work.


The top is my input signal. 3Hz to the left, 1Hz to the right.

Given my current level of understanding of digital signal processing, my expected output of a low-pass filter with a frequency cutoff of 2Hz is in the middle. 0 to the left, and the original 1Hz signal on the right.

The bottom is the output of my current implementation. I don't know if my current implementation is wrong, my understanding, or my expectations of how close to ideal the filters actually are.

This actual implementation is a single pole recursive filter, just trying to get a working example (and understanding) I can test against, before I design everything the way they want it.

The sample rate is 100Hz, so for f = 2Hz, I tried poles of both x = e^(-2*pi*2/100) and x = e^(-2*pi*2/200) (the formula I saw wanted a value from 0 to .5, so assumed it was some fraction of sample rate?)

Any ideas?

  • $\begingroup$ Thanks, I didn't know that was a thing, I'll try there too. $\endgroup$ Nov 25, 2012 at 15:19

1 Answer 1


From the description I'll take you have a filter with 3 coefficients. (and the formulae are missing the symbol i). With a sample rate of 100 Hz you would require a filter of length 33 to make it cover the complete wave form of one cycle of 3 Hz signal. Just looking one tenth of a waveform a filter would have to do magic to attenuate (just) a 3Hz signal but leave 1Hz signals intact.

If you'll have octave or matlab, you might want to see the frequency response of your filter:


Here the 3dB cutoff is approximately at Fs/4 (one quarter of the sampling frequenzy).

Cutoff frequency of the filter

  • $\begingroup$ So how does one get a steeper frequency response then? I know enough about FFTs to convert my signal to frequency domain first if that helps. $\endgroup$ Nov 25, 2012 at 21:15
  • $\begingroup$ One goes to more controlled and steeper frequency response by adding the filter length. Three practical methods are '1. window method', which chooses between known filter shapes (=impulse response) with filter length depending on the wanted attenuation -- 2. IFFT method, which inverse transforms the wanted frequency response to (symmetric) FIR filter and 3. Remez algorithm (perhaps the easiest method where in Matlab one describes the shape of transition band) $\endgroup$ Nov 26, 2012 at 5:47
  • $\begingroup$ I tried the windowed-sinc method, and it worked like a charm. I guess I was over anticipating the performance of the recursive filters. Thanks! $\endgroup$ Nov 27, 2012 at 5:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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