EE E6820: Speech & Audio Processing & Recognition Lecture 2: Acoustics 1 The wave equation 2 Acoustic tubes: reflections & resonance 3 Oscillations & musical acoustics 4 Spherical waves & room acoustics Dan Ellis <dpwe@ee.columbia.edu> http://www.ee.columbia.edu/~dpwe/e6820/ Columbia University Dept. of Electrical Engineering Spring 2006 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-1
1 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 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-2
The wave equation Consider a small section of the rope: y x ε φ 1 S displacement y(x), tension S, mass ε dx lateral force is F y = S sin( φ 2 ) S sin( φ 1 ) S 2 y dx x 2... E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-3 φ 2 S
Wave equation (2) Newton s law: F = ma S 2 y dx = ε d x x 2 2 y t 2 c 2 = S Ú ε Call (tension to mass-per-length) hence: the Wave Equation: 2 c 2 y x 2 = 2 y t 2.. partial DE relating curvature and acceleration E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-4
Solution to the wave equation y ( x, t ) = f ( x ct ) If (any f( )) then y x 2 y x 2 = = f ' ( x ct) f '' ( x ct) y t 2 y t 2 = = c f ' ( x ct) c 2 f '' ( x ct) also works for yxt (, ) = f( x + ct) Hence, general solution: 2 c 2 y x 2 = 2 y t 2 yxt (, ) = y + ( x ct) + y ( x + ct) E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-5
Solution to the wave equation (2) y + ( x ct) y ( x + ct) and are travelling waves - shape stays constant but changes position: y time 0: y + y - x x = c T time T: y + y - c is travelling wave velocity ( x / t ) x y + moves right, y moves left resultant y(x) is sum of the two waves E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-6
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 x s 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 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-7
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 x = L y simulation [travel1.m] E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-8
2 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 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-9
Pressure and velocity ξ ( x, t) Consider air particle displacement : ξ(x) x Particle velocity v ( x, t) hence volume velocity = ξ t u ( x, t) = A v ( x, t) (Relative) air pressure p ( x, t) = 1 -- κ ξ x E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-10
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 dx da = ρdadx x v t p v = ρ x t Hence 2 c 2 ξ x 2 2 = ξ c t 2 = 1 ---------- ρκ E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-11
Acoustic tube traveling waves Traveling waves in particle displacement: ξ ( x, t) = ξ + ( x ct) + ξ - ( x + ct) Call u + + ( α ) = ca ξ ( α ) α ρc Z 0 = ----- A Then volume velocity: ξ u ( x, t) = A = u + ( x ct) u - ( x + ct) t And pressure: p ( x, t) 1 -- κ = = ξ Z x 0 [ u + ( x ct) + u - ( x + ct) ] (Scaled) sum & diff. of traveling waves E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-12
Acoustic tube traveling waves (2) Different resultants for pressure and volume velocity: c c x Acoustic tube u + u - u(x,t) = u + - u - Volume velocity p(x,t) = Z 0 [u + + u - ] Pressure E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-13
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 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-14
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 ( ) = Ae j kx u - x + ct ( + ωt + φ A ) ( ) Be jkx ωt φ B = k = ω Ú c λ c f ( + + ) where (spatial frequency, rad/m) (wavelength ) Ú 2πc ω Ú = = Pressure, vol. veloc. resultants show stationary pattern: standing waves - even when A B simulation [sintwavemov.m] E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-15
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 & antinodes Pressure and vol. veloc. are phase shifted - in space and in time E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-16
Transfer function u 0 () t = U 0 e jωt Consider tube excited by : - sinusoidal traveling waves must satisfy termination boundary conditions - satisfied by complex constants A and B in uxt (, ) = u + ( x ct) + u - ( x + ct) = = Ae j( kx + ωt ) + Be e jωt ( Ae jkx + Be jkx ) jkx ( + ωt ) - standing wave pattern will scale with input magnitude - point of excitation makes a big difference... E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-17
Transfer function (2) For open-ended tube of length L excited at x = 0 U 0 e jωt by : uxt (, ) U 0 e jωt kl ( x ) ---------------------------- cos cos kl = k (matches at x = 0, maximum at x = L) ω = --- c 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 ω)... E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-18
Transfer function (3) Varying ω for a given L, i.e. at x = L : U L ------ U 0 u(l) u(0) ult (, ) --------------- u ( 0, t ) 1 -------------- coskl = = = 1 --------------------------- cos( ωl Ú c) L u(l) at ωl/c = (2r+1)π/2, r = 0,1,2... u(0) Output vol. veloc. always larger than input Unbounded for L = ( 2r + 1 )------ πc = ( 2r + 1 ) λ 2ω -- 4 i.e. resonance (amplitude grows w/o bound) E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-19
Resonant modes For lossless tube with L = m λ --, m odd, λ wavelength, 4 ul ( ) ---------- u ( 0 ) is unbounded, meaning: - transfer function has pole on frequency axis - energy at that frequency sustains indefinitely L = 3 λ 1/ 4 ω 1 = 3ω 0 - compare to time domain... L = λ 0/ 4 e.g 17.5 cm vocal tract, c = 350 m/s ω 0 = 2π 500 Hz (then 1500, 2500...) E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-20
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 u + k u - k Solve e.g. for u - k and u+ k+1 1 - r 1 + r + 2r 1 + r 2 r + 1 + r - 1 r + 1 u + k+1 u - k+1 : (generalized term.) r = A k+1 A k Area ratio E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-21
Concatenated tube model Vocal tract acts as a waveguide Lips x = L Lips u L (t) Glottis u 0 (t) x = 0 Glottis Discrete approx. as varying-diameter tube: A k, L k x A k+1, L k+1 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-22
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 0.5 0-0.5-1 -1-0.5 0 0.5 1 Approximate vowel synthesis from resonances sound example: ah ee oo E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-23 + + + Imaginary part
3 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) E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-24
Simple harmonic motion Basic mechanical oscillation: ẋ = ω 2 x x = Acos( ωt + ϕ ) Spring + mass ( + damper) F = kx m ζ ω 2 = k m x e.g. tuning fork Not great for music: - fundamental (cosωt) only - relatively low energy E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-25
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/normal2.htm ) Oscillation period depends on force (tension) - easy to change - hard to keep stable less used in music E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-26
Ringing string e.g. our original rope example tension S mass/length ε L ω 2 = π2 S L 2 ε 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] E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-27
Wind tube energy Resonant tube + energy input nonlinear element acoustic waveguide scattering junction (tonehole) ω = π c 2 L (quarter wavelength) e.g. clarinet - lip pressure keeps reed closed - reflected pressure wave opens reed - reinforced pressure wave passes through Finger holes determine first reflection effective waveguide length E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-28
4 Room acoustics Sound in free air expands spherically: radius r Spherical wave equation: 2 2 p 2 r 2 + -- r p r = 1 ---- c 2 p t 2 solved by prt (, ) = P 0 ----- e r j ( ωt kr ) p 2 Intensity falls as 1 ---- r 2 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-29
Effect of rooms (1): Images Ideal reflections are like multiple sources: virtual (image) sources reflected path source listener Early echoes in room impulse response: direct path early echos hroom(t) t - actual reflections may be h r (t), not δ(t) E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-30
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 E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-31
Reverberation Exponential decay of reflections: hroom(t) ~e -t /T t Frequency-dependent - greater absorption at high frequencies faster decay Size-dependent - larger rooms longer delays slower decay Sabine s equation: 0.049V RT 60 = ----------------- Sα Time constant varies with size, absorption E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-32
Summary Travelling waves Acoustic tubes & resonance Musical acoustics & periodicity Room acoustics & reverberation Parting Thought: Musical bottles E6820 SAPR - Dan Ellis L02 - Acoustics - 2006-01-26-33