28
ECEN 4652/5002 Communications Lab Spring 2017 3-20-17 P. Mathys Lab 8: Amplitude Modulation and Complex Lowpass Signals 1 Introduction Many channels either cannot be used to transmit baseband signals at all, or pass signal energy very inefficiently, except for a relatively narrow passband region at frequencies sub- stantially higher than those contained in a baseband message signal. A well-known example is electromagnetic transmission of radio signals at a frequency f c in free space which re- quires an antenna of length comparable to λ c /2 for a dipole, or λ c /4 for a monopole, where λ c =3 × 10 8 /f c is the wavelength in meters corresponding to f c in Hz. Thus, transmission at f c = 10 kHz would require an antenna of length comparable to 15 km for a dipole, whereas at f c = 900 MHz a length of 8.3 cm is enough for the monopole antenna of a cell phone. 1.1 Amplitude Modulation with Suppressed Carrier The most straightforward way to shift a signal spectrum from baseband to a passband location with center frequency f c is to make use of the frequency shift property of the Fourier transform (FT) which says that m(t) e j (2πfct+θc) ⇐⇒ M (f - f c ) e c . Thus, A c m(t) e j (2πfct+θc) is a complex-valued bandpass signal with amplitude A c and center frequency f c if m(t) is a (bandlimited) baseband signal. To make this into a real bandpass signal x(t), write x(t) = Re{A c m(t) e j (2πfct+θc) } = Re A c m(t) ( cos(2πf c t + θ c )+ j sin(2πf c t + θ c ) ) = A c m(t) cos(2πf c t + θ c ) , where the last equality assumes that A c m(t) is real-valued. The signal x(t) obtained in this way is a AM-DSB-SC (amplitude modulation, double side-band, suppressed carrier) signal with carrier frequency f c , carrier phase θ c and Fourier transform x(t)= A c m(t) cos(2πf c t + θ c ) ⇐⇒ X (f )= A c 2 M (f - f c ) e c + M (f + f c ) e -c . Starting from x(t) = Re{A c m(t) e j (2πfct+θc) } = A c m(t) e j (2πfct+θc) + e -j (2πfct+θc) 2 , 1

Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

  • Upload
    lekien

  • View
    216

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

ECEN 4652/5002 Communications Lab Spring 20173-20-17 P. Mathys

Lab 8: Amplitude Modulation and Complex Lowpass

Signals

1 Introduction

Many channels either cannot be used to transmit baseband signals at all, or pass signalenergy very inefficiently, except for a relatively narrow passband region at frequencies sub-stantially higher than those contained in a baseband message signal. A well-known exampleis electromagnetic transmission of radio signals at a frequency fc in free space which re-quires an antenna of length comparable to λc/2 for a dipole, or λc/4 for a monopole, whereλc = 3×108/fc is the wavelength in meters corresponding to fc in Hz. Thus, transmission atfc = 10 kHz would require an antenna of length comparable to 15 km for a dipole, whereasat fc = 900 MHz a length of 8.3 cm is enough for the monopole antenna of a cell phone.

1.1 Amplitude Modulation with Suppressed Carrier

The most straightforward way to shift a signal spectrum from baseband to a passbandlocation with center frequency fc is to make use of the frequency shift property of theFourier transform (FT) which says that

m(t) ej(2πfct+θc) ⇐⇒ M(f − fc) ejθc .

Thus, Acm(t) ej(2πfct+θc) is a complex-valued bandpass signal with amplitude Ac and centerfrequency fc if m(t) is a (bandlimited) baseband signal. To make this into a real bandpasssignal x(t), write

x(t) = Re{Acm(t) ej(2πfct+θc)} = Re{Acm(t)

(cos(2πfct+ θc) + j sin(2πfct+ θc)

)}

= Acm(t) cos(2πfct+ θc) ,

where the last equality assumes that Acm(t) is real-valued. The signal x(t) obtained in thisway is a AM-DSB-SC (amplitude modulation, double side-band, suppressed carrier) signalwith carrier frequency fc, carrier phase θc and Fourier transform

x(t) = Acm(t) cos(2πfct+ θc) ⇐⇒ X(f) =Ac2

[M(f − fc) ejθc +M(f + fc) e

−jθc] .

Starting from

x(t) = Re{Acm(t) ej(2πfct+θc)} = Acm(t)ej(2πfct+θc) + e−j(2πfct+θc)

2,

1

Page 2: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

we could also have derived this as

X(f) = AcM(f)∗[δ(f − fc) ejθc + δ(f + fc) e

−jθc

2

]=Ac2

[M(f −fc) ejθc +M(f +fc) e

−jθc] .

What is important to note here is that taking the real (or imaginary) part of a signal in thetime domain is an operation that has a well-defined and easy to evaluate counterpart in thefrequency domain.

In the frequency domain x(t) ⇔ X(f) can be visualized as follows (assuming θc = 0 forsimplicity)

M(f)

Mm

−fm 0 fm

f

X(f)

AcMm

2

−fc−fm

−fc

−fc+fm

0fc−fm

fc

fc+fm

f

LSB︷ ︸︸ ︷ USB︷ ︸︸ ︷

From the figure it is evident that if the bandwidth of m(t) is fm, then the bandwidth of x(t)is 2fm, which explains the “DSB” in AM-DSB-SC. It is also clear that if m(t) has no dccomponent (which is the case for speech and music signals, for instance), then x(t) has nocomponent at the carrier frequency fc, which is where the “SC” comes from. The portionof the spectrum of x(t) for which fc − fm ≤ |f | < fc is called the lower side-band (LSB),whereas the portion for which fc < |f | ≤ fc + fm is called the upper side-band (USB).To recover m(t) undistorted from x(t), fc ≥ fm is required, but usually fc � fm in practice.The block diagram of an AM-DSB-SC transmission system is shown in the following figure.

LPFat fm

ChannelHC(f)

LPFat fL

× + ×

Ac cos(2πfct + θc)Carrier Oscillator

2 cos(2πfct + θc)Local Oscillator

Noise n(t)Transmitter

︷ ︸︸ ︷

︸ ︷︷ ︸Channel Model

Receiver︷ ︸︸ ︷

mw(t) m(t) x(t) r(t) v(t) m̂(t)

The transmitter consists of a LPF that bandlimits the wideband message signal mw(t) to|f | ≤ fm and the modulator which multiplies the resulting message signal m(t) with theoutput Ac cos(2πfct+ θc) of the carrier oscillator. The channel is modeled as a filter HC(f)with noise added at the output. In the receiver the incoming signal r(t) is multiplied by thelocal oscillator signal 2 cos(2πfct + θc) and then lowpass filtered at fL. Assuming an ideal

2

Page 3: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

channel with attenuation γ and no noise such that r(t) = γ x(t), the demodulation operationcan be described as

v(t) = 2r(t) cos(2πfct+θc) = 2γAcm(t) cos2(2πfct+θc) = γAcm(t)(1 + cos(4πfct+2θc)

).

