String Excitation

In §2.4 and §6.10 we looked at the basic architecture of a digital waveguide string excited by some external disturbance. We now consider the specific cases of string excitation by a hammer (mass) and plectrum (spring).

Ideal String Struck by a Mass

In §6.6, the ideal struck string was modeled as a simple initial velocity distribution along the string, corresponding to an instantaneous transfer of linear momentum from the striking hammer into the transverse motion of a string segment at time zero. (See Fig.6.10 for a diagram of the initial traveling velocity waves.) In that model, we neglected any effect of the striking hammer after time zero, as if it had bounced away at time 0 due to a so-called elastic collision. In this section, we consider the more realistic case of an inelastic collision, i.e., where the mass hits the string and remains in contact until something, such as a wave, or gravity, causes the mass and string to separate.

For simplicity, let the string length be infinity, and denote its wave impedance by $ R$. Denote the colliding mass by $ m$ and its speed prior to collision by $ v_0$. It will turn out in this analysis that we may approximate the size of the mass by zero (a so-called point mass). Finally, we neglect the effects of gravity and drag by the surrounding air. When the mass collides with the string, our model must switch from two separate models (mass-in-flight and ideal string), to that of two ideal strings joined by a mass $ m$ at $ x=0$, as depicted in Fig.9.12. The ``force-velocity port'' connections of the mass and two semi-infinite string endpoints are formally in series because they all move together; that is, the mass velocity equals the velocity of each of the two string endpoints connected to the mass (see §7.2 for a fuller discussion of impedances and their parallel/series connection).

Figure 9.12: Physical model of mass-string collision after time 0.

The equivalent circuit for the mass-string assembly after time zero is shown in Fig.9.13. Note that the string wave impedance $ R$ appears twice, once for each string segment on the left and right. Also note that there is a single common velocity $ v(t)$ for the two string endpoints and mass. LTI circuit elements in series can be arranged in any order.

Figure 9.13: Electrical equivalent circuit for the mass and two string endpoints after time zero. The mass is represented by an inductor of $ m$ Henrys, while each string endpoint is represented by a resistor of $ R$ Ohms (impedance $ R$).

From the equivalent circuit, it is easy to solve for the velocity $ v(t)$. Formally, this is accomplished by applying Kirchoff's Loop Rule, which states that the sum of voltages (``forces'') around any series loop is zero:

$\displaystyle 0 \eqsp f_m(t) + f_{R}(t) + f_{R}(t) \protect$ (10.8)

All of the signs are `$ +$' in this equation because the ``current'' (velocity $ v(t)$) flows into the `$ +$' sign of each element. These reference directions indicated by `$ +/-$' on each element in Fig.9.13 may be chosen arbitrarily, but it is convenient to adopt the convention that $ v(t)$ flows into the `$ +$' sign for each reaction force, and into the `$ -$' sign for each action force (or driving force or voltage/current source, etc.). With this convention, Kirchoff's Loop Rule effectively states ``the sum of all action forces equals the sum of all reaction forces,'' where the forces are understood to act on a common point. This is essentially Newton's third law of motion ``for every action there is an equal and opposite reaction'' (§B.1). In our mass-string example, all three forces are defined to be reaction forces because there is no external driving force on the mass, and no incoming waves from the string segments. External driving forces on the mass-string junction will be formulated later below.10.8 We could equally well have defined the mass inertial force as a driving force on the two string segments, or the string segments could comprise a pair of driving forces for the mass. Ultimately, any force polarities may be assigned and consistently handled.

Taking the Laplace transform10.9of Eq.$ \,$(9.8) yields, by linearity,

$\displaystyle 0 \eqsp F_m(s) + 2F_{R}(s), \protect$ (10.9)

where $ F_m(s)$ and $ F_{R}(s)$ denote the Laplace transforms of $ f_m(t)$ and $ f_{R}(t)$, respectively. As discussed above, the impedance relation for each string endpoint is given by

$\displaystyle f_{R}(t) = R\,v(t) \quad\longleftrightarrow\quad
F_{R}(s) = R\,V(s),

where $ V(s)$ denotes the Laplace transform of $ v(t)$.

For the mass, we have

$\displaystyle f_m(t) = m\,a(t)\;=\; m\,\frac{d}{dt} v(t) \quad\longleftrightarrow\quad
F_m(s) = m\left[s\,V(s) - v_0\right],

where we used the differentiation theorem for Laplace transforms [449, Appendix D].10.10Note that the mass is characterized by its impedance
$ F_m(s)/V(s) = ms$ when the initial velocity $ v_0$ is zero (§7.1).

Substituting these relations into Eq.$ \,$(9.9) yields

$\displaystyle m\,v_0 \eqsp m\,s\,V(s) + 2R\,V(s). \protect$ (10.10)

We see that the initial momentum $ m\,v_0$ of the mass effectively provides an impulsive external driving force

$\displaystyle f_{\mbox{ext}}(t)\eqsp m\,v_0\,\delta(t).

That is, an equivalent problem formulation is to start with the mass at rest and in contact with the string, followed by striking the mass with an ideal hammer (impulse) that imparts momentum $ m\,v_0$ to the mass at time zero. This formulation is diagrammed in Fig.9.14.

Figure: Electrical equivalent circuit for the mass and two string endpoints after time zero, using an impulsive driving force in place of a nonzero initial velocity. (Cf. Fig.9.13.)

An advantage of the external-impulse formulation is that the system has a zero initial state, so that an impedance description7.1) is complete. In other words, the system can be fully described as a series combination of the three impedances $ ms$, $ R$ (on the left), and $ R$ (on the right), driven by an external force-source $ f_{\mbox{ext}}(t)$.

Solving Eq.$ \,$(9.10) for $ V(s)$ yields

$\displaystyle V(s) = \frac{m\,v_0}{ms + 2R}.

Since the Laplace transform of $ e^{-at}u(t)$ is $ 1/(s+a)$, where $ u(t)$ denotes the Heaviside unit step function,10.11 the velocity of the contact point is

$\displaystyle v(t) = v_0\, e^{-{\frac{2R}{m}t}}, \quad t\ge 0.

