100% found this document useful (2 votes)
278 views21 pages

Weaver Document

This document provides a tutorial on Weaver modulation/demodulation, a method for generating single-sideband suppressed-carrier (SSB) signals. It begins with an introduction to SSB communication and amplitude modulation (AM), explaining how an AM signal contains a carrier frequency along with upper and lower sideband frequencies. The Weaver method is then described as an alternative to prior SSB generation techniques that has advantages with digital signal processing. The tutorial uses simple trigonometric identities to explain the Weaver method in terms of a signal's spectral components.

Uploaded by

Diu Thanh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
278 views21 pages

Weaver Document

This document provides a tutorial on Weaver modulation/demodulation, a method for generating single-sideband suppressed-carrier (SSB) signals. It begins with an introduction to SSB communication and amplitude modulation (AM), explaining how an AM signal contains a carrier frequency along with upper and lower sideband frequencies. The Weaver method is then described as an alternative to prior SSB generation techniques that has advantages with digital signal processing. The tutorial uses simple trigonometric identities to explain the Weaver method in terms of a signal's spectral components.

Uploaded by

Diu Thanh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Weaver SSB Modulation/Demodulation

- A Tutorial
Derek Rowell
February 18, 2017

1 Introduction
In 1956 D. K. Weaver 1 proposed a new modulation scheme for single-sideband-suppressed-
carrier (SSB) generation. The Weaver Method (also known as the Third Method), has
potential advantages compared to the two prior methods, the filter and phase-shift methods,
but is more difficult to understand. With the advent of DSP (Digital Signal Processing) and
SDR (Software-Defined Radio) the Weaver Method has received much greater attention but
is still not generally well understood by hobbyists. This tutorial is designed to introduce the
Weaver Method using simple mathematics that is limited to a few trigonometric identities.
The descriptions described here are based on real (as opposed to complex) signal rep-
resentations. In particular all signals are represented in terms of sinusoidal components of
the form A cos(2F t + ) where A is the amplitude, F is the frequency with units of Hz,
and is the phase (with units of radians) (0 < 2) . For convenience we will make
the substitution = 2F and express the frequency as an angular frequency, with units
radians/second.
Fourier theory tells us that any practical time-based waveform, f (t), may be expressed
mathematically as a sum (finite or infinite) of such sinusoids,
N
X
f (t) = An cos(n t + n ), (1)
n=1

and can be entirely described by its spectrum, that is the collection of all amplitudes An ,
frequencies n , and phases n 2 . We are all familiar with this concept in terms of filtering
a signal, where we modify that signal by manipulating its spectrum, that is modifying the
values of An and n . For the purposes of this tutorial we need to be able to think of a signal
in terms of its spectral components.
1
Weaver, D.K., A third method of generation and detection of single sideband signals, Proc. IRE, Dec.
1956, pp. 1703-1705
2
There are several ways of expressing the spectrum of a signal f (t). In this tutorial we adopt the
convention of a one-sided, purely real spectrum as described above. Another more general and compact
description uses a collection of complex exponentials of the form An ejn t to describe the spectrum, and
requires positive and negative frequency components. Modern signal analysis relies almost exclusively on
the complex notation.

1
1.1 Introduction to SSB Communication
Single-sideband suppressed carrier (SSB) modulation is a variant of amplitude modulation
(AM) and is used extensively in high-frequency radio voice communication, such as maritime
and ham radio voice communication.
Amplitude (AM) Modulation: In AM radio, the audio information is impressed upon a
sinusoidal carrier signal cos(c t) with angular frequency c , and amplitude A by modulating
the amplitude of the carrier A cos(c t), with an audio signal faudio (t) as follows:

fAM (t) = (1 + faudio (t)) cos(c t) (2)

where is known as the modulation index, and must be chosen so that faudio (t)) > 0
(Otherwise distortion caused by over modulation occurs.) . Notice if the audio is silent that
is faudio (t) = 0, the transmitted signal is simply the carrier fAM (t) = A cos(c t).
For simplicity we start by assuming we have a very simple audio signal, a simple audio
tone with a frequency of Fa Hz, so that

faudio (t) = Aa cos(2Fa t + a ) = Aa cos(a t + a ) (3)

where Aa is the amplitude, a = 2Fa is the angular frequency in units of radians/second,


is substituted into Eq(2)
and a is an arbitrary phase angle3 When Eq(3)

fAM (t) = cos(c t) + Aa (cos(a t + a ) cos(c t)) (4)

where there is a multiplication of two time-based sinusoidal functions. Using Eq. (A.1) in
the appendix to expand the product of two cosine functions)
Aa Aa
fAM (t) = cos(c t) + cos((c + a )t + a ) + cos((c a )t a ) (5)
2 2
which shows three separate sinusoidal components 1) a carrier component at frequency 2 ,
2) an upper sideband component at frequency (c + a ), and 3) a lower sideband component
at frequency (c a ), as shown in Fig. 1.
As noted above, we can represent any audio signal, for example speech or music, as a
sum of N such components and write
N
X
faudio (t) = An cos(n t + n ),
n=1