Assuming that fc ≥ fm, the second term, which is a AM-DSB-SC signal with carrier fre-quency 2fc and carrier phase 2θc, can be removed by lowpass filtering at fL = fm andthus

m̂(t) = γAcm(t) .

In the absence of noise and other channel impairments this is an exact replica of the trans-mitted message signal, scaled by γAc.

If m(t) is a wide-sense stationary process with autocorrelation function Rm(τ), then theautocorrelation function of the AM-DSB-SC signal x(t) can be computed as

Rx(t1, t2) = E[Acm(t1) cos(2πfct1 + θc)A

∗cm

∗(t2) cos(2πfct2 + θc)]

= |Ac|2 E[m(t1)m∗(t2)]︸ ︷︷ ︸

= Rm(t1 − t2)cos(2πfct1 + θc) cos(2πfct2 + θc)︸ ︷︷ ︸= 1

2

[cos(2πfc(t1 − t2)

)+ cos

(2πfc(t1 + t2) + 2θc

)]

=|Ac|2

2Rm(t1 − t2)

[cos(2πfc(t1 − t2)

)+ cos

(2πfc(t1 + t2) + 2θc

)].

Note that x(t) is a cyclostationary process with period 1/fc. The time-averaged autocorre-lation function of x(t) is

R̄x(τ) = fc

∫ 1/fc

0

Rx(t+ τ, t) dt =|Ac|2

2Rm(τ) cos(2πfcτ) .

Thus, if m(t) has PSD Sm(f), then the PSD of the AM-DSB-SC signal x(t) is

Sx(f) =|Ac|2

4

[Sm(f − fc) + Sm(f + fc)

].

The PSD of a speech signal after AM-DSB-SC modulation with fc = 8000 Hz and fm = 4000Hz is shown in the following graph.

0 2000 4000 6000 8000 10000 12000 14000 16000f [Hz]

−60

−50

−40

−30

−20

−10

0

PSD

: 10

log10(S

x(f))

[dB

]

Px=0.007214, Px(f1, f2) =50\%, Fs =44100 Hz, ∆f =1 Hz, NN=3, N=44100

3

Page 4: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

1.2 Coherent AM Reception

An idealizing assumption which is tacitly made in the AM-DSB-SC transmission systemblock diagram given earlier, is that the local oscillator at the receiver is synchronized withthe carrier oscillator at the transmitter. To see why this synchronism between transmitterand receiver is important, assume that the local oscillator signal is 2 cos(2πfct), but thereceived AM-DSB-SC signal is r(t) = γAcm(t) cos(2π(fc+fe)t+θe), i.e., there is a frequencyerror fe and a phase error θe between transmitter and receiver. Now the receiver computes

v(t) = 2γAcm(t) cos(2π(fc + fe)t+ θe) cos(2πfct)

= γAcm(t)[

cos(2πfet+ θe) + cos(2π(2fc + fe)t+ θe

)],

and thus (for sufficiently small fe)

m̂(t) = γAcm(t) cos(2πfet+ θe) ,

after the LPF at fL = fm. When fe = 0, a small phase error |θe| � π/2 attenuates m(t) bycos(θe) ≈ 1, which presents no big problem, but a phase error close to ±π/2 attenuates m(t)substantially or even suppresses it altogether. If fe is non-zero, then θe does not matter andm̂(t) changes periodically in intensity because of the multiplication with cos(2πfet), whichis quite annoying.

On the positive side, however, the fact that m(t) cos(θe) = 0 for θe = ±π/2 means that twoAM-DSB-SC signals, such as

xi(t) = Acmi(t) cos(2πfct) , and xq(t) = Acmq(t) cos(2πfct+ π/2) ,

can use the same carrier frequency fc to transmit two independent message signals mi(t)and mq(t). This is known as quadrature amplitude modulation (QAM), and xi(t)is called the in-phase component of the AM signal at fc, whereas xq(t) is called thequadrature component. At any rate, it is crucial for the correct demodulation of AMsignals with suppressed carrier, that the receiver is phase (and frequency) synchronizedwith the transmitter. Receivers of this type are called synchronous or coherent receivers.In practice the maintenance of exact phase synchronism between two oscillators in differentphysical locations is quite a non-trivial problem and requires a considerable amount of activehardware and/or software.

1.3 Complex-Valued Lowpass Signals

A QAM signal x(t) is of the form

x(t) = xi(t) + xq(t) = Acmi(t) cos(2πfct) + Acmq(t) cos(2πfct+ π/2) ,

with Fourier transform

X(f) =Ac2

[Mi(f − fc) + j Mq(f − fc) +Mi(f + fc)− j Mq(f + fc)

].

4

Page 5: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

The two baseband signals mi(t) ⇔ Mi(f) and mq(t) ⇔ Mq(f) are real-valued, bandlimitedto fm, and independent of each other. Since the overall signal x(t) has bandwidth 2fm,using QAM is one way of avoiding the doubling of the bandwidth associated with amplitudemodulation.

More generally, letxL(t) = mi(t) + j mq(t)

be a complex-valued lowpass signal with bandwidth fm, made up from the real-valued signalsmi(t) and mq(t). Then we can obtain a real-valued QAM bandpass signal in two steps asfollows. In the first step xL(t) is multiplied by Ac and shifted right by fc in the frequencydomain to obtain the complex-valued signal xu(t) as

xu(t) = Ac xL(t) ej2πfct .

In the second step the real-valued QAM signal x(t) is obtained by

x(t) = Re{xu(t)} =xu(t) + x∗u(t)

2.

In the frequency domain this corresponds to

X(f) =Xu(f) +X∗u(−f)

2=Ac2

[Mi(f−fc)+ j Mq(f−fc)+M∗

i (−f−fc)− j M∗q (−f−fc)

].

Since mi(t) and mq(t) are real-valued, we have Mi(f) = M∗i (−f) and Mq(f) = M∗

q (−f) andtherefore

X(f) =Ac2

[Mi(f − fc) + j Mq(f − fc) +Mi(f + fc)− j Mq(f + fc)

].

Thus, the x(t)⇔ X(f) obtained in this way is the same as the one we obtained before fromx(t) = xi(t) + xq(t).

To demodulate the QAM signal x(t) and recover xL(t) and therefore mi(t) and mq(t) as thereal and imaginary parts of xL(t), we can again use the frequency shift property of the FT.We multiply x(t) by 2 e−j2πfct to obtain

v(t) = x(t) 2 e−j2πfct = [xu(t) + x∗u(t)] e−j2πfct = Ac [xL(t) + x∗L(t) e−j4πfct] .

After lowpass filtering at fL = fm this yields

x̂L(t) = LPF{v(t)} = Ac xL(t) .

Graphically, QAM modulation and demodulation using complex-valued lowpass signals canbe visualized as follows.

× LPFat fL

× Re{.}

2e−j2πfctAc ej2πfct

x(t) v(t) AcxL(t)xL(t) xu(t) x(t)

5

Page 6: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