We see that at time zero the mass velocity is $ v_0$, as it must be, and after that it decays exponentially to zero with time-constant $ m/2R$. The decay rate depends on the ratio of the mass to the string wave impedance. In particular, the heavier the mass, the slower the mass velocity decays to zero. Since $ R=\sqrt{K\epsilon }$, the greater the string tension $ K$ or mass-density $ \epsilon $, the faster the mass velocity decays to zero.

The displacement of the string at $ x=0$ is given by the integral of the velocity:

$\displaystyle y(t,0) = \int_0^t v(\tau)\,d\tau = v_0\,\frac{m}{2R}\,\left[1-e^{-{\frac{2R}{m}t}}\right]

where we defined the initial transverse displacement as $ y(0,0)=0$. The final displacement of the string is

$\displaystyle y(\infty,0) = v_0\,\frac{m}{2R}.

Thus, the final string displacement is proportional to both the ``hammer mass'' and the initial striking velocity; it is inversely proportional to the string wave impedance $ R$.

The momentum of the mass before time zero is $ mv_0$, and after time zero it is

$\displaystyle m\,v(t) = m\,v_0\, e^{-{\frac{2R}{m}t}}.

The force applied to the two string endpoints by the mass is given by $ f_m(t) = 2Rv(t)$. From Newton's Law, $ f=ma=m\dot v$, we have that momentum $ mv$, delivered by the mass to the string, can be calculated as the time integral of applied force:

$\displaystyle \int_0^t f_m(\tau)\,d\tau = 2R\int_0^t v(\tau)\,d\tau
= 2Rv_0\fr...
= m\,v_0\left(1-e^{-{\frac{2R}{m}t}}\right).

Thus, the momentum delivered to the string by the mass starts out at zero, and grows as a relaxing exponential to $ mv_0$ at time infinity. We see that an ideal string struck inelastically by a mass does not at all correspond to an instantaneous momentum transfer, as considered in §6.6. Instead, the mass's momentum is transferred over a period of time (in this case infinite time). This is why it is possible to approximate the mass width by zero in this analysis, unlike in the excitation-by-initial-velocity in §6.6.

In a real piano, the hammer, which strikes in an upward (grand) or sideways (upright) direction, falls away from the string a short time after collision, but it may remain in contact with the string for a substantial fraction of a period (see §9.4 on piano modeling).

Mass Termination Model

The previous discussion solved for the motion of an ideal mass striking an ideal string of infinite length. We now investigate the same model from the string's point of view. As before, we will be interested in a digital waveguide (sampled traveling-wave) model of the string, for efficiency's sake (Chapter 6), and we therefore will need to know what the mass ``looks like'' at the end of each string segment. For this we will find that the impedance description (§7.1) is especially convenient.

Figure 9.15: Physical model of mass-string collision after time 0. The mass is drawn as having a finite diameter for conceptual clarity. However, the model is formulated for the limit as the diameter approaches zero in the figure (bringing all three forces together to act on a single mass-string junction point). In other words, we assume a point mass.

Let's number the string segments to the left and right of the mass by 1 and 2, respectively, as shown in Fig.9.15. Then Eq.$ \,$(9.8) above may be written

$\displaystyle 0 \eqsp f_m(t) + f_{1m}(t) + f_{2m}(t), \protect$ (10.11)

where $ f_{1m}(t)$ denotes the force applied by string-segment 1 to the mass (defined as positive in the ``up'', or positive-$ y$ direction), $ f_{2m}(t)$ is the force applied by string-segment 2 to the mass (again positive upwards), and $ f_m(t)$ denotes the inertial force applied by the mass to both string endpoints (where again, a positive force points up).

To derive the traveling-wave relations in a digital waveguide model, we want to use the force-wave variables $ f_1=f^{{+}}_1+f^{{-}}_1$ and $ f_2=f^{{+}}_2+f^{{-}}_2$ that we defined for vibrating strings in §6.1.5; i.e., we defined $ f_i\isdeftext
-Ky'_i$, where $ K$ is the string tension and $ y'_i$ is the string slope, $ i=1,2$.

Figure 9.16: Depiction of a string segment with negative slope (center), pulling up to the right and down to the left. (Horizontal force components are neglected.)

As shown in Fig.9.16, a negative string slope pulls ``up'' to the right. Therefore, at the mass point we have $ f_{1m}(t) =
f_1(t,x_m) = -Ky'_1(t,x_m)$, where $ x_m$ denotes the position of the mass along the string. On the other hand, the figure also shows that a negative string slope pulls ``down'' to the left, so that $ f_{2m}(t)
= -f_2(t,x_m) = Ky'_2(t,x_m)$. In summary, relating the forces we have defined for the mass-string junction to the force-wave variables in the string, we have

f_{1m}(t) &=& \quad\! f_1(t,x_m)\\
f_{2m}(t) &=& -f_2(t,x_m)

where $ x_m$ denotes the position of the mass along the string.

Thus, we can rewrite Eq.$ \,$(9.11) in terms of string wave variables as

$\displaystyle 0 \eqsp f_m(t) + f_{1}(t,x_m) - f_{2}(t,x_m), \protect$ (10.12)

or, substituting the definitions of these forces,

$\displaystyle 0 \eqsp -m\dot v(t) - K\,y'_1(t,0) + K\, y'_2(t,0). \protect$ (10.13)

The inertial force of the mass is $ f_m(t)=-m\dot v(t)$ because the mass must be accelerated downward in order to produce an upward reaction force. The signs of the two string forces follow from the definition of force-wave variables on the string, as discussed above.

The force relations can be checked individually. For string 1,

$\displaystyle m\dot v(t) + K\,y'_1(t,0) = 0

states that a positive slope in the string-segment to the left of the mass corresponds to a negative acceleration of the mass by the endpoint of that string segment. Similarly, for string 2,

$\displaystyle m\dot v(t) - K\,y'_2(t,0) = 0

says that a positive slope on the right accelerates the mass upwards. Similarly, a negative slope pulls ``up'' to the right and ``down'' to the left, as shown in Fig.9.16 above.

