LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time delay waveforms

Hey, 

 

I've been trying to locate a sound using Labview and the time delay method, however the time delays we get at 1m are correct but any other distance between the micophones such as this receent reading attached below at 10cm beween each micophone should be around 2.8ms between each however they are coming out at up to 3 orders of magnitude out. 

 

Could some one link me to something that puts me in the right direction or maybe point out where i have gone wrong something simple i might of missed?

 

So far the two wave forms come in are cross correrlated then - the number of counts to get the difference in counts between the two wave forms and then halfed beause the crosscoerrlation x2 them when adding 2 waveforms, then use deta Time from a satistics VI in labview to convert the counts into secounds so you have the amount of counts difference between the two waveforms and then by * by delta T it comes out in secounds? 

 

Thanks for your time. 

 

Ps. Everything is in Labview 2011

Download All
0 Kudos
Message 1 of 8
(3,043 Views)

You have some problems with your data.

 

Put graphs on the raw data and on the filtered data.  Notice that the raw data shows saturation or clipping and that the filtered data appears to be at significantly higher frequencies. Also the filtered data is probably undersampled as most cycles have only 2 points.  If you want to reproduce waveforms reliably, you need to sample much faster than the minimum Nyquist rate. Since your filter is set to 1500-2500 Hz, the sample rate should probably be > 25 kHz.

 

What is the frequency of the excitation signal? What is the waveform?

 

Lynn

 

Raw data.png

 

Filtered data.png

0 Kudos
Message 2 of 8
(3,031 Views)

Ah ill have to go back into the lab to repoduce more data, but the sound it's self was orignally a hammer hitting wood and then each source is a microphone, orignall we had a higher rate and it was working alright, but when we had 2 daq assistants it asked us to change the rate down to 5k per 20k samples so i'll try upping the rate again to see if the input's look any better

 

Dosent seem to be anything else wrong with the setup as far as you can see ? 

 


Thank you Lynn 🙂

0 Kudos
Message 3 of 8
(3,010 Views)

I did not look at the analysis. Without good data that seemed pointless.

 

If the signals have clean zero-crossings as it appears they might, then I would consider a time domain approach looking at the second or third zero crossing. The first may be too close to the baseline for reliable detection. The first zero crossing after the first -4 V point is probably very consistent between signals and is quite easy to detect and compute.

 

Lynn

0 Kudos
Message 4 of 8
(3,006 Views)

The Daq im using is 6009 8 input 14 bit, this only seems to work up to 12k Hz and not up to 25k Hz will this be a huge problem? 

0 Kudos
Message 5 of 8
(2,967 Views)

The USB-6009 has a maximum aggregate sample rate of 48 kHz. That means that the sample rate per channel is 48000 divided by the number of channels. If you use all 8 channels, the maximum rate per channel would be 6 kHz. 12 kHz is the maximum you can expect with 4 channels.

 

I cannot tell from the data you sampled at 5 kHz what the spectrum really looks like. The data looks suspiciously like it is undersampled.  Can you change the acquisition VI temporarily to record just one channel at 48 kHz? Then record the raw impact of your hammer and post that file. The filtered signals are irrelevant at that point. Then someone can probably advise you on the sample rate you will need.

 

Lynn

0 Kudos
Message 6 of 8
(2,946 Views)

This file is the hammer at a rate of 48k Hz 60k samples, the rest are now up to 12kHz each i believe we can get it up to 16kHz each but we are limited by the amount of DAQ assistants we have and USB ports mostly. 

 

hopefully the sampling at 48k is too much and we can reduce it abit. 

 

Thanks

 

Shaun

 

0 Kudos
Message 7 of 8
(2,930 Views)

Shaun,

 

It looks like there are two issues.

 

1. The amplitude is too large at the beginning of the response.  From about 0.6 to about 0.75 or 0.8 s the top peaks are clipped. For part of that time the bottom peaks are also clipped. The worst problem is that it appears that an amplifier somewhere in the system is slow to come out of saturation. This broadens (prolongs) the clipped peaks. That makes any timing derived from that data questionable. Compare the 30 ms segments shown below.  Notice that the clipped signals have a much lower frequency than the non-clipped signals.

 

Clipped data.png     non-clipped.png  

 

2. I ran a spectral analysis of the segments shown in the graphs above. The clipped spectrum is only about -30 dB at 24 kHz. The non-clipped spectrum is down to the noise floor (~50 dB) at about 12 kHz.  Look at the non-clipped data above. Between .801 and .802 (1 ms) there are 4 or 5 cycles of the data, which means that the frequency is 4-5 kHz. To satisfy the Nyquist criterion this signal needs to be sampled at >10 kHz.

 

Clipped spectrum.png   non-clipped spectrum.png

 

To make your location measurements, you need undistorted signals. The clipped signals are unsuitable because of the time it takes to come out of saturation.  You cannot use data from late in the pulses (such as the 800 ms non-clipped graph) because you have no reliable way to correlate the data between microphones.

 

Do you have a tuning fork? Preferably one with a frequency of 1 kHz or lower. Mount the tuning fork at the location to be determined. Then tap it lightly with a rubber mallet (or a ball point pen with a soft rubber grip). If the signals received by the microphones are sinusoidal, then you have avoided the clipping issue. And by using a known, lower frequency, you can use a lower sampling frequency.

 

You still want to use the highest possible sampling frequency so that you get the best possible timing/phase resolution.

 

Lynn

Message 8 of 8
(2,918 Views)