Using xL(t) = mi(t) + j mq(t) and e±j2πfct = cos(2πfct) ± j sin(2πfct), this can also beimplemented using only real-valued signals as shown in the next blockdiagram.

×

−2 sin 2πfct

2 cos 2πfct

× LPFat fL

LPFat fL

×

−Ac sin 2πfct

Ac cos 2πfct

×

+

+

+

︸ ︷︷ ︸AM Demodulators

︸ ︷︷ ︸AM Modulators

x(t)

vi(t)

vq(t)

Ac mi(t)

Ac mq(t)

mi(t)

mq(t)

x(t)

Note that − sin(2πfct) = cos(2πfct+ π/2).

1.4 Coherent AM Reception Revisited

Let xL(t) = mi(t) + j mq(t) be a complex-valued baseband signal with independent real-valued components mi(t) and mq(t), both bandlimited to fm. Using QAM, the correspondingtransmitted bandpass signal can be written in the time domain as

x(t) = Re{Ac xL(t) ej2πfxt} =Ac2

[xL(t) ej2πfxt + x∗L(t) e−j2πfxt

],

with transmitter carrier frequency fx. At the receiver, tuned to carrier frequency fc, theQAM signal, attenuated by a factor γ, looks like this

r(t) =γ Ac

2

[xL(t) ej(2π(fc+fe)t+θe) + x∗L(t) e−j(2π(fc+fe)t+θe)

],

where fe and θe represent the frequency and the phase errors between transmitter andreceiver.

If the receiver uses a QAM demodulator that outputs complex-valued lowpass signals, thenthe spectrum of r(t) is shifted left in the first step to obtain

v(t) = r(t) 2 e−j2πfct = γ Ac[xL(t) ej(2πfet+θe) + x∗L(t) e−j(2π(2fc+fe)t+θe)

].

After lowpass filtering at fL ≈ fm we thus have

x̂L(t) = LPF{v(t)} = γ Ac xL(t) ej(2πfet+θe) .

6

Page 7: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

Suppose now that x̂L(t) has some special properties from which fe and θe can be estimated.Then it is possible to obtain the scaled, but otherwise error-free demodulated signal fromthe complex-valued QAM demodulator output x̂L(t) by multiplying with e−j(2πfet+θe)

x̂L e−j(2πfet+θe) = γ Ac xL(t) .

If, on the other hand, the receiver uses an entirely real-valued QAM demodulator implemen-tation and r(t) is correspondingly converted to

r(t) = γ Ac[mi(t) cos(2π(fc + fe)t+ θe)−mq(t) sin(2π(fc + fe)t+ θe)

],

then

vi(t) = r(t) 2 cos(2πfct) = γ Ac[mi(t)

(cos(2πfet+ θe) + cos(2π(2fc + fe)t+ θe)

)+

−mq(t)(

sin(2πfet+ θe) + sin(2π(2fc + fe) + θe))],

and

vq(t) = −r(t) 2 sin(2πfct) = γ Ac[mi(t)

(sin(2πfet+ θe)− sin(2π(2fc + fe)t+ θe)

)+

+mq(t)(

cos(2πfet+ θe)− cos(2π(2fc + fe) + θe))].

After lowpass filtering at fL ≈ fm the demodulated real-valued signals are

m̂i(t) = LPF{vi(t)} = γ Ac[mi(t) cos(2πfet+ θe)−mq(t) sin(2πfet+ θe)

],

and

m̂q(t) = LPF{vq(t)} = γ Ac[mq(t) cos(2πfet+ θe) +mi(t) sin(2πfet+ θe)

].

In this case it is in general not possible to obtain scaled, but otherwise error-free demodulatedsignals from m̂i(t) and m̂q(t). Thus, the preferred way for (digital) signal processing in radioreceivers is to use complex-valued lowpass signals for as long as possible and to convert toreal-valued signals only after all other necessary processing has been done.

1.5 Amplitude Modulation with Carrier

An entirely different approach to solve the problem of synchronization between transmitterand receiver for real-valued message signals m(t) is to add a sufficiently large dc term tom(t) so that the carrier signal cos(2πfct + θc) always gets multiplied by a non-negativenumber. The block diagram of a AM-DSB-TC (amplitude modulation, double side-band,transmitted carrier) transmitter is shown in the following figure.

LPFat fm

α

+ ×

Ac cos(2πfct + θc)Carrier Oscillator

1

mw(t) mn(t)

1 + αmn(t) x(t)

7

Page 8: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

Written out explicitly, the general form of a AM-DSB-TC signal is

x(t) = Ac(1 + αmn(t)

)cos(2πfct+ θc) = Ac cos(2πfct+ θc)︸ ︷︷ ︸

carrier term

+Acαmn(t) cos(2πfct+ θc)︸ ︷︷ ︸AM-DSB-SC signal

,

where mn(t) is the normalized message signal, obtained from the lowpass filtered widebandsignal m(t) = LPF{mw(t)} as

mn(t) =m(t)

maxt |m(t)| ,

and 0 ≤ α ≤ 1 is the modulation index (often expressed in percent as 100α%). Comparingthis with AM-DSB-SC, the only difference is that instead of using m(t) (or mn(t)) directly,the offset version 1 +αmn(t) is used to modulate the carrier amplitude. The following figureshows the AM-DSB-TC (upper graph) and the AM-DSB-SC (lower graph) signals that resultfrom a sinusoidal message signal m(t). The modulation index for the AM-DSB-TC signal isα = 0.7

0 0.005 0.01 0.015 0.02 0.025 0.03−2

−1

0

1

2

AM−DSB−TC, m(t)=sin(2πf1t), f

1=100 Hz, f

c=2000 Hz, α=0.7

x TC

(t)

0 0.005 0.01 0.015 0.02 0.025 0.03−2

−1

0

1

2

AM−DSB−SC, m(t)=sin(2πf1t), f

1=100 Hz, f

c=2000 Hz

x SC

(t)

t [sec]

Note that the carrier (blue line) never changes phase in the AM-DSB-TC case since themessage signal (red dashed line) is never negative due to the dc offset (green line at +1). Forthe AM-DSB-SC signal, however, the phase of the carrier (blue line) changes by 180◦ whenthe message signal (red dashed line) becomes negative because it has no dc offset (green lineat 0). Thus, in contrast to AM-DSB-SC, an AM-DSB-TC signal can be demodulated usingan envelope detector which only looks at the magnitude of the peaks of the received signalwhich are independent of changes in phase and frequency of the carrier signal.

8

Page 9: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

In the frequency domain the AM-DSB-TC and the AM-DSB-SC signals for a sinusoidalmessage signal m(t) = sin(2πf1t), f1 = 100 Hz, look as follows.

−3000 −2000 −1000 0 1000 2000 30000

0.1

0.2

0.3

0.4

0.5

XT

C(f

)AM−DSB−TC, m(t)=sin(2πf

1t), f

1=100 Hz, f

c=2000 Hz, α=0.7