Now that we have expressed the string forces in terms of string force-wave variables, we can derive digital waveguide models by performing the traveling-wave decompositions $ f_1=f^{{+}}_1+f^{{-}}_1$ and $ f_2=f^{{+}}_2+f^{{-}}_2$ and using the Ohm's law relations $ f^{{+}}_i=Rv^{+}_i$ and $ f^{{-}}_i=-Rv^{-}_i$ for $ i=1,2$ (introduced above near Eq.$ \,$(6.6)).

Mass Reflectance from Either String

Let's first consider how the mass looks from the viewpoint of string 1, assuming string 2 is at rest. In this situation (no incoming wave from string 2), string 2 will appear to string 1 as a simple resistor (or dashpot) of $ R$ Ohms in series with the mass impedance $ ms$. (This observation will be used as the basis of a rapid solution method in §9.3.1 below.)

When a wave from string 1 hits the mass, it will cause the mass to move. This motion carries both string endpoints along with it. Therefore, both the reflected and transmitted waves include this mass motion. We can say that we see a ``dispersive transmitted wave'' on string 2, and a dispersive reflection back onto string 1. Our object in this section is to calculate the transmission and reflection filters corresponding to these transmitted and reflected waves.

By physical symmetry the velocity reflection and transmission will be the same from string 1 as it is from string 2. We can say the same about force waves, but we will be more careful because the sign of the transverse force flips when the direction of travel is reversed.10.12Thus, we expect a scattering junction of the form shown in Fig.9.17 (recall the discussion of physically interacting waveguide inputs in §2.4.3). This much invokes the superposition principle (for simultaneous reflection and transmission), and imposes the expected symmetry: equal reflection filters $ \hat{\rho}(s)$ and equal transmission filters $ \hat{\tau}(s)$ (for either force or velocity waves).

Figure 9.17: Expected form of the scattering junction representing a mass $ m$ attached to the string. This form is expected for both force and velocity waves. The LTI filter transfer function $ \hat{\rho}(s)$ models the reflectance of the mass on the spring, while $ \hat{\tau}(s)$ models its transmittance.

Let's begin with Eq.$ \,$(9.12) above, restated as follows:

$\displaystyle 0 \eqsp f_m(t) + f_1(t,x_m) - f_2(t,x_m). \protect$ (10.14)

The traveling-wave decompositions can be written out as
$\displaystyle f_1(t,x_m)$ $\displaystyle =$ $\displaystyle f^{{+}}_1(t-x_m/c) + f^{{-}}_1(t+x_m/c)$  
$\displaystyle f_2(t,x_m)$ $\displaystyle =$ $\displaystyle f^{{+}}_2(t+x_m/c) + f^{{-}}_2(t-x_m/c)
\protect$ (10.15)

where a ``+'' superscript means ``right-going'' and a ``-'' superscript means ``left-going'' on either string.10.13

Let's define the mass position $ x_m$ to be zero, so that Eq.$ \,$(9.14) with the substitutions Eq.$ \,$(9.15) becomes

$\displaystyle 0 \eqsp f_m(t) + [f^{{+}}_1(t) + f^{{-}}_1(t)] - [f^{{+}}_2(t)+f^{{-}}_2(t)] = 0.

Let's now omit the common ``(t)'' arguments and write more simply

$\displaystyle f_m + f^{{+}}_1 + f^{{-}}_1 - f^{{+}}_2 - f^{{-}}_2 \eqsp 0.

Let $ v=v_m=v_1=v_2$ denote the common velocity of the mass and string endpoints. Then we have $ f_m=-m\dot v$ for the mass (as discussed above at Eq.$ \,$(9.13)), and the Ohm's-law relations for the string are $ f^{{+}}_i=Rv^{+}_i$ and $ f^{{-}}_i=-Rv^{-}_i$. Making these substitutions gives

$\displaystyle -m\dot v+ Rv^{+}_1 -Rv^{-}_1 - Rv^{+}_2 + Rv^{-}_2 \eqsp 0.

In the Laplace domain, dropping the common ``(s)'' arguments,

F_m + F^{+}_1 + F^{-}_1 - F^{+}_2 -F^{-}_2 &=& 0\\ [10pt]
-msV + RV^{+}_1 - RV^{-}_1 - RV^{+}_2 + RV^{-}_2 &=& 0.

To compute the reflection coefficient of the mass seen on string 1, we may set $ V^{-}_2=0$, which means $ V=V^{+}_2+V^{-}_2=V^{+}_2$, so that we have

$\displaystyle -msV + RV^{+}_1 - RV^{-}_1 - RV\eqsp 0.

Also, since $ V=V^{+}_1+V^{-}_1$, we can substitute $ V^{-}_1=V-V^{+}_1$ and solve for the common velocity to get

$\displaystyle \zbox {V(s) \eqsp \frac{2R}{ms+2R}V^{+}_1(s).} \protect$ (10.16)

From this, the reflected velocity is immediate:

$\displaystyle \zbox {V^{-}_1(s) \eqsp V(s)-V^{+}_1(s) \eqsp -\frac{ms}{ms+2R}V^{+}_1(s).}

The transmitted velocity is of course $ Vp_2(s)=V(s)$. We have thus found the velocity reflection transfer function (or velocity reflectance) of the mass as seen from string 1:

$\displaystyle \zbox {\hat{\rho}_v(s)
\isdefs \frac{V^{-}_1(s)}{V^{+}_1(s)}
\eqsp -\frac{ms}{ms+2R}}

By physical symmetry, we also have $ V^{+}_2(s)/V^{-}_2(s) = \hat{\rho}_v(s)$, i.e., the transverse-velocity reflectance is the same on either side of the mass. Thus we have found both velocity reflection filters at the mass-string junction. In summary, the velocity reflectance of the mass is $ -ms/(ms+2R)$ from either string segment. This is a simple first-order filter model of what the mass (and string beyond) looks like dynamically from either string.

It is always good to check that our answers make physical sense in limiting cases. For this problem, easy cases to check are $ m=0$ and $ m=\infty$. When the mass is $ m=0$, the reflectance goes to zero (no reflected wave at all). When the mass goes to infinity, the reflectance approaches $ \hat{\rho}_v=-1$, corresponding to a rigid termination, which also makes sense.

