JAES_V58_12_Egalizor_digital
description
Transcript of JAES_V58_12_Egalizor_digital
ENGINEERING REPORTS
Improving the Magnitude Responses of DigitalFilters for Loudspeaker Equalization*
MOHAMAD ADNAN AL-ALAOUI([email protected])
Department of Electrical and Computer Engineering, American University of Beirut, Beirut, Lebanon
Digital filters used in the equalization of loudspeakers try in some applications to achieve a
digital approximation of analog filters. The bilinear z transform (BZT) and the matched pole–
zero transform (MPZT or MZT) are often used with less than satisfactory results. Recently a
new MZT transform, called MZTi, was introduced, which yields filters with magnitude and
phase responses that match their analog target filters better. A novel s-to-z transform that
yields often closer approximations to the analog target filters than the MTZi method is
described.
0 INTRODUCTION
Digital filters are used in the equalization of loud-
speakers [1]–[5]. The filters are supposed to approximate
analog target filters. The bilinear z transform (BZT) [6]–
[13] and the matched pole–zero z transform (MPZT or
MZT) [6], [11] are often employed with less than
satisfactory results to approximate the target analog
filters. Better filters have been obtained by using
variations of the BZT [2] and MZT [3] methods. As
pointed out by one of the reviewers, whose comments
are quoted in the remainder of this paragraph, ‘‘the
assumption that digital filters used to equalize loud-
speakers are meant to match analog prototypes is not
always true. There are times when digital filters are used
for loudspeaker equalization to do things that an analog
filter cannot do. Also there are other applications, such
as mixing desks, where accurate transforms of analog
filters are often desired.’’ This engineering report ad-
dresses applications where it is desired that the digital
filter responses mimic their corresponding analog
prototypes.
Recently Gunness and Chauhan proposed minimizing
the error by adding zeros or by shifting the positions of
poles and zeros to all-pole or biquadratic filters, re-
spectively. The resulting filters, called MZTi, were shown
to yield better approximations to the target analog filters
[1].
In this study, we compare the performance of the MZTi
approach proposed in [1] and the novel approach to
analog-to-digital transforms that was proposed by Al-
Alaoui [14]. This publication is divided into five sections,
including the Introduction and the Conclusion. Section 1
introduces Al-Alaoui’s proposed transforms, Section 2
presents an overview of analog bell filters, and Section 3
compares Al-Alaoui transforms to the MTZi approach
and demonstrates the superiority of the Al-Alaoui
transforms.
1 AL-ALAOUI MPZ TRANSFORM
In [14] Al-Alaoui developed new s-to-z transforms to
overcome the deficiencies in the traditional transforms.
The traditional transforms approximate s of the analog
transfer function in some fashion. They end up substitut-
ing approximations of s, in effect a scaled value of s, in
the (s þ a) factors while keeping the exact value of a, thus
introducing additional distortions. However, the new
transform approximates the factors (s þ a) in the transfer
function. In the resulting transforms every pole will also
generate a zero and vice versa. This is similar to the MPZ
transform, except that in the latter case the zeros are
assigned at z¼�1, whereas in the Al-Alaoui transform the
zeros are generated automatically.
Several parallel and cascade forms were proposed in
[14]. In all examples the following variants of the cascade
form algorithm presented in [14] are used.
1) Real poles and zeros are treated using the original
cascade transformation approach, that is, the following
applies:
1
sþ a¼ K
1þ e�aTz�1
1� e�aTz�1; sþ c ¼ K
1� e�cTz�1
1þ e�cTz�1:
ð1Þ
2) Higher degree factors are treated by applying
successive first-degree factors.*Manuscript received 2009 January 21; revised 2010 August
8 and October 8.
1064 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
3) Complex poles and zeros are treated using the
recombined partial fraction method since that reduces the
overall order. The following applies:
1
s2þ 2asþ a2 þ b2¼ K
0 z�1
1� 2e�aTcosðbTÞz�1 þ e�2aTz�2
ð2Þ
s2þ 2csþ c
2 þ d2 ¼ K
0 1� 2e�cTcosðdTÞz�1þ e�2cTz�2
z�1:
ð3Þ
4) The constant factor in the transfer function of the
resulting discrete-time system is evaluated to obtain the
same magnitude as the analog transfer function at the
scaling frequency xS. Unless specified otherwise, dc
scaling was used.
A corresponding MATLAB code of this procedure is
included in the Appendix.
2 APPLICATION TO LOUDSPEAKEREQUALIZATION
We consider the application of the Al-Alaoui MPZ
transform and the MZTi approach to loudspeaker
equalization as described in [1]. Hence our main concern
is with audio applications, where one of the most
commonly used filters is the bell filter. The analog
transfer function of the bell filter takes the form
HðsÞ ¼ s2 þ ððg0 � sÞ=QÞ þ 1
s2 þ ðs=QÞ þ 1: ð4Þ
In Eq. (4) the resonant frequency is normalized to 1.
The filter is characterized by the parameters g0 and Q,
with g0 being the gain at the resonant frequency. We will
consider several cases by varying these two parameters.
For each case we present figures comparing the
magnitude, phase, and absolute magnitude error for the
MZTi approach and the Al-Alaoui MPZ transform.
3 SIMULATION RESULTS
The following ten cases were implemented and the
corresponding figures plotted. Different values of Q, g0,
and the resonant frequency x0 are studied. The figures
present in each case the analog filter responses and the
corresponding digital filters, which were obtained by
using the MZTi and the Al-Alaoui transforms.
Case 1: Q ¼ 2; g0 ¼ 15 dB, x0 ¼ 1
Case 2: Q ¼ 2.8; g0 ¼ 15 dB, x0 ¼ 1
Case 3: Q ¼ 3; g0 ¼ 20 dB, x0 ¼ 1
Case 4: Q ¼ 2; g0 ¼ 10 dB, x0 ¼ 1
Case 5: Q ¼ 3; g0 ¼ 15 dB, x0 ¼ 1
Case 6: Q ¼ 3.5; g0 ¼ 15 dB, x0 ¼ 1
Case 7: Q ¼ 1.0; g0 ¼ 5 dB, x0 ¼ 1
Case 8: Q ¼ 10; g0 ¼ 20 dB, x0 ¼ 1
Case 9: Q ¼ 5; g0 ¼�12 dB, x0 ¼ 1
Case 10: Q ¼ 5; g0 ¼ 15 dB, x0 ¼ 0.85p
For each of these cases three graphs are plotted: the
magnitude response, the phase response, and the magni-
tude error of the resulting digital filters with respect to the
corresponding analog filter. Fig. 1 plots the magnitudes,
phases, and magnitude errors for case 1; Fig. 2 plots the
magnitudes, phases, and magnitude errors for case 2; and
so on for cases 3 to 10 (Figs. 1–10).
The figures show that the Al-Alaoui approach outper-
forms the MZTi approach in all cases except for cases 1 and
3. In particular, case 10 shows a better behavior of the Al-
Alaoui approach when the resonant frequency gets close to
the Nyquist frequency. Case 9 shows the superiority of the
Al-Alaoui approach when the gain is negative (in dB). The
other examples show the superiority of the Al-Alaoui
approach for a wide range of gains and Q values.
To explain the performance of the Al-Alaoui method in
cases 1 and 3, where it is outperformed by MZTi, we
resort to the information presented in Tables 1 and 2.
Table 1 shows the order of the different filters in all the
cases studied. Consequently it can be seen from Table 1
that the filters obtained from the Al-Alaoui method have
an order less than or are equal to those of MZTi in all
cases studied. Furthermore the Al-Alaoui method pre-
serves the order of the analog filter in eight out of ten
examples. The only two cases where the Al-Alaoui
approach leads to a higher order are cases 1 and 3, that is,
the cases where the Al-Alaoui approach has a worse
performance. Table 2 shows the poles and zeros of the
analog bell filters for the ten cases investigated. From
Table 2 it can be seen that all poles and zeros are complex
conjugate pairs, except for cases 1 and 3, where the zeros
of the bell filter are real. This explains the performance of
the Al-Alaoui method in the examples studied.
In fact each pole or zero generates a pole and a zero
with the Al-Alaoui method when the poles or zeros are
real, as expressed in Eq. (1). When they are complex
conjugates, this is not the case, as shown by Eq. (2),
where a pair of complex conjugate poles generates an
additional zero at the origin, and a pair of complex
conjugate zeros generates an additional pole at the origin.
Hence when both complex conjugate poles and zeros are
present, the extra poles and zeros at the origin cancel out.
In cases 1 and 3 the two real zeros of the analog filters
introduce two additional real poles when the Al-Alaoui
approach is implemented. These additional real poles
tamper with the bell-shaped response, which is controlled
by the complex conjugate poles. This scenario does not
happen in all the other cases, where the Al-Alaoui method
performs better.
It should be noted that this addition of poles and zeros
is inherent in the Al-Alaoui transform and contributes to
its superior performance in various applications, such as
those presented in [14]. However, it presents a drawback
when applied to loudspeaker equalization. To solve this
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1065
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
Fig. 1. Case 1: Q ¼ 2; g0¼ 15 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
1066 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS
Fig. 2. Case 2: Q ¼ 2.8; g0 ¼ 15 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1067
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
Fig. 3. Case 3: Q ¼ 3; g0¼ 20 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
1068 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS
Fig. 4. Case 4: Q ¼ 2; g0 ¼ 10 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1069
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
Fig. 5. Case 5: Q ¼ 3; g0¼ 15 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
1070 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS
Fig. 6. Case 6: Q ¼ 3.5; g0 ¼ 15 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1071
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
Fig. 7. Case 7: Q ¼ 1.0; g0 ¼ 5 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
1072 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS
Fig. 8. Case 8: Q ¼ 10; g0 ¼ 20 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1073
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
Fig. 9. Case 9: Q¼ 5; g0 ¼�12 dB. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
1074 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS
Fig. 10. Case 10: Q ¼ 5; g0 ¼ 15 dB, x0¼ 0.85p. (a) Magnitude responses. (b) Phase responses. (c) Magnitude errors.
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1075
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
problem, and in order to preserve the bell-shaped
response in the digital filters obtained from the Al-Alaoui
transform, we modify Eq. (1) by simply removing the
additional pole obtained from a real zero in the analog
filter. Hence we obtain
sþ c ¼ Kð1� e�cT
z�1Þ: ð5Þ
The implementation of Eq. (5) instead of Eq. (1) in the
Al-Alaoui transform is denoted in the figures by
‘‘modified Al-Alaoui.’’ The modified Al-Alaoui approach
clearly leads to a considerably enhanced performance in
cases 1 and 3 and outperforms the MZTi method. It leads
to exactly the same performance as the initial Al-Alaoui
approach in all the other cases (since they do not involve
real zeros in the analog filter) and hence is not shown in
the corresponding figures. Furthermore since the addi-
tional poles are removed, the filters obtained by the
modified Al-Alaoui method are all of order 2 in all the
cases studied, that is, they are of the same order as the
analog bell filters, as shown in Table 1.
To summarize, we can conclude that the Al-Alaoui
approach outperforms MZTi whenever the zeros of the
analog bell filter are complex conjugates, and performs
worse when the zeros are real. However, the modified Al-
Alaoui approach is superior in all cases.
4 CONCLUSION
The proposed novel Al-Alaoui MPZ transform was
compared to the state of the art MZTi approach. In all the
examples shown the Al-Alaoui s-to-z transform was
comparable to or superior than the state-of-the-art MZTi
approach. The filters obtained by the Al-Alaoui approach
are closer to the ideal analog response over the entire
frequency range, and in particular over the low-frequency
range (between zero and the resonant frequency). Hence
they are very suitable for the relevant audio applications.
A modified Al-Alaoui approach was presented, which
approximates the ideal analog response over the entire
frequency range.
5 ACKNOWLEDGMENT
This research was supported in part by the University
Research Board of the American University of Beirut.
The author wishes to acknowledge Dr. Elias Yaacoub and
Jimmy Azar for their invaluable contributions to the
production of this engineering report. He is grateful to the
outstanding reviewers whose comments contributed
significantly to the improvement of the study. The author
would further like to thank Ali H. Sayed for providing the
atmosphere conducive to research through his invitation
to the author to spend part of his research leave in the
Adaptive Systems Laboratory at UCLA, as well as the
graduate students Zaid Towfic, Sheng-Yuan Tu, Federico
Cattivelli, Zhi Quan, Qiyue Zou, and Cassio G. Lopes for
their help during his stay at UCLA.
6 REFERENCES
[1] D. W. Gunness and O. S. Chauhan, ‘‘Optimizing the
Magnitude Response of Matched z-Transform Filters
(MZTi) for Loudspeaker Equalization,’’ in Proc. AES
32nd Int. Conf. ‘‘DSP for Loudspeakers,’’ (Hillerod,
Denmark, 2007 Sept. 21–23), pp. 1–10.
[2] S. Orfanidis, ‘‘Digital Parametric Equalizer Design
with Prescribed Nyquist-Frequency Gain,’’ presented at
the 101st Convention of the Audio Engineering Society,
J. Audio Eng. Soc. (Abstracts), vol. 44, p. 1168 (1996
Dec.), preprint 4361.
Table 1. Filter orders of different methods for examples
studied.
Case 1 2 3 4 5 6 7 8 9 10
Analog 2 2 2 2 2 2 2 2 2 2
MZTi 4 3 4 3 3 3 3 3 4 4
Al-Alaoui 4 2 4 2 2 2 2 2 2 2
Modified Al-Alaoui 2 2 2 2 2 2 2 2 2 2
Table 2. Poles and zeros of analog filters in examples
studied.
Case Poles Zeros
1 �0.2420 þ 0.9703i �2.2834
�0.2420 � 0.9703i �0.4379
2 �0.1728 þ 0.9850i �0.9719 þ 0.2354i
�0.1728 � 0.9850i �0.9719 � 0.2354i
3 �0.1650 þ 0.9863i �2.9623
�0.1650 � 0.9863i �0.3376
4 �0.2236 þ 0.9747i �0.7071 þ 0.7071i
�0.2236 � 0.9747i �0.7071 � 0.7071i
5 �0.1613 þ 0.9869i �0.9071 þ 0.4209i
�0.1613 � 0.9869i �0.9071 � 0.4209i
6 �0.1383 þ 0.9904i �0.7775 þ 0.6289i
�0.1383 � 0.9904i �0.7775 � 0.6289i
7 �0.3749 þ 0.9270i �0.6668 þ 0.7453i
�0.3749 � 0.9270i �0.6668 � 0.7453i
8 �0.0495 þ 0.9988i �0.4950 þ 0.8689i
�0.0495 � 0.9988i �0.4950 � 0.8689i
9 �0.3721 þ 0.9282i �0.0935 þ 0.9956i
�0.3721 � 0.9282i �0.0935 � 0.9956i
10 �0.2585 þ 2.6578i �1.4534 þ 2.2402i
�0.2585 � 2.6578i �1.4534 � 2.2402i
1076 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS
[3] R. J. Clark, E. C. Ifeachor, G. M. Rogers, and P. W.
J. Van Eetvelt, ‘‘Techniques for Generating Digital
Equalizer Coefficients,’’ J. Audio Eng. Soc., vol. 48, pp.
281–298 (2000 Apr.).
[4] R. J. Clark, ‘‘Investigation into Digital Audio
Equaliser Systems and the Effects of Arithmetic and
Transform Error on Performance,’’ Department of Com-
munication and Electronic Engineering, Faculty of
Technology, Ph.D. thesis, University of Plymouth, UK
(2001 Apr.).
[5] K. B. Christensen, ‘‘A Generalization of the
Biquadratic Parametric Equalizer,’’ presented at the
115th Convention of the Audio Engineering Society, J.
Audio Eng. Soc. (Abstracts), vol. 51, p. 1233 (2003 Dec.),
convention paper 5916.
[6] E. C. Ifeachor and B. W. Jervis, Digital Signal
Processing: A Practical Approach, 2nd ed. (Pearson
Education, Essex, UK, 2002), pp. 468–471.
[7] F. G. Franklin, J. D. Powell, and A. Emami-Naeini,
Feedback Control of Dynamic Systems (Addison-Wesley,
Reading, MA, 1994).
[8] S. K. Mitra, Digital Signal Processing (McGraw-
Hill, New York, 1998).
[9] A. V. Oppenheim and R. W. Schafer, Discrete-Time
Signal Processing (Prentice-Hall, Englewood Cliffs, NJ,
1989).
[10] C. L. Philips and H. T. Nagle, Digital Control
System Analysis and Design, 3rd ed. (Prentice-Hall,
Englewood Cliffs, NJ, 1995), chap. 11.
[11] J. G. Proakis and D. G. Manolakis, Introduction to
Digital Signal Processing, 3rd ed. (Prentice-Hall, Engle-
wood Cliffs, NJ, 1996).
[12] L. R. Rabiner and B. Gold, Theory and
Applications of Digital Signal Processing (Prentice-Hall,
Englewood Cliffs, NJ, 1975).
[13] K. Steiglitz, A Digital Signal Processing Primer:
With Applications to Computer Music (Addison-Wesley,
Reading, MA, 1994).
[14] M. A. Al-Alaoui, ‘‘Novel Approach to Analog to
Digital Transforms,’’ IEEE Trans. Circuits Sys. I:
Fundamental Theory and Applications, vol. 54, pp.
338–350 (2007 Feb.).
APPENDIXThe MATLAB code for the procedure described in Section 1 is as follows:
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1077
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
APPENDIX continued
1078 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS
APPENDIX continued
The function bell_filter_Wc implements the analog Bell filter that corresponds to [1, eqs. (1)–(4)].
The function mzt_lp_ord2 implements the MZTi second-order low-pass filter that corresponds to [1, eqs. (11)–(15)].
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1079
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
APPENDIX continued
The function fir_curve_fit implements the FIR curve fit transform presented in [1, sec. 2].
The function alalaoui used to implement the proposed approach using the Al-Alaoui transform derived in [14] is as
follows:
1080 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
APPENDIX continued
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December 1081
ENGINEERING REPORTS DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION
APPENDIX continued
THE AUTHOR
M. A. Al-Alaoui
Mohamad Adnan Al-Alaoui received a B.S. degree in
mathematics from Eastern Michigan University, Ypsilan-
ti, MI, in 1963, a B.S.E.E. degree from Wayne State
University, Detroit, MI, in 1965, and M.S.E.E. and Ph.D.
degrees in electrical engineering from the Georgia
Institute of Technology, Atlanta, in 1968 and 1974,
respectively.
After receiving a Ph.D. degree he joined the Electrical
Engineering Department of the Royal Scientific Society,
Amman, Jordan, where he was responsible for the
communications area. From 1977 to 1985 he served as
an assistant professor or associate professor in electrical
engineering at the American University of Beirut (AUB),
Beirut, Lebanon, the University of Connecticut, Storrs,
and the Hartford Graduate Center, Hartford, CT. He was
Chair of the Automatic Control Department at the Higher
Institute for Applied Science and Technology, Damascus,
Syria, and in 1988 he rejoined AUB, where he is currently
a professor and where he also served as chair of the
Department of Electrical and Computer Engineering. His
research interests are in neural networks and in analog
and digital signal and image processing and their
applications in biomedical engineering, communications,
controls, and instrumentation. He was a visiting scholar
with Stanford University, the University of Southern
California, the University of California at Santa Barbara,
and the University of California at Los Angeles.
Dr. Al-Alaoui was the recipient of the First Research
Award in Engineering for 1989–1990 by AUB. He is a
senior member of the IEEE.
1082 J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December
AL-ALAOUI ENGINEERING REPORTS