# Digital Radio Basics

Since they were discovered, radio waves have been used to either encode information and transmit it, for imaging, or detecting objects, like a ship or an aircraft, at a distance, and there are a broad range of techniques for using radio waves for these purposes.

Knowledge of radio technology, and a little bit of the physics and math of radio, is necessary for understanding what’s possible when building and using networks. Almost every radio used for transmitting digital data operates similarly enough to call this kind of radio “digital radio.” Power, complexity, bit rate, and distance are the parameters, are subject to the laws of physics. The trade-offs between these parameters, like long range and low-bit rates for IoT radios, and optimal performance for mobile data radios in handsets, are what drives design decisions for the kinds of digital radio standards in use today.

### Digital radio

If your high school physics class covered how analog radios work, you may be familiar with the term “modulation” and “carrier wave.” In amplitude modulation (AM) radio transmitters, an audio signal is used to increase or decrease the amplitude of the carrier wave.

The diagram below shows a carrier wave and the results of that carrier wave being amplitude modulated. For AM radio broadcasts, the carrier waves have frequencies in the millions of cycles per second, while sound waves have frequencies in the tens to thousands of cycles per second - at least a thousand times lower in frequency. So an amplitude modulated carrier wave would have thousands to tens of thousands of cycles modulated to represent every one cycle of an audio waveform. The “envelope” of the AM modulated carrier is very smooth.

*Amplitude modulated carrier wave*

The receiver is a tuned circuit attached to an antenna. The receiving circuit resonates at the frequency of the carrier wave, picking that carrier wave out of the sea of radio waves in the air. A detector circuit extracts the audio signal from the carrier wave. The simplest detector circuit uses a diode to rectify the signal, and a low-pass filter, which is simply a capacitor connected to ground. The resulting signal waveform is very close to the audio signal input to the radio transmitted. Sometimes this type of detector is called an “envelope detector.”

In an AM modulated signal, the shape described by the modulated carrier wave is the audio signal and its mirror image. The audio waveform output from the detector conforms to one side of the shape, or envelope, of the amplitude modulated carrier wave. Only a handful of discrete electronic components is needed to implement this type of radio.

Just as analog radios are a very simple way to transmit and receive an analog signal, modern digital radios efficiently encode a stream of bits onto a carrier wave. You might be surprised to learn that the principles of AM radio play a part in many digital radios. The modulation technique we will examine in some detail here is called quadrature amplitude modulation, or QAM.

QAM is designed to make it convenient to encode a stream of ones and zeroes onto a radio signal and detect the waveforms representing those ones and zeros in a radio receiver. While there are several distinct modulation techniques in digital radios, they all share the property that they make encoding and detecting a stream of bits efficient and readily implementable in modern radio hardware.

### Quadrature amplitude modulation

Quadrature amplitude modulation uses phase modulation and amplitude modulation. As the name “quadrature” implies, QAM uses cosine and sine waveforms of the carrier wave, which are a quarter — hence “quadrature” — wavelength, or 90 degrees, shifted in phase as in the diagram below:

*In-phase and quadrature waveforms*

If you add these waveforms together, you get a waveform with a phase shift of 45 degrees, between the in-phase waveform and the 90 degree shifted waveform, and an amplitude that’s somewhat larger than the in-phase and quadrature waveforms before they are added together, as shown in the diagram below.

*The sum of the in-phase and quadrature waveforms*

That’s not quite enough to start encoding binary data. The other key ingredient in QAM are called I and Q values. In the simplest form of QAM, I and Q can be simply positive or negative. “I” stands for “in phase,” which, by convention is the cosine waveform, and “Q” stands for “quadrature,” or the sine waveform. I and Q are multiplied with the in-phase and quadrature waveforms, respectively. So now you have four waveforms: sine, cosine, negative sine, and negative cosine waveforms, 90 degrees apart from each other in phase.

You can add the in-phase and quadrature waveforms together, but not in-phase with in-phase, or quadrature with quadrature because they would cancel each other.

### IQ modulation

Let’s add these together in all four possible combinations. If I and Q are both 1, you get the waveform diagrammed above. By varying I and Q between 1 and -1, you get four waveforms, with four different phase angles. These four phase angles are detected in the receiver. This is called “IQ modulation.”

This table starts looking useful for encoding binary data. If you map ones and zeroes in a bit-stream to positive and negative I and Q values you see you can encode two bits in each output waveform that sums the in-phase and quadrature waveforms. By detecting the phase angles in the receiver, you extract the bitstream.

You can visualize QAM using a diagram called a “phasor diagram.” A phasor diagram shows the results of multiplying the IQ values with in-phase and quadrature waveforms, and adding the resulting waveforms together, in polar coordinates.

