Wireless PHY: Modulation and Channels Y. Richard Yang 09/6/2012.
-
Upload
emery-hood -
Category
Documents
-
view
219 -
download
1
Transcript of Wireless PHY: Modulation and Channels Y. Richard Yang 09/6/2012.
Wireless PHY: Modulation and Channels
Y. Richard Yang
09/6/2012
2
Outline
Recap Frequency domain examples Introduction to modulation
3
Frequency Domain Analysis Examples Using GNURadio
spectrum_2sin_plus Audio FFT Sink Scope Sink Noise
4
Frequency Domain Analysis Examples Using GNURadio
spectrum_1sin_rawfft Raw FFT
5
Frequency Domain Analysis Examples Using GNURadio
spectrum_2sin_multiply_complex Multiplication of a sine first by
• a real sine and then by • a complex sine to observe spectrum
6
Takeaway of the Example
Advantages of I/Q representation
7
Quadrature Mixing
spectrum of complexsignal x(t)
spectrum of complexsignal x(t)ej2f0t
spectrum of complexsignal x(t)e-j2f0t
8
Basic Question: Why Not Send Digital Signal in Wireless Communications?
Signals at undesirable frequencies suppose digital frame length T, then signal decomposes into frequencies at 1/T, 2/T, 3/T, …
let T = 1 ms, generates radio waves at frequencies of 1 KHz, 2 KHz, 3 KHz, …
1
0
digital signal
t
9
Frequencies are Assigned and Regulated
Europe USA Japan
Cellular Phones
GSM 450 - 457, 479 -486/460 - 467,489 -496, 890 - 915/935 -960, 1710 - 1785/1805 -1880 UMTS (FDD) 1920 -1980, 2110 - 2190 UMTS (TDD) 1900 -1920, 2020 - 2025
AMPS , TDMA , CDMA 824 - 849, 869 -894 TDMA , CDMA , GSM 1850 - 1910, 1930 - 1990
PDC 810- 826, 940-956, 1429 - 1465, 1477 - 1513
Cordless Phones
CT1+ 885 - 887, 930 -932 CT2 864-868 DECT 1880 - 1900
PACS 1850 - 1910, 1930 -1990 PACS -UB 1910 - 1930
PHS 1895 - 1918 JCT 254-380
Wireless LANs
IEEE 802.11 2400 - 2483 HIPERLAN 2 5150 - 5350, 5470 -5725
902-928 I EEE 802.11 2400 - 2483 5150 - 5350, 5725 - 5825
IEEE 802.11 2471 - 2497 5150 - 5250
Others RF- Control 27, 128, 418, 433,
868
RF- Control 315, 915
RF- Control 426, 868
10
Spectrum and Bandwidth: Shannon Channel Capacity The maximum number of bits that can be transmitted per second by a physical channel is:
where W is the frequency range of the channel, and S/N is the signal noise ratio, assuming Gaussian noise
)1(log2 NSW
11
Frequencies for Communications
VLF = Very Low Frequency UHF = Ultra High FrequencyLF = Low Frequency SHF = Super High FrequencyMF = Medium Frequency EHF = Extra High Frequency
HF = High Frequency UV = Ultraviolet LightVHF = Very High Frequency
Frequency and wave length:
= c/f wave length , speed of light c 3x108m/s, frequency f
1 Mm300 Hz
10 km30 kHz
100 m3 MHz
1 m300 MHz
10 mm30 GHz
100 m3 THz
1 m300 THz
visible lightVLF LF MF HF VHF UHF SHF EHF infrared UV
optical transmissioncoax cabletwisted pair
12
Why Not Send Digital Signal in Wireless Communications?
voice Transmitter
20-20KHzAntenna:
size ~ wavelength
At 3 KHz,
Antenna too large!Use modulation to transfer to higher
frequency
13
Outline
Recap Frequency domain examples Basic concepts of modulation
14
The information source Typically a low frequency signal Referred to as baseband signal
Carrier A higher frequency sinusoid Example cos(2π10000t)
Modulated signal Some parameter of the carrier (amplitude, frequency, phase) is varied in accordance with the baseband signal
Basic Concepts of Modulation
15
Types of Modulation
Analog modulation Amplitude modulation (AM) Frequency modulation (FM) Double and signal sideband: DSB, SSB
Digital modulation Amplitude shift keying (ASK) Frequency shift keying: FSK Phase shift keying: BPSK, QPSK, MSK Quadrature amplitude modulation (QAM)
16
Outline
Recap Frequency domain examples Basic concepts of modulation Amplitude modulation
17
Example: Amplitude Modulation (AM) Block diagram
Time domain
Frequency domain
18
Example: am_modulation Example
Setting Audio source (sample 32K) Signal source (300K, sample 800K) Multiply
Two Scopes
FFT Sink
19
Example AM Frequency Domain
Note: There is always the negative freq. in the freq. domain.
20
Problem: How to Demodulate AM Signal?
21
Outline
Recap Frequency domain examples Basic concepts of modulation Amplitude modulation Amplitude demodulation
22
Design Option 1
Step 1: Multiply signal by e-jfct
Implication: Need to do complex multiple multiplication
23
Design Option 1 (After Step 1)
-2fc
24
Design Option 1 (Step 2)
Apply a Low Pass Filter to remove the extra frequencies at -2fc
-2fc
25
Design Option 1 (Step 1 Analysis)
How many complex multiplications do we need for Step 1 (Multiply by e-jfct)?
26
Design Option 2: Quadrature Sampling
27
Quadrature Sampling: Upper Path (cos)
28
Quadrature Sampling: Upper Path (cos)
29
Quadrature Sampling: Upper Path (cos)
30
Quadrature Sampling: Lower Path (sin)
31
Quadrature Sampling: Lower Path (sin)
32
Quadrature Sampling: Lower Path (sin)
33
Quarature Sampling: Putting Together
34
Exercise: SpyWork
Setting: a scanner scans 128KHz blocks of AM radio and save each block to a file (see am_rcv.py).
SpyWork: Scan the block in a saved file to find radio stations and tune to each station (each AM station has 10 KHz)
35
Remaining Hole: Designing LPF
Frequency domain view
freqB-B
freqB-B
36
Design Option 1
freqB-B
freqB-B
compute freq
zeroing outnot want freq
compute timesignal
Problem of Design Option 1?
37
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
Filtering is common in networks/communications (and AI and …)
38
FIR Filter
An N-th order FIR filter h is defined by an array of N+1 numbers:
Assume input sequence x0, x1, …,
39
Implementing a 3-rd Order FIR Filter
An array of size N+1 for h
xnxn-1xn-2xn-3
h0h1h2h3
****
xn+1
compute y[n]
40
Implementing a 3-rd Order FIR Filter
An array of size N+1 for h
xnxn-1xn-2xn-3
h0h1h2h3
****
xn+1
compute y[n+1]
41
FIR Filter
is also called convolution between x (as a vector) and h (as a vector), denoted as
Key Question: How to Determine h?
g*h in the Continuous Time Domain
42
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];
Visualizing g*h
43
g(t)
h(t)
time
Visualizing g*h
44
g(t)
h(t)
timet
Fourier Series of y=g*h
45
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
46
See http://en.wikipedia.org/wiki/Fubini's_theorem
Fourier Series of y=g*h
47
Summary of Progress So Far
48
y = g * h => Y[k] = G[k] H[k]
is called the Convolution Theorem, an important theorem.
Applying Convolution Theorem to Design LPF
49
Choose h() so that H() is close to a rectangle shape h() has a low order (why?)
Applying Convolution Theorem to Design LPF
50
Choose h() so that H() is close to a rectangle shape h() has a low order (why?)
Sinc Function
51
The h() is often related with the sinc(t)=sin(t)/t function
f1/2-1/2
1
FIR Design in Practice
52
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
LPF Design Example
53
Design a LPF to pass signal at 1 KHz and block at 2 KHz
LPF Design Example
54
#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
55
Outline
Recap Frequency domain examples Basic concepts of modulation Amplitude modulation Amplitude demodulation Digital modulation
56
Modulation of digital signals also known as Shift Keying
Amplitude Shift Keying (ASK): vary carrier amp. according to bit value
Frequency Shift Keying (FSK)o pick carrier freq according to bit value
Phase Shift Keying (PSK):
1 0 1
t
1 0 1
t
1 0 1
t
Modulation
57
BPSK (Binary Phase Shift Keying): bit value 0: sine wave bit value 1: inverted sine wave very simple PSK
Properties robust, used e.g. in satellite
systems
Q
I01
Phase Shift Keying: BPSK
58
Phase Shift Keying: QPSK
11 10 00 01
Q
I
11
01
10
00
A
t
QPSK (Quadrature Phase Shift Keying): 2 bits coded as one symbol symbol determines shift of
sine wave often also transmission of
relative, not absolute phase shift: DQPSK - Differential QPSK
59
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
Exercise
Suppose fc = 1 GHz(fc1 = 1 GHz, fc0 = 900 GHzfor FSK)
Bit rate is 1 Mbps Encode one bit at a time Bit seq: 1 0 0 1 0 1
Q: How does the wave look like for?
60
11 10 00 01
Q
I
11
01
10
00
A
t
Generic Representation of Digital Keying (Modulation) Sender sends symbols one-by-one Each symbol has a corresponding signaling function g1(t), g2(t), …, gM(t), each has a duration of symbol time T
Exercise: What is the setting for BPSK? for QPSK?
61
Checking Relationship Among gi()
62
BPSK 1: g1(t) = -sin(2πfct) t in [0, T]
0: g0(t) = sin(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)
Checking Relationship Among gi()
63
QPSK 11: sin(2πfct + π/4) t in [0, T]
10: sin(2πfct + 3π/4) t in [0, T]
00: sin(2πfct - 3π/4) t in [0, T]
01: sin(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).
We call sin(2πfct) and cos(2πfct) the bases. They are orthogonal because the integral of their product is 0.
Discussion: How does the Receiver Detect Which gi() is Sent?
64
Assume synchronized (i.e., the receiver knows the symbol boundary). This is also called coherent detection
Example: Matched Filter Detection
65
Basic idea consider each gm[0,T] as a point (with coordinates) in a space
compute the coordinate of the received signal s[0,T]
check the distance between gm[0,T] and the received signal s[0,T]
pick m* that gives the lowest distance value
Computing Coordinates
66
Pick orthogonal bases {f1(t), f2(t), …, fN(t)} for {g1(t), g2(t), …, gM(t)}
Compute the coordinate of gm[0,T] as cm = [cm1, cm2, …, cmN], where
Compute the coordinate of the received signal r[0,T] as r = [r1, r2, …, rN]
Compute the distance between r and cm every cm and pick m* that gives the lowest distance value
Example: Matched Filter => Correlation Detector
67
receivedsignal
68
Spectral Density of BPSK
b
Rb =Bb = 1/Tbb
fc : freq. of carrier
fc
Spectral Density =
bit rate-------------------
width of spectrum used
69
Phase Shift Keying: Comparison
BPSK
QPSK
fc: carrier freq.Rb: freq. of data10dB = 10; 20dB =100
11 10 00 01
A
t
Question
70
Why would any one use BPSK, given higher QAM?
Signal Propagation
72
Isotropic radiator: a single point equal radiation in all directions (three dimensional)
only a theoretical reference antenna
Radiation pattern: measurement of radiation around an antenna
zy
x
z
y x idealisotropicradiator
Antennas: Isotropic Radiator
Q: how does power level decrease as a function of d, the distancefrom the transmitter to the receiver?
73
Free-Space Isotropic Signal Propagation
In free space, receiving power proportional to 1/d² (d = distance between transmitter and receiver)
Suppose transmitted signal is cos(2ft), the received signal is
2
4
dGG
P
Ptr
t
r
Pr: received power
Pt: transmitted power
Gr, Gt: receiver and transmitter antenna gain
(=c/f): wave length
Sometime we write path loss in log scale: Lp = 10 log(Pt) – 10log(Pr)
d
cdtftfEd
)]/(2cos[),(
74
Real Antennas
Real antennas are not isotropic radiators Some simple antennas: quarter wave /4 on car
roofs or half wave dipole /2 size of antenna proportional to wavelength for better transmission/receiving
/4/2
Q: Assume frequency 1 Ghz, = ?
Why Not Digital Signal (revisited) Not good for spectrum usage/sharing
The wavelength can be extremely large to build portal devices e.g., T = 1 us -> f=1/T = 1MHz -> wavelength = 3x108/106 = 300m
75
76
Figure for Thought: Real Measurements
77
Receiving power additionally influenced by shadowing (e.g., through a wall or a door)
refraction depending on the density of a medium
reflection at large obstacles scattering at small obstacles diffraction at edges
reflection
scattering
diffraction
shadow fadingrefraction
Signal Propagation
78
Signal Propagation: Scenarios
Details of signal propagation are very complicated
We want to understand the key characteristics that are important to our understanding
79
Shadowing
Signal strength loss after passing through obstacles
Same distance, but different levels of shadowing: It is a random, large-scale effect depending on the environment
Example Shadowing Effects
80
i.e. reduces to ¼ of signal10 log(1/4) = -6.02
81
JTC Indoor Model for PCS: Path Loss
)(10 nLdBLogAL fA: an environment dependent fixed loss factor (dB)
B: the distance dependent loss coefficient,d : separation distance between the base station and mobile terminal, in meters
Lf : a floor penetration loss factor (dB)
n: the number of floors between base station and mobile terminal
Shadowing path loss follows a log-normal distribution (i.e. L is normal distribution) with mean:
82
JTC Model at 1.8 GHz
)(10 nLdBLogAL f
83
Signal can take many different paths between sender and receiver due to reflection, scattering, diffraction
Multipath
84
Example: reflection from the ground or building
Multipath Example: Outdoor
ground
85
Multipath Effect (A Simple Example)
d1d2
1
11 ][2cos
d
tfc
d
ft2cos
2121 22)(2 21dd
c
ddfff c
dcd
2
22 ][2cos
d
tfc
d
phase difference:
Assume transmitter sends out signal cos(2 fc t)
Multipath Effect (A Simple Example)
Suppose at d1-d2 the two waves totally destruct. (what does it mean?)
Q: where are places the two waves construct?
86
integer2121
dd
c
ddf
2121 22
dd
c
ddf
Option 1: Change Location If receiver moves to the right by
/4: d1’ = d1 + /4; d2’ = d2 - /4;
->
87
21
21
21
2
)4/(4/22
''2
dd
dd
dd
By moving a quarter of wavelength, destructiveturns into constructive.Assume f = 1G, how far do we move?
Option 2: Change Frequency
88
Change frequency:
212
1'
dd
cff
2121 22
dd
c
ddf
89
Multipath Delay SpreadRMS: root-mean-square
90
Multipath Effect(moving receiver)
d1d2
1
11 ][2cos
d
tfc
d
ft2cos
example
2
22 ][2cos
d
tfc
d
Suppose d1=r0+vt
d2=2d-r0-vtd1d2
d
Derivation
91
])[sin(])[2sin(2
])[2sin(])[2sin(2
])[2sin(])[2sin(2
])[2sin(])[2sin(2
)sin()sin(2
])[2cos(])[2cos(
0
0
0
0000
020020
00
2
2)2(
22
2
][2][2
2
][2][2
2
cvrd
cvf
cd
cdvtr
cd
cdvtr
cd
cvtrdvtr
cvtrdvtr
tftftftf
cvtrd
cvtr
ttf
ftf
ftf
ftf
tftf
cvtrd
cvtr
cvtrd
cvtr
See http://www.sosmath.com/trig/Trig5/trig5/trig5.html for cos(u)-cos(v)
92
Waveform
v = 65 miles/h, fc = 1 GHz: fc v/c =
10 ms
deep fade
Q: How far does a car drive in ½ of a cycle?
])[sin(])[2sin(2 02cv
rdcvf
cd ttf
109 * 30 / 3x108 = 100 Hz
93
Multipath with Mobility
94
Effect of Small-Scale Fading
no small-scalefading
small-scalefading
95
signal at sender
Multipath Can Spread Delay
signal at receiver
LOS pulsemultipathpulses
LOS: Line Of Sight
Time dispersion: signal is dispersed over time
96
JTC Model: Delay Spread
Residential Buildings
97
signal at sender
Multipath Can Cause ISI
signal at receiver
LOS pulsemultipathpulses
LOS: Line Of Sight
Dispersed signal can cause interference between “neighbor” symbols, Inter Symbol Interference (ISI)
Assume 300 meters delay spread, the arrival time difference is 300/3x108 = 1 ns if symbol rate > 1 Ms/sec, we will have serious ISI
In practice, fractional ISI can already substantially increase loss rate
98
Channel characteristics change over location, time, and frequency
small-scale fading
Large-scalefading
time
power
Summary: Wireless Channels
path loss
log (distance)
Received Signal Power (dB)
frequency
99
Representation of Wireless Channels
Received signal at time m is y[m], hl[m] is the strength of the l-th tap, w[m] is the background noise:
When inter-symbol interference is small:
(also called flat fading channel)
100
Preview: Challenges and Techniques of Wireless Design
Performance affected
Mitigation techniques
Shadow fading(large-scale fading)
Fast fading(small-scale, flat fading)
Delay spread (small-scale fading)
received signal
strength
bit/packet error rate at
deep fade
ISI
use fade margin—increase power or reduce distance
diversity
equalization; spread-spectrum; OFDM; directional
antenna
Backup Slides
101
Received Signal
102
2
2
1
1 )]/(2cos[)]/(2cos[),(
d
cdtf
d
cdtftfEd
c
fd
c
fd 12 22diff phase
d2
d1 receiver
c
ddf )(2 12
103
Multipath Fading with Mobility: A Simple Two-path Example
r(t) = r0 + v t, assume transmitter sends out signal cos(2 fc t)
r0
104
Received Waveform
v = 65 miles/h, fc = 1 GHz: fc v/c = 109 * 30 / 3x108 = 100 Hz
10 ms
Why is fast multipath fading bad?
deep fade
105
Small-Scale Fading
106
signal at sender
Multipath Can Spread Delay
signal at receiver
LOS pulsemultipathpulses
LOS: Line Of Sight
Time dispersion: signal is dispersed over time
107
Delay SpreadRMS: root-mean-square
108
signal at sender
Multipath Can Cause ISI
signal at receiver
LOS pulsemultipathpulses
LOS: Line Of Sight
dispersed signal can cause interference between “neighbor” symbols, Inter Symbol Interference (ISI)
Assume 300 meters delay spread, the arrival time difference is 300/3x108 = 1 msif symbol rate > 1 Ms/sec, we will have serious ISI
In practice, fractional ISI can already substantially increase loss rate
109
Channel characteristics change over location, time, and frequency
small-scale fading
Large-scalefading
time
power
Summary: Wireless Channels
path loss
log (distance)
Received Signal Power (dB)
frequency
110
Dipole: Radiation Pattern of a Dipole
http://www.tpub.com/content/neets/14182/index.htmhttp://en.wikipedia.org/wiki/Dipole_antenna
Free Space Signal Propagation
111
1 0 1
t
1 0 1
t
1 0 1
t
at distance d
?
112
Fourier Series: An Alternative Representation
A problem of the expression
contains both cos() and sin(). Using Euler’s formula:
113
Implementing Wireless: From Hardware to Software
114
Making Sense of the Transform
115
Relating the Two Representations