02-03-2017 03:04 AM - edited 02-03-2017 03:07 AM
Hi all,
I have coded a vi which is generating signal at analog output using DAQmx write at 500k S/s. I have used the DAQmx write in non-regeneration mode. So, in the first second, I am sending 1msec burst of sine wave (applied with hanning window) with 5k Hz frequency followed by zero voltage for remaining 1sec-1msec= 0.999sec. In the 2nd second, I am sending 1msec burst of sine wave (applied with hanning window) with 5+1=6k Hz frequency followed by zero voltage for remaining 1sec-1msec= 0.999sec.................and in this way, I am increasing the frequency of burst by 1K Hz to reach 50k Hz. It is a kind of frequency sweep. After which I can stop generation and acquisition simultaneously.
At the acquisition side, I am recording the reference signal (a0 to ai0) at one analog input channel. At another input channel, I am recording the received signal. This received signal is highly attenuated and noisy (because a0 transmits the signal into a water pipe at one end and this signal is received at the other end).
I have synchronized the acquisition and generation tasks. You can see the attached vi.
The transmitted signal is not periodic because in the first second, I am sending out 1msec of 5kHz frequency followed by 0.999 sec of zero voltage and in the 2nd second, 1msec of 6kHz frequency followed by 0.999 sec of zero voltage.......45th second: 1msec of 50kHz frequency followed by 0.999 sec of zero voltage.
Once, I have logged the two channel data into tdms file, I want to find the phase difference between these two signals (reference and received) in chunks. That is, I want to first compare 1st second of reference and received signal to find what is the phase difference. Then I want to compare 2nd, 3rd....45th second of reference and received signal to find what is the phase difference.
The Difference between these successive phase differences can tell me about important information.
I read about finding phase difference using cross-correlation and FFT. Which one is better and how can I apply these techniques in labview. I don't want to implement phase calculation in the same vi. I can use the logged data to find phase difference using separate vi.
Solved! Go to Solution.
02-03-2017 04:15 AM - edited 02-03-2017 04:31 AM
I have done similar task to measure the dispersion in a hopkinson bar.
Unfortunatly I can't read your vi, please repost in LV2012 and if you have a diagram inside: include some sample data.(Make current values default in a diagram with data). or add a the 46s of data ;).
You have a clean record of the exitation... and a longer response part.
Since it's a sine bust, it will contain more frequencies than the sine frequency , but the major energy content should be there 😉
I cut out the intersting part of the response, with some more points at start and end , and used a flat top window for a DFT.
Match the windowlength to match a DFTbin freq. with your main exitation freqs.Keep it constant for all bursts
The same window length is used for the DFT for the exitation part.
The time between these two datasamples is known and can be added to the phase difference you now can calculate by the two DFTs. (predictive phase unwrapping can be usefull 😉 )
Since you get more bins (frequencies) at each burst, keep that information and use it to calc a (energy weigthed?) mean 🙂
I didn't used bursts , I used a single pulse, but that makes no big difference 🙂
I hope you know the frequency response of your transmitter , if not, you need two different known sensor positions 😉