Main Content

Single Sideband Modulation via the Hilbert Transform

This example shows how to use the discrete Hilbert Transform to implement Single Sideband Modulation.

The Hilbert Transform finds applications in modulators and demodulators, speech processing, medical imaging, direction of arrival (DOA) measurements, essentially anywhere complex-signal (quadrature) processing simplifies the design.

Introduction

Single Sideband (SSB) Modulation is an efficient form of Amplitude Modulation (AM) that uses half the bandwidth used by AM. This technique is most popular in applications such as telephony, HAM radio, HF communications, and other voice-based communications. This example shows how to implement SSB Modulation using a Hilbert Transformer.

To motivate the need to use a Hilbert Transformer in SSB modulation, it is helpful to first quickly review double sideband modulation.

Double Sideband Modulation

A simple form of AM is the Double Sideband (DSB) Modulation, which typically consists of two frequency-shifted copies of a modulated signal on either side of a carrier frequency. More precisely this is referred to as a DSB Suppressed Carrier, and is defined as

f(n)=m(n)cos(2πf0n/fs)

where m(n) is usually referred to as the message signal and f0 is the carrier frequency. As shown in the equation above, DSB modulation consists of multiplying the message signal m(n) by the carrier cos(2πf0n/fs), therefore, we can use the modulation theorem of Fourier transforms to calculate the transform of f(n)

F(f)=12[M(f-f0)+M(f+f0)]

where M(f) is the Discrete-time Fourier Transform (DTFT) of m(n). If the message signal is lowpass with bandwidth W, then F(f) is a bandpass signal with twice the bandwidth. Let us look at an example DSB signal and its spectrum.

Initially, we define and plot a message signal which contains three tones at 500, 600, and 700 Hz with varying amplitudes.

Fs = 10e3;
t = 0:1/Fs:0.1-1/Fs;
m = sin(2*pi*500*t) + 0.5*sin(2*pi*600*t) + 2*sin(2*pi*700*t);
plot(t,m)

grid
xlabel("Time")
ylabel("Amplitude")
title("Message Signal m(n)")

Figure contains an axes object. The axes object with title Message Signal m(n), xlabel Time, ylabel Amplitude contains an object of type line.

Below we calculate and plot the power spectrum of the message signal.

periodogram(m,[],4096,Fs,"power","centered")
ylim([-75 12])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

The double-sided power spectrum clearly shows the three tones near DC. If we zoom in further we will be able to read the power of each component.

xlim([0.1 1])
ylim([-18 2])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

The power for the 500 Hz tone is roughly –6 dB, for the 600 Hz tone is –12 dB, and for the 700 Hz tone is 0 dB, which corresponds to the message signal tone amplitudes of 1, 0.5, and 2, respectively.

Using this message signal m(n), let us multiply it by a carrier to create a DSB signal, and look at its spectrum.

fo = 3.5e3; % Carrier frequency in Hz
f = m.*cos(2*pi*fo*t);
idx = 100;
plot(t(1:idx),f(1:idx),t(1:idx),m(1:idx),":")
grid

xlabel("Time")
ylabel("Amplitude")
title("Message Signal and Message Signal Modulated")
legend("Modulated Message Signal","Message Signal m(n)")

Figure contains an axes object. The axes object with title Message Signal and Message Signal Modulated, xlabel Time, ylabel Amplitude contains 2 objects of type line. These objects represent Modulated Message Signal, Message Signal m(n).

The blue solid line is the modulated message signal and the red dotted line is the slow varying message signal. The power spectrum of our modulated signal is then:

periodogram(f,[],4096,Fs,"power","centered")
ylim([-75 0])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

We can see that the message signal (three tones), has been shifted to the center frequency f0. Moreover, the power of each component has been reduced to one quarter, due to the amplitudes being halved, as indicated by the DTFT of the modulated m(n). Let us zoom to read the new power values.

ylim([-20 0])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

Our positive frequency components are now at –6 dB, –18 dB, and –12 dB.

Now that we have defined DSB modulation, let us take a look at single sideband modulation.

