

Random Quote Board
Understanding SSB with Gnu Radio
I've been helping Paul Maine "The SDR Guy" to understand how to use Gnu Radio for single sideband (SSB) demodulation using analog techniques. This helped me, too, to understand how the various analog methods of SSB demodulation and modulation work. I'm going to document what I learned here.
NOTE: Most of the Gnu Radio flowgraphs shown here are for the purposes of explaining and understanding analog techniques. They are not designed for efficiency in a digital signal processing (DSP) system; they are designed to educate.
But, ya know, they do work...
SSB Review
If you're looking for a general review of the different "flavors" of AM, take a look at my post on AM demodulation using digital signal processing techniques.
SSB has been around for just over 100 years. John R. Carson in 1915 invented a SSB method as a way to pack in more telephone calls on long distance circuits1. SSB is a form of amplitude modulation (AM). I say that because, as I was reviewing my notes on SSB, I found a lot of tech writers who talk about "SSB" and then they talk about "AM". The reason is that, according to them, "SSB" refers to a specific form of amplitude modulation in which you're only transmitting a single sideband (as opposed to both sidebands) without the reference signal that everyone calls the "carrier" (a term I dislike, but I have to respect history). In abbreviated form, this is AM-SSB-SC. You can also explain it as the specific sideband being transmitted, such as AM-LSB-SC (lower sideband) or AM-USB-LC (upper sideband). "AM", on the other hand, refers to a double sideband and full carrier, or AM-DSB-FC.
There are three analog methods for generating SSB signals. These are filtering, phasing, and Weaver. Let's review each of them.
SSB Modulation with Filtering
To me, this is the most straightforward method for making single sideband (SSB). Create a double sideband (DSB) signal, then filter out the undesired sideband.



That's pretty much it. According to Miller's and Beasley's "Modern Electronic Communication (Seventh Edition)"2, the filter method predominated because (a) it was the simpler method and (b) it worked well enough to suit most people's purposes. Essentially (according to them), the phasing and Weaver methods might have provided better removal of the undesired sideband, but (as you'll see) they're also more complicated.
However, according to McElroy:
By April of 1950, the magazine [Refers to QST magazine - Gary] would report that hams using phasing methods outnumbered those using filter 2 to 1.
I'll let you decide which one was more popular. Let's continue on.
SSB Modulation with Phasing
The phasing method is actually very similar to the filtering method. The only difference is that it filters out the lower sideband before modulating it onto the RF carrier. Let's start with the block diagram of the phasing method.

Here's a graphical way of looking at how phasing works. Near the very end, just before the add block, the phases of the two branches, I and Q, appear similar to those shown below. In the Q branch, the upper sideband is 180-degrees out of phase with the I branch upper sideband. The lower sideband is in-phase between the two. Depending on whether you add or subtract determines whether you get a LSB (add) or USB (subtract) signal.


The Hilbert Transform
You have no idea how much I wish I'd had Gnu Radio when I was an undergrad. The ability to model different things and see how they actually work is the most powerful aspect of Gnu Radio, bar none. The ability to use it to educate will be its most lasting contribution to the field of signal processing, signal analysis, and RF in general.
That digression is because of how I now look at the Hilbert transform. I learned about the Hilbert transform when I was an undergraduate, and the definition in the textbook was... less than helpful.


If you look at the impulse response of the Hilbert transform, specifically the spectrum of the impulse response, you see the "filter" aspect quite starkly. (NOTE: I pulled the following from my post on "soft" tuners.)


The Hilbert transform creates a complex signal. It combines the input signal, which will be the real portion, with a phase-shifted version, which is the imaginary portion. The phase shift is by -90 degrees.
One of the ways I now look at the Hilbert transform is as a bandpass filter. It removes the negative frequency components of a signal. You might disagree with that, but this works conceptually (for me, at least). But how does it do that? Well, the Hilbert transform does shift the phase of the input by -90 degrees. But that alone doesn't do anything. Let me repeat that: shifting the phase of a signal by itself doesn't do diddly-squat. If I phase shift a signal, all I've done is shift it slightly in time. Big deal. The critical part is that the phase-shifted version becomes the imaginary component, while the original signal remains as the real component. By combining the phase-shifted signal with the original, unshifted signal, we create a complex signal whose positive and negative frequencies are different. Combined, we've created an analytical signal (meaning a signal that has no negative frequency component). Therefore, any time you're using the Hilbert transform, you're also saying, "Complex signal processing to follow."
This is why when you look at the "Hilbert" block in Gnu Radio, it has a "Real" input (the orange color which GRC calls "floats"), and the output is "Complex" (the blue color). The "Hilbert" block calculates the Hilbert transform of the input and outputs it on the imaginary leg, while the original input is simply delayed equal to half of the filter taps and output on the real leg. You need both of them combined as a complex signal for the Hilbert transform to have any meaning.

This is why there are two branches in the phasing method. It's using complex signal processing. The upper branch is the in-phase (I) branch, and the lower branch is the quadrature (Q) branch. Taken individually, each is just a real signal. Together, we can create a complex spectrum, as shown below.


Finishing up the Phasing Method Modulator
We've used the Hilbert transform to give us a single sided signal. (NOTE: It's an upper sideband or USB signal right now.) Which brings us to the next issue: How does the phasing method work if it only has the one (real) output? How can we maintain this single-sided signal with only the real output? The answer is move the complex signal away from DC (0 Hz) by multiplying by a complex sinusoid. Note that this is not a complex multiply, but simply a multiply by a complex sinusoid. What's the difference? The difference is that, with a non-complex multiply by a complex sinusoid, we have to add or subtract the outputs of each branch to get the final single sideband signal. If we performed a complex multiply with our complex sinusoid, then we would only need to take the real part to get our final SSB signal.


