This is Part 2 of a multi-part series. Please follow SIGMADESIGN on LinkedIn to read more!
In Part 1, we compared digital and analog communication, and discussed some reasons why digital signaling has come to dominate modern electronics. This second part will be dedicated to studying some of the fundamentals that are necessary to understand the reasons why “high-speed” digital design can be challenging. Our first stop is something called harmonic analysis.
The signal-processing related mathematical theory we are about to discuss applies to any quantity that can be measured or described over time, even outside the context of electronics. For example, it could be voltage, audio (both 1-dimensional), or even images, ocean waves, wind (all 2-dimensional), video (3-dimensional), and more.
When we look at how a measurable signal behaves over time, we usually plot with time in the horizontal axis (the independent variable), and that measured signal in the vertical axis (as the dependent variable). This is called a time-domain plot. When you use an oscilloscope, you will receive precisely that representation on its screen: time in the horizontal axis, and voltage in the vertical.
If we take the function of the signal over an interval of time, and treat it as if it were an infinitely-repeating wave, we open up a new way to look at the behavior of that function. In a wave, our signal could be seen as vibrating (or oscillating) up and down (the Alternating-current [AC] component) around a reference value (the Direct-current [DC] component). The simplest kind of wave is a sine wave (Figure 1). Sine waves are endlessly repeating and can be described completely by the three properties of frequency (how often it repeats), amplitude (how high and low it goes), and phase (how much it’s shifted left or right). For example, ideal domestic power (also known as “grid” or “wall” power) in the US has a frequency of 60 Hz and an amplitude of 120V RMS. The wave-like nature and lack of a DC component is why we often refer to domestic power as “AC Power.” (One should keep in mind, however, that any sort of electric power can (and almost always does) have some AC frequency component, so the colloquialism is a bit of a misnomer.)
But how can we analyze more complex waveforms than the sine wave, such as those found in the audio we hear every day, or the voltages in our electronics? After all, we are not limited to hearing only one audio tone at a time; we can hear any number of them at once. This is where Fourier Analysis (one type of harmonic analysis) can help us out. The idea behind Fourier Analysis is that any wave can be described as the sum of many sine waves (Figure 2) of differing frequency, phase, and amplitude. Using a Fourier Transform, we can transform our function of voltage over time to a different way of looking at the same function: amplitude (vertical) over frequency (horizontal). This is called a frequency-domain plot.
In Figure 3 below, you can see a time-domain plot of a signal from a bass guitar, where the open “A” string (55 Hz) has been plucked. All we see, though, is a complex wave and it’s hard to make sense of its behavior. In Figure 4, however, you can see a frequency-domain plot of that same signal, which is much easier to reason about. Amplitude is shown in the vertical axis, and now frequency is shown in the horizontal axis instead of time.
Since the time-domain signal has a DC component (it’s centered at an amplitude of approximately 2.75), you can see that at the 0 Hz position on the frequency-domain graph. Then, the first spike at 55 Hz; as the lowest AC component frequency, this is also called the fundamental frequency, and this is also the primary “note” that our brains will hear. Then, there are further spikes at the harmonic frequencies that (in this case) occur every harmonic, or step size equal to the fundamental (55 Hz). Each harmonic contributes complexity to the sound we’re hearing, and those higher harmonics (overtones) are what lets us discern between a bass guitar sounding that note compared to a bass drum or a string bass playing that same note.
Another thing you might notice about the frequency-domain plot is that amplitude is often represented using a logarithmic scale (instead of linear) to make the visualization as useful as possible. Even though it makes for a better visualization, it’s very important to remember this: what looks only slightly lower in amplitude might really reflect a substantial gap! Finally, you’ll see fuzzy lines along the bottom edge, which represents the noise floor of the test equipment that this was measured on; you can safely ignore that part, instead focusing your attention on the peaks. Keen readers may have also noticed that the frequency-domain plots are missing phase information and that time has been lost in translation; I am glazing over these points in the interests of simplicity.
The frequency-domain visualization is far more useful to us than the time-domain because it shows us the frequency components of the bass guitar’s waveform, and these frequency components are what we hear in the note. Harmonic analysis lets us look at signals through a different lens that may be more meaningful to us. (As a note: you may hear some folks refer to harmonic analysis as “FFT.” This means Fast Fourier Transform, and is simply the name of a specific algorithm that can perform the Fourier Transform very quickly, and modern oscilloscopes can use this algorithm to perform a time-domain to frequency-domain conversion in real time.)
Anyone who has played with audio synthesizers might know some common basic waveforms: sine, triangle, sawtooth, and square waves. Each type of basic waveform has a characteristic geometric shape in the time-domain and demonstrates characteristic frequency-domain harmonic behavior.
The sine wave (Figure 5) is the simplest of them all. It has only one frequency: the fundamental frequency (also known as the first harmonic), with no higher harmonics (overtones).
The triangle wave (Figure 6) is a bit more complex. It has a fundamental frequency, and then contains odd harmonics thereafter of diminishing amplitude. “Odd harmonics” means that if the fundamental frequency is n, then 1st (n), 3rd (3n), 5th (5n), etc. harmonic frequencies are all present. When looking at this through the lens of Fourier Analysis, this means that we started with a sine wave at the fundamental, but then we added to it other sine waves of increasing frequency and decreasing amplitude until the shape of the summed wave became triangular.
Then, there’s the more complex sawtooth wave (Figure 7), which has both even and odd harmonics. Without all of these harmonics, the shape of the wave could not be a sawtooth.
Finally, we’re going to look at the square wave (Figure 8), which only has odd harmonics, like the triangle wave. The square wave is particularly important to us because it forms the basis for digital signals: signals that transition between one of only two possible states (“high” or “low”).
So, what was the purpose of having gone through this description of harmonic analysis? For now, I want you to understand that a digital signal with a clock frequency of 100 MHz (or, a square wave with a fundamental frequency of 100 MHz) also carries energy in higher-frequency components at 300 MHz (3rd harmonic), 500 MHz (5th harmonic), 700 MHz (7th harmonic), and so forth! The harmonics do go on infinitely (at least in theory), but since they get weaker as you continue, it becomes safe to disregard them past a certain point. All of these harmonics are necessary for our signal to be shaped like a square wave instead of a sine wave. We’ll get to why this higher-frequency content matters later, of course.
SQUARE WAVE ANATOMY
Now that we’ve covered what a square wave can look like in the frequency domain, let’s revisit its anatomy in the time domain (Figure 9). In this specific example, you can see a bit of a curve to both the rising and falling edges; this shape is common, due to parasitic resistance and capacitance within the PCB as well as within the measurement probes.
As mentioned prior, the concept of a square wave is a good abstraction for what a digital signal can look like; clock signals are usually standard (50% duty cycle) square waves, and even data signals can look like square waves in the worst case where their data is alternating ones and zeroes: like “10101010”.
Every digital signal has a rise time and a fall time, because the signals are never truly square. After all, to be truly square would mean that the voltage would have to instantaneously be low and high at a single point in time; in reality, the vertical sides of the square wave are ever-so-slightly sloped, since some small period of time will be necessary to transition between low and high voltage levels. Both rise and fall times have a maximum duration before the signal is no longer understandable by the receiver, a form of poor signal integrity.
However, longer rise and fall times lower the energy in the higher harmonics of the wave, which can suppress radiated emissions, which can be very important for electromagnetic compatibility. You can see already that there is a balance that must be struck between rise and fall times that are too long and those that are too short, as both extremes cause problems.
Now that we have a better understanding of harmonic analysis of digital signals, please join us for Part 3, where we will continue our journey toward the interrelated considerations of electromagnetic compatibility and signal integrity!