## 2 Accurate Graphic Equalizer Design and Neural Control  
Second-order infinite impulse response (IIR) filters, one per controllable band, are connected in series to form a cascade GEQ, as illustrated in Figure 1. The overall transfer function of the cascade GEQ is obtained by multiplying the transfer functions \(H_{m}(z)\) of the \(M\) individual band filters:  
\[H(z)=\prod_{m=1}^{M}H_{m}(z). \tag{1}\]  
The gain factor \(G_{0}\) of the filter in Figure 1 is the product of the scaling coefficients \(k_{0,m}\) of the individual band filters:  
\[G_{0}=\prod_{m=1}^{M}k_{0,m}. \tag{2}\]  
This way, the multiplier related to the scaling factor \(k_{0,m}\) can be removed from each band filter section, as is evident in Figure 2, thus saving \(M-1\) multiplications in all [13]. In practice, the user of a GEQ adjusts the gains of each frequency band, the command gains \(g_{\text{c},m}\). A key idea in the design of a GEQ is that the filter gains must not be the same as the command gains, but they must be optimized to account for the interaction of the band filters with each other. Otherwise, a GEQ consisting of second-order band filters cannot be very accurate [1; 2]. The filter gain optimization is achieved with an interaction matrix and a WLS design [6]. The interaction matrix contains the normalized leakage in dB of each filter to the other bands, which is calculated by designing a filter for each band having a prototype gain and evaluating the response of each filter in dB at its center frequency and at the geometric mean frequency of adjacent filters. Finally, the responses are normalized by dividing them by the respective prototype gain and stored in the \(2M-1\times M\) interaction matrix \(\mathbf{B}\). Using \(\mathbf{B}\), the optimized gains \(\mathbf{g}=[g_{1}\ g_{2}\ \cdots\ g_{M}]^{T}\) are obtained from the WLS solution [26]:  
\[\mathbf{g}=(\mathbf{B}^{T}\mathbf{W}\mathbf{B})^{-1}\mathbf{B}^{T}\mathbf{W} \mathbf{t}_{1}, \tag{3}\]  
where \(\mathbf{W}\) is the square weighting matrix with the non-negative weight values on its diagonal and \(\mathbf{t}_{1}\) is a vector containing the user-set gains in dB in odd rows and their linearly interpolated values in even rows [3; 6]. The WLS optimization works due to the self-similarity of the band filters, i.e., the shape of the dB magnitude response changes little with varying peak gains, allowing the normalized shapes to be used as basis functions [1; 2; 4]. An iterative step, where the optimized filter gains are used to calculate a new interaction matrix, typically improves the accuracy of the GEQ [6]. Two parameters must be set for the filter design (both the final EQ filters and the filters required for the interaction matrix): the filter bandwidths and the gain at the bandwidth boundaries. The EQ design utilizes Orfanidis' filters that allow for the control of the gain at the bandwidth boundaries [27]. Thus, the bandwidth is set at the frequencies where a specified gain \(g_{\mathrm{B},m}=cg_{m}\) is achieved, where \(0<c<1\) is a design parameter. Setting the bandwidth boundaries equal to the neighboring band center frequencies allows for an exact control of the filters at these frequency points [3; 6]. Although the WLS filter optimization algorithm is quite straightforward to use, it still requires rather complicated matrix operations, as is apparent from (3). Furthermore, during the iterative steps, a discrete-time Fourier transform [28] is needed to estimate how the band filters affect adjacent bands. In order to simplify the filter gain calculation, we recently proposed a neural network to predict the optimized filter gains [19; 20]. The training data for the feedforward neural network is created using a WLS GEQ design algorithm, such as the one described above, which can accurately calculate the optimized filter gains. This way, one can create an enormous dataset of input-output gain pairs,  
Figure 1: Block diagram of the cascade digital graphic equalizer (GEQ) structure having a single gain term \(G_{0}\) showing the adjustable filter gains \(G_{m}\).