Room acoustics models are often used in auditory research. The simplest implementations of these models ignore air absorption, and this lack can affect the room response, especially at high frequencies and for large simulated spaces. This letter proposes a method for adding air absorption to a simulated room impulse response calculated without air absorption. The procedure creates a time-varying lowpass filter that approximates air absorption as a function of distance. The existing absorption-free room response is passed through the filter to create a new response that incorporates air absorption effects.

## 1. Introduction

The simulation of room acoustics is a useful tool in auditory research. One technique is the virtual image model of Allen and Berkley (1979). This approach has recently been used for studying the effects of reverberation on speech perception (Fogerty *et al.*, 2020) and for testing algorithms for dereverberation (Ullah *et al.*, 2020). The paper of Allen and Berkley (1979) models a rectangular room; the model includes wall reflection coefficients, but does not include air absorption. Extensions of the virtual-image approach have added air absorption (Campbell *et al.*, 2005; Grimm *et al.*, 2019), but require calculation of separate air absorption filters for each virtual source-to-sensor position pair. Other modeling approaches include simulating the early reflections in a room using virtual images and then using a decaying Gaussian noise sequence or digital reverberator to create the reverberant tail (Moorer, 1979; Jot *et al.*, 1997; Begault, 2000; Välimäki *et al.*, 2012). However, air absorption is often not included, especially when computational efficiency is a processing objective (Jot *et al.*, 1997; Begault, 2000).

In this letter, we propose modeling air absorption as a time-varying modification of the room impulse response that can be applied after the room model response has been calculated. A room acoustic response that has been computed without air absorption, using any modeling technique, can thus be modified after the fact to incorporate absorption.

Air absorption can be represented as a lowpass filter, where the slope steepens and the cutoff frequency decreases as a function of increasing distance [ISO (International Organization for Standardization), 1993; Bass *et al.*, 1995; Attenborough *et al.*, 1995], and a matlab function to compute air absorption is available on-line (Zechmann, 2020). The simplest model of air absorption is a 1-pole infinite impulse response (IIR) lowpass filter, where the pole location is adjusted as a function of source-to-observer distance (Huoponiemi *et al.*, 1977). A more accurate model of air absorption can be obtained by using a cascade of two 1-zero/1-pole IIR filters having different filter coefficients (Petruzzellis and Zanghieri, 2013), where the IIR filter design allows for initial filter slopes between 0 and −6 dB/oct. The design adopted in this letter is based on that of Petruzzellis and Zanghieri (2013), but is modified to use a cascade of three identical 1-zero/1-pole IIR filters to simplify the optimization computations.

The room simulation with air absorption comprises the following steps.

Compute the room impulse response simulation ignoring air absorption.

Design a time-varying lowpass filter that approximates air absorption as a function of distance.

Apply the time-varying filter to the computed room response to get a room response incorporating air absorption.

Use the modified room impulse response in place of the original response to process the test signals.

## 2. Filter design and implementation

The lowpass filter section proposed by Petruzzellis and Zanghieri (2013) is given by

This filter provides a gradual transition from allpass for *b* = 0 to conventional first-order lowpass for *b* = 1. The corresponding time-domain equation is

For the time-varying filter, the coefficients *a* and *b* are replaced by time-varying coefficients, giving

where the *a*(*n*) and *b*(*n*) filter coefficients are updated with each sample. For the first filter in the three-filter cascade, the input *x*(*n*) is the virtual-image room response computed without air absorption, and the output *y*(*n*) provides absorption that increases with increasing time over the duration of the room impulse response.

The matlab function *bem_DesignAirFilter* used to design the time-varying filter coefficients is found in the supplemental material.^{1} The function fits the cascade of three time-varying lowpass filters to the ISO (ISO 1993) air absorption model using the matlab function written by Zechmann (2020), a copy of which is provided in the supplemental material.^{1} A block diagram of the overall filter design process is provided in Fig. 1. Pairs of *a* and *b* filter coefficients are computed at distances corresponding to sampling increments of 10 ms. The matlab *fmincon* function with interior-point constrained nonlinear minimization (Byrd *et al.*, 1999) is used to minimize the mean-squared error between the desired lowpass filter magnitude frequency response expressed in dB on a log frequency scale, and the response of the cascade of the three lowpass filter sections. The selected function options have given smoothly-varying coefficients for the sampling rates investigated from 22.05–48 kHz, but the algorithm may need to be modified if the convergence is not consistent at the selected sampling rate. The filter coefficients are then interpolated over time to provide coefficients at every sample of the room impulse response; the modified Akima interpolation (Akima,1970) option for the matlab *interp1* function is used, although linear interpolation should also be satisfactory.

