Sei sulla pagina 1di 19

ENGINEERING REPORTS

Improving the Magnitude Responses of Digital Filters for Loudspeaker Equalization*


MOHAMAD ADNAN AL-ALAOUI
(adnan@aub.edu.lb)

Department of Electrical and Computer Engineering, American University of Beirut, Beirut, Lebanon

Digital lters used in the equalization of loudspeakers try in some applications to achieve a digital approximation of analog lters. 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 lters with magnitude and phase responses that match their analog target lters better. A novel s-to-z transform that yields often closer approximations to the analog target lters than the MTZi method is described.

0 INTRODUCTION Digital lters are used in the equalization of loudspeakers [1][5]. The lters are supposed to approximate analog target lters. The bilinear z transform (BZT) [6] [13] and the matched polezero z transform (MPZT or MZT) [6], [11] are often employed with less than satisfactory results to approximate the target analog lters. Better lters 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 lters used to equalize loudspeakers are meant to match analog prototypes is not always true. There are times when digital lters are used for loudspeaker equalization to do things that an analog lter cannot do. Also there are other applications, such as mixing desks, where accurate transforms of analog lters are often desired. This engineering report addresses applications where it is desired that the digital lter 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 lters, respectively. The resulting lters, called MZTi, were shown to yield better approximations to the target analog lters [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 AlAlaoui [14]. This publication is divided into ve sections,
*Manuscript received 2009 January 21; revised 2010 August 8 and October 8.
1064

including the Introduction and the Conclusion. Section 1 introduces Al-Alaouis proposed transforms, Section 2 presents an overview of analog bell lters, 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 deciencies in the traditional transforms. The traditional transforms approximate s of the analog transfer function in some fashion. They end up substituting 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 1 eaT z1 K ; sa 1 eaT z1 scK 1 ecT z1 : 1 ecT z1 1

2) Higher degree factors are treated by applying successive rst-degree factors.


J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

3) Complex poles and zeros are treated using the recombined partial fraction method since that reduces the overall order. The following applies: 1 z1 0 K s2 2as a2 b2 1 2eaT cosbTz1 e2aT z2 2 s 2cs c d K
2 2 2 0

Case 8: Case 9:

Q 10; g0 20 dB, x0 1 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 magnitude error of the resulting digital lters with respect to the corresponding analog lter. 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. 110). The gures show that the Al-Alaoui approach outperforms the MZTi approach in all cases except for cases 1 and 3. In particular, case 10 shows a better behavior of the AlAlaoui 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 lters in all the cases studied. Consequently it can be seen from Table 1 that the lters 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 preserves the order of the analog lter 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 lters 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 lter 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 lters 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
1065

1 2ecT cosdTz1 e2cT z2 : z1 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 specied otherwise, dc scaling was used. A corresponding MATLAB code of this procedure is included in the Appendix. 2 APPLICATION TO LOUDSPEAKER EQUALIZATION 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 lters is the bell lter. The analog transfer function of the bell lter takes the form Hs s2 g0 s=Q 1 : s2 s=Q 1 4

In Eq. (4) the resonant frequency is normalized to 1. The lter 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 gures 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 gures plotted. Different values of Q, g0, and the resonant frequency x0 are studied. The gures present in each case the analog lter responses and the corresponding digital lters, which were obtained by using the MZTi and the Al-Alaoui transforms. Case 1: Case 2: Case 3: Case 4: Case 5: Case 6: Case 7: Q 2; g0 15 dB, x0 1 Q 2.8; g0 15 dB, x0 1 Q 3; g0 20 dB, x0 1 Q 2; g0 10 dB, x0 1 Q 3; g0 15 dB, x0 1 Q 3.5; g0 15 dB, x0 1 Q 1.0; g0 5 dB, x0 1

J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

AL-ALAOUI

ENGINEERING REPORTS

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

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

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

AL-ALAOUI

ENGINEERING REPORTS

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

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

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

AL-ALAOUI

ENGINEERING REPORTS

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

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

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

AL-ALAOUI

ENGINEERING REPORTS

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

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

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

AL-ALAOUI

ENGINEERING REPORTS

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

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

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

AL-ALAOUI

ENGINEERING REPORTS

