How do you design a filter that (ideally) has the same gain for all frequencies? And, furthermore, why would you want to do this?

Related Information

We’re all familiar with low-pass and high-pass filters—the former attenuate high frequencies and the latter attenuate low frequencies. Most of us probably know something about band-pass filters, which attenuate everything above or below a specified frequency range. Maybe some of us have worked with band-stop (AKA notch) filters, which attenuate a specified band of frequencies.

But I wonder how many people are familiar with a fifth filter topology that has the unusual characteristic of providing equal magnitude response for all frequencies. This is what we call an all-pass filter, though I suppose you could also call it a no-stop filter. It has the easiest Bode plot you’ll ever have to draw:

But Why?

As you may have guessed by now, the all-pass filter is by no means as useless as it first appears. The magnitude response is uninteresting, to be sure, but don’t forget about the other effect produced by filters: phase shift. The all-pass filter is a phase manipulator—you can selectively adjust the phase of the signals passing through the filter without altering the amplitude.

All-pass filters are used in circuits referred to as “phase equalizers” or “delay equalizers.” As discussed in Understanding Linear-Phase Filters, it is sometimes important to ensure that all the frequency components in a signal experience equal temporal delay.

Perhaps the most intuitive example is audio signals—the frequency components corresponding to the various pitches need to reach the speaker at the same time. This can be achieved by using linear-phase filters, but it is also possible to use all-pass filters to compensate for delay inequalities introduced by preceding filter stages.

How Much Phase Shift?

As you know, a filter with one pole is referred to as a first-order filter, and that one pole produces a total phase shift of 90° centered on the cutoff frequency f c (i.e., the phase shift at f c is 45°).

The situation is a bit different, though, with all-pass filters. A first-order all-pass filter has one pole, but it also has a symmetrically located zero:

This leads to an additional 90° of phase shift. Thus, a first-order all-pass provides a total phase shift of 180°, with the phase shift at f c being 90° instead of 45°.

The Circuits

A first-order all-pass can be implemented with or without an op-amp. Here is the purely passive topology:

$$f_c=\frac{1}{2\pi R_1C_1}$$

The passive circuit is a bit awkward. The output is not referenced to ground, and the gain is 0.5 instead of unity. And, of course, you have the typical passive-filter problem of relatively low input impedance and relatively high output impedance.

You will probably prefer the op-amp version; it has the same simple formula for determining the cutoff frequency, the output signal is referenced to ground, and the gain is unity.

$$f_c=\frac{1}{2\pi R_1C_1}$$

This particular circuit can be thought of as being inverting for low frequencies and noninverting for high frequencies: the phase shift starts at –180° and transitions to 0° through the region surrounding the cutoff frequency. You can modify this behavior by swapping R 1 and C 1 :

The gain and cutoff frequency are the same, but now the phase shift begins at 0° and transitions to –180°.