Room Impulse Response Modeling in the Sub-2khz Band Using 3-d Rectangular Digital Waveguide Mesh

— Digital waveguide mesh has emerged as an efficient and straightforward way to model small room impulse response because it solves the wave equation directly in the time domain. In this paper, we investigate the performance of the 3-D rectangular digital waveguide mesh in modeling the low frequency portion of room impulse response. We find that it has similar performance compared to the popular image source method when modeling the low frequency portion of the early specular reflections of the room impulse responses.


I. INTRODUCTION
The image source method (ISM) [1][2][3] and the 3-D rectangular digital waveguide mesh (DWM) [4][5][6][7] are two relatively simple but very efficient and straightforward methods in modeling room impulse responses for small rectangular rooms.In the image source method, the sound propagation from the source to the receiver is modeled as the superposition of the direct sound and a number of reflected sounds.The image source method results in an impulse response with fine time resolution and only has modest computational complexity for small rooms.The digital waveguide mesh provides a numerical solution to the wave equation in multiple dimensions, and thus is straightforward to model room impulse responses because it solves the wave equation directly in the time domain.
Both the image source method and the 3-D rectangular digital waveguide mesh methods have some limitations.A major drawback of the image source method is that it cannot handle the diffuse reflections and it is not sufficiently flexible to handle the irregular room surfaces.Consequently, the image source method is only practical for modeling the specular reflections in rooms with relatively simple geometries.The 3-D rectangular digital waveguide mesh suffers from severe frequency and direction dependent dispersion at high frequencies.So, the 3-D rectangular digital waveguide mesh is suitable only for modeling the low frequency sound if the oversampling technique with very high computational complexity is not used.
Despite their limitations, both the image source method and the 3-D rectangular digital waveguide mesh are suitable for modeling the low frequency portion of the specular reflections in the small rectangular room.A lot of research has been done to use either image source method [1][2][3] or digital waveguide mesh [4][5][6][7] to model room impulse responses.However, none of these existing works compare these two methods numerically.In this paper, we investigate the consideration of the 3-D rectangular digital waveguide mesh in modeling the low frequency of the specular reflections of the room impulse responses and show that the image source method and the digital waveguide mesh have a very similar numerical performance in modeling low frequency room impulse responses.
The remaining part of the paper is organized as follows.First, the principle of room impulse response models using the image source method and the 3-D rectangular digital waveguide mesh are reviewed.Next, the considerations of the low frequency of room acoustic response modeling using 3-D rectangular digital waveguide mesh are provided.Then, the performances of these two methods are compared for an example source-receiver position.Finally, the paper concludes with a summary of the results and suggestions for future work.

A. Principle of Image Source Method
The image source method was first used by Gibbs and Jones in 1972 to calculate the sound pressure level distribution within an enclosure [1].It was then used by Allen and Berkley in 1979 to simulate the impulse response between two points in a small rectangular room [2].Currently, the image source method is widely used in modeling room impulse responses for small rooms with simple geometry because it has high time resolution and it is relatively easy to implement.
The simulation of sound propagation from a source to a receiver within a rectangular room using the image source method is shown in Fig. 1.The sound propagation is modeled as the superposition of the direct sound and a number of reflected sounds from the source to the receiver.The response to an impulse at the source is then the sum of the delayed impulses.Here the delay time is equal to the sound propagation path length divided by the sound velocity.The impulse response calculation can also be interpreted from a system point view.If the input of the system is an impulse signal, the output of the system will be the impulse response of the system, that is, the modeled room impulse response between the source and the receiver.The system consists of several subsystems.Each subsystem corresponds to a sound propagation path.In reality, the property of the subsystem is affected by the source orientation, receiver orientation, room www.ijacsa.thesai.orgsurface conditions, and the length of the sound propagation path.