problem, and in order to preserve the bell-shaped response in the digital lters obtained from the Al-Alaoui transform, we modify Eq. (1) by simply removing the additional pole obtained from a real zero in the analog lter. Hence we obtain s c K1 e
cT 1

z :

The implementation of Eq. (5) instead of Eq. (1) in the Al-Alaoui transform is denoted in the gures by modied Al-Alaoui. The modied 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 lter) and hence is not shown in the corresponding gures. Furthermore since the additional poles are removed, the lters obtained by the modied 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 lters, as shown in Table 1. To summarize, we can conclude that the Al-Alaoui approach outperforms MZTi whenever the zeros of the analog bell lter are complex conjugates, and performs worse when the zeros are real. However, the modied AlAlaoui approach is superior in all cases. 4 CONCLUSION

Table 1. Filter orders of different methods for examples studied. Case Analog MZTi Al-Alaoui Modified Al-Alaoui 1 2 4 4 2 2 2 3 2 2 3 2 4 4 2 4 2 3 2 2 5 2 3 2 2 6 2 3 2 2 7 2 3 2 2 8 2 3 2 2 9 2 4 2 2 10 2 4 2 2

Table 2. Poles and zeros of analog filters in examples studied. Case 1 2 3 4 5 6 7 8 9 10 Poles 0.2420 0.9703i 0.2420 0.9703i 0.1728 0.9850i 0.1728 0.9850i 0.1650 0.9863i 0.1650 0.9863i 0.2236 0.9747i 0.2236 0.9747i 0.1613 0.9869i 0.1613 0.9869i 0.1383 0.9904i 0.1383 0.9904i 0.3749 0.9270i 0.3749 0.9270i 0.0495 0.9988i 0.0495 0.9988i 0.3721 0.9282i 0.3721 0.9282i 0.2585 2.6578i 0.2585 2.6578i
1076

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 lters 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 modied 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 signicantly 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 Towc, Sheng-Yuan Tu, Federico Cattivelli, Zhi Quan, Qiyue Zou, and Cassio G. Lopes for their help during his stay at UCLA.

Zeros 2.2834 0.4379 0.9719 0.2354i 0.9719 0.2354i 2.9623 0.3376 0.7071 0.7071i 0.7071 0.7071i 0.9071 0.4209i 0.9071 0.4209i 0.7775 0.6289i 0.7775 0.6289i 0.6668 0.7453i 0.6668 0.7453i 0.4950 0.8689i 0.4950 0.8689i 0.0935 0.9956i 0.0935 0.9956i 1.4534 2.2402i 1.4534 2.2402i

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. 2123), pp. 110. [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.
J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

[3] R. J. Clark, E. C. Ifeachor, G. M. Rogers, and P. W. J. Van Eetvelt, Techniques for Generating Digital Equalizer Coefcients, J. Audio Eng. Soc., vol. 48, pp. 281298 (2000 Apr.). [4] R. J. Clark, Investigation into Digital Audio Equaliser Systems and the Effects of Arithmetic and Transform Error on Performance, Department of Communication 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. 468471. [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 (McGrawHill, 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, Englewood 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. 338350 (2007 Feb.).

APPENDIX The MATLAB code for the procedure described in Section 1 is as follows:

J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

1077

AL-ALAOUI

ENGINEERING REPORTS

APPENDIX continued

1078

J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

APPENDIX continued

The function bell_lter_Wc implements the analog Bell lter that corresponds to [1, eqs. (1)(4)].

The function mzt_lp_ord2 implements the MZTi second-order low-pass lter that corresponds to [1, eqs. (11)(15)].

J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

1079

APPENDIX continued The function r_curve_t implements the FIR curve t 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

ENGINEERING REPORTS

DIGITAL FILTERS FOR LOUDSPEAKER EQUALIZATION

APPENDIX continued

J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

1081

AL-ALAOUI

ENGINEERING REPORTS

APPENDIX continued

THE AUTHOR

M. A. Al-Alaoui Mohamad Adnan Al-Alaoui received a B.S. degree in mathematics from Eastern Michigan University, Ypsilanti, 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 Scientic 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 19891990 by AUB. He is a senior member of the IEEE.

1082

J. Audio Eng. Soc., Vol. 58, No. 12, 2010 December

Potrebbero piacerti anche