Summary: In this section, we will go over the Matlab code we used to simulate our project, the various algorithms we tried, how we simulated "real-time", and how the matlab simulation dealt with real signals.
Since we are working with discrete-time signals, the time delays we tried were limited by the sampling frequency of the DSP boards, which is 48 kHz. By dividing the desired time delay by that sampling period and rounding to the nearest integer, we converted our trial time delays into indices that could be used to select the correct sample out of the buffer.
So, the algorithm for delay-and-sum beamforming is straightforward, but there is room for a little bit of creativity in finding the amplitude of the summed sinusoids. We experimented with two methods to accomplish that task. We will call the first method "amplitude extraction," and the second "signal integration."
| Amplitude Extraction Flow Diagram |
|---|
![]() |
A flow diagram for the amplitude extraction method is shown in
Figure 1. We split the signal into two parts and
multiply one part by
The signal integration method is much simpler computationally, which made it a better choice for our final implementation. We only had to square the beamformer output to make all the numbers positive, and sum the results over approximately one cycle of the incoming signal. The sum is similar to an integral over one period of the signal, except that the samples aren't multiplied by the sampling period to make an "area." Our matlab simulation showed that the algorithm should work, but that it is somewhat more sensitive to noise than amplitude extraction.
We were unable to try either of our Matlab simulations with real signals recorded from our microphone array because we had difficulty making stereo recordings. The computers we used defaulted to recording from the microphone input (which is mono) instead of the line-in input, and we didn't have administrator access to change the settings.