7
$\begingroup$

If a time-domain signal has sharp corners, its frequency spectrum will contain high-frequency components. Truncating the spectrum results in Gibbs' phenomenon. So if you're trying to design an FIR, you really want the target frequency response to be nice and smooth so that windowing the impulse response down to a finite length doesn't distort the frequency response too much.

Currently I'm contemplating trying to design a very strange filter: One that has unit gain at all frequencies, but non-zero phase. I'm wondering whether or not a similar phenomenon occurs: If the filter has unit gain at all frequencies, then what does truncating the impulse response do to the phase alignment?

$\endgroup$
  • 5
    $\begingroup$ Just a side note: this type of filter is called all-pass filter. A Hilbert filter is a practical example thereof. $\endgroup$ – Deve Jul 20 '12 at 11:13
  • $\begingroup$ Actually, this isn't a "very strange" type of filter at all. If you're designing a new allpass filter, why would you be truncating its impulse response? You can calculate the exact response of a digital filter (down to your numeric precision) at design time. $\endgroup$ – Jason R Jul 20 '12 at 12:48
  • 2
    $\begingroup$ Truncating the spectrum causes ringing, not Gibbs phenomenon. Those are different things. $\endgroup$ – Phonon Jul 20 '12 at 12:54
  • 1
    $\begingroup$ @Phonon, I don't see how the effect is different. Regardless of which domain(time/freq) a jump discontinuity occurs, the other domain experiences an infinitely long effect. $\endgroup$ – Mark Borgerding Jul 20 '12 at 15:31
  • 1
    $\begingroup$ @MarkBorgerding What you're saying is absolutely correct, but that's not what Gibbs phenomenon is. Gibbs phenomenon refers to a single-point peak in the waveform at the discontinuity when the Fourier series "converges" to a rect waveform, which is to say that the rect does not go from $1$ to $0$, but rather from $1$ to $k>1$ to 0. $\endgroup$ – Phonon Jul 20 '12 at 15:37
4
$\begingroup$

This would be an allpass filter. Except for the trivial case of unity and integer-sample delays, these can't be done as FIR filters and in general an IIR filter is required. However, they are easy to make. The zeroes of an allpass are simply the inverse of the poles (and vice versa). If you have the poles in polynomial form, you can simply flip them to get the zero polynomials. For example a second order allpass looks like this $$H(z)=\frac{a_{2}\cdot z^{0} + a_{1}\cdot z^{-1} + a_{0}\cdot z^{-2}}{a_{0}\cdot z^{0} + a_{1}\cdot z^{-1} + a_{2}\cdot z^{-2}}$$ Strict allpass filter have $\left \|H(e^{j\cdot \omega })\right \|=1 $ for all frequencies. You can certainly design approximation using FIR filters if you only need this property for a limited frequency range and if the magnitude doesn't have to be exactly unity.

$\endgroup$
3
$\begingroup$

It has the same effect: windowing with a rectangular window in one domain (time or frequency) is equivalent to convolving with an infinitely long Sinc function in the other domain (i.e. Gibb's phenomenon).

So if you want specific phase changes at N frequency points of your all-pass filter, you will generally end up with a FIR several times longer than N taps.

$\endgroup$
  • $\begingroup$ So to optimise for maximum phase smoothness, I want to choose a target design with no sharp changes? (And presumably periodic?) $\endgroup$ – MathematicalOrchid Jul 20 '12 at 12:10

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.