The matlab function *bem_AirFilter* used to apply the time-varying filter to the room impulse response is also provided in the supplemental material.^{1} This function uses the calculated vectors of *a*(*n*) and *b*(*n*) filter coefficients along with the room impulse response. This function implements the cascade of three time-varying IIR filters defined by Eq. (3) to produce the room response modified by air absorption.

The air absorption filter behavior is illustrated in Figs. 2–4. The air absorption calculated using the ISO standard (ISO 9613-1, 1993) is plotted in Fig. 2 for propagation time steps of 100 ms, which correspond to distance steps of 34.7 m. The total time duration is 2.5 s. The absorption from the cascade of three filter sections is plotted in Fig. 3. The figures are similar, but the ISO curves have a sharper transition from the flat magnitude response at low frequencies to the steeply-sloping response at high frequencies. The time evolutions of the interpolated *a* and *b* filter coefficients are plotted in Fig. 4. There are inflection points in the plots at about 1.3 s for both the *a* and *b* coefficients at the 22.05 kHz sampling rate. Note that the behavior of the 1-zero/1-pole filter is an allpass for *b* = 0 and a lowpass for *b* = 1; thus, the inflection points represent the transition from allpass to lowpass behavior with increasing distance.

## 3. Reverberation time

To evaluate the proposed time-varying filter approach to modeling room reverberation, two room simulations, a classroom and a concert hall, were created using custom matlab code that implemented the Allen and Berkley (1979) virtual image model with the negative reflection coefficient modification proposed by Lehmann and Johansson (2008). Reflection delays were calculated to the nearest sample. The room characteristics, sound source, and sensor locations for the two rooms are presented in Table 1. An omnidirectional source and sensor were used in the simulation. The virtual-image room impulse response was calculated out to the T_{60} reverberation time given by the Eyring (1930) formula with air absorption set to zero.

Room . | Quantity . | Width (x) . | Depth (y) . | Height (z) . |
---|---|---|---|---|

Classroom | Dimensions | 8.0 | 6.0 | 3.0 |

Source | 4.5 | 5.0 | 1.8 | |

Sensor | 2.0 | 2.5 | 1.4 | |

Concert Hall | Dimensions | 23.0 | 40.0 | 19.0 |

Source | 15.0 | 34.0 | 4.0 | |

Sensor | 10.0 | 25.0 | 2.0 |

Room . | Quantity . | Width (x) . | Depth (y) . | Height (z) . |
---|---|---|---|---|

Classroom | Dimensions | 8.0 | 6.0 | 3.0 |

Source | 4.5 | 5.0 | 1.8 | |

Sensor | 2.0 | 2.5 | 1.4 | |

Concert Hall | Dimensions | 23.0 | 40.0 | 19.0 |

Source | 15.0 | 34.0 | 4.0 | |

Sensor | 10.0 | 25.0 | 2.0 |

The simulated reverberation times are presented in Table 2 in octave bands. A sampling rate of 22.05 kHz was used for the simulation, and the reverse integration procedure (ISO 3382, 1997) was used to estimate the reverberation times. For each room, data are presented for the virtual-image simulation without any air absorption, for the virtual-image simulation with the time-varying air absorption applied after the room impulse response was computed, and for the room simulation where the cascade of three IIR filters, given by Eq. (1) corresponding to the image-sensor distance, was applied separately to each image in the room model. The IIR filtering calculation in this latter case started at the time delay corresponding to the virtual image location, and continued out to the calculated Eyring reverberation time.

. | . | Octave Band Center Frequency, Hz . | ||||
---|---|---|---|---|---|---|

Room . | Air absorb . | 250 . | 500 . | 1000 . | 2000 . | 4000 . |

Classroom | None | 0.569 | 0.584 | 0.595 | 0.623 | 0.619 |

Absorption filter | 0.568 | 0.583 | 0.591 | 0.606 | 0.566 | |

Each image | 0.568 | 0.583 | 0.591 | 0.606 | 0.566 | |

