What I want
I wish to design an LPF, preferably an FIR, but also open to IIR. My constraints:
- I care about phase non-linearity. Thus if I use an IIR, I need a filter similar to a Bessel filter.
- My signal isn't too long, so I wish to have a short transient (short impulse response).
- A seemingly contradictory requirement with respect to the previous one is that I want to use a narrow transition band as possible.
What I know
- Generally speaking, for FIR, the transition width is inversely dependent on the filter order (and therefore, on the impulse response length).
- The proportionality constants depend on the design method. For instance, for Kaiser and Parks-McClellan, these formulas are:
- Kaiser: $M=\frac{-20\log_{10}\delta-8}{2.285\Delta\omega}$
- PM: $M=\frac{-10\log_{10}(\delta_1\delta_2)-13}{2.324\Delta\omega}$
- Thus, for the same $\delta$, PM will provide a shorter filter.
My questions:
- Are there design methodologies that prioritize transition width and minimize order, perhaps a the cost of other specifications? Are there design methodologies that are better than others in these specific aspects?
- For IIR, the impulse response length isn't well defined, and its decay rate isn't as simply related to the filter order as FIR. Are there design methodologies for IIR which allow controlling the rate of decay of the impulse response in IIR?
- Are there other methods of dealing with the transient effect at the beginning of the signal?
- If I care for the linear phase, could I be better off using an IIR or a minimum phase FIR and then correcting it with an all-pass? Or would the cascaded filter be worse in terms of overall delay?
Edit
Following the suggestions I designed an initial filter, I used both the suggested least squares approach (firls
) and the PM approach (firpm
). Some details:
- I'm interested in a passband of width $0.317460317460317\times \pi$ rad/sample. Obviously, the current design is a linear phase.
- Regarding phase non-linearity within the passband, if possible, I would like to remain beneath a ripple of 0.03samples. I'm not sure if I should make the specification regarding the phase or group delay.
- Filter order - I currently design an 18 taps filter, and I would like to remain between 18-36 taps.
More questions
- SHould I specify requirements regarding phase response, group delay, or phase delay?
- The current answer suggests going for the least squares solution, but my initial filter shows that for the same transient, I get a narrower transition band with the Parks-McClellan (Chebyshev) approach at the expense of stopband attenuation. Is there a specific reason to go for the LS solution?
- Is there an analytic approximation for the LS filter (similar to PM and Kaiser) relating filter order and transition width?
- Eventually, after I have some candidates, I'll have to quantify the tradeoffs between the excess noise (which results from less stopband attenuation/transition width) versus the distortion introduced by the passband ripple and the transient (which distorts initial samples). Any suggestion on how to perform this analysis?
Edit No. 2
Let me first clarify the use of the filter. The filter will be a part of a signal acquisition channel. As such, I do not wish, nor can I determine exactly what processing will follow. I "simply" wish to provide the best signal, although obviously, this isn't simple (as we need to determine what best means) :)
What specs can I provide:
- Impulse response length - up to 18-36 samples. Anything above 18 samples already distorts initial (interesting) samples but is acceptable if the resulting noise suppression is worth it. According to my understanding, this also dictates the mean group delay (at least within passband)
- Group delay variation - preferably smaller than 0.03 samples. Definitely smaller than 0.1 samples.
- Passband of width $f_{pass}=0.317460317460317\times \pi$ rad/sample
- passband ripple - Originally, we went for 1dB.
- Regarding stopband rejection, we originally aimed for 60dB.
- Transition width, we originally aimed for $0.1f_{pass}$.
I do not think all of these can be accommodated simultaneously, as according to fred harris rule of thumb, these specs should require:
$$ M = \frac{2}{0.03}\frac{60}{22} \approx 181\; taps $$
Therefore, if I'm willing to relax my requirements regarding ripples and transition width but not those regarding impulse response length and group delay variation, what passband ripple and noise suppression can I expect? With firls
I get the below filter. Can it be improved?