A never-ending debate is that of linear versus minimum phase filters with proponents of each often deriding the other as unnatural or even unlistenable. We explore the meaning of these terms and how the differences can impact an audio signal.

All digital audio requires the use of filters. Specifically, low-pass filters are used during production when reducing the sample rate for distribution on CD or streaming. Similar filters are also used by the DAC to reconstruct an analogue waveform during playback. In both cases, the filters can be constructed in a variety of ways. The most common designs are known as linear phase and minimum phase.

Linear phase

Figure 1 below shows the impulse response of a typical low-pass filter. In this plot, the response is centred around time zero with ripples extending in both the positive and negative directions. This means that in order to apply it to a signal, we would need access to input values from the future. For this reason, such filters are termed acausal, their effect preceding the cause. Realising such a filter without access to a time machine is clearly impossible.

Linear phase impulse response

Fortunately, we do have a time machine of sorts. The filters we are discussing are examples of time-invariant systems. If we delay the input by some amount, the output remains unchanged apart from an equal delay. Since the impulse response above extends 1 millisecond in the negative direction, delaying the signal by this amount allows us to realise this filter.

In the frequency domain, a time delay is expressed as a phase shift. At 1 kHz, a delay of 1 millisecond becomes a shift of one period or 360 degrees. Doubling the frequency to 2 kHz also doubles the phase shift to two periods or 720 degrees. If a filter delays all frequencies equally in time, this linear relationship between frequency and phase shift is preserved, giving rise to the term linear phase filter. As it happens, any filter with a symmetrical impulse response has this property.

A clear advantage of linear phase filters is their lack of distortion in the passband. In the case of a low-pass filter, if the signal being processed is already band-limited, it will remain unaltered. The disadvantage is the delay, equal to half the filter length, which for some applications can become prohibitively large. For example, in an effect processor for use in a live performance, the total delay must be at most a few milliseconds, so if a few filters are used in sequence, the sum of their delays can easily become prohibitive.

Minimum phase

The solution to the problem of signal delay with linear phase filters is to use a different kind of filter, minimum phase. As the name suggests, these filters minimise the phase shift incurred at each frequency while delivering the desired magnitude response. The impulse response of a minimum phase version of the filter above is shown in figure 2.

Minimum phase impulse response

Here the primary peak occurs a mere 0.12 milliseconds from the start. On the other hand, the trailing ripples extend twice as far as in the linear phase filter, and their amplitude is also approximately doubled. We also notice that the peak is lower and wider, by a factor of about 1.5, than in the linear phase case. If graphical similarity to an ideal impulse were important, this smearing might perhaps be of concern.

If there are audible differences between the filter types, they must be found in the passband, below 20 kHz. As we already noted, minimum phase filters delay each frequency by the smallest possible amount. However, the phase shift is no longer linear with frequency, higher frequencies being delayed somewhat more.

Group delay

A non-linear phase response results in frequency-dependent group delay. What this means is that changes in amplitude of a frequency component are delayed differently depending on the frequency. In musical terms, a high note might be delayed relative to a low note, clearly an undesirable effect.

In order to demonstrate the variable group delay, we require a test signal containing multiple frequencies arranged so as to facilitate easy detection of the effect. To this end, we begin by constructing a low-frequency (2 kHz) and a high-frequency (16 kHz) burst, each with a duration of 1 millisecond. These are shown in figures 3 and 4 below. For the mathematically curious, these are simple sine waves multiplied by a Kaiser window.

Low-frequency burst
High-frequency burst

For our first test, we concatenate these signals along with some zero padding and apply each of the filters discussed above. Both filters have a flat magnitude response up to 20 kHz, so ideally the signal should be unaffected. For the linear phase filter, figure 5 shows that this is indeed the case. The filtered output perfectly overlays the input after compensating for the fixed delay.

Linear phase filter output

With the minimum phase filter, things look different. In figure 6, its output (red) has been aligned such that the first part, the 2 kHz burst, overlaps with the input (dotted blue). The second half of the signal, containing the 16 kHz burst, is clearly delayed by the filter. With this particular filter, the difference is approximately 85 microseconds.

Minimum phase filter output

Next, we examine what happens when the input signal contains both low and high frequencies at the same time. Adding the two bursts in a 3-to-1 ratio yields the waveform in figure 7.

Combined LF and HF burst

We can clearly see both the low-frequency wobble and the superimposed high-frequency ripples. Applying the linear phase filter produces, as expected, no discernible effect, so a graph seems unnecessary. Once again, however, the minimum phase filter leaves a distinct mark on the signal, as shown in figure 8.

Minimum phase filtered LF + HF signal

As before, the original signal is drawn in dotted blue and the filter output in red. While the low-frequency component matches the input well, the high-frequency ripples are shifted to the right. If one were to talk about time domain accuracy, this would not be it.

Is such a delay of high frequencies audible? In the amount seen here, probably not. However, if multiple such filters are cascaded, the delays accumulate and could conceivably become audible at some point. The situation permitting, it seems prudent to avoid these distortions and use linear phase filters. If, on the other hand, low delay is a necessity, using the occasional minimum phase filter should still be harmless.

DAC tests

All the graphs above were created entirely in software with no involvement of actual audio equipment. Therefore, we shall also test two DACs looking for similar effects. First up is a Burr-Brown DSD1793 based device. Its interpolation filter is linear phase, as evidenced by the symmetrical impulse response in figure 9.

DSD1793 impulse response

Playing back the combined LF and HF signal through this DAC, the scope captures the image in figure 10. Unsurprisingly, the DAC output looks a lot like the plot of the input signal.

DSD1793 playback of LF + HF signal

The other DAC uses an ES9010 chip configured for minimum phase filtering. The impulse response (figure 11) has the general shape typical of such filters, an initial primary peak followed by a long tail of ripples.

ES9010 minimum phase impulse response

Figure 12 shows the output from this DAC when playing back the test signal. The ripples are, again, clearly shifted towards the right.

ES9010 playback of LF + HF signal

Conclusions

The debates over which filter type is better tend to revolve around the impulse responses. Those in favour of minimum phase are quick to point out the “pre-ringing” seen in the linear phase plots. Their argument is that this unnatural and cannot possibly sound right, while conveniently ignoring the fact that these ripples have inaudible frequencies, if they are present at all.

On the other side of the divide, adherents of linear phase filters emphasise the lack of phase distortion of the kind we have just demonstrated. While this argument is stronger, resting on effects occuring at audible frequencies, it is still not quite convincing. The observed differences in group delay are minute compared to the attack portion of a musical note. It is not as though minimum phase filters turn chords into arpeggios.

Given that no agreement on the matter is in sight, and that the observable differences between the filter types are tiny, it seems reasonable to assume that both factions are engaging in a fair amount of hyperbole. Were the differences really so striking, there should not have been any debate in the first place.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.