Digital audio equalization is one of the most common operations in the acoustic field, but its performance
depends on computational complexity and filter design techniques. Starting from a previous FIR
implementation based on multirate systems and filterbanks theory, an optimized digital audio equalizer
is derived. The proposed approach employs IIR filters to improve the filterbanks structure developed to
avoid ripple between adjacent bands. The effectiveness of the optimized implementation is shown comparing
it with the previous approach. The solution presented here has several advantages increasing
the equalization performance in terms of low computational complexity, low delay, and uniform frequency
response.
Optimized implementation of an innovative digital audio equalizer
1. ID 86
Optimized Implementation of an
Innovative Digital Audio Equalizer
Marco Virgulti1
Stefania Cecchi1
Andrea Primavera1
Laura Romoli1
Francesco Piazza1
Ferruccio Bettarelli2
Emanuele Ciavattini2
1A3LAB, DII, Universit´a Politecnica delle Marche,Via Brecce Bianche, 60131 Ancona, Italy
2Leaff Engineering, Via Pastore 10, 60027 Ancona, Italy
Correspondence should be addressed to Stefania Cecchi (s.cecchi@univpm.it)
Abstract
Digital audio equalization is one of the most common operations in the acoustic field, but its perfor-
mance depends on computational complexity and filter design techniques. Starting from a previous FIR
implementation based on multirate systems and filterbanks theory, an optimized digital audio equalizer
is derived. The proposed approach employs IIR filters to improve the filterbanks structure developed to
avoid ripple between adjacent bands. The effectiveness of the optimized implementation is shown com-
paring it with the previous approach. The solution presented here has several advantages increasing
the equalization performance in terms of low computational complexity, low delay, and uniform frequency
response.
2. Introduction
Digital audio equalization is one of the most common operations in the acoustic field, but its performance
is strictly related to the adopted filter design techniques.
The equalization purpose is to enhance the listening experience, preserving a linear phase response
with the lowest delay and the lowest computational complexity.
In order to have linear phase response, FIR filters are usually employed both in time and frequency
domain.
State of the art
An efficient digital equalizer can be implemented using:
a tree structured filter bank[1]: the analysis filter bank was built with equal stages splitting the input
signal in two subbands while the synthesis filter bank has to recombine back the bands.☛
✡
✟
✠Drawbacks: too high delay that exponentially increases with the number of subbands
a frequency masking technique[2]; computationally efficient techniques for the design of sharp
low-pass, high-pass, band-pass, and band-stop filters with arbitrary passband.☛
✡
✟
✠Drawbacks: the introduced delay dramatically increases with stricter constraints.
Remez algorithm[3]: when the response of adjacent bands are added together, if the composite
frequency response shows an unacceptable error deviations, a new filter with a new stopband cutoff
frequency has to be designed.☛
✡
✟
✠Drawbacks: This procedure is iterated until the deviation becomes acceptable resulting in a too high
computational complexity.
a frequency domain algorithm[4]: the equalization consists of a complex multiplication of the input
spectrum with the frequency equalization function that, when transformed in time domain, has all the
properties of a FIR filter. The computational complexity is very low.☛
✡
✟
✠Drawbacks: the algorithm efficiency is strictly bound to frequency resolution (e.g,large ripples at
bands edges are easily observed).
3. Introduction
The main disadvantages of these approaches are the too high delay and the ripples in the frequency
response, when adjacent bands are added.
A possible solution could arise from the multirate techniques applied to adaptive systems.
In this context, the problem of aliasing cancellation when an adaptive filtering is included in a
filterbank with perfect reconstruction is well-known.
Different approaches were presented such as cross terms between subbands [5] or extra terms taking
into account adjacent bands [6].
Starting from these approaches, an innovative digital audio equalizer has been introduced in [7, 8].
Taking into consideration multirate systems and their property, the idea was to realize a linear phase
FIR equalizer that overcame the well-known drawbacks.
Therefore, an optimized version of this algorithm is here proposed:
it is based on the use of IIR filters capable to reduce the required computational complexity preserving
the audio quality [9, 10].
the overall scheme of the algorithm derives from two analysis and two synthesis cosine modulated
filter banks properly combined in order to have flat response when all bands are added together,
exploiting multirate properties (as for the FIR approach).
The new technique preserve all the characteristics of the previous implementation overcoming all the
well-known problems documented in the literature, furthermore reducing the computational complexity
and improving the filters selectiveness.
4. Proposed Algorithms
Main idea
The main idea of the proposed approach is to realize an innovative equalizer using a particular filter
bank structure, capable of reducing ripples in the frequency response, when adjacent bands are added
together.
is derived from the subband adaptive filtering structure presented in [11, 6],
a double analysis/synthesis filter banks is combined employing multirate properties
starting from this, it is possible to obtain an innovative equalizer having all the advantages of this
particular solution [8, 7].
The impulse responses of the analysis/synthesis filters are the following,
hk(n) = 2h0(n)cos(
π
M
(k + 0.5)(n −
N
2
) + θk)
fk(n) = 2h0(n)cos(
π
M
(k + 0.5)(n −
N
2
) − θk)
(1)
where θk = −(1)k π
4 , k is the subband index defined between 0 and M −1, M is the number of subband,
and N is the order of the prototype filter h0(n).
Using this particular structure,
it is possible to significantly reduce the ripple amounts difference in the transition band between
adjacent filters[8, 7];
it is easily extended to higher number of bands.
increasing the number of subbands, the FIR length has to be increased in order to have good
performance at low frequency bands.
For this reason, a new solution has been proposed taking advantage of IIR filters.
5. FIR based equalizer
The FIR Equalizer has been designed
using Eq.(1)
developing h0(n) has a FIR filter prototype.
A near perfect reconstruction proto-
type realized by Kaiser Windows method
[12], with very low computational cost.
This technique modifies the 6-dB cut-off frequency
of the filter in order to obtain the 3-dB cut-off fre-
quency placed approximately at π/2M.
The function minimized is the following:
ξ = ||H(ejπ/2M)| −
1
√
2
|. (2)
H is the frequency response of the following filter
h[n] =
sin((n − N/2)ωc,6dB)
π(n − N/2)
w[n], (3)
where w[n] is a Kaiser window and ωc,6−dB is the
cut-off frequency.
Figure 1: Overall structure of the proposed equalizer
6. IIR-based equalizer
The IIR Equalizer has been designed
using Eq.(1)
developing h0(n) has a IIR filter prototype.
Also in this case, a near perfect reconstruction pro-
totype has been considered[9, 10].
The IIR prototype filter is defined as
H(z) =
2M−1
k=0
z−kPk(z2M), (4)
where Pk(z) is the k-th type-I polyphase compo-
nents of H(z), assuming that
Pk(z) =
Nk(z)
D(z)
(5)
for k = 0, 1, · · · , 2M − 1.
The polyphase component can be obtained using
the two channel cascaded lattice structure [10] as
shown in Fig.2.
The following structure is obtained by replacing z−1
of the classical FIR lattice structure with a first
order all-pass filter [9]
ck,m
-ck,m
sk,m
sk,m
+
+Am(Z)
P(m-1)
(z)k
P(m-1)
(z)M+k
P(m)
(z)k
P(m)
(z)M+k
Figure 2: IIR lattice structure for design of Pk(z)
The relation between each section is given by the
following equations:
Pm
k (z) = ck,mPm−1
k
(z) + sk,mAm(z)Pm−1
M+k
(z)
Pm
M+k(z) = sk,mPm−1
k
(z) − ck,mAm(z)Pm−1
M+k
(z)
(6)
where ck,m = cos(θk,m) and sk,m = sin(θk,m).
7. IIR-based equalizer
To satisfy the condition that all the polyphase com-
ponents have the same denominator as shown in
Eq.(5), the same all-pass filters must be used in all
the lattice structures.
It is defined as follows:
Am(z) =
am + z−1
1 + amz−1
, (7)
for m ≥ 1, k = 0, 1, · · · , M/2 − 1 and considering
|ai| < 1 for i = 1, 2, · · · , m to ensure the filter stabil-
ity.
Then the optimization is performed considering the
minimization of the stop-band energy using the fol-
lowing objective function:
φ =
π
π/(2M)+δ
H(ejω)
2
dω (8)
where δ < π/(2M).
The final length of the optimized filter is 2mM, where
m is the number of lattice section and M is the sub-
bands number.
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
−120
−100
−80
−60
−40
−20
0
20
Frequency (Normalized)
Magnitude(dB)
Figure 3: Magnitude response of the 16-channel IIR filter
bank.
8. Real Time implementation
The equalizer has been implemented as a PlugIn
of the NU-Tech software [7, 13].
NU-Tech is a DSP platform to implement, test,
and tune algorithms in real-time scenarios
through a PC workbench.
It is based on a plug-in architecture which tries to
ease the algorithm writing process.
NU-Tech gives the developer the freedom to write
his own NUTSs (NU-Tech Satellites) in C++, plug
them into the GUI, and test the final result on a
common PC.
A low-level ASIO 2.2 interface allows minimum
and repeatable latencies fully exploiting hardware
resources.
Two PlugIn have been developed in order to bet-
ter exploit the characteristics of the two struc-
tures.
Figure 4: NU-Tech implementation of the FIR equalizer.
Figure 5: NU-Tech implementation of the IIR equalizer.
9. FIR based equalizer
A FIR UFBEq (Uniform Filter Bank Equalizer) NUTs
has been realized as a standard C++ dll file able to
work within the NU-Tech framework.
FIR Filtering procedure
A Partitioned Convolution Overlap and Save algo-
rithm has been implemented [7].
This technique provides an efficient implementa-
tion needed for real time applications, especially
when filters lengths are longer than the working
framesize of the platform.
Fig. 4 shows a uniform filter bank equalizer with
eight bands.
To evaluate the performance, a white noise sig-
nal with flat frequency response has been used:
through the graphical interface it is possible to set
the gain of each individual band.
IIR based equalizer
A IIR UFBEq (Uniform Filter Bank Equalizer) NUTs
has been realized as a standard C++ dll file able to
work within the NU-Tech framework.
IIR Filtering procedure
An optimized function of the IPP libraries [14] has
been considered.
In particular, since the denominator is the same for
each band, this operation is performed separately
in order to optmize the filtering operation.
In Fig. 5, a uniform filter bank equalizer with eight
bands is shown.
As for the FIR equalizer, a white noise signal with
flat frequency response has been used to evaluate
the performance: through the graphical interface it
is possible to set the gain of each individual band.
10. Algorithm validation
Validation
Through a direct comparison between the FIR and the IIR Equalizer implementation [7, 8].
4 cases have been considered with a different number of subbands (i.e.,M = 8, 16, 32, 64), and for
each case:
3 FIR filter prototypes of length N = 1024, 2048, 4096 [Plot (a),(b),(c)];
3 IIR filter prototypes realized with m = 3, 4, 5 sections [Plot (d),(e),(f)].
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
0
1
2
3
4
5
6
7
8
9
Frequency (Normalized)
Magnitude(dB)
a
b
c
d
e
f
i
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
0
1
2
3
4
5
6
7
8
9
Frequency (Normalized)
Magnitude(dB)
a
b
c
d
e
f
ii
Figure 6: Equalizer for (i) M = 8, (ii) M = 16.
0.12 0.121 0.122 0.123 0.124 0.125 0.126 0.127 0.128 0.129 0.13
1.8
2
2.2
2.4
2.6
2.8
3
3.2
Frequency (Normalized)
Magnitude(dB)
a
b
c
d
e
f
i
0.12 0.121 0.122 0.123 0.124 0.125 0.126 0.127 0.128 0.129 0.13
3.8
4
4.2
4.4
4.6
4.8
5
5.2
Frequency (Normalized)
Magnitude(dB)
a
b
c
d
e
f
ii
Figure 7: Detail of Fig. 8 for (i) M = 8, (ii) M = 16.
11. Algorithm validation
FIR prototype
good performance with a reduced number of
subbands
increasing the number of subbands, the length of
1024 is no more sufficient to have a sharp
transition band: longer FIR prototype are
requested.
IIR prototype
good performance also with a small number of
sections (i.e., m = 3),
it preserve its behaviour increasing the number of
the subbands.
a computational saving with a good performance
level.
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
0
1
2
3
4
5
6
7
8
9
Frequency (Normalized)
Magnitude(dB)
a
b
c
d
e
f
i
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5
0
1
2
3
4
5
6
7
8
9
Frequency (Normalized)
Magnitude(dB)
a
b
c
d
e
ii
Figure 8: Equalizer for (i) M = 32 and (ii) M = 64.
0.154 0.1545 0.155 0.1555 0.156 0.1565 0.157 0.1575 0.158 0.1585 0.159
1.8
2
2.2
2.4
2.6
2.8
3
3.2
Frequency (Normalized)
Magnitude(dB)
a
b
c
d
e
f
i
0.155 0.1555 0.156 0.1565 0.157 0.1575
3.8
4
4.2
4.4
4.6
4.8
5
5.2
Frequency (Normalized)
Magnitude(dB) a
b
c
d
e
ii
Figure 9: Detail of Fig. 8 for (i) M = 32 and (ii) M = 64.
12. Algorithm validation
Objective measurements
A distortion index to have a direct comparison be-
tween different equalizer with different number of
bands:
DI =
max T(ejω) + min T(ejω)
2
. (9)
with the distortion transfer function [15], calculated
as follows
T(z) =
1
M
M
i=1
Hi(z)Fi(z) (10)
where Hi and Fi are the frequency responses of the
analysis and synthesis filter banks, respectively.
This index takes into account the amplitude distor-
tion of each band: better performance is achieved
when it is approximately 1.
FIR lengths (N)
M 1024 2048 4096
8 0.997946 0.998508 0.997859
16 0.997946 0.998508 0.997859
32 0.997947 0.998508 0.997859
64 0.997946 0.998508 0.997860
Table 1: Distortion index for uniform M band equalizer with a
FIR prototype of length N.
IIR sections (m)
M 3 4 5
8 0.989940 0.990390 0.990388
16 0.997324 0.995717 0.997588
32 0.999378 0.999398 0.999397
64 0.999773 0.999849 0.999846
Table 2: Distortion index for uniform M band equalizer with a
IIR prototype of length 2nM, where n is the number of lattice
sections.
Good performance for all the considered prototype (i.e., the obtained values are very close to 1).
Better performance (in terms of DI) for the IIR equalizer increasing the subbands number.
The validity of the proposed approach is confirmed in comparison with the first FIR implementation.
13. Conclusions
A new approach to M-band uniform IIR equalizer has been presented
Employment of IIR filters to improve the filter banks structure avoiding ripple between adjacent bands.
Several advantages: increasing the equalization performance in terms of low computational
complexity, low delay, and uniform frequency response.
Objective results as comparison with FIR structure confirm the validity of the proposed approach.
Future works will be oriented to an improvement in the project of the IIR prototype and to the
introduction of polyphase components in the filtering structure, exploiting the lattice structure behaviour.
References
[1] J. Vieira, “Digital Five Band Equalizer with Linear Phase,” in Proc. 100th Audio Engineering Society Convention, Copenhagen, Denmark, May 1996.
[2] Y. Lim, “A Digital Filter Bank for Digital Audio Systems,” IEEE Trans. Circuits Syst., vol. 33, no. 8, pp. 848–849, Aug. 1986.
[3] J. Henriquez, T. Riemer, and R. Trahan Jr., “A Phase Linear Audio Equalizer: Design and Implementation,” J. Audio Eng. Soc., vol. 38, no. 9, pp. 653–666, Sept. 1990.
[4] H. Schopp and H. Hetzel, “A Linear Phase 512 Band Graphic Equalizer using the Fast Fourier Transform,” in Proc. 96th Audio Engineering Society Convention, Amsterdam, The Netherlands, Feb. 1994.
[5] A. Gilloire and M. Vetterli, “Adaptive filtering in subbands with critical sampling: analysis, experiments and application to acoustic echo cancellation,” IEEE Trans. Signal Process., vol. 40, no. 8, pp. 1862–1875,
Aug. 1992.
[6] M. Petraglia and P. Batalheiro, “Non uniform Subband Adaptive Filtering with Critical Sampling,” in Proc. IEEE International Symposium on Circuits and Systems, vol. 56, no. 2, Island of Kos, Greece, May 2006,
pp. 565–575.
[7] S. Cecchi, P. Peretti, L. Palestini, F. Piazza, F. Bettarelli, and A. Lattanzi, “Real Time implementation of an Innovative Digital Audio Equalizer,” in Proc. 123rd Audio Engineering Society Convention, New York, NY,
USA, Oct. 2007.
[8] S. Cecchi, L. Palestini, E. Moretti, and F. Piazza, “A New Approach to Digital Audio Equalization,” in Proc. Workshop on Applications of Signal Processing to Audio and Acoustics, New Paltz, NY, USA, October
2007, pp. 62–65.
[9] R. Koilpillai and P. Vaidyanathan, “Cosine-modulated fir filter banks satisfying perfect reconstruction,” Signal Processing, IEEE Transactions on, vol. 40, no. 4, pp. 770 –783, apr 1992.
[10] S. Kim and C. Yoo, “Highly selective m-channel iir cosine-modulated filter banks,” Electronics Letters, vol. 39, no. 20, pp. 1478 – 1479, oct. 2003.
[11] M. Petraglia, R. Alves, and P. Diniz, “New Structures for Adaptive Filtering in Subbands with Critical Sampling,” IEEE Trans. Signal Process., vol. 48, no. 12, pp. 3316–3327, Dec. 2000.
[12] F. Cruz-Roldan, P. Amo-Lopez, S. Maldonado-Bascon, and S. S. Lawson, “An Efficient and Simple Method for Designing Prototype Filters for Cosine-Modulated Pseudo-QMF Banks,” IEEE Signal Process. Lett.,
vol. 9, no. 1, pp. 29–31, Jan. 2002.
[13] A. Lattanzi, F. Bettarelli, and S. Cecchi, “NU-Tech: The Entry Tool of the hArtes Toolchain for Algorithms Design,” in Proc. 124th Audio Engineering Society Convention, Amsterdam, The Netherlands, May 2008,
pp. 1–8.
[14] “IPP Libraries,” Intel Corporation, 2011. [Online]. Available: http://software.intel.com/en-us/intel-ipp/
[15] P. P. Vaidyanathan, Multirate Systems and Filterbanks. Prentice-Hall, Inc., 1993.