# Harmonic analyzer tool

-February 19, 2014

Analyzing Crystal Oscillators and Harmonics

Introduction – Because of their typically fast edge rates, crystal oscillators can generate a large number of high-order harmonics. Figure 1 indicates a generalized trapezoidal digital signal. The amplitude and harmonic frequencies from this are dependent on the rise and fall times, the amplitude, pulse width and period as defined below.

Figure 1 - A generalized trapezoidal digital signal.

The spectral bounds of this trapezoidal waveform may be determined by using the specifications in Figure 2. For simplicity in the calculations, let’s assume the rise and fall times are equal.

Figure 2 - The spectral bounds of a trapezoidal digital signal. For simplicity, it is assumed the rise and fall times are equal.

The maximum amplitude is determined by the amplitude of the digital signal and the ratio of pulse width to period. The first break point is determined by the pulse width and the second break point is determined by the rise time.

Here’s a handy chart (Figure 3) based on 1/PI*rise time that you can use to estimate the highest-order harmonic likely to be seen, given a specific rise time from a digital source. By measuring the rise time of an oscillator or high frequency fast-edged source, you can estimate the highest expected harmonic.

Figure 3 - Estimated rise time versus highest expected harmonic frequency.

To help you identify these harmonics, I developed this spreadsheet analyzer. By entering the crystal oscillator frequency (MHz) in the green box, all the higher order harmonics will be calculated in the second column. The first column indicates the harmonic number.

Likewise, if you observe a harmonic and wish to determine the possible crystal oscillator frequency that may be generating it, enter the harmonic frequency in the green box then look down the list of sub-harmonics in the third column to determine whether any frequencies match one of your oscillators.

How to create the spreadsheet - Enter the following data in the cells specified:

B7: is the frequency to be analyzed and the cell is labeled “freq”.
B8 through B107 is a numbered list from 1 through 100.
C8: =freq
C9: =freq*B9 (then copy down through C107)
D8: =freq
D9: =freq/B9 (then copy down through D107)

Example 1 - Determine the higher-order harmonics of a 133.33 MHz clock.

Figure 4 – A partial view of the crystal oscillator analyzer. It can calculate higher-order harmonics up to the one hundredth.

Enter 133.33 MHz in the green box. The higher-order even and odd harmonics of 133.33 MHz are displayed in the second column. You might then expect to see harmonics at 266.66, 399.99 (400), 533.32 MHz, etc.

Example 2 - You observe a strong harmonic at 780 MHz. Find the possible crystal oscillator frequencies that could be the source.

Figure 5 - An example showing the possible crystal oscillator frequencies that could generate a harmonic at 780 MHz.

Enter 780 MHz into the green box. Now, look in the third column and observe that common crystal oscillator frequencies of 26, 30, 60, plus several others, could be the source. You would need to examine the circuitry to determine if any of these oscillator frequencies are being used.

Now, here’s an interesting question. What if your circuit uses a 26 and 30 MHz crystal oscillator? Both could generate higher-order harmonics at 780 MHz! In this case, you need to determine whether one or the other or both are creating this harmonic.

There may be the case where two, or more, crystal oscillators generate the same harmonic frequency – one possibly being higher than the other in amplitude. In that case, narrow the spectrum analyzer RBW down to 1 kHz (or less) and center the frequency on the harmonic. By narrowing the RBW, it might be possible to resolve the multiple harmonics. Then, to identify the specific oscillator generating the highest amplitude harmonic, try touching the oscillator output with your finger or with the point of a lead pencil. This may load down the output sufficiently to see one of the harmonics move slightly in frequency. If that doesn’t work, try shooting each oscillator with a can of “freeze spray” and watching for slight movement of one of the two harmonics. Once you’ve identified the source of each harmonic, then you can apply filtering, shielding or other remediation to lower the harmonic amplitude.

For more...

The above harmonic identification technique was discussed in more detail in this blog posting.