Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Why is there a change in response for different sampling frequencies?

I am relatively new to DAQ and trying to use the Sound and Vibration Toolkit's SweptSineFRF(DAQmx).vi program to test a frequency sweep for a MEMS device.  I do not understand why when I change the sampling frequency and keeping all other parameters the same, I get a different frequency response on my bode plot.  In my first run I am sampling from 100-10k Hz and my sampling rate is 100kHz.  My next run is 100-100k Hz and sampling rate is 500kHz.  I do understand that I am sampling at 10x and then 5x the maximum frequency.  If someone could shed some light on this that would help me out a lot.
Thank you!
0 Kudos
Message 1 of 10
you may sweep the 100-10kHz frequencies on the MEMS device but how do you know the frequencies of the output?  If the output goes beyond
50KHz then your 100KHz sampling rate will not be adequate and you will get aliasing.
Do not forget that for the Bode analyser you are sampling not only the input but the output of the device on the same time.
I hope that helped,
National Instruments
Applications Engineering
0 Kudos
Message 2 of 10
Thank you for your reply.  I do understand that aliasing is a possibilty if you sample at the nyquist frequency or relatively close to it (and I know 10x is ideal). 
A little about my setup:
My two analog inputs are both MEMS microphone and one industrial.  I am outputing an amplified sine wave to a horn device which is sending a pressure wave to both microphones via a tube and measuring the difference of the industrial microphone (input) versus the MEMS (output).  Are you saying that when I sample at 5x the maximum frequency I should get aliasing?  If so, why would the aliasing occur at the lower frequencies and not just at the higher frequencies.  I am getting a lower magnitude in my bode plot when I sample at higher frequencies on all values?

Also on a side note: is there any way to modify the SweptSine vi to accomodate mulitple response or output channels compared to the same input channel?

Thanks again for your reply!
0 Kudos
Message 3 of 10
Hi Josh,

I just want to describe what I understand the issue to be please let me know if this is incorrect.  You have a Swept Sine Express VI, and have configured it with two different Maximum sampling rates.  You are changing the sampling rate under the advanced tab, and setting a different sample rate. You also change the Start and Stop Frequencies under the Sweep tab as you described.

When you make all these changes you see different frequency response from your circuit.  I assume that you are expecting the same Bode plot, but can you give me a bit more info about what is going wrong with the measurement.  Screen shots of the difference in the plots could help us identify what is causing your difficulty.  I agree if your sweep value is constant then you should not be seeing a big change in the bode plot, but i would need more information to see what is wrong.

I have not tried to do a two channel response measurement, and i don't think it can be done with an express VI, but I am pretty certain we can find a way to do this with the Sound and Vibration Toolkit API.

If you are not using the Express VI at all please post a screenshot of how you have setup this code, or let me know what example program you started from and I am sure we can find a resolution to the bode plot behavior you are seeing.

Have a great day,

Michael D
0 Kudos
Message 4 of 10
Thank you for your reply.  I am using the sound and vibration toolkit's example SVXMPL_Swept Sine FRF (DAQmx).vi.  You are correct in assuming I would like to see the same magnitude response on both my plots.  For my test, I am testing commercial electronics to make sure they are working.  I should see a 40 dB gain in my signal if it is.  I do get fairly close to this but both magnitudes are not the same.  Again, the only parameter I am changing is the sampling frequency.

My ultimate goal is to use this program to test a MEMS microphone array I have built.  I would like to calibrate it against a known microphone and see the response.  Since it is an array, I have mulitple channels to test and would like to save a lot of time by testing more than one channel at a time.  I realize I am limited by my hardware here and that the increase of channels means a decrease in my sampling frequency due to my DAQ card (PCI 6251-limited to 1Mhz when using more than 1 channel).  If you could help me with either of these problems that would help me out a lot.

Thanks again,
0 Kudos
Message 5 of 10
The website would not let me post these here goes...
0 Kudos
Message 6 of 10
Download All
0 Kudos
Message 7 of 10
Hi Josh,

Just to clarify

Your original post says

In my first run I am sampling from 100-10k Hz and my sampling rate is 100kHz.  My next run is 100-100k Hz and sampling rate is 500kHz

This would imply you changed your output frequency to sweep through.  You  have said you did not change this though so I am assuming that is a typ0 and that you simply changed the sampling rate.

I have not found a good explanation for why the fequency phase response seems so odd.  The Magnitude response on the other hand woudl seem to be the result of you exceeding the bandwidth of your device.  I will have to look at it some more, but it seems the response signal you are seeing back is to high of a frequency for the slower meaasurement to show you all the magnitude.

I will let you know what I find out about the phase measurement and see if there is a way to adjust this code to allow for multiple response signals.

Have a great day,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 8 of 10
Sorry for the typo. 
As seen in the actual files I sent you (I had to regenerate the screenshots) I sampled from 100-50kHz (in both samples) and only changed from a 250 kHz sampling rate to a 500 kHz sampling rate.  It does not really matter what I sample from or to, I still get a small difference in response at all frequencies when I increase the sampling rate.  Thank you for looking into this for me.
0 Kudos
Message 9 of 10
What you are seeing is not out of the ordinary.  The FFT is performed on sampled points.  When you increased your sampling rate, you increased the number of points you are performing the FFT on.  At the higher sampling rate the peak FFT values are lower, but the noise floor is also lower so the SNR is probably the same.

Try sampling at the lower sampling rate for twice as long and see if you get the same result as sampling at the higher rate.

Message Edited by rpursley8 on 12-12-2007 10:53 AM
Randall Pursley
0 Kudos
Message 10 of 10