<< 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.
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.
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.
Success! (For a deeper exploration of our results, please continue to the results module
Notification Switch
Would you like to follow the 'Investigation of delay and sum beamforming using a two-dimensional array' conversation and receive update notifications?