Content uploaded by Michele Ducceschi

Author content

All content in this area was uploaded by Michele Ducceschi on Sep 01, 2019

Content may be subject to copyright.

Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019

NON-ITERATIVE SOLVERS FOR NONLINEAR PROBLEMS: THE CASE OF COLLISIONS

Michele Ducceschi ∗

Acoustics and Audio Group

University of Edinburgh

Edinburgh, UK

michele.ducceschi@ed.ac.uk

Stefan Bilbao

Acoustics and Audio Group

University of Edinburgh

Edinburgh, UK

s.bilbao@ed.ac.uk

ABSTRACT

Nonlinearity is a key feature in musical instruments and electronic

circuits alike, and thus in simulation, for the purposes of physics-

based modeling and virtual analog emulation, the numerical so-

lution of nonlinear differential equations is unavoidable. Ensur-

ing numerical stability is thus a major consideration. In general,

one may construct implicit schemes using well-known discretisa-

tion methods such as the trapezoid rule, requiring computationally-

costly iterative solvers at each time step. Here, a novel family of

provably numerically stable time-stepping schemes is presented,

avoiding the need for iterative solvers, and thus of greatly reduced

computational cost. An application to the case of the collision in-

teraction in musical instrument modeling is detailed.

1. INTRODUCTION

Computer simulation of physical systems is at the core of many

disciplines, and physical modeling sound synthesis is no excep-

tion. The scope of research into physical modeling has expanded to

include the simulation of very complex musical systems, including

lumped as well as fully-distributed nonlinearities; musically, many

perceptually important phenomena can be viewed as originating

from this nonlinear behaviour. A specialised approach is often re-

quired at the simulation stage, particularly in ensuring numerical

stability—a major concern in the modeling of systems with strong

nonlinearities. One approach to the design of numerically-stable

schemes is through the use of energy methods. With rare excep-

tions, however, such designs require the use of iterative numerical

schemes, thus increasing computational costs.

Recently, non-iterative numerical integrators for a class of non-

linear ordinary differential equations have been devised through

the port-Hamiltonian approach for virtual-analog simulations [1,

2, 3]. The schemes employ a suitable quadratisation of the non-

linear potential [4] which gives, ultimately, an update which can

be performed without the use of an iterative method such as, e.g.,

Newton-Raphson.

In the current work, the possibility of using non-iterative solvers

for nonlinear problems is developed further, to the case of a non-

invertible potential, and for fully distributed systems described

by partial differential equations (PDEs). The focus here will be

on collisions, a topic of longstanding attraction for researchers in

physical modeling sound synthesis [5, 6, 7, 8, 9, 10, 11, 12, 13].

∗The author’s work was supported by the Leverhulme Trust with an

Early Career Fellowship

Copyright: c

2018 Michele Ducceschi et al. This is an open-access article dis-

tributed under the terms of the Creative Commons Attribution 3.0 Unported License,

which permits unrestricted use, distribution, and reproduction in any medium, pro-

vided the original author and source are credited.

Collisions here serve as useful and practically important test case,

because the method can be applied in the current form to any

second-order-in-time system with a non-negative potential energy,

and can be extended to higher-order systems. The current method

leads to signiﬁcant speedups, in some cases of one order of mag-

nitude, see [14]. Moreover, with respect to iterative methods, exis-

tence and uniqueness of the numerical solution are proven trivially

by inspection of the update equation.

The method is described in detail in Section 2. There, an

overview is given, along with a numerical experiment dealing with

a mass-spring system colliding against a barrier. In Section 3, a

case of interest in musical acoustics is studied, i.e. the collision

of a musical string against a distributed barrier. Iterative schemes,

developed in previous works, are used for bench marking. Novel

non-iterative ﬁnite difference schemes and modal schemes are de-

veloped, showing convergence of all the methods to a common

solution. Stability is proven mathematically by energy arguments,

and illustrated in a number of numerical experiments.

2. PRELIMINARIES

Before examining a fully distributed system, it is useful to explore

the method in the case of a typical lumped system in a mechanical

setting, described by a single time-dependent ordinary differential

equation (ODE):

M¨u+φ0(u) = 0 (1)

Here, u=u(t)is a displacement of a lumped object of mass M,

and as a function of time t. Dots represent derivatives with respect

to t.φ=φ(u)is a function representing the potential energy of

