/ challenges-old / string
Sign in
challenges-old / string
Define the pluck as the static equilibrium under a raised-cosine finger load; w = 6 mm, signal scale 2.4 m/s
Jeremy Magland <jmagland@flatironinstitute.org> committed commit 9d7f24c8662a parent 03370d1 Browse files
2 changed files+26−11
challenges/string-pluck-v1/README.mdmodified+24−9View file
@@ -1,6 +1,6 @@
11 # string-pluck-v1: plucked damped string, pickup velocity
22
3-This is the hello-world challenge of the collection. The model is a linear damped string with fixed ends, released from rest from a smooth plucked shape. The deliverable is a two second mono wav file containing the transverse velocity of the string at a fixed pickup point. Every quantity below is defined in the continuum, so the true solution is a specific function of time that does not depend on any discretization. A modal series solution is given in the appendix; it converges to the true solution and can be evaluated to machine precision, so this challenge is mainly a test of the submission and scoring pipeline.
3+This is the hello-world challenge of the collection. The model is a linear damped string with fixed ends, released from rest from its static equilibrium under a finger load of finite width. The deliverable is a two second mono wav file containing the transverse velocity of the string at a fixed pickup point. Every quantity below is defined in the continuum, so the true solution is a specific function of time that does not depend on any discretization. A modal series solution is given in the appendix; it converges to the true solution and can be evaluated to machine precision, so this challenge is mainly a test of the submission and scoring pipeline.
44
55 The machine-readable version of this specification is [challenge.json](challenge.json).
66
@@ -24,13 +24,28 @@ $$
2424 u(x, 0) = u_0(x), \qquad \frac{\partial u}{\partial t}(x, 0) = 0, \qquad 0 \le x \le L.
2525 $$
2626
27-Here $c$ is the wave speed, $\sigma_0$ is a frequency-independent loss rate, and $\kappa$ is a Kelvin-Voigt viscosity that damps high frequencies faster than low ones. The initial shape is a raised cosine bump of height $h$ and half-width $w$ centered at the pluck point $x_p$:
27+Here $c$ is the wave speed, $\sigma_0$ is a frequency-independent loss rate, and $\kappa$ is a Kelvin-Voigt viscosity that damps high frequencies faster than low ones.
28+
29+The initial shape $u_0$ is the static equilibrium of the string under a transverse load of finite width centered at the pluck point $x_p$, which is how a finger or plectrum deforms the string before release. The load profile is a raised cosine of half-width $w$,
30+
31+$$
32+g(x) = \begin{cases} \dfrac{Q}{2w}\left(1 + \cos\dfrac{\pi (x - x_p)}{w}\right), & |x - x_p| \le w, \\[1ex] 0, & \text{otherwise,} \end{cases}
33+$$
34+
35+and $u_0$ solves the static problem $u_0'' = -g$ on $(0, L)$ with $u_0(0) = u_0(L) = 0$. Here $Q = \int_0^L g\,dx$ is the total load expressed as a slope (force divided by tension), and it is fixed by requiring the pluck height $u_0(x_p) = h$. In closed form,
36+
37+$$
38+u_0(x) = Q\,\tau(x) + Q\,\kappa(x - x_p), \qquad
39+\tau(x) = \begin{cases} x (L - x_p) / L, & x \le x_p, \\ x_p (L - x) / L, & x \ge x_p, \end{cases}
40+$$
2841
2942 $$
30-u_0(x) = \begin{cases} \dfrac{h}{2}\left(1 + \cos\dfrac{\pi (x - x_p)}{w}\right), & |x - x_p| \le w, \\[1ex] 0, & \text{otherwise.} \end{cases}
43+\kappa(y) = \begin{cases} y\,H(y) - \dfrac{1}{2w}\left[ \dfrac{(y + w)^2}{2} - \dfrac{w^2}{\pi^2}\left(1 + \cos\dfrac{\pi y}{w}\right) \right], & |y| \le w, \\[1ex] 0, & \text{otherwise,} \end{cases}
44+\qquad
45+Q = \frac{h}{x_p (L - x_p) / L - w\left(\tfrac{1}{4} - \tfrac{1}{\pi^2}\right)},
3146 $$
3247
33-Note that $u_0$ is continuously differentiable and vanishes at both ends, since $w < x_p < L - w$.
48+where $H$ is the Heaviside step ($H(y) = 1$ for $y > 0$, else $0$). $\tau$ is the triangle produced by a point load, and $\kappa$ is the correction from spreading the load over the contact region; it vanishes outside $|y| \le w$. Note that $u_0$ is three times continuously differentiable, since $g$ is continuously differentiable, and that $w < x_p < L - w$ so the fixed-end conditions hold.
3449
3550 ## Parameters
3651
@@ -40,9 +55,9 @@ Note that $u_0$ is continuously differentiable and vanishes at both ends, since
4055 | $c$ | 143 | m/s | wave speed (fundamental $c / 2L = 110$ Hz) |
4156 | $\sigma_0$ | 3 | 1/s | frequency-independent loss rate |
4257 | $\kappa$ | 0.004 | m^2/s | Kelvin-Voigt viscosity |
43-| $h$ | 0.002 | m | pluck height |
58+| $h$ | 0.002 | m | pluck height $u_0(x_p)$ |
4459 | $x_p$ | 0.1625 | m | pluck center ($L/4$) |
45-| $w$ | 0.03 | m | pluck half-width |
60+| $w$ | 0.006 | m | half-width of the finger load |
4661 | $x_m$ | 0.54 | m | pickup position |
4762
4863 All values are exact decimal numbers, not rounded measurements.
@@ -104,10 +119,10 @@ $$
104119 a_n'' + 2\alpha_n a_n' + c^2 k_n^2 a_n = 0, \qquad \alpha_n = \sigma_0 + \tfrac{1}{2}\kappa k_n^2,
105120 $$
106121
107-with $a_n(0) = A_n$ and $a_n'(0) = 0$, where
122+with $a_n(0) = A_n$ and $a_n'(0) = 0$. Integrating by parts twice, using $u_0'' = -g$ and the fixed ends,
108123
109124 $$
110-A_n = \frac{2}{L} \int_0^L u_0(x) \sin(k_n x)\, dx = \frac{2h}{L}\, \sin(k_n x_p)\, \sin(k_n w)\, \frac{(\pi / w)^2}{k_n \left( (\pi/w)^2 - k_n^2 \right)}.
125+A_n = \frac{2}{L} \int_0^L u_0(x) \sin(k_n x)\, dx = \frac{2}{L k_n^2} \int_0^L g(x) \sin(k_n x)\, dx = \frac{2Q}{L\, w\, k_n^3}\, \sin(k_n x_p)\, \sin(k_n w)\, \frac{(\pi / w)^2}{(\pi/w)^2 - k_n^2}.
111126 $$
112127
113128 With the parameters above, $(\pi/w)^2 - k_n^2 \ne 0$ for every integer $n$, since $L / w$ is not an integer. For every mode that matters $\alpha_n < c k_n$ (the modes are underdamped up to roughly $n = 14800$), and in that case, with $\omega_n = \sqrt{c^2 k_n^2 - \alpha_n^2}$,
@@ -122,4 +137,4 @@ $$
122137 s(t) = \sum_{n \ge 1} a_n'(t) \sin(k_n x_m).
123138 $$
124139
125-Since $|A_n| = O(n^{-3})$ and $|a_n'|$ carries an extra factor of $n$, the terms decay like $n^{-2}$ before damping is taken into account, and for $t > 0$ the exponential factor makes the series converge rapidly. In practice a few hundred modes give the signal to single precision for all $t \ge 1 / f_s$; at $t = 0$ the exact value is $s(0) = 0$.
140+Since $|A_n| = O(n^{-5})$ and $|a_n'|$ carries an extra factor of $n$, the terms decay like $n^{-4}$ before damping is taken into account, and for $t > 0$ the exponential factor makes the series converge rapidly. In practice a few hundred modes give the signal to single precision for all $t \ge 1 / f_s$; at $t = 0$ the exact value is $s(0) = 0$.
challenges/string-pluck-v1/challenge.jsonmodified+2−2View file
@@ -10,7 +10,7 @@
1010 "sample_format": "float32",
1111 "signal": "transverse velocity at the pickup point",
1212 "signal_unit": "m/s",
13- "signal_scale": 14.0
13+ "signal_scale": 2.4
1414 },
1515 "parameters": {
1616 "L": 0.65,
@@ -19,7 +19,7 @@
1919 "kappa": 0.004,
2020 "h": 0.002,
2121 "x_p": 0.1625,
22- "w": 0.03,
22+ "w": 0.006,
2323 "x_m": 0.54
2424 },
2525 "metrics": {
↑↓ move↵openescclose