Single Sideband Modulation

Single Sideband (SSB) Modulation is similar to DSB modulation, but instead of using the whole spectrum it uses a filter to select either the lower or upper sideband. The selection of the lower or upper sideband results in the lower sideband (LSB) or upper sideband (USB) modulation, respectively. There are two approaches to eliminating one of the sidebands, one is the filter method and the other is the phasing method. The process of selective filtering of the upper or lower sideband is difficult due to the stringent filters required, especially if there is signal content close to DC. This example shows how to use the phasing method, which uses a Hilbert Transformer to implement SSB Modulation.

SSB modulation requires the shifting of the message signal to another center frequency without creating pairs of frequency components X(f-f0) and X(f+f0) as in the case of the DSB modulation, i.e., avoiding the need to filter either the upper or lower sideband. This can be done by using a Hilbert Transformer.

Let us first review the definition and properties of the ideal Hilbert Transform before we discuss its use in SSB modulation. This will help motivate its use in SSB modulation.

Ideal Hilbert Transform

The discrete Hilbert Transform is a process by which the negative frequencies of a signal are phase-advanced by 90 degrees and the positive frequencies are phase-delayed by 90 degrees. Shifting the results of the Hilbert Transform (+ j) and adding it to the original signal creates a complex signal as we will see below.

If mi(n) is the Hilbert Transform of mr(n), then:

mc(n)=mr(n)+jmi(n)

is a complex signal known as the Analytic Signal. The diagram below shows the generation of an analytic signal by means of the ideal Hilbert Transform.

One important characteristic of the analytic signal is that its spectral content lies in the positive Nyquist interval. This is because if we shift the imaginary part of our analytic (complex) signal by 90 degrees (+ j) and add it to the real part, the negative frequencies will cancel while the positive frequencies will add. This results in a signal with no negative frequencies. Also, the magnitude of the frequency component in the complex signal is twice the magnitude of the frequency component in the real signal. This is similar to a one-sided spectrum, which contains the total signal power in the positive frequencies.

Next we introduce a Spectral Shifter. The Spectral Shifter shifts (translates) the spectral content of a signal by modulating the analytic signal formed from the signal whose spectrum we want to shift. This concept can be used for SSB modulation as shown later.

Spectral Shifter

Using the message signal m(n) defined above we will create an analytic signal by employing the Hilbert Transform, which will then be modulated to the desired center frequency. The scheme is shown in the diagram below.

Using this method of spectral shifting will ensure that the power of our signal is shifted to the frequency of interest while maintaining a real-valued signal in the end.

As we indicated earlier the analytic signal is made up of the original real-valued signal plus the Hilbert Transform of that real signal. Running the real signal by the hilbert function in the Signal Processing Toolbox™ will produce an analytic signal.

Note: The hilbert function produces the complete analytic (complex) signal, not just the imaginary part.

mc = hilbert(m);

We can also calculate and plot the spectral content of the analytic signal constructed from our message signal m(n).

periodogram(mc,[],4096,Fs,"power","centered")
ylim([-75 6])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

As shown in the spectrum plot, our analytic signal is complex and only contains positive frequency components. Moreover, if we measure the power, or zoom in our plot further at the positive frequency component, we will see that the power of the frequency components of the analytic signal is twice the total power of the positive (or negative) frequency component of the real signal, i.e., it is similar to a one-sided spectrum which contains the total power of the signal. See zoomed-in plot below.

xlim([0.1 1])
ylim([-10 6])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

We see that the power of the analytic (complex) signal's frequency components 500 Hz, 600 Hz, and 700 Hz are roughly 0, –6 dB, and 6 dB, respectively, which is the total power of the original signal. These values correspond to our original real-valued signal which has three tones with amplitudes of 1, 0.5, and 2, respectively.

At this point we can modulate the analytic signal to shift the spectral content to another center frequency without producing frequency component pairs and maintain a real-valued signal.

To modulate the signal to the carrier frequency f0, we will multiply the analytic signal by an exponential.

