Ideal Vibrating String



Similar documents
Acoustics. Lecture 2: EE E6820: Speech & Audio Processing & Recognition. Spherical waves & room acoustics. Oscillations & musical acoustics

Lecture 2: Acoustics

2.6 The driven oscillator

Understanding Poles and Zeros

v = λ f this is the Golden Rule for waves transverse & longitudinal waves Harmonic waves The golden rule for waves Example: wave on a string Review

Copyright 2011 Casa Software Ltd.

Dispersion diagrams of a water-loaded cylindrical shell obtained from the structural and acoustic responses of the sensor array along the shell

The Physics of Guitar Strings

Standing Waves on a String

Chapter 15, example problems:

Vibrations of a Free-Free Beam

Mathematical Harmonies Mark Petersen

CAMI Education linked to CAPS: Mathematics

UNIVERSITY OF CALIFORNIA, SAN DIEGO Electrical & Computer Engineering Department ECE Fall 2010 Linear Systems Fundamentals

Waves and Sound. AP Physics B

Unit - 6 Vibrations of Two Degree of Freedom Systems

The Physics of Music - Physics 15 University of California, Irvine. Instructor: David Kirkby dkirkby@uci.edu. Lecture 14.

Applications of Second-Order Differential Equations

3.1 State Space Models

Section 5.0 : Horn Physics. By Martin J. King, 6/29/08 Copyright 2008 by Martin J. King. All Rights Reserved.

APPLIED MATHEMATICS ADVANCED LEVEL

F en = mω 0 2 x. We should regard this as a model of the response of an atom, rather than a classical model of the atom itself.

16.2 Periodic Waves Example:

Math Practice exam 2 - solutions

physics 1/12/2016 Chapter 20 Lecture Chapter 20 Traveling Waves

Lesson 11. Luis Anchordoqui. Physics 168. Tuesday, December 8, 15

Sensor Performance Metrics

Prelab Exercises: Hooke's Law and the Behavior of Springs

Overview. also give you an idea of ANSYS capabilities. In this chapter, we will define Finite Element Analysis and. Topics covered: B.

Frequency Response of FIR Filters

The Sonometer The Resonant String and Timbre Change after plucking

(Refer Slide Time: 01:11-01:27)

PHYSICS 202 Practice Exam Waves, Sound, Reflection and Refraction. Name. Constants and Conversion Factors

Copyright 2008 Pearson Education, Inc., publishing as Pearson Addison-Wesley.

Solved with COMSOL Multiphysics 4.3

Physics 9e/Cutnell. correlated to the. College Board AP Physics 1 Course Objectives

Solution: F = kx is Hooke s law for a mass and spring system. Angular frequency of this system is: k m therefore, k

7. DYNAMIC LIGHT SCATTERING 7.1 First order temporal autocorrelation function.

Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

BIOMEDICAL ULTRASOUND

1.4 Fast Fourier Transform (FFT) Algorithm

A: zero everywhere. B: positive everywhere. C: negative everywhere. D: depends on position.

Chapter 9 Partial Differential Equations

State Newton's second law of motion for a particle, defining carefully each term used.

Oscillations. Vern Lindberg. June 10, 2010

RANDOM VIBRATION AN OVERVIEW by Barry Controls, Hopkinton, MA

The Quantum Harmonic Oscillator Stephen Webb

1) The time for one cycle of a periodic process is called the A) wavelength. B) period. C) frequency. D) amplitude.

Bode Diagrams of Transfer Functions and Impedances ECEN 2260 Supplementary Notes R. W. Erickson

CHAPTER 6 Frequency Response, Bode Plots, and Resonance

Physics 41 HW Set 1 Chapter 15

Simple Harmonic Motion

Algebra I Vocabulary Cards

Analysis/resynthesis with the short time Fourier transform

SOFTWARE FOR GENERATION OF SPECTRUM COMPATIBLE TIME HISTORY

Agilent Time Domain Analysis Using a Network Analyzer

EFFECTS ON NUMBER OF CABLES FOR MODAL ANALYSIS OF CABLE-STAYED BRIDGES

chapter Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction 1.2 Historical Perspective

226 Chapter 15: OSCILLATIONS

AP1 Waves. (A) frequency (B) wavelength (C) speed (D) intensity. Answer: (A) and (D) frequency and intensity.

AP Physics C. Oscillations/SHM Review Packet

Design of Efficient Digital Interpolation Filters for Integer Upsampling. Daniel B. Turek

Audio Engineering Society. Convention Paper. Presented at the 119th Convention 2005 October 7 10 New York, New York USA

Sample Questions for the AP Physics 1 Exam