The results of this section can be more quickly obtained as a special case of the main result of §C.12, by choosing $ N=2$ waveguides meeting at a load impedance $ R_J(s)=ms$. The next section gives another fast-calculation method based on a standard formula.

Simplified Impedance Analysis

The above results are quickly derived from the general reflection-coefficient for force waves (or voltage waves, pressure waves, etc.):

$\displaystyle \zbox {\rho = \frac{R_2-R_1}{R_2+R_1} = \frac{\mbox{Impedance Step}}{\mbox{Impedance Sum}}} \protect$ (10.17)

where $ \rho$ is the reflection coefficient of impedance $ R_2$ as ``seen'' from impedance $ R_1$. If a force wave $ f^{{+}}$ traveling along in impedance $ R_1$ suddenly hits a new impedance $ R_2$, the wave will split into a reflected wave $ f^{{-}}=\rho f^{{+}}$, and a transmitted wave $ (1+\rho)f^{{+}}$. It therefore follows that a velocity wave $ v^{+}$ will split into a reflected wave $ v^{-}= - \rho v^{+}$ and transmitted wave $ (1-\rho)v^{+}$. This rule is derived in §C.8.4 (and implicitly above as well).

In the mass-string-collision problem, we can immediately write down the force reflectance of the mass as seen from either string:

$\displaystyle \zbox {\hat{\rho}_f(s) \eqsp \frac{(ms+R) - R}{(ms+R) + R} \eqsp \frac{ms}{ms+2R}}

That is, waves in the string are traveling through wave impedance $ R$, and when they hit the mass, they are hitting the series combination of the mass impedance $ ms$ and the wave impedance $ R$ of the string on the other side of the mass. Thus, in terms of Eq.$ \,$(9.17) above, $ R_1=R$ and $ R_2=ms+R$.

Since, by the Ohm's-law relations,

$\displaystyle \hat{\rho}_f(s) \isdefs \frac{F^{-}}{F^{+}}
\eqsp \frac{-RV^{-}}{RV^{+}}
\eqsp - \frac{V^{-}}{V^{+}}
\isdefs -\hat{\rho}_v(s).

we have that the velocity reflectance is simply

$\displaystyle \zbox {\hat{\rho}_v(s) \isdefs \frac{V^{-}}{V^{+}} \eqsp -\hat{\rho}_f(s) \isdefs -\frac{F^{-}}{F^{+}}.}

Mass Transmittance from String to String

Referring to Fig.9.15, the velocity transmittance from string 1 to string 2 may be defined as

$\displaystyle \hat{\tau}_v(s)
\eqsp \frac{V^{+}_2(s)}{V^{+}_1(s)}.

By physical symmetry, we expect the transmittance to be the same in the opposite direction: $ \hat{\tau}_v(s) = \frac{V^{-}_1(s)}{V^{-}_2(s)}$. Assuming the incoming wave $ V^{-}_2$ on string 2 is zero, we have $ V^{+}_2=V$, which we found in Eq.$ \,$(9.16):

$\displaystyle V \eqsp \frac{2R}{ms+2R}V^{+}_1

Thus, the mass transmittance for velocity waves is

$\displaystyle \zbox {\hat{\tau}_v(s) \eqsp \frac{2R}{ms+2R} \eqsp 1-\hat{\rho}_v(s)}

We see that $ m\to\infty$ corresponds to $ \hat{\tau}_v(s)\to 0$, as befits a rigid termination. As $ m\to0$, the transmittance becomes 1 and the mass has no effect, as desired.

We can now refine the picture of our scattering junction Fig.9.17 to obtain the form shown in Fig.9.18.

Figure 9.18: Velocity-wave scattering junction for a mass $ m$ (impedance $ ms$) attached to an ideal string having wave impedance $ R$.

Force Wave Mass-String Model

The velocity transmittance is readily converted to a force transmittance using the Ohm's-law relations:

$\displaystyle \hat{\tau}_f(s) \isdefs \frac{F^{+}_2}{F^{+}_1} = \frac{RV^{+}_2}{RV^{+}_1} = \hat{\tau}_v(s)

Calculating it for the other direction as a check gives

$\displaystyle \frac{F^{-}_1}{F^{-}_2} = \frac{-RV^{+}_1}{-RV^{+}_2} = \hat{\tau}_v(s).

Thus, while the reflectance of the mass toggles sign when going from force to velocity waves, the transmittance of the mass is the same in all cases. We therefore have the force-wave scattering junction shown in Fig.9.19.

Figure 9.19: Force-wave scattering junction representing a mass $ m$ (impedance $ ms$) attached to an ideal string having wave impedance $ R$.

Checking as before, we see that $ m\to\infty$ corresponds to $ \hat{\tau}_v(s)\to 0$, which means no force is transmitted through an infinite mass, which is reasonable. As $ m\to0$, the force transmittance becomes 1 and the mass has no effect, as desired.

Summary of Mass-String Scattering Junction

In summary, we have characterized the mass on the string in terms of its reflectance and transmittance from either string. For force waves, we have outgoing waves given by

F^{-}_1(s) &=& \hat{\rho}_f(s) F^{+}_1(s) + \hat{\tau}_f(s) F^...
...2(s) &=& \hat{\tau}_f(s) F^{+}_1(s) + \hat{\rho}_f(s) F^{-}_2(s)


$\displaystyle \left[\begin{array}{c} F^{+}_2 \\ [2pt] F^{-}_1 \end{array}\right...
...ay}\right] \left[\begin{array}{c} F^{+}_1 \\ [2pt] F^{-}_2 \end{array}\right]

