\documentstyle[12pt,psfig]{article}

\headheight=0pt
\headsep=0pt
\textheight=8in
\oddsidemargin=0in
\textwidth=6.5in

\begin{document}

\begin{center}
{\bf THE PHYSICS OF VIBRATING STRINGS}
\end{center}

\vspace{.2in}

Vibrating strings are key components of many musical
instruments, such as guitars, violins, and pianos.
Hence, if we want to appreciate the physics of these instruments,
we must begin with the physics of a vibrating string.
To a first approximation, all strings are created equal,
as all are described by the wave equation
\begin{equation}
{{\partial ^2 y }\over{\partial t^2}} ~=~
c^2 \: {{\partial ^2 y }\over{\partial x^2}} ~,
\label{wave_equation}
\end{equation}
where $y$ is the displacement of the string from
its equilibrium position, which is a function of position along 
the string, $x$, and time, $t$.
But since guitars sound different from violins, and both sound different
from pianos, we know that there must be more to the
story than (\ref{wave_equation}).  This section of the course begins
with a discussion of the wave equation and how to attack it numerically.
This brings out some nice lessons in numerical stability.  It turns out
that the Courant condition, which concerns how to best choose the temporal
and spatial grid sizes in a finite difference treatment, can be easily
understood from the physics of the wave equation.
We then consider waves moving on strings in several different
contexts, including plucked guitar strings, and piano strings as they
are struck by a (piano) ``hammer.''

To construct a numerical scheme for attacking the wave equation,
we discretize $x$ and $t$ in units of $\Delta x$ and $\Delta t$,
so that $y(x,t) \rightarrow y(i \Delta x,n \Delta t) \rightarrow y(i,n)$,
and write the derivatives in finite difference form
\begin{equation}
{{y(i,n+1)\:+\:y(i,n-1) \: - \: 2 \: y(i,n)} \over {(\Delta t)^2}}
~\approx~ c^2 \: \left [
{{y(i+1,n)\:+\:y(i-1,n) \: - \: 2 \: y(i,n)} \over {(\Delta x)^2}}
\right ] ~.
\label{discrete}
\end{equation}
The $\approx$ symbol is used here to emphasize that
this is only an approximation; there are correction terms which can
be important.
Rearranging (\ref{discrete}) gives
\begin{equation}
y(i,n+1) ~=~ 2 \: [ 1\: - \: r^2] \: y(i,n) - y(i,n-1) + r^2 \:
\left [ y(i+1,n) + y(i-1,n) \right ] ~,
\label{algor_1}
\end{equation}
where $r \equiv c \Delta t / \Delta x$.  Thus, if we know 
the string configuration at time steps $n$ and $n-1$, we can calculate the
configuration at step $n+1$.
The initial conditions will depend on how the string is excited, and
we will now consider two cases.
 
Some results obtained with the algorithm (\ref{algor_1})
are shown in Fig.~\ref{plucked_string}.
Here the initial string profile (shown at the top of the
figure) was chosen to be triangular, with the
string at rest, as would be appropriate for a plucked guitar string.
The kink associated with this pluck is seen to split into two separate kinks,
one propagating to the left and one to the right, which reflect from
the ends of the string.  In our simulation
we kept the ends of the string fixed, so the reflections are inverted.

\begin{figure}
\centerline{
\psfig{figure=profiles.eps,width=3in}}
\caption{
{\em
Waves propagating on a string with fixed ends.
The string had a length of 0.65~m with c=200~m/s, as
would be appropriate for a guitar string.
The simulation used the values 
$\Delta x = 0.001 ~ \rm m$, and $\Delta t = \Delta x / c$.
The initial string profile is given at the top, and successive traces
(moving from top to bottom) show the string at progressively later times.
For clarity, each trace is shifted downwards from the previous one.
}
}
\label{plucked_string}
\end{figure}

\vspace{.25in}

The astute reader will recognize that (\ref{algor_1})
bears a strong resemblance to a no-frills Euler algorithm.  While the Euler
method is a very simple and useful for approach for many problems, it
is known to fail miserably for some situations that involve
oscillatory motion, such as a simple 
harmonic oscillator or planetary motion.
Wave motion is also a type of oscillation, so one might have expected
that an Euler approach would fail here too.
However, the results in Fig.~\ref{plucked_string} suggest that
it works quite nicely.  
Understanding why it works so well provides a useful lesson
in numerical methods, and leads to a derivation of the Courant condition
for the stability of the algorithm.

Once we have obtained the solution for the string displacement as
a function of time, as in the above figure, we can then discuss
the sound which is produced and its associated spectrum.  This brings
us to several important issues and techniques, including spectrum analysis,
the Fourier transform, and the Fast Fourier Transform.  

We next proceed to the case of a piano.
A piano string is set into motion by the blow from a ``hammer,''
which is actually just a wooden mallet covered with a compressible layer 
of felt.
While our first urge might be to treat the felt as a simple
spring describable by Hooke's law, it turns out that
life is not this simple.  Experiments have found that
the restoring force for felt
depends on the rate at which it is compressed,
and the preceding compression history.  Because of this hysteresis,
a full, general treatment of the piano hammer problem 
has not yet been worked out.  However, it is not hard to give a fairly
good approximate approach, which is basically
equivalent to the best that has been done to date in the research
literature.

We can add the hammer to the simulation
by treating it as a mass which strikes our numerical string
at a certain location, with the hammer--string interaction
force given by
\begin{equation}
F_{hammer} ~=~ g(x) \: K \: z^p ~,
\label{hammer_force}
\end{equation}
where $z$ is the amount which the felt is compressed, the exponent
$p \sim 2.5$ describes how the stiffness varies with compression,
and $K$ is a force constant.
Here $g(x)$ is a function which describes how the hammer force is
distributed along the string.
This can be accommodated
by letting $g(x)$ be a gaussian function centered at point where the middle 
of the hammer meets the string,  
with a full width which corresponds to the width of the
hammer.  In a typical case, the hammer meets the string a distance
1/8 from one end, and has a width of about 1~cm.
The strategy then is to begin at $t=0$ with the string in its undisplaced
state ($y=0$ everywhere) and give the hammer some initial velocity.
When the two meet, the hammer felt is compressed by an amount equal
to the difference between the hammer position and the string position
at the strike point, resulting in an
interaction force which acts on both the string and the hammer.  This
causes the string to move, and the hammer to eventually rebound.
Some results from such a simulation are given in Fig.~\ref{piano},
which shows the string profile during the initial hammer--string 
impact  (0.3~ms),
just after the hammer falls away from the string (2.1~ms),
and while the string is vibrating freely (3.0~ms).
Here we have used string and hammer parameters appropriate for
the note middle C on a piano.  The calculated hammer--string contact
time is 2.1~ms, which is quite close to
typical measured values.

\begin{figure}
\centerline{\psfig{figure=piano_prof_edited.eps,width=2.25in}}
\caption{
{\em
Simulation of a piano string.  The string and hammer parameters
we used are appropriate for a string near middle C. 
The string profile is shown at several different times after impact with the 
hammer.
}
}
\label{piano}
\end{figure}

\vspace{.25in}

These results can also be compared to those for the plucked
guitar string, and differences in the spectra of guitar and piano tones
can be identified and understood.
Other topics of interest can also be addressed,
including damping, and the effect of string stiffness.

\end{document}