−3000 −2000 −1000 0 1000 2000 30000

0.1

0.2

0.3

0.4

0.5

XS

C(f

)

f [Hz]

AM−DSB−SC, m(t)=sin(2πf1t), f

1=100 Hz, f

c=2000 Hz

Note that in the AM-DSB-TC case the carrier has always at least twice the amplitude ofthe sidebands. Since the carrier itself is unmodulated, only the sidebands carry information,and the efficiency η of AM-DSB-TC is therefore

η =average power in sidebands

total average power=

α2<m2n(t)>

1 + α2<m2n(t)>

,

where

<y(t)> = limτ→∞

1

τ

∫ τ/2

−τ/2y(t) dt , and thus <m2

n(t)> = limτ→∞

1

τ

∫ τ/2

−τ/2m2n(t) dt ,

which is (typically much) less than the η = 100% value which is achieved by AM-DSB-SC.

1.6 Non-Coherent Reception for AM-DSB-TC

A sinusoid with frequency fc whose amplitude and phase vary over time can be written inthe form

x(t) = ρ(t) cos(2πfct+ θ(t)

), ρ(t) ≥ 0 .

9

Page 10: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

The quantity ρ(t), which is non-negative by convention, is called the envelope of x(t) andθ(t) is called the phase of x(t). The following figure shows the envelopes (bold red line) andthe phases (green line) of a AM-DSB-TC (upper graphs) and a AM-DSB-SC (lower graphs)signal when m(t) is a sinusoid.

0 0.005 0.01 0.015 0.02 0.025 0.03−2

−1

0

1

2

Envelope/Phase of AM−DSB−TC Signal, m(t)=sin(2πf1t), f

1=100 Hz, f

c=2000 Hz, α=0.7

ρ TC

(t),

xT

C(t

)

0 0.005 0.01 0.015 0.02 0.025 0.03−200

−100

0

100

200

θ TC

(t)

[deg

]

0 0.005 0.01 0.015 0.02 0.025 0.03−2

−1

0

1

2

Envelope/Phase of AM−DSB−SC Signal, m(t)=sin(2πf1t), f

1=100 Hz, f

c=2000 Hz

ρ SC

(t),

xS

C(t

)

0 0.005 0.01 0.015 0.02 0.025 0.03−200

−100

0

100

200

θ SC

(t)

[deg

]

t [sec]

Quite clearly the envelope of the AM-DSB-TC signal has the same shape as m(t), whereas theenvelope of the AM-DSB-SC signal is the absolute value |m(t)| of m(t). For the AM-DSB-TCsignal the phase is constant for all t, whereas for the AM-DSB-SC signal the phase jumpsby ±180◦ for those t where m(t) < 0. Thus, demodulation of a AM-DSB-SC signal requiresboth ρ(t) and θ(t), but a received AM-DSB-TC signal r(t) can be demodulated based on theenvelope of r(t) alone, without the need to synchronize to the phase (and precise frequency)of the carrier of r(t). A receiver which does that is called a non-coherent receiver, whereas areceiver that needs to be precisely synchronized with the carrier oscillator at the transmitteris called a coherent receiver.

10

Page 11: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

The following block diagram of a non-coherent “squaring receiver” for AM-DSB-TC ismore complicated than the circuit that is actually used in most standard AM receivers, butit makes it very easy to show analytically why AM-DSB-TC does not need a phase (andfrequency) synchronized circuit for demodulation.

(.)2 LPFat fL

√.

Blockdc

r(t) v(t) w(t) ρ(t) m̂(t)

Assume that the received signal is r(t) = γx(t), where γ is the attenuation factor of thetransmission channel. Then, referring to the notation in the above block diagram,

v(t) = r2(t) = γ2A2c

(1+αmn(t)

)2cos2(2πfct+ θc)

=γ2A2

c

2

(1+αmn(t)

)2(1 + cos(4πfct+ 2θc)

).

The LPF is designed to remove the AM signal at twice the carrier frequency, while passing(1 + αmn(t))2 unchanged, so that

w(t) =γ2A2

c

2

(1 + αmn(t)

)2.

Therefore, after taking the (positive) square root, the envelope of r(t) is obtained as

ρ(t) =γAc√

2

∣∣1 + αmn(t)∣∣ =

γAc√2

(1 + αmn(t)

).

The second equality follows from the fact that (1 + αmn(t)) ≥ 0 if 0 ≤ α ≤ 1. Finally,removing the dc component from ρ(t) yields the estimate

m̂(t) =γαAc√

2mn(t) ,

of the transmitted message signal. In the absence of noise and channel distortion, this is anexact (but scaled) copy of the original message signal m(t), independent of the exact valueof fc and independent of any knowledge of the phase θc of the carrier signal.

Using standard trigonometric identities, a sinusoidal signal r(t) with envelope ρ(t) ≥ 0,carrier frequency fc, and phase θ(t) can be expressed as

r(t) = ρ(t) cos(2πfct+ θ(t)

)= ρ(t) cos θ(t)︸ ︷︷ ︸

= wi(t)

cos(2πfct)− ρ(t) sin θ(t)︸ ︷︷ ︸= wq(t)

sin(2πfct) .

From this one easily obtains

ρ(t) =√w2i (t) + w2

q(t) , and θ(t) = tan−1(wq(t)wi(t)

).

11

Page 12: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

The equation for ρ(t) leads to another, more sophisticated receiver for AM-DSB-TC, the I-Qenvelope detector (or I-Q absolute value detector) shown in the following block diagram.

×

−2 sin(2πfct)

2 cos(2πfct)

× LPFat fL

LPFat fL

√w2

i (t) + w2q(t)

r(t)

vi(t)

vq(t)

wi(t)

wq(t)

ρ̂(t)

Similarly, the equation for θ(t) leads to the block diagram of a I-Q phase detector asshown next.

×

−2 sin(2πfct)

2 cos(2πfct)

× LPFat fL

LPFat fL

tan−1(wq(t)

wi(t)

)r(t)

vi(t)

vq(t)

wi(t)

wq(t)

θ̂(t)

Finally, the (equivalent) circuit that is used in most AM receivers is the “absolute valuereceiver” shown below.

abs(.)LPFat fL

Blockdc

r(t) m̂(t)v(t) ρ(t)

12

Page 13: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

1.7 AM-SSB-SC and AM-VSB-SC

One of the disadvantages of AM-DSB-SC is that it occupies twice the bandwidth of theoriginal message signal. One straightforward way to reduce the bandwidth to the originalvalue is to only keep one of the sidebands of the AM signal and suppress the other one. Theresulting AM signals are known as AM-SSB-LSB (amplitude modulation, single sideband,lower sideband) and as AM-SSB-USB (amplitude modulation, single sideband, upper side-band) depending on whether the lower or upper sideband is kept. To convert AM-DSB-SCto AM-SSB-SC (either LSB or USB), the AM-DSB-SC signal can be filtered with a bandpassfilter (BPF) as shown in the following block diagram.