in terms of the incoming waves $ F^{+}_1$ and $ F^{-}_2$, the force reflectance $ \hat{\rho}_f(s)=ms/(ms+2R)$, and the force transmittance $ \hat{\tau}_f(s)=1+\hat{\rho}_f(s)=2R/(ms+2R)$. We may say that the mass creates a dynamic scattering junction on the string. (If there were no dependency on $ s$, such as when a dashpot is affixed to the string, we would simply call it a scattering junction.) The above form of the dynamic scattering junction is analogous to the Kelly-Lochbaum scattering junctionC.8.4). The general relation $ \hat{\tau}_f = 1+\hat{\rho}_f$ can be used to simplify the Kelly-Lochbaum form to a one-filter scattering junction analogous to the one-multiply scattering junctionC.8.5):

F^{-}_1 &=& \hat{\rho}_f F^{+}_1 + (1+\hat{\rho}_f) F^{-}_2 \;...
...ho}_f F^{-}_2 \;=\; F^{+}_1 + \hat{\rho}_f\cdot(F^{+}_1+F^{-}_2)

The one-filter form follows from the observation that $ \hat{\rho}_f\cdot(F^{+}_1+F^{-}_2)$ appears in both computations, and therefore need only be implemented once:

F^{+}&\isdef & \hat{\rho}_f\cdot(F^{+}_1+F^{-}_2)\\ [5pt]
F^{-}_1 &=& F^{-}_2 + F^{+}\\ [5pt]
F^{+}_2 &=& F^{+}_1 + F^{+}

This structure is diagrammed in Fig.9.20.

Figure 9.20: Continuous-time force-wave simulation diagram, in one-filter form, for an ideal string with a point mass attached.

Again, the above results follow immediately from the more general formulation of §C.12.

Digital Waveguide Mass-String Model

To obtain a force-wave digital waveguide model of the string-mass assembly after the mass has struck the string, it only remains to digitize the model of Fig.9.20. The delays are obviously to be implemented using digital delay lines. For the mass, we must digitize the force reflectance appearing in the one-filter model of Fig.9.20:

$\displaystyle \hat{\rho}_f(s) = \frac{ms}{ms+2R} \protect$ (10.18)

A common choice of digitization method is the bilinear transform7.3.2) because it preserves losslessness and does not alias. This will effectively yield a wave digital filter model for the mass in this context (see Appendix F for a tutorial on wave digital filters).

The bilinear transform is typically scaled as

$\displaystyle s = \frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}

where $ T$ denotes the sampling interval. This choice optimizes the low-frequency match between the digital and analog mass frequency responses. Rewriting Eq.$ \,$(9.18) as

$\displaystyle \hat{\rho}_f(s) = \frac{1}{1+\frac{2R}{ms}}

the bilinear transform gives

&=& \frac{1}{1+\frac{2R}{m}\frac{T}{2}\frac{1+z^{-1}}{1-z^{-1}}}\\ [5pt]
&=& g\frac{1-z^{-1}}{1-pz^{-1}}

where the gain coefficient $ g$ and pole $ p$ are given by

g&\isdef &\frac{1}{1+\frac{RT}{m}}\;<\;1\\ [5pt]
p&\isdef &\frac{1-\frac{RT}{m}}{1+\frac{RT}{m}}\;<\;1.

Thus, the reflectance of the mass is a one-pole, one-zero filter. The zero is exactly at dc, the real pole is close to dc, and the gain at half the sampling rate is $ 1$. We may recognize this as the classic dc-blocking filter [449]. Comparing with Eq.$ \,$(9.18), we see that the behavior at dc is correct, and that the behavior at infinite frequency ( $ \hat{\rho}(\infty)=1$) is now the behavior at half the sampling rate ( $ \hat{\rho}_d(-1)=1$).

Physically, the mass reflectance is zero at dc because sufficiently slow waves can freely move a mass of any finite size. The reflectance is 1 at infinite frequency because there is no time for the mass to start moving before it is pushed in the opposite direction. In short, a mass behaves like a rigid termination at infinite frequency, and a free end (no termination) at zero frequency. The reflectance of a mass is therefore a ``dc blocker''.

The final digital waveguide model of the mass-string combination is shown in Fig.9.21.

Figure 9.21: Digital waveguide model of an ideal string with a point mass attached.

Additional examples of lumped-element modeling, including masses, springs, dashpots, and their various interconnections, are discussed the Wave Digital Filters (WDF) appendix (Appendix F). A nice feature WDFs is that they employ traveling-wave input/output signals which are ideal for interfacing to digital waveguides. The main drawback is that the WDFs operate over a warped frequency axis (due to the bilinear transform), while digital delay lines have a normal (unwarped) frequency axis. On the plus side, WDFs cannot alias, while digital waveguides do alias in the frequency domain for signals that are not bandlimited to less than half the sampling rate. At low frequencies (or given sufficient oversampling), the WDF frequency warping is minimal, and in such cases, WDF ``lumped element models'' may be connected directly to digital waveguides, which are ``sampled-wave distributed parameter'' models.

Even when the bilinear-transform frequency-warping is severe, it is often well tolerated when the frequency response has only one ``important frequency'', such as a second-order resonator, lowpass, or highpass response. In other words, the bilinear transform can be scaled to map any single analog frequency to any desired corresponding digital frequency (see §7.3.2 for details), and the frequency-warped responses above and below the exactly mapped frequency may ``sound as good as'' the unwarped responses for musical purposes. If not, higher order filters can be used to model lumped elements (Chapter 7).

Displacement-Wave Simulation

As discussed in [121], displacement waves are often preferred over force or velocity waves for guitar-string simulations, because such strings often hit obstacles such as frets or the neck. To obtain displacement from velocity at a given $ x$, we may time-integrate velocity as above to produce displacement at any spatial sample along the string where a collision might be possible. However, all these integrators can be eliminated by simply going to a displacement-wave simulation, as has been done in nearly all papers to date on plucking models for digital waveguide strings.