For the simplest case of QAM we are describing here, the phasor diagram is also very simple. The circle is the maximum amplitude of the output waveform. The dots are a plot of the phase and amplitude of the four waveforms used in what is called, for obvious reasons, “4 QAM,” at four different phase angles.

*A 4 QAM constellation*

The pattern in the phasor diagram also shows the results of IQ modulation and the result of adding together the in-phase and quadrature waveforms. The phase angle values are the same as in the table above where we showed how combinations of I and Q values result in four different phase angles. The detector circuit in a 4 QAM receiver is the part of a digital radio that detects these phase angles. With four possible values, each phase angle is mapped to two bits of digital data.

While this diagram can show differences in phase and amplitude, 4 QAM doesn’t actually involve any amplitude modulation, like AM radio, and the "AM" in QAM. Every dot in the phasor diagram representing a waveform is at the same amplitude. That’s why this kind of QAM is also known as quadrature phase shift keying, or QPSK. There is an even simpler form of phase shift encoding that does not use a quadrature waveform. That’s called binary phase-shift keying, or BPSK. In BPSK the carrier wave is shifted between two phase angles, usually 180 degrees apart.

The diagram above is also called a “constellation.” But it’s not a very interesting one. This kind of diagram gets more interesting as you add more different values for I and Q.

### Generalized IQ modulation

Thus far, we have shown how data is encoded and decoded using four phase angles and one amplitude. That’s simple, but it doesn’t really access the full potential of digital radios. I and Q can vary by increments smaller than the maximum amplitude of the in-phase and quadrature waveforms.

Suppose we used more values for I and Q. With more values, both phase angle and amplitude are modulated. There is an interaction between phase and amplitude modulation: Different amplitudes for the in-phase and quadrature waves will add up to different resulting amplitudes *and* different phase angles. That is, if you reduce the amplitude of the quadrature wave, adding it to the in-phase waveform will no longer result in a 45 degree shift in the phase angle. You will get smaller phase angle shifts, as well as smaller amplitudes in the resulting waveform.

The only thing we need to change to get from 4 QAM to 16 QAM is to have +⅓ and -⅓ as possible values for I and Q, in addition to +1 and -1. With four values for I and Q there are 16 possible combinations of I and Q. Note that the combinations of I and Q values determine both the number of different amplitudes, and the number of different phase angles. I and Q determine the amplitude of the in-phase and quadrature waveforms, and when you add the waveforms together you get a result that is specific to that combination of I and Q. It’s that simple, for all QAM modulations.

Let’s draw a phasor diagram and see where the resulting waveforms end up in phase angles and also in amplitudes that are less than the full amplitude of the carrier wave. The diagram below illustrates, in polar coordinates, the phase of 16 different sums of the in-phase and quadrature waveforms. The amplitude of those sums is the distance from the origin to points in the constellation. Now the term “constellation” makes a lot more sense.

*A 16 QAM constellation*

This constellation is denser than the 4 QAM constellation. That means there are more phase angles, and three different amplitudes the detector circuit in the receiver must be able to detect.

This is nearer to real-world applications of QAM in mobile devices. The radio in your WiFi access point uses 256 QAM modulation, and future versions of WiFi and 5G radios will use 1024 QAM.

Just as these diagrams will start to look like a blurry blob as the number of dots increases, QAM receivers have practical limits to number of phase angles and amplitudes they can reliably detect.

Radio designers are not limited to square constellations where the dots are evenly spaced. The reason QAM constellations are often square is that square constellations have uniform density. Every combination of amplitude and phase angle is as easy, or as difficult, to tell apart from its neighbors as every other. This is also why the I and Q values for 16 QAM are -1, -⅓, +⅓, and +1. Each value is ⅔ of the maximum amplitude apart, and the resulting waveforms are uniformly distributed in phase angle and amplitude.

### QAM and orthogonal frequency-division multiplexing (OFDM)

QAM describes how one carrier frequency is used. But, in practical mobile radios, multiple frequencies are used together. That's called "multiplexing."

For an example of using QAM with a common multiplexing technique, consider orthogonal frequency-division multiplexing, or OFDM, which is widely used in digital radios. As the name implies, it uses multiple subcarrier frequencies to encode data onto parallel streams. Each subcarrier in an OFDM channel is typically encoded using QAM. That is, OFDM radios are a parallel group of QAM radios.

OFDM is used in mobile handsets to implement LTE and LTE Advanced standards, in the digital audio broadcasting standard known as DAB Eureka 147, and in several digital video broadcasting (DVB) standards.

Now that you know QAM is a common ingredient among many different digital radios, you are better-equipped to cut through the thicket of acronyms, and to understand the trade-offs in radio design.