B. Principle of 3-D Rectangular Digital Waveguide Mesh
The digital waveguide mesh was first proposed by Van Duyne and Smith in 1993 [4].It provides a numerical solution to the wave equation in multiple dimensions, and thus has the benefit of incorporating the effects of diffraction and wave interference [4].The 2-D and 3-D digital waveguide mesh schemes have been used to simulate wave propagation in acoustic spaces [5][6][7].
The rectangular mesh is the original structure of the digital waveguide mesh.It is a regular array of 1-D digital waveguides arranged along each perpendicular dimension, interconnected at their crossings by scattering nodes with unit delay elements.A 2-D rectangular digital waveguide mesh is illustrated in Fig. 2 [8].Similar to the 2-D case, in the 3-D rectangular digital waveguide mesh each node is connected to six neighbors with unit delays.The difference wave equation for the unbounded 3-D rectangular mesh can be expressed using the node values as

4-Port Node
, (1) where P represents the sound pressure of a node at rectangular coordinates ( , , ) i j k at time index n .Here i , j , k , and n are arbitrary integers.
The updating frequency or sampling frequency, s f , of a mesh and the wave propagation velocity, c , are related to each other as [9,10] where N is the dimensions of the mesh and x  is the spatial sampling interval.
One limitation of the rectangular mesh is that it has numerical dispersion, due to the difference in the physical distances and signal path lengths.For example, in a 2-D rectangular mesh, the spatial distance from a node to its first diagonal neighbor is 2 times the distance to an axial neighbor.However, the signal travels along the orthogonal steps from a node to its axial neighbors in one time-step and to a diagonal neighbor, as well as to a second axial neighbor, in two time-steps.Thus, the signal reaches locations at physical distances of 2 spatial steps and 2 spatial steps away from the source at the same time instant.The difference in the physical distances and signal path lengths causes a numerical error dependent on both the direction of wave propagation and the frequency of the signal.The error is largest at high frequencies and in the axial directions of the mesh.
Another way to explain why the 3-D rectangular digital waveguide mesh is not appropriate for simulating high frequency sound is that the frequency response is very uneven and the sound propagation dispersion error is large over the whole frequency range, which is shown in Section 3. If we want to model the room impulse response over the whole audio frequency range, we need to oversample the impulse response (for example, by a factor of 10 or more) so that the frequency response will be flat for the desired audio frequency range (20 Hz -20 kHz).Thus, the node size in the mesh would be reduced to one-tenth of the original size, and there will be as many as one thousand times the number of nodes compared to the original case.So, a digital waveguide mesh with large sample rate requires denser meshes, more computer memory and hence takes on the order of 1000 times longer to run.This is not suitable for current computer workstations.Thus, it is currently not appropriate to use the 3-D rectangular digital waveguide mesh in the simulation of high frequency sounds.
Although the 3-D rectangular digital waveguide mesh suffers from frequency and direction dependent dispersion for high frequency sound [7], the frequency response is nearly flat and the sound propagation dispersion error is small at low frequencies when the updating frequency is high enough.Thus, it is feasible to use the 3-D rectangular digital waveguide mesh for the simulation of low frequency portion of the room impulse response for small rooms.A testing low frequency modeling with a fourth-order Linkwitz-Riley filter with cutoff frequencies of 37 Hz and 1800 Hz was used in this paper.

III. CONSIDERATIONS ON RIR MODELING USING 3-D
RECTANGULAR DWM To apply the 3-D rectangular digital waveguide mesh in the simulation of low frequency part of the room impulse response, the frequency response, the sound propagation direction dependent dispersion, and the performance of the www.ijacsa.thesai.orgboundary condition of the 3-D rectangular mesh in the desired low frequency range needs to be tested.