Adding Sinusoids of the Same Frequency. Additive Synthesis. Spectrum. Music 270a: Modulation

Introduction to acoustic imaging

Discrete Mathematics: Homework 7 solution. Due:

State Newton's second law of motion for a particle, defining carefully each term used.

The Membrane Equation

ANALYTICAL METHODS FOR ENGINEERS

Musical Analysis and Synthesis in Matlab

TCOM 370 NOTES 99-4 BANDWIDTH, FREQUENCY RESPONSE, AND CAPACITY OF COMMUNICATION LINKS

UNIVERSITY OF CALIFORNIA AT BERKELEY College of Engineering Department of Electrical Engineering and Computer Sciences. EE105 Lab Experiments

Lecture L2 - Degrees of Freedom and Constraints, Rectilinear Motion

Basic Op Amp Circuits

Introduction to Engineering System Dynamics

Auto-Tuning Using Fourier Coefficients

Second Order Linear Partial Differential Equations. Part I

Manufacturing Equipment Modeling

Analog and Digital Signals, Time and Frequency Representation of Signals

Active Vibration Isolation of an Unbalanced Machine Spindle

2.3. Finding polynomial functions. An Introduction:

Digital Systems Ribbon Cables I CMPE 650. Ribbon Cables A ribbon cable is any cable having multiple conductors bound together in a flat, wide strip.

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Part IB Paper 6: Information Engineering LINEAR SYSTEMS AND CONTROL Dr Glenn Vinnicombe HANDOUT 3. Stability and pole locations.

Midterm Solutions. mvr = ω f (I wheel + I bullet ) = ω f 2 MR2 + mr 2 ) ω f = v R. 1 + M 2m

Engineering Sciences 22 Systems Summer 2004

SOLUTIONS TO CONCEPTS CHAPTER 15

High Voltage Transient Analysis

Second Order Linear Differential Equations

Automatic Detection of Emergency Vehicles for Hearing Impaired Drivers

A Sound Analysis and Synthesis System for Generating an Instrumental Piri Song

DIODE CIRCUITS LABORATORY. Fig. 8.1a Fig 8.1b

7.2.4 Seismic velocity, attenuation and rock properties

Chapter 3 RANDOM VARIATE GENERATION

Dynamics-based Structural Health Monitoring Using Laser Vibrometry

The Basics of FEA Procedure

Transcription:

Ideal Vibrating String Distributed Modeling in Discrete Time Julius Smith and Nelson Lee RealSimple Project Center for Computer Research in Music and Acoustics (CCRMA) Department of Music, Stanford University Stanford, California 94305 y (t,x) 0 0 Position x String Tension K ε = Mass/Length June 5, 2008 Outline Ideal Vibrating String Finite Difference Approximation (FDA) TravelingWave Solution Ideal Plucked String Sampling Issues Lossless Digital Waveguides Sampled Traveling Waves versus Finite Differences Lossy 1D Wave Equation Dispersive 1D Wave Equation Wave Equation Ky = ǫÿ K = string tension y = y(t, x) ǫ = linear mass density ẏ = ty(t, x) y = string displacement y = xy(t, x) Newton s second law Assumptions Lossless Linear Flexible (no Stiffness ) Slope y (t, x) 1 Force = Mass Acceleration Work supported by the Wallenberg Global Learning Network 1 2

Example OneDimensional Waveguides Any elastic medium displaced along 1D Air column of a clarinet or organ pipe Airpressure deviation p string displacement y Longitudinal volume velocity u transverse string velocity v Vibrating strings Really need at least three coupled 1D waveguides: Horizontally polarized transverse waves Vertical polarized transverse waves Longitudinal waves (Typically 1 or 2 WG per string used in practice) Bowed strings also require torsional waves (Typical: one waveguide per string [plane of the bow]) Piano requires up to three coupled strings per key Twostage decay Aftersound (Typical: 1 or 2 waveguides per string) Let s first review the finite difference approximation applied to the ideal string (for comparison purposes): Finite Difference Approximation (FDA) and ẏ(t, x) y (t, x) T = temporal sampling interval X = spatial sampling interval y(t, x) y(t T, x) T y(t, x) y(t, x X) X Exact in limit as sampling intervals zero Half a sample delay at each frequency. Fix: ẏ(t, x) [y(t T, x) y(t T, x)]/(2t) Zerophase secondorder difference: ÿ(t, x) y (t, x) y(t T, x) 2y(t, x) y(t T, x) T 2 y(t, x X) 2y(t, x) y(t, x X) X 2 All oddorder derivative approximations suffer a halfsample delay error All even order cases can be compensated as above 3 4