the system, and φ0=dφ/du. (Note that if φ(u) = Bu2/2, for

some constant B > 0, then (1) represents the equation of motion

of a simple harmonic oscillator.)

Using the chain rule, it is possible to rewrite (1) as

M¨u+˙

φ/ ˙u= 0 (2)

Conservation of energy may be achieved by directly multiplying

both sides of (2) by ˙u, yielding

d

dt M˙u2

2+φ

| {z }

,H(t)

= 0 (3)

and hence

H(t) = H(0) ,H0.(4)

Non-negativity of the potential energy φreﬂects a condition for

passivity of (1). Under such a condition, the total conserved energy

H0is non-negative, and one may bound the growth of the state as

0≤ |˙u| ≤ p2H0/M (5)

DAFX-1

Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019

More restrictive conditions on φ(such as radial unboundedness)

allow for global asymptotic stability, but the above non-negativity

condition will sufﬁce for the present purposes, and allows physically-

reasonable solution growth (i.e., inertial drift).

The new schemes proposed in this work are based on an equiv-

alent expression for (1):

M¨u+ψψ0= 0 with ψ=p2φ(6)

By means of the chain rule, (6) may be written as

M¨u+ψ(˙

ψ/ ˙u) = 0 (7)

and energy conservation is obtained by multiplication by ˙u, on

both sides, yielding

d

dt M˙u2

2+ψ2

2

| {z }

,H(t)

= 0 (8)

This form of the energy function is analogous to the form given

in [3] developed within the Port-Hamiltonian framework. Clearly,

(8) is equivalent to (3), given the deﬁnition in (6). Hence, (7) is

equivalent to (2), and bounds (5) hold.

Passivity and equivalence of (7) and (2) are possible only un-

der non-negativity of the potential φ—an entirely natural require-

ment. Though various forms of the potential appear in musical

acoustics, here, one particular form will be explored, namely:

φ(η) = K

(α+ 1) [η]α+1

+, K ≥0, α ≥1(9)

where [η]+,0.5(η+|η|)is the positive part of η. This poten-

tial is clearly non-negative. It has been employed as a penalty-

potential in collision models in musical acoustics [15, 8], and it is

derived from Hertz’s contact law.

2.1. Linear Oscillator With Barrier

In preparation to the fully distributed case, (1) is now equipped

with a linear restoring force. Hence

M¨u=−φ0(η)−Mω2

0u(10)

with φgiven by (9), and where

η=u−b(11)

This model describes a mass-spring system, with linear radian fre-

quency ω0= 2πf0, with f0measured in Hz, colliding from below

against a barrier placed at b. This differential equation can be cast

in the two equivalent forms, as seen above. These are

M¨u=−˙

φ/ ˙η−Mω2

0u(12a)

M¨u=−ψ(˙

ψ/ ˙η)−M ω2

0u(12b)

Energy conservation for the above equations reads, respectively,

d

dt M˙u2

2+Mω2

0u2

2+φ= 0 (13a)

d

dt M˙u2

2+Mω2

0u2

2+ψ2

2= 0 (13b)

and thus the same bounds as (5) hold in both cases.

2.2. Time Difference Operators

Solutions to (12a) and (12b) are sought by means of appropriate ﬁ-

nite difference schemes. Time is discretised by means of a sample

rate fs, yielding a time step k= 1/fs.unrepresents an approxi-

mation to the continuous function u(t)at time t=nk, for integer

n. Finite time difference operators are now introduced.

The identity and temporal shift operators are deﬁned as

1un=un, et+un=un+1, et−un=un−1(14)

Notice that the similar deﬁnitions hold for operators acting on in-

terleaved grid functions [16], as in

et+ψn−1/2=ψn+1/2, et−ψn+1/2=ψn−1/2(15)

From these, it is possible to deﬁne the forward, backward and cen-

tred time differences, all approximating a ﬁrst time derivative, as

δt+=et+−1

k, δt−=1−et−

k, δt·=et+−et−

2k(16)

An approximation to the second time derivative is constructed by

composition of the operators presented above, as

δtt =δt+δt−(17)

Finally, forward and backward averaging operators may be deﬁned

as

µt+=et++ 1

2, µt−=1 + et−

2(18)

2.2.1. Iterative Conservative Finite Difference Scheme

Following the derivation in [8], a suitable discretisation of (12a) is

Mδttun=−Mω2

0un−δt+φn−1/2

δt·ηn(19)

where

