2002-Xiangyan Z, Ke'an C, Jincai S - On The Accuracy of The Ray-Tracing Algorithms Based On Various Sound Receiver Models

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Applied Acoustics 64 (2003) 433–441

www.elsevier.com/locate/apacoust

On the accuracy of the ray-tracing algorithms


based on various sound receiver models
Zeng Xiangyang*, Chen Ke’an, Sun Jincai
College of Marine Engineering, PB 58, Northwestern Polytechnical University,
Xi’an 710072, PR China

Received 10 October 2001; received in revised form 3 September 2002; accepted 1 October 2002

Abstract
In this paper, the effect of sound ray detection on the accuracy of sound field simulation by
using the ray-tracing technique has been discussed. The current methods to define the receiver
size have been briefly described. Then a new equation for the computation of the size of a
receiver has been proposed and it has considered such factors as the size of the room, the
number of initial rays and the distance from source to receiver. The corresponding algorithm
has been compared with two other algorithms that are based on different receiver models. It
can be concluded from the computed and measured results that the new model is applicable
for more extensive situations.
# 2002 Elsevier Science Ltd. All rights reserved.
Keywords: Ray-tracing algorithms; Sound receiver models; Room acoustics; Sound ray detection

1. Introduction

The ray-tracing technique is very popular today for the research of room acous-
tics. Up to date, various versions of the ray-tracing algorithm have been described
and most of them have been confirmed to a certain degree. But the absolute majority
is concerned with how to set up the model for the prediction of sound propagation,
which mainly concludes sound emission from the source and the reflection at wall
surfaces. However, not only for the classical ray-algorithm [1,2], but also for the
combined ray-tracing and image source method [3,4], sound ray detection is an

* Corresponding author. Tel.: +86-29-849-4183; fax: +86-29-849-5278.


E-mail address: zenggxy@nwpu.edu.cn (Z. Xiangyang).

0003-682X/03/$ - see front matter # 2002 Elsevier Science Ltd. All rights reserved.
PII: S0003-682X(02)00108-1
434 Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441

important problem. It is obvious that improper receivers will lead to multiple


detection, diminished detection or wrong detection, which will affect the accuracy of
the calculation of room impulse response and acoustic parameters such as sound
pressure level. Though the beam tracing method [5] such as cone beam tracing and
pyramid beam tracing can solve the problem to a certain degree, they are very time
consuming, and in many cases the pure ray-tracing method is still the best choice.
Although the model of sound ray receiving plays a very important role in any ray-
based algorithm, few investigations have been made on it and there is no uniform
standard for the design of it at present.
Because only the sphere receiver allows omni-directional characteristics in receiv-
ing sound rays, it has been implemented in most ray-tracing models. But in almost
every algorithm, a constant-size receiver was used. This has been proved to be a
systematic error of the ray-tracing method by Hilmar [6,7]. He has also recom-
mended a method in which a sphere receiver with changeable size can be used. But
during the research, we found that this method is very feasible in a certain sound
space, but not applicable for any situation. Therefore, more investigations should be
made on the problem of sound ray receiving.
In this paper, the current models of sound ray receiving have been described and
then a new method has been proposed to compute the desired size of a receiver. The
corresponding ray-tracing algorithms based on the current methods and the new
method have been implemented into various cases to test which one is more appli-
cable for an arbitrary situation.

2. Current models for receiving sound rays

So far as the authors know, only two categories of models for sound ray receiving
have been recommended up to now. The simple one is to use a constant-size sphere
receiver and the radius of it is usually taken to be from 0.5 to 1 m. However, there is
no credible standard to determine the concrete value in the case of an arbitrary vir-
tual sound space.
Another one is to use a sphere with changeable radius which can be calculated by
the following equation [6]:
rffiffiffiffiffiffi
2
r ¼ Lmax  ð1Þ
N
Where r is the desired sphere radius, Lmax is the maximum length of a ray and it is
dependent on the length of the room impulse response, and N is the total number of
the initial rays.
Therefore, for a certain ray, the receiver radius can be calculated from the fol-
lowing formula.
rffiffiffiffiffiffi
2
ri ¼ cti ð2Þ
N
where ri is the radius for the ray, c is the sound velocity and ti is the time that the ray
Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441 435

