wireless phy: modulation and demodulation
DESCRIPTION
Wireless PHY: Modulation and Demodulation. Y. Richard Yang 09 /11/2012. Outline. Admin and recap Amplitude demodulation Digital modulation. Admin. Assignment 1 posted. Recap: Modulation. Objective Frequency assignment Basic concepts the information source (also called baseband ) - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/1.jpg)
Wireless PHY: Modulation and Demodulation
Y. Richard Yang
09/11/2012
![Page 2: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/2.jpg)
2
Outline
Admin and recap Amplitude demodulation Digital modulation
![Page 3: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/3.jpg)
3
Admin
Assignment 1 posted
![Page 4: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/4.jpg)
4
Objectiveo Frequency assignment
Basic conceptso the information source (also called baseband)o carriero modulated signal
Recap: Modulation
![Page 5: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/5.jpg)
5
Recap: Amplitude Modulation (AM)
Block diagram
Time domain
Frequency domain
![Page 6: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/6.jpg)
6
Recap: Demod of AM
Design option 1: multiply modulated signal by e-jfct, and then LPF
Design option 2: quadrature sampling
![Page 7: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/7.jpg)
7
Example: Scanner
Setting: a scanner scans 128KHz blocks of AM radio and saves each block to a file.
For the example file During scan, fc = 710K LPF = 128K (one each side)
![Page 8: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/8.jpg)
8
Exercise: Scanner
Requirements Scan the block in a saved file to find radio stations and
tune to each station (each AM station has 10 KHz) Audio device requires 48K sample rate for playback
![Page 9: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/9.jpg)
9
Remaining Hole: How to Design LPF
Frequency domain view
freqB-B
freqB-B
![Page 10: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/10.jpg)
10
Design Option 1
freqB-B
freqB-B
compute freq
zeroing outoutband freq
compute lower-passtime signal
This is essentially how image compression works.
Problem(s) of Design Option 1?
![Page 11: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/11.jpg)
11
Design Option 2: Impulse Response Filters
GNU software radio implements filtering using Finite Impulse Response (FIR) filters Infinite Impulse Response (IIR) Filters FIR filters are more commonly used
FIR/IIR is essentially online, streaming algorithms
They are used in networks/communications/vision/robotics…
![Page 12: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/12.jpg)
12
FIR Filter
An N-th order FIR filter h is defined by an array of N+1 numbers:
They are often stored backward (flipped)
Assume input data stream is x0, x1, …,
h0h1h2hN…
![Page 13: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/13.jpg)
13
FIR Filter
xnxn-1xn-2xn-3
h0h1h2h3
****
xn+1
compute y[n]:
3rd-OrderFilter
![Page 14: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/14.jpg)
14
FIR Filter
xnxn-1xn-2xn-3
h0h1h2h3
****
xn+1
compute y[n+1]
![Page 15: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/15.jpg)
15
FIR Filter
is also called convolution between x (as a vector) and h (as a vector), denoted as
![Page 16: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/16.jpg)
16
Key Question Using h to Implement LPF
Q: How to determine h?
Approach: Understand the effects of y=g*h in the
frequency domain
![Page 17: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/17.jpg)
g*h in the Continuous Time Domain
17
Remember that we consider x as samples of time domain function g(t) on [0, 1] and (repeat in other intervals)
We also consider h as samples of time domain function h(t) on [0, 1] (and repeat in other intervals)
for (i = 0; i< N; i++) y[t] += h[i] * g[t-i];
![Page 18: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/18.jpg)
Visualizing g*h
18
g(t)
h(t)
time
0 T 0T
![Page 19: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/19.jpg)
Visualizing g*h
19
g(t)
h(0)
timet
0 T 0T
g(t)
![Page 20: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/20.jpg)
Fourier Series of y=g*h
20
![Page 21: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/21.jpg)
Fubini’s Theorem
In English, you can integrate first along y and then along x first along x and then along y at (x, y) gridThey give the same result
21
See http://en.wikipedia.org/wiki/Fubini's_theorem
![Page 22: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/22.jpg)
Fourier Series of y=g*h
22
![Page 23: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/23.jpg)
Summary of Progress So Far
23
y = g * h => Y[k] = G[k] H[k]
In the case of Fourier Transform, y = g * h => Y[f] = G[f] H[f]
is called the Convolution Theorem, an important theorem.
![Page 24: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/24.jpg)
Applying Convolution Theorem to Design LPF
24
Choose h() so that H() is close to a rectangle shape
h() has a low order (why?)
f1/2-1/2
1
![Page 25: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/25.jpg)
Sinc Function
25
The h() is often related with the sinc(t)=sin(t)/t function
f1/2-1/2
1
![Page 26: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/26.jpg)
FIR Design in Practice
26
Compute h MATLAB or other design software GNU Software radio: optfir (optimal filter
design) GNU Software radio: firdes (using a method
called windowing method)
Implement filter with given h freq_xlating_fir_filter_ccf or fir_filter_ccf
![Page 27: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/27.jpg)
LPF Design Example
27
Design a LPF to pass signal at 1 KHz and block at 2 KHz
![Page 28: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/28.jpg)
LPF Design Example
28
#create the channel filter # coefficients chan_taps = optfir.low_pass( 1.0, #Filter gain 48000, #Sample Rate 1500, #one sided mod BW (passband edge) 1800, #one sided channel BW (stopband edge) 0.1, #Passband ripple 60) #Stopband Attenuation in dB print "Channel filter taps:", len(chan_taps) #creates the channel filter with the coef foundchan = gr.freq_xlating_fir_filter_ccf( 1 , # Decimation rate chan_taps, #coefficients 0, #Offset frequency - could be used to shift 48e3) #incoming sample rate
![Page 29: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/29.jpg)
29
Outline
Recap Amplitude demodulation
frequency shifting low pass filter
Digital modulation
![Page 30: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/30.jpg)
30
Modulation of digital signals also known as Shift Keying
Amplitude Shift Keying (ASK): vary carrier amp. according to data
Frequency Shift Keying (FSK)o vary carrier freq. according to bit value
Phase Shift Keying (PSK)o vary carrier freq. according to data
1 0 1
t
1 0 1
t
1 0 1
t
Modulation
![Page 31: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/31.jpg)
31
BPSK (Binary Phase Shift Keying): bit value 1: cosine wave cos(2πfct)
bit value 0: inverted cosine wave cos(2πfct+π)
very simple PSK Properties
robust, used e.g. in satellite systems
Q
I
10
Phase Shift Keying: BPSK
one bit time T
1
one bit time T
0
![Page 32: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/32.jpg)
32
Phase Shift Keying: QPSK
Q
I
11
01
10
00
QPSK (Quadrature Phase Shift Keying): 2 bits coded at a time we call the two bits as one symbol symbol determines shift of cosine
wave often also transmission of relative,
not absolute phase shift: DQPSK - Differential QPSK
![Page 33: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/33.jpg)
33
Quadrature Amplitude Modulation (QAM): combines amplitude and phase modulation
It is possible to code n bits using one symbol 2n discrete levels
0000
0001
0011
1000
Q
I
0010
φ
a
Quadrature Amplitude Modulation
Example: 16-QAM (4 bits = 1 symbol)
Symbols 0011 and 0001 have the same phase φ, but different amplitude a. 0000 and 1000 have same amplitude but different phase
![Page 34: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/34.jpg)
Generic Representation of Digital Keying (Modulation) Sender sends symbols one-by-one M signaling functions g1(t), g2(t), …, gM(t),
each has a duration of symbol time T Each value of a symbol has a signaling
function
34
![Page 35: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/35.jpg)
Exercise: gi() for BPSK
35
1: g1(t) = cos(2πfct) t in [0, T]
0: g0(t) = -cos(2πfct) t in [0, T]
Are the two signaling functions independent? Hint: think of the samples forming a vector, if
it helps, in linear algebra Ans: No. g1(t) = -g0(t)
cos(2πfct)[0, T]1-1
Q
I
10
g1(t)g0(t)
![Page 36: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/36.jpg)
Exercise: Signaling Functions gi() for QPSK
36
11: cos(2πfct + π/4) t in [0, T]
10: cos(2πfct + 3π/4) t in [0, T]
00: cos(2πfct - 3π/4) t in [0, T]
01: cos(2πfct - π/4) t in [0, T]
Are the four signaling functions independent? Ans: No. They are all linear combinations of sin(2πfct) and
cos(2πfct).
Q
I
11
01
10
00
![Page 37: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/37.jpg)
QPSK Signaling Functions as Sum of cos(2πfct), sin(2πfct)
37
11: cos(π/4 + 2πfct) t in [0, T]-> cos(π/4) cos(2πfct) +
-sin(π/4) sin(2πfct)
10: cos(3π/4 + 2πfct) t in [0, T]-> cos(3π/4) cos(2πfct) +
-sin(3π/4) sin(2πfct)
00: cos(- 3π/4 + 2πfct) t in [0, T]-> cos(3π/4) cos(2πfct) +
sin(3π/4) sin(2πfct)
01: cos(- π/4 + 2πfct) t in [0, T]-> cos(π/4) cos(2πfct) +
sin(π/4) sin(2πfct)
sin(2πfct)
11
00
10
cos(2πfct)
[cos(π/4), sin(π/4)]
01
[cos(3π/4), sin(3π/4)]
[cos(3π/4), -sin(3π/4)]
[-sin(π/4), cos(π/4)]
We call sin(2πfct) and cos(2πfct) the bases.
![Page 38: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/38.jpg)
38
Outline
Recap Amplitude demodulation
frequency shifting low pass filter
Digital modulation modulation demodulation
![Page 39: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/39.jpg)
Key Question: How does the Receiver Detect Which gi() is Sent?
39
Assume synchronized (i.e., the receiver knows the symbol boundary).
![Page 40: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/40.jpg)
Starting Point
40
Considered a simple setting: sender uses a single signaling function g(), and can have two actions send g() or nothing (send 0)
How does receiver use the received sequence x(t) in [0, T] to detect if sends g() or nothing?
![Page 41: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/41.jpg)
Design Option 1
41
Sample at a few time points (features) to check
Issue Not use all data points, and less robust to
noise
![Page 42: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/42.jpg)
Design Option 2
42
Streaming algorithm, using all data points in [0, T] As each sample xi comes in, multiply it by a factor hT-i-
1 and accumulate to a sum y
At time T, makes a decision based on the accumulated sum at time T: y[T]
xTx2x1x0
h0h1h2hT
****
![Page 43: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/43.jpg)
Example Streaming (Convolution/Correlation):
Assume incoming x is a rectangular pulse (in baseband) and h is also a rectangular pulse
A gif animation (play in ppt) presentation): redline g(): the sliding filter h(t) blue line f(): the input x()
43Source: http://en.wikipedia.org/wiki/File:Convolution_of_box_signal_with_itself2.gif
![Page 44: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/44.jpg)
Determining the Best h
44
where w is noise,
Design objective: maximize peak pulse signal-to-noise ratio
![Page 45: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/45.jpg)
Determining the Best h
45
Assume Gaussian noise, one can derive
Using Fourier Transform and Convolution Theorem:
![Page 46: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/46.jpg)
Determining the Best h
46
Apply Schwartz inequality
By considering
![Page 47: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/47.jpg)
Determining the Best h
47
![Page 48: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/48.jpg)
Determining Best h to Use
48
xTx2x1x0
gTg2g1g0
****
xTx2x1x0
h0h1h2hT
****
![Page 49: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/49.jpg)
Matched Filter Decision
is called Matched filter.Example
49
decision time
![Page 50: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/50.jpg)
Backup Slides
50
![Page 51: Wireless PHY: Modulation and Demodulation](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56815865550346895dc5c53e/html5/thumbnails/51.jpg)
51
Modulation