2.4 Notes on the implementation of the inverse
2.4.2 Filtering through the common denominator
Another simple result is presented in this section that is called upon in later parts of the thesis. As was discussed in §2.4.1, the computational load in the implementation of the inverse matrix H is mainly due to the low rate of decay of the time-domain representation of the denominator polynomial of equation (2-14). Hence, given that this polynomial is common to all four inverse responses Hij one might expect that the separate implementation of this stage could result in some computational advantage. That is, instead of filtering each one of the binaural signals x1(n), x2(n) through the elements hij(n) of the inverse matrix H, one could filter x1(n) and x2(n) through a model hCD(n) of the transfer function 1/det[C(z)] and then filter the two resulting intermediate signals through the elements of the matrix adj[C(z)].
This amounts to replacing the direct computation of the inverse filters’ output30
( )
11( )( )
12( )( )
1( )( )
11( )( )
1( )( )
12( )( )
2( )( )
21 22 2 21 1 22 2 h n h n x n h n x n h n x n n h n h n x n h n x n h n x n ∗ + ∗ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ =⎢ ⎥ ⎢∗ ⎥ ⎢= ⎥ ∗ + ∗ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦ y (2-26)by the separate stages
( )
22( )( )
12( )( )
( )
1( )( )
21 11 2 CD c n c n x n n h n c n c n x n ⎛ ⎞ − ⎡ ⎤ ⎡ ⎤ =⎢ ⎥∗⎜⎜ ∗⎢ ⎥⎟⎟ ⎣ ⎦ ⎝ ⎣ ⎦⎠ y (2-27)We denote with NH the chosen order of the FIR filters hij(n), with NCD the chosen order of the FIR filter hCD(n) used to model the common denominator reciprocal transfer function 1/det[C(z)] and with NC the order of the measured responses of the plant. We see then that the computation of equation (2-26) requires four convolutions with the impulse responses hij(n), i.e. 4NH multiplications and additions for the computation of each pair of output samples in direct sample-by-sample filtering. Alternatively, the computation of equation (2-27) requires two convolutions with the impulse response hCD(n) and four convolutions with the impulse responses cij(n), i.e. a total of 2NCD+4NC multiplications and additions for the computation of each pair of output samples. Since the order of the measured model of the plant NC is typically much lower than the order of the inverse models NH it would be expected that the total
cost of the latter process could be lower than that of the former. However, this is not always the case as is illustrated with the following set of simulation results.
−1000 0 1000 −100 0 Sample number dB h 11(n) −1000 0 1000 −100 0 Sample number dB h CD(n) −1000 0 1000 −100 0 Sample number dB h 21(n) −1000 0 1000 −100 0 Sample number dB h 12(n) −1000 0 1000 −100 0 Sample number dB h 22(n)
Figure 2-6: Impulse response of the elements of the inverse filter matrix H (red line) and of the reciprocal expression of the common denominator (blue line). In both cases the regularisation is set to zero.
In figure 2-6 we plot the impulse responses of the inverse matrix H defined from the MIT database of HRTFs (Gardner and Martin 1994) for the Stereo Dipole geometry with the regularisation set equal to zero. In the red line we plot the four FIR filters
hij(n) that model the exact inverse matrix H with 1000 anti-causal and 1000 causal coefficients31. In the blue line we plot the FIR filter hCD(n) that models the single- channel transfer function 1/det[C(z)] of the common denominator with 1500 anti- causal and 1500 causal coefficients. Hence the total cost for the computation of each sample pair of the output would be 8000 multiplications and additions using the direct arrangement of equation (2-26) and 6500 multiplications and additions using the common denominator arrangement of equation (2-27).
In figure 2-7 we compare the inversion results obtained with these two types of inverse models. With the red dashed line we plot the results obtained with the direct arrangement and with the blue line the results of the common denominator arrangement. As is made apparent by these results, the 1500 coefficients used to model the anti-causal part of the reciprocal common denominator transfer function result in a truncation of the model HCD at a higher level of its decay tail than is the
case with the 1000 coefficients used for the modelling of the anti-causal delay of the filters Hij. This is because the presence of zeros in the transfer functions Hij (see
equation (1-4)) results in a faster decay of the corresponding time-responses than is the case for the all-pole transfer function 1/det[C(z)]32. Hence, for an equal suppression of these truncation artefacts one would have to use a longer model of the reciprocal common denominator transfer function and thus practically eliminate any cost saving. Additional to that, such a realisation would also introduce more delay in the inversion.
31 All models discussed here are computed using the frequency-domain method described in §2.3. 32 This “all-pole effect” is restricted to the exact inversion case. As was discussed in §2.3.3, with the introduction of regularisation each pole due to the common denominator is replaced by a pair of a pole and zero. Hence the effect described in figure 2-7 should not be present in regularised inversion cases. As is also discussed in chapter 8, a complete investigation of the potential presented by the separation of equation (2-27) is left as further work.
−1000 0 1000 −150
−100 −50 0
Left l/s Left ear
Sample number dB −1000 0 1000 −150 −100 −50 0
Left l/s Right ear
Sample number dB −1000 0 1000 −150 −100 −50 0
Right l/s Left ear
Sample number dB −1000 0 1000 −150 −100 −50 0
Right l/s Right ear
Sample number
dB
Figure 2-7: Simulated inversion results. The plant matrix C is convolved with a model of the inverse HD (red dashed line) and with the matrix corresponding to the common denominator filtering process (blue solid line).
Note that in figure 2-7 the cross-talk appears to be completely suppressed in the realisation utilising the common denominator. This should be considered to be an artificial effect. In effect, the common denominator arrangement effectively separates the cross-talk stage, applied by the adj[C(z)] part from the overall equalisation stage applied by the 1/det[C(z)] part33. As is readily seen in equation (1-4), the multiplication of the matrices C(z) and adj[C(z)] results in a matrix with zero off- diagonal terms whereas the term 1/det[C(z)] effectively equalises the diagonal terms
33 As was reviewed in §2.2, such a separation has appeared in previously proposed inverse filtering implementations but it has not been investigated in the context of the specific inverse filtering design discussed here.
to unity. When the inverse is directly realised as in equation (2-26), any error in the computation of the inverse (in this case due to the truncation of the infinitely long time responses Hij) will be present in all four elements of the resulting matrix
Xeq=CH. On the other hand, in the simulation example presented here, the matching of the model of adj[C(z)] with the plant model C(z) is perfect, so the cross-talk part will be apparently implemented perfectly. The truncation is only applied to the model of the 1/det[C(z)] term and is hence only visible in the diagonal terms. However, in realistic cases where the available model of the plant is not perfect (see the analysis in chapter 4) such a perfect suppression of the cross-talk terms is by no means guaranteed.