• Aucun résultat trouvé

Partial differential operators and PDEs

Dans le document Numerical Sound Synthesis (Page 103-108)

Grid functions and finite difference operators in 1D

5.1 Partial differential operators and PDEs

Some elements of musical instruments, and in particular strings, bars, and tubes, are well modeled by PDEs in time t and one spatial dimension x; such systems are often referred to as “1D.”

Various quantities, such as displacement, velocity, and pressure, are thus described by functions of two variables, such asu(x, t ). As in the case of lumped systems such as the harmonic oscillator (see Chapter 3), time t is usually defined for t≥0, though one may extend this definition to

N ume ric al Sound Sy nthe sis: Finite Diffe re nc e Sc he m e s and Simulation in M usic al Ac oustic s Stefan Bilbao

© 2009 John Wiley & Sons, Ltd. ISBN: 978-0-470-51046-9

94 GRID FUNCTIONS AND FINITE DIFFERENCE OPERATORS IN 1D

t∈[−∞,∞], for purposes of steady state (Laplace transform) analysis. One also normally takes xD, where Drepresents some subset of the real line. There are essentially three domains D of interest in problems defined in 1D: the infinite domainD=R=[−∞,∞], the semi-infinite domainD=R+=[0,∞], and the unit intervalD=U=[0,1]. The first two domains are of use in an analysis setting; in 1D problems in musical acoustics,D=Uis always chosen. It is worth noting that scaling techniques, employed whenever possible in this book (see Section 6.1.2 for a first example of this in the case of the 1D wave equation), render the use of other finite intervals unnecessary.

PDEs are equations relating partial temporal and spatial derivatives of one or more functions.

In operator form, such derivatives are written as

∂t, 2

∂t2,

∂x, 2

∂x2, etc.

When applied to a function such asu(x, t ), the abbreviated subscript notation will be frequently employed, i.e.,

∂u

∂t =ut, 2u

∂t2 =ut t, ∂u

∂x =ux, 2u

∂x2 =uxx, etc.

For total time derivatives of a quantity without spatial dependence, such as those that occur in energy analysis or a lumped setting, the symbold/dt is uniformly employed.

A PDE in a single variableu(x, t ), under zero-input conditions, may be simply written as P

∂t, 2

∂t2,

∂x, 2

∂x2, . . .

u=0 (5.1)

where P is a partial differential operator which is a complete description of the behavior of the system at a given point —many of the systems under consideration in musical acoustics, both linear and nonlinear, may be written in this form. The notation above is somewhat loose; not indicated is the possibility of coefficients in the PDE which may depend onx, which may indeed occur in describing systems with a degree of variation in material parameters. Coefficients which depend ont(rendering the system time varying) are possible as well, but occur rarely in musical acoustics.

For the systems of interest here, time derivatives of order greater than two occur infrequently, and for many (but not all), spatial derivatives are of even order, reflecting independence of the problem to direction. In some cases, a set of one or more coupled equations of the form (5.1) in several independent variables is necessary in describing a system; nonlinear systems such as strings and plates under high amplitude vibration conditions are two such examples —see Chapters 8 and 13.

A description such as (5.1) is not complete until initial and boundary conditions have been supplied.

Appropriate settings for such conditions will be dealt with on an as-needed basis, and the first description will occur with reference to the 1D wave equation, in the following chapter.

5.1.1 Classification of PDEs

In an abstract setting, there are established ways of classifying PDEs [146], which are useful in coming to conclusions about the form of the solution. One often speaks of a PDE as being time dependent or not, or of being hyperbolic, parabolic, or elliptic, or of being semi-linear versus quasi-linear. In the more specialized setting of musical acoustics, it is better to abandon this abstract view, and focus on the special types of systems (always time dependent and usually hyperbolic) which frequently occur: linear and shift-invariant (LSI) systems, linear and time-invariant (LTI) systems, more generally linear systems, and nonlinear systems. (In fact, nearly all systems in musical acoustics behave nonlinearly when coupled to an excitation mechanism— here, however, words such as “linear” etc. refer to the distributed resonator in isolation.)

As an example, consider the following equation:

ut t =γ2uxx

