|
Post by garnicmac on Mar 26, 2014 11:01:14 GMT -5
White_Noise.zip (589.4 KB) ***ZIP FILE ABOVE***My partner and I are currently working on a project that involves finding a frequency though the Fourier transform in LabView. Once the frequency is found, we would like to send back a signal tone at that frequency through headphones. We are having trouble making LabView accomplish this through our codes. Attached is a zip file if you would need to see the block diagram, with our project being White_Noise_Final.vi. A secondary issue we are having is setting the 'Fs' and '#'s' as default values of 20k and 5000, respectively. Would anyone know how to change those values? *****We are using LabView 2011 SPI
|
|
|
Post by Jon Slavic on Mar 26, 2014 11:29:49 GMT -5
For the second issue, change your values as you would like. Click Edit->Make Current Values Default. Save your VI.
|
|
|
Post by Jon Slavic on Mar 26, 2014 11:40:51 GMT -5
I believe your code should work. I think your problem is with your white noise. White noise is (or shouldn't) have a dominant signal but rather it's a random scattering of frequencies. This is why your "data and frequency response" graph has no discernible peaks. Is white noise your true input signal or is this just for the example?
|
|
|
Post by Jon Slavic on Mar 26, 2014 11:51:57 GMT -5
Also, you are filtering frequencies from 4KHz and above so your output is all frequencies above 4KHz. If you change your filter to a bandpass and select say 4K-4.1KHz, the FFT will show a peaks between those frequencies and output that 100Hz band of frequencies. If you have a real signal going into this (other than white noise), there are typically frequencies from outside sources that affect the signal. Lights, AC, cell, radio, etc. If your hardware is good enough, you can pick these signals up.
|
|
|
Post by Jon Slavic on Mar 26, 2014 11:53:47 GMT -5
|
|
|
Post by garnicmac on Apr 1, 2014 19:40:54 GMT -5
The test we are running is white noise that will be sent through an enclosed tube, when the tube opens up there is a plateau like effect in the spectrum (Example picture attached). The goal is to find the frequency of the plateau and resend that frequency. We have no way to exactly test this because we have no tubes available, but we believe the code we have will accomplish the goal. Is there a way to set a threshold to find this plateau? We attempted to use the Peaks.VI, but LabView did not agree.Is there something that we are missing? Also, the requirement for the white noise is to be randomized between 1kHz and 10kHz, so the second signal should be in this range. Attachments:
|
|
|
Post by Jon Slavic on Apr 2, 2014 10:57:25 GMT -5
I think your code may work with what you described. You may want to use an oscilloscope or other measuring device to ensure the signal is there in parallel to the code. A lot of times, the code is close with small minor problems. Just make sure you can see your signal in real time.
Are you trying to find the resonant frequency of the tubes?
For your white noise question, you may want to make it a very wide range until you get the system working then narrow the frequency range to see if there is any effect on the signal. Starting off with a narrow band may lead to problems, especially if your frequency of interest is right near one of the ends of your range.
|
|