3. AllPass Filter and Test Signals
The allpass filter and audio test signals used in the listening test will now be presented. The theory in formulation of a tunable secondorder allpass filter facilitates implementation of the test signals. Test signal selection and implementation is justified by previous research results.
3.1 AllPass Filter Formulation
Allpass filters [20] pass all frequencies and rejects none as shown in Fig. 3.1. Although its magnitude characteristic is flat over the frequencies zero to infinity, the phase characteristic is shifted in accordance with the allpass filter’s characteristic.
Fig. 3.1. Magnitude characteristic of an allpass filter.
Suppose that the allpass filter has gain function H(s) where
(3.1)

If the filter is to be of the allpass type, then its ac steadystate magnitude characteristic H must be constant over all frequencies and satisfy
(3.2)

Then, the numerator and denominator of an allpass filter are related as
(3.3)

such that the zeros are the images of the poles. This means, if H(s) has a pole at s = s_{p}, then it must also have an image zero at s = s_{p} = s_{p}e^{jp }. Therefore, image zeros lie diagonally opposite their respective poles in the splane.
The ac steadystate phase characteristic of the allpass filter can be determined easily. From Eq. (3.1), its phase equals
.

(3.4)

Since
(3.5)

from Eq. (3.3),
(3.6)

such that the phase of the allpass filter is double that owing to the poles acting alone (its associated lowpass filter having gain H_{LP}(s) = k/D(s)). The delay of the allpass filter equals
(3.7)

which is double that of its associated lowpass filter.
Stable, causal systems cannot have RHP (righthand plane) poles and have only simple jw axis poles. Their zeros may lie anywhere in the splane and possess any multiplicity. Complex poles and zeros exist always in conjugate pairs. In general, stable, causal allpass filters have the additional constraints that N(s) = kD(s) from Eq. (3.3). Since the zeros are the images of the poles, following facts can be concluded regarding stable, causal allpass filters:
1. All zeros must lie in the righthalf plane. Any LHP (lefthand plane) zero
would have to have a RHP image pole which leads to instability.
2. Thus for stability, all poles must lie in the lefthalf plane and possess
image zeros in the righthalf plane.
3. Poles or zeros cannot lie on the jw axis
because the image zeros or poles would produce polezero cancellation.
4. Allpass filters are only capable of introducing positive delay (envelope
retardation), but never negative delay (envelope advancement). The delay characteristic
is always twice that of their associated lowpass filters having gain H(s)=k/D(s).
5. Thus, the nature of the phase characteristic of allpass filters must be
monotonically nonincreasing.
The firstorder allpass filter has gain
(3.8)

The delay characteristic of an allpass filter is double that of a lowpass filter having gain H(s) = 1/(s + w _{n}) so
(3.9)

The polezero pattern for the gain and delay are shown in Fig. 3.2.
Fig. 3.2. Polezero pattern for (a) gain and (b) delay for a firstorder allpass filter. [C. L. Lindquist, Active Network Design, (Steward & Sons, California, 1977), pp. 145, Fig. 2.11.1 (a)]
The secondorder allpass filter has complex poles and gain
(3.10)

Its delay equals
(3.11)

The polezero pattern for the gain and delay are shown in Fig. 3.3. Since the poles of H(s) lie on a circle of radius w _{n}, so do the poles of the delay. Also note that the RHP zeros of H(s) possess the same delay poles as the LHP poles of H(s). The delay zeros lie a s = ± w _{n}.
Fig. 3.3. Polezero patterns for (a) gain and (b) delay for a secondorder allpass filter. [C. L. Lindquist, Active Network Design, (Steward & Sons, California, 1977), pp. 146, Fig. 2.11.2 (a), (b)]
A wide variety of applications that require tunable allpass filters (variable Q and constant w _{0} or vice versa) exist. One application that requires tunable allpass filters is delay equalization. Delay equalizers are allpass filters where its delay is adjusted to equalize the delay of another filter to render the overall delay constant.
A formulation of a tunable secondorder allpass filter will now be shown [20]. From
(3.12)

that describes the maximum delay of a secondorder lowpass gain function 1 / (s^{2} + 2z s + 1) and
(3.13)

that describes the frequencydenormalized delay of a firstorder lowpass gain function 1 / (s + 1), the maximum delay and resonant frequency are
(3.14)

