Impulse Response and Receiver
The impulse response (IR) in a room acoustics simulation can be analyzed by collecting the ray information using the Receiver data set and then graphically postprocess using the Impulse Response plot. The IR can be determined for sources and boundary data (absorption coefficients, scattering parameters, source directivity, volume attenuation etc.) given in octave, 1/3 octave, or 1/6 octave bands.
Preparing a Room Acoustics Simulation
When setting up a Ray Acoustics simulation and preparing it for a room acoustics simulation where the impulse response (IR) is an important output, certain considerations and steps need to be taken. They are as follows:
Create a parameter under Global Definitions > Parameters for the center frequency, for example, f0.
Set up interpolation functions for the properties that depend on the frequency. The data can easily be stored in a Spreadsheet formated file and interpolation can be set to Nearest neighbor. An example, of the format for a (.txt) file, that specifies absorption coefficients for some boundaries in a simulation could be (data is invented):
%f, wall, entrance, window, floor, diffusers, seats
125 0.1 0.4 0.01 0.02 0.1 0.05
250 0.07 0.2 0.01 0.03 0.1 0.06
500 0.05 0.12 0.02 0.05 0.1 0.07
1000 0.04 0.07 0.02 0.1 0.1 0.15
2000 0.04 0.05 0.02 0.3 0.1 0.35
4000 0.05 0.05 0.03 0.5 0.1 0.4
8000 0.08 0.05 0.04 0.5 0.1 0.6
16000 0.1 0.05 0.05 0.5 0.1 0.6
Make sure that either the Compute intensity and power or the Compute power option is selected in the Intensity Computation section. The Compute power option requires fewer degrees of freedom and is more robust. If it is selected the ray intensity (rac.I and rac.logI) cannot be visualized in Ray Trajectories plots, but both the Sound Pressure Level Calculation and the impulse response can be computed. If the media is graded (that is, the speed of sound can change continuously as a function of position), instead choose Compute intensity and power in graded media.
To be able to postprocess the IR, a Parametric Sweep needs to be used in the study around the Ray Tracing study step. The sweep parameter should be the frequency defined in the parameters. To easily create a Parameter value list representing the center frequencies of the bands use the ISO preferred frequencies entry method.
Note that the Times specified under the Ray Tracing study step only represent the values where the solution is stored, COMSOL uses much smaller internal steps. Use coarse time intervals to reduce the model size when saved. So-called Extra Time Steps are used when reconstructing the IR and other data (see below).
Receiver Data Set
Use a Receiver 2D () or Receiver 3D data set (), selected from the More 2D Data Sets submenu and the More 3D Data Sets submenu, respectively, to collect the data necessary to visualize the impulse using an Impulse Response Plot. The Impulse Response plot uses the data from a Receiver data set as input
Data
Select the appropriate ray data set in the Data set list. Then select the frequency parameters that should be used by the receiver; select one frequency for a single band analysis or all for the broad band analysis. This is the typical behavior if a parametric sweep has been set up, as described in Preparing a Room Acoustics Simulation.
Receiver
The receiver is specified as a (transparent) sphere with a radius and it is located at a center position (the microphone needs to have a certain finite size such that there is a reasonable probability of rays interacting with it). By changing the center position the receiver can be moved around without the need to run the simulation again.
Under Center, specify the x, y, and (3D only) z coordinates for the center of the receiver.
Under Radius, specify the radius of the receiver. From the Radius input list, choose Expression to determine the radius using an expression (see below) or choose User defined to enter a value for the radius in the Radius field (SI unit: m). Different theories exist for the appropriate size of the receiver.
The following built-in expression determines the radius R of the receiver:
where you enter the values for the Number of rays, N; Room volume, V (SI unit: m2); and Source-receiver distance, dSR (SI unit: m), to determine the radius. See Ref. 19 for details on the expression.
Directivity
From the Directivity type list, choose Omnidirectional (the default) or User defined to enter a directivity expression in the Expression field (unit: dB).
Extra Time Steps
Extra time steps are used get a more precise evaluation of the arrival times if the rays and the receiver data set. This is especially important if only a few times have been stored in the output. You can control the added extra time steps from the Maximum number of extra time steps rendered list. It is good practice to increase the value until you get a convergence. Use a Ray plot of, for example, the power rac.Q and then increase the extra times values until the solution no longer changes (is converged). This is exemplified in the Small Concert Hall Acoustics tutorial model.
Advanced
From the Interpolation between time steps list, you can choose to use a Linear interpolation (the default) or a Cubic interpolation, which can be more exact but requires a larger computational effort.
Under Normal variables and Other variables, if desired, you can change the default names of the created variables for the normal directions (nx, ny, and, in 3D, nz) and for the Distance traveled by a ray inside the receiver, the Volume of the receiver, the Directivity, and the First ray arrival time.
Evaluation and Export
The main purpose for the Receiver data set is to be used as input for the Impulse Response Plot. However, the data generated by the data set can also be exported and used in an external analysis tool or software.
Right-click the data set and select Add Data to Export, then enter the desired data. For example, export the arrival time of the rays t, the frequency of the rays rac.f, the power of the rays rac.Q, the distance traveled by the rays in receiver re1dist, and so forth. The exported data can be stored and sorted in several formats.
When working with phase alignment of loudspeakers, it can be useful to evaluate the arrival time if the first ray. This is easily done in a Derived Values > Global Evaluation feature that points to the receiver data set. Simply evaluate the special variable re1first.
See also the Receiver 2D and Receiver 3D section in the COMSOL Multiphysics Reference Manual.
Impulse Response Plot
In room acoustics applications, the impulse response (IR) of a source-receiver configuration represents one of the most important postprocessing results. To create the plot based on the data collected by the Receiver data set, add an Impulse Response subnode () to a 1D plot group to create the impulse response plot. After defining the characteristics of the impulse response, click Plot () to create the plot. For further analysis of the IR data, it is recommended to export the plot under the Export > Plot node and run the analysis in an external software. This could, for example, be to extract room acoustics metrics like the reverberation time and clarity, or use the IR for auralization.
The Small Concert Hall Acoustics model is a tutorial on how to compute the impulse response using the Ray Acoustics interface. The Application Library path is Acoustics_Module/Building_and_Room_Acoustics/ small_concert_hall
In the ray tracing methodology it is, as discussed above, typical to characterize sources and boundaries in frequency bands. This also means that some of the frequency content is lost. This frequency content is reconstructed when determining or reconstructing the IR. For each ray that interacts with the receiver, a small piece of signal with appropriate amplitude, arrival time, phase, and frequency content is added to the IR. The sum of all the contributions reconstruct the full IR (see Ref. 20).
Data
From the Data set list, choose the appropriate Receiver Data Set. Then from the Frequency interpretation list choose an interpretation of the frequency: Octave (the default), 1/3 octave, or 1/6 octave. This selections should coincide with the frequency interpretation used in boundary conditions and sources in the underlying Ray Acoustics simulation, as described in Preparing a Room Acoustics Simulation. The frequency content and resolution of the impulse response is based on this selection.
Expressions
Set up the variables that are necessary for reconstructing the impulse response. These variables are used to define and add the contribution of each ray, that intersects the receiver data set, to the impulse response.
Define the power variable for the rays (SI unit: kg·m2/s2) in the Power field. The default is rac.Q.
Define the density (SI unit: kg/m3) in the Density field. The default is rac.rho.
Define the speed of sound (SI unit: m/s) in the Speed of Sound field. The default is rac.c.
x-Axis Data
From the Transformation list, choose a transformation of the data on the x-axis: None (the default), for no transformation, to show the time domain signal, or Frequency spectrum. The latter will perform an FFT of the IR and depict the amplitude as function of frequency.
Advanced
The following settings are available to control the Kaiser-Bessel window functions (see Ref. 21) that are used to reconstruct the frequency content of the impulse response. Each ray contributes with an amplitude, arrival time, and frequency content to the time domain signal.
Define a sampling frequency (SI unit: Hz) in the Sampling frequency field. The default is 44100.
Define a ripple factor in the Ripple factor field. The default is 0.05.
Define a passband slope factor in the Passband slope factor field. The default is 1.03.
Select to Remove noncausal signal (selected per default). This options removes the unphysical parts of the impulse response signal that appear before the arrival time of the first ray. This part is generated due to the nature of the window functions used for the signal reconstruction.
You can also change the Coloring and Style of the graph or add and format a legend in the Legends section.
See also the Impulse Response section tn the COMSOL Multiphysics Reference Manual.
Energy response (Reflectogram/EChoGram)
The energy response depicted as a reflectogram or ehogram can be plotted using a Ray (Plot) and depict the expression re1dist*rac.Q/re1vol. This will give the intensity received by the “microphone” for each ray.