mcm = mc.*exp(1i*2*pi*fo*t);

As shown in the Spectral Shifter diagram, after modulating our signal we will compute the real part. The spectrum of which is

periodogram(real(mcm),[],4096,Fs,"power","centered")
ylim([-75 0])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

As shown in the plot above our signal has been modulated to a new center frequency of f0 without creating the frequency pairs, i.e., it resulted in upper sideband.

If we compare the spectral plot above with that of the DSB modulation we can see that the Spectral Shifter accomplished the SSB modulation.

Efficient Implementation of SSB Modulation

From our previous derivation we can see that the SSB modulated signal, f(n) can be written as

f(n)=[mc(n)exp(j2πf0n/fs)]

where mc(n) is the analytic signal defined as

mc(n)=m(n)+jm(n)

Expanding that equation and taking the real part we get

f(n)=[m(n)cos(2πf0n/fs)-m(n)sin(2πf0n/fs)]

which results in a single sideband, upper sideband (SSBU). Similarly, we can define the SSB lower sideband (SSBL) by

f(n)=[mc(n)exp(-j2πf0n/fs)]

f(n)=[m(n)cos(2πf0n/fs)+m(n)sin(2πf0n/fs)]

The SSBU equation above suggests a more efficient way of implementing SSB. Rather than performing the complex multiplication of mc(n) with exp(j2πf0n/fs) and then throwing away the imaginary part, we can compute only the quantities we need by implementing SSBU as shown below.

To implement the SSB modulation shown above we need to calculate the Hilbert Transform of our message signal m(n) and modulate both signals. But before we do that we need to point out the fact that ideal Hilbert transformers are not realizable. However, algorithms that approximate the Hilbert Transformer, such as the Parks-McClellan FIR filter design technique, have been developed which can be used. Signal Processing Toolbox™ provides the firpm function, which designs such filters. Also, since the filter introduces a delay we need to compensate for that delay by adding delay (N/2, where N is the filter order) to the signal that is being multiplied by the cosine term as shown below.

For the FIR Hilbert transformer we will use an odd length filter which is computationally more efficient than an even length filter. Albeit even length filters enjoy smaller passband errors. The savings in odd length filters is a result that these filters have several of the coefficients that are zero. Also, using an odd length filter will require a shift by an integer time delay, as opposed to a fractional time delay that is required by an even length filter. For an odd length filter, the magnitude response of a Hilbert Transformer is zero for w=0 and w=π. For even length filers the magnitude response does not have to be 0 at π, therefore they have increased bandwidths. So for odd length filters the useful bandwidth is limited to

0<w<π.

Let us design the filter and plot its zero-phase response.

Hd = designfilt("hilbertfir",FilterOrder=60, ...
    TransitionWidth=0.1,DesignMethod="equiripple");

zerophase(Hd,-pi:0.001:pi)

Figure contains an axes object. The axes object with title Zero-Phase Response, xlabel Normalized Frequency ( times pi blank rad/sample), ylabel Amplitude contains an object of type line.

To approximate the Hilbert Transform we will filter the message signal with the filter.

m_tilde = filter(Hd,m);

The upper sideband signal is then

G = filtord(Hd)/2;   % Filter delay
m_delayed = [zeros(1,G),m(1:end-G)];
f = m_delayed.*cos(2*pi*fo*t) - m_tilde.*sin(2*pi*fo*t);

and the spectrum is

periodogram(f,[],4096,Fs,"power","centered")
ylim([-75 0])

Figure contains an axes object. The axes object with title Periodogram Power Spectrum Estimate, xlabel Frequency (kHz), ylabel Power (dB) contains an object of type line.

As seen in the plot above we successfully modulated the message signal (three tones) to the carrier frequency of 3.5 kHz and kept only the upper sideband.

Summary

As we have seen, by using an approximation to the Hilbert Transform we can produce analytic signals, which are useful in many signal applications that require spectral shifting. Specifically we have seen how an approximate Hilbert Transformer can be used to implement Single Sideband Modulation.

See Also

| |