where Q >> 1 or z << 1 is assumed.
The unnormalized transfer function of an allpass filter is
(3.15)

where s_{n} = 1/w _{0 }and w _{0} = 1/2p f_{0}. These substitutions yield
.

(3.16)

Rearranging Eq. (3.14) yields
.

(3.17)

Now, the allpass filter can be specified in terms of desired center frequency f_{0} and peak group delay t _{max}. It is advantageous to apply the above result in the test signals for the listening test since what is tested here is the amount of groupdelay (or phase) distortion. It is of importance to note here that the above approximation has larger errors at frequency extremes. Thus, some manual compensation by inspection is necessary in the formulation of allpass filters with either very low center frequencies (f_{0} < 100 Hz) or with very high frequencies (f_{0} > 10000 Hz).
A numerical integration transformation considered here is the bilinear transform. The transformation from the analog to digital domain is:
.

(3.18)

where p_{n} is the normalized analog frequency and C is the analog frequency normalization constant. Since the bilinear transform maps the p_{n} plane imaginary axis on to the unit circle and the lefthalf p_{n}plane maps inside the unit circle, stable and causal analog filters H(p) will always produce stable and causal digital filters H(z). This transformation exhibits good impulse response characteristics and low implementation complexity. Because of the good correlation with the analog response, the bilinear transform is a good candidate for implementation of the digital allpass filter.
MATLAB was used in the formulation of the digital allpass filter. Fig. 3.4 (a), (b), and (c) display the magnitude, phase, and groupdelay response respectively for a secondorder allpass filter with peak group delay set to 4 msec and center frequency at 3500 Hz. Both analog and digital plots are shown. It is clear that the bilinear transform offers excellent correlation for both the analog and digital plots. Fig. 3.5 (a), (b), and (c) display the magnitude, phase, and groupdelay response respectively for a secondorder allpass filter with peak group delay set to 8 msec and center frequency at 3500 Hz. Again, excellent correlation for both the analog and digital plots are displayed.
Fig. 3.4 (a), (b), and (c). The magnitude, phase, and groupdelay response respectively for a secondorder allpass filter with peak group delay set to 4 msec and center frequency to 3500 Hz.
Fig. 3.5 (a), (b), and (c). The magnitude, phase, and groupdelay response respectively for a secondorder allpass filter with peak group delay set to 8 msec and center frequency to 3500 Hz.
3.2 Test Signal Formulation and Analysis
The test signals used in the experiment are:
1. 70 Hz sawtooth wave
2. 3.5 kHz sawtooth wave
3. 10 kHz sawtooth wave
4. Impulse
5. Jazzvocal group
6. Percussion instruments.
The sawtooth wave was chosen as a suitable test signal for its desirability in Lipshitz et al.’s [7] research results. Due to its rich harmonic content, the sawtooth wave was found to be the most audible waveform when phase distortion was present. The frequency 70 Hz was chosen as one of the frequencies for the sawtooth wave since signals with lowfrequency content were found to have characteristics where phase distortion was readily audible [16]. 3.5 kHz was chosen for the next sawtooth wave since the RobinsonDadson equalloudness curves (Fig. 3.6) revealed that the human ear is most sensitive to this area, albeit for pure tones. Each curve is representative of a range of frequencies which are perceived to be equally loud. In selecting 3.5 kHz, it was assumed since this frequency provides maximal sensitivity to loudness (a primary factor), any detection of phase distortion (a secondary factor) would be facilitated.
Fig. 3.6. The RobinsonDadson equalloudness curves show that the ear has nonlinear characteristics with respect to frequency and loudness. These curves are based on psychoacoustic research using pure tones. [K. C. Pohlmann, Principles of Digital Audio, (McGrawHill, New York, 1995), pp. 360, 113.]
10 kHz was chosen for the third and final sawtooth wave because this was exactly twice the frequency of threshold (f > 5kHz) where spike discharges can lock to one phase of the stimulating waveform. Theory [5] states that the ear cannot latch on to the phase of the stimulating waveform at such high frequencies. All sawtooth waves were 1 second in duration.
The impulse (a ‘1’ with trailing zeros) was chosen because of its short time and broad frequencydomain characteristics. The male and female acapella jazzvocal group, with its rich spatial content was a good candidate to test the perceived alteration of spatial qualities as a function of phase distortion incurred [22].
The percussion instrument passage was chosen to test the audibility of phase distortion in real instruments of transient content, besides a pure impulse. Both the jazzvocal group and percussion instruments were recorded at the University of Miami using the recording facilities available.
Based on the research of Preis et al. [17] and Deer et al. [18], 4 msec and 8 msec were the delay times chosen for the peak delays of the allpass filter since they gave significant results for an impulsive test signal. These delay times were assumed to provide a valid reference starting point for other test signals. As referenced to the no peakdelay condition 0 msec, 4 msec is defined as ‘medium’ phase distortion and 8msec as ‘high’ phase distortion.
The center frequency, f_{0} chosen for the allpass filters were:
1. 70 Hz Sawtooth Wave:  f_{0} = 70 Hz 
2. 3.5 kHz Sawtooth Wave:  f_{0} = 3.5 kHz 
3. 10 kHz Sawtooth Wave:  f_{0} = 10 kHz 
4. Impulse:  f_{0} = 3.5 kHz 
5. Jazz Vocal Group:  f_{0} = 160 Hz 
6. Percussion Instruments:  f_{0} = 150 Hz 
3.5 kHz was chosen as a center frequency for the impulse since the introduction of phase distortion in the region assumed most sensitive to the human ear in the RobinsonDadson curves should maximize audible phase distortion differences. 160 Hz was chosen as an allpass filter center frequency for the jazzvocal group since a spectogram analysis (Fig. 3.7) of the signal revealed significant frequency content in this area. Introduction of phase distortion in this region should maximize the audibility of its effect. The same reasoning applies for the 150 Hz center frequency for the percussion ensemble (Fig. 3.8).
Fig. 3.7. 128 point FFT, 44100 Hz sampling frequency spectogram for the jazzvocal group, left channel only.
Fig. 3.8. 128 point FFT, 44100 Hz sampling frequency spectogram for the percussion ensemble, left channel only.
Fig. 3.9 and 3.10 are the unfiltered and allpass filtered impulse test signals for maximum group delay 4 msec and 8 msec respectively. Close inspection of these plots reveal that the 4 msec allpass filtered impulse has significantly more waveform distortion that the 8 msec version. This is due to the fact that the 4 msec version has a broader Q (as a result of the allpass filter formulation that was based on the desired maximum delay t _{max}) than the 8 msec version. However, obviously the 8 msec allpass filter has greater maximum delay at its center frequency.
Fig. 3.9. Unfiltered (solid) and allpass filtered (dotted) impulse. For the allpass filter, the center frequency, f_{0} = 3.5 kHz and the maximum group delay t _{max} = 4 msec.
Fig. 3.10. Unfiltered (solid) and allpass filtered (dotted) impulse. For the allpass filter, the center frequency, f_{0} = 3.5 kHz and the maximum group delay t _{max} = 8 msec.
Fig. 3.11 and 3.12 are the unfiltered and allpass filtered 3.5 kHz sawtooth waves for maximum group delay 4 msec and 8 msec respectively. Again, due to the allpass filter formulation used, it seems that the 4 msec allpass filtered signal has incurred more severe waveform distortion than the 8 msec version.
This chapter introduced the allpass filter and audio test signals used in the listening test. The steps in formulating the allpass filter were outlined. This was followed up by a formulation of a tunable secondorder allpass filter. The bilinear transform was introduced to perform the analog to digital transformation for the allpass filter. Finally, test signals used in the listening test were introduced and discussed.
Fig. 3.11. Unfiltered (solid) and allpass filtered (dotted) 3.5 kHz sawtooth wave. For the allpass filter, the center frequency, f_{0} = 3.5 kHz and the maximum group delay t _{max} = 4 msec.
Fig. 3.12. Unfiltered (solid) and allpass filtered (dotted) 3.5 kHz sawtooth wave. For the allpass filter, the center frequency, f_{0} = 3.5 kHz and the maximum group delay t _{max} = 8 msec.
It was shown that the formulation of a tunable secondorder allpass filter facilitated implementation of test signals. The next chapter will incorporate the test signals selected in this chapter for the listening test implementation