and substitute into Eq(2). Then applying the above argument to each of the N components
N
! N
!
X X
fAM (t) = cos(c t) + An cos((c + n )t + n ) + An cos((c n )t n )
2 n=1 2 n=1
(6)
where the upper and lower sidebands each contain many components, as shown in Fig. 2.
3
We will use angular frequency throughout this document because it generates a more compact represen-
tation.

2
a m p litu d e
a m p litu d e
A M r f s ig n a l
a u d io c a r r ie r
1
A M
lo w e r s id e b a n d u p p e r s id e b a n d
A
a A
2

0 w w w
a 0 w c - w a w c w c + w a

Figure 1: Amplitude spectrum of a simple AM rf signal with carrier frequency c and audio
frequency a .

a m p litu d e
a m p litu d e
a u d io s ig n a l A M r f s ig n a l
c a r r ie r

lo w e r s id e b a n d u p p e r s id e b a n d
A M

0 w w
w c w c + w m a x w
m a x 0 w - w

Figure 2: Amplitude spectrum of an AM rf signal with carrier frequency c modulated by


an audio signal containing a set of three components with frequencies 0 < < max . The
envelope of the audio spectrum is shown as shaded, and asymmetric to help visualize the
spectral relationships between the sidebands.

We are all familiar with AM modulation though listening on the AM broadcast band.
Historically, AM was the first radio voice/music communication method, and while easy to
implement in hardware it, has a number of disadvantages compared to other modulation
techniques. In particular, for high frequency communication
Most of the transmitted signal power is contained within the carrier (which is trans-
mitted continuously, even in the absence of an audio signal), making AM a very energy
inefficient communication mode.
The spectral width of the AM waveform is twice the audio bandwidth, and is therefore
an inefficient use of the high-frequency radio spectrum.
In long-distance communication, with multipath reflections from the ionosphere, can-
celation of the carrier can occur leading to selective fading, and loss of intelligibility.
Single-Sideband Suppressed Carrier (SSB) Modulation: SSB generation simply
involves elimination of the carrier and one of the two sidebands from an AM transmission,

3
leaving only the upper (USB) or lower (LSB) sideband. There are therefore two possible
modes of SSB transmission, either LSB or USB, as shown in Fig. 3.
a m p litu d e U S B r f s ig n a l
U S B u p p e r s id e b a n d

a m p litu d e a u d io

0
w
w c w c + w m a x

a m p litu d e L S B r f s ig n a l
w L S B lo w e r s id e b a n d
0 w m a x

w
w c - w m a x w c

Figure 3: Spectral representation of upper-side-band (USB), and lower-sideband (LSB) sig-


nals of a three component audio signal with audio bandwidth max at the same rf frequency
c .

Notice that SSB transmission directly addresses the first two criticisms of AM transmis-
sion noted above:

There is no power transmitted as a carrier, and the power transmitted is zero in the
absence of any audio signal.

The spectral bandwidth is half that of an AM signal,

In practice SSB is also far less susceptible to the selective fading that plagues AM trans-
mission at high frequencies.

We note that USB modulation is a straight frequency translation of each component in


faudio (t) :
N
X N
X
faudio (t) = An cos(n t + n ) USB An cos((c + n )t + n ), (7)
n=1 n=1

and LSB is a translation and reflection (flipping) of the components about the suppressed-
carrier frequency c :
N
X N
X
faudio (t) = An cos(n t + n ) LSB An cos((c n )t n ). (8)
n=1 n=1

4
1.2 Historical methods of SSB Waveform Generation:
Historically there were two methods of generating an SSB signals:
The filtering method, is a brute-force method, in which a multiplier is used to create
a double sideband (DSB) waveform at a fixed frequency c . If faudio (t) = Aa cos(a t +
a )

fDSB (t) = Aa cos(a t + a ) cos(c t)


Aa Aa
= cos((c + a )t + a ) + cos((c a )t a )
2 2
from Eq. (A.1). fDSB (t) is then passed through a very high quality band-pass filter (in
hardware usually a mechanical or xtal filter) centered on the desired sideband to reject
the unwanted sideband.
The phase-shift or phasing method generates the SSB signal directly from the
trigonometric relationships in Eq. (A.5) in the Appendix

cos(a + b) = cos(a) cos(b) sin(a) sin(b)


cos(a b) = cos(a) cos(b) + sin(a) sin(b)

with the constant angles a, b replaced with time varying functions of the form t.
If the audio signal is a simple tone faudio (t) = Aa cos(a t + a ), a USB signal may be
created from the expansion

yU SB (t) = Aa cos((c +a )t+a ) = Aa cos(a t+a ) cos(c t)Aa sin(a t+a ) sin(c t).

There is a problem because we do not have the signal Aa sin(a t + a ) available to


us, and in practice it cannot be generated directly from the audio Aa cos(a t + a ).
However, using Eq. (A.10) in the Appendix (sin(a) = cos(a /2)) we can write