φn−1/2,µt−φ(un−b

| {z }

ηn

)(20)

Stability of the scheme may be inferred from energy analysis, after

multiplication of both sides of (19) by δt·un. This gives

δt+

M(δt−un)2

2+Mω2

0unun−1

2+φn−1/2

| {z }

Hn−1/2

= 0

This is clearly a discrete counterpart of (13a). In this case, the non-

negativity of the total energy can be assured if and only if [16]

ω0<2fs(21)

Under such condition, one may write

0≤ |δt−un| ≤ q2H1/2/M (22)

and hence the boundedness of the state follows. Scheme (19) can

be written as

r−2un+ 2un−1+k2ω2

0un+k2

M

φ(r+a)−φ(a)

r

| {z }

G(r)

= 0,

(23)

DAFX-2

Proceedings of the 22nd International Conference on Digital Audio Effects (DAFx-19), Birmingham, UK, September 2–6, 2019

where

r,un+1 −un−1, a ,b−un−1.

Because the unknown rappears implicitly as the argument of φ, an

iterative root ﬁnder (such as Newton-Raphson) must be employed

in order to solve G(r) = 0 as per (23). The solution to the scheme

can be shown to be unique — see [13, 8].

2.2.2. Non-iterative Conservative Finite Difference Scheme

A novel, non-iterative ﬁnite difference scheme follows as a suit-

able discretisation of (12b), as

Mδttun=−M ω2

0un−µt+ψn−1/2δt+ψn−1/2

δt·ηn(24)

This may be rewritten as the following system:

Mδttun=−M ω2

0un−µt+ψn−1/2gn(25a)

δt+ψn−1/2=gnδt·ηn(25b)

where gnmay be explicitly computed as

gn=ψ0η=ηn

=φ0

√2φη=ηn

(26)

Here, we may use the analytic expressions for ψand φdirectly

in the computation of gn. Stability of the scheme can be deduced

from an energy conservation law, obtained after multiplication of

(24) by δt·un. Energy is thus conserved according to

δt+

M(δt−un)2

2+Mω2

0unun−1

2+(ψn−1/2)2

2

| {z }

Hn−1/2

= 0

Inspection of the energy function allows to infer the same stability

condition as (21). Thus, the same bounds as (22) hold in this case.

Using the identity

µt+ψn−1/2=k

2δt+ψn−1/2+ψn−1/2(27)

one may insert the value of δt+ψn−1/2from (25b) into (25a), to

get

Aun+1 =v(28)

where

A=M

k2+(gn)2

4

v=M

k2(2un−un−1)−Mω2

0un+(gn)2

4un−1−ψn−1/2gn

This scheme can thus be solved by division, and once un+1 is

computed, from (25a), one can update ψn+1/2using (25b).

Figure 1: For all panels, the red line is the solution obtained via the

iterative scheme (with 20 iterations), and the blue line is the solu-

tion obtained via the new scheme. A particle of mass M= 10g

is launched with initial speed v0= 1m/s from u0=−0.5m

against a rigid barrier with α= 1.1,K= 5 ·104, located at

b= 0.2m. The particle is subjected to a linear restoring po-

tential of frequency f0= 10Hz. The sample rate is chosen as

fs= 44100Hz. (a)-(b): displacement vs time, at times indicated.

(c)-(d): potential φ, at times indicated. (e)-(f): energy variation

∆H= (Hn−1/2−H1/2)/H1/2, at times indicated.

2.3. Numerical Examples

The ﬁnite difference schemes given above are now compared in

cases of practical use. In particular, two barriers with different

stiffness constants are considered here. Fig. 1 depicts the case

with a softer barrier. From panels (a)-(b), it is seen that the two

schemes yield a converged solution for a long period of time. The

value of the potential φ, visible in panels (c)-(d) is also the same

over the same period. Finally, panels (e)-(f) show the variation of

the total energy.

Fig. 2 considers the same oscillator, with a harder barrier. In

this case, the two schemes yield a different solution. For the non-

iterative scheme, the excess kinetic energy is converted to potential

energy, so to guarantee energy conservation overall, keeping the

scheme stable within the bounds (22), as visible in Fig.2(c)-(d).

This is reﬂected in lower-than-expected collision output velocities.

The variation of the total energy for the two schemes is visible

in Fig.2(e)-(f). As expected, increasing the sample rate yields a

converged solution, as can be seen in Fig. (3).

