Abstract
The open-source Python library Acoular is aimed at the processing of microphone array data. It features a number of algorithms for acoustic source characterization in time domain and frequency domain. The modular, object-oriented architecture allows for flexible programming and a multitude of applications. This includes the processing of measured array data, the mapping of sources, the filtering of subcomponent noise, and the generation of synthetic data for test purposes. Several examples illustrating its versatility are given, as well as one example for implementing a new algorithm into the package.
Introduction
Microphone array methods have become a standard tool for applications in industry and research. As opposed to single microphone measurement, which only yield one sound pressure signal, these methods allow the determination of position and strength of multiple spatially distributed and simultaneously radiating acoustic sources. This is typically done by synchronously recording the sound pressure at distributed sensor positions and the subsequent signal processing with suitable algorithms.
While commercial software for this task is available, the possibilities of adapting the data processing to specific needs and boundary conditions are generally limited. Moreover, a closed-source architecture usually does not allow the survey, improvements or extensions of the underlying algorithms.
The open-source software Acoular (www.acoular.org) is a free alternative, which implements a number of microphone array data processing algorithms.1,2 The Python package includes beamforming methods in frequency and time domain as well as several deconvolution algorithms. The assessment of moving sources is possible, as is the three-dimensional mapping of acoustic sources. The interfaces of the program elements are designed such as to allow the efficient incorporation of new methods while maintaining a comprehensible program structure.
In the following, a summary of the theory of beamforming is given, and the underlying software architecture is described. Several exemplary applications are shown, and the interface for implementing a new method is explained.
Theoretical background
Common principle of all microphone array methods is the evaluation of phase differences of synchronously recorded signals at different positions. Based on a model that describes the sound propagation, the occurring sources can be characterized in terms of their location and strength.
For this, a region in which sources are suspected is discretized by a number of focus points
Classic delay-and-sum beamforming in the time domain makes use of the idea that a summation of signals shifted in time reveals a sound source when the time shifts correspond to the sound travel times from this source to the respective microphone positions 3
The coefficient
Beamforming in the frequency domain is based on the evaluation of the cross-spectral matrix
The squared sound pressures at one focus point and for one frequency can be calculated via
with the complex-valued steering vector
In addition to these basic methods, the Acoular package contains implementations of further algorithms for acoustic source mapping. These include adaptive methods, methods for the separate mapping of coherent sources, deconvolution algorithms, which deliver a higher spatial resolution of the maps based on the classic delay-and-sum result, and inverse methods.6–15
Software architecture
Acoular is an object-oriented Python package and, as such, can be easily incorporated in Python scripts and combined with further libraries. This framework was deliberately chosen, as scripting in Python is comparatively user-friendly and the wide variety of available software libraries allows a flexible workflow for the data processing and presentation.
Core routines that necessitate a higher amount of computational resources are implemented in C++ and parallelized using OpenMP. Furthermore, important intermediate and final results, as for instance the calculated cross-spectral matrix, are stored via an intelligent caching mechanism to avoid multiple calculations and subsequently save computation time.
The object-oriented approach was chosen to facilitate the extension of existing algorithms and to keep the programming structure modular and flexible. Major classes and their relations are shown in Figure 1. Abstract classes (in italics) do not provide algorithms on their own, but define the common interface through which classes derived from the base class can communicate. Thus, the discrete tasks or functioning of the subclasses may differ, while they can easily be exchanged within a program. Aside from reducing the effort necessary for implementing new methods, the clear structuring into classes allows a flexible data processing through a block-wise connection of objects.

UML diagram of the main classes in Acoular. 1
Another advantage of the class-based approach is that the objects and their properties can be conveniently incorporated in a customizable graphical user interface (GUI). Figure 2 shows an example of a GUI application featuring editable attributes of Acoular objects.

Example for a GUI implementation with Acoular objects. The displayed data correspond to the case evaluated in section “Airfoil in open jet.”
Application examples
Three monopoles
As a simple example for the application of the software, the case of three acoustic sources radiating at different levels shall be considered. The signals were generated synthetically, which is also possible with Acoular. For this, the type and positions of the sources were defined, as were the actual signals (uncorrelated white noise) and the RMS sound pressures at a distance of
Figure 3 lists a short Python script executing an exemplary evaluation of the generated data. In line 3, an object ts is created, loading the “measurement data.” The array geometry is loaded via the object mg in line 4. Lines 5–7 contain the definition of a PowerSpectra object, to which the data and parameters needed for the calculation of the cross-spectral matrix are assigned. In lines 8–10, an equally spaced rectangular grid rg is defined, containing all focus points at which the sound pressures are to be evaluated. An instance of the class implementing the chosen beamforming algorithm (in this case, classic delay-and-sum beamforming in the frequency domain) is initialized in lines 11 and 12, defining the PowerSpectra object, the rectangular focus grid rg and the microphones array geometry mg as input data. In the absence of further definitions, the algorithm assumes the medium to be resting, with a characteristic speed of sound of 343 m/s, and the sources to be monopoles.