How would this work with a SDR? I setup a HackRF connected directly to a RTL-SDR, then I adjusted the Gnu Radio flowgraph to account for this. Gnu Radio input the audio signal and passed it through the Hilbert transform. The output goes directly to the HackRF through the "Soapy HackRF Sink". To keep me in the good graces of the FCC, I connected the HackRF directly to a RTL-SDR through a series of SMA attenuators.



Looking at the chip that the HackRF uses for quadrature modulation (from complex to real), the Maxim Integrated MAX2837 chip, the block diagram seems to show the exact, same setup as with the Gnu Radio flowgraph of multiplication by the complex sinusoid. To confirm the output, I used SDR++.


You may have noticed that the HackRF doesn't flip the spectrum as did the Gnu Radio demonstration of the phasing method. That's because of how most SDRs work. They take a complex input and essentially frequency shift it to the desired frequency. When someone sets up the input, they can see what goes into the SDR. It doesn't make sense to have the RF signal coming out of the SDR be a spectrally-flipped version of what went in. This will confuse the users. It's best to ensure that how the signal went in is the same as how it comes out.
Since the HackRF is not flipping the spectrum as does the original Gnu Radio flowgraph, in order to create a LSB signal, we need to flip the sign of the imaginary component. This is a complex conjugate. Adding one of those into the flowgraph, and we get a lower sideband (LSB) signal.


Weaver Method Modulator
In 1956, an engineer, DK Weaver, created yet another method, which he called the "third method", for generating SSB signals. In my opinion, his method was a combination of the first two, using aspects of both the filtering and the phasing methods. It uses two multiplications of complex sinusoids, with a filtering in the middle.

Let's look at this one section at a time. As stated, the first set of mixers multiply the incoming audio signal with a complex sinusoid. This is a complex multiply with a complex sinusoid because the input signal is real-only.


With the lower sideband now centered at 0 Hz, we'll add the lowpass filters. With the sideband centered, the lowpass filter will only pass that sideband and remove the other. Note that the addition of the lowpass filters along with the multiplication by the complex sinusoid creates a quadrature demodulator, a standard circuit for creating a complex signal from a real one.


The last part is to once-again multiply this complex signal with a complex sinusoid. Now, since this is not a complex multiply with the complex sinusoid, either of the signals separately will be worthless. The signals have to be combined. Specifically, they have to be added to create the final RF signal.


Let's break up the original block diagram to define what Gnu Radio will do, processing-wise, and what the transmitter (the HackRF) will do.



The Weaver method means that, unless you add yet another frequency shift (and a complex one, at that, which is much more complicated for real-only signals), we wind up with a signal that is directly at the center frequency of the transmitting SDR. Which is where most SDRs have a spike from the LO feedthrough. Not a great look.
SSB Demodulation
Now that we know how to modulate SSB signals with various analog techniques, let's look at some analog techniques for demodulation. We'll cover the same three we used for modulation, specifically filtering, phasing and Weaver.
Filtering Method Demodulator
This is straightforward. Use a narrowband filter to only pass the desired sideband, apply a coherent recovery circuit (namely, a beat frequency oscillator or BFO), and you have the original signal back.