To convert our force-wave simulation to a displacement-wave simulation, we may first convert force to velocity using the Ohm's law relations $ f^{{+}}_i=Rv^{+}_i$ and $ f^{{-}}_i=-Rv^{-}_i$ and then conceptually integrate all signals with respect to time (in advance of the simulation). $ R$ is the same on both sides of the finger-junction, which means we can convert from force to velocity by simply negating all left-going signals. (Conceptually, all signals are converted from force to velocity by the Ohm's law relations and then divided by $ R$, but the common scaling by $ 1/R$ can be omitted (or postponed) unless signal values are desired in particular physical units.) An all-velocity-wave simulation can be converted to displacement waves even more easily by simply changing $ v$ to $ y$ everywhere, because velocity and displacement waves scatter identically. In more general situations, we can go to the Laplace domain and replace each occurrence of $ V^{+}(s)$ by $ sY^{+}(s)$, each $ V^{-}(s)$ by $ sY^{-}(s)$, divide all signals by $ s$, push any leftover $ s$ around for maximum simplification, perhaps absorbing it into a nearby filter. In an all-velocity-wave simulation, each signal gets multiplied by $ s$ in this procedure, which means it cancels out of all definable transfer functions. All filters in the diagram (just $ \hat{\rho}_f(s)$ in this example) can be left alone because their inputs and outputs are still force-valued in principle. (We expressed each force wave in terms of velocity and wave impedance without changing the signal flow diagram, which remains a force-wave simulation until minus signs, scalings, and $ s$ operators are moved around and combined.) Of course, one can absorb scalings and sign reversals into the filter(s) to change the physical input/output units as desired. Since we routinely assume zero initial conditions in an impedance description, the integration constants obtained by time-integrating velocities to get displacements are all defined to be zero. Additional considerations regarding the choice of displacement waves over velocity (or force) waves are given in §E.3.3. In particular, their initial conditions can be very different, and traveling-wave components tend not to be as well behaved for displacement waves.

Piano Hammer Modeling

The previous section treated an ideal point-mass striking an ideal string. This can be considered a simplified piano-hammer model. The model can be improved by adding a damped spring to the point-mass, as shown in Fig.9.22 (cf. Fig.9.12).

Figure 9.22: Ideal string excited by a mass and damped spring (a more realistic piano-hammer model).

The impedance of this plucking system, as seen by the string, is the parallel combination of the mass impedance $ ms$ and the damped spring impedance $ \mu+k/s$. (The damper $ \mu $ and spring $ k/s$ are formally in series--see §7.2, for a refresher on series versus parallel connection.) Denoting the driving-point impedance of the hammer at the string contact-point by $ R_h(s)$, we have

$\displaystyle R_h(s) \eqsp ms \left\Vert \left(\mu+\frac{k}{s}\right)\right. \eqsp \frac{\mu s^2 + ks}{s^2+\frac{\mu}{m}s+\frac{k}{m}}. \protect$ (10.19)

Thus, the scattering filters in the digital waveguide model are second order (biquads), while for the string struck by a mass (§9.3.1) we had first-order scattering filters. This is expected because we added another energy-storage element (a spring).

The impedance formulation of Eq.$ \,$(9.19) assumes all elements are linear and time-invariant (LTI), but in practice one can normally modulate element values as a function of time and/or state-variables and obtain realistic results for low-order elements. For this we must maintain filter-coefficient formulas that are explicit functions of physical state and/or time. For best results, state variables should be chosen so that any nonlinearities remain memoryless in the digitization [361,348,554,555].

Nonlinear Spring Model

In the musical acoustics literature, the piano hammer is classically modeled as a nonlinear spring [493,63,178,76,60,486,164].10.14Specifically, the piano-hammer damping in Fig.9.22 is typically approximated by $ \mu=0$, and the spring $ k$ is nonlinear and memoryless according to a simple power law:

$\displaystyle k(x_k) \; \approx \; Q_0\, x_k^{p-1}

where $ p=1$ for a linear spring, and generally $ p>2$ for pianos. A fairly complete model across the piano keyboard (based on acoustic piano measurements) is as follows [487]:

Q_0 &=& 183\,e^{0.045\,n}\\
p &=& 3.7 + 0.015\,n\\
n &=& \mb...
...hammer-felt (nonlinear spring) compression}\\
v_k &=& \dot{x}_k

The upward force applied to the string by the hammer is therefore

$\displaystyle f_h(t) \eqsp Q_0\, x_k^p.$ (10.20)

This force is balanced at all times by the downward string force (string tension times slope difference), exactly as analyzed in §9.3.1 above.

Including Hysteresis

Since the compressed hammer-felt (wool) on real piano hammers shows significant hysteresis memory, an improved piano-hammer felt model is

$\displaystyle f_h(t) \eqsp Q_0\left[x_k^p + \alpha \frac{d(x_k^p)}{dt}\right], \protect$ (10.21)

where $ \alpha = 248 + 1.83\,n - 5.5 \cdot 10^{-2}n^2$ ($ \mu $s), and again $ n$ denotes piano key number [487].

Equation (9.21) is said to be a good approximation under normal playing conditions. A more complete hysteresis model is [487]

$\displaystyle f_h(t) \eqsp f_0\left[x_k^p(t) - \frac{\epsilon}{\tau_0} \int_0^t x_k^p(\xi) \exp\left(\frac{\xi-t}{\tau_0}\right)d\xi\right]


f_0 &=& \mbox{ instantaneous hammer stiffness}\\
\epsilon &=&...
...resis parameter}\\
\tau_0 &=& \mbox{ hysteresis time constant}.

Relating to Eq.$ \,$(9.21) above, we have $ Q_0=f_0\cdot(1-\epsilon)$ (N/mm$ \null^p$).

Piano Hammer Mass

The piano-hammer mass may be approximated across the keyboard by [487]

$\displaystyle m = 11.074 - 0.074\,n + 0.0001\,n^2.

where $ n$ is piano key number as before.

Pluck Modeling

The piano-hammer model of the previous section can also be configured as a plectrum by making the mass and damping small or zero, and by releasing the string when the contact force exceeds some threshold $ f_{\mbox{\tiny max}}$. That is, to a first approximation, a plectrum can be modeled as a spring (linear or nonlinear) that disengages when either it is far from the string or a maximum spring-force is exceeded. To avoid discontinuities when the plectrum and string engage/disengage, it is good to taper both the damping and spring-constant to zero at the point of contact (as shown below).

Starting with the piano-hammer impedance of Eq.$ \,$(9.19) and setting the mass $ m$ to infinity (the plectrum holder is immovable), we define the plectrum impedance as

