05-30-2017 12:38 PM
Taking input in ni9215 sampling at 40khz a sine wave around around 20khz I see beats instead of a sine wave. I tried to put a low pass filter at 20khz cut rate but I did not see significant improvements. I tried to bring the sampling rate to 60khz and using a kistler signal handling device to filter at 30khz but it does not improve the situation a lot. Do you know how to help me?
05-30-2017 04:00 PM
If you want to see a reasonable approximation of a sine wave, you'll need to sample at a considerably higher frequency. Some typical rules of thumb are 10x or 20x, so for a ~20 kHz sine wave you'd want a sample rate around 200 kHz - 400 kHz.
When you sample at 40 kHz, you will only see 2 samples per cycle, not nearly enough to reproduce the *shape* of the sine wave. (2x sampling is the minimum needed to identify the *frequency* of a periodic signal, but does a poor job of approximating the real-world continuous signal).
Your device tops out at 100 kHz, or about 5x. 5 samples per cycle will be a little better than 2, but still not very good for seeing shape or amplitude.
Your basic choices are:
1. Understand the implications of your device's sample rate limitation and figure out a way to live with them.
2. Use a different device with higher sampling rate capability and appropriate other specs.
-Kevin P
05-31-2017 02:01 AM
Thanks a lot I also have an old bnc 2120 and this has connected a card that can get to a frequency of 200kS / s the only problem is that it has a pci connector and i can not connect it to new pc
05-31-2017 02:19 AM
Kevin is rigth 🙂 however, if you want to measure amplitude and phase of your sine, capture >10ms (more than 50 periodes) of your signal and use the tone detection vi . With a 5 times higher samplerate it still should work very well.
If you want to measure how clean your sine is, take longer data blocks an use the RMS value of the residual (output option of the tone detection) as a measure.
Take a look at your soundcard, 196 kHz SR is not unsusual nowadays 🙂 (but the timebase of these units can drift!)
Another trick is subsampling ... if you can control the frequency of the signal and use a clever SR you can reconstruct a higher sampled sine periode from multible signal periodes ...