This basic demodulator can also handle either SSB or ISB. It has the advantage of simplicity (no balanced mixers required, no need for Hilbert transforms), but the downside (from an analog sense) would be the requirement for a relatively high-Q filter (that's "Q" as in "quality factor" for analog filters, not "Q" as in "quadrature").
I didn't modify this to work with an actual SDR. Instead, I'm going to demonstrate a filtering-method demodulator using complex signal processing at the end of this post.
Phasing Method Demodulator
The phasing method demodulator is effectively the phasing method modulator in reverse. The diagram below is based on Rick Lyon's paper on the phasing method4.


Let's take a look at the signal at different points in the Gnu Radio flowgraph to see how it changes at each stage. For this, we'll use the following points (numbered 1 - 5), with the corresponding spectral display at each point.






Here's how it looked when I modified the flowgraph to work with a RTL-SDR. Once again, I used the HackRF One to generate the SSB signal while using the RTL-SDR to receive it.


To summarize the phasing method demodulator, it will not only work on a SSB transmission, but it will work on a SSB transmission that is right up against another SSB transmission. You can have multiple USB transmissions all packed into a bit of spectrum, and the phasing method would be able to recover each individually.
Further, the phasing method demodulator will also work on independent sideband (ISB) transmissions. If you tune this to the center of the ISB transmission, it will extract the LSB and USB independently and without one interfering with the other.
Weaver Method Demodulator
The Weaver method demodulator is slightly different from the phasing method demodulator. The difference is that the block diagram of the Weaver demodulator doesn't change from the modulator. Instead, two values change. Those are the values for the frequencies of the local oscillators used to drive the two complex sinusoids. Specifically, the changes required are:
- Swap the frequencies of the local oscillators between the two oscillators. The first oscillator becomes the one to downconvert to baseband, and the second one becomes the one to shift half of the bandwidth.
- The first oscillator's frequency is inverted (made negative) since it is shifting down in frequency.
Everything else stays the same. Mind you, this is different than several of the papers on the Weaver method I read. For starters, one paper suggested that the first complex sinusoid be a positive sine wave, not a negative5. This means that, from the real-signal perspective, we're going to use the negative frequency signal as opposed to the positive frequency one. Given that pretty much every SDR I have will downshift the positive frequency version, I decided to setup my signalling to assume that. That way, when I do finally plug in a SDR, I won't have to change the signs at any point. It should just work.


Going through each of the sections of this demodulator, just as we did with the phasing demodulator, we can see how the spectrum changes.






Look at the spectrum of point #4. After the second multiply with a complex sinusoid, and just before the Add block, each branch shows a double-sideband signal. Here's the interesting part. Each of those sidebands is actually the original, desired sideband, but overlapped with the spectrally-inverted version of itself. That's due to the fact that the original, SSB signal is centered at 0, then is mixed with a cosine (I branch) and sine (Q branch). When treated as real, this will shift the signal higher in frequency so that it is just offcenter, but it will also shift it down slightly. And due to the fact that this is still a real signal, each of these sidebands requires symmetry. Hence, the final signal is both the original sideband plus a spectrally-inverted version of itself.

This is the demodulated audio from the I branch of the Weaver demodulator (point #4i in the diagram above). Note that it is legible audio, but regardless of adjusting the center frequency, it will not sound correct. This is due to the fact that the audio is overlapped with a spectrally-inverted version of itself. | |
This is the demodulated audio from the Q branch of the Weaver demodulator (point #4q in the diagram above). It is similar to the I branch. | |
This is the demodulated audio from the Weaver demodulator (point #5 in the diagram above). This is after both I and Q branches have been added. Because of the phasing, the spectrally-inverted versions will be removed. |
I modified the flowgraph to incorporate a SDR as the front end (similar to what I did with the phasing method demodulator). I (yet again) used the HackRF One as my SSB transmitter, connected directly (through a series of SMA attenuators) to my SDR (a RTL-SDR).


To wrap up, the Weaver demodulator is similar to the phasing demodulator. It can handle both SSB and ISB signals. It just does it in a slightly different way.
Demodulator Summary
Let's recap the three, discussed methods for analog SSB demodulation.
- Filtering Method: This is a straightforward filtering of the desired sideband and downconversion. Done.
- Phasing Method: This uses a combination of complex mixing and the Hilbert transform to recover the desired sideband.
- Weaver Method: This uses a complex mixing, a lowpass filter, and a multiply with a complex sinusoid.
As stated previously, the filtering method is the most straightforward. The disadvantage, from an analog perspective, is that it requires a relatively high Q filter (meaning one with a narrow transition width).
Both the phasing and Weaver methods start with the same sections, a complex mixing and a lowpass filter. The difference is two-fold. First, the phasing method tunes so that the SSB signal is off-center from 0 Hz. In other words, if it is a LSB signal, the sideband will extend from 0 Hz down to whatever negative frequency it fits for its bandwidth. The Weaver method tunes so that the desired sideband is centered at 0 Hz, with half of the bandwidth extending into the positive spectrum and the other half extending into the negative spectrum. Second, the phasing method passes both sidebands simultaneously through the lowpass filter. The Weaver method passes only the desired sideband through the filter.
Because of the differences at the output of the lowpass filters for the phasing and Weaver methods (phasing off-centered, Weaver centered), the output is processed differently. The phasing method is Hilbert transformed, and the Weaver method is multiplied by a complex sinusoid. The output of these last sections (Hilbert transform for phasing, complex sinusoid multiply for Weaver) creates a double-sideband signal. The difference here is that, for the phasing method and assuming an ISB signal, both sidebands are still present. As a matter of fact, the audio at the output of either the last delay (along the I branch at the top) or the Complex to Imag block (along the Q branch on the bottom) would have both sidebands present and audible. It would just sound like an audio track with both audio signals present. For the same ISB signal with the Weaver method, there would only be the audio from one sideband (since the other would have been filtered out), but the audio at this same point would sound... not so good.
The signals from the I and Q branch have to be either added or subtracted to recover the original audio (without the other present, or without sounding like an off-tuned SSB receiver). For the phasing method, the addition or subtraction will reinforce the desired sideband, and remove the undesired one. For the Weaver method, the addition or subtraction will cancel the spectrally-inverted signals so that the final audio output is correct.
Which is where we review the advantages and disadvantages of each. There are three circuits that drive the differences. These are:
- Filter: As we discussed, analog filters are driven by their Q factor. The issue with the filtering method, either for transmission or reception, is the requirement for a high Q factor filter.
- Equal mixers: Both the phasing and Weaver methods require multiple mixers. Both the phasing and Weaver method demodulators start with a complex mixer, which requires two mixers working together. Both have to have equal gain in order not to create IQ imbalance. The Weaver method uses another mixer pair at the end. Again, these mixers have to have equal gains.
- Hilbert transform: The Hilbert transform requires that an input signal be precisely shifted by -90 degrees. No more. No less. Even a variation of a degree will limit the attenuation of the mirror image (meaning limit the stopband attenuation of the negative frequency filter).
In short, the phasing and Weaver methods utilize complex signal processing. Such processing is possible (analog television utilized complex signal processing for color transmission and reception starting in the early 1950s), but it is not as easy as with digital signal processing. It's quite possibly for this reason that Miller stated6 that filtering was much more popular than either phasing or Weaver.
The Basic SSB Demodulation
We've gone through several analog methods for demodulating SSB signals. Now, let's look at a method for receiving SSB signals that utilizes DSP techniques. We'll build a Gnu Radio flowgraph to do just that. We're going to use the filtering method, similar to the filtering demodulation method discussed above. The difference is that we're going to use complex signal processing, not real-only signal processing.

I once again setup a HackRF One as my SSB transmitter. (NOTE: Again, the connection is direct connected between the HackRF One and the RTL-SDR.) Running the flowgraph gives me the following screens:


This flowgraph is not optimal. Gnu Radio is designed for prototyping, not for designing a system with the perfect user interface. However, the underlying logic (frequency shifting, filtering) should be sound. It also works. Given that the bandwidth is only that of the SSB signal, it should be optimal for sensitivity.
And there you have it. I hope you found this useful, because I. Am. Spent!
References
1 "Amateur Radio and the Rise of SSB", Gil McElroy, ARRL QST Magazine, January 2003.
2 "Modern Electronic Communication (Seventh Edition)", Gary Miller & Jeffrey Beasley, Prentice-Hall, 2002.
3 "Principles of Communications: Systems, Modulation and Noise (Second Edition)", R.E. Ziemer and W.H. Tranter, Houghton Mifflin Company, Boston, 1985.
4 "Understanding the 'Phasing Method' of Single Sideband Demodulation", Rick Lyons, DSPrelated.com, 8 Aug 2012.
5 "Weaver SSB Modulation/Demodulation - A Tutorial", Derek Rowell, February 18, 2017.
6 "Handbook of Electronic Communication", Gary M. Miller, Prentice-Hall, Inc, Englewood Cliffs, NJ, 1979.