3. DISTRIBUTED SYSTEMS

In this section, the model schemes illustrated in the previous sec-

tion are applied to cases of interest in musical acoustics, for ad-

vanced sound synthesis of string instruments. The system under

study is composed of a taut string with stiffness, and of a rigid bar-

rier. The motion of the string, of length L, can be described by

DAFX-3

Figure 2: Same as Fig. 1, but with K= 7 ·107.

either one of the following equivalent equations

ρ∂2

tu=∂2

xT0u−∂4

xEI u +∂tφ

∂tη+δ(x−xF)F(t)(29a)

ρ∂2

tu=∂2

xT0u−∂4

xEI u +ψ∂tψ

∂tη+δ(x−xF)F(t)(29b)

where again

ψ=p2φ(30)

In the equations, u=u(x, t)is the displacement of the string,

now a function of both time and space. Notice that, having to

deal with partial differentiation, the notation for derivatives has

changed compared to the lumped case. The string is deﬁned over

D:x∈[0, L]. Constants appear as: ρ, the linear density; T0, the

applied tension; E, Young’s modulus; I, the moment of inertia of

the cross section. The potential φhas now units of potential energy

per unit length (i.e. energy density) , but its formal deﬁnition is

again of the form (9), where

η=b−u(31)

In the above, b=b(x)is the height of barrier, supposed unmov-

able. Finally, δ(x−xF)is a Dirac delta function. F(t)will be

here expressed as a raised cosine function, i.e.