FDA of 1D Wave Equation Substituting finite difference approximation (FDA) into the wave equation Ky = ǫÿ gives y(t, x X) 2y(t, x) y(t, x X) K X 2 y(t T, x) 2y(t, x) y(t T, x) = ǫ T 2 Time Update: y(t T, x) = KT 2 [y(t, x X) 2y(t, x) y(t, x X)] ǫx2 2y(t, x) y(t T, x) Let c = K/ǫ (speed of sound along the string). In practice, we typically normalize such that T = 1 t = nt = n X = ct = 1 x = mx = m, and y(n 1, m) = y(n, m 1) y(n, m 1) y(n 1, m) Recursive difference equation in two variables (time and space) Timeupdate recursion for time n 1 requires all values of string displacement (i.e., all m), for the two preceding time steps (times n and n 1) Recursion typically started by assuming zero past displacement: y(n, m) = 0, n = 1, 0, m. Higher order wave equations yield more terms of the form y(n l, m k) frequencydependent losses and/or dispersion characteristics are introduced into the FDA: Linear differential equations with constant coefficients give rise to some linear, timeinvariant discretetime system via the FDA Linear, timeinvariant, filtered waveguide case: k=0 l=0 k=0 α k k y(t, x) t k = l=0 β l l y(t, x) x l More general linear, timeinvariant case k l y(t, x) m n y(t, x) α k,l = β t k x l m,n t m x n Nonlinear example: Timevarying example: y(t, x) t y(t, x) t m=0 n=0 ( y(t, x) = x ) 2 = t 2 y(t, x) x 5 6

