## Introduction

The digital waveguide (DW) method has been used for many years to
provide highly efficient algorithms for musical sound synthesis based
on physical models [433,447,396]. For a much longer time,
finite-difference time-domain (FDTD) schemes have been used to
simulate more general situations, usually at higher cost
[550,392,74,77,45,397].
In recent years, there has been interest in relating these methods to
each other [123] and in combining them for more
general simulations. For example, modular hybrid methods have been
devised which interconnect DW and FDTD simulations by means of a
*KW converter* [223,226]. The basic idea
of the KW-converter adaptor is to convert the ``Kirchoff variables'' of the
FDTD, such as string displacement, velocity, etc., to ``wave
variables'' of the DW. The W variables are regarded as the
traveling-wave components of the K variables.

In this appendix, we present an alternative to the KW converter. Instead of converting K variables to W variables, or vice versa, in the time domain, conversion formulas are derived with respect to the current state as a function of spatial coordinates. As a result, it becomes simple to convert any instantaneous state configuration from FDTD to DW form, or vice versa. Thus, instead of providing the necessary time-domain filter to implement a KW converter converting traveling-wave components to physical displacement of a vibrating string, say, one may alternatively set the displacement variables instantaneously to the values corresponding to a given set of traveling-wave components in the string model. Another benefit of the formulation is an exact physical interpretation of arbitrary initial conditions and excitations in the K-variable FDTD method. Since the DW formulation is exact in principle (though bandlimited), while the FDTD is approximate, even in principle, it can be argued that the true physical interpretation of the FDTD method is that given by the DW method. Since both methods generate the same evolution of state from a common starting point, they may only differ in computational expense, numerical sensitivity, and in the details of supplying initial conditions and boundary conditions.

The wave equation for the ideal vibrating string, reviewed in §C.1, can be written as

In the following two subsections, we briefly recall *finite
difference* and *digital waveguide* models for the ideal
vibrating string.

### Finite Difference Time Domain (FDTD) Scheme

As discussed in §C.2, we may use *centered finite
difference approximations* (FDA) for the
second-order partial derivatives in the wave equation to obtain a
*finite difference scheme* for numerically integrating the ideal
wave equation [481,311]:

where is the time sampling interval, and is a spatial sampling interval.

Substituting the FDA into the wave equation, choosing , where is sound speed (normalized to below), and sampling at times and positions , we obtain the following explicit finite difference scheme for the string displacement:

where the sampling intervals and have been normalized to 1. To initialize the recursion at time , past values are needed for all (all points along the string) at time instants and . Then the string position may be computed for all by Eq.(E.3) for . This has been called the

*FDTD*or leapfrog finite difference scheme [127].

### Digital Waveguide (DW) Scheme

We now derive the digital waveguide formulation by *sampling* the
*traveling-wave* solution to the wave equation. It is easily
checked that the lossless 1D wave equation
is solved
by any string shape which travels to the left or right with speed
[100]. Denote
*right-going* traveling waves in general by
and
*left-going* traveling waves by
, where and
are assumed twice-differentiable. Then, as is well known, the
general class of solutions to the lossless, one-dimensional,
second-order wave equation can be expressed as

Sampling these traveling-wave solutions yields

where a ``'' superscript denotes a ``right-going'' traveling-wave component, and ``'' denotes propagation to the ``left''. This notation is similar to that used for acoustic-tube modeling of speech [297].

Figure E.1 (initially given as Fig.C.3)
shows a signal flow diagram for the computational model of
Eq.(E.5), termed a *digital waveguide model* (developed
in detail in Appendix C). Recall that, by the sampling theorem, it
is an exact model so long as the initial conditions and any ongoing
additive excitations are bandlimited to less than half the temporal
sampling rate [451, Appendix G]. Recall also that
the position along the string,
meters, is laid
out from left to right in the diagram, giving a physical
interpretation to the horizontal direction in the diagram, even though
spatial samples have been eliminated from explicit consideration. (The
arguments of and have physical units of time.)

The left- and right-going traveling wave components are summed to produce a physical output according to

In Fig.E.1, ``transverse displacement outputs'' have been arbitrarily placed at and .

### FDTD and DW Equivalence

The FDTD and DW recursions both compute time updates by forming fixed linear combinations of past state. As a result, each can be described in ``state-space form'' [449, Appendix G] by a constant matrix operator, the ``state transition matrix'', which multiplies the state vector at the current time to produce the state vector for the next time step. The FDTD operator propagates K variables while the DW operator propagates W variables. We may show equivalence by (1) defining a one-to-one transformation which will convert K variables to W variables or vice versa, and (2) showing that given any common initial state for both schemes, the state transition matrices compute the same next state in both cases.

The next section shows that the linear transformation from W to K variables,

for all and , sets up a one-to-one linear transformation between the K and W variables. Assuming this holds, it only remains to be shown that the DW and FDTD schemes preserve mapping Eq.(E.7) after a state transition from one time to the next. While this has been shown previously [442], we repeat the derivation here for completeness. We also provide a state-space analysis reaching the same conclusion in §E.4.

From Fig.E.1, it is clear that the DW scheme preserves
mapping Eq.(E.7) by definition. For the FDTD scheme, we expand the
right-hand of Eq.(E.3) using Eq.(E.7) and verify that the
left-hand side also satisfies the map, *i.e.*, that
holds:

Since the DW method propagates sampled (bandlimited) solutions to the ideal wave equation without error, it follows that the FDTD method does the same thing, despite the relatively crude approximations made in Eq.(E.2). In particular, it is known that the FDA introduces artificial damping when applied to first order partial derivatives arising in lumped, mass-spring systems [447].

The equivalence of the DW and FDTD state transitions extends readily to the DW mesh [518,447] which is essentially a lattice-work of DWs for simulating membranes and volumes. The equivalence is more important in higher dimensions because the FDTD formulation requires less computations per node than the DW approach in higher dimensions (see [33] for some quantitative comparisons).

Even in one dimension, the DW and finite-difference methods have unique advantages in particular situations [223], and as a result they are often combined together to form a hybrid traveling-wave/physical-variable simulation [351,352,222,124,123,224,263,33].

**Next Section:**

State Transformations

**Previous Section:**

Von Neumann Analysis