takes from the source to the receiver.


The precondition of this method is that the start direction of a ray is not random,
but calculated in such a way that a constant density of rays across a solid angle is
achieved. From Eq. (2), it can be found that for each ray, the receiver size is
dependent on the ray length and is different. This of course will increase the com-
putation time. On the other hand, Hilmar’s equation has shown that the size of the
receiving volume is related to the total sound rays emitted by the source and is also
dependent on the ray length from the source to the receiver. But it has not taken into
consideration the size of the space. As we know, the size of the receiver is mainly
dependent on the density of the rays in a sound space. So, the size of the space,
which will affect the density of the rays, is necessary to be considered. This idea has
also been proved by an experiential formula, which has been implemented in some
computer models such as NORMAL [8] and RAYCUB [9].
10V
VR ¼ ð3Þ
N
where VR and V are the volume of the receiver and the sound space.
This equation was originally used to determine the number of initial rays, thus in
this method the size of the sphere receiver was also chosen to be constant. However,
we still can derive an equation from the above formula to calculate the changeable
radius of the receiving sphere. That is
 
15V 1=3
r¼ ð4Þ
2N
It has shown the relationship of the sphere radius, volume of sound space and the
initial ray number, but it has not taken into account the distance from the source to
the receiver. In fact, it is also a key factor to the accuracy of the simulation.
In order to make a comparison we have designed two ray-tracing algorithms
according to the above receiving models. We named the algorithm devised from
Hilmar’s equation HM, and another is called BM. In the following section, they will
be compared with a new algorithm to find which is effective in calculating the opti-
mal volume of the receiver.
In these models, the initial rays were calculated according to the method given by
A. Krokstad [1], and the ray’s propagation throughout the space was simulated
based on the Lambert diffusion model [10,11]. For the sake of simpleness, the con-
crete algorithms of these parts have not been described in this paper, but those
related to the sound receiving will be described in detail.

3. Study of the effect of various receivers on the computation accuracy

3.1. A new model for sound ray receiving

From the above section, we can find that the size of a sphere receiver at least
depends on the source to receiver distance, the initial ray number and the sound
436 Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441

space volume. In order to devise a new receiving model that can conclude all these
factors, firstly we make an assumption that any receiver can receive at least one
direct ray [12]. Based on this principle, we can derive an equation to determine the
minimal radius of the receiving sphere.
Fig. 1 shows the relationship between two adjacent rays and the minimal sphere
receiver. According to the above principle, these two rays are tangent with the
sphere. We look what they compose as an approximate cone, of which the radius of
its underside is the minimal radius we want to calculate. Suppose the volume of the
big sphere, of which the radius is the distance from the source to the receiving point,
is approximately equal to the total volume of a certain number of such cones, we can
obtain
4 3 1
d ¼ N r2min dSR ð5Þ
3 SR 3
where dSR is the source to receiver distance, N is the number of the cones and it is
equal to the total number of initial rays and rmin is the minimal radius of the
receiving sphere. Therefore:
rffiffiffiffi
4
rmin ¼ dSR ð6Þ
N
Then a weight factor k, which is dependent on the volume of the space, is added to
the calculated results.
rffiffiffiffi
4
r ¼ kdSR  ð7Þ
N
The experiential equation recommended by the authors to determine the weight
factor is
k ¼ log10 ðVÞ ð8Þ
Because the volume of most sound spaces is between 10 and 106 m3, the weight
factor ranges from 1 to 6. For example, if the size of a sound space is 252010 m3,
the value of k will be 3.7.
According to Eqs. (7) and (8), a new ray-tracing algorithm has been designed. It is
very similar to HM and BM and is called WM. It is no doubt that there are some
other factors that can affect the accuracy of the ray-tracing algorithm. Therefore, in

Fig. 1. Calculation of the minimal receiving radius.


Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441 437

order to make HM, BM and WM be comparable, every part of them is designed to


