Spending the time up front to develop a frequency plan for your system can save you lots of headaches.
When designing a printed circuit board, you should develop a frequency plan, something that can be easily overlooked. A frequency plan should be one of your first steps toward a design that meets EMI/EMC compatibility, and allows for proper choice of decoupling components.
A frequency plan is also useful for test applications, especially for those that test analog components and systems. Spending the up-front time to develop a frequency plan for your system (and developing potential mitigations and design rules based around the plan) can save you lots of headaches at the back end of your design process (integration and test).
Let's cover some basics for the beginners amongst us -- if you who already know the basics of radio, then skip down a paragraph or two. The basis of "modern" radio is the heterodyne transmitter/receiver. Basically, the "mixer" (the device that mixes the baseband signal with the carrier signal) is a nonlinear device. Most nonlinear devices will do, if used appropriately -- transistors, diodes (of various sorts), and so on. At the simplest, most basic level, a mixer input of two frequencies gives four outputs: the original two frequencies and the sum and difference signals (in the frequency domain). See Figure 1.
Figure 1. Mixer inputs and outputs.
For instance, if you inject 1MHz and 20MHz, you would expect output frequencies of 1MHz, 19MHz, 20MHz, and 21MHz. Unfortunately, electronic equipment is full of nonlinear devices such as transistors and diodes. The encoding of the 1MHz (baseband) signal onto the 20MHz (carrier) signal happens in the sum- and difference frequencies (sidebands) shown in Figure 2. The sum is called the upper sideband (USB), while the difference is called the lower side band (LSB). In an amplitude-modulation scheme, these two spectra are "mirrors" about the carrier frequency, so the signal can be recovered using an SSB (single sideband) receiver and a heterodyne receiver.
Figure 2. Frequency domain of the mixer output spectra.
Now think about the spectrum of a square wave. Here's an example: What's the maximum frequency of a 10MHz square wave? If you say 10MHz, not only would you be in (perhaps) the majority, but you'd also be horribly incorrect. So, what is the maximum frequency of a 10MHz square wave?
There are two ways to look at the frequencies in a square wave. The first is to treat it as a slew-rate problem, which may be a good way to figure out your termination requirements, but I say that the best way is to look at it as a Taylor series expansion in the frequency domain.
The Taylor expansion of a square wave is as follows:
A common question then is "The series is infinite; how many terms should we use?" My answer is one I heard from a professor and it seems to be a pretty good rule of thumb for most cases, which is "Five is a sufficient approximation of infinity." Note that the fifth harmonic (5f/5) has just only 20% of the fundamental frequency (f) amplitude. That amplitude may too much for your application, or it may not be so bad after all.
Figure 3. Frequency spectra of a square wave of frequency f.
So how do we use all this? I usually use Excel to generate a table of all my frequencies and their sums and differences. Assume we're testing a 1MHz ADC, but our system is driven by a 20MHz clock that is also divided to a 5MHz clock. We'll also excite our ADC with an 800kHz sine wave. So, the primary frequencies in our system are 20MHz, 5MHz, 1MHz, and 800kHz. These frequencies plus their harmonics out to the 5th are shown in Table 1. It's hard to read here, but you can download the Excel spreadsheet and use it yourself.
Table 1. Initial frequency table for a hypothetical circuit.
Of course, this table simplifies quite a bit.
Table 2. Simplified frequency list from Table 1.
This plan is used in two major ways. First, use it to best ensure that no trace or straight segment of a trace on a PCB is close to an integer multiple of one of the ¼λ numbers. That's because ¼λ conductors are pretty good antennas for the frequency of that wavelength. Knowing the frequencies and their wavelength's in your system can help for predicting EMI emissions. The same thing applies to test leads, as these "tones" can couple back into your test equipment, giving you false information.
A frequency plan tells you most of the frequencies of concern. Make sure that your analog front-end circuits reject all but the frequencies of interest. Make sure that your power-supply filters and other back-end components are protected from these frequencies.