A. Frequency Response in the 3-D Rectangular DWM
In the first simulation, the frequency responses for several arbitrary source-receiver positions using the difference wave Eq. ( 1) for an unbounded 3-D rectangular mesh were tested.The simulations using Eq. ( 1) were made by constructing a 200 200 200  node 3-D rectangular mesh and applying an impulse signal into the source node (80,100,120) .The impulse responses were then simulated at the receiver nodes.In the simulation, the sound velocity was set to 343.5 m/s and the spatial sampling interval was set to 0.0124 m, giving an updating frequency of 48 kHz according to Eq. ( 2).The impulse response simulations were run for 48 time steps.This ensured that the sound wave would not propagate out of the mesh boundary and therefore the simulated mesh is effectively unbounded.The impulse responses for the simulated receiver nodes were obtained, and also numerically transformed into the corresponding frequency responses using an FFT length of 64 samples.However, Fig. 3 also shows that the frequency responses are quite uniform over the desired low frequency range from 37 Hz to 1800 Hz.For this frequency range, the magnitude variation is very small, with only 0.4 dB for Figure 3

B. Propagation Dispersion in the 3-D Rectangular DWM
The 3-D rectangular digital waveguide mesh suffers from serious direction dependent dispersion for high frequency sound.According to our simulation, however, the direction dependent dispersion is very small at low frequencies.When a synthesized bandpass signal (37 Hz -1800 Hz) was fed into a source node in the unbounded 3-D rectangular mesh, the sound propagation within the mesh is nearly omni-directional.
To obtain the sound propagation direction dependent dispersion, the source was located in a fixed position and the receivers were placed in different positions on a sphere with the source as the center.The updating frequency was set to 48 kHz.The responses for 231 different receiver nodes on a sphere were simulated.The distances between the source and the receivers were 60 nodes.
In the simulation, every response simulation was run for 130 time steps.This ensured that the peaks located in time index 117 of the responses can be obtained.Since the receiver nodes can only have integer spatial indices in the simulation, the distance between the source node and the receiver node may not exactly equal 60 nodes.So, the magnitude of the peaks in the responses was adjusted to that with the distance of 60 nodes according to the inverse square law.The sound propagation in every direction was represented using the magnitude of the peaks of the corresponding simulated response.The simulation results show that the magnitudes of the peaks in the 231 simulated responses are almost equal.
The low frequency sound propagation in the 3-D rectangular mesh is nearly omni-directional in different directions on a circle, as shown in Fig. 4. The largest magnitude is -70.5 dB while the smallest magnitude is -70.8 dB.The small dispersion is due to the fluctuation of the digital waveguide mesh frequency response in different directions.Since the frequency response is nearly flat and the sound propagation dispersion is small, the 3-D rectangular mesh appears to be suitable for the room impulse response modeling in the desired low frequency range.www.ijacsa.thesai.org