be the same except for the sound receiving part.

3.2. Calculating sound pressure level by the ray-tracing model based on a sphere
receiver

When all the rays that have arrived at the sphere receiver have been worked out,
the arrival time and their energy can be obtained, from which the energy that each
ray has contributed to the sphere receiver can be computed. Suppose the energy
contributed by the ith ray is Ei, the sound power of it is Wi, we can get the following
formula:
Ei ¼ Wi Ti ð9Þ
where Ti is the time that the ray has spent on crossing the receiver, which can be
calculated from the sound velocity and the distance that the ray has crossed within
the receiver. Wi can be calculated from the following equation.
W0 Q YM  
Wi ¼ expðLÞ 1  j ð10Þ
N j¼1

where W0 is the power of the sound source; Q is the directivity factor; N is the total
number of the initial rays;  is the air absorption coefficient; L is the total distance
that the ray has travelled from the source to the center of the sphere receiver;M is
the maximal reflection number of the ray and j is the absorption coefficient of the
wall on which the jth reflection has occurred.
It can be derived that the relationship between the sound energy and the sound
intensity within a sphere receiver is:
Ec
I¼ ð11Þ
Vr
Where I=sound intensity, V=receiver volume, c=sound velocity.
Therefore, the sound intensity excited by the ith ray is
Ei c Wi Ti c
Ii ¼ ¼ ð12Þ
Vr Vr
If the distance that the ray has travelled across the receiver is dri, we can obtain:
Wi dri
Ii ¼ ð13Þ
Vr
According to the arrival time of each ray and the sound intensity it has excited, we
can easily obtain the sound intensity decay curve I(t), from which the sound pressure
level can be calculated as follows.
Ð 1 
0 cIðtÞdt
SPL ¼ 10log10 ð14Þ
4  1010
438 Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441

In the above equation, c is the impedance of the air. Usually c is taken to be 400
kg/(m2s), so Eq. (14) can be rewritten as:
ð 1 
SPL ¼ 120 þ 10log10 IðtÞdt ð15Þ
0

This method has been implemented in the three models and in the following sec-
tion, the sound pressure levels obtained by various algorithms will be compared.

3.3. Comparison of the three models

In order to find out which model is applicable for a wider range, they were applied
to several cases. Firstly, we consider five different receiving positions in four various
sound spaces and make the initial ray number to be the same. One of the spaces is
the reverberation room in our university and the other three are virtual spaces. The
conditions of these spaces are listed in Table 1. The sound pressure levels at the
receiving positions were computed and were compared with those measured or cal-
culated by the Sabine theory.
The results of each situation have been shown by the following figures. In Fig. 2(a),
the measured sound pressure levels were compared with those predicted by the
above mentioned algorithms. In the other three figures, the predicted results of each
virtual enclosure are compared with those calculated by using the classical Sabine
theory (abbreviated to ST).
It can be seen that in space 2 the results predicted by model BM are more accurate
than those predicted by the other two, and in space 4 the results predicted by model
HM are the most accurate. However, the results predicted by them are less accurate
than those predicted by model WM in the other three spaces. When using the model
WM, the average error at all the five receivers in each space is as follows: 0.7 dB (space
1), 0.6 dB (space 2), 0.9 dB (space 3) and 1.0 dB (space 4). These data show that though
the model WM is not the most accurate in every space, the average errors in all these
spaces are not more than 1 dB and in various sound spaces the error is very stable.
Therefore we can affirm that for an arbitrary sound space the method defined by Eqs.
(6) and (7) is more practicable for the computation of the radius of the sphere receiver.
Another case we have considered is that in the same space but the initial ray
numbers are different. In Fig. 3, the effect of the initial ray number on the three
models has been shown. From the figure we can find that with the increase of the

Table 1
Conditions of the four spaces

Space Conditions

Size (m3) Source to receiver distance (m) Initial ray number Reflection order

1 5.83.24.9 1–4 20,000 20


2 1098 2–7 20,000 20
3 252010 2–14 20,000 20
4 482512 4–25 20,000 20
Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441 439

