04-30-2017 03:03 AM
Hello,
I am attaching the lab view code in which I am trying to get the Frequency response and time domain response of the microphone signal whenever I play a single tone sound through the speaker, the amplitude seen in time and frequency domain are different one of the reasons could be the supply voltage frequency may be causing disturbance so I applied the 100 Hz filter in the code but still its not showing expected results i.e. the amplitude in the frequency up to 100 should diminish?? why?
Regards,
Trupti
Indian Institute of Technology Mumbai
04-30-2017 10:08 AM
Right now, I don't understand what your problem is. Maybe you can show us an example (using your data maybe) of what is your problem?
04-30-2017 10:20 AM
I suspect you don't understand signals and FFTs (I apologize if I'm totally wrong about this, and the problem is you don't understand LabVIEW, instead).
If you are learning LabVIEW, and something "doesn't look right", try starting with a very simple example whose answer you know (to within a factor of, say, 2) and see what LabVIEW gives you.
So you are playing a "single tone sound through a speaker" and analyzing it. OK, here's a VI that generates a pure sinusoid (1000 points, 10 cycles, amplitude 1), converts it to a waveform sampled at 10KHz (your problem used 1400 points at 14KHz, but it's easier taking the reciprocal of 10K than 14K), and doing an FFT.
Here's the Front Panel (this is a LabVIEW 2016 Snippet, but you should be able to recreate this simple VI in LabVIEW 2014 ...).
Well, this (more-or-less) makes sense. There seems to be a factor of 1/sqrt(2) in the amplitude plot, but this may well be the "intended behavior" (RMS and all that). Note that the Phase makes perfect sense (do you see why? Which point(s) have validity in that plot?).
I can't see what your microphone is giving you, but before you try out code on "real" data, be sure you understand how it should work on "data you control".
Bob Schor
04-30-2017 11:31 AM - edited 04-30-2017 11:35 AM
@Bob,
I am not an expert in LABVIEW I am in learning stage of it
I am using DAQ
“NI PCIe - 6351, X Series Multifunction DAQ (16 AI, 24 DIO, 2 AO), 1.25 MS/s single - channel sampling rate”
and a speaker which is able to produce frequency from a range of 20Hz to 20KHz and two electret microphones
I am trying to create a LABVIEW program which will be able to create a single tone of desired frequency using speaker connected to A00 output port and the microphone which will be connected to ai0 and ai1 terminal will sense that sound and I am trying to get the time domain and frequency domain data but the problem which I am facing is that if I am giving 2000 Hz frequency input to my speaker, it generates that particular tone with constant amplitude (input from user end as 0.5 V)but while recording the same using microphone in my experimental setup it shows an amplitude of 10E-4 or 10E-3 range in frequency domain and 0.38 to 0.4V amplitude in time domain at that particular frequency along with showing some random amplitudes at it's in line frequency for e.g 6000,10000Hz and its showing more prominent peaks in below 100Hz region how to avoid it using filter so that I could get the correct response . I hope it's making sense
Regards,
Trupti
05-01-2017 12:56 AM
There seems to be a lot of assumptions and information missing in your setup and question.
From your description, this is what I assume your setup to be...
A "voltage" measurement is meaningless. The speaker, environment and microphone will all introduce distortions affecting your frequency response. Bob is right. Verify your code on clean sample data first, then start to look at your output and input stages. Make sure you understand the maths, measurement units, scaling factors and conversions before trying to evaluate the magnitudes seen in your results.
http://dilbert.com/strip/2015-05-10
05-01-2017 02:01 AM
Hello @TroyK
This is how my experimental setup look like
05-01-2017 07:52 AM
What your drawing seems to show is three inputs from three microphones coming in on a single wire each (i.e. you are going in to the A/D converter in a "single-ended" configuration, with no indication of where anything is grounded). Also, you show no connections to the D/A circuitry. Do you need a course in basic Electronics?
Bob Schor