yU SB (t) = Aa cos(a t + a ) cos(c t) Aa cos(a t + a /2) sin(c t). (9)

and use a (hardware or software) all-pass /2 phase-shifter (also known as a Hilbert


transformer) to approximate the Aa sin(a t + a ) as indicated in Fig. (4).

o
9 0 p h a s e s h ifte r
c o s (w t) ~~ c o s ( w t - p / 2 ) = s in ( w t)
( H ilb e r t tr a n s fo r m e r )

Figure 4: The Hilbert transformer for approximating a wideband /2 phase shift.

4
Similarly for lower-sideband generation

yLSB (t) = A cos((c a )t + )


= A cos(a t + ) cos(c t) + A sin(a t + /2) sin(c t)
= A cos(a t + ) cos(c t) + A cos(a t + /2) sin(c t) (10)

5
A a c o s (w a t + j a)

c o s (w c t)
+ S S B o u tp u t
a u d io in p u t fre q u e n c y q u a d ra tu re
w c o s c illa to r y (t)
fa (t) = A a c o s (w a t + j )
a

s in ( w c t) + /-
+ fo r U S B
9 0 o p h a s e s h ifte r
( H ilb e r t tr a n s fo r m e r )
- fo r L S B
A a s in ( w a t + j a )

Figure 5: The signal processing steps involved in the phasing method of SSB generation.Note
that the only difference between USB and LSB generation is the sign of the summation at
the output.

The signal processing flow is indicated in Fig. 5.


The phase-shift method is probably the most widely used SSB generator, and is well
suited to both hardware and software (DSP) methods. Its major downside is that the
phase shifter must be an all-pass filter, with a constant phase shift of /2 radians (90 )
across the whole audio bandwidth. Although modern filter design allows for accurate
results, this can at best be only approximated. Errors in the phase shift result in
incomplete suppression of the unwanted sideband.

2 The Weaver SSB Modulator


In the 1950s the design and implementation of accurate phase- shift networks was a difficult
task. The Weaver method eliminates the need for such networks, and replaces them with a
pair of identical low-pass filters with modest design specifications.

2.1 The Weaver Modulator


As discussed above, our goal is to translate an audio signal faudio (t) containing N spectral
components
N
X
faudio (t) = An cos(n t + n ))
n=1

to a SSB waveform
N
X
yssb = Ai cos((c n )t n )
n=1

where the + indicates the USB, and the the LSB modes.
4
The explicit use of the multiplication symbol in Eqs. (6) and (7) has no mathematical significance,
and is only used to emphasize the signal processing operations implied.

6
Assume that the audio signal is band limited between frequencies min and max as shown
in Fig. 6. For example, in a communications radio the audio might be limited to 300 3000
Hz (1, 885 18, 849 rad/s). Then define the mid-point of the audio spectrum as
o = (min + max )/2. (11)

a m p litu d e

a u d io
s ig n a l

"g u a rd " b a n d
w id t h w m in

w m in + w m a x

0 w
w
m in w m a x
w o = (w m in + w m a x )/2

Figure 6: Schematic representation of the amplitude spectrum of the band-limited audio


signal faudio (t). The shaded area shows the envelope of the An . Also shown is the definition
of the frequency o = (min + max )/2.

The block diagram of the Weaver modulator is shown in Fig. 7. Notice that there are a
pair of parallel chains, each containing two oscillators, a low-pass filter, and two multipliers.
As before, for simplicity we will consider the processing of a single representative component
of faudio (t),
fa (t) = Aa cos(a t + a ))
with amplitude Aa , frequency a , and phase a through the modulation process.
The first oscillator in each chain is a fixed, low frequency oscillator set to the audio
mid-point frequency o .
The second is a high frequency (rf) oscillator at a frequency s . In practice this is used
for tuning the SSB output to the desired frequency c . (As we will see below s 6= c ).
The two low-pass filters are identical, and have a cut-off frequency of o . For now they are
assumed to be ideal - that is they pass all components with a frequency o o
unimpeded, while rejecting all frequencies.
We now examine the flow of fa (t) through the modulator:
1. At the output of the first multipliers (f1 (t) and f2 (t)): The output of the first
pair of multipliers are the products of the audio signal fa (t) = Aa cos(a t + a ) and
the pair of quadrature sinusoids cos(o t) and sin(o t):
f1 (t) = fa (t) cos (o t) = Aa cos (t + a ) cos (o t)
Aa Aa
= cos ((a o ) t + a ) + cos ((a + o ) t + a ) (12)
2 2

7
lo w - p a s s filte r
f1 (t) f3 (t) f5 (t)

- w o 0 w o

c o s (w o t) c o s (w s t)
+ S S B o u tp u t
a u d io s ig n a l
w o ( fix e d ) ( v a r ia b le ) w y (t)
s S
fa u d io
(t) + /-
s in ( w o t) s in ( w s t)
lo w - p a s s filte r
f2 (t) f4 (t) f6 (t)