LPFat fm

BPFHBx(f)

×

Ac cos(2πfct + θc)Carrier Oscillator

mw(t) m(t) x(t) xB(t)

For AM-SSB-USB, for example, the transmitter filter HBx(f) is chosen as shown in thefollowing figure.

HBx(f)

1

f−fc−fm −fc −fc+fm 0 fc−fm fc fc+fm

Filter for AM-SSB-USB

A problem with this filter are the sharp cutoffs needed near fc, especially if m(t) has a dccomponent (which is the case for analog TV broadcast signals, for instance). To alleviatethis problem, vestigial sideband (VSB) modulation can be used. This is essentially acompromise between AM-DSB and AM-SSB, with a well controlled (usually linear) overalltransition from the passband of HB(f) to the stopband near fc, extending over a range of2∆ around fc. Depending on whether the lower or upper sideband is kept, the resultingAM signal is either called AM-VSB-LSB (amplitude modulation, vestigial sideband, lowersideband) or AM-VSB-USB (amplitude modulation, vestigial sideband, upper sideband).An example of a filter HB(f) that converts a AM-DSB-SC signal to a AM-VSB-USB-SCsignal is shown in the following figure.

HB(f)

1

f−fc−fm −fc −fc+fm

−fc−∆ −fc+∆

0 fc−fm fc fc+fm

fc−∆ fc+∆

Filter for AM-VSB-USB

13

Page 14: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

Demodulation of AM-SSB-SC signals and AM-VSB-SC signals is done in a similar fash-ion as for AM-DSB-SC by multiplying the received signal with the local oscillator signal2 cos(2πfct + θc), followed by lowpass filtering at fm. To remove noise and/or interferencefrom the unused (portion of the) sideband, a BPF should be used at the input of the receiver,as shown in the following blockdiagram.

BPFHBr(f)

LPFat fL

×

2 cos(2πfct + θc)Local Oscillator

r(t) rB(t) v(t) m̂(t)

For AM-SSB-SC the same BPF can be used for both the transmitter and the receiver. ForAM-VSB-SC the product HBx(f)HBr(f) of the frequency responses of the BPFs at thetransmitter and receiver must be equal to HB(f) as shown above.

1.8 Bandpass Filters

Suppose you have a lowpass filter hL(t) ⇔ HL(f), e.g., an LPF with trapezoidal frequencyresponse and thus

HL(f)

1

f−(1+α)fL

−(1−α)fL

0(1−α)fL

(1+α)fL

0 ≤ α ≤ 1

hL(t) =sin(2πfLt)

πt

sin(2παfLt)

2παfLt⇐⇒

By making use of the frequency shift property of the FT, this LPF can be converted to aBPF hBP (t) ⇔ HBP (f) which is symmetric about some center frequency fc ≥ (1 + α) fL(where α = 0 for an ideal LPF) by

hBP (t) = 2hL(t) cos(2πfct) ⇐⇒ HBP (f) = HL(f) ∗ [δ(f − fc) + δ(f + fc)] .

BPFs that are obtained from ideal LPFs (i.e., α → 0) are well suited for picking out oneparticular signal from several FDM (frequency division multiplexed) signals, or for generatingSSB (single sideband) AM signals from DSB AM signals. BPFs that are obtained from LPFswith trapezoidal frequency response can be used for similar tasks, but in addition they canalso be used to convert frequency to amplitude (in the transition region of the BPF) and togenerate VSB (vestigial sideband) AM signals.

14

Page 15: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

1.9 Frequency Division Multiplexing

Multiplexing is key to using communication system resources efficiently and share themamong many users. Time division multiplexing (TDM) assigns different time slots to differentusers. Frequency division multiplexing (FDM) uses the equivalent approach in thefrequency domain by allocating different frequency bands to different users.

Radio Frequency (RF) Spectrum

VLF LF MF HF VHF UHF SHF EHF

10 kHz 1 MHz 100 MHz 10 GHz

100 km 1 km 10 m 10 cm 1 mm

Microwaves

AM Radio FM Radio ISM Bands

U.S. Frequency Allocations for Selected Radio Frequency Services

Service Frequency Allocation Remarks

AM Radio 535 . . . 1605 kHz fc = 540 . . . 1600 kHz, spacing 10 kHz

FM Radio 88 . . . 108 MHz fc = 88.1 . . . 107.9 MHz, spacing 200 kHz

ISM Bands 915± 13 MHz Cordless phones, speakers2450± 50 MHz Bluetooth, IEEE 802.11b WLAN5800± 75 MHz IEEE 802.11a WLAN

GPS 1575.42 MHz (L1) Coarse/Acquisition & P Codes1227.60 MHz (L2) P Code (encrypted) only

Satellite Radio 2320 . . . 2345 MHz XM, Sirius

1.10 Mixers

A mixer is a device that has two inputs which are multiplied together to obtain one outputwhich contains the convolution of the spectra of the input signals. If one of the inputs isa sinusoid produced by a local oscillator, then the output consists of the input spectrumshifted by the local oscillator frequency fx to the left and to the right. Usually only one ofthe shifted spectra is desired and thus a mixer is normally followed by a BPF (or sometimesan LPF), as shown in the following block diagram.

15

Page 16: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

×

2 cos(2πfxt)

BPFs1(t) s2(t)x(t)

If s1(t) is an AM signal of the form s1(t) = v(t) cos(2πfc1t), where v(t) could either be directlya message signal for AM-DSB-SC, or a normalized message signal plus a dc-component forAM-DSB-TC, then one easily finds that

x(t) = 2 s1(t) cos(2πfxt) = 2 v(t) cos(2πfc1t) cos(2πfxt)

= v(t) [cos(2π(fc1 + fx)t

)+ cos

(2π(fc1 − fx)t

)] .

Thus, the two logical choices for the center frequency of the BPF are either fc2 = fc1 + fx orfc2 = |fc1−fx|. Note that both fx ≤ fc1 and fx > fc1 are possible. In either case, the outputis s2(t) = v(t) cos(2πfc2t), i.e., it is another AM signal with new carrier frequency fc2. Thisis a feature that is used extensively in transmitters to produce a signal, e.g., using digitalsignal processing (DSP), at lower frequencies and then move it up to the actual transmitfrequency which may be in the GHz range. Receivers then use the same feature in theopposite way to bring a signal down from the actual transmit frequency to a (much) lowerfrequency range where DSP can be used.

1.11 Carrier Frequency Extraction

Let r(t) be a received noiseless AM-DSB-SC signal with attenuation γ, i.e.,

r(t) = γ x(t) = γAcm(t) cos(2π(fc + fe)t+ θe

),

where fe is the frequency error and θe is the phase error between the transmitter and thereceiver. To obtain (an estimate of) the error signal ψ(t) = 2πfet+ θe from r(t), start fromsquaring r(t) to obtain

r2(t) = γ2A2cm

2(t) cos2(2π(fc + fe)t+ θe

)=γ2A2

cm2(t)

