# Comb filter

In signal processing, a comb filter is a filter implemented by adding a delayed version of a signal to itself, causing constructive and destructive interference. The frequency response of a comb filter consists of a series of regularly spaced notches, giving the appearance of a comb.

## Applications

Comb filters are used in a variety of signal processing applications. These include:

In acoustics, comb filtering can arise in some unwanted ways. For instance, when two loudspeakers are playing the same signal at different distances from the listener, there is a comb filtering effect on the signal. In any enclosed space, listeners hear a mixture of direct sound and reflected sound. Because the reflected sound takes a longer path, it constitutes a delayed version of the direct sound and a comb filter is created where the two combine at the listener.

## Implementation

Comb filters exist in two different forms, feedforward and feedback; the names refer to the direction in which signals are delayed before they are added to the input.

Comb filters may be implemented in discrete time or continuous time; this article will focus on discrete-time implementations; the properties of the continuous-time comb filter are very similar.

### Feedforward form

The general structure of a feedforward comb filter is shown on the right. It may be described by the following difference equation:

$y[n]=x[n]+\alpha x[n-K]$

where $K$  is the delay length (measured in samples), and α is a scaling factor applied to the delayed signal. If we take the z transform of both sides of the equation, we obtain:

$Y(z)=\left(1+\alpha z^{-K}\right)X(z)$

We define the transfer function as:

$H(z)={\frac {Y(z)}{X(z)}}=1+\alpha z^{-K}={\frac {z^{K}+\alpha }{z^{K}}}$

#### Frequency response

To obtain the frequency response of a discrete-time system expressed in the z-domain, we make the substitution z = e. Therefore, for our feedforward comb filter, we get:

$H\left(e^{j\Omega }\right)=1+\alpha e^{-j\Omega K}$

Using Euler's formula, we find that the frequency response is also given by

$H\left(e^{j\Omega }\right)={\bigl [}1+\alpha \cos(\Omega K){\bigr ]}-j\alpha \sin(\Omega K)$

Often of interest is the magnitude response, which ignores phase. This is defined as:

$\left|H\left(e^{j\Omega }\right)\right|={\sqrt {\Re \left\{H\left(e^{j\Omega }\right)\right\}^{2}+\Im \left\{H\left(e^{j\Omega }\right)\right\}^{2}}}$

In the case of the feedforward comb filter, this is:

$\left|H\left(e^{j\Omega }\right)\right|={\sqrt {\left(1+\alpha ^{2}\right)+2\alpha \cos(\Omega K)}}$

Notice that the (1 + α2) term is constant, whereas the 2α cos(ΩK) term varies periodically. Hence the magnitude response of the comb filter is periodic.

The graphs to the right show the magnitude response for various values of α, demonstrating this periodicity. Some important properties:

• The response periodically drops to a local minimum (sometimes known as a notch), and periodically rises to a local maximum (sometimes known as a peak).
• For positive values of α, the first minimum occurs at half the delay period and repeat at even multiples of the delay frequency thereafter:
$f={\frac {1}{2K}},{\frac {3}{2K}},{\frac {5}{2K}}\cdots$ .
• The levels of the maxima and minima are always equidistant from 1.
• When α = ±1, the minima have zero amplitude. In this case, the minima are sometimes known as nulls.
• The maxima for positive values of α coincide with the minima for negative values of $\alpha$ , and vice versa.

#### Impulse response

The feedforward comb filter is one of the simplest finite impulse response filters. Its response is simply the initial impulse with a second impulse after the delay.

#### Pole–zero interpretation

Looking again at the z-domain transfer function of the feedforward comb filter:

$H(z)={\frac {z^{K}+\alpha }{z^{K}}}$

we see that the numerator is equal to zero whenever zK = −α. This has K solutions, equally spaced around a circle in the complex plane; these are the zeros of the transfer function. The denominator is zero at zK = 0, giving K poles at z = 0. This leads to a pole–zero plot like the ones shown below. Pole–zero plot of feedforward comb filter with K = 8 and α = 0.5 Pole–zero plot of feedforward comb filter with K = 8 and α = −0.5

### Feedback form

Similarly, the general structure of a feedback comb filter is shown on the right. It may be described by the following difference equation:

$y[n]=x[n]+\alpha y[n-K]$

If we rearrange this equation so that all terms in $y$  are on the left-hand side, and then take the z transform, we obtain:

$\left(1-\alpha z^{-K}\right)Y(z)=X(z)$

The transfer function is therefore:

$H(z)={\frac {Y(z)}{X(z)}}={\frac {1}{1-\alpha z^{-K}}}={\frac {z^{K}}{z^{K}-\alpha }}$

#### Frequency response

If we make the substitution z = e into the z-domain expression for the feedback comb filter, we get:

$H\left(e^{j\Omega }\right)={\frac {1}{1-\alpha e^{-j\Omega K}}}$

The magnitude response is as follows:

$\left|H\left(e^{j\Omega }\right)\right|={\frac {1}{\sqrt {\left(1+\alpha ^{2}\right)-2\alpha \cos(\Omega K)}}}$

Again, the response is periodic, as the graphs to the right demonstrate. The feedback comb filter has some properties in common with the feedforward form:

• The response periodically drops to a local minimum and rises to a local maximum.
• The maxima for positive values of α coincide with the minima for negative values of $\alpha$ , and vice versa.
• For positive values of α, the first maximum occurs at 0 and repeats at even multiples of the delay frequency thereafter:
$f=0,{\frac {1}{K}},{\frac {2}{K}},{\frac {3}{K}}\cdots$ .

However, there are also some important differences because the magnitude response has a term in the denominator:

• The levels of the maxima and minima are no longer equidistant from 1. The maxima have an amplitude of 1/1 − α.
• The filter is only stable if |α| is strictly less than 1. As can be seen from the graphs, as |α| increases, the amplitude of the maxima rises increasingly rapidly.

#### Impulse response

The feedback comb filter is a simple type of infinite impulse response filter. If stable, the response simply consists of a repeating series of impulses decreasing in amplitude over time.

#### Pole–zero interpretation

Looking again at the z-domain transfer function of the feedback comb filter:

$H(z)={\frac {z^{K}}{z^{K}-\alpha }}$

This time, the numerator is zero at zK = 0, giving K zeros at z = 0. The denominator is equal to zero whenever zK = α. This has K solutions, equally spaced around a circle in the complex plane; these are the poles of the transfer function. This leads to a pole–zero plot like the ones shown below. Pole–zero plot of feedback comb filter with K = 8 and α = 0.5 Pole–zero plot of feedback comb filter with K = 8 and α = −0.5

### Continuous-time comb filters

Comb filters may also be implemented in continuous time. The feedforward form may be described by the following equation:

$y(t)=x(t)+\alpha x(t-\tau )$

where τ is the delay (measured in seconds). This has the following transfer function:

$H(s)=1+\alpha e^{-s\tau }$

The feedforward form consists of an infinite number of zeros spaced along the jω axis.

The feedback form has the equation:

$y(t)=x(t)+\alpha y(t-\tau )$

and the following transfer function:

$H(s)={\frac {1}{1-\alpha e^{-s\tau }}}$

The feedback form consists of an infinite number of poles spaced along the jω axis.

Continuous-time implementations share all the properties of the respective discrete-time implementations.