Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

based on original Audio SineWav , how can I convert to frequency response?

I want to implement a application to calculate the frequency response of one audio device?
For example, I can let speaker output frequency from 1K to 6K.
Then I can get the original signal wave from microphone. for example :The signal wave value = 200*sin(i)..
But how could calculate the gain of freqency response based on the above raw data?
And is that possible to present the gain by dB FS?
0 Kudos
Message 1 of 4
(7,173 Views)

Hello Bird!

First, the best way to capture audio data is with one of our DSA boards.  For instance a 4472. Next, once you have the data in a LabVIEW you have many options todo the analysis.  In LabVIEW you have access to a fair amount of frequency analysis functions but what I believe may help you todo this most effectively is the Sound and Vibration toolkit.  In this toolkit there are a collection of functions such as Sine Swept Measurements that are specifically designed to analyise frequency response.

Let me know some more specifics about your system such as hardware and software you want to use and I can maybe get you some more specific help.  Have a great day!

 

Allan S.

National Instruments

0 Kudos
Message 2 of 4
(7,169 Views)
Thank you for your response,
 
My tool-->   HW: PC sound card, SW: VC++ + NI component work (not labview)
Is that possible to implement the frequency response function?
The currently I plan to implement like the following, and could you check if the following code reasonable?
 
for f = 100 to 6 k hz
{
    let Sound card + speaker send out f hz sound
    let Sound card + microphone to caputure wave in m_WavArray
    //********* Is the following code/algorithm correct ????*******************************************
    CNiMath::ACDCEstimator(      m_WaveArray,       _ac_lvl,       _dc);
    _ac_lvl = _ac * 2 * sqrt(2.0);
    _ac_dbFS = 20 * log10(_ac_lvl / 65535);
    //*************************************************************
    set power(f) = _ac_dbFS;
}
 
I don't know how to convert m_WaveArray to the gain in Frequency reponse.
 
0 Kudos
Message 3 of 4
(7,164 Views)
Hi Bird,
 
The simple Frequency Response function is called CNiMath::TransferFunction.  Also, if you would lile to compute mulitple network function for the same set of data  you can use CNiMath::NetworkFunctions.  If you search the Measurement Studio Help, you will see detailed information on these two functions.
 
 
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 4 of 4
(7,142 Views)