12-06-2010 07:19 AM
Hi,
I am using a pxi-4461 and I am trying to acquire an input signal like sine or square wave but it doesn't really work at the moment.
I have set the sample clock rate to 200 000 because I need to acquire signals up to 100 kHz frequency.
When I run the VI the displayed input wave keeps shrinking and expanding. I thought it could be a grounding problem but the signal comes from a function generator so the function generator and the pxi chassis have actually the same ground through the power network.
Can somebody please advise what I'm doing wrong or what would be an efficient way to do this.
Thanks,
Krivan
12-06-2010 07:41 AM
Krivan,
Since you did not save any data with your VI, it is hard to tell exactly what is going on. From the description I would guess that your are seeing aliasing.
You need to sample at a rate GREATER than twice the highest frequency component in your signal. Suppose you have a sinusoidal signal at exactly 100 kHz with a peak amplitude of 1 V and you are sampling at exactly 200 kHz. If the sample clock is at the same phase as the zero crossings of your signal, all the samples will be exactly zero. This does not describe a sine wave! If the sample clock and signal are 30 degrees apart then alternate samples would have values of +0.5 and -0.5 and you might think the signal had an amplitude of 0.5, not 1.
If your signal is at 99 kHz and you sample at 200 kHz, successive samples will occur a few degrees earlier on each cycle of the signal. It may take hundreds of samples before you can easily determine the actual frequency and amplitude of the signal by looking at the sampled output on a graph.
If you have a 100 kHz sine wave as part of your signal and you need to measure its amplitude quickly, I would suggest sampling at a much higher rate, say 1 MHz or higher.
Lynn
12-06-2010 08:23 AM
Hi Lynn,
yes, I would like to sample at 1 MHz or more but the max sampling rate of the PXI-4461 is 204.8 kS/s...
Sorry I forgot to mention in my previous post that this phenomenon happens basically at any signal frequency. Say I set the [square wave] signal freq to 1 kHz. The result I'm getting at AI is a square wave whose overshoot is moving slowly up and down constantly that seems to me like a 50 Hz noise which is unlikely as the instruments are grounded through the power network.
I tried to save data of this which I attached.
Thanks.
12-06-2010 09:58 AM
I think you are seeing the effects of non-synchronous sampling and aliasing. In the data set you posted the effect is not very obvious. If you expand the first 100 samples and select a plot style which places a dot or marker at each sample point, you will see that most transitions and most of the overshoots have only one data point. The probability that these few point accurately depict the shape of the overshoot and the transition is quite low. The overshoot lasts less than 10 microseconds (if the sampling rate was 200 kHz). That means its frequency components have a fundamental frequency of at least 50 kHz. If the shape is not sinusoidal (and of course it is not), then several harmonics would need to be includes to properly reconstruct the overshoot waveform. But the sampling rate is too low to get anything beyond the second harmonic. Therefore the higher harmonic components will be aliased.
Since the board will not sample any faster, you cannot get all the high frequency information out of your waveforms.
Lynn