Fig. 2. Sound pressure levels in various spaces; (a) space 1, (b) space 2, (c) space 3, (d) space 4.

initial ray number, the predicted results by all these models are comparatively stable
except that there are a bit declines. The most stable one is BM model, while the least
one is HM model, of which the fluctuation is not very obvious. This means that the
change of ray number has little influence on the computation results in these models.
The reason is that the receiver will diminish accordingly with the increase of ray
number.
The computation time of these models has also been compared. In Fig. 4, it can be
found that the computation time is almost a constant value when these models were
applied to different receiving positions in space 4. But in the same condition, the
model HM will cost more time than the other two.
To conclude, the model WM is relatively more accurate and stable than the model
HM and BM, and it also has a high computation efficiency. Therefore, it can be
applied to more extensive situations.

4. Concluding remarks

This paper has discussed the effect of sound ray detection on the accuracy of the
ray-tracing algorithms. A new method was given to determine the optimal size of the
440 Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441

Fig. 3. Effect of ray number.

Fig. 4. Comparison of computation time.

receiver and has been tested by the comparison with two other methods imple-
mented in several spaces.
Because of the practicability, only the sphere receiver has been investigated in this
paper. If some other receiving volumes will be used, the size of them can also be
defined according to the optimal sphere volume. A simple method is to calculate the
volume of a sphere receiver at first, and then make the volume of the new receiver
equal to it. For example, from a sphere receiver with radius 1 m, we can approxi-
mately obtain a 2 m long cube receiver.
The receiving model in this paper is also applicable for the case in which there are
sound barriers. Though in such case invalid detection will probably occur, it can be
corrected by backtracing the rays in the pure ray-tracing method or by testing the
visibility of the image source in the combined ray-tracing and image source method.
Both of these methods have been presented in detail in Ref. [5].
Z. Xiangyang et al. / Applied Acoustics 64 (2003) 433–441 441

Acknowledgements

This project is supported by the Doctorate Foundation of Northwestern Poly-


technical University and the National Natural Science Foundation of China.
Thanks must go to Dr. Bernd Dürrer at Institut für Kommunikationsakustik, Ruhr-
Universität Bochum for his valuable advice.

References

[1] Krokstad A, Strøm S, Sørsdal S. Calculating the acoustical room response by the use of a ray tracing
technique. Journal of Sound and Vibration 1968;8:118–25.
[2] Kulowski A. Algorithmic representation of the ray-tracing technique. Applied Acoustics 1985;18:
449–69.
[3] Vorlander M. Simulation of the transient and the steady-state sound propagation in rooms using
new combined ray-tracing/image source algorithm. J Acoust Soc Am 1989;81:172–6.
[4] Heinz R. Binaural room simulation based on an image source model with addition of statistical
methods to include the diffuse sound scattering of walls and to predict the reverberation tail. Applied
Acoustics 1993;38:145–59.
[5] Lewers T. A combined beam tracing and radiant exchange computer model of room acoustics.
Applied Acoustics 1993;38:161–78.
[6] Lehnert H. Systematic errors of the ray-tracing algorithm. Applied Acoustics 1993;38:207–21.
[7] Lehnert H, Blauert J. Principles of binaural room simulation. Applied Acoustics 1992;38:259–91.
[8] Yang LN, Shield BM. Development of a ray-tracing computer model for the prediction of the sound
field in long enclosures. Journal of Sound and Vibration 2000;229:133–46.
[9] Dance SM, Shield BM. The effect on prediction accuracy reducing the number of rays in a ray-tra-
cing model. Inter-Noise94 1994;3:2127–30.
[10] Dalenback B-IL. Room acoustics prediction based on a unified treatment of diffuse and specular
reflection. J Acoust Soc Am 1996;100:899–909.
[11] Xiangyang Z, Ke’an C, Jincai S. Development of a hybrid computer model for simulating the virtual
sound fields in enclosures. Applied Acoustics 2002;63:481–91.
[12] Xiangyang Z. On the numerical simulation of impulse response in enclosed sound fields. Thesis of
Northwestern Polytechnical University, 2000.

You might also like