<< Chapter < Page Chapter >> Page >

Upsampling vi

From the beginning, we knew that there would be restricted sampling rate of the DAQ card, and the buffer would be effectively decreased by a factor of eight for any one signal (since the data from all eight signals comes into the same buffer). Whatever sampling rate was left would meet the most basic Nyquist requirements and avoid aliasing in that fashion; however, the resultant signal was unlikely to possess much resolution beyond that. Thus, upsampling would be a necessity.

We initially searched Labview itself for a premade upsampling VI, presuming that one would exist, as it is a fairly common signal processing algorithm. However, we were unable to find one and so set about creating a module that would do the job. Our module takes as inputs the signal (array of points) to be upsampled and N, the amount the signal was to be upsampled, and passes as an output the upsampled signal.

Upsampling vi

Sub-VI used to upsample a signal

Following upsampling theory discussed in class ( ELEC 301: Signals and Systems ), the first step to our upsampler was to zeropad , that is, add zeros in between each point on the signal being upsampled. Instead of attempting to implement a dynamic array, this was accomplished by creating a new array of the appropriate length (N times the length of the original array, where N is the amount the signal is being upsampled) and using a for loop to place the original signal elements into the new array spaced N points apart.

This enlarged array of data is then passed back to the Waveform Generation VI where it is lowpass filtered in order to fill in ( interpolate ) the new zeroed out positions, and passed onward as an output of the Waveform Generation VI. The filter used in this operation is the Equi-Ripple FIR low pass filter.

Delay generation vi

This VI does the bulk of the mathematical analysis of the input signals. It takes as inputs the two delays between microphones one and two, and one and four (derived from the calculations of max norms in the Main Analysis VI ) and outputs an array that contains theta , phi , and the corresponding delays for the seven microphones (the delay of the first microphone is automatically set to zero). In all cases, the delays are scaled to correspond to the number of indexes the corresponding signal should be shifted, instead of the actual real-time delay. (As we cannot shift a signal by fractional indexes.)

d12 = k12 / (fs * N); d14 = k14 / (fs * N);phi = acos( sqrt (v^2 * (d12 ^ 2 + d14 ^ 2) ) / d ) * sign (d12 * d14); theta = atan (d14 / d12);d13 = d12 * 2; d16 = d14 * 2;d18 = d13 + d16; d15 = d13 + d14;d17 = d16 + d12;

The first part of the above code is calculates the angles based on the spatial relations between the three microphones (microphone 1, used, as we said before, as the origin, and microphones 2 and 4, which can be found directly adjacent to microphone 1 in both directions). As you can see, it is fairly simple geometry, complicated primarily by the scaling necessary to match the 'k' values (integer values used to iterate the for loop) to their corresponding 'd' value (actual delay in time).

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