$\displaystyle R_p(s) \isdefs \mu+\frac{k}{s} \eqsp \frac{\mu s + k}{s}. \protect$ (10.22)

The force-wave reflectance of impedance $ R_p(s)$ in Eq.$ \,$(9.22), as seen from the string, may be computed exactly as in §9.3.1:

$\displaystyle \hat{\rho}_f(s)$ $\displaystyle =$ $\displaystyle \frac{\mbox{Impedance Step}}{\mbox{Impedance Sum}}
\eqsp \frac{[R_p(s)+R]-R}{[R_p(s)+R]+R}
\eqsp \frac{R_p(s)}{R_p(s)+2R}$  
  $\displaystyle =$ $\displaystyle \frac{\mu}{\mu+2R} \cdot
\protect$ (10.23)

If the spring damping is much greater than twice the string wave impedance ($ \mu\gg 2R$), then the plectrum looks like a rigid termination to the string (force reflectance $ \hat{\rho}_f(s)=1$), which makes physical sense.

Again following §9.3.1, the transmittance for force waves is given by

$\displaystyle \hat{\tau}_f(s) = 1+\hat{\rho}_f(s),

and for velocity and displacement waves, the reflectance and transmittance are respectively $ -\hat{\rho}_f(s)$ and $ 1-\hat{\rho}_f(s)$.

If the damping $ \mu $ is set to zero, i.e., if the plectrum is to be modeled as a simple linear spring, then the impedance becomes $ R_k(s) = k/s$, and the force-wave reflectance becomes [128]

$\displaystyle \hat{\rho}_f(s) \eqsp \frac{\frac{k}{2R}}{s+\frac{k}{2R}}. \protect$ (10.24)

Digital Waveguide Plucked-String Model

When plucking a string, it is necessary to detect ``collisions'' between the plectrum and string. Also, more complete plucked-string models will allow the string to ``buzz'' on the frets and ``slap'' against obstacles such as the fingerboard. For these reasons, it is convenient to choose displacement waves for the waveguide string model. The reflection and transmission filters for displacement waves are the same as for velocity, namely, $ \hat{\rho}_y(s) = -\hat{\rho}_f(s)$ and $ \hat{\tau}_y(s) = 1-\hat{\rho}_f(s)$.

As in the mass-string collision case, we obtain the one-filter scattering-junction implementation shown in Fig.9.23. The filter $ \hat{\rho}_f(s)$ may now be digitized using the bilinear transform as previously (§9.3.1).

Figure 9.23: Displacement-wave scattering model for a spring.

Incorporating Control Motion

Let $ y_m(t)$ denote the vertical position of the mass in Fig.9.22. (We still assume $ m=\infty$.) We can think of $ y_m$ as the position of the control point on the plectrum, e.g., the position of the ``pinch-point'' holding the plectrum while plucking the string. In a harpsichord, $ y_m$ can be considered the jack position [347].

Also denote by $ L$ the rest length of the spring $ k$ in Fig.9.22, and let $ y_e \isdeftext y_m+L$ denote the position of the ``end'' of the spring while not in contact with the string. Then the plectrum makes contact with the string when

$\displaystyle y_e(t) \ge y(t)

where $ y(t)$ denotes string vertical position at the plucking point $ x_p$. This may be called the collision detection equation.

Let the subscripts $ 1$ and $ 2$ each denote one side of the scattering system, as indicated in Fig.9.23. Then, for example, $ y_1=y_1^-+y_1^+$ is the displacement of the string on the left (side $ 1$) of plucking point, and $ y_2$ is on the right side of $ x_p$ (but still located at point $ x_p$). By continuity of the string, we have

$\displaystyle y(t)\eqsp y_1(t)\eqsp y_2(t).

When the spring engages the string ($ y_e > y$) and begins to compress, the upward force on the string at the contact point is given by

$\displaystyle f_k \eqsp k\cdot (y_e-y)

where again $ y_e=y_m+L$. The force $ f_k$ is applied given $ y_e\ge y$ (spring is in contact with string) and given $ f_k < f_{\mbox{\tiny max}}$ (the force at which the pluck releases in a simple max-force model).10.15 For $ y_e<
y$ or $ f_k \ge f_{\mbox{\tiny max}}$ the applied force is zero and the entire plucking system disappears to leave $ y_1^- = y_2^-$ and $ y_2^+=y_1^+$, or equivalently, the force reflectance becomes $ \hat{\rho}_f=0$ and the transmittance becomes $ \hat{\tau}_f=1$.

During contact, force equilibrium at the plucking point requires (cf. §9.3.1)

$\displaystyle 0 \eqsp f_1+f_k-f_2 \protect$ (10.25)

where $ f_i \isdeftext -Ky'_i \isdeftext -K\partial y_i/\partial x$ as usual (§6.1), with $ K$ denoting the string tension. Using Ohm's laws for traveling-wave components (p. [*]), we have

$\displaystyle f_i \eqsp f_i^++f_i^-
\eqsp Rv_i^+ - Rv_i^-,

where $ R=\sqrt{K\epsilon }$ denotes the string wave impedance (p. [*]). Solving Eq.$ \,$(9.25) for the velocity at the plucking point yields

$\displaystyle v \eqsp v_1^+ + v_2^- + \frac{1}{2R} f_k,

or, for displacement waves,

$\displaystyle y \eqsp y_1^+ + y_2^- + \frac{1}{2R} \int_t f_k. \protect$ (10.26)

Substituting $ f_k = k\cdot (y_e-y)$ and taking the Laplace transform yields

$\displaystyle Y(s)
\eqsp Y_1^+(s) + Y_2^-(s) + \frac{1}{2R} \frac{F_k(s)}{s}
\eqsp Y_1^+(s) + Y_2^-(s) + \frac{k}{2Rs}\left[Y_e(s) - Y(s)\right].

Solving for $ Y(s)$ and recognizing the force reflectance $ \hat{\rho}_f(s)$ gives

Y(s) &=& \left[1-\hat{\rho}_f(s)\right]\cdot
...)\cdot \left\{Y_e(s)
- \left[Y_1^+(s)+Y_2^-(s)\right]\right\},

