Digital Communication Systems - Thammasat University 452 - 6 - Digital... · Transmitter Receiver...
Transcript of Digital Communication Systems - Thammasat University 452 - 6 - Digital... · Transmitter Receiver...
Elements of digital commu. sys.
2
No
ise
& In
terf
eren
ce
Information Source
Destination
Channel
Received
Signal
Transmitted
Signal
Message
Recovered Message
Source Encoder
Channel Encoder
DigitalModulator
Source Decoder
Channel Decoder
DigitalDemodulator
Transmitter
Receiver
Remove
redundancy
(compression)
Add
systematic
redundancy to
combat errors
introduced by
the channel
Map digital
sequence to
analog signal
Digital Modulation/Demodulation
3
No
ise
& In
terf
eren
ce
Information Source
Destination
Channel
Received
Signal
Transmitted
Signal
Message
Recovered Message
Source Encoder
Channel Encoder
DigitalModulator
Source Decoder
Channel Decoder
DigitalDemodulator
Transmitter
Receiver
Remove
redundancy
(compression)
Add
systematic
redundancy to
combat errors
introduced by
the channel
Map digital
sequence to
analog signal
101001
101001
𝑆 𝑡
𝑅 𝑡
0 1 2 3 4 5 6-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Seconds
-8 -6 -4 -2 0 2 4 6 80
0.5
1
1.5
Frequency [Hz]
Magnitude
Simple ASK: ON-OFF Keying (OOK)
4
fc = 4 Hz
Rs = 1
M = 2
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-1
-0.5
0
0.5
1
Seconds
-200 -150 -100 -50 0 50 100 150 2000
0.5
1
1.5
Frequency [Hz]
Magnitude
1 0 1 0 0 1 t
tfc = 100 Hz
Rs = 20 0111110010011100010110000010010010111010111010000000101110001101111001100000010111110101100011011010
0,1
cos 2𝜋𝑓c𝑡
101001Digital
Modulator?
[ASK_playTones_Demo.m]
𝑇𝑠 2𝑇𝑠 3𝑇𝑠 4𝑇𝑠 5𝑇𝑠
Simple “ASK”: “ON-OFF Keying”
5
M = 2
Smoke signal
ASK: Higher Order Modulation
6
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-5
0
5
Seconds
-200 -150 -100 -50 0 50 100 150 2000
2
4
6
8
Frequency [Hz]
Mag
nitu
de
M = 6
4531145240324102302341254141102211155223215150143153135522104022505112411531551045003330455021331444
[ASK_playTones_Demo.m]
0,1,2,3,4,5
FSK
7
0 0.5 1 1.5 2 2.5 3 3.5 4-1
-0.5
0
0.5
1
Seconds
-20 -15 -10 -5 0 5 10 15 200
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Frequency [Hz]
Magnitude
𝑠1 𝑡 = cos 2𝜋𝑓1𝑡
M = 4 1 2 3 4, , , 3,6,9,12 [Hz]cf f f f f
00 01 10 11
𝑠2 𝑡 = cos 2𝜋𝑓2𝑡 𝑠3 𝑡 = cos 2𝜋𝑓3𝑡 𝑠4 𝑡 = cos 2𝜋𝑓4𝑡
[FSK_playTones_Demo.m]
FSK
8
M = 4 1 2 3 4, , , 3,6,9,12 [Hz]cf f f f f
0 1 2 3 4 5 6 7 8 9 10-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Seconds
-20 -15 -10 -5 0 5 10 15 200
0.5
1
1.5
2
2.5
Frequency [Hz]
Magnitude
[12 12 3 12 9 3 6 9 12 12]𝑓𝑐 = Hz
[11 11 00 11 10 00 01 10 11 11]
11110011100001101111Digital
Modulator?
[FSK_playTones_Demo.m]
FSK
9
M = 4
[400 400 100 400 300 100 200 300 400 400]𝑓𝑐 = Hz
[11 11 00 11 10 00 01 10 11 11]
11110011100001101111Digital
Modulator?
1 2 3 4, , , 100, 200,300, 400 [Hz]cf f f f f
0 1 2 3 4 5 6 7 8 9 10-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Seconds
-800 -600 -400 -200 0 200 400 600 8000
0.5
1
1.5
2
2.5
3
Frequency [Hz]
Magnitude
[FSK_playTones_Demo.m]
Gray Code
10
Reflect-and-prefix method for 1-D Gray code construction
Gray code list for 𝑛 bits can be generated recursively from
the list for 𝑛 − 1 bits by
[http://en.wikipedia.org/wiki/Gray_code#mediaviewer/File:Binary-reflected_Gray_code_construction.svg]
reflecting the list (i.e. listing the entries in reverse order),
concatenating the original list with the reversed list,
prefixing the entries in the original list with a binary 0, and then prefixing the entries in the reflected list with a binary 1.
0
110
00
011110
0
1
00011110
00
011110
000
001011010
100101111110
n=2n=3
n=1
Asst. Prof. Dr. Prapun [email protected]
Review: Fourier Transform
11
Digital Communication SystemsECS 452
7 Equations
12
that changed the world
… and still rule everyday
life
13
Important Formulas
14
2
2
2
cos sin
2cos 1 cos 2
2sin 1 cos 2
1 1cos 2
2 2
j ft
j j
c c c
je j
x x
x
G f g t e dt
f t f f e
x
f f e
0
0
2
0
2
0
1 1cos 2
2 2
j ft
j f t
c c c
g t t e G f
e g t G f f
g t f t G f f G f f
Spectrum of ON-OFF Keying
15
fc = 100 Hz
Rs = 1
0 1 2 3 4 5 6-1
-0.5
0
0.5
1
Seconds
-200 -150 -100 -50 0 50 100 150 2000
0.5
1
1.5
Frequency [Hz]
Magnitude
1 0 1 0 0 1M = 2
Frequency-Domain Analysis
16
Modulation:
Shifting Properties: 02
0
j ftg t t e G f
02
0
j f te g t G f f
1 1
cos 22 2
c c cg t f t G f f G f f
Cos vs. Cos Pulse
17
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1
-0.5
0
0.5
1
Seconds
-200 -150 -100 -50 0 50 100 150 2000
0.1
0.2
0.3
0.4
0.5
Frequency [Hz]
Magnitude
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1
-0.5
0
0.5
1
Seconds
-200 -150 -100 -50 0 50 100 150 2000
0.02
0.04
0.06
0.08
0.1
Frequency [Hz]
Magnitude
𝑥 𝑡 = cos 2𝜋 100 𝑡 𝑥 𝑡 = cos 2𝜋 100 𝑡 , 0.4 ≤ 𝑡 ≤ 0.6,
0, otherwise.
0 1 2 3 4 5 6-1
-0.5
0
0.5
1
Seconds
-10 -8 -6 -4 -2 0 2 4 6 8 100
0.5
1
1.5
2
Frequency [Hz]
Magnitude
Spectrum of ON-OFF Keying
18
fc = 5 Hz
Rs = 1
M = 2
1 0 1 0 0 1
0 1 2 3 4 5 6-1
-0.5
0
0.5
1
Seconds
-200 -150 -100 -50 0 50 100 150 2000
0.5
1
1.5
Frequency [Hz]
Magnitude
Spectrum of ON-OFF Keying
19
fc = 100 Hz
Rs = 1
M = 2
1 0 1 0 0 1
0 1 2 3 4 5 6-1
-0.5
0
0.5
1
Seconds
-200 -150 -100 -50 0 50 100 150 2000
0.5
1
1.5
Frequency [Hz]
Magnitude
Spectrum of ON-OFF Keying
20
fc = 100 Hz
Rs = 1
M = 2
1 0 1 0 0 10 1 2 3 4 5 6
-1
-0.5
0
0.5
1
Seconds
95 96 97 98 99 100 101 102 103 104 105
0.5
1
1.5
Frequency [Hz]
Magnitude
Spectrum of ON-OFF Keying
21
fc = 100 Hz
Rs = 20
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-1
-0.5
0
0.5
1
Seconds
-200 -150 -100 -50 0 50 100 150 2000
0.5
1
1.5
Frequency [Hz]
Magnitude
M = 2
Five Frequencies
22
0 0.05 0.1 0.15 0.2 0.25-1
-0.5
0
0.5
1
Seconds
-6000 -4000 -2000 0 2000 4000 60000
0.01
0.02
0.03
Frequency [Hz]
Magnitude
cos 2𝜋𝑓1𝑡 cos 2𝜋𝑓2𝑡 cos 2𝜋𝑓5𝑡cos 2𝜋𝑓4𝑡cos 2𝜋𝑓3𝑡
Rate = Rs frequency-changes per second
Each tone lasts
1/Rs sec.
Spectrum of Five Frequencies (1/5)
23
cos 2𝜋𝑓1𝑡 cos 2𝜋𝑓2𝑡 cos 2𝜋𝑓5𝑡cos 2𝜋𝑓4𝑡cos 2𝜋𝑓3𝑡
300 Hz100 Hz 200 Hz 500 Hz400 Hz
0 1 2 3 4 5 6 7 8 9 10-1
-0.5
0
0.5
1
Seconds
-1000 -800 -600 -400 -200 0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Frequency [Hz]
Mag
nitu
de
Rs = 0.5
Spectrum of Five Frequencies (2/5)
24
cos 2𝜋𝑓1𝑡 cos 2𝜋𝑓2𝑡 cos 2𝜋𝑓5𝑡cos 2𝜋𝑓4𝑡cos 2𝜋𝑓3𝑡
300 Hz100 Hz 200 Hz 500 Hz400 Hz
Rs = 50 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-1
-0.5
0
0.5
1
Seconds
-1000 -800 -600 -400 -200 0 200 400 600 800 10000
0.02
0.04
0.06
0.08
0.1
Frequency [Hz]
Mag
nitu
de
Spectrum of Five Frequencies (3/5)
25
cos 2𝜋𝑓1𝑡 cos 2𝜋𝑓2𝑡 cos 2𝜋𝑓5𝑡cos 2𝜋𝑓4𝑡cos 2𝜋𝑓3𝑡
300 Hz100 Hz 200 Hz 500 Hz400 Hz
Rs = 200 0.05 0.1 0.15 0.2 0.25
-1
-0.5
0
0.5
1
Seconds
-1000 -800 -600 -400 -200 0 200 400 600 800 10000
0.01
0.02
0.03
Frequency [Hz]
Mag
nitu
de
Spectrum of Five Frequencies (4/5)
26
Rs = 500 0.02 0.04 0.06 0.08 0.1 0.12
-1
-0.5
0
0.5
1
Seconds
-1000 -800 -600 -400 -200 0 200 400 600 800 10000
0.005
0.01
0.015
Frequency [Hz]
Mag
nitu
de
300 Hz100 Hz 200 Hz 500 Hz400 Hz
Spectrum of Five Frequencies (5/5)
27
cos 2𝜋𝑓1𝑡 cos 2𝜋𝑓2𝑡 cos 2𝜋𝑓5𝑡cos 2𝜋𝑓4𝑡cos 2𝜋𝑓3𝑡
300 Hz100 Hz 200 Hz 500 Hz400 Hz
0 1 2 3 4 5 6 7 8 9 10-1
-0.5
0
0.5
1
Seconds
-1000 -800 -600 -400 -200 0 200 400 600 800 10000
0.2
0.4
0.6
0.8
1
Frequency [Hz]
Mag
nitu
de
Rs = 0.5
0 1 2 3 4 5 6 7 8 9 10-1
-0.5
0
0.5
1
Seconds
85 90 95 100 105 110 115
0
0.2
0.4
0.6
0.8
Frequency [Hz]M
agnitude
Spectrum of FSK (1/2)
28
Freq. = [400 300 400 400 100 300 200 100 100 100] Hz
0 1 2 3 4 5 6 7 8 9 10-1
-0.5
0
0.5
1
Seconds
-800 -600 -400 -200 0 200 400 600 8000
0.5
1
1.5
2
Frequency [Hz]
Mag
nitu
de
Rs = 1
M = 4
Spectrum of FSK (2/2)
29
Freq. = [100 400 500 500 100 300 300 400 400 400 400 200 300 100 100 500 200 300 500 100 100 200 500 200 200 100 200 200 100 300 100 400 100 300 400 200 300 300 100 300 400 200 500 500 500 300 200 400 200 500] Hz
Rs = 50 1 2 3 4 5 6 7 8 9 10
-1
-0.5
0
0.5
1
Seconds
-1000 -800 -600 -400 -200 0 200 400 600 800 10000
0.5
1
1.5
Frequency [Hz]
Mag
nitu
de
M = 5
Frequency-Domain Analysis
30
Modulation:
Shifting Properties: 02
0
j ftg t t e G f
02
0
j f te g t G f f
1 1
cos 22 2
c c cg t f t G f f G f f
DSB-SC
31
𝑚 𝑡
𝑀 𝑓
𝑣 𝑡
𝑉 𝑓
𝑥 𝑡
𝑋 𝑓
𝑚 𝑡
𝑀 𝑓
0 5 10 15 20 25-1
-0.5
0
0.5
1
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
0 5 10 15 20 25-2
-1
0
1
2
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
0 5 10 15 20 25-2
-1
0
1
2
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
0 5 10 15 20 25-2
-1
0
1
2
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
𝐴
𝐴/ 2
𝐴
𝐴/2
𝐴
1 1
2 cos 22 2
c c cg t f t G f f G f f
DSB-SC (Zoomed in time)
32
1 1.0005 1.001 1.0015 1.002 1.0025 1.003 1.0035 1.004 1.0045 1.005-1
-0.5
0
0.5
1
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
1 1.0005 1.001 1.0015 1.002 1.0025 1.003 1.0035 1.004 1.0045 1.005-1
-0.5
0
0.5
1
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
1 1.0005 1.001 1.0015 1.002 1.0025 1.003 1.0035 1.004 1.0045 1.005-2
-1
0
1
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
1 1.0005 1.001 1.0015 1.002 1.0025 1.003 1.0035 1.004 1.0045 1.005-1
-0.5
0
0.5
1
Seconds
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5
x 104
0
0.05
0.1
0.15
0.2
Frequency [Hz]
Magnitude
𝑚 𝑡
𝑀 𝑓
𝑣 𝑡
𝑉 𝑓
𝑥 𝑡
𝑋 𝑓
𝑚 𝑡
𝑀 𝑓
Note how the high-frequency
content is riding on top of the
original baseband signal.
Note how the baseband signal
𝑚 𝑡 becomes the envelope of
the modulated signal x 𝑡 .
Binary PAM and Its Spectrum (1/4)
33
-5 -4 -3 -2 -1 0 1 2 3 4 50
2
4
6
8
10
f [Hz]
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.2
0.4
0.6
0.8
1
f [Hz]
1
𝑇𝑠=1t
t
1
-1
𝐴= [-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1]
s t
Can you sketch the spectrum of s(t)?
1 0, sp t t T
P f
Binary PAM and Its Spectrum (2/4)
34
-5 -4 -3 -2 -1 0 1 2 3 4 50
2
4
6
8
10
f [Hz]
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.2
0.4
0.6
0.8
1
f [Hz]
1
𝑇𝑠=1t
t
1
-1
𝐴= [-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1]
s t
1 0, sp t t T
P f
1
0
n
k s
k
s t A p t kT
This is also the spectrum of
for any .sp t kT k
Binary PAM and Its Spectrum (3/4)
35
-5 -4 -3 -2 -1 0 1 2 3 4 50
2
4
6
8
10
f [Hz]
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.2
0.4
0.6
0.8
1
f [Hz]
1
𝑇𝑠=1t
t
1
-1
𝐴= [-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1]
s t
1 0, sp t t T
P f
1
0
n
k s
k
s t A p t kT
This is also the spectrum of
for any .sp t kT k
1
2
0
s
nj fkT
k
k
S f P f A e
-5 -4 -3 -2 -1 0 1 2 3 4 50
2
4
6
8
10
f [Hz]
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.2
0.4
0.6
0.8
1
f [Hz]
Binary PAM and Its Spectrum (4/4)
36
1
𝑇𝑠=1t
t
1
-1
𝐴= [-1,-1,1,-1,-1,1,1,-1,-1,-1,1,-1,-1,1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,-1,1]
s t
1 0, sp t t T
P f
This is also the spectrum of
for any .sp t kT k
1 1
2
0 0
s
n nj fkT
k s k
k k
s t A c t kT S f P f A e
S f
GSOP
37
𝑢(1) = 𝑣(1)
𝑒(1)
GSOP
38
𝑢(1)
𝑣(2)
GSOP
39
𝑢(1)
proj𝑢(1) 𝑣(2)
𝑣(2)
𝑢(2) = 𝑣(2) − proj𝑢(1) 𝑣(2)
GSOP
40
𝑢(1)
𝑢(2)
𝑒(1)
𝑒(2)
GSOP
41
𝑢(1)
𝑢(2)
𝑒(1)
𝑒(2)
GSOP
42
𝑢(1)
𝑢(2)
𝑒(1)
𝑒(2)
GSOP
43
𝑢(1)
𝑢(2)
𝑣(3)
GSOP
44
𝑢(1)
𝑢(2)
𝑣(3)
projspan 𝑢(1),𝑢(2) 𝑣(3)
GSOP
45
𝑢(1)
𝑢(2)
𝑣(3)
projspan 𝑢(1),𝑢(2) 𝑣(3)
𝑢(3) = 𝑣(3) − projspan 𝑢(1),𝑢(2) 𝑣(3)
GSOP
46
𝑢(1)
𝑢(2)
𝑣(3)
proj𝑢(1) 𝑣(3)
proj𝑢(2) 𝑣(3) projspan 𝑢(1),𝑢(2) 𝑣(3)=proj𝑢(1) 𝑣(3) + proj𝑢(2) 𝑣(3)
GSOP
47
proj𝑢(1) 𝑣(3)𝑢(1)
𝑢(2)
𝑣(3)
proj𝑢(2) 𝑣(3) projspan 𝑢(1),𝑢(2) 𝑣(3)=proj𝑢(1) 𝑣(3) + proj𝑢(2) 𝑣(3)
𝑢(3)
𝑢(3) = 𝑣(3) − proj𝑢(1) 𝑣(3) + proj𝑢(2) 𝑣(3)
GSOP
48
𝑢(1)
𝑢(2)𝑢(3)
GSOP
49
𝑢(1)
𝑢(2)𝑢(3)
𝑒(1)
𝑒(2) 𝑒(3)
Modulator and Waveform Channel
50
Waveform Channel:
Transmission of the message 𝑊 = 𝑖 is done by inputting the
corresponding waveform 𝑠𝑖 𝑡 into the channel.
Goal: Want to transmit the message (index) W {1, 2, 3, …, M}
Prior Probabilities: ip P W i
R t S t N t
Received waveformTransmitted waveform
Additive White Noise
(Independent of S(t))
M-ary Scheme
M possible messages requires
M possibilities for S(t):
1 2, , , Ms t s t s t
Prior Probabilities: i ip P W i P S t s t
M =2: Binary
M = 3: Ternary
M = 4: QuaternaryDigital
Modulator
N t
R t S tW
Digital
DeModulator W
Energy: ,i i is tE s t 2
1
logM
i i
i
s bp EEE M