DSPRelated.com
Free Books

Is Linear Phase Really Ideal for Audio?

It is generally accepted that zero or linear phase filters are ideal for audio applications. This is because such filters delay all frequencies by the same amount, thereby maximally preserving waveshape. Mathematically, all Fourier-components passed by the filter remain time-synchronized exactly as they were in the original signal. However, this section will argue that a phase response somewhere between linear- and minimum-phase may be even better in some cases. We show this by means of a Matlab experiment comparing minimum-phase and zero-phase impulse responses.

The matlab code is shown in Fig.11.1. An order $ 8$ elliptic-function lowpass filter [64] is designed with a cut-off frequency at 2 kHz. We choose an elliptic-function filter because it has a highly nonlinear phase response near its cut-off frequency, resulting in extra delay there which can be perceived as ``ringing'' at that frequency. The cut-off is chosen at 2kHz because this is a highly audible frequency. We want to clearly hear the ringing in this experiment in order to compare the zero-phase and minimum-phase cases.

Figure 11.1: Matlab script for listening to minimum-phase and zero-phase impulse responses having the same amplitude response.

 
% ellipt.m - Compare minimum-phase and zero-phase
%            lowpass impulse responses.

dosounds = 1;
N = 8;     % filter order
Rp = 0.5;  % passband ripple (dB)
Rs = 60;   % stopband ripple (-dB)
Fs = 8192; % default sampling rate (Windows Matlab)
Fp = 2000; % passband end
Fc = 2200; % stopband begins [gives order 8]
Ns = 4096; % number of samples in impulse responses

[B,A] = nellip(Rp, Rs, Fp/(0.5*Fs), Fc/(0.5*Fs)); % Octave
% [B,A] = ellip(N, Rp, Rs, Fp/(0.5*Fs)); % Matlab

% Minimum phase case:
imp = [1,zeros(1,Ns/2-1)]; % or 'h1=impz(B,A,Ns/2-1)'
h1 = filter(B,A,imp); % min-phase impulse response
hmp = filter(B,A,[h1,zeros(1,Ns/2)]); % apply twice

% Zero phase case:
h1r = fliplr(h1); % maximum-phase impulse response
hzp = filter(B,A,[h1r,zeros(1,Ns/2)]); % min*max=zp
% hzp = fliplr(hzp); % not needed here since symmetric

elliptplots; % plot impulse- and amplitude-responses

% Let's hear them!
while(dosounds)
  sound(hmp,Fs);
  pause(0.5);
  sound(hzp,Fs);
  pause(1);
end

Let the impulse response of the $ 8$th order lowpass filter be denoted $ h(n)$. It is neither minimum nor maximum phase because there are zeros on the unit circle. (An elliptic-function filter has all of its zeros on the unit circle.) However, nothing of practical importance changes if we move the zeros from radius 1 to radius $ 1-10^{-12}$, say, which would give a minimum-phase perturbation of the elliptic lowpass.

From $ h(n)$ we prepare two impulse responses having the same magnitude spectra but different phase spectra:

$\displaystyle h_{\hbox{\tiny mp}}\isdef h\ast h,
$

which is minimum phase,12.2 and

$\displaystyle h_{\hbox{\tiny zp}}\isdef h\ast$   FLIP$\displaystyle (h),
$

which is zero phase, as discussed in §10.6. In both cases, the magnitude spectrum is

$\displaystyle \left\vert H_{\hbox{mp}}(e^{j\omega T})\right\vert \eqsp \left\ve...
...zp}}(e^{j\omega T})\right\vert \eqsp \left\vert H(e^{j\omega T})\right\vert^2,
$

while the phase spectra are

\begin{eqnarray*}
\angle{H_{\hbox{mp}}(e^{j\omega T})} &=& 2\angle{H(e^{j\omega T})}\\
\angle{H_{\hbox{zp}}(e^{j\omega T})} &=& 0,
\end{eqnarray*}

again as discussed in §10.6.

Since we are listening to a lowpass-filtered impulse, it is reasonable to define the ideal expected sound as a ``lowpass-filtered click,'' or some kind of ``compact thump.'' We may therefore ask which signal sounds more like a lowpassed click, $ h_{\hbox{\tiny mp}}$ or $ h_{\hbox{\tiny zp}}$? In the minimum-phase case, all filter ringing occurs after the main pulse, while in the zero-phase case, it is equally divided before and after the main pulse (see Fig.11.2). Listening tests confirm that the ``pre-ring'' of the zero-phase case is audible before the main click, giving it a kind of ``chirp'' quality. Most listeners would say the minimum-phase case is a better ``click''. Since forward masking is stronger than backward masking in hearing perception, the optimal distribution of ringing is arguably a small amount before the main pulse (however much is inaudible due to backward masking, for example), with the rest occurring after the main pulse.

Figure 11.2: Minimum-phase and zero-phase impulse responses derived from two applications of an order $ 8$ elliptic-function lowpass filter.
\includegraphics[width=\twidth]{eps/elliptt}

Figure 11.3 verifies that the magnitude spectra are the same in each case.

Figure 11.3: Magnitude spectra of minimum-phase and zero-phase impulse responses derived from two passes through an order 8 elliptic-function lowpass filter.
\includegraphics[width=\twidth]{eps/elliptf}


Next Section:
Creating Minimum Phase Filters and Signals
Previous Section:
Minimum-Phase/Allpass Decomposition