2

[1 + cos

(4π(fc + fe)t+ 2θe

)].

Multiplying this by 2 cos(4πfct) yields

vi(t) = γ2A2cm

2(t)[1 + cos

(4π(fc + fe)t+ 2θe

)]cos 4πfct

= A(t)[2 cos 4πfct+ cos(4πfet+ 2θe) + cos

(4π(2fc + fe)t+ 2θe

)],

where A(t) = γ2A2cm

2(t)/2 is a time-varying amplitude. Simlarly, multiplying by -2 sin 4πfctresults in

vq(t) = −γ2A2cm

2(t)[1 + cos

(4π(fc + fe)t+ 2θe

)]sin 4πfct

= A(t)[− 2 sin 4πfct+ sin(4πfet+ 2θe)− sin

(4π(2fc + fe)t+ 2θe

)].

16

Page 17: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

Thus, after lowpass filtering with 2fe < fL < fc,

wi(t) = A(t) cos(4πfet+ 2θe) and wq(t) = A(t) sin(4πfet+ 2θe) .

Finally, the error estimate ψ(t) is obtained by taking an inverse tangent and dividing by 2as follows

ψ(t) =1

2tan−1

(wq(t)wi(t)

).

This whole process is shown in blockdiagram form in the next figure.

(.)2

LPFat fL

LPFat fL

tan−1 wq(t)wi(t)

÷2•

×

×

−2 sin 4πfct

2 cos 4πfct

wi(t)

wq(t)

r2(t)r(t)

vi(t)

vq(t)

ψ(t)

Note that, before the division by 2 to obtain ψ(t), it is crucial that the phase (which isonly resolved modulo 2π by the inverse tangent) is unwrapped. To demodulate the receivedAM-DSB-SC signal r(t), the local oscillator term 2 cos(2πfct+ ψ(t)) is then used instead ofthe 2 cos(2πfct+ θc) term shown in an earlier blockdiagram.

2 Lab Experiments

E1. AM Transmitter/Receiver. (a) FIR LPF/BPF with Trapezoidal H(f). Modifyyour trapfilt function in the filtfun module so that it can be used as either a lowpass ora bandpass filter with trapezoidal frequency response. The header of the extended functionis shown below.

17

Page 18: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

def trapfilt(sig_xt, fparms, k, alfa):

"""

Delay compensated FIR LPF/BPF filter with trapezoidal

frequency response.

>>>>> sig_yt, n = trapfilt(sig_xt, fparms, k, alfa) <<<<<

where sig_yt: waveform from class sigWave

sig_yt.signal(): filter output y(t), samp rate Fs

n: filter order

sig_xt: waveform from class sigWave

sig_xt.signal(): filter input x(t), samp rate Fs

sig_xt.get_Fs(): sampling rate for x(t), y(t)

fparms = fL for LPF

fL: LPF cutoff frequency (-6 dB) in Hz

fparms = [fBW, fc] for BPF

fBW: BPF -6dB bandwidth in Hz

fc: BPF center frequency in Hz

k: h(t) is truncated to

|t| <= k/(2*fL) for LPF

|t| <= k/fBW for BPF

alfa: frequency rolloff parameter, linear

rolloff over range

(1-alfa)fL <= |f| <= (1+alfa)fL for LPF

(1-alfa)fBW/2 <= |f| <= (1+alfa)fBW/2 for BPF

"""

To test your modified trapfilt function, estimate the parameters of the BPF whose fre-quency response is shown below and recreate h(t) ⇔ H(f) with your trapfilt function.

18

Page 19: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

0 2000 4000 6000 8000 10000 12000 14000 160000

0.2

0.4

0.6

0.8

1

1.2

1.4

|X(f

)|

FT Approximation , Fs=44100 Hz, N=44100, ∆

f=1 Hz

0 2000 4000 6000 8000 10000 12000 14000 16000−200

−100

0

100

200

∠X

(f)

[deg

]

f [Hz]

(b) Start a new Python module, called amfun.py, and write a function, called amxmtr whichperforms the tasks of an AM transmitter to produce AM-DSB-SC, AM-DSB-TC, AM-SSB,and AM-VSB signals for a real-valued (wideband) message signal m(t). This function usesthe extended trapfilt function to lowpass filter m(t) to fm and to bandpass filter the AMsignal x(t). The header of amxmtr looks as follows:

19

Page 20: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

def amxmtr(sig_mt, xtype, fcparms, fmparms=[], fBparms=[]):

"""

Amplitude Modulation Transmitter for suppressed (’sc’)

and transmitted (’tc’) carrier AM signals

>>>>> sig_xt = amxmtr(sig_mt, xtype, fcparms, fmparms, fBparms) <<<<<

where sig_xt: waveform from class sigWave

sig_xt.signal(): transmitted AM signal

sig_xt.timeAxis(): time axis for x(t)

sig_mt: waveform from class sigWave

sig_mt.signal(): modulating (wideband) message signal

sig_mt.timeAxis(): time axis for m(t)

xtype: ’sc’ or ’tc’ (suppressed or transmitted carrier)

fcparms = [fc, thetac] for ’sc’

fcparms = [fc, thetac, alfa] for ’tc’

fc: carrier frequency

thetac: carrier phase in deg (0: cos, -90: sin)

alfa: modulation index 0 <= alfa <= 1

fmparms = [fm, km, alfam] LPF at fm parameters

no LPF at fm if fmparms = []

fm: highest message frequency

km: LPF h(t) truncation to |t| <= km/(2*fm)

alfam: LPF at fm frequency rolloff parameter, linear

rolloff over range 2*alfam*fm

fBparms = [fBW, fcB, kB, alfaB] BPF at fcB parameters

no BPF if fBparms = []

fBW: -6 dB BW of BPF

fcB: center freq of BPF

kB: BPF h(t) truncation to |t| <= kB/fBW

alfaB: BPF frequency rolloff parameter, linear

rolloff over range alfaB*fBW

"""

Test your transmitter using the message signal sig_mt generated below as input.

Fs = 44100 # Sampling rate

tlen = 1.0 # Duration

f0, f1 = 3000, 5000 # Message frequencies

tt = arange(round(tlen*Fs))/float(Fs) # Time axis

mt = cos(2*pi*f0*tt) + cos(2*pi*f1*tt) # Message signal

sig_mt = ecen.sigWave(mt, Fs, 0) # Waveform from class sigWave

Set xtype=’sc’, fc = 9000 Hz, θc = 0◦, fm = 4000, km ≈ 10 . . . 20, and αm = 0.05. TheLPF at the transmitter should remove the frequency component at 5000 Hz. The 3000 Hzcosine should be moved to fc ± 3000 Hz so that the PSD looks as shown below.

20

Page 21: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

0 2000 4000 6000 8000 10000 12000 14000 16000 18000

f [Hz]

0.00

0.01

0.02

0.03

0.04

0.05

0.06

0.07

PSD:Sx(f)

