I've implemented 2 filters in Python I would like to know if they look OK or not.. I've implemented an lowpass FIR Hann Filter and an lowpass IIR Chebyshev type 1 filter. My plots look like the following: Time amplitude and frequency spectrum: Hann Window:
After roughly observing the output spectrum, I found something strange.
First, I noticed that you're coping with audio(voice) signals. Because telephones are made to work in the ranges 300 Hz to 3400 Hz , it seems that your IIR filter has filtered out the frequency components higher than about 1kHz. Is that what you intended to do?
Second, I noticed that your FIR filter is a kind of LPF but I cannot do any further inference, because frequency/phase responses of impulse signal have not given. (you can create an impulse signal and then plot the spectrum as you have done.)
When it comes to the design of a filter, the spec of the filter should be discussed.
First, you need to assign the cut-off frequency (or which part of the signal do you want to filtered?). From the output spectrum of your signals, I suspect that you use two different cut-off frequencies when comparing IIR/FIR filter. If you just wanna filtered out high frequency noise, you need firstly decide the range. Maybe you can refer to .
Here are some frequently discussed basic spec from my experience.
Is application real-time or not? This can determine whether you can use the so-called filtfilt technique. (Zero delay at expense of causality. (you need to recorded all signal and))
Is General linear phase (GLP) required? If so, IIR in filtfilt or GLP FIR Filter are your choices.
Usually, IIR can obtain better stop band attenuation with lower orders. However, the delay might vary from different frequencies to other frequencies. For extremely bad example, the input is 'do re mi' but the output becomes 're mi do'.
There are some more info like , hope it can help.