I am trying to sample sinusoid signals using AD7928, which is a 1 MSPS ADC. It is connected to an Altera Cyclone V FPGA, and runs at 20 MHz master clock. Data rate is 1.25 MHz and that's due to the fact that the ADC outputs a new sample every 16 cycles. Using SignalTap Logic Analyser, I monitor the output of the ADC, and it is clocked with the same data rate frequency (1.25 MHz) to meet Nyquist criteria. Input is a 440 Khz sine signal (under Nyquist's frequency 500 KHz), however, it looks distorted in SignalTap, figure below depicts it. 440 KHz Sine
If I apply a higher frequency signal like 1019 KHz, it looks like a regular sinusoid signal. 1019 KHz Sine
As I change the frequency, signal dilates and contracts.
What do you think is the reason?
-
1\$\begingroup\$ Is it really distorted ? At 440KHz for 1Msps, you have barely more than 2 samples per period. The beat frequency (larger ondulations) is around 11 samples, so input frequency should be around 1MHz/2 * (10/11)=454kHz. The lower signal is aliased. \$\endgroup\$Grabul– Grabul2015年01月01日 18:34:58 +00:00Commented Jan 1, 2015 at 18:34
-
\$\begingroup\$ don't you have to sample at least twice the maximum spectral frequency of your siganl to meet Nyquist criteria? \$\endgroup\$vicatcu– vicatcu2015年01月01日 18:40:36 +00:00Commented Jan 1, 2015 at 18:40
-
\$\begingroup\$ While it's not the source of your problem (which as has been pointed out is merely one of interpretation), it sounds like you are overclocking your adc by 25% (1.25 MSPS vs 1 MSPS) - it may or may not give good results, and may vary from chip to chip. \$\endgroup\$Chris Stratton– Chris Stratton2015年01月01日 19:03:01 +00:00Commented Jan 1, 2015 at 19:03
-
\$\begingroup\$ @TEMLIB I didn't get your point about "beat frequency" and what is the 454 KHz signal? would you please elaborate? \$\endgroup\$Siraj Muhammad– Siraj Muhammad2015年01月01日 20:57:03 +00:00Commented Jan 1, 2015 at 20:57
-
1\$\begingroup\$ @Siraj : Imagine tuning a guitar, with two strings playing the same note. If the two strings are not perfectly tuned, you will hear a beating modulation whose frequency is the difference between the two strings frequency. Here, we see a similar modulation between the 440kHz sine and the 1Msps/=500kHz sampling frequency. The envelope period is about 11 samples, there is a 1/11 frequency difference. \$\endgroup\$Grabul– Grabul2015年01月01日 23:31:34 +00:00Commented Jan 1, 2015 at 23:31
2 Answers 2
The problem is that SignalTap is not applying the correct reconstruction algorithm when displaying your waveform. Instead of using a brick-wall low-pass interpolation filter, it's simply using a zero-order hold, which turns each sample into a horizontal line segment.
The sample points themselves really are proper samples of your 440 kHz sinewave. You can prove this to yourself by working it out on paper: draw several cycles of a sinewave that has a period of 2.27 µs, and then show where samples taken at 0.8 µs intervals would fall. Draw a horizontal line from each sample to where the next sample is taken, and you should end up with something that looks very much like what SignalTap is showing you.
-
\$\begingroup\$ Thanks for this explanation. Actually I figured out that I posted the wrong picture, it was for a signal captured in SignalTap using a 20 MHz clock for SignalTap, i.e. I used a higher clock frequency than data rate frequency. Now I changed it, however the same result. I think that won't change anything in your explanation, right? \$\endgroup\$Siraj Muhammad– Siraj Muhammad2015年01月01日 21:03:15 +00:00Commented Jan 1, 2015 at 21:03
-
1\$\begingroup\$ Right. Using the higher-frequency clock just made the "horzontal lines" more obvious, since each sample value was repeated 16 times. But the underlying theory remains the same. \$\endgroup\$Dave Tweed– Dave Tweed2015年01月01日 21:44:18 +00:00Commented Jan 1, 2015 at 21:44
-
\$\begingroup\$ Actually I am trying to use the ADC to demodulate FM signals by means of a wired channel. Is not there any solution to overcome this problem using this particular ADC? or should I use faster one? \$\endgroup\$Siraj Muhammad– Siraj Muhammad2015年01月01日 22:43:32 +00:00Commented Jan 1, 2015 at 22:43
-
\$\begingroup\$ That's a rather complicated topic, and should probably be asked as a completely separate question, and it should be perhaps be asked in DSP.SE, where you'll probably get a better answer. The issue is that the information you want is encoded in the zero-crossings of the signal, and the raw ADC sample rate is not giving you a lot of detailed information about the timing of the zero crossings. It takes some signficiant processing to do good FM demodulation that close to the Nyquist bandwidth of the ADC. \$\endgroup\$Dave Tweed– Dave Tweed2015年01月02日 02:22:57 +00:00Commented Jan 2, 2015 at 2:22
Dave Tweed's answer is completely correct (+1) - I'll just add that (for given results) the sophistication of the reconstruction filter is going to need to be a lot less if you can sample significantly above the Nyquist frequency of the highest frequency component in the signal.