Tuesday 8 April 2014

microcontroller - Low frequency present on sampled waveform


I am trying to sample a 50kHz sinewave @ 200 ksps using a 16-bit ADS8517 ADC. I am having a problem in that there is a lower frequency signal present on my input signal as shown:



Sampled output waveform, X axis is sample number, Y axis is sample value


I have scoped the input and it is a perfect 50kHz 500mV signal. The ADC is setup for +/-10V and all circuits follow the datasheet. If I sample a 1kHz signal I get: enter image description here



Answer



There is no low frequency component there, and no screen resolution or sampling problem.


Shannon's theorem says you need at least 2 samples per cycle to represent the waveform accurately, and you have 4, so you are sampling it accurately.


HOWEVER:


Draw a sinewave, and mark 8 equally spaced sample points on it starting at 0, (at 45 degree intervals).


Now imagine the sinewave was sampled at 0, 90, 180 and 270 degrees; highlight those 4 samples and perhaps connect them with straight lines. Note the peak amplitude is the same as the peak amplitude of the original waveform.


Now repeat with the 45/135/225/315 degree set. Highlight and join with straight line. This time, you'll see the peak amplitude is 1/sqrt(2) of the original amplitude - yet both representations are correctly and accurately sampled representations of the original sine.


(First set : green points, second set, blue points) enter image description here



All you're seeing in the first plot is this correct sampling drifting between these two forms, as your signal and sampling rate are not precisely frequency locked.




The reason that either the sampling points, or a straight line interpolation, don't appear to reproduce the original waveform correctly, is that their spectrum extends above the Nyquist limit (Fs/2).


If you correctly band-limited the reconstructed waveform, with BW less than FS/2, you would draw it as the smoothest possible curve between the points, (alternatively, you would low pass filter at FS/2 with a reconstruction filter - or interpolate using Whitaker's Function - another way of saying the same thing) and that smooth curve would, of course, be the original sine wave.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...