Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Optimal Frequency Warpings

In [269], optimal allpass coefficients $ \rho ^*$ were computed for sampling rates of twice the Bark band-edge frequencies by means of four different optimization methods:

  1. Minimize the peak arc-length error $ \left\Vert\,\epsilon _{\hbox{\tiny A}}\,\right\Vert _\infty$ at each sampling rate to obtain the optimal Chebyshev allpass parameter $ \rho ^*_\infty (f_s)$ .
  2. Minimize the sum of squared arc-length errors $ \left\Vert\,\epsilon _{\hbox{\tiny A}}\,\right\Vert _2^2$ to obtain the optimal least-squares allpass parameter $ \rho ^*_2(f_s)$ .
  3. Use the closed-form weighted equation-error solution (E.3.1) computed twice, first with $ \hbox{\boldmath $V$}= \hbox{\boldmath $I$}$ , and second with $ \hbox{\boldmath $V$}$ set from (E.3.1) to obtain the optimal ``weighted equation error'' solution $ \rho ^*_{\hbox{\sc E}}(f_s)$ .
  4. Fit the function $ \gamma_1\left[{2\over\pi}\arctan(\gamma_2f_s)\right]^{{1\over2}}+\gamma_3 $ to the optimal Chebyshev allpass parameter $ \rho ^*_\infty (f_s)$ via Chebyshev optimization with respect to $ {\mathbf\gamma}\isdef \{\gamma_1,\gamma_2,\gamma_3\}$ . We will refer to the resulting function as the ``arctangent approximation'' $ \rho ^*_{\mathbf\gamma}(f_s)$ (or, less formally, the ``Barktan formula''), and note that it is easily computed directly from the sampling rate.
In all cases, the error minimized was in units proportional to Barks. The discrete frequency grid in all cases was taken to be the Bark band-edges given in §E.1. The resulting allpass coefficients are plotted as a function of sampling rate in Fig.E.3.

Figure: a) Optimal allpass coefficients $ \rho ^*_\infty $ , $ \rho ^*_2$ , and $ \rho ^*_{\hbox {\sc E}}$ , plotted as a function of sampling rate $ f_s$ . Also shown is the arctangent approximation $ \rho ^*_{\mathbf\gamma}=1.0674\sqrt{(2/\pi)\arctan(0.06583f_s)}-0.1916$ . b) Same as a) with the arctangent approximation subtracted out. Note the nearly identical behavior of optimal least-squares (plus signs) and weighted equation-error (circles).
\includegraphics[width=\twidth]{eps/pfs}

Figure E.4: Root-mean-square and peak frequency-mapping errors versus sampling rate for Chebyshev, least squares, weighted equation-error, and arctangent optimal maps. The rms errors are nearly coincident along the lower line, while the peak errors a little more spread out well above the rms errors.
\includegraphics[width=\twidth]{eps/rmspkerr}

The peak and rms frequency-mapping errors are plotted versus sampling rate in Fig.E.4. Peak and rms errors in BarksE.1 are plotted for all four cases (Chebyshev, least squares, weighted equation-error, and arctangent approximation). The conformal-map fit to the Bark scale is generally excellent in all cases. We see that the rms error is essentially identical in the first three cases, although the Chebyshev rms error is visibly larger below 10 kHz. Similarly, the peak error is essentially the same for least squares and weighted equation error, with the Chebyshev case being able to shave almost 0.1 Bark from the maximum error at high sampling rates. The arctangent formula shows up to a tenth of a Bark larger peak error at sampling rates 15-30 and 54 kHz, but otherwise it performs very well; at 41 kHz and below 12 kHz the arctangent approximation is essentially optimal in all senses considered.

At sampling rates up to the maximum non-extrapolated sampling rate of $ 31$ kHz, the peak mapping errors are all much less than one Bark (0.64 Barks for the Chebyshev case and 0.67 Barks for the two least squares cases). The mapping errors in Barks can be seen to increase almost linearly with sampling rate. However, the irregular nature of the Bark-scale data results in a nonmonotonic relationship at lower sampling rates.

Figure: Frequency mapping errors versus frequency for a sampling rate of $ 31$ kHz.
\includegraphics[width=\twidth]{eps/fme}

The specific frequency mapping errors versus frequency at the $ 31$ kHz sampling rate (the same case shown in Fig.E.1) are plotted in Fig.E.5. Again, all four cases are overlaid, and again the least squares and weighted equation-error cases are essentially identical. By forcing equal and opposite peak errors, the Chebyshev case is able to lower the peak error from 0.67 to 0.64 Barks. A difference of 0.03 Barks is probably insignificant for most applications. The peak errors occur at 1.3 kHz and 8.8 kHz where the error is approximately 2/3 Bark. The arctangent formula peak error is 0.73 Barks at 8.8 kHz, but in return, its secondary error peak at 1.3 kHz is only 0.55 Barks. In some applications, such as when working with oversampled signals, higher accuracy at low frequencies at the expense of higher error at very high frequencies may be considered a desirable tradeoff.

We see that the mapping falls ``behind'' a bit as frequency increases from zero to 1.3 kHz, mapping linear frequencies slightly below the desired corresponding Bark values; then, the mapping ``catches up,'' reaching an error of 0 Barks near 3 kHz. Above 3 kHz, it gets ``ahead'' slightly, with frequencies in Hz being mapped a little too high, reaching the positive error peak at 8.8 kHz, after which it falls back down to zero error at $ z=e^{j\pi}$ . (Recall that dc and half the sampling-rate are always points of zero error by construction.)

Figure: Relative bandwidth mapping error (RBME) for a $ 31$ kHz sampling rate using the optimized allpass warpings of Fig.E.3 at $ 31$ kHz. The optimal Chebyshev, least squares, and weighted equation-error cases are almost indistinguishable.
\includegraphics[width=\twidth]{eps/rbe}


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Spectral Audio Signal Processing'', by Julius O. Smith III, W3K Publishing, 2011, ISBN 978-0-9745607-3-1.
Copyright © 2022-02-28 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA