9
\$\begingroup\$

I have inherited a circuit from another designer using a 12.288 MHz crystal as the source for an audio clock. We recently had supply chain issues and I was asked to approve an alternate part with identical specifications. As part of this I compared an FFT of our "golden sample" unit and the new crystal under consideration.

I was surprised to find that the FFT of both units looked like this:

FFT with two closely spaced peaks

Here you can see two frequency peaks - one at 12.28 MHz (close to the expected 12.288 MHz) - and another with pretty much identical amplitude at 12.72 MHz. This looks like bad news to me - although the audio output sounds fine to my ear.

Does anyone know what the likely cause of this is? Given that this is used to clock a DSP (which uses it as the audio clock source) are there likely to be negative impacts from this sort of behaviour?

\$\endgroup\$
8
  • 3
    \$\begingroup\$ Sample aliasing? \$\endgroup\$ Jul 27, 2016 at 10:10
  • 2
    \$\begingroup\$ Smells like oscilloscope operator error, but I don't own a Rigol so I don't know what to look for. \$\endgroup\$
    – pipe
    Jul 27, 2016 at 10:18
  • 1
    \$\begingroup\$ A DSO with FFT function is not the same as a real Spectrum Analyzer. It could be an artefact of the DSO-FFT. Do you have the possibility to use a real SA? \$\endgroup\$
    – Curd
    Jul 27, 2016 at 10:21
  • 1
    \$\begingroup\$ Are you connecting the scope directly across the crystal? If you do then the capacitance of the probes will "pull" the crystal frequency. \$\endgroup\$
    – Steve G
    Jul 27, 2016 at 10:23
  • \$\begingroup\$ I am probing the output of the crystal amplifier, which still may pull the oscillation frequency a bit, but I wouldn't expect to see this second peak. However I agree that this isn't a true spectrum because of the FFT. I don't have a real SA but will see if I can get access to one. \$\endgroup\$
    – stefandz
    Jul 27, 2016 at 10:45

2 Answers 2

9
\$\begingroup\$

Two observations:

  1. 12.28 and 12.72 are exactly symmetrical about 12.50 MHz.
  2. The displayed wave form seems to have "beats" in it

Beats are either real (you would see beats if you had a mixture of two frequencies present) or they are a sampling artifact. It is not necessary for the sampling frequency to be too low (in the sense of the Nyquist criterion) - it is sufficient for there to be a near-perfect "phase lock" between the sampling frequency, and the frequency of interest.

In this case, I think the beats are a consequence of the way the data is being displayed. I wrote a few lines of code to simulate this. If you assume that your display is 512 pixels wide, and you display one sample per pixel column, then for the given frequency you get the following plot:

enter image description here

Which is indistinguishable from two frequencies beating with each other. Now I know your display is probably narrower than that, but perhaps there is some attempted cleverness in the display software - precisely to attempt to reduce aliasing. But "clever" isn't always the same as "right".

I agree with Olin - put the old analog scope to work... or at the very least, display fewer cycles on your screen to see what that tells you.

\$\endgroup\$
0
12
\$\begingroup\$

This really looks like a sampling artifact on your end, not something the crystal is doing. Expand the scope time scale (lower time/division) until you only have a cycle or two per division at most. If it's a sampling aliasing problem, then the artifact should disappear.

Alternatively, look at the signal with a Ye Olde Analog scope.

If it turns out it's a sampling artifact, go back and read up on sampling theory, paying particular attention to what Nyquist had to say. Also learn about "aliasing".

Basically, a point sampled stream can only preserve frequencies up to half the sample rate. Higher frequencies than half the sample rate look like lower frequencies in the input signal. Put another way, after sampling everything looks like a frequency from 0 to half the sample rate, whether it was in that range before or not.

In practice, it's good to have a healthy margin between twice the highest frequency in the input signal and the sample rate.

\$\endgroup\$
10
  • 4
    \$\begingroup\$ Thanks for this, Olin. Adjusting the capture window to include just one or two cycles per division helps (at the cost of frequency domain resolution). Also, viewing using an analogue scope shows a nice, jitter-free clock. I guess the mistrustful part of me finds it hard to reconcile whether the adjustments I made result in a more faithful representation of the original signal or whether I have just dialled out what I didn't want to see, if that makes sense. Sadly I can't adjust the capture window to be a full number of cycles which would also help. \$\endgroup\$
    – stefandz
    Jul 27, 2016 at 11:10
  • 4
    \$\begingroup\$ @stefandz This is why I hinted at perhaps operator error - I wouldn't be so sure that the FFT in Rigol works with all those 1 Gs/s when you're zoomed-out. Maybe it has different modes, dropping samples down to a fixed number to gain speed. Maybe you can turn that off. \$\endgroup\$
    – pipe
    Jul 27, 2016 at 11:14
  • 2
    \$\begingroup\$ @pipe perhaps time for me to RTM! \$\endgroup\$
    – stefandz
    Jul 27, 2016 at 11:15
  • 2
    \$\begingroup\$ @stefandz Rigol scopes (at least the 1000Z series) have this habit of outputting measurements based on the displayed data only. I believe that even with a 1Ts/s sampling rate you will be limited by what is shown on the screen. Try to acquire the raw data and compute the FFT on a PC to see if you get the same result. Something like this rheslip.blogspot.com/2015/09/… might help. \$\endgroup\$ Jul 27, 2016 at 13:21
  • 1
    \$\begingroup\$ @Dmitry: Yes, that sounds like something to at least consider when you see that kind of artifact. \$\endgroup\$ Jul 27, 2016 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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