Px=0.2469, Px(f1, f2) =0.1235, Fs =44100 Hz, ∆f =1 Hz, NN=1, N=44100

How does the PSD change if you use the same parameters as above, except for settingxtype=’tc’ and alfa=0.7?

(c) Use the speech signal in speech801.wav and the music signal in music801.wav to gen-erate AM-DSB-SC signals x1(t) and x2(t), respectively, with fc = 8000 Hz, fm = 4000 Hz,km ≈ 10 . . . 20, and αm = 0.05. Use θc = −90◦ for the speech signal and θc = 0◦ for themusic signal. Adjust the carrier amplitude Ac2 of x2(t) (modulated with the music signal)such that the average powers P (x1(t)) and P (x2(t)) of the AM-DSB-SC signals are approx-imately equal. Create a third signal x3(t) = (x1(t) + x2(t))/

√2. Save the three signals in

myam801.wav, myam802.wav, and myam803.wav, respectively, for later use. Display the PSDsof each of the three signals and compare them. Does the bandwidth for x3(t), which containstwo message signals, change? Display also the PSDs of the squared AM signals x21(t), x

22(t),

and x23(t) and analyze them in the vcinity of 2fc (zoom-in to a range of approximately 15900to 16100 Hz). Is there any useful information that you can get from the squared signals? Ifso, what is this information and for which of the three signals is it actually present?

(d) For the Python module amfun.py, write a function called amrcvr that demodulates areceived AM signal r(t) and produces an estimate m̂(t) of the transmitted message m(t).Here is the header for this function

21

Page 22: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

def amrcvr(sig_rt, rtype, fcparms, fmparms=[], fBparms=[], dcblock=False):

"""

Amplitude Modulation Receiver for coherent (’coh’) reception,

or absolute value (’abs’), or squaring (’sqr’) demodulation,

or I-Q envelope (’iqabs’) detection, or I-Q phase (’iqangle’)

detection.

>>>>> sig_mthat = amrcvr(sig_rt, rtype, fcparms, fmparms,

fBparms, dcblock) <<<<<

where sig_mthat: waveform from class sigWave

sig_mthat.signal(): demodulated message signal

sig_mthat.timeAxis(): time axis mhat(t)

sig_rt: waveform from class sigWave

sig_rt.signal(): received AM signal

sig_rt.timeAxis(): time axis for r(t)

rtype: Receiver type from list

’abs’ (absolute value envelope detector),

’coh’ (coherent),

’iqangle’ (I-Q rcvr, angle or phase),

’iqabs’ (I-Q rcvr, absolute value or envelope),

’sqr’ (squaring envelope detector)

fcparms = [fc, thetac]

fc: carrier frequency

thetac: carrier phase in deg (0: cos, -90: sin)

fmparms = [fm, km, alfam] LPF at fm parameters

no LPF at fm if fmparms = []

fm: highest message frequency

km: LPF h(t) truncation to |t| <= km/(2*fm)

alfam: LPF at fm frequency rolloff parameter, linear

rolloff over range 2*alfam*fm

fBparms = [fBW, fcB, kB, alfaB] BPF at fcB parameters

no BPF if fBparms = []

fBW: -6 dB BW of BPF

fcB: center freq of BPF

kB: BPF h(t) truncation to |t| <= kB/fBW

alfaB: BPF frequency rolloff parameter, linear

rolloff over range alfaB*fBW

dcblock: remove dc component from mthat if true

"""

Test your receiver with the AM-DSB-SC signals that you produced in part (c). Use the samefm, km and αm as for the transmitter. Can you recover the speech and music signals fromx3(t) without any interference between the two signals?

(e) Analyze and, if possible, demodulate the AM signals in the wav-files amsig801.wav,amsig802.wav, amsig803.wav, and amsig804.wav. Look at the signals in the frequencydomain and listen to the demodulated signals (make a wav file in Python and then use amusic player for listening). Try different demodulation methods (coherent, non-coherent,

22

Page 23: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

I-Q envelope detection, etc). Interpret the graphs and the different demodulation methodsand relate your findings to how the demodulated signals sound.

(f) Repeat (e) for the AM signals in the wav-files amsig805.wav, amsig806.wav, andamsig807.wav.

(g) Real-valued AM demodulator for AM-DSB-SC signals in GNU Radio. Buildthe GNU Radio flowgraph shown below to demodulate the two AM-DSB-SC signals in thefile AMsignal_002.bin. The file was recorded using a sampling rate of 512 kHz and eachsample is a 32-bit (real) floating point number.

The nominal carrier frequencies of the two signals are fc1 = 124 kHz and fc2 = 144 kHz, butthe transmitters were off a little bit (within ±10 Hz) from the nominal values. The receiverattempts to demodulate the signals with the nominal carrier frequency values, followed byfine tuning in the range from -10 to +10 Hz. The goal of this experiment is to find out howsuccessful that strategy is when working with real-valued signal processing and to discussits advantages and shortcomings.

E2. QAM Transmitter/Receiver. (a) FIR LPF/BPF with Complex-Valued FilterCoefficients. If the LPF/BPF with trapezoidal frequency response is modified such that

hBP (t) = 2hL(t) ej2πfct ⇐⇒ HBP (f) = HL(f) ∗ δ(f − fc) ,

then we obtain a filter with conplex-valued filter coefficients that can be used for such thingsas generating AM-SSB and AM-VSB signals at baseband. The header of this complex-valuedversion of trapfilt, called trapfilt_cc, is shown below.

23

Page 24: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

def trapfilt_cc(sig_xt, fparms, k, alfa):

"""

Delay compensated FIR LPF/BPF filter with trapezoidal

frequency response, complex-valued input/output and

complex-valued filter coefficients.

>>>>> sig_yt, n = trapfilt_cc(sig_xt, fparms, k, alfa) <<<<<

where sig_yt: waveform from class sigWave

sig_yt.signal(): complex filter output y(t), samp rate Fs

n: filter order

sig_xt: waveform from class sigWave

sig_xt.signal(): complex filter input x(t), samp rate Fs

sig_xt.get_Fs(): sampling rate for x(t), y(t)

fparms = fL for LPF

fL: LPF cutoff frequency (-6 dB) in Hz

fparms = [fBW, fBc] for BPF

fBW: BPF -6dB bandwidth in Hz

fBc: BPF center frequency (pos/neg) in Hz

k: h(t) is truncated to

|t| <= k/(2*fL) for LPF

|t| <= k/fBW for BPF

alfa: frequency rolloff parameter, linear

rolloff over range

(1-alfa)*fL <= |f| <= (1+alfa)*fL for LPF

(1-alfa)*fBW/2 <= |f| <= (1+alfa)*fBW/2 for BPF

"""

Test your trapfilt_cc function by recreating the filter with h(t)⇔ H(f) shown below. Inyour solution include a time domain plot (real and imaginary part) of h(t).

24

Page 25: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

−3000 −2000 −1000 0 1000 2000 30000.0

0.5

1.0

1.5

2.0

2.5