where, as first noted at Eq.$ \,$(9.24) above,

$\displaystyle \hat{\rho}_f(s) \isdefs
\frac{\left(\frac{k}{s}+R\right) - R}{\l...
... \frac{\frac{k}{s}}{2R+\frac{k}{s}}
\eqsp \frac{\frac{k}{2R}}{s+\frac{k}{2R}}.

We can thus formulate a one-filter scattering junction as follows:

Y_d^+ &=& Y_e - \left(Y_1^+ + Y_2^-\right)\\ [5pt]
Y_1^- &=& Y...
...\hat{\rho}_f Y_d^+\\ [5pt]
Y_2^+ &=& Y_1^+ + \hat{\rho}_f Y_d^+.

This system is diagrammed in Fig.9.24. The manipulation of the minus signs relative to Fig.9.23 makes it convenient for restricting $ y_d^+(t)$ to positive values only (as shown in the figure), corresponding to the plectrum engaging the string going up. This uses the approximation $ y_1(t)=y_2(t)\approx y_1^+(t)+y_2^-(t)$, which is exact when $ \hat{\rho}_f=0$, i.e., when the plectrum does not affect the string displacement at the current time. It is therefore exact at the time of collision and also applicable just after release. Similarly, $ y_d^+(t)>f_{\mbox{\tiny max}}/k$ can be used to trigger a release of the string from the plectrum.

Figure 9.24: Instantaneous spring displacement-wave scattering model driven by the spring edge $ y_e(t)=y_m(t)+L$.

Successive Pluck Collision Detection

As discussed above, in a simple 1D plucking model, the plectrum comes up and engages the string when $ y_e(t) \ge y(t)$, and above some maximum force the plectrum releases the string. At this point, it is ``above'' the string. To pluck again in the same direction, the collision-detection must be disabled until we again have $ y_e<
y$, requiring one bit of state to keep track of that.10.16 The harpsichord jack plucks the string only in the ``up'' direction due to its asymmetric behavior in the two directions [143]. If only ``up picks'' are supported, then engagement can be suppressed after a release until $ y_e(t)$ comes back down below the envelope of string vibration (e.g., $ y_e(t)<-y_{\mbox{\small max}}$). Note that intermittent disengagements as a plucking cycle begins are normal; there is often an audible ``buzzing'' or ``chattering'' when plucking an already vibrating string.

When plucking up and down in alternation, as in the tremolo technique (common on mandolins), the collision detection alternates between $ y_e<
y$ and $ y_e > y$, and again a bit of state is needed to keep track of which comparison to use.

Plectrum Damping

To include damping $ \mu $ in the plectrum model, the load impedance $ R_p(s)=k/s$ goes back to Eq.$ \,$(9.22):

$\displaystyle R_p(s) = \frac{k}{s}+\mu

The corresponding force reflectance is then given by Eq.$ \,$(9.23).

Digitization of the Damped-Spring Plectrum

Applying the bilinear transformation7.3.2) to the reflectance $ \hat{\rho}_f(s)$ in Eq.$ \,$(9.23) (including damping) yields the following first-order digital force-reflectance filter:

$\displaystyle \hat{\rho}_f(z) \;=\; \frac{\mu}{\mu+2R}
...z^{-1}}{1 + z^{-1}}
\;=\; g\frac{1-\zeta z^{-1}}{1-pz^{-1}}

$\displaystyle p$ $\displaystyle =$ $\displaystyle \frac{1-\frac{KT}{2(\mu+2R)}}{1+\frac{KT}{2(\mu+2R)}}$   (digital pole)$\displaystyle \protect$ (10.27)
$\displaystyle \zeta$ $\displaystyle =$ $\displaystyle \frac{1-\frac{KT}{2\mu}}{1+\frac{KT}{2\mu}}$   (digital zero)$\displaystyle \protect$ (10.28)
$\displaystyle g$ $\displaystyle =$ $\displaystyle \frac{1-p}{1-\zeta}$   (gain term)$\displaystyle \protect$ (10.29)

The transmittance filter is again $ 1+\hat{\rho}_f(z)$, and there is a one-filter form for the scattering junction as usual.


Since the pluck model is linear, the parameters are not signal-dependent. As a result, when the string and spring separate, there is a discontinuous change in the reflection and transmission coefficients. In practice, it is useful to ``feather'' the switch-over from one model to the next [470]. In this instance, one appealing choice is to introduce a nonlinear spring, as is commonly used for piano-hammer models (see §9.3.2 for details).

Let the nonlinear spring model take the form

$\displaystyle f_k(y_d) = k y_d^p,

where $ p=1$ corresponds to a linear spring. The spring constant linearized about zero displacement $ y_d$ is

$\displaystyle k(y_d) = f^\prime_k(y_d) = pk y_d^{p-1}

which, for $ p>1$, approaches zero as $ y_d\to0$. In other words, the spring-constant itself goes to zero with its displacement, instead of remaining a constant. This behavior serves to ``feather'' contact and release with the string. We see from Eq.$ \,$(9.23) above that, as displacement goes to zero, the reflectance approaches a frequency-independent reflection coefficient $ \hat{\rho}_f=\mu/(\mu+2r)$, resulting from the damping $ \mu $ that remains in the spring model. As a result, there is still a discontinuity when the spring disengages from the string.

The foregoing suggests a nonlinear tapering of the damping $ \mu $ in addition to the tapering the stiffness $ k$ as the spring compression approaches zero. One natural choice would be

$\displaystyle \mu(y_d) = p\mu y_d^{p-1}

so that $ \mu(y_d)$ approaches zero at the same rate as $ k(y_d)$. It would be interesting to estimate $ p$ for the spring and damper from measured data. In the absence of such data, $ p=2$ is easy to compute (requiring a single multiplication). More generally, an interpolated lookup of $ y_d^p$ values can be used.

In summary, the engagement and disengagement of the plucking system can be ``feathered'' by a nonlinear spring and damper in the plectrum model.

Next Section:
Piano Synthesis
Previous Section:
Acoustic Guitars