C. Boundary Condition Performance Tests in the 3-D Rectangular DWM
In real rooms, sound reflections occur when sound waves reach room surfaces.The complex changes of the magnitude and the phase of the sound waves at the room surfaces depend on the surface material and structure as well as the level, frequency, and propagation direction of the sound.Correspondingly, there should be a representation of the boundary condition in the digital waveguide mesh.
Currently, a lot of research is being conducted on modeling boundary conditions in digital waveguide mesh with adjustable shape, diffusion, and reflection characteristics [11][12][13][14].However, there has not yet been a perfect boundary condition implementation for the digital waveguide mesh.
For the 3-D rectangular digital waveguide mesh, there exist only two suitable frequency and angle independent boundary conditions.One is the basic boundary condition based on the simple impedance matching technique while the other is a modified boundary condition proposed by Kelloniemi et al. in 2004 [11], which is based on an improved absorbing boundary condition proposed in [14].The performances of these two boundary conditions were tested in another simulation and are shown as below.
The first step is to test whether or not these two boundary conditions converge.To save simulation time, without loss of generality, a 40 40 40  node small 3-D rectangular mesh was constructed and a bandpass signal (37 Hz -1800 Hz) was fed into the source node (20, 20, 20) .The responses were then simulated at three arbitrary receiver nodes (25, 35, 29) , (17, 25,16) , and (3, 31, 27) using the reflection coefficients 0.0 r  , 0.5 r  , and 1.0 r  for both boundary conditions.Every response simulation was run for 24000 time steps, which is long enough to ensure that the convergence test is believable.According to the test, both boundary conditions converge for these three arbitrary receiver nodes.
The second step is to test how well the simulated reflection coefficients match the theoretical values.A test procedure proposed in [11] is used here.For reflective boundaries, the simulated reflection coefficient is equal to the ratio of the magnitude of the simulated reflected sound signal to that of the perfectly specular reflected sound signal.Here the magnitude of the simulated reflected sound signal is equal to the difference between the magnitude of the received sound signal and that of the direct transmission sound signal between the source and the receiver.The magnitude of the perfectly specular reflected sound signal is equal to that of the direct transmission sound signal between the source and the mirror receiver.
A 200 200 200   node 3-D rectangular mesh was constructed.The simulation was made for 11 source-receiver positions, where the incident angle from the source to the tested boundary ranges from 0º (normal incidence) to 45º.To facilitate the representation, the incident angle of 45º is used as an example.
A bandpass signal (37 Hz -1800 Hz) was applied as an input over 96 time steps at the source node S1: (90,100,10) in the mesh.The response simulation was made at the receiver node R1: (110,100,10) .The set-up of the source node and the receiver node made sure that the input was fed into a node located close to the tested mesh boundary and far from any other boundary to avoid additional reflections influencing the results.
The output signal was received at the node located at equal distance from the tested boundary as shown in Fig. 5 (a).The tested boundary was simulated using both the basic boundary condition and the modified boundary condition.The direct transmission sound signal from the source node to the receiver node was simulated in the same 3-D rectangular mesh.The response between the source S1 and the receiver R1 is equivalent to that between the node S2: (90,100,100) and the node R2: (110,100,100) , as shown in Fig. 5 (b).The direct transmission sound signal was subtracted from the output signal received at the node R1 to get the simulated reflection signal.www.ijacsa.thesai.org In addition, the perfectly specular reflected sound signal was calculated using the simulated response between the node S2: (90,100,100) and the node R3: (110,100, 80) , as shown in Fig. 5 (c).The simulated reflection coefficient is then calculated using the ratio of the magnitude of the simulated reflection signal to that of the perfect specular reflection signal.IV.COMPARE ISM AND DWM After the frequency response, the sound propagation dispersion error, and the performance of the boundary conditions of the 3-D rectangular mesh in the low frequency range were tested, the 3-D rectangular digital waveguide mesh based simulation results of the low frequency impulse responses between a source and a receiver in a small simulation room were then compared to that using the image source method.
Before the low frequency room impulse response was modeled, the room dimensions, the source position, and the receiver position were set.The rectangular room was 1.24 meters long, 1.49 meters wide, and 1.74 meters high.The source position was (0.62, 0.62, 0.62) meters and the receiver position was (0.372, 0.496, 0.62) meters.The sound velocity was 343.5 m/s.The source and the receiver were assumed to be omni-directional.Without loss of generality, the reflection coefficients were set to 0.7 for the ceiling and the floor and 0.6 for the walls.A synthesized bandpass signal (37 Hz -1800 Hz) was fed into the source and the response in the receiver was simulated using both the image source method and the 3-D rectangular digital waveguide mesh.
In the simulation using the image source method, the above-mentioned room dimensions, source position, receiver position, sound velocity, and reflection coefficients were used directly in a MATLAB program developed in [15][16].
In the simulation using the 3-D rectangular digital waveguide mesh, the room was divided into several cubic nodes with the size of 0.0124 meters.Thus, the room dimension was (100, 120, 140) nodes in the mesh.The source was at the node (50, 50, 50) and the receiver was at the node (30, 40, 50).In the simulation, the sound velocity was set to 343.5 m/s, giving an updating frequency of 48 kHz.A bandpass signal (37 Hz -1800 Hz) was fed to the source and the response at the receiver node was simulated.
Several arbitrary peaks were extracted from the two modeled responses.Since the nodes in the digital waveguide mesh can only have integer spatial indices, there may be small time shift of the delay time in the mesh.So the delay time of the peaks in the two modeled responses may not exactly be the same.Thus, a satisfactory match is judged to occur if the delay time difference is within 0.10 ms.According to this rule, if the delay time of a magnitude peak in the DWM-based modeled impulse response is within 0.10 ms of the ISM based modeled value, the magnitude peak is verified.Otherwise, the sample in the ISM based impulse response having the same delay time as the modeled value will be chosen.13 peaks from the two modeled responses are extracted and shown in Fig. 7.It can be seen that they have a very small discrepancy.Note that the peak magnitude in the modeled response using the digital waveguide mesh is greater than that using the image source method.This shows that the reflection coefficient calculated using the basic boundary condition in the digital waveguide mesh is actually higher than the theoretical value, as shown in Fig. 6 in the previous section.To test the validity and the consistency of the comparison between these two methods, the comparison was also made in different room sizes, different room surface reflection coefficients, different source positions, and different receiver positions.The tests showed that the image source method and the 3-D rectangular digital waveguide mesh have similar results in these setups.