whereu(x, t )is the dependent variable to be solved for. Ifγ is a constant, this PDE is known as the 1D wave equation, and is LSI— the medium it describes behaves uniformly at all points in the domain and at all time instants. Ifγ depends onx, the system is still LTI, but not invariant with respect to the spatial variable, and not LSI. Its properties are different from one spatial location to another. Ifγ depends onxandt, it is simply linear. Finally, ifγ depends onuitself, the equation is referred to as nonlinear. This classification follows through to any derived numerical simulation method. See Figure 5.1.

The analysis and numerical method construction techniques which are available are governed by the type of system under consideration. LSI systems, which form the majority of those under study in musical acoustics and employed until recently in physical modeling sound synthesis, are undeniably the easiest to deal with —the full scope of frequency domain and transform techniques is available, and as a result it is possible to obtain a very comprehensive picture of the resulting dynamics including information about wave propagation speeds and modes, as well as many features of associated numerical methods, such as stability conditions and dispersion. Such systems and the accompanying analysis machinery, as they occur in musical acoustics, will be examined in Chapters 6, 7, 11, and 12. Systems which are LTI but not LSI still allow a limited analysis:

one may still speak of modes and frequencies, but one loses the convenient notion of a global wave velocity, and the most powerful analysis tools (von Neumann) for numerical simulation methods are no longer available. Some such systems will be seen in Section 7.10 and in Chapter 9.

In the linear time-varying and nonlinear cases, the notion of frequency itself becomes unwieldy, though if the nonlinearity or time variation is weak, one may draw some (generally qualitative) conclusions through linearization, or, with much additional effort, through perturbation methods [252]. See Chapters 8 and 13. In all cases, however, it is possible and usually quite easy to arrive at a numerical simulation routine for synthesis, but, depending on the type of the original system, it will be more or less difficult to say or predict anything about the way in which it behaves.

One attribute of a system which persists in being clearly defined for any of the types of systems mentioned above is its energy. PDEs which occur in musical acoustics are not abstract concoctions —they correspond to real physical systems, and real physical systems always obey laws of conservation or dissipation of energy.

NONLINEAR LINEAR

LTI LSI

Figure 5.1 Classification of PDEs of interest in musical acoustics.

96 GRID FUNCTIONS AND FINITE DIFFERENCE OPERATORS IN 1D

5.1.2 Laplace and Fourier transforms

As in the lumped case, the Laplace transform of a function such asu(x, t )may be defined as ˆ

u(x, s)=

−∞u(x, t )e−stdt (5.2)

where s=j ω+σ is again the complex-valued frequency variable. See Section 2.3. As before, the definition is two sided, allowing one to ignore initial conditions. One may also define a spatial Fourier transform as

˜ u(β, t )=

−∞

u(x, t )e−jβxdx (5.3)

where, here, β may be viewed as a real wavenumber; in general, spatial Fourier transforms are only used for problems defined over D=R, though Fourier series approximations for systems defined over a finite interval play a fundamental role in so-called modal synthesis methods —see, e.g., Section 6.1.11.

The actions of partial derivative operators applied to a functionu(x, t )transform according to

mu

∂tm

L smuˆ lu

∂xl

F (jβ)lu˜

where L or F accompanied by an arrow indicates a Laplace or Fourier transform, respec-tively.

Just as in the lumped case, as an alternative to full Laplace/Fourier analysis, it is often simpler to consider the effect of differential operators on a test function of the form

u(x, t )=est+jβx (5.4)

which behaves as a single wavelike component, of temporal frequency s and wavenumber β.

The use of this special function is often referred to in the literature as an ansatz [161]. See Section 2.3.

Dispersion relations

If the PDE under consideration is LSI, then both Laplace and Fourier transforms may be applied in order to arrive at a convenient algebraic description of the PDE in the frequency domain:

P u=0 ⇒L,F P˜ˆu˜ˆ=0

where ˜ˆP=P (s, jβ), a multinomial in˜ˆ s and jβ, is often referred to as the symbol of the PDE defined by (5.1). Because ˜ˆPu˜ˆis now a product of two functions ofsandjβ, it is easy to see that non-trivial solutions can only occur when

P (s, jβ)˜ˆ =0

This characteristic equation defines various relations between temporal frequency s and spatial frequency β. These will be of the formsp=sp(jβ), forp=1, . . . , M, whereMis the order of the highest temporal derivative appearing inP or the highest power ofs in ˜ˆP (s, jβ). (For most systems of interest in this book, M=2, and the two solutions will be denoted by s±.) These solutions are known as dispersion relations, and allow the extraction of information regarding propagation speeds.

