CSC 83060: Speech & Audio Understanding Lecture 3: Acoustics Michael Mandel mim@sci.brooklyn.cuny.edu CUNY Graduate Center, Computer Science Program http://mr-pc.org/t/csc83060 With much content from Dan Ellis EE 6820 course 1 The wave equation 2 Acoustic tubes: reflections & resonance 3 Oscillations & musical acoustics 4 Spherical waves & room acoustics Michael Mandel (83060 SAU) Acoustics 1 / 38
Outline 1 The wave equation 2 Acoustic tubes: reflections & resonance 3 Oscillations & musical acoustics 4 Spherical waves & room acoustics Michael Mandel (83060 SAU) Acoustics 2 / 38
Acoustics & sound Acoustics is the study of physical waves (Acoustic) waves transmit energy without permanently displacing matter (e.g. ocean waves) Same math recurs in many domains Intuition: pulse going down a rope Michael Mandel (83060 SAU) Acoustics 3 / 38
The wave equation Consider a small section of the rope y S x ε φ 2 φ 1 S Displacement y(x), tension S, mass ɛ dx Lateral force is F y = S sin(φ 2 ) S sin(φ 1 ) S 2 y x 2 dx Michael Mandel (83060 SAU) Acoustics 4 / 38
Wave equation (2) Newton s law: F = ma S 2 y x 2 dx = ɛ dx 2 y t 2 Call c 2 = S/ɛ (tension to mass-per-length) hence, the Wave Equation: c 2 2 y x 2 = 2 y t 2... partial DE relating curvature and acceleration Michael Mandel (83060 SAU) Acoustics 5 / 38
Solution to the wave equation If y(x, t) = f (x ct) (any f ( )) then y x = f (x ct) 2 y x 2 = f (x ct) also works for y(x, t) = f (x + ct) Hence, general solution: y t = cf (x ct) 2 y t 2 = c2 f (x ct) c 2 2 y x 2 = 2 y t 2 y(x, t) = y + (x ct) + y (x + ct) Michael Mandel (83060 SAU) Acoustics 6 / 38
Solution to the wave equation (2) y + (x ct) and y (x + ct) are traveling waves shape stays constant but changes position time 0: y y + y - time T: x = c T x y + y - x c is traveling wave velocity ( x/ t) y + moves right, y moves left resultant y(x) is sum of the two waves Michael Mandel (83060 SAU) Acoustics 7 / 38
Wave equation solutions (3) What is the form of y +, y? any doubly-differentiable function will satisfy wave equation Actual waveshapes dictated by boundary conditions e.g. y(x) at t = 0 plus constraints on y at particular xs e.g. input motion y(0, t) = m(t) rigid termination y(l, t) = 0 y y(0,t) = m(t) x y + (x,t) y(l,t) = 0 Michael Mandel (83060 SAU) Acoustics 8 / 38
Terminations and reflections System constraints: initial y(x, 0) = 0 (flat rope) input y(0, t) = m(t) (at agent s hand) ( y + ) termination y(l, t) = 0 (fixed end) wave equation y(x, t) = y + (x ct) + y (x + ct) At termination: y(l, t) = 0 y + (L ct) = y (L + ct) i.e. y + and y are mirrored in time and amplitude around x = L inverted reflection at termination y + y(x,t) = y + + y [simulation travel1.m] x = L y Michael Mandel (83060 SAU) Acoustics 9 / 38
Outline 1 The wave equation 2 Acoustic tubes: reflections & resonance 3 Oscillations & musical acoustics 4 Spherical waves & room acoustics Michael Mandel (83060 SAU) Acoustics 10 / 38
Acoustic tubes Sound waves travel down acoustic tubes: pressure x 1-dimensional; very similar to strings Common situation: wind instrument bores ear canal vocal tract Michael Mandel (83060 SAU) Acoustics 11 / 38
Pressure and velocity Consider air particle displacement ξ(x, t) ξ(x) x Particle velocity v(x, t) = ξ t hence volume velocity u(x, t) = Av(x, t) (Relative) air pressure p(x, t) = 1 κ ξ x Michael Mandel (83060 SAU) Acoustics 12 / 38
Wave equation for a tube Consider elemental volume Area da Force p da x Volume da dx Mass ρ da dx Force (p+ p / x dx) da Newton s law: F = ma p v dx da = ρ da dx x t p x = ρ v t c 2 2 ξ x 2 = 2 ξ t 2 c = 1 ρκ Michael Mandel (83060 SAU) Acoustics 13 / 38
Acoustic tube traveling waves Traveling waves in particle displacement: ξ(x, t) = ξ + (x ct) + ξ (x + ct) Call u + (α) = ca α ξ+ (α), Z 0 = ρc A Then volume velocity: And pressure: u(x, t) = A ξ t = u+ (x ct) u (x + ct) p(x, t) = 1 ξ κ x = Z [ 0 u + (x ct) + u (x + ct) ] (Scaled) sum and difference of traveling waves Michael Mandel (83060 SAU) Acoustics 14 / 38
Acoustic traveling waves (2) Different resultants for pressure and volume velocity: c c x Acoustic tube u + u - u(x,t) = u + - u - p(x,t) = Z 0 [u + + u - ] Volume velocity Pressure Michael Mandel (83060 SAU) Acoustics 15 / 38
Terminations in tubes Equivalent of fixed point for tubes? Solid wall forces u(x,t) = 0 hence u + = u - u 0 (t) (Volume velocity input) Open end forces p(x,t) = 0 hence u + = -u - Open end is like fixed point for rope: reflects wave back inverted Unlike fixed point, solid wall reflects traveling wave without inversion Michael Mandel (83060 SAU) Acoustics 16 / 38
Standing waves Consider (complex) sinusoidal input u 0 (t) = U 0 e jωt Pressure/volume must have form Ke j(ωt+φ) Hence traveling waves: u + (x ct) = A e j( kx+ωt+φ A) u (x + ct) = B e j(kx+ωt+φ B) where k = ω/c (spatial frequency, rad/m) (wavelength λ = c/f = 2πc/ω) Pressure and volume velocity resultants show stationary pattern: standing waves even when A B [simulation sintwavemov.m] Michael Mandel (83060 SAU) Acoustics 17 / 38
Standing waves (2) U 0 e jωt kx = π x = λ / 2 pressure = 0 (node) vol.veloc. = max (antinode) For lossless termination ( u + = u ), have true nodes and antinodes Pressure and volume velocity are phase shifted in space and in time Michael Mandel (83060 SAU) Acoustics 18 / 38
Transfer function Consider tube excited by u 0 (t) = U 0 e jωt sinusoidal traveling waves must satisfy termination boundary conditions satisfied by complex constants A and B in u(x, t) = u + (x ct) + u (x + ct) = Ae j( kx+ωt) + Be j(kx+ωt) = e jωt (Ae jkx + Be jkx ) standing wave pattern will scale with input magnitude point of excitation makes a big difference... Michael Mandel (83060 SAU) Acoustics 19 / 38
Transfer function (2) For open-ended tube of length L excited at x = 0 by U 0 e jωt jωt cos k(l x) u(x, t) = U 0 e cos kl k = ω c (matches at x = 0, maximum at x = L) i.e. standing wave pattern e.g. varying L for a given ω (and hence k): U 0 e jωt U 0 U L U 0 e jωt U 0 U L magnitude of U L depends on L (and ω) Michael Mandel (83060 SAU) Acoustics 20 / 38
Transfer function (3) Varying ω for a given L, i.e. at x = L U L u(l, t) = U 0 u(0, t) = 1 cos kl = 1 cos(ωl/c) u(l) u(0) L u(l) at ωl/c = (2r+1)π/2, r = 0,1,2... u(0) Output volume velocity always larger than input Unbounded for L = (2r + 1) πc 2ω = (2r + 1) λ 4 i.e. resonance (amplitude grows without bound) Michael Mandel (83060 SAU) Acoustics 21 / 38
Resonant modes For lossless tube with L = m λ 4, m odd, λ wavelength u(l) is unbounded, meaning: u(0) transfer function has pole on frequency axis energy at that frequency sustains indefinitely L = 3 λ 1/ 4 ω 1 = 3ω 0 compare to time domain... e.g. 17.5 cm vocal tract, c = 350 m/s ω 0 = 2π 500 Hz (then 1500, 2500,... ) L = λ 0/ 4 Michael Mandel (83060 SAU) Acoustics 22 / 38
Scattering junctions u + k u - k Area A k Area A k+1 u + k+1 u - k+1 At abrupt change in area: pressure must be continuous p k (x, t) = p k+1 (x, t) vol. veloc. must be continuous u k (x, t) = u k+1 (x, t) traveling waves u + k, u- k, u+ k+1, u- k+1 will be different Solve e.g. for u k and u+ k+1 : (generalized term) u + k u - k 1 - r 1 + r + 2r 1 + r 2 r + 1 + r - 1 r + 1 u + k+1 u - k+1 r = A k+1 A k Area ratio Michael Mandel (83060 SAU) Acoustics 23 / 38
Concatenated tube model Vocal tract acts as a waveguide Lips x = L Lips u L (t) Glottis u 0 (t) x = 0 Glottis Discrete approximation as varying-diameter tube A k, L k x A k+1, L k+1 Michael Mandel (83060 SAU) Acoustics 24 / 38
Concatenated tube resonances Concatenated tubes scattering junctions lattice filter u + k + e -jωτ 1 + e -jωτ 2 + u - k + e -jωτ 1 + e -jωτ 2 + + + + + e -jω2τ 1 + e -jω2τ 2 + Can solve for transfer function all-pole 1 5 0-1 -0.5 0 0.5 1 Approximate vowel synthesis from resonances [sound example: ah ee oo] Michael Mandel (83060 SAU) Acoustics 25 / 38
Outline 1 The wave equation 2 Acoustic tubes: reflections & resonance 3 Oscillations & musical acoustics 4 Spherical waves & room acoustics Michael Mandel (83060 SAU) Acoustics 26 / 38
Oscillations & musical acoustics Pitch (periodicity) is essence of music why? why music? Different kinds of oscillators simple harmonic motion (tuning fork) relaxation oscillator (voice) string traveling wave (plucked/struck/bowed) air column (nonlinear energy element) Michael Mandel (83060 SAU) Acoustics 27 / 38
Simple harmonic motion Basic mechanical oscillation ẍ = ω 2 x x = A cos(ωt + φ) Spring + mass (+ damper) F = kx m ζ x e.g. tuning fork Not great for music fundamental (cos ωt) only relatively low energy ω 2 = k m Michael Mandel (83060 SAU) Acoustics 28 / 38
Relaxation oscillator Multi-state process one state builds up potential (e.g. pressure) switch to second (release) state revert to first state, etc. e.g. vocal folds: p u http://www.medicine.uiowa.edu/otolaryngology/cases/normal/norma2.htm Oscillation period depends on force (tension) easy to change hard to keep stable less used in music Michael Mandel (83060 SAU) Acoustics 29 / 38
Ringing string e.g. our original rope example tension S mass/length ε Many musical instruments guitar (plucked) piano (struck) violin (bowed) Control period (pitch): change length (fretting) change tension (tuning piano) change mass (piano strings) Influence of excitation... [pluck1a.m] L ω 2 = π2 S L 2 ε Michael Mandel (83060 SAU) Acoustics 30 / 38
Wind tube Resonant tube + energy input energy nonlinear element ω = acoustic waveguide π c 2 L e.g. clarinet lip pressure keeps reed closed reflected pressure wave opens reed reinforced pressure wave passes through finger holds determine first reflection effective waveguide length scattering junction (tonehole) (quarter wavelength) Michael Mandel (83060 SAU) Acoustics 31 / 38
Outline 1 The wave equation 2 Acoustic tubes: reflections & resonance 3 Oscillations & musical acoustics 4 Spherical waves & room acoustics Michael Mandel (83060 SAU) Acoustics 32 / 38
Room acoustics Sound in free air expands spherically: Spherical wave equation: radius r 2 p r 2 + 2 p r r = 1 2 p c 2 t 2 solved by p(r, t) = P 0 r e j(ωt kr) Energy p 2 falls as 1 r 2 Michael Mandel (83060 SAU) Acoustics 33 / 38
Effect of rooms (1): Images Ideal reflections are like multiple sources: virtual (image) sources reflected path source listener Early echoes in room impulse response: h room (t) direct path early echos t actual reflections may be h r (t), not δ(t) Michael Mandel (83060 SAU) Acoustics 34 / 38
Effect of rooms (2): Modes Regularly-spaced echoes behave like acoustic tubes Real rooms have lots of modes! dense, sustained echoes in impulse response complex pattern of peaks in frequency response Michael Mandel (83060 SAU) Acoustics 35 / 38
Reverberation Exponential decay of reflections: h room (t) ~e -t /T Frequency-dependent greater absorption at high frequencies faster decay Size-dependent larger rooms longer delays slower decay Sabine s equation: RT 60 = 0.049V Sᾱ Time constant varies with size, absorption t Michael Mandel (83060 SAU) Acoustics 36 / 38
Summary Traveling waves Acoustic tubes & resonances Musical acoustics & periodicity Room acoustics & reverberation Parting thought Musical bottles Michael Mandel (83060 SAU) Acoustics 37 / 38
References Michael Mandel (83060 SAU) Acoustics 38 / 38