Concert Hall | None | 2.97 | 2.76 | 2.51 | 2.73 | 2.79 |

Absorption filter | 2.96 | 2.71 | 2.39 | 2.33 | 1.93 | |

Each image | 2.96 | 2.71 | 2.39 | 2.33 | 1.93 |

. | . | Octave Band Center Frequency, Hz . | ||||
---|---|---|---|---|---|---|

Room . | Air absorb . | 250 . | 500 . | 1000 . | 2000 . | 4000 . |

Classroom | None | 0.569 | 0.584 | 0.595 | 0.623 | 0.619 |

Absorption filter | 0.568 | 0.583 | 0.591 | 0.606 | 0.566 | |

Each image | 0.568 | 0.583 | 0.591 | 0.606 | 0.566 | |

Concert Hall | None | 2.97 | 2.76 | 2.51 | 2.73 | 2.79 |

Absorption filter | 2.96 | 2.71 | 2.39 | 2.33 | 1.93 | |

Each image | 2.96 | 2.71 | 2.39 | 2.33 | 1.93 |

The effects of air absorption on the reverberation time are minimal below 1 kHz, and the strongest effects are found for the simulated concert hall in the 2000- and 4000-Hz octave bands. When averaged over the 500- and 1000-Hz octave bands, the reverse integration procedure gives a T_{60} of 2.63 s for the simulated concert hall without air absorption, and 2.55 s when air absorption is added using either air absorption approach. The corresponding values for the simulated classroom are 589 and 587 ms, respectively. At all frequencies, the reverberation times computed for the proposed time-varying filter method are identical to four significant digits to those computed with air absorption filters individually matched to the image-sensor separation. The calculated room impulse responses for the two air absorption approaches also match very closely; for both rooms, the magnitude of the maximum difference between them is less than −70 dB regarding the impulse response peak value. These close matches indicate that the proposed time-varying filter approach is essentially indistinguishable from the more complicated approach of modeling the air absorption using a separate filter for each individual image.

## 4. Discussion and conclusions

Room simulations do not always incorporate the effects of air absorption. Air absorption, when included, is generally modeled as a distance-dependent lowpass filter applied to each virtual image. In this paper, an alternative approach is introduced in which air absorption is modeled as a time-dependent lowpass filter. The filter does not need the location of each virtual image, but only the corresponding time delays implicitly incorporated into the room impulse response, and, therefore, it can be applied to the entire simulated room response after it has been computed, rather than to each virtual image separately during computation.

Applying air absorption after the room response has been computed also offers computational advantages, since only one application of the air-absorption filter is needed. The improvement in efficiency is especially large if the time-varying filter coefficients are pre-computed for a given sampling rate out to the longest expected reverberation time. The lowpass filter cascade as a function of time is the same for all rooms, since it depends solely on the total distance the sound has traveled and not on the room dimensions or wall materials. Thus, one can pre-compute the *a*(*n*) and *b*(*n*) filter coefficients at the model sampling rate for the largest space under consideration, and use the saved coefficients for all of the simulated rooms by truncating the filtering operation at the end of each of the shorter room impulse responses.

The examples provided in this letter were for static room simulations, where the source and sensor positions do not change over the duration of the room impulse response. However, the air absorption filter should also be appropriate for dynamic situations with moving sources and/or sensors, since it is the total distance travelled by the sound from image to sensor and not the exact locations that matter. The air absorption calculation would be the same: update the room impulse response for each new pair of source-sensor locations in the dynamic simulation without air absorption, and then apply the air absorption filter to each updated room impulse response.

In summary, this paper proposes a computationally efficient approach for adding air absorption to simulated room impulse responses. The procedure models air absorption as a time-varying lowpass filter that approximates ISO air absorption as a function of distance. The room is simulated without air absorption, and the impulse response is then filtered through the time-varying lowpass filter to provide air absorption. The result is a new linear time-invariant (LTI) room impulse response incorporating the air absorption effects.

## Acknowledgments

J.M.K. was supported by a research grant to the University of Colorado from GN ReSound.

^{1}

See supplementary material at https://www.scitation.org/doi/suppl/10.1121/10.0002489 that contains the matlab functions for air absorption, designing the time-varying air absorption lowpass filter, and applying the filter to the room impulse response.