TravelingWave Solution Onedimensional lossless wave equation: Ky = ǫÿ Plug in traveling wave to the right: y(t, x) = y r (t x/c) General solution to lossless, 1D, secondorder wave equation: y(t, x) = y r (t x/c) y l (t x/c) y l ( ) and y r ( ) are arbitrary twicedifferentiable functions (slope 1) Important point: Function of two variables y(t, x) is replaced by two functions of a single (time) variable reduced complexity. Published by d Alembert in 1747 y 1 (t, x) = x) cẏ(t, y (t, x) = 1 c2ÿ(t, x) Since c = K/ǫ, the wave equation is satisfied for any shape traveling to the right at speed c (but remember slope 1) Similarly, any leftgoing traveling wave at speed c, y l (t x/c), statisfies the wave equation 7 8

LaplaceDomain Analysis e st is an eigenfunction under differentiation Plug it in: By differentiation theorem Wave equation becomes Thus is a solution for all s. y(t, x) = e stvx ẏ = sy y = vy ÿ = s 2 y y = v 2 y Kv 2 y = ǫs 2 y = s2 v 2 = K ǫ = c2 = v = ± s c y(t, x) = e s(t±x/c) Interpretation: left and rightgoing exponentially enveloped complex sinusoids General eigensolution: By superposition, y(t, x) = e s(t±x/c), y(t, x) = i s arbitrary, complex A (s i )e s i(t x/c) A (s i )e s i(tx/c) is also a solution for all A (s i ) and A (s i ). Alternate derivation of D Alembert s solution: Specialize general eigensolution to s = jω Extend summation to an integral over ω Inverse Fourier transform gives ( y(t, x) = y r t x ) ( y l t x ) c c where y r ( ) and y l ( ) are arbitrary continuous functions 9 10

Infinitely long string plucked simultaneously at three points marked p Sampled Traveling Waves in a String For discretetime simulation, we must sample the traveling waves String Shape at time 0 c p c String Shape at time t 0 Sampling interval = T seconds Sampling rate = f s Hz = 1/T p Traveling Wave Components p at time t 0 Initial displacement = sum of two identical triangular pulses At time t 0, traveling waves centers are separated by 2ct 0 meters String is not moving where the traveling waves overlap at same slope. Spatial sampling rate = X m/s = ct systolic grid For a vibrating string with length L and fundamental frequency f 0, ( periods c = f 0 2L meters sec period = meters ) sec so that X = ct = (f 0 2L)/f s = L[f 0 /(f s /2)] Thus, the number of spatial samples along the string is L/X = (f s /2)/f 0 or Number of spatial samples = Number of string harmonics 11 12

Examples: Spatial sampling interval for (1/2) CDquality digital model of Les Paul electric guitar (strings 26 inches long) X = Lf 0 /(f s /2) = L82.4/22050 2.5 mm for low E string X 10 mm for high E string (two octaves higher and the same length) Low E string: (f s /2)/f 0 = 22050/82.4 = 268 harmonics (spatial samples) High E string: 67 harmonics (spatial samples) Number of harmonics = number of oscillators required in additive synthesis Examples (continued): Sound propagation in air: Speed of sound c 331 meters per second X = 331/44100 = 7.5 mm Spatial sampling rate = ν s = 1/X = 133 samples/m Sound speed in air is comparable to that of transverse waves on a guitar string (faster than some strings, slower than others) Sound travels much faster in most solids than in air Longitudinal waves in strings travel faster than transverse waves Number of harmonics = number of twopole filters required in subtractive, modal, or sourcefilter decomposition synthesis 13 14

Sampled Traveling Waves in any Digital Waveguide Lossless digital waveguide with observation points at x = 0 and x = 3X = 3cT where we defined x x m = mx t t n = nt y(t n, x m ) = y r (t n x m /c) y l (t n x m /c) = y r (nt mx/c) y l (nt mx/c) = y r [(n m)t] y l [(n m)t] = y (n m) y (n m) y (n) = y r (nt) superscript = rightgoing superscript = leftgoing y (n) = y l (nt) y r [(n m)t] = y (n m) = output of msample delay line with input y (n) y l [(n m)t] = y (n m) = input to an msample delay line whose output is y (n) Recall: y (nt,0) y (n1) y (n1) y (n2) y (n2) (x = 0) (x = ct) (x = 2cT) y (n3) (x = 3cT) y (n3) y (nt,3x) ( ) ( ) t x/c t x/c y(t, x) = y y T T y(nt, mx) = y (n m) y (n m) Position x m = mx = mct is eliminated from the simulation Position x m remains laid out from left to right Left and rightgoing traveling waves must be summed to produce a physical output y(t n, x m ) = y (n m) y (n m) Similar to ladder and lattice digital filters Important point: Discrete time simulation is exact at the sampling instants, to within the numerical precision of the samples themselves. To avoid aliasing associated with sampling, 15 16

Require all initial waveshapes be bandlimited to ( f s /2, f s /2) Require all external driving signals be similarly bandlimited Avoid nonlinearities or keep them weak Avoid time variation or keep it slow Use plenty of lowpass filtering with rapid highfrequency rolloff in severely nonlinear and/or timevarying cases Prefer feedforward over feedback around nonlinearities when possible Relation of Sampled D Alembert Traveling Waves to the Finite Difference Approximation Recall FDA result [based on ẋ(n) x(n) x(n 1)]: y(n 1, m) = y(n, m 1) y(n, m 1) y(n 1, m) Travelingwave decomposition (exact in lossless case at sampling instants): y(n, m) = y (n m) y (n m) Substituting into FDA gives y(n 1, m) = y(n, m 1) y(n, m 1) y(n 1, m) = y (n m 1) y (n m 1) y (n m 1) y (n m 1) y (n m 1) y (n m 1) = y (n m 1) y (n m 1) = y [(n 1) m] y [(n 1) m] = y(n 1, m) FDA recursion is also exact in the lossless case (!) Recall that FDA introduced artificial damping in massspring systems The last identity above can be rewritten as y(n 1, m) = y [(n 1) m] y [(n 1) m] = y [n (m 1)] y [n (m 1)] 17 18

Displacement at time n 1 and position m is the superposition of left and rightgoing components from positions m 1 and m 1 at time n The physical wave variable can be computed for the next time step as the sum of incoming traveling wave components from the left and right Lossless nature of the computation is clear y (t,x) The Lossy 1D Wave Equation 0 0 Position x String Tension K ε = Mass/Length The ideal vibrating string. Sources of loss in a vibrating string: 1. Yielding terminations 2. Drag due to air viscosity 3. Internal bending friction Simplest case: Add a term proportional to velocity: More generally, Ky = ǫÿ Ky = ǫÿ µẏ }{{} new M 1 m=0 m odd µ m m y(t, x) t m where µ m may be determined indirectly by measuring linear damping versus frequency 19 20

Solution to Lossy 1D Wave Equation Lossy Digital Waveguide y(t, x) = e (µ/2ǫ)x/c y r (t x/c) e (µ/2ǫ)x/c y l (t x/c) Assumptions: Small displacements (y 1) Small losses (µ ǫω) y (nt,0) g g y (nt,2ct) z 1 z 1 g g g g c = K/ǫ = as before (wave velocity in lossless case) Components decay exponentially in direction of travel Sampling with t = nt, x = mx, and X = ct gives y(t n, x m ) = g m y (n m) g m y (n m) where g = e µt/2ǫ Order distributed system reduced to finite order Loss factor g = e µt/2ǫ summarizes distributed loss in one sample of propagation Discretetime simulation exact at sampling points Initial conditions and excitations must be bandlimited Bandlimited interpolation reconstructs continuous case 21 22

Loss Consolidation FrequencyDependent Losses y (nt,0) 2 g g 2 y (nt,2ct) Loss terms are simply constant gains g 1 Linear, timeinvariant elements commute Applicable to undriven and unobserved string sections g g Simulation becomes more accurate at the outputs (fewer roundoff errors) Number of multiplies greatly reduced in practice Losses in nature tend to increase with frequency Air absorption Internal friction Simplest string wave equation giving higher damping at high frequencies Ky 3 y(t, x) = ǫÿ µ 1 ẏ µ 3 } {{ t 3 } new Used in ChaigneAskenfelt piano string PDE Damping asymptotically proportional to ω 2 Waves propagate with frequencydependent attenuation (zerophase filtering) Loss consolidation remains valid (by commutativity) G(ω) G(ω) G(ω) z 1 z 1 y (nt,0) G(ω) G(ω) y (nt,2ct) G(ω) 23 24

The Dispersive OneDimensional Wave Equation Stiffness introduces a restoring force proportional to the fourth spatial derivative: ǫÿ = Ky κy } {{ } new where κ = Qπa4 4 (moment constant) a = string radius Q = Young s modulus (stress/strain) (spring constant for solids) Stiffness is a linear phenomenon Imagine a bundle or cable of ideal string fibers Stiffness is due to the longitudinal springiness Limiting cases Reverts to ideal flexible string at very low frequencies (Ky κy ) Becomes ideal bar at very high frequencies (Ky κy ) Effects of Stiffness Phase velocity increases with frequency ( ) c(ω) = c 0 1 κω2 2Kc 2 0 where c 0 = K/ǫ = zerostiffness phase velocity Note idealstring (LF) and idealbar (HF) limits Travelingwave components see a frequencydependent sound speed Highfrequency components run out ahead of lowfrequency components ( HF precursors ) Traveling waves disperse as they travel ( dispersive transmission line ) String overtones are stretched and inharmonic Higher overtones are progressively sharper (Period(ω) = 2 Length / c(ω)) Piano strings are audibly stiff Reference: L. Cremer: Physics of the Violin 25 26

Digital Simulation of Stiff Strings General Allpass Filters Allpass filters implement a frequencydependent delay For stiff strings, we must generalize X = ct to X = c(ω)t T(ω) = X/c(ω) = c 0 T 0 /c(ω) where T 0 = T(0) = zerostiffness sampling interval Thus, replace unit delay z 1 by z 1 z c 0/c(ω) = Ha (z) Each delay element becomes an allpass filter In general, H a (z) is irrational (frequencydependent delay) We approximate H a (z) in practice using some finiteorder fractional delay digital filter H (z) a H (z) a y (nt,0) y (n1) y (n1) H (z) a H (z) a y (n2) y (n2) (x = 0) (x = c(ω)t) (x = 2c(ω)T) H (z) a H (z) a y (n3) y (n3) y (nt,3c(ω)t) (x = 3c(ω)T) General, order L, allpass filter: H a (z) = z LA(z 1 ) A(z) = a L a L 1 z 1 a 1 z (L 1) z L 1 a 1 z 1 a 2 z 2 a L z L General order L, monic, minimumphase polynomial: A(z) = 1 a 1 z 1 a 2 z 2 a L z L where A(z i ) = 0 z i < 1 (roots inside unit circle) Numerator polynomial = reverse of denominator Firstorder case: H a (z) = a 1z 1 1 1 a 1 z 1 Each pole p i gaincompensated by a zero at z i = 1/p i There are papers in the literature describing methods for designing allpass filters with a prescribed group delay (see reader for refs) For piano strings L is on the order of 10 27 28

Consolidation of Dispersion Allpass filters are linear and time invariant which means they commute with other linear and time invariant elements Related Links Online draft of the book 1 containing this material Derivation of the wave equation for vibrating strings 2 3 zh a (z) y (n3) y (n) (x = 0) y (nt,0) 3 zh a(z) y (n3) (x = 3c(ω)T) y (nt,3c(ω)t) At least one sample of pure delay must normally be pulled out of ideal desired allpass along each rail Ideal allpass design minimizes phasedelay error P c (ω) Minimizing P c (ω) c 0 /c(ω) approximately minimizes tuning error for modes of freely vibrating string (main audible effect) Minimizing group delay error optimizes decay times 1 http://ccrma.stanford.edu/ jos/waveguide/ 2 http://ccrma.stanford.edu/ jos/waveguide/string Wave Equation.html 29 30