Lecture10 Digital
Lecture10 Digital
Lecture10 Digital
modulation
2
Review: AM Modulation & Demodulation
AM Modulation and Demodulation
Transmitter Output Receiver Output
Lowpass
Filter
x(t) y(t) y(t) w(t) r(t)
H(j2πf)
2cos(2πfot) 2cos(2πfot)
Lowpass
Filter
x(t) y(t) y(t) w(t) r(t)
H(j2πf)
2cos(2πfot) 2sin(2πfot)
∿ ∿
Local
oscillator
• If receiver cosine wave turns into a sine wave, we
• Receiver usessuddenly receive
sine instead no baseband
of cosine: signal!
no output
– We apparently need to synchronize the phase of the
– sin(2πf0t)cos(2πf 0t) = ½ sin(4πf
transmitter 0t) local oscillators
and receiver
• This is called coherent demodulation
• Need to synchronize
• Some keyphase of transmitter and receiver local oscillators
questions:
(coherent demodulation)
– How do we analyze this issue?
– What would be the impact of a small frequency offset? 4
Coherent Demodulation: Frequency-domain analysis
Frequency Domain Analysis
W(j2πf)
H(j2πf)
X(j2πf) Y(j2πf)
f f f
0 -fo 0 fo -2fo -fo 0 fo 2fo
x(t) y(t) y(t) w(t) r(t)
Transmitter Output H(j2πf) Receiver Output
Lowpass
∿ 2cos(2πfot)
∿ 2cos(2πfot) Filter
1 1 1 1
f f
-fo 0 fo -fo 0 fo
5
90º Phase Shift: Frequency-domain analysis
Impact of 90 Degree Phase Shift
W(j2πf)
H(j2πf)
X(j2πf) Y(j2πf)
2fo
f f f
0 -fo 0 fo -2fo -fo 0 fo
x(t) y(t) y(t) w(t) r(t)
Transmitter Output H(j2πf) Receiver Output
=0
Lowpass
2cos(2πfot) 2sin(2πfot) Filter
1 1 j
f1
f f
-fo 0 fo -f1 0
-j
f
0
2cos(2πfot) y(t)
-fo 0 fo
y(t) component
2cos(2πfot)
Lowpass 0
Qt(j2πf) Qr(j2πf)
2sin(2πfot) 2sin(2πfot)
1 j Yq(j2πf) 2
qt(t) qr(t)
f
fo
f
Quadrature (Q)
H(j2πf)
f
0 j -fo 0 j component
Lowpass
0
fo -j fo
f f
-fo 0 -fo 0
-j -j
• I, Q signals• occupy
Demodulate both a cosine
withfrequency
the same bandand sine wave
– One is real–(for
Both I andone
cos), Q channels are recovered!
is imaginary (for sin)
• I/Q modulation allows twice the amount of
7
In-Phase/Quadrature Demodulation
I/Q Demodulation
1 1 1 1
Transmitter Output Receiver Output
It(j2πf) f f
-fo fo Ir(j2πf)
-fo 0 fo Yi(j2πf) 1 0
1 1 2
it(t) ir(t)
f H(j2πf)
f f
0 -fo 0 fo Lowpass
2cos(2πfot) y(t) y(t) 2cos(2πfot) 0
Qt(j2πf) Qr(j2πf)
2sin(2πfot) 2sin(2πfot)
1 j Yq(j2πf) 2
qt(t) qr(t)
fo H(j2πf)
f f f
0 -fo 0 Lowpass
j j 0
fo -j fo
f f
-fo 0 -fo 0
-j -j
• Demodulate• with
Demodulate
both a sine both
withand a cosine and sine wave
a cosine
– Both I and –QBoth I and Q channels are recovered!
channels are recovered!
• I/Q modulation allows twice the amount of
8
I/Q Demodulation: 90º Phase Shift
Impact of 90 Degree Phase Shift
1 1 j
Transmitter Output fo Receiver Output
It(j2πf) f f Ir(j2πf)
-fo 0 fo Yi(j2πf) 1 -fo 0
1 1 -j 2
it(t) ir(t)
f H(j2πf)
f f
0 -fo 0 fo Lowpass
2cos(2πfot) y(t) y(t) 2sin(2πfot) 0
Qt(j2πf) Qr(j2πf)
2sin(2πfot) -2cos(2πfot)
1 j Yq(j2πf)
qt(t) qr(t)
fo H(j2πf)
f f f
0 -fo 0 Lowpass
j 0
fo -j -fo fo -2
f f
-fo 0 0
-j -1 -1
t t
it(t) ir(t)
H(j2πf)
Lowpass
2cos(2πfot) 2cos(2πfot)
2sin(2πfot) 2sin(2πfot)
t t
qt(t) qr(t)
H(j2πf)
Lowpass 10
6.082 Spring 2007 I/Q Modulation and RC Filtering, Slide 9
I/Q modulation: Wrap-up
• I/Q modulation allows twice the amount of information to be sent compared
to basic AM
11
Roadmap
1. Analog I/Q modulation
12
roduce some processing blocks:
v Copy
– 1 Volt = White
v
– 0.37 V = 37% Gray
– etc...
• Encoding of a picture:
– Scan points in prescribed order
v Copy v
– Generate a continuous voltage waveform
(baseband signal)
v INV 1-v 13
• Frequency domain view • Frequency domain view
n the Analog Domain
Information Processing in the Analog Domain
Baseband Input Baseband Input
Receiver Output Receiver Output
It(j2πf) It(j2πf) Ir(j2πf)
Let’sblocks:
build a P2P television network
Ir(j2πf)
1 21 2
ocessing
ir(t) it(t) ir(t)
v t × v ×
Copy v t t t
Copy ∿INV
it(t) ir(t) it(t) ir(t)
H(j2πf) H(j2πf)
t
2cos(2πfot)
2sin(2πfot)
t
2cos(2πfot)
2sin(2πfot)
Lowpass
t
qt(t) qr(t) qt(t) qr(t)
H(j2πf) H(j2πf)
v Encode
Copy INV Decode
?
The Digital Abstraction,
6.082 Spring 2007Slide 3
output
The Digital Abstraction, Slide 3
14
Why did our network fail?
1. Transmitter doesn’t work right
2. Receiver doesn’t work right
3. Theory is imperfect
4. System architecture isn’t right
15
Analog communications issues
• Problem: It’s hard to distinguish legitimate analog waveforms from corrupted
ones
– Every waveform is potentially legitimate!
16
Plan: Mixed Plan:
SignalMixed Signal Architecture
Architecture
Volts Digital Volts
Freq Signal Freq
Phase bits bits Phase
Processing
18
Digital Signaling II
Digital signaling Digital Signaling II
Encoding Attempt #2:
Encoding Attempt #2:
0 0 1 1
Forbidden Zone
• First encoding attempt: Forbidden Zone volts
0 VL
volts
V VH DD
0 VL VH VDD
This avoids “close calls”, but now we have to consider noise (i.e.
• But, what happens unavoidable perturbations to our signaling voltage)
This avoidsin“close
the presence
calls”, but of
nownoise?
we have to consider noise (i.e.
NOISE
unavoidable perturbations to our signaling voltage)
DEVICE DEVICE
NOISE #1 #2 So an output voltage just
below VL might become an
DEVICE DEVICE illegal input voltage in the
#1 V
#2 V±N forbidden zone!
So an output voltage just
below VL might become an
illegal input voltage in the
V V±N
6.082 Spring 2007 The Digital Abstraction, Slide 10
forbidden zone!
0OUT 1OUT
0IN 1IN
INPUTS:
volts
0 VOL VIL VIH VOH VDD
Noise Margins
6.082 Spring 2007 The Digital Abstraction, Slide 11
20
discrete-time samples, we can capture 2N possible values.
21
Note that when we quantize the scaled sample values we
Quantization Error
may be off by up to ±½ step from the true sampled values.
56
55
54
53
54 55 56 55 55
22
Roadmap
1. Analog I/Q modulation
23
The Need
Need for Continuous for Sampling
to Discrete Conversion
Real World Matlab
(USRP Board)
Real world Computer
xc(t) A-to-D x[n]
Converter
xc(t) x[n]
t n
1
• The
• The boundary boundary
between between
analog analog and digital
and digital
– Real world–filled
Real with is filled with continuous-time
worldcontinuous-time signals signals
Computers (i.e. Matlab) operate on sequences
– Computers– operate on discrete-time sequences
• Crossing the analog-to-digital boundary requires
sampling of the continuous-time signals
• Crossing the analog to digital boundary requires conversion between the two
• Key questions
– How do we analyze the sampling process?
– What can go wrong? 24
Modelling Continuous-to-Discrete Conversion
An Analytical Model for Sampling
p(t)
1
t
p(t) T
t t n
T 1
t t t
T T
f t f
-2 -1 0 1 2 -2 -1 0 1 2
T T T T T T T T
t n
T 1
Xp(j2πf) X(ej2πλ)
A A
T T
f λ
-2 -1 0 1 2 -2 -1 0 1 2
T T T T
• to
• Conversion Scaling in time
sequence leadstotoT scaling
amounts =1 in frequency
– Compression/expansion in time leads to expansion/
• compression
Resulting Fourier Transforminnow
frequency
periodic with period 1
• Conversion to sequence amounts to T→ 1 28
Summary of Continuous-to-Discrete Conversion
Summary of Sampling Process
p(t)
1
t
p(t) T
t t n
T 1
f f λ
0 -2 -1 0 1 2 -2 -1 0 1 2
T T T T
• Sampling
• Sampling leads leads to
to periodicity periodicitydomain
in frequency in frequency domain
We need to avoid overlap of replicated 29
The Sampling Theorem
The Sampling Theorem
xc(t) p(t) xp(t)
1
t t t
T T
f t f
-fbw fbw -2 -1 0 1 2 -2 -1 0 1 2
T T T T T T T T
-fbw fbw
- 1 + fbw 1 - fbw
T T
• No overlap• inOverlap
frequencyin frequency domainwhen:
domain (aliasing) (i.e., aliasing) is
– !⁄" − 𝑓&' ≥avoided
𝑓&' or !if:
⁄" ≥ 2𝑓&'
• We refer to the minimum 1/T that avoids aliasing as the Nyquist sampling
frequency of a signal
• We refer to the minimum 1/T that avoids aliasing 30
Sine Wave Example: Sampling Above Nyquist Rate
Example: Sample a Sine Wave
t
p(t) T
xc(t) xp(t) Impulse Train x[n]
to Sequence
t t n
T 1
f f λ
-1/T 0 1/T -1/T 0 1/T -1 0 1
Sample
• Time domain: Resulting rate is well
sequence above same
maintains Nyquist rate as input
period
signal
• Time domain: resulting sequence maintains the
same period as the input continuous-time signal 31
Sine Wave Example: Sampling at Nyquist Rate
Increase Input Frequency Further …
t
p(t) T
xc(t) xp(t) Impulse Train x[n]
to Sequence
t t n
T 1
f f λ
-1/T 0 1/T -1/T 0 1/T -1 0 1
t t n
T 1
f f λ
-1/T 0 1/T -1/T 0 1/T -1 0 1
t t n
T 1
f f λ
-1/T 0 1/T -1/T 0 1/T -1 0 1
• Resulting sequence is now a sine wave with a different period than the input
Sample rate is well below the Nyquist rate
• Frequency domain: Aliasing to a lower frequency
• Time domain: resulting sequence is now a sine
wave with a different period than the input 34
The IssueThe
of High
Issue Frequency Noise Noise
of High Frequency
p(t)
1
t
p(t) T
f f λ
-1 0 1 -2 -1 0 1 2 -2 -1 0 1 2
T T T T T T
• Typically set sample rate to exceed desired signal’s bandwidth
• We typically set the sample rate to be large
• Real systems can introduce noise/other interference at high frequencies
enough to accommodate full bandwidth of signal
– Sampling causes noise to alias into desired frequency band
• Real systems often introduce noise or other
interfering signals at higher frequencies
35
Anti-Alias Filtering
Anti-Alias Filtering
p(t)
1
t
Anti-alias p(t) T
Lowpass
xc(t) xc(t) xp(t) Impulse Train x[n]
H(j2πf)
to Sequence
H(j2πf)
Xc(j2πf) Xp(j2πf) X(ej2πλ)
f f λ
-1 0 1 -2 -1 0 1 2 -2 -1 0 1 2
T T T T T T
• Practical A/D converters include a continuous-time filter before the sampling
operation • Practical A-to-D converters include a continuous-
– Designed time
to filter out noise
filter andthe
before interference
sampling above 1/2T in frequency, prevent
operation
aliasing
– Designed to filter out all noise and interfering signals
above 1/(2T) in frequency 36
Summary: Advantages of Going Digital
• Allows error correction to be achieved
– Less sensitivity to radio channel imperfections
37
Roadmap
1. Analog I/Q modulation
38
Digital I/Q modulation
Digital I/Q Modulation
Baseband Input Receiver Output
3 3
1 it(t) ir(t) 1
-1 H(j2πf) -1
I
-3 -3
t Lowpass t
2cos(2πfot) 2cos(2πfot)
2sin(2πfot) 2sin(2πfot)
3 3
1 qt(t) qr(t) 1
-1 H(j2πf) -1 Q
-3 -3
t Lowpass t
Sample
Times
• Leverage•analog
Leverage analog communication
communication channel to send
channel to send discrete-valued symbols
– Example:discrete-valued
Send symbol fromsymbols
set { -3, -1, 1, 3 } on both I and Q channels
– Example: send symbol from set {-3,-1,1,3} on both
• At receiver, sample
I andI/Q
Q waveforms every
channels each symbol
symbol period
period
– Associate
• Ateach sampled sample
receiver, I/Q valueI/Q
with symbols from every
waveforms same set on both I and Q
symbol
channels
period
– Associate each sampled I/Q value with symbols from 39
Constellation Diagrams
Constellation Diagrams
3
Baseband Input Constellation Diagrams
3
Receiver Output
1 it(t) Input
Baseband ir(t) 1 Receiver Output I
-1 3 H(j2πf) -1 3
-3 1 it(t) i-3
r(t) 1
-1 t Lowpass
H(j2πf) -1 tI
-3
2cos(2πfot) 2cos(2πfot) -3
2sin(2πfot)t 2sin(2πfot) Lowpass t
3 2cos(2πfot) 2cos(2πfot) 3
1 2sin(2πfot) 2sin(2πfot) qr(t) 1 3
3 qt(t)
-1 H(j2πf) q-1
Q
1 qt(t) r(t) 1
-3 -1 H(j2πf) -3 -1 Q
-3 t Lowpass -3 t
t Lowpass t
a sense distinguish
of how easy it isdifferent
to
-3
between -3 -1 1 3 40
Sending Digital Sending
Bits Digital Bits
3
Baseband Input
Sending Digital Bits
3
Receiver Output
1 it(t)
Baseband Input ir(t) 1 Receiver Output I
-1 3 H(j2πf) -1 3
-3 1 it(t) -3ir(t) 1
-1 t Lowpass H(j2πf) -1 tI
-3
2cos(2πfot) 2cos(2πfot) -3
2sin(2πfot) t 2sin(2πfot) 2cos(2πf t)Lowpass t
3 2cos(2πfot) o 3
2sin(2πfot) 2sin(2πfot) q (t) 1
1 3 qt(t) r 3
-1 1 qt(t) H(j2πf) -1qr(t) 1 Q
-1 H(j2πf) -3 -1 Q
-3
-3 t Lowpass -3 t
t Lowpass t
Sample
Sample
• Assign bits to eacheach
• Assign •I/QAssign
symbol
I/Qeach
symbol to a to a
I/Q symbol
Times
Times
values
– Constellation values
points no longer consist of single Q Q
• Receiver•matches
MatchI/QI/Q samples to samples to
Sample
Times
samples to corresponding
• Match I/Q Times
45
Impact of Transmit Filter
47
Eye Diagrams
• Eye Diagram: Wrap signal back onto itself in periodic time intervals, retaining all
“traces”
48
Looking at Many Symbols
• Increasing the number of symbols eventually reveals all possible symbol transition
trajectories
– Intuitively displays the impact of filtering on transmitted signal
49
Assessing the Quality of an Eye Diagram
Sample times:
• Eye diagram allows visual inspection of the impact of sample time and decision
boundary choices
– Large “eye opening” implies less vulnerability to symbol errors
50
Relating Eye Diagrams to Constellation
51
Impact of Low Transmit Bandwidth
– Constellation diagrams are a convenient tool to see likelihood of bit errors being
made