Example script applying the classic delay-and-sum beamforming in the frequency domain. 2
Until this point, the program code did not conduct any calculations but only initialized objects. The actual computing starts in line 13 by calling the object routine bf.synthetic (…), which calculates the squared sound pressures analogous to equation (2). With the function L_p, these are converted into sound pressure levels, which are mapped in Figure 4(b) with a

(a) Array geometry with 64 microphones. (b) Map of sound pressure levels (values in dB) for the 8-kHz one-third octave band, featuring three sources.
Airfoil in open jet
For this example, experimental data are evaluated with different algorithms. The measurement setup is shown schematically in Figure 5: an airfoil with a chord length of

Top view of the airfoil in the open jet, with microphone array and quadratic focus grid.
The equally spaced quadratic focus grid has a side length of
The signal was recorded with a sampling frequency of
Figure 6 shows sound maps at the

Sound maps of the airfoil in an open jet, generated with different microphone array methods (4 kHz 1/3-octave band, values in dB).
Depending on the applied method, sources can be identified at the nozzle exit, from interactions of the shear layer with leading and trailing edge of the airfoil, and in the core flow region at the trailing edge. Detailed studies applying Acoular on similar configurations can be found in earlier publications.14,16–18
Sound power spectra in 3D
In this example, Acoular is used to determine the sound power spectra of subcomponents of an object with a complex geometry. The measurement setup is shown in Figure 7. It consists of an array of 96 microphones positioned on five sides around a gasoline-powered water pump with a four-stroke engine. The pump engine was operated at full load for the evaluated measurement. This setup has been used in a previous study, 19 which also features a detailed description of the measurement and data processing parameters.

Measurement setup with a water pump under a 3D microphone array.
An equidistant 3D focus grid fully encompassing the pump was defined, on which the sound power levels are to be evaluated. Several array methods implemented in Acoular yield the squared sound pressures as would be measured at a reference position as result. To obtain the sound power levels from these, an adapted enveloping surface method is employed here. For each of the five side centers as reference point, the sound pressure levels at the chosen focus points are calculated with the CLEAN-SC method, 11 which works in the frequency domain. Similar to the method described in ISO 3746, 20 the five sound pressure maps are then averaged and corrections to calculate the sound power level are applied.
As this method yields sound power levels at each of the grid points and for each frequency band, spectral characteristics of subcomponents can be evaluated by integrating the levels at the focus points corresponding to the respective component. Figure 8 shows the selected integration areas around the water pump component (medium gray), the exhaust including jet area (dark gray), and the air intake (light gray). The corresponding spectra can be seen in Figure 9. The most important thing to note here is that even though the overall noise emission is dominated by one component (the exhaust), spectra of other components can still be evaluated.

Integration areas around subcomponents.

Integrated sound power spectra for the three different subcomponents and in total. The printed levels indicate the total sound power of the respective component.
Further experiments applying the Acoular package comprise the measurements of moving sources21,22 as well as extensive studies with simulated sources aiming to gain a better understanding of the intrinsic properties and capabilities of microphone array methods and the reliability of the model assumptions.4,23,24
Software extension
Thanks to the well-defined interfaces of the modules, extending the software to specific requirements is comparatively simple. This also enables the implementation of add-ons which are not intended to be part of the Acoular core and can be maintained separately. An example for this is the “Virtual Rotating Array” method, which is not included in the package.25–27
The implementation of a new method in Acoular shall be demonstrated with the example of the “Functional Beamforming” algorithm. 15 This method is similar to delay-and-sum beamforming in the frequency domain. However, instead of calculating the squared sound pressures via equation (2), it solves
With this, a stronger suppression of artifacts in the sound maps caused by side lobes is achieved. For solving
Figure 10 shows the Python source code for the implementation. Derived from the main class BeamformerBase, a new class BeamformerFunctional is defined, which inherits all interfaces from the parent class. Now only the attributes and functions deviating from the BeamformerBase class have to be defined. In line 3, the exponent

Implementation of a class for Functional Beamforming. 1
Conclusion
The open-source Python library Acoular (www.acoular.org) provides signal processing tools for microphone arrays. Thanks to the open and modular approach, it enables a multitude of possible applications in acoustic testing and for the characterization of sound sources.
The architecture follows an object-oriented approach. This facilitates the programming of data processing tasks, the implementation of new algorithms, and the creation of project-specific add-ons. The workflow and the versatility of the software package have been demonstrated by various examples of different complexity and featuring several of the implemented algorithms.
Intelligent caching and the implementation and parallelization of computationally costly routines in C++ ensures Acoular’s applicability for large-scale problems, while the embedding in the Python framework maintains the possibility of user-friendly scripting and easy combination with other data processing and visualization tools.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
