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


Alternative Wave Variables

We have thus far considered discrete-time simulation of transverse displacement $ y$ in the ideal string. It is equally valid to choose velocity $ v\isdeftext {\dot y}$, acceleration $ a\isdeftext {\ddot y}$, slope $ y'$, or perhaps some other derivative or integral of displacement with respect to time or position. Conversion between various time derivatives can be carried out by means integrators and differentiators, as depicted in Fig. G.10. Since integration and differentiation are linear operators, and since the traveling wave arguments are in units of time, the conversion formulas relating $ y$, $ v$, and $ a$ hold also for the traveling wave components $ y^\pm , v^\pm , a^\pm $.

Figure G.10: Conversions between various time derivatives of displacement: $ y = $ displacement, $ v = {\dot y}= $ velocity, $ a = {\ddot y}= $ acceleration, where $ {\dot y}$ denotes $ dy/dt$ and $ {\ddot y}$ denotes $ d^2y/dt^2$.
\includegraphics[scale=0.9]{eps/fwaveconversions}

Differentiation and integration have a simple form in the frequency domain. Denoting the Laplace Transform of $ y(t,x)$ by

$\displaystyle Y(s,x) \isdef {\cal L}_s\{y(\cdot,x)\} \isdef \int_0^\infty y(t,x) e^{-st} dt$ (G.35)

where ``$ \cdot$'' in the time argument means ``for all time,'' we have, according to the differentiation theorem for Laplace transforms [264],

$\displaystyle {\cal L}_s\{{\dot y}(\cdot,x)\} = s Y(s,x) - y(0,x)$ (G.36)

Similarly, $ {\cal L}_s\{\dot y^{+}\} = s Y^{+}(s) - y^{+}(0)$, and so on. Thus, in the frequency domain, the conversions between displacement, velocity, and acceleration appear as shown in Fig. G.11.

Figure G.11: Conversions between various time derivatives of displacement in the frequency domain.
\includegraphics[scale=0.9]{eps/ffdwaveconversions}

In discrete time, integration and differentiation can be accomplished using digital filters [340]. Commonly used first-order approximations are shown in Fig. G.12.

Figure G.12: Simple approximate conversions between time derivatives in the discrete-time case: a) The first-order difference $ {\hat v}(n) = y(n) - y(n-1)$. b) The first-order ``leaky'' integrator $ {\hat y}(n) = v(n) + g {\hat y}(n-1)$ with loss factor $ g$ (slightly less than $ 1$) used to avoid infinite DC build-up.
\includegraphics[width=\twidth]{eps/fdigitaldiffint}

If discrete-time acceleration $ a_d(n)$ is defined as the sampled version of continuous-time acceleration, i.e., $ a_d(n) \isdeftext
a(nT,x)={\ddot y}(nT,x)$, (for some fixed continuous position $ x$ which we suppress for simplicity of notation), then the frequency-domain form is given by the $ z$ transform [462].

$\displaystyle A_d(z) \isdef \sum_{n=0}^\infty a_d(n) z^{-n}$ (G.37)

In the frequency domain for discrete-time systems, the first-order approximate conversions appear as shown in Fig. G.13.

Figure G.13: Frequency-domain description of the approximate conversions between time derivatives in the discrete-time case. The subscript ``$ d$'' denotes the ``digital'' case. A ``hat'' over a variable indicates it is an approximation to the variable without the hat.
\includegraphics[scale=0.6]{eps/ffddigitaldiffint}

The $ z$ transform plays the role of the Laplace transform for discrete-time systems. Setting $ z=e^{sT}$, it can be seen as a sampled Laplace transform (divided by $ T$), where the sampling is carried out by halting the limit of the rectangle width at $ T$ in the definition of a Reimann integral for the Laplace transform. An important difference between the two is that the frequency axis in the Laplace transform is the imaginary axis (the ``$ j\omega $ axis''), while the frequency axis in the $ z$ plane is on the unit circle $ z = e^{j\omega T}$. As one would expect, the frequency axis for discrete-time systems has unique information only between frequencies $ -\pi/T$ and $ \pi/T$ while the continuous-time frequency axis extends to plus and minus infinity.

These first-order approximations are accurate (though scaled by $ T$) at low frequencies relative to half the sampling rate, but they are not ``best'' approximations in any sense other than being most like the definitions of integration and differentiation in continuous time. Much better approximations can be obtained by approaching the problem from a digital filter design viewpoint [269,323,340]. Arbitrarily better approximations are possible using higher order digital filters. In principle, a digital differentiator is a filter whose frequency response $ H(e^{j\omega T})$ optimally approximates $ j\omega $ for $ \omega $ between $ -\pi/T$ and $ \pi/T$. Similarly, a digital integrator must match $ 1/j\omega$ along the unit circle in the $ z$ plane. The reason an exact match is not possible is that the ideal frequency responses $ j\omega $ and $ 1/j\omega$, when wrapped along the unit circle in the $ z$ plane, (the frequency axis for discrete time systems), are not ``smooth'' functions any more. As a result, there is no filter with a rational transfer function (i.e., finite order) that can match the desired frequency response exactly. The frequency response for the ideal digital differentiator is shown in Fig. G.14.

Figure G.14: Imaginary part of the frequency response $ H(e^{j\omega T})=j\omega $ of the ideal digital differentiator plotted over the unit circle in the $ z$ plane (the real part being zero).
\includegraphics[scale=0.9]{eps/f_ideal_diff_fr}

The discontinuity at $ z=-1$ alone is enough to ensure that no finite-order digital transfer function exists with the desired frequency response. As with bandlimited interpolation, it is good practice to reserve the top 10-20% of the spectrum as a ``guard band,'' above the limits of human hearing, where digital filters are free to smoothly vary in whatever way gives the best performance across frequencies in the audible band at the lowest cost. Note that, as in filters used for bandlimited interpolation, a small increment in oversampling factor yields a much larger decrease in filter cost when the sampling rate is low.

In the general case, digital filters can be designed to give arbitrarily accurate differentiation and integration by finding an optimal, complex, rational approximation to $ H(e^{j\omega}) = (j\omega)^k$ over the interval $ -\omega_{\mbox{\tiny max}}\leq \omega \leq \omega_{\mbox{\tiny max}}$, where $ k$ is an integer corresponding to the degree of differentiation or integration, and $ \omega_{\mbox{\tiny max}}<\pi$ is the upper limit of human hearing. For small guard bands $ \delta\isdeftext
\pi-\omega_{\mbox{\tiny max}}$, the filter order required for a given error tolerance is approximately inversely proportional to $ \delta$ [340,323,166,34].



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

[How to cite and copy this work] 
``Physical Audio Signal Processing for Virtual Musical Instruments and Digital Audio Effects'', by Julius O. Smith III, (December 2005 Edition).
Copyright © 2006-07-01 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]