Phase and group velocity

In lossless problems, it is typical to arrive at solutionssp(jβ)=j ωp(jβ)which are purely imag-inary, so that one may write the dispersion relations as ωp=ωp(β)for real frequencies ωp. In this special case, for any suchω(β), the phase velocityvφ and group velocityvg are defined as

vφ=ω

β vg=

(5.5)

For a problem of orderMin the time variable, there will beMdispersion relations. For second-order systems, these usually occur as a pair of opposite sign, representing wave propagation to the left and right. In this book, the positive solutions will be taken as the phase and group velocity. These velocities may be expressed most directly as functions of wavenumber, but more usefully perhaps as functions of frequencyω(or what is more directly comprehensible in musical acoustics, frequencyf =ω/2π) through the substitution of the dispersion relation itself; this is usually possible in 1D, but in higher dimensions only for problems which are isotropic. See Section 10.1.4.

For a given system, the phase velocity describes the speed of propagation of a single component of the solution, and the group velocity the gross speed of disturbances. For hyperbolic systems, such as the wave equation, it must be true that the group velocity is bounded from above (i.e., there is a maximum speed at which disturbances may propagate), though this is not necessarily true of the phase velocity —the case of Timoshenko beam theory is an interesting example of this [156].

See Problem 7.1. Most systems that will be examined in this book will be of hyperbolic type, with the exception of thin beams and plates, which do in fact allow infinite group velocities. Such anomalous behavior is a result of simplifying assumptions, and disappears when more accurate models are employed. If a system exhibits a small degree of loss —this is the majority of systems in musical acoustics —then one may loosely extend this idea of phase velocity by replacingωin the definitions above by the imaginary part ofs.

These concepts carry over to derived numerical methods in a natural way —finite difference schemes, at least for LSI systems, also possess phase and group velocities. Both are of use in coming to conclusions, in the musical sound synthesis context, about undesirable numerical inharmonicity, as well as stability [362].

5.1.3 Inner products and energetic manipulations

Energy analysis of PDE systems and boundary conditions is based, usually, around the definition of various types of spatial inner products [210]. An obvious choice in the continuous case is the L2inner product. In 1D, it, along with the accompanying norm, is defined as

f, gD=

D

f gdx f D=

f, gD (5.6)

for functionsf (x)andg(x)defined over the intervalxD. For time-dependent problems such as those encountered in this book, such an inner product when applied to two functionsf (x, t ) andg(x, t )will itself be a function of time alone, i.e.,f, g = f, g(t ).

Identities and inequalities

The following inequalities hold with regard to the above definition of the inner product and norm:

|f, gD| ≤ f D g D Cauchy – Schwartz inequality (5.7a)

f +g Df D+ g D triangle inequality (5.7b)

98 GRID FUNCTIONS AND FINITE DIFFERENCE OPERATORS IN 1D For any three functionsf,g, andr, it is also true that

f, grD= f g, rD

If the left and right endpoints of a given domainDaredandd+, then the familiar integration by parts rule may be written, in inner product notation, as

f, gxD= −fx, gD+f g|dd+ (5.8) and thus boundary terms appear. The identity (5.8) may be extended to second derivatives as

f, gxxD= fxx, gD+(f gxfxg)|dd+ (5.9) If d= −∞ord+= ∞, then the functionsf and g are assumed to vanish when evaluated at such points. Thus, when D=R, for example, one has simply

f, gxR= −fx, gR f, gxxR= fxx, gR (5.10) The total time derivative of an inner product is assumed to distribute to the constituent func-tions, i.e.,

d

dtf, gD= ft, gD+ f, gtD

Notice the use of the symbold/dt here to represent the total time derivative of a quantity without spatial dependence.

Vector form

In some cases, it may be necessary to make use of a vector form of the inner product: that is, for column vectorsf=[f(1), . . . , f(M)]T andg=[g(1), . . . , g(M)]T,

f,gD=

DfTgdx

An application is to the analysis of non-planar string vibration —see Section 8.3.1. The above identities and inequalities generalize directly to the vector case in an obvious way.

Dans le document Numerical Sound Synthesis (Page 103-108)