I am trying to make a DFT on a signal with frequency f=50 MHz main component plus some noise. As far as I know if I sample it at F=100MHz I should be able to get a proper plot of the DFT since F=2f and I should see a peak at 50MHz, this instead does not happen,see first figure. enter image description here But instead I obtain what expected when I am leaving unchanged all parameters of DFT (sampling period and number of samples) but halving the signal frequency to f=25MHz, see second figure enter image description here

Can anyone explain to me why this happens? From Nyquist theorem I should be able to see the 50MHz component if sampling at 100MHz

Thanks for helping

  • 2
    $\begingroup$ Note that Nyquist said that the sampling frequency has to be larger (not equal to) the bandwidth. Sampling $\sin(2\pi f_0 t)$ at rate $2f_0$ results in the all-zero signal. Your second plot can be explained by aliasing. $\endgroup$
    – MBaz
    Nov 11 '18 at 22:08
  • $\begingroup$ Is this true even if I am not starting to sample at t=0 but t=1/(4f0) so that I am always taking non zero samples? $\endgroup$
    – usernamer
    Nov 12 '18 at 9:04
  • 1
    $\begingroup$ Your first plot has a magnitude < -210 dBm. See Parseval's Theorem. If this is for a real signal then for FFT result indicates that the time domain samples are very nearly zero! Therefore there is virtually no signal (-210 dBm is virtually no signal) in the frequency domain. $\endgroup$ Nov 12 '18 at 12:06

The second plot is correct, 25 MHz tone where you halved your input frequency to 25 MHz. I suspect that you may be sampling synchronously a real signal such that the samples are all landing close to the zero crossings (noticing the dB scale on the horizontal axis on the first plot that there is minimum signal content in your FFT). If this was done with complex sampling the tone would always show up somewhere in the digital domain from 0 to $F_s$. But with real sampling we can get a null at $F_s/2$ as you are seeing with synchronous sampling at or close to the zero crossings.

  • $\begingroup$ I am sampling a real signal, and I would like to ask a clarification: I am making my measurements in order to get SINAD and thus ENOB, and I have noticed that result depends on the initial phase of the sinusoid I am sampling, in facts depending on the initial phase the samples are landing at different values of my waveform, but as long as I am sampling at 2f I guess it shouldn't matter, should it? As far as I know DFT should not depend on the exact phase where I start to sample the signal, so what am I doing wrong? $\endgroup$
    – usernamer
    Nov 12 '18 at 9:30
  • $\begingroup$ You should sample with a clock that is not coherent to your test waveform, otherwise it will be quite dependent on the phase (just make a sketch of your example when sampling at exactly 2F, and then consider an input frequency that is off by 1 Hz; you will see that your samples roll over the waveform at a 1 Hz rate, so if you have a time capture > 1 sec you will be able to represent that waveform with a DFT), and you should sample with a rate that is sufficiently greater than twice the frequency so that you can implement a realizable anti-alias filter prior to sampling. $\endgroup$ Nov 12 '18 at 11:57
  • $\begingroup$ However you are also seeing the results of spectral leakage (in my example above you would need to capture much greater than 1 sec to minimize that). You should use a window (such as Kaiser) prior to taking your DFT and be aware of the Kernel of your window so that you ignore it in your computation of SINAD (the sidelobes of the window need to be lower than your expected SINAD). $\endgroup$ Nov 12 '18 at 11:59
  • $\begingroup$ This post may help you: dsp.stackexchange.com/questions/6364/… $\endgroup$ Nov 12 '18 at 12:02
  • $\begingroup$ And also this post: dsp.stackexchange.com/questions/40259/…. So to do this test, I would use a non-coherent test tone at the level recommended by the ADC Vendor (usually 1 to 2 dB below Full Scale), and I would choose my sampling rate depending on the bandwidth of the anti-alias filter used, ensuring that any aliased products are below the SINAD I am expecting to measure. In practical applications you would no use an ADC for input signals close to half the sampling rate for the sampling of real signals, .... $\endgroup$ Nov 12 '18 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.