|X(f)|

FT Approximation, Fs =44100 Hz, N=44100, ∆f=1.00 Hz

−3000 −2000 −1000 0 1000 2000 3000

f [Hz]

−200

−150

−100

−50

0

50

100

150

200

arg[X(f)][deg]

(b) Complex-Valued QAM Modulator. In the Python module amfun add the functionqamxmtr, whose header is shown below, for QAM modulation of complex-valued messagesignals (of the form m(t) = mi(t) + j mq(t)).

def qamxmtr(sig_mt, fcparms, fmparms=[]):

"""

Quadrature Amplitude Modulation (QAM) Transmitter with

complex-valued input and real-valued output signals

>>>>> sig_xt = qamxmtr(sig_mt, fcparms, fmparms) <<<<<

where sig_xt: waveform from class sigWave

sig_xt.signal(): real-valued QAM signal

sig_xt.timeAxis(): time axis for x(t)

sig_mt.signal(): complex-valued (wideband) message signal

sig_mt.timeAxis(): time axis for m(t)

fcparms = [fc, thetaci, thetacq]

fc: carrier frequency

thetaci: in-phase (cos) carrier phase in deg

thetacq: quadrature (sin) carrier phase in deg

fmparms = [fm, km, alfam] for LPF at fm parameters

no LPF/BPF at fm if fmparms = []

fm: highest message frequency (-6dB)

km: h(t) is truncated to |t| <= km/(2*fm)

alfam: frequency rolloff parameter, linear

rolloff over range (1-alfam)*fm <= |f| <= (1+alfam)*fm

"""

25

Page 26: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

Test your qamxmtr function by recreating the myam803.wav QAM signal described in E1c. Totest both qamxmtr and trapfilt_cc, use the speech801.wav signal to generate a AM-SSB-LSB signal with bandwidth ≈ 4000 Hz using complex-valued lowpass signal processing fol-lowed by QAM modulation at fc = 8000 Hz and θc = 0◦. Save this signal in myam801ssb.wav

for later use.

(c) The counterpart to the qamxmtr function is the QAM receiver function qamrcvr whichuses complex-valued signal processing. Add this function whose header is shown below tothe amfun module.

def qamrcvr(sig_rt, fcparms, fmparms=[]):

"""

Quadrature Amplitude Modulation (QAM) Receiver with

real-valued input and complex-valued output signals

>>>>> sig_mthat = qamrcvr(sig_rt, fcparms, fmparms) <<<<<

where sig_mthat: waveform from class sigWave

sig_mthat.signal(): complex-valued demodulated message signal

sig_mthat.timeAxis(): time axis for mhat(t)

sig_rt: waveform from class sigWave

sig_rt.signal(): received QAM signal (real-valued)

sig_rt.timeAxis(): time axis for r(t)

fcparms = [fc, thetaci, thetacq]

fc: carrier frequency

thetaci: in-phase (cos) carrier phase in deg

thetacq: quadrature (sin) carrier phase in deg

fmparms = [fm, km, alfam] for LPF at fm parameters

no LPF at fm if fmparms = []

fm: highest message frequency (-6 dB)

km: h(t) is truncated to |t| <= km/(2*fm)

alfam: frequency rolloff parameter, linear

rolloff over range (1-alfam)*fm <= |f| <= (1+alfam)*fm

"""

Test your receiver with the signals that you produced in part (b) and in E1c. What happensif you remove one of the sidebands of an AM-DSB-SC signal, frequency shift the resulting(complex-valued) baseband signal, e.g., by 100 Hz, then take the real part and listen to it?

(d) Look at the AM signals in E1e and E1f (amsig801.wav. . .amsig807.wav again. Canyou improve the quality of any of the demodulated signals using complex lowpass signalprocessing operations, e.g., by removing one of the sidebands?

(e) Complex-valued AM demodulator for AM-DSB-SC signals in GNU Radio.Build the GNU Radio flowgraph shown below to demodulate the two AM-DSB-SC signalsin the file AMsignal_002.bin. The file was recorded using a sampling rate of 512 kHz andeach sample is a 32-bit (real) floating point number.

26

Page 27: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

The nominal carrier frequencies of the two signals are fc1 = 124 kHz and fc2 = 144 kHz, butthe transmitters were off a little bit (within ±10 Hz) from the nominal values. The receiverattempts to demodulate the signals with the nominal carrier frequency values, followed byfine tuning in the range from -10 to +10 Hz. The goal of this experiment is to find outhow successful that strategy is when working with complex-valued signal processing and todiscuss its advantages and shortcomings. Compare also to E1g.

(f) The file AMsignal_005.bin is a binary file that contains the I and Q components ofseveral radio signals in the frequency range from 0 to 120 kHz. The sampling rate of the fileis Fs = 240 kHz and the bandwidth allowed for each station is 10 kHz. Use this file as inputfrom a File Source in the GNU Radio Companion (GRC). Build a flowgraph in the GRC fortuning to and demodulating AM-DSB-SC and, more generally QAM signals (i.e., the sumof two AM-DSB-SC signals at the same carrier frequency, one with a cosine and one with asine carrier). Find all radio signals in AMsignal_005.bin and characterize their properties,such as fc, θc, AM-DSB vs QAM, stability of fc, interference between different stations, etc.Try to demodulate the signals as cleanly as possible. Here is an example of a flowgraph thatcan be used to analyze the different signals.

27

Page 28: Lab 8: Amplitude Modulation and Complex Lowpass …ecee.colorado.edu/~mathys/ecen4652/pdf/lab08.pdfc= 3 108=fcis the wavelength in meters corresponding to fcin Hz. Thus, transmission

Note that some parameters are left blank and you have to decide (and make the case) for thebest (or at least a good) choice. In the QT GUI Sink consider looking at the ConstellationDisplay in addition to the Frequency and Time Domain Displays to distinguish betweenAM-DSB and QAM signals (why?).

E3. Analysis and Demodulation of AM Signals with Impairments. (a) Analyze,characterize and, if possible, demodulate the AM signals in the wav-files amsig808.wav . . .amsig813 with as little impairment as possible. Explain your strategy for choosing the bestdemodulation technique for each signal.

(b) The two AM signals in amsig814.wav and in amsig815.wav contain the same messagesignals, but using different variants of AM modulation. Determine how the two signals weremodulated and try to demodulate the message signals as independently as possible (one isa pure music signal and the other is a pure speech signal). Explain your decoding strategy.

(c) The wav-file in amsig820.wav contains 5 different “radio stations” with carrier frequen-cies of fc1 = 2000 Hz, fc2 = 6000 Hz, fc3 = 10000 Hz, fc4 = 14000 Hz, and fc5 = 18000Hz. Each of the 5 radio stations uses AM-VSB-USB-SC with a linear attenuation transitionband from fc − 1000 Hz to fc + 1000 Hz. Write a Python script to demodulate each of the5 radio stations independently.

c©2000–2017, P. Mathys. Last revised: 4-06-17, PM.

28