F(t) = (F0

21−cos 2π(t−t0)

twid , t0≤t≤t0+twid

0,otherwise .

where F0and twid are input parameters controlling, respectively,

the maximum amplitude of the forcing, and the contact duration,

and t0is the activation time.

An inner product of two functions f, g, and the associated

norm, are deﬁned as

hf, g iD,ZL

0

f g dx, kfk2

D,hf, f iD(32)

Figure 3: Same as Fig. 2, but with fs= 5 ·44100Hz

Under unforced conditions, i.e. for F(t) = 0, energy conserva-

tion and boundary conditions can be extracted after taking an inner

product of (29a) and (29b) with ∂tu. This gives, respectively,

d

dt

ρk∂tuk2

D

2+T0k∂xuk2

D

2+EI k∂2

xuk2

D

2+hφ, 1iD

| {z }

H(t)

= 0

(33a)

d

dt

ρk∂tuk2

D

2+T0k∂xuk2

D

2+EI k∂2

xuk2

D

2+kψk2

D

2

| {z }

H(t)

= 0

(33b)

where the identities above hold only under a choice of appropri-

ate boundary conditions. Here, conditions of the simply-supported

kind are enforced, hence

u=∂2

xu= 0 at x= 0, L (34)

Given the non-negativity of the energy functions above, one may

bound the norm of the state, as

0≤ k∂tukD≤p2H0/ρ (35)

where H0is the value of the conserved energy (i.e. its initial

value).

3.1. Iterative and Non-Iterative Finite Difference Schemes

Finite difference schemes are now constructed for the solution of

(29a), (29b). Hence, both time and space are discretised along ap-

propriate grids, and the grid function un

mis regarded as an approx-

imation to the solution u(x, t)at the time nk, and at mh, where

kis the time step, his the grid spacing, and mand nare inte-

gers. Time difference operators appear as in Section 2.2. Spatial

DAFX-4

difference operators have analogous deﬁnitions, and hence

1un

m=un

m, ex+un

m=un

m+1, ex−un

m=un

m−1(36)

From these, it is possible to deﬁne the forward and backward spa-

tial differences, as

δx+=ex+−1

h, δx−=1−ex−

h(37)

Approximations to the second and fourth spatial differences are

constructed from the above, as

δxx =δx+δx−, δxxxx =δxxδxx (38)

The spatial grid is deﬁned for M:m∈ {0,1..., M }. Sets of

points lacking at least one end point will also be used: they are

M:m∈ {0..., M −1}, and M:m∈ {1..., M −1}. A dis-

crete version of (32), the inner product and associated norm, can

be realised using summation. Hence

hf, g iB,X

b∈B

h f n

bgn

b,kfk2

B,hu, uiB(39)

Finally, δ(x−xF)is approximated by a zeroth-order spreading

operator:

Im(xF) = 1/h, m =mF= round (xF/h)

0,otherwise (40)

3.1.1. Iterative Conservative Finite Difference Scheme

Following the derivation in [8], a conservative, iterative ﬁnite dif-

ference scheme is constructed as

ρδttun

m=Lun

m+δt+φn−1/2

m

δt·ηn

m

+Im(xF)Fn(41a)

Lun

m=T0δxxun

m−EI δxxxx un

m(41b)

ηn

m=bm−un

m(41c)

Numerical boundary conditions, a discrete version of (34), are

given as

un

m=δxxun

m= 0 m= 0, M (42)

The stability of the scheme can be inferred by energy analysis.

Under unforced conditions, taking an inner product of (41a) with

δt·un

mgives the following energy balance

δt+

Hn−1/2

k+Hn−1/2

p+Hn−1/2

c

| {z }

Hn−1/2

= 0 (43a)

Hn−1/2

k=ρkδt−unk2

M

2(43b)

Hn−1/2

p=T0δx+un, δx+un−1M

2+EI δxx un, δxxun−1M

2(43c)

Hn−1/2

c=D1, φn−1/2EM

(43d)

Because φis non-negative, the total conserved energy will be non-

negative under the standard stability condition for the stiff string,

i.e. for

h2≥T0k2+pT2

0k4+ 16EI ρk2

2ρ(44)

Under such condition, the bounds on the state read

0≤ kδt−unkM≤q2H1/2/ρ (45)

Scheme (41a) can be cast in the following form, resembling the

form for the lumped case of section 2.2.1

rm−sm+k2

ρ

φ(−rm+am)−φ(am)

rm

| {z }

G(rm)

= 0, m = 1, ..., M −1

where

sm,2un

m−2un−1

m+k2

ρLun

m+k2Im(xF)

ρFn

rm,un+1

m−un−1

m, am,bm−un−1

m

As this is an uncoupled system of nonlinear equations, the scheme

can be shown to have a unique solution, as per the lumped system

discussed in section 2.2.1. The solution to the system can be found

using iterative solvers, such as Newton-Raphson—see [8, 5, 13].

3.1.2. Non-Iterative Conservative Finite Difference Scheme

A novel, non-iterative ﬁnite difference scheme arises as a discreti-

sation of (29b). Hence

ρδttun

m=Lun

m+µt+ψn−1/2

mδt+ψn−1/2

m

δt·ηn

m

+Im(xF)Fn

(46)

where Lun

mand ηn

mare as per (41b) and (41c). The stability of

the scheme can be inferred by energy analysis. Under unforced

conditions, taking an inner product of (46) with δt·ungives the

same energy balance as (43a), where Hn−1/2

k,Hn−1/2

pare as per

(43b), (43c), and where

Hn−1/2

c=1

2kψn−1/2k2

M(47a)

Hence, the total energy is non-negative under a choice of the

grid spacing has per (44), in which case the same bounds as (45)

hold. As for the lumped case, described earlier in section 2.2.2,

an extra equation relating uand ψis needed. Again, one may

conveniently use

δt+ψn−1/2

m

δt·ηn

m

=ψ0η=ηn

m

=φ0

√2φη=ηn

m

,gn

m(48)

Making use of the following identity

µt+ψn−1/2

m=k

2δt+ψn−1/2

m+ψn−1/2

m(49)

one can cast (46) in the following update form

Amun+1

m=vm(50)

where

Am=ρ

k2+(gn

m)2

4

vm=2ρ

k2un

m−ρ

k2un−1

m+(gn

m)2

4un−1

m−gn

mψn−1/2

m+Lun

m

The whole system can be solved by a simple vector division.

Once un+1

mis known, one may update ψn+1/2

m, using (48).

DAFX-5

3.2. Non-Iterative Conservative Modal Scheme

A modal decomposition is readily available for the string described

by (29a). The solution u(x, t)is now expanded onto the eigen-

modes for simply-supported boundary conditions, in the following

way [17]

u(x, t) =

P

X

p=1

Xp(x)qp(t)(51)

The modal shapes and frequencies are given as

Xp(x) = sin pπx

L, ωp=sp2π2

L2T0

ρ+EI

ρ

p2π2

L2(52)

Here, for practical purposes, the number of modes has been trun-

cated to P(which is set by stability considerations, as per (61).)

Inserting (51) into (29b), and taking an inner product with Xp(x)

results in p= 1, .., P projected modal equations, of the form

¨qp+ω2

pqp+Xp(xF)

ρkXpk2F(t) + hψ g, XpiD

ρkXpk2= 0 (53)

where

g=∂tψ

∂tη, η =b−

P

X

p=1

Xp(x)qp(t)(54)

It is possible to deﬁne a modal energy conservation law, by insert-

ing the modal expansion above into (33b), and by using the fact

that kXpk2=L

2∀p. Hence

d

dt

ρL

2

P

X

p=1 ( ˙qp)2

2+(ωpqp)2

2+kψk2

D

2

| {z }

H(t)

= 0 (55)

From the above, it is possible to extract a bound on a single

mode p, as

0≤ |∂tqp| ≤ p4H0/ρL (56)

Discretisation of (53) and (54) follows as

δttqn

p+ω2

pqn

p+Xp(xF)

ρkXpk2Fn+D(µt+ψn−1/2)gn, XpED

ρkXpk2= 0

(57)

δt+ψn−1/2

δt·ηn=gn,ψ0η=ηn

(58)

Making use of identity (27), one may rewrite the ﬁrst equation

above as

δttqn

p+Qp+ω2

pqn

p+Xp(xF)

ρkXpk2Fn+Dψn−1/2gn, XpED

ρkXpk2= 0

(59)

where Qpis a coupling term, i.e.

Qp=k

2ρkXpk2(gn)2δt·ηn, XpD(60)

The modal coordinates qpcan then be solved using (59), which

is in the form of a non-sparse linear system with non-sparse ele-

ments given by Qp. Notice that the resulting non-sparse matrix is

in the form of a rank-one perturbation, resolvable very efﬁciently

using the Sherman-Morrison formula [18]. One can then update ψ

using (58). The stability of the scheme can once again be under-

stood in terms of its energy-preserving properties. For this scheme,

in fact, energy conservation reads

δt+

ρL

2

P

X

p=1 (δt−qn

p)2

2+ω2

pqn

pqn−1

p

2+kψn−1/2k2

D

2

| {z }

Hn−1/2

= 0

and hence, remembering (21), the largest eigenfrequency allowed

for this scheme is such that

ωP<2fs(61)

Notice that the contribution of a single mode pto the total energy

is non-negative. Hence, boundedness can be stated mode by mode,

as

0≤ |δt−qn

p| ≤ q4H1/2/ρL (62)

3.3. Numerical Examples and Discussion

The three schemes described in the previous sections are now com-

pared in cases of interest in musical acoustics. A ﬁrst experiment

takes into account the case of a point barrier, located at the centre

of the domain. Fig. 4 shows a few snapshots of the dynamics of the

string, before, during and after contact with the barrier. The three

schemes yield consistent solutions, although some differences are

also observed.

As for the lumped case of section 2.3, a closer look at the

energy components can be revealing. Fig. 5 shows the kinetic, po-

tential and collision energies of the three schemes over time. The

non-iterative schemes tend to transform the excess kinetic energy

during a collision into extra collision energy, so that bounds (45)

are indeed veriﬁed. This allows to keep the scheme stable, but it

also results in a deterioration of the kinetic and potential energy

components. This is particularly evident for the non-iterative ﬁ-

nite difference scheme, whereas the modal scheme is somewhat

better behaved: this may be a reﬂection of the modal bounded-

ness property (62). Notice, however, that the total energy of the

three schemes is conserved after the forcing vanishes, with the

three schemes having the same total energy overall, as expected.

Of course, one may increase the sample rate, and observe con-

vergence of the three schemes toward a unique solution, which

therefore can be identiﬁed as the solution to the original problem.

The energy components of Fig. 6 are much more consistent, and

the recorded outputs shown in Fig. 7 seem to have converged.

Certainly, the solution computed via the classic iterative scheme

is characterised by a faster convergence rate. In other words, for

the same sample rate, the classic iterative scheme yields a solution

closer to the converged solution than the non-iterative schemes.

On the other hand, the non-iterative solvers are extremely efﬁcient

in this case: the non-iterative ﬁnite difference scheme is fully ex-

plicit, a rarity in the realm of nonlinear problems. One may exploit

this feature in a number of ways, most noticeably using parallel in-

structions on CPUs and GPUs, alleviating the extra computational

burden coming from oversampling. Basic experiments in Matlab

show signiﬁcant speedups: for the experiment of Fig. 8, the new

non-iterative ﬁnite difference scheme with an oversampling factor

DAFX-6

Figure 4: Snapshots of a simulated string colliding against a point barrier. For all panels, the red line is the benchmark (iterative) scheme,

the blue line is the non-iterative ﬁnite difference method, and the green line is the modal non-iterative method. The point barrier has

K= 5 ·106,α= 1.4,b= 10−4m and is located at x= 0.5m. The string has L= 1m, ρ= 0.063kg/m, radius r= 5 ·10−4m,

T0= 500N, E= 2 ·1011 Pa. The string is set into motion by a raised cosine input force, with F0= 10N, and twid = 1ms. The sample

rate for this simulation is fs= 44100Hz.

Figure 5: Energy components for the simulations of Fig. 4, where

Hkstands is the kinetic energy, Hcis the collision energy, Hpis

the potential energy, and His total energy. Colour scheme as Fig.

4

Figure 6: Same as Fig. 5, but with fs= 5 ·44100Hz.

Figure 7: Recorded output at xo= 0.9L. (a): fs= 44100Hz, (b):

fs= 5 ·44100Hz. All other parameters as per Fig. 4

of 5 is faster than the iterative ﬁnite difference scheme at audio

rate (using a ﬁxed number of 20 iterations per collision). A more

consistent comparison, in C++, is drawn in the companion paper

[14], highlighting time gains of up to an order of magnitude. As-

sessing the efﬁciency of the modal non-iterative scheme requires

some care. For collisions, modal methods have been successfully

implemented in the past. In [12], a non-iterative modal scheme is

given, for α= 1. In [11], all values of αare allowed, and a spatial

grid is used along with an iterative procedure . The novel non-

iterative modal schemes presented here can be implemented efﬁ-

ciently, for all values of α, using the Sherman-Morrison formula

[18]. Whether or not the non-iterative modal scheme are “faster”

than the non-iterative ﬁnite difference schemes depends on a num-

ber of factors, such as number of modes, sample rate, and number

of barrier points. In general, for smaller sizes, the modes can be

extremely fast, but in the case of many barrier points, such as the

example of Fig. 8, the modal scheme requires the calculation of as

many reduced sums, and this has a signiﬁcant impact of the overall

efﬁciency. The relative efﬁciency of the schemes proposed will not

be discussed further here, but it certainly deserves a closer investi-

gation. As a concluding experiment, the three schemes are used to

solve the case of a string colliding against a fairly rigid bent dis-

tributed obstacle, as per Fig. 8. This is similar to what happens

in tanpuras, and other string instruments, although the simulation

parameters are here only meant for illustrative purposes. The three

schemes yield the consistent solutions after multiple collisions.

DAFX-7

Figure 8: Snapshots of a simulated string colliding against a dis-

tributed barrier. For all panels, the red line is the benchmark (it-

erative) scheme, the blue line is the non-iterative ﬁnite difference

methods, and the green line is the modal non-iterative method. The

barrier has K= 5·106,α= 1.4,b=−10−4−10−4x−10−3x2.

For the modal scheme, the barrier was created by placing point

obstacles at locations corresponding to the grid points of the ﬁnite

difference schemes. The string has L= 1m, ρ= 0.063kg/m,

r= 5 ·10−4m, T0= 500N, E= 2 ·1011Pa. The string is set into

motion by a raised cosine input force, with F0= 10N, and twid =

1ms. The sample rate for this simulation is fs= 5 ·44100Hz.

4. CONCLUSIONS

In this work, a novel family of schemes was presented for the so-

lution of collisions in musical acoustics. The case of collisions

represents but one of a very large class of nonlinear problems that

can be treated within the illustrated framework. The new schemes

are non-iterative, and they require at most the solution of a lin-

ear system. In particular, for the fully distributed case, a ﬁnite-

difference non-iterative scheme and a modal non-iterative scheme

have been given, with the former being completely explicit. Sta-

bility and convergence of the proposed methods have been demon-

strated formally, using energy arguments, and via numerical exper-

iments. The new schemes have a slower convergence rate than the

benchmark iterative schemes obtained via implicit methods, but

they are also much more efﬁcient. Basic experiments in Matlab

show that the non-iterative oversampled schemes can be faster than

the benchmark iterative schemes run at audio rate. Oversampling

was employed here as a corrective measure, but different strategies

could and should be investigated in future works.

5. ACKNOWLEDGMENTS

The ﬁrst author wishes to thank the Leverhulme Trust, who is sup-

porting his research with an Early Career Fellowship.

6. REFERENCES

[1] A. Falaize and T. Hélie, “Passive Guaranteed Simulation of Analog

Audio Circuits: A Port-Hamiltonian Approach,” Appl. Sci., vol. 6,

pp. 273 – 273, 2016.

[2] A. Falaize, Modélisation, simulation, génération de code et correc-

tion de systèmes multi-physiques audios: Approche par réseau de

composants et formulation Hamiltonienne À Ports, Ph.D. thesis, Uni-

versité Pierre et Marie Curie, Paris, July 2016.

[3] N. Lopes, T. Hélie, and A. Falaize, “Explicit second-order accurate

method for the passive guaranteed simulation of port-hamiltonian

systems,” in Proc. 5th IFAC 2015, Lyon, France, July 2015.

[4] X. Yang, “Linear and unconditionally energy stable schemes for

the binary ﬂuid-surfactant phase ﬁeld model,” Comp. Methods Appl.

Mech. Eng., vol. 318, pp. 1005–1029, 2017.

[5] M. Ducceschi and S. Bilbao, “Modelling collisions of nonlinear

strings against rigid barriers: Conservative ﬁnite difference schemes

with application to sound synthesis,” in Proc. Int. Conf. On Acoust.

(ICA 2016), Buenos Aires, Argentina, September 2016.

[6] M. Ducceschi, “A numerical scheme for various nonlinear forces,

including collisions, which does not require an interative root ﬁnder,”

in Proc. Int. Conf. On Dig. Audio Eff. (DAFx 2017), Edinburgh, UK,

September 2017.

[7] V. Chatziioannou, S. Schmutzhard, and S. Bilbao, “On iterative so-

lutions for numerical collision models,” in Proc. Int. Conf. On Dig.

Audio Eff. (DAFx 2017), Edinburgh, UK, September 2017.

[8] S. Bilbao, A. Torin, and V. Chatziioannou, “Numerical modeling of

collisions in musical instruments,” Acta Acust. United Ac., vol. 101,

pp. 155 – 173, 2015.

[9] V. Chatziioannou and M. van Walstijn, “Energy conserving schemes

for the simulation of musical instrument contact dynamics,” J. Sound

Vib., vol. 339, pp. 262 – 279, 2015.

[10] C. Issanchou, V. Acary, F. Pérignon, C. Touzé, and J-L. Le Carrou,

“Nonsmooth contact dynamics for the numerical simulation of colli-

sions in musical string instruments,” J. Acoust. Soc. Am., vol. 143,

no. 5, pp. 3195, 2018.

[11] C. Issanchou, J.-L. Le Carrou, C. Touzé, B. Fabre, and O. Doaré,

“String/frets contacts in the electric bass sound: Simulations and ex-

periments,” Appl. Acoust., vol. 129, pp. 217 – 228, 2018.

[12] M. van Walstijn, J. Bridges, and S. Mehes, “A real-time synthesis

oriented tanpura model,” in Proc. Int. Conf. On Dig. Audio Eff. (DAFx

2016), Brno, Czech Republic, September 2016.

[13] V. Chatziioannou and M. van Walstijn, “An energy conserving ﬁnite

difference scheme for simulation of collisions,” in Proc. SMAC/SMC

2013, Stockholm, Sweden, August 2013.

[14] S. Bilbao, M. Ducceschi, and C. Webb, “Large-scale real-time mod-

ular physical modeling sound synthesis,” in Proc. Int. Conf. On Dig.

Audio Eff. (DAFx 2019), Birmingham, UK, September 2019.

[15] K.H. Hunt and F.R.E. Crossley, “Coefﬁcient of restitution interpreted

as damping in vibroimpact,” J. Appl. Mech., vol. 42, no. 52, pp. 440–

445, 1975.

[16] S. Bilbao, Numerical Sound Synthesis: Finite Difference Schemes

and Simulation in Musical Acoustics, Wiley, Chichester, UK, 2009.

[17] M. Ducceschi and S. Bilbao, “Linear stiff string vibrations in musical

acoustics: Assessment and comparison of models,” J. Acoust. Soc.

Am., vol. 140, no. 4, pp. 2445–2454, 2016.

[18] J. Sherman and W. J. Morrison, “Adjustment of an inverse matrix

corresponding to a change in one element of a given matrix,” Ann.

Math. Stat., vol. 21, pp. 124–127, 1950.

DAFX-8