# Amplify Sound From Known Direction

I have microphone array which records sound. There is one main sound which direction I know and some noises in the background. Now I want to selectively amplify sound from known direction. This looks like reverse problem of antenna signal beamforming. I tried to find some information on internet on how to do it but only information I found told that I need to shift sound signals from microphones. But Wikipedia says it works only for narrow band signals while my signal will be more complicated than single sinus.

I tried to search internet for beamforming but all I found is about EM waves and antennas. Are there some known methods to solve this problems?

• there's a lot of work on beamforming on audio! It often comes under different names; maybe combine your search terms with "source separation" Oct 2, 2019 at 8:49
• @MarcusMüller what are the names I should be looking for? Oct 2, 2019 at 8:50
• ... "source separation". (But really, acoustic beamforming does yield a slew of results for me.) (Mathworks even has a a dedicated "acoustic beamforming using microphones" example, and you can trivially find that using google) Oct 2, 2019 at 8:50
• search on “delay and sum beamforming “
– user28715
Oct 2, 2019 at 11:07

I just looked at the Wikipedia article on beamforming and i can understand your confusion. It ‘s trying to explain too much at once. There are some nomenclature issues as well, MUSIC is a direction finding technique. It doesn’t form beams in the literal sense.

Unfortunately a lot of articles as well as books are written by people who understand the material for other people who understand the material.

You should also be aware that beamforming isn’t always or even practical solution for many audio situations. Shotgun microphones or parabolic reflectors are often good and potentially cheaper solutions. People who study bird songs tend to use these.

The simplest way to beamform is to place all your microphones on a plane that is perpendicular to the direction of the source you want to amplify and then sum the outputs of all the microphones. This is based on the assumption that the source is far enough away so that you can neglect the curvature of the wavefront. This assumption depends on the assumption that the source can be considered a point emitter.

Another way to put this is that the acoustic delay time from the source to each microphone is the same. The Wikipedia article used the term constructive interference to say the same thing.

If locating the microphones on the coherent wavefront is not possible, one introduces delays in each microphone so that each summed microphone has the same acoustic distance travel time from the source when coherently summed. This introduction of delays can be very general and permit the array to coherently sum the sounds from many chosen directions. Since you say you have recordings, this is your task.

Each microphone should have a clear line-of-sight to your source. Microphones typically have a directional response as well so it helps to point each microphone at the source as well. One cannot compensate for the individual directivity of each microphone by introducing delays. Actually a lot of the material written about arrays makes the unrealistic assumption that each microphone has an omnidirectional response.

There are numerous effects that complicate conventional delay-and-sum beamforming as i have described it. The source sounds can arrive at the array from more than one direction which is called multi-path. The signal can cause destructive interference with itself in this circumstance. Inside of rooms there is a lot of potential multipath. The source can’t be considered a simple point source. These are only a few complications.

You can have another loud source that impinges on the array, so even if not coherently summed, still interfere with the source of interest. The way to treat this is to steer a second beam towards that source and judiciously subtract its sound from the sound of interest. There is an entire literature on optimal beamforming that treats this situation.

Summarizing, beamforming may or may not be worth it. It takes specialized hardware like synchronized multichannel analog-to-digital converters.

It isn’t cheap compared with a shotgun microphone. Beamforming is often done because nothing else is possible.

Assume first that the medium is homogeneous - this implies that the time delay of arrival between the sensor is constant for all frequencies of interest (over the bandwidth of interest). Now to beamform these signals, you need to implement a true time-delay beamformer. These can be implemented in either the time-domian and frequency domain. A common example is passive SONAR arrays. The bandwidth of interest in usually in the range 0Hz - 8 KHz. The speed of sound in water is nominally taken to be 1500 m/s (It varyies with temperature, salinity and pressure/depth). Note the array usally has non-uniform sensor spacing to meet the spatial sampling requirements i.e. $$\lambda/2$$ spacing. A good reference for the time delay beamforming is Neilson's "Sonar Signal Processing". In many texts they refer to this as wideband beamforming and they usually have a tapped delay line filter on the sensor. The goal of this filter is to approximate the time delay needed to coherently sum the signals from different sensors together to achieve the gain/amplification.

A common way to true time delay beamforming is to upsample the signals, so you can form a time-delay directly. Unfortunately, this usually means you need to sample at a rate 10 times greater (or higher) than the usual Nyquist requirement. What sampling rate you require depends on the fidelity you desire. Another common alternative is to upsample by a factor of 3 or so, and then use spline interpolation to achieve the needed time delays. Using a higher the initial up sampling factor will result in better beamforming performance, but comes at the cost of increased computational requirements.

Now, in some systems where the bandwidth is narrow with respect to the centre frequency. You can replace the time-delay by a phase shift instead. These are typically called Narrowband beamformer implementations. If the bandwidth of the signal is increased, the use of a phase-shift becomes less appropriate and performance will suffer.

In cases where the medium is dispersive, the propagation time delay varies across the bandwidth of interest. Now the filters you use to implement must compensate for the different time-delays at different frequencies. This is generally quite difficult since you often don't know the time-delays beforehand.

I believe you already have two quite nice answers, so I am just gonna add up to those. As you record signals (like Stanley Pawlukiewicz mentioned) you can perform the "beamforming process" after the recording, which is something quite common. As both Stanley and David mentioned you can use delay-and-sum beamformers or some more "advanced" ones (like Capon/MVDR or LCMV) which can be designed in such a way that they will create a null (or a deep notch) in the direction of interference (if this is constant and known of course) (for more info you can have a look at, for example, Optimum Array Processing by Van Trees).

Additionaly, as correctly Stanley mentioned, you cannot use subspace techniques (such as MUSIC) to beamform, but you could very well use them to find the direction of the sound you are looking for (and automate the whole process), as they tend to have greater accuracy than the beamformers when it comes to direction-of-arrival estimation.

As you don't have to actually implement a hardware system for post-processing I believe that a software solution would be a very feasible one. You can implement that quite easily, either by programming it yourself or with ready packages and libraries (there exist quite some for many programming languages, like python, C++ and MATLAB included as Marcus Müller also mentions in his comment).