<< Chapter < Page Chapter >> Page >

The second part of the code uses the angles mentioned above to calculate the delay values, although again due to the regular nature of our array, it is possible to calculate only two of the delays outright and extrapolate the rest of the delays from those two. (Which is indeed what we have done in an effort to reduce calculations and make the algorithm more efficient.)

The final part of the code, not shown in the code above but which can be seen in the function node in the figure below, involves the recipropcal of those first two lines; that is, rescaling all the 'd' values found to 'k' values that can actually be used when shifting the signals prior to adding them together.

Delay generation vi

Sub-VI that, given the values 'k12' and 'k14', will generate the shifts (in indices) of the seven microphones (with the shift of microphone 1 assumed to be zero) and the angles theta and phi that the signal came from.

Main analysis vi

This is our top-end module, where all the modules mentioned in the previous section are brought together in the same vi and linked together in the proper ways so as to create a working project.

Main analysis vi

The culmination of our struggles with Labview 5.1, our top-end module which does ... well ... everything.

First, not unexpectedly, there is a call to the Waveform Generation VI , which provides us with our collected and upsampled signals. From that sub-VI, the signals from microphones 1, 2, and 4 are taken, microphones 1 and 2 passed to one for loop and 1 and 4 passed to the other. Within the for loop, as mentioned before, one signal is shifted relative to the other, and the norm taken, for all delay values possible. The result of this is concatenated into an array, the maximum norm found, and from the location of the maximum norm, the value of the delay, or as close as we can get with the sampling resolution we have.

These shift values (the integer index corresponding to as close as we can get to the ideal time delay) are passed to the Delay Generation VI , which then returns an array of values. The theta and pi values function as outputs to the front panel, and then the delay (shift) values are used to set the necessary shift for their corresponding microphone. Finally, the shifted output arrays are all summed (using a for loop, as a point by point summing module also seemed to be among those useful things not premade in Labview 5.1), and the output of the for loop, the array that is the sum of all the previous ones, is then attached to a waveform graph, also on the front panel.

An example result

As the titles state, the upper waveform is that of the first signal (unmodified in any way), and the second that of the final, delayed and summed signal. Note how the latter signal is somewhat smoother and the noise level reduced in comparison to the signal itself (a series of claps). The two numbers at the bottom correspond to the computer's calculation of what direction the signal is coming from.
Phi is measured such that straight up is at zero, along the xy plane at 90 degrees. Theta is measured with the "bottom" of the array (although it can of course be reoriented as the user pleases), that is, the negative y direction, as zero degrees. The signs of the angles indicate the direction of propagation of the wave, and are thus opposite to conventional intuition, and the sign of phi is, of course, impossible to determine with any degree of accuracy due to the up-down ambiguity inherent in a two-dimensional array.

Success! (For a deeper exploration of our results, please continue to the results module

Labview code

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Investigation of delay and sum beamforming using a two-dimensional array. OpenStax CNX. Feb 04, 2006 Download for free at http://cnx.org/content/col10315/1.3
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Investigation of delay and sum beamforming using a two-dimensional array' conversation and receive update notifications?

Ask