- w o 0 w o

Figure 7: The signal processing flow for the Weaver SSB modulator

from Eq. (A.1), and

f2 (t) = fa (t) sin (o t) = Aa cos (a t + a ) sin (o t)


Aa Aa
= sin ((a o ) t + a ) + sin ((a + o ) t + a ) (13)
2 2
from Eq. (A.6). The amplitude spectra of f1 (t) and f2 (t) are shown in Fig. 8.

|a m p litu d e | |a m p litu d e |

a u d io
s ig n a l f1 ( t ) a n d f2 ( t )

in itia l m u ltip lic a tio n

0 w
w w
m in w o w m a x w o - w m a x 0 w - w w + w w + w m a x m a x
o m in o m in o
w

Figure 8: Schematic amplitude spectra at the output of the first multiplier stage in the
Weaver modulator. Two sample audio components are shown as dashed lines. Note that
although f1 (t) and f2 (t) have identical amplitude spectra, their phase spectra differ.

2. At the outputs of the Low-Pass Filters (f3 (t) and f4 (t)): We assume that the
two low-pass filters are ideal, that is they pass all spectral components(positive or
negative) within their bandwidth o o unimpeded, while completely rejecting
all components with < o and > o , where the response to negative frequency

8
components is as defined in Appendix B.5
The outputs from the two low-pass filters, (f3 (t) and f4 (t)), are therefore simply the
low-frequency (difference) components in f1 (t) and f2 (t) with frequencies below o :
Aa
(
cos ((a o ) t + a ) if o a o
f3 (t) = 2 (14)
0 otherwise.
and
Aa
(
sin ((a o ) t + a ) if o a o
f4 (t) = 2 (15)
0 otherwise.
The amplitude spectra of f3 (t) and f4 (t) are shown in Fig. 9.
|a m p litu d e | |a m p litu d e |

f1 ( t ) a n d f 2 ( t ) f3 ( t ) a n d f4 ( t )

lo w - p a s s filte r

c u t-o ff fre q u e n c y w o

w - w
w o - w m a x 0 w - w w + w w + w w o 0 w o
o m in o m in o m a x

Figure 9: Low-pass filtering to retain only those components with a frequency in the range
o a o .

3. At the outputs of the second multipliers (f5 (t) and f6 (t)): In general the second
oscillator frequency s >> o . Then f5 (t) and f6 (t) are simply:
f5 (t) = f3 (t) cos(s t)
Aa Aa
= cos (((s + o ) a ) t a ) + cos (((s o ) + a ) t + a ) (16)
4 4
f6 (t) = f4 (t) sin(s t)
Aa Aa
= cos (((s + o ) a ) t a ) + cos (((s o ) + a ) t + a )(17)
4 4
4. Summation/Subtraction to Generate the SSB Output: Upper or lower sideband
signals are generated by simple addition or subtraction of f5 (t) and f6 (t):
Aa
yusb (t) = f5 (t) + f6 (t) = cos (((s o ) + a ) t + a )
2
Aa
= cos ((c + a ) t + a ) (18)
2
5
For theoretical reasons it is impossible to design or build an ideal filter. We simply assume its existence
to illustrate the the signal processing involved and accept that any practical filter will not meet the idealized
specifications.

9
where c = s o , which is the desired signal frequency. similarly
Aa
ylsb (t) = f5 (t) f6 (t) = cos (((s + o ) a ) t a )
4
A
= = cos ((c a ) t a ) (19)
2
where in this case c = (s + o ) is the output LSB frequency.

2.2 Design Summary:


Given a band-limited audio signal
N
X
faudio (t) = An cos(n t + n )
n=1

where min n < max for all n, proceed as follows:

1. Select o = (min + max /2.

2. Design and implement a pair of low-pass filters with cut-off frequency o , (and with a
transition band of width 2min ).

To generate a USB signal at frequency c :


N
X
yusb (t) = An cos(c + n )t + n ),
n=1

Set the second oscillator frequency to s = c + o

Set the output summer so that yusb (t) = f5 (t) + f6 (t).

and
To generate a LSB signal at frequency c :
N
X
ylsb (t) = An cos(c n )t n ),
n=1

Set the second oscillator frequency to s = c o

Set the output summer so that ylsb (t) = f5 (t) f6 (t).

3 Weaver Demodulation
While the modulator has a well defined task of translating a well defined low frequency,
band-limited signal to a high frequency rf signal, the demodulation process has a particularly

10
messy working environment in the sense that its input is potentially the whole rf spectrum,
including the AM, FM, TV, etc bands. From the cacophony of signals it must select a narrow-
band signal and demodulate it without interference from adjacent (and distant) signals.
The Weaver demodulator does an excellent job of this, and is basically a complete SSB
communications receiver on its own.
As shown in Fig. 10 the Weaver demodulator is basically the reverse of the steps used in
the modulator.

lo w - p a s s filte r
f1 (t) f3 (t) f5 (t)
r f s ig n a l
- w o 0 w o

c o s (w s t) c o s (w o t)
frf(t) + a u d io o u tp u t
w s ( v a r ia b le ) ( fix e d ) w y (t)
o S
s in ( w s t) s in ( w o t) + /-
lo w - p a s s filte r
f2 (t) f4 (t) f6 (t)

- w o 0 w o

Figure 10: The structure of the Weaver Demodulator.

We start with a clean high frequency rf signal frf (t) = Aa cos(a t+a ) .Notice that the
major difference from the Weaver modulator is the reversal of the order of the high frequency
and low frequency oscillators. The first step is to multiply the input waveform frf (t) by a
pair of variable frequency oscillators (cos(s t and sin(s t)) to translate the input down to
baseband.
1. At the output of the first multipliers (f1 (t) and f2 (t)): Assume that the input is
a broadband RF signal with bandwidth max as shown in Fig. 11, with a narrowband
signal centered on s . The first step is to multiply frf (t) by the quadrature pair
cos(s t) and sin(s t):

f1 (t) = frf (t) cos(s t) = A cos(a t + a ) cos(s t)


A A
= cos ((a s )t + a ) + cos ((a + s ) + a ) (20)
2 2
f2 (t) = frf (t) sin(s t) = A cos(a t + a ) sin(s )t
A A
= sin ((a s )t + a ) + sin ((a + s )t + a ) (21)
2 2
The effect of this step is to translate the desired signal down to baseband, as shown
in Fig. 11. Note the doubling of the bandwidth in f1 (t) and f2 (t), this will become
important when we discuss aliasing in DSP implementations later.

11
|a m p litu d e | |a m p litu d e |
R F s ig n a l frf ( t) f1(t) a n d f2(t)

fir s t m u ltip lie r

0 w w - w 0 w w
s m a x o o w s w s+ w
w a m a x

Figure 11: The first step in Weaver demodulation: the broadband rf input signal frf (t) is
multiplied by the quadrature pair cos(s t and sin(s t). The line represents a component
with frequency a in a signal shown as the dark shaded area.

2. Low pass filter outputs: Assume the low-pass filters have a cut-off frequency of o
and will pass components in the frequency range o o , (see Appendix B).
Assume s >> o and c >> o . Clearly the sum terms in Eqs. (20) and (21) and
will be rejected by the filter, and the baseband components retained only if they fall
within the passband of the filter.
A
(
cos ((a s )t + a ) if 0 a s o ,
f3 (t) = 2 (22)
0 otherwise,

and
A
(
sin ((a s )t + a ) if o a s o ,
f4 (t) = 2 (23)
0 otherwise.
as shown in Fig. 12.
|a m p litu d e | |a m p litu d e |
f1 ( t ) a n d f2 ( t ) f3 ( t ) a n d f4 ( t )
lo w - p a s s filte r

w w
- w o 0 o w s w s+ w - w o 0 w o
m a x

Figure 12: The second step in Weaver demodulation: the action of the low-pass filters to
eliminate all components outside the filter passband (o a o ).

3. Second multiplier outputs:


A
f5 (t) = f3 (t) cos(o t) = cos ((a s )t + a ) cos(o t)
2
A A
= cos ((a (s + o )) t + a ) + cos ((a (s o )) t + a ) (24)
4 4

12
only if o a s o , and
A
f6 (t) = f4 (t) sin(o t) =
sin ((a s )t + a ) sin(o t)
2
A A
= cos ((a (s o )) t + a ) + cos ((a (s + o )) t + a ) (25)
4 4
also only if o a s o .
4. Summer output: The demodulated audio waveform yaudio (t) is found at the output
of the summer:
(+) A
yaudio (t) = f5 (t) + f6 (t) = cos((a (s o ))t + a ) (26)
2
() A
yaudio (t) = f5 (t) f6 (t) = cos((a (s + o ))t + a ) (27)
2
USB demodulation: If the rf input is a USB signal (Eq. (7))
N
X
frf (t) = An cos((c + n )t + n ),
n=1

with signal frequency c , and we consider just a single component fn (t) = An cos((c +
n )t + n ), substitution for a in Eq. (26) gives
(+) An
yaudio (t) = cos((c + n (s o ))t + n ),
2
and if we select the tuning oscillator frequency s = c + o the output is
(+) An
yaudio (t) = cos(n t + n )
2
which is the demodulated component, and generalizing to the sum of all such compo-
nents in the full USB signal:
N
usb (+) 1X
ydemod (t) = yaudio (t) = An cos(n t + n ).
2 n=1

Summary:
To demodulate a USB signal with frequency c using a low-pass filter
with cut-off frequency o ,
Set the tuning oscillator to the frequency s = c + o ,
(+)
Select the audio output as the sum yaudio (t) = f5 (t) + f6 (t).

LSB demodulation: Similarly, if the rf input is a LSB signal (Eq. (8))


N
X
f (t) = An cos((c n )t n )
n=1

13
with signal frequency c , and we consider a single component f (t) = An cos((c
n )t n ), substitution for a in Eq. (27) gives
() An
yaudio (t) = cos((c n (s o ))t n ),
2
and when the tuning oscillator frequency s = c o the output is
() An
yaudio (t) = cos(n t n )
2
which is the demodulated component. then when applied to all N such components in
the full USB signal
N
usb () 1X
ydemod (t) = yaudio (t) = An cos(n t n ).
2 n=1

Summary:
To demodulate a LSB signal with frequency c using a low-pass filter
with cut-off frequency o
Set the tuning oscillator to the frequency s = c o ,
()
Select the audio output as the difference yaudio (t) = f5 (t)f6 (t).

4 DSP Implementation Issues


A purely software based implementation of either the modulator or demodulator requires
high-speed processing hardware, and is probably not practicable in low cost applications.

4.1 Aliasing Issues


Aliasing refers to the inability of DSP systems to represent high frequency signals, and
the fact that such high frequency signals will appear as if they have a lower frequency. Any
DSP system operates on discrete-time signal samples at intervals of T seconds. Then the
sampling frequency is defined as Fsample = 1/T Hz, or sample = 2Fsample rad/sec.
Nyquists sampling theorem states that for unambiguous interpretation and processing,
all digital signals must represent waveforms with no component at or above the Nyquist
frequency, N = sample /2. This includes external signals digitized by an A/D converter, as
well as signals created within the processor, such as from digital oscillators and from the
outputs from multipliers.
If an attempt is made to digitize or generate a component with a frequency greater than
N , it will be aliased to a lower frequency below N and will be indistinguishable from any
other component at that frequency. Figure 13 shows the apparent frequency of a sinusoid
sampled through an A/D converter with a sample rate of sample , that is N = sample /2.
Below omegaN the apparent frequency is accurate, but in the shaded area where N
the frequency is folded down to an aliased frequency.
The Weaver systems are particularly sensitive to aliasing problems, which impose severe
restrictions on the bandwidth of the input and output. These restrictions differ for the
modulator and demodulator.

14
w a p p a re n t

a n a lo g d ig ita l w s a m p le /2

s p e c tr a l a lia s in g

f( t) = s in ( w in t) A /D c o n v e rte r
s a m p lin g r a te : w s a m p le

w w in
0 s a m p le /2 w s a m p le

Figure 13: Aliasing at an A/D converter. If the frequency of a sinusoidal input signal, in ,
exceeds the Nyquist rate, sample /2, the apparent frequency is folded down and it appears
in subsequent processing as a lower frequency. Note that this is a periodic phenomenon and
the above plot repeats every sample radians/sec.

4.1.1 Aliasing in the Weaver Modulator


In the modulator the maximum frequency occurs at the outputs of the second multipliers,
Eqs. (16) and (17), and are translated directly to the SSB output. These frequencies must
satisfy the sampling theorem, with the result is that the Weaver modulator is limited to a
signal frequency c 
sample /2 for LSB
c < (28)
sample /2 2o for USB
where o is the cutoff frequency of the low pass filter. For example a system operating at
the CD sampling frequency Fsample = 44.1 kHz is limited to generating a SSB signal with a
highest frequency component below 22.05 kHz. This might typically be a USB signal with
a 4 kHz bandwidth at 18 kHz, or a LSB signal with a 4kHz bandwidth at 22kHz.

4.1.2 Aliasing in the Weaver Demodulator


Aliasing in the demodulator poses a slightly more complex problem because of two issues: 1)
the input rf signal for the demodulator consists of the entire rf spectrum, and 2) the highest
frequencies in the demodulator occur at the output of the first modulator and before the
low-pass filters.

(1) The analog rf input must be low-pass filtered to below the Nyquist frequency (known as
pre-aliasing filtering) before being digitized at the A/D converter. This has the effect
of limiting the maximum demodulation bandwidth to below sample /2, otherwise the
whole rf spectrum will be aliased down into the demodulation bandwidth.

(2) The first pair of oscillators are the high frequency tuning oscillators, s . Their frequency
must be limited to below the Nyquist frequency s < sample/2 , otherwise spurious
components will be generated in the output.

(3) There is an even more severe restriction if all aliasing is to be avoided (we will see that
this is actually not necessary below). Eqs. (20) and (21), and Fig. 11, show the outputs

15
of the first multipliers have a maximum frequency a + s , where a is the rf input
frequency and s is the first oscillator frequency. But s a , which implies that
aliasing in f1 (t) and f2 (t) will occur if 2s sample /2, or if
sample
s . (29)
4
For example, to avoid all aliasing, a DSP demodulator using a sampling frequency of
44.1 kHz must be limited to a rf spectral width of only 11.02 kHz.
It is not necessary, however, to eliminate all aliasing. Note that f1 (t) and f2 (t) are the
inputs for the two low-pass filters, and therefore the filter outputs, f3 (t) and f4 (t), will be
unaffected by aliasing provided all aliased components fall above o , the cut-off frequency
of the filters and are therefore rejected. Figure 14 shows the situation for a rf spectrum that
extends to the Nyquist frequency N , and an oscillator frequency s . The high frequency
components are folded down at N and extend to a frequency N s . There will be no
contamination of the demodulated output provided

s N 0 , (30)

which is a much reduced restriction than that implied by Eq. (29).

|a m p litu d e | |a m p litu d e | f1(t) a n d f2(t)


D ig itiz e d R F s ig n a l f rf ( t)
a lia s e d
fir s t m u ltip lie r c o m p o n e n ts

w 0
w
0 w s w N - w o w o w N- w s w s w N

Figure 14: Aliasing in Weaver demodulation using DSP multiplication. This figure should
be compared with Fig. 11. Note that the high frequency components (above the Nyquist
frequency) have been folded down to a lower frequency and will contaminate the filter outputs
if s N o .

For example, for a system sampled at the CD rate (44.1 kHz) and o = 2kHz there will
be know aliasing contamination of the output provided the oscillator frequency s < 20 kHz.

4.2 Hybrid Implementations to Overcome Aliasing Problems


4.2.1 Wideband DSP Based SSB Generator
The limiting factor affecting the high frequency use of the Weaver (or any other) DSP
modulator is the sampling and processing speed available, and the aliasing generated in the
final multiplication stage. There are two approaches that might be taken:
(1) Use a full DSP modulator to generate a SSB signal at as higher frequency as is prac-
ticable, then use a simple RF-mixer to up-convert that signal to the RF band. For

16
example, if processing is limited to 192 kHz, generate a SSB signal at 80 kHz, and
then convert it to the 40m ham band ( 7 MHz).
The problem with this approach that use of a simple mixer will generate an image
that must be eliminated by RF band-pass filtering.
(2) In Fig. 15 the second multiplier has been replaced by analog hardware that performs
the same function, and is thus independent of the available DSP processing speed. The
necessary sampling speed for the DSP section is therefore set by the audio bandwidth,
2o , and is therefore quite modest.

lo w - p a s s filte r
f1 (t) f3 (t) I f5 (t)

D /A
- w o 0 w o

c o s (w o t) c o s (w s t)
a u d io s ig n a l A /D +
S S B o u tp u t
f a u d io ( t ) w o ( fix e d ) S y (t)
s in ( w o t) s in ( w s t) + /-

lo w - p a s s filte r
f2 (t) f4 (t) Q f6 (t)

D /A
- w o 0 w o a n a lo g h a r d w a r e
D S P
w s
( v a r ia b le )

Figure 15: Practical implementation of a Weaver based SSB generator.

4.2.2 Wideband DSP Based SSB Receiver


We saw above that the frequency span of a Weaver based receiver is severely restricted by
the sampling rate (and subsequent aliasing) at the A/D converter and first multiplier stage.
Almost all high-frequency SDR receivers use a hybrid approach in which the rf signal is
down-converted to baseband using analog hardware that is functionally equivalent to the
first multiplier stage. The structure is shown in Fig. 16. The pre-alias filters are low-pass,
with a cut-off frequency set to the Nyquist frequency of the A/D converters. Note that these
filters must be placed before the A/D converters, and cannot be combined with the Weaver
filters.
This structure allows for a much reduced DSP processing frequency and complexity. The
processing has been reduced to two filters and two multiplications. The highest frequency
present will be 2o (in the audio signals), setting a minimum sampling/processing frequency
of 4o to prevent aliasing.

4.2.3 A Pseudo-Code Implementation of a Hybrid Weaver Demodulator


Given
a) A pair of identical low-pass filters with a cut-off frequency Fo (Hz)

17
lo w - p a s s filte r
p r e - a lia s f1 (t) f3 (t) f5 (t)
r f s ig n a l
filte r
I A /D
- w o 0 w o
c o s (w s t) c o s (w o t)
frf(t) +
w a u d io o u tp u t
s ( fix e d ) w
( v a r ia b le ) o S y (t)
s in ( w s t) + /- D /A
s in ( w o t)
lo w - p a s s filte r
f2 (t)
p r e - a lia s f4 (t) f6 (t)
filte r
Q A /D
a n a lo g h a r d w a r e - w o 0 w o

D S P

Figure 16: Practical implementation of a Weaver based SSB receiver.

b) A processor sampling rate Fsample (Hz)


the following pseudo-code illustrates the essential steps in a Weaver demodulator as shown
if Fig. 16:

deltaPhase = 2*pi*Fo/Fsample
phase = 0
setClockInterval(1/Fsample)
waitClock()
loop forever
f1 = readAD(0) // Read the two AD converters
f2 = readAD(1) // Avoid data skew by reading as close together as possible
f3 = filterA(f1) // Low-pass filter
f4 = filterB(f2)
f5 = cos(phase) * f3 // Multipliers
f6 = sin(phase) * f4
if (USB) then demodOut = f5 + f6 // Summer
else demodOut = f5 - f6
phase = phase + deltaPhase // Update for next sample
if phase > 2*pi then phase = phase - 2*pi
waitClock() // Wait for real-time clock
end loop

18
Appendix A: Useful Trigonometric Identities
Products of Sinusoidal Functions:
1 1
cos() cos() = cos( ) + cos( + ) (A.1)
2 2
1 1
sin() sin() = cos( ) cos( + ) (A.2)
2 2
1 1
sin() cos() = sin( + ) + sin( ) (A.3)
2 2
1 1
cos() sin() = sin( + ) sin( ) (A.4)
2 2
These properties are useful for finding the effect of multiplying two time domain sinusoidal

functions, for example using Eq(A.1):
Aa
Aa cos(a t + a ) cos(c t) =
[cos ((a c )t + a ) + cos ((a + c )t + )]
2
which demonstrates the sum (a + c ) and difference (a c ) frequencies generated by
multiplication.
Sums of Angles:
cos ( ) = cos () cos () sin () sin () (A.5)
sin ( ) = sin () cos () cos () sin () (A.6)
For example, the phasing method for generating a LSB signal ylsb (t) = A sin((s a )t) is:
ylsb (t) = A sin((s a )t) = A sin(c t) cos(a t) A cos(c t) sin(a t)

Negative Angle Formulas:


cos() = cos() (A.7)
sin() = sin() (A.8)
These are useful for resolving the issue of apparent occurrences of negative frequencies in a
sinusoid. For example if a > b in the expression A sin((b a )t + ), the frequency is

apparently negative. But by using Eq(A.8), the expression may simply be rewritten as
A sin((b a )t + ) = A sin((a b )t )
where the frequency as written is now positive.

Angle Shifts by (90 ) and (180 ):
2
   
sin + = cos () , sin = cos () (A.9)
2 2
  
cos + = sin () , cos = sin () (A.10)
2 2
sin ( ) = sin () (A.11)
cos ( ) = cos () (A.12)
These are useful for shifting between representations using sines and cosines.

19
Appendix B: Signal Processing for Spectral Components with
Negative Frequencies
Signal processing operations, such as multiplication, will often generate signals with an
apparent negative frequency, for example f (t) = A cos(t+). The physical interpretation
can be confusing, and some typical questions raised are:

What the physical meaning of a negative frequency?

What does a signal with a negative frequency look like on an instrument, such as an
oscilloscope or a frequency analyzer?

What happens if a negative frequency signal is passed through a filter whose frequency
response is defined only for positive frequencies?

These are, in fact, non-issues 6 . It is important to remember that a quantity such as t +


is simply a time-varying angle inside a trigonometric sin or cos function, and the mathematics
of signal processing are completely agnostic to the sign of this angle.
Any confusion may be resolved through the negative angle trigonometric formulas (Eqs.
(A.7) and (A.8)) in Appendix A:

cos(a) = cos(a) and sin(a) = sin(a)

which allow any negative frequency component to be written in terms of an equivalent


positive frequency, for example

f1 (t) = A cos(t + ) A cos(t ) or f2 (t) = A sin(t + ) A sin(t ).

Such substitutions may be made at any point in the analysis, and immediately answer the
second question above: a signal with a negative frequency will appear on an instrument as
having a positive frequency but with a possible phase/sign change. This is often referred to
as frequency folding, as shown in Fig. 17.
Filtering Signals with Negative Frequency Components: The response of a linear
filter (with its frequency response characteristics defined in terms of positive frequencies
only) to negative frequency components is an important topic in the discussion of Weaver
modulator/demodulators. Both the modulator and demodulator use low-pass filters with a
passband defined from 0 o , yet the filter inputs necessarily contain negative frequency
components from a prior multiplication. The answer is again found using the negative angle
formulas.
For simplicity assume ideal filters, that is the response is either unity in the passband
and zero in the stopband. Write the input as a negative frequency sinusoid, and express it
as the equivalent positive component:

f (t) = A cos(t + ) A cos(t ).


6
The issues do not arise when using complex mathematics where real signal components are described by
complex exponentials implicitly containing both positive and negative frequency components.

20
|a m p litu d e | |a m p litu d e |

s p e c tr a l fo ld in g

w w
w 2 0 w o w 2 0 - w 2 w 1

Figure 17: Frequency folding of the amplitude spectra about = 0 to convert all com-
ponents to positive frequencies only. Both the original and folded waveform representations
are equally valid.

The output y(t) is identical to that for a different input f 0 (t) = A cos(t ), that is

A cos(t ) in the passband
y(t) =
0 otherwise

Expressing y(t) back to the original negative frequency input



A cos(t + ) in is in the passband
y(t) =
0 otherwise.

lo w - p a s s h ig h - p a s s b a n d -p a s s

f(t) y (t) f(t) y (t) f(t) y (t)

0
w w 0
w
0

Figure 18: The frequency response of any linear filter is an even function of the input
frequency.

The result is that real filters respond symmetrically to positive and negative frequencies
as indicated schematically in Fig. 18.

21

You might also like