V. CONCLUSION
In this paper, we verified that the 3-D rectangular digital waveguide mesh is suitable for modeling the low frequency room impulse response because the frequency response is nearly flat and the sound propagation dispersion error is small in the low frequency range in this mesh structure.We also showed that the low frequency impulse response simulation using the image source method and the 3-D rectangular digital waveguide mesh is approximately equivalent to that using the image source method for an example source-receiver in a rectangular simulation room.
There is some improvement that can be made in the future.In the model using the digital waveguide mesh, the simulated reflection coefficient using the basic boundary condition has some discrepancies with the theoretical value.A correction function for a variety of reflection coefficients (for example, range from 0.0 to 1.0 with the step of 0.1) in different directions (for example, range from 0º to 180º with the step of 1º) can be used to improve the performance of the boundary condition.The performance comparison between these the image source method and the 3-D rectangular digital waveguide mesh will be conducted in a room with more complicated geometry.

Figure 1 :
Figure 1: Simulation of sound propagation between two points in a rectangular room using image source method.

Figure 2 :
Figure 2: In the 2-D rectangular digital waveguide mesh each node is connected to four neighbors with unit delays.

Fig. 3
Fig. 3 shows the impulse responses and the corresponding magnitude frequency responses for three arbitrary receiver nodes (83,103,123) , (84,103,120) , and (85,100,120) .In every magnitude frequency response the spectrum is symmetric about one quarter of the updating frequency.This symmetry characteristic in the frequency domain corresponds to the phenomenon that every other sample is zero-valued in the time domain.The frequency responses are very uneven over the whole frequency range due to the dispersion error of the 3-D rectangular mesh.Theoretically, a real acoustic system would show a flat frequency response since there are no frequency dependent losses in the simple mode of acoustic propagation in the air.The fact that the rectangular DWM simulation gives a non-flat response is an indication of the limitation of the use of 3-D rectangular DWM in the frequency range.

Figure 4 :
Figure 4: Sound propagation in different directions on a circle in the 3-D rectangular digital waveguide mesh.

Figure 5 :
Figure 5: Performance tests of boundary conditions in the 3-D rectangular digital waveguide mesh.

Fig. 6 Figure 6 :
Fig. 6 displays the comparison of the simulated reflection coefficients using the basic boundary condition and the modified boundary condition to the theoretical values in three incident angles 0º, 26.6º, and 45º.The simulated reflection coefficients calculated using the modified boundary condition are closer to the theoretical values for the lower reflection coefficients while those using the basic boundary condition are closer to the theoretical values for the higher reflection coefficients.The basic boundary condition was chosen in the following room impulse response model using digital waveguide mesh because the room surface reflection coefficients are usually at least as large as 0.3 in real rooms.It can also be seen from Fig.6that there is a nearly linear relation between the theoretical reflection coefficients and the simulated values using the basic boundary condition.But the relation varies with incident angles.A correction function for the simulated reflection coefficients was not used in this paper.

Figure 7 :
Figure 7: Delay time and magnitude of 13 arbitrarily chosen peaks in the image source method and the 3-D rectangular digital waveguide mesh based models of the low frequency room impulse responses for a small rectangular simulation room.