Professional Documents
Culture Documents
Wireless Communications With PDF
Wireless Communications With PDF
by
Roberto Cristi
Professor
Dept of Electrical and Computer Engineering
Naval Postgraduate School
Monterey, CA 93943
August 2009
Table of Content:
4. Channel Models
4.1 Introduction and Channel Losses
4.2 Models of Fading Channels
4.3 Channel Parameterization
4.4 Estimation of Channel Parameters from Data
Lab 3: Matlab/Simulink Code
8. Multi Antennas
8.1 Receive Diversity
8.2 Transmit Diversity
8.3 Space Time Coding
8.4 Transmit Diversity with Space Coding in IEEE802.16
• Matlab based
• Both Continuous Time and Discrete Time Simulation
• Based on Blocksets
• Model Based Design: a software model of the environment can be
developed and the design can be tested by simulation
• Transition between “ideal” algorithms (infinite precision, floating point) to
“real world” algorithms (finite precision, fixed point);
• Automatic Code Generation: once the design is tested and validated, real
time code can be automatically generated for the target platform
• Continuous Test and Verification
Advantages (from the MathWorks slide)
Innovation
• Rapid design iterations
• “What-if” studies
• Unique features and differentiators
Quality
• Reduce design errors
• Minimize hand coding errors
• Unambiguous communication internally and externally
Cost
• Reduce expensive physical prototypes
• Reduce re-work
• Reduce testing
Time-to-market
• Get it right the first time
Simulink
• Hierarchical block
diagram design and
simulation tool
– Built-in notions of time
and concurrency
• Digital, analog/mixed
signal and event driven
• Visualize Signals
• Co-develop with C code
• Integrated with
MATLAB
Example
Simulink Model
• Design
•Test
• Automatically Generate Code
… 00010101011101010100101111
0010101010010010101001001001….
Compute Errors
Modulator Demodulator
Fading
channel
Display signals
Simulink has a very rich library of blocksets:
1. Introduction to Digital Signal Processing and Matlab
Sampling
nTs
δ [n]
1. “Delta” or “Impulse”
n
2. Sinusoid
phase
amplitude F0
ω0 = 2π
Fs
Frequency (Hz)
Digital
Frequency
(radians)
Example: F = 10kHz
s
Digital frequency:
F0 = 2kHz 2, 000 Hz 2π
⇒ ω0 = 2π = rad
Fs = 10kHz 10, 000 Hz 5
n=0:100; n=[0,1,2,…,100]
A=10;
w0=2*pi/5;
alpha=0.1;
x=A*cos(w0*n+alpha); x=[10*cos(0.1), … , 10*cos((2*pi/5)*100+0.1)]
plot(x);
3. Complex Exponentials
( )
y[n] = Ae j (ω0 n +α ) = Ae jα e jω0 n
= A cos(ω0 n + α ) + j A sin(ω0 n + α )
144244 3 144244 3
Real Part Imaginary Part
A cos(ω0 n + α ) = Re Ae { j (ω0 n +α )
}
Sinusoids and Frequency Spectrum
A j (ω0 n +α ) A − j (ω0 n +α )
A cos(ω0 n + α ) = e + e
2 2
−ω0 ω0
The Fast Fourier Transform (FFT) and its Inverse (IFFT)
1. Definitions
2. Examples
3. Computation in Matlab
4. Symmetry
The Fast Fourier Transform (FFT)
Given a finite sequence of data x
x[n], n = 0,..., N − 1 n
0 N −1
1. Define the FFT
X = FFT {x}
N −1 2π
− jk
X [k ] = ∑ x[n]e
n
where N
k = 0,..., N − 1
n =0
x = IFFT { X }
N −1 2π
1
∑ X [k ]e
jk n
where x[n] =
N
N
n = 0,..., N − 1
k =0
Meaning:
X [k ], k = 0,..., N − 1
F sampling frequency
F =k s
N data length
Example:
Let | X [k ] |
Fs = 10kHz
N = 1024
0 1023
220 k
10
F = 220 kHz = 2.15kHz
1024
Example: example_of_fft.m
3000
2500
2000
1500
1000
500
0
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
Hz
Freq. = 1kHz
Convolution and Correlation
Impulse
response
x[n] y[n]
h[n]
Input output
signal signal
Definition of Convolution:
+∞
y[n] = h[n] * x[n] = ∑ h[l]x[n − l]
l = −∞
In general you deal with sequences of finite length
Impulse
convolution response
Input data
x h =
0 N −1
* 0 M −1
Output data
= y
0 N +M −2
In matlab:
Let
1. h be the vector of impulse response;
2. x be the input vector
Then the output vector
y=conv(h,x);
Example: convolution_of_finite_sequences.m
h=[1,0,0,0.5,0,-0.2,0,0.1]; % impulse response
n=0:200; x=2*cos(0.1*pi*n); % input signal
y=conv(h,x); % output signal
plot(y)
2. Auto Correlation.
For a signal with zero mean, to see if the samples are “correlated” with each other
+∞
Definition of Auto Correlation: rx [m] = ∑ x[ n
n = −∞
] x *
[ n − m]
x[n], n = 0,..., N − 1
N −1
1
rx [m] =
N
∑ x[
n =0
n ] x *
[n − m], m = − N + 1,..., N − 1
⎪σ x =
rx [m] = ⎨ N
∑ |
n =0
x[ n ] | 2
, if m = 0
⎪≈ 0, m
⎩ otherwise
white noise sequence
4
Example: xcorr_of_white_noise.m
3
% data 1
0
sigx=sqrt(2)
-1
x=sigx*randn(1,1000); -2
plot(x); -3
-4
0 100 200 300 400 500 600 700 800 900 1000
% autocorrelation 1.8
autocorrelation of x
1.6
N=length(x);
1.4
rx=xcorr(x)/N; 1.2
1
max_lag=length(x)-1; 0.8
m=-max_lag:max_lag; 0.6
0.4
plot(m,rx) 0.2
-0.2
-1000 -800 -600 -400 -200 0 200 400 600 800 1000
time lag
2. Cross Correlation.
+∞
ryx [m] = ∑ y[
n = −∞
n ] x *
[ n − m]
x[n], n = 0,..., N − 1
y[n], n = 0,..., M − 1
M −1
1
ryx [m] =
M
∑ y[
n =0
n ] x *
[n − m], m = − max( N , M ) + 1,..., max( N , M ) − 1
Case of Interest: estimation of the impulse response of a Linear Time Invariant system
from input-output data
x[n] y[n]
h[n]
2
h=[1, 0, 0.2, -0.5, 2, -0.1]; % impulse response
1.5
y=conv(h,x);
1
ryx=xcorr(y,x) /length(y)
0.5
h_est=ryx/ryx(length(x));
0
-0.5
-1.5 -1 -0.5 0 0.5 1 1.5
4
x 10
2.5
1.5
zoom in
0.5
-0.5
-40 -20 0 20 40 60
Lab 1: Introduction to DSP and Matlab
A.1 Generate a sinusoid with the following parameters and plot it vs time:
Amplitude A = 5. 0
Frequency F0 = 5.0 kHz
Sampling Frequency FS = 15.0 kHz
Phase α = 30 0
Length 128 samples
Reference: plot_a_sinusoid.m
A.2 Take the FFT of the sinusoid you generated, plot its magnitude (absolute value),
and verify that you obtain the frequency you expect.
Reference: example_of_fft.m
B. White Noise, Convolution, Correlation:
Standard Deviation σx = 5
Length N = 10,000 data points
Plot its autocorrelation and verify that it is as expected.
h = [1,0,−2,0.5,0,0,0,0.3]
Determine the output sequence and verify that the crosscorrelation between
input and output is a good estimate of the impulse response of the system.
Reference: impulse_response_with_xcorr.m
2. Digital Communications Fundamentals and the
Additive White Gaussian Noise (AWGN) Channel
References:
source of destination
information Carrier Carrier
frequency frequency
..01010010…
..01010110…
Errors!
I I
Digital Digital
Mod
Q TX channel RX Q decision
Dem
bits symbols pulses pulses symbols bits
Q noise, Q
disturbances,
other users I
I
Continuous
Discrete Time Time Discrete Time
1.2 Goals
Channel
Bandwidth
Noise
Interference
Transmitted Receiver
Variability
Power Complexity
…
TX channel RX
..01010110… ..01010010…
Errors!
1.3 Parameters
symbols Joules
FS = ES =
sec symbol
PT = ES FS Watts
bits
bits Nb = symbols
symbol
pulses
xI [n] xI (t )
DAC
a[n] Digital
Modulator xQ [n] xQ (t ) RF
DAC
PR channel
A=
PT
bits symbols PW = Watts
y I [n] y I (t ) w(t )
Digital ADC
aˆ[n]
Demodulator yQ [n] yQ (t ) RF
ADC
Q (Im)
BPSK I (Re)
−1 +1
[b0 ]
b0 → 1 0
N b = 1 bit/symbol
Q
b1 → 0
4-QAM I
−1 +1
(QPSK) 1
[b0 , b1 ]
b0 → 1 0
N b = 2 bits/symbol
Q
01
16-QAM 00
b1 , b0 →
[b0 , b1 , b2 , b3 ] I
10
N b = 4 bits/symbol
11
b3 , b2 → 11 10 00 01
n
t
symbol pulse
y (t )
y[n]
ADC g R (t ) t
n +∞
∑ x[n]g (t − nT )
n = −∞
S
nTS t
Bandwidth, Symbol Rate and Transmitted Power
g (t ) FS = 1 / TS Symbol Rate
G (F )
TS t (sec) F (Hz )
Symbol B
interval Bandwidth
+∞ +∞
Transmitted Power ES
PT = = ES × FS
TS
Typical: Raised Cosine
g (t ) G (F )
1.5
1
0.8
0.6
1
a=0.6
0.4 a=0.3
a=0.0
a=0.0
0.2 a=0.3
a=0.6
0.5
0
-0.2
-0.4 0
-4 -3 -2 -1 0 1 2 3 4 -1.5 -1 -0.5 0 0.5 1 1.5
t f
F
B
0≤ −1 = α ≤ 1 FS
FS
• smaller bandwidth • larger bandwidth
Transmit Receive
Channel Losses and Noise
Transmitted Power
PT = ES FS Watts Channel Attenuation
PR
channel A=
PT
Received Power
PR = A × PT Watts
w(t )
Noise
N0
Noise Power 2
PW = N 0 × B Watts
Spectral Density
B B F
2.2 Energy per Symbol and Power Spectral Density
Signal Power ES × FS
SNR = =
Noise Power N 0 × B
Bandwidth
N0 / 2
F (Hz )
Noise Power =
⎛ FS ⎞⎛ ES ⎞ ⎛ FS ⎞⎛ Eb ⎞
SNR = ⎜ ⎜
⎟⎜ ⎟
⎟ = Nb ⎜ ⎟⎜⎜ ⎟⎟
⎝ B ⎠⎝ N 0 ⎠ ⎝ B ⎠⎝ N 0 ⎠
Symbols:
Transmitted A cos(2πFc t )
Q xI [n] xI (t )
DAC gT (t )
I xQ (t ) yT (t )
DAC gT (t )
xQ [n]
− A sin (2πFc t )
channel
Received A cos(2πFc t )
Q
y I [n] y I (t ) y R (t )
g R (t )
I Ts
yQ (t )
g R (t )
yQ [n]
− A sin (2πFc t )
Recall: Complex Numbers and Complex Exponentials
jα
Ae = A cos(α ) + j A sin(α )
1424 3 1 424 3
Real Part Imaginary Part
Im A
α
Re
As a consequence:
j 2πFC t
Ae = A cos(2πFC t ) + jA sin( 2πFC t )
It is easier to define one complex signal which combines In Phase and
Quadrature components:
channel
Re Ts Ae − j 2πFct
If the carrier frequency is larger than the bandwidth of the filters, then it
can be simplified as
Baseband Channel
channel
y[n] = y I [n] + jyQ [n]
Im
g R (t )
A − j 2πFct
Ts e
Re 2
3.2 Baseband Channel Representation
A j 2πFct
e
x(t ) 2
x(t )
gT (t ) gT (t )
A
C (F ) C+ ( F − FC )
2
Complex
Real channel
⇐ same ⇒ Baseband
− FC FC F F
channel
y (t ) y (t )
g R (t ) g R (t )
A − j 2πFct
e
2
Advantage: all signals
at lower frequencies,
therefore much easier to
simulate and analyze.
Digital Transmitter/Receiver with Baseband Channel:
Binary Complex
source of x[n]
Encoder Digital
information Modulator
Baseband
Channel
complex
Binary Complex
4. Bit Error Probabilities for M-QAM Modulation
M-QAM:
….01001011001010… M-QAM
ES / TS ⎛ log 2 ( M ) Eb ⎞⎛ FS ⎞
SNR = = ⎜⎜ ⎟⎟⎜ ⎟
N0 B ⎝ N0 ⎠⎝ B ⎠
Therefore, if FS ≅ B :
Eb ⎛ 1 ⎞
= ⎜⎜ ⎟⎟ SNR
N 0 ⎝ log 2 ( M ) ⎠
Given:
Transmitted Power: 100mW
Bandwidth: 1.75MHz
Channel Attenuation: -120dB
Modulation: QPSK (2 bits/symbol)
Compute: Eb / N 0
Solution:
⎛ ES ⎞
SNR = ⎜⎜ ⎟⎟ = −162.4 − (−174) = 11.6dB
⎝ N 0 ⎠ dB
4. Finally (Eb / N 0 )dB = 11.6 − 10 log10 2 = 8.6dB
4.2 Probability of Symbol Error in AWGN
BPSK: ( )
PS = Q 2 NEb0
4-QAM: P ≈ 2Q ( 2 )
S
Eb
N0
⎛ ⎛ 3 log M ⎞⎛⎜ Eb ⎞⎟ ⎞⎟
PS ≈ 4Q⎜ ⎜ 2
⎟⎜
M-QAM: ⎜ ⎝ M −1
⎝ ⎠⎝ N 0 ⎟⎠ ⎟⎠
⎛ x ⎞
= 12 erfc⎜ ⎟
⎝ 2⎠
Symbol Error Rates (Exact Values)
-1
Symbol Error Rate
BPSK 10
4QAM
16QAM -2
10
64QAM
-3
10
Prob. bit Error
-4
10
-5
10
-6
10
-5 0 5 10 15 20
Eb/No dB
Example.
Solution:
source process
sink
• generate data • display results
• read data • plots, scopes…
• import files … • send data to devices
5.2 Digital Communications in AWGN: Simulink Implementation
Generate Complex Data
Compute Bit
Error Rate
BaseBand
Channel
Modulation
Communications Sources >Digital Baseband Mod
>Random Data Sources >>AM
>>>Rectangular QAM
>>Bernoulli Binary
Baseband Channel
1 ⎛ PT ⎞
y[n] = ⎜
A × ⎜ PT x[n] + w[n] ⎟⎟
PR ⎝ SNR ⎠
Transmitter Gain
Channels
> AWGN Channel
Analysis of Data by Computer Simulation
transmitted
error rate
errors
bits
received
Blocks:
• Comms Sinks > Error Rates Calculation
•Simulink > Sinks > Display
Lab2: Digital Communications Fundamentals
1. Simulate the system for the following values of the Signal to Noise Ratio:
SNR=5,10,20dB
2. For each case determine the probability of bit error experimentally
3. Compare with the theoretical values
References: AWGN_no_coding.mdl
bit_error.m
Probability of Symbol Error
-1
Symbol Error Rate
BPSK 10
4QAM
16QAM -2
10
64QAM
-3
10
Prob. bit Error
-4
10
-5
10
-6
10
-5 0 5 10 15 20
Eb/No dB
References:
2. Medium Scale
Fading: due to
shadowing and
3. Small Scale
obstacles
Fading: due to
multipath
1. Large Scale
Fading: due to
distance and
multipath
Wireless Channel
Frequencies of Interest: in the UHF (.3GHz – 3GHz) and SHF (3GHz – 30 GHz)
bands;
Several Effects:
• Path Loss due to dissipation of energy: it depends on distance only
• Shadowing due to obstacles such as buildings, trees, walls. Is caused by
absorption, reflection, scattering …
• Self-Interference due to Multipath.
Prec
10 log10
Ptransm
log10 distance
Line of Sight and Frequencies
SHF
6GHz
Non Line of Sight (NOLOS)
3GHz
UHF
300MHz
1.1. Large Scale Propagation: Free Space
Path Loss due to Free Space Propagation:
Prec = ⎜
antenna
Receive ⎟ Ptransm
d antenna ⎝ 4π d ⎠
c
wavelength λ =
F
⎛ Ptransm ⎞
L = 10log10 ⎜ ⎟ = 20log10 ( F ( MHz )) + 20log10 (d (km )) + 32.45
⎝ Prec ⎠
Free Space Attenuation
20dB / dec
Lp
ΔL p = 20dB
d0 10d 0 log10 ( d )
distance
L p1 − L p 2 = 20dB ⇒ Prec1 = Prec 2 / 100
Valid for:
• Satellite Communicationss
• Point to Point LOS Microwave
• Reference for Path Loss Models
Multipath Models: Two Ray Reflection
hT
xT xR hR
xT + xR − l
Δφ = 2π
• Large distances λ
l d
hT xT
xR hR
monotonic
Two Ray Model Power Received
-20
f=0.3GHz -40
f=3GHz -60
f=30GHz -80
−40dB / dec
Prec/Ptran s in dB
-100
Prec -120
independent of
frequency
Ptrans -140
-160
Prec hT2 hR2
-180
≈ 4
-200 Ptrans d
-220
0 1 2 3 4 5
10 10 10 10 10 10
d in meters
Free Space:
L p = −20 log10 (πλ / 4) + 20 log10 (d )
40dB
Lp
Two Ray Approximation: 20dB
hT
hR
2. Medium Scale Fading: Losses due to Buildings, Trees,
Hills, Walls …
L p = E {L p }+ χ
expected value
⎛d ⎞
E{L p } = 10γ log10 ⎜⎜ ⎟⎟ + L0 dB
⎝ d0 ⎠
Path loss
exponent Reference distance
• indoor 1-10m
• outdoor 10-100m
Values for Exponent γ :
Free Space 2
Urban 2.7-3.5
Indoors (LOS) 1.6-1.8
Indoors(NLOS) 4-6
Empirical Models for Propagation Losses to Environment
Propagation Loss
Lp = α + β log10 (d ) + CM
β = 44.9 − 6.55log10 (h )
where
⎧0 dB medium sized city and suburbs
CM = ⎨
⎩3 dB metropolitan area
Restrictions:
1.5GHz < f < 2GHz
30m < hT < 200m
1m < hR < 10m
1km < d < 20km
Example:
PT
PR = ?
d = 500m
Base Subscriber
Station
⎛d ⎞
Channel: L p = 10γ log10 ⎜
⎜ d ⎟⎟ + L0 + χ
Given:
d = 1m
⎝ 0⎠
0
L0 = 45dB
γ =3
σ = 6dB
Transmitted Power:
Bandwidth: 10MHz
Noise: N 0 = −174dBm / Hz thermal
Then:
0.9
0.6
0.5
0.4
0.3
0.2
the time 0
-1 -0.5 0 0.5 1 1.5 2
x
Receive
Transmit
x (t ) = δ (t − t0 ) y (t ) = L + hkδ (t − t0 − τ k ) + ...
time t0 τ 1 τ 2 τ3
t0
x (t ) = δ (t − t0 )
t0 τ 1 τ 2 τ MAX
t0 channel
Indoor 10 − 50 n sec
Suburbs 2 × 10 −1 − 2 μ sec
Urban 1 − 3 μ sec
Hilly 3-10 μ sec
b. Spreading in Frequency: motion causes frequency shift (Doppler)
x ( t ) = X T e j 2π f c t Receive
Transmit
j 2π ( f c +Δf )t
y (t ) = YR e
time
v
for each path time
Doppler Shift
fc f c + Δf
Frequency (Hz)
Put everything together
time
time
⎧ j 2π ( Fc + ΔFk )( t −τ k ) ⎫
y (t ) = Re ⎨ ∑ ak x (t − τ k )e ⎬
⎩ k ⎭
paths …shift in frequency …
x (t )
Transmit
Receive
y ( t ) = ∑ yl (t )
v l
For each path with NO Line Of Sight (NOLOS):
yl ( t )
r average time delay τl
v
• each time delay τ l + εk
v
• each doppler shift ΔFk = cos(θ k )
λ
⎧⎛ ⎞⎫
yl (t ) = Re ⎨⎜ ∑ ak e j 2π ( Fc + ΔFk )( t −τ l −ε k )
x (t − τ l − ε k ) ⎟ ⎬
⎩⎝ k ⎠⎭
Some mathematical manipulation …
⎧⎛ ⎞ j 2π Fct ⎫
y (t ) = Re ⎨⎜ ∑ ak e j 2πΔFk t − j 2π ( Fc + ΔFk )τ k
e x (t − τ k ) ⎟ e ⎬
⎩⎝ k ⎠ ⎭
= Re {r (t )e j 2π Fct } = rI (t ) cos(2π Fct ) − rQ (t )sin(2π Fct )
r (t ) = cl (t ) x (t − τ l )
k =1
random random
By the CLT cl (t ) is gaussian with:
M
Then
v
⎧ − j 2π λv cosθ Δt ⎫
E {cl (t )cl (t + Δt )} = Pl
M − j 2π cos θ k Δt
1
*
∑e λ
= Pl E ⎨ e ⎬
M k =1 ⎩ ⎭
2π v
1 − j 2π cos θ Δt
= Pl
2π ∫e
0
λ
dθ = Pl J 0 (2π FD Δt )
Each coefficient cl (t ) is complex, gaussian, WSS with autocorrelation
⎧ 2 Pl 1
And PSD
⎪π F if | F |< FD
Sl ( F ) = ⎨ D 1 − ( F / FD ) 2
⎪0
⎩ otherwise
FD F
Bottom Line. This:
x(t ) y (t )
time
time
v
τ1
τl
time τN
∑
y (t )
x(t ) τl
L cl (t )
time
time
τN
cN (t )
delays
For each path
cl (t ) = Pl g (t )
• unit power
• time invariant
• time varying (from autocorrelation)
• from power distribution
Parameters for a Multipath Channel (No Line of Sight):
Doppler Shift: FD Hz
Non Line of Sight (NOLOS) and Line of Sight (LOS) Fading Channels
1. Rayleigh (No Line of Sight). E{cl (t )} = 0
Specified by:
1
Power through NOLOS PNOLOS = PTotal
1+ K
Simulink Example
M-QAM Modulation
-K-
B-FFT
Receiver
Spectrum Gain
Scope
Bit Rate
Set Numerical Values:
velocity
carrier freq.
v
Recall the Doppler Frequency: FD = FC
c
3 × 108 m / sec
modulation
power
channel
Typical Received Power Spectrum
-K-
B-FFT
Receiver
Spectrum Gain
Scope
Doppler freq: FD = 70 Hz
− FS / 2 FS / 2
Similar Example, different parameters
-K-
B-FFT
Receiver
Spectrum Gain
Scope
Doppler freq: FD = 2 Hz
− FS / 2 FS / 2
Channel Parameterization
Received Power
x (t ) = δ (t − t0 ) 0
−10
t0 channel −20
τ MAX time
τ RMS
FT
1 frequency
Coherence Bandwidth Bc =
5 × τ RMS
2. Flat Fading vs Frequency Selective Fading
1
• Based on Channel Time Spread: Bc =
5 × τ RMS
F F F
Frequency
Signal coherence
Bandwidth
Signal Bandwidth
<
> Frequency Coherence
Frequency Selective
Distortion!!!
Fading
Example: Flat Fading
c l (t ) ≅ c l (t + Δ t ) if | Δ t |≤ TC < 1 / F D
⎫
⎪
⎪⎪
⎬ same
x (t ) y (t ) ⎪ response
⎪
⎪⎭
different
response
TC
9
Coherence Time: TC ≈
16π FD Max Doppler
4. Slow Fading vs Fast Fading
9
TC ≈
• Based on Doppler Spread Delay and Time Coherence:
16π FD
t t
Time
Symbol coherence
period
Symbol period
<
> Time Coherence
Frequency Spread S (t , F )
Time
F
Coherence
FD
9
TC ≈ t
16π FD τ mean Time Spread
τ RMS
Frequency
Coherence
1
Bc =
5 × τ RMS
Channel Estimation from Data
+∞
y[n]
x[n]
h[n]
y[n] = h[n] * x[n] = ∑ h[k ]x[n − k ]
m = −∞
{
Rxx [m] = E x[n]x*[n − m] = δ [m] }
m
and compute the crosscorrelation between input and output
{
R yx [m] = E y[n]x*[n − m] }
∑ h[k ]E{x[n − k ]x [n − m]} = ∑ h[k ]δ [m − k ] = h[m]
+∞ +∞
= *
k = −∞ k = −∞
In matlab:
x[n] y[n]
?
h=xcorr(x,y);
x[n] y[n] +∞
h[m, n] y[n] = ∑ h[k , n]x[n − k ]
k = −∞
Known:
1. Sampling frequency Fs
2. Upper bound on max Doppler Frequency FD max
Fs
1. Collect Data and partition in blocks of length N << :
FD max
n=0 n=N n = 2N
L
n = lN
L n = NB × N
x
y
L L
N × Ts << TD min
xN=reshape(x,N,length(x)/N);
yN=reshape(x,N,length(y)/N);
xN,yN= [ L
] N
NB
l
m
hN= [ ] L
h[m, n] n =lN
k (freq.)
m (time)
S=fft(hN’);
S=S’.*conj(S’);
⇒ S=
[ ]S [m, k ] N
NB
4. Take the sum over rows for Doppler Spread and sum over columns for
Time Spread (fftshift each vector to have “zero” term (sec or Hz) in the
middle
Sf
St
( Fs / N )
f =k
t = m / Fs NB
Time Resolution: Δt = 1 / FS
FS 1
Frequency Resolution: ΔF = = Hz
N × N B total data length(sec)
Rayleigh
Bernoulli Rectangular y
Fading
Binary QAM
To Workspace1
Bernoulli Binary Rectangular QAM Multipath Rayleigh
Generator Modulator Fading Channel
Baseband
To Workspace
test_scattering.mdl
Channel Freq. Response:
Tmax=10^(-4) sec; [St, Sf,t,f]=scattering(x,y,Fs,Tmax, FDmax);
FDmax=150Hz;
-3
x 10 Time Spread
9
St(t) 8
6
Time Spread
5
-3
1 x 10 Frequency Spread
1.2
0
-1.5 -1 -0.5 0 0.5 1
Sf(f)
time (sec) -4 1
x 10
15μ sec
0.8
Frequency Spread
0.6
0.4
0.2
0
-1000 -800 -600 -400 -200 0 200 400 600 800 1000
frequency (Hz)
− 70 Hz + 70 Hz
Stanford University Interim (SUI) Channel Models
In this project you want to identify the time and frequency spreads of a channel. Refer to
the simulink model Lab3.mdl for the setup.
You know that the mobile channel you are trying to model has a maximum doppler
frequency not exceeding 50Hz and a maximum time spread smaller than 20
microseconds. In order to have a clear picture of the channel spread in time and
frequency we want a time resolution of 1 microsecond and a frequency resolution of
1Hz;
1. Based on the time and frequency resolutions, determine a suitable symbol rate of the
transmitted sequence and an adequate data length in time;
2. With the above parameters, run the model Lab3.mdl to collect the transmitted and
received data. Use the program scattering.m to estimate the time and frequency
spreads of the channel. Compare the result with the parameters of the channel in the
simulink block;
3. Just to compare, try different values of symbol rate and data length and see how the
resolutions in time and frequency are affected.
4. Multi Carrier Modulation and OFDM
Frequency Spread S (t , F )
F
FMAX
t Time Spread
t MAX
2. Single Carrier Modulation in Flat Fading Channels:
• if symbol duration >> time spread then there is almost no Inter Symbol
Interference (ISI).
channel
TS
1 0 time 1 0
phase still recognizable
channel
Frequency Frequency
1 / TS
Flat Freq. Response
Frequency
3. Single Carrier Modulation in Frequency Selective Channels:
• if symbol duration ~ time spread then there is considerable Inter
Symbol Interference (ISI).
channel
time
? ?
1 0 phase not recognizable
One Solution: we need equalization
channel equalizer
time time
1 0 1 0
Channel and
Equalizer
Problems with equalization:
• it might require training data (thus loss of bandwidth)
• if blind, it can be expensive in terms computational effort
• always a problem when the channel is time varying
4. The Multi Carrier Approach:
• let symbol duration >> time spread so there is almost no Inter Symbol
Interference (ISI);
• send a block of data using a number of carriers (Multi Carrier)
“symbol” “symbol”
1 0
time channel
0 1
time
1 0
time
Compare Single Carrier and Multi Carrier Modulation
SC
Frequency
Frequency
L 1 0 1 1 L
1 Flat Fading Channel:
One symbol Easy Demod
channel
MC
L 0 1 0 1 1 1 L
Frequency Frequency
subcarriers
0 1 0 1 1 1
Each subcarrier sees
Block of a Flat Fading
symbols Channel: Easy
Demod
Orthogonal Frequency Division Multiplexing (OFDM)
data
t
Tg Tb
guard interval data interval data
⎧ N2F ⎫ ⎧ NF
⎫
⎪ j 2π ( FC + kΔF )t ⎪ ⎪ j 2πFC t 2
j 2πkΔFt ⎪
s (t ) = Re ⎨ A ∑ ck e ⎬ = Re ⎨e A ∑ ck e ⎬
⎪ k =− N F ⎪ ⎪ N
k =− F ⎪
⎩ 2 ⎭ ⎩ 2 ⎭
0 ≤ t ≤ TSymbol
•Each data point ck is modulated by a subcarrier
NF NF
Fk = FC + kΔF , k = − ,..., , k ≠0
2 2
•Subcarrier k = 0 is not used since its magnitude and phase would be influenced
by the carrier FC
| S (F ) | Fk = FC + kΔF
F
− Fc − BW
2
− Fc − Fc + BW
2 Fc − BW
2 Fc Fc + BW
2
carrier
BW = N F × ΔF
We leave a “guard time”
between blocks to allow TX RX
multipath
Guard Time
Tg
Data Block the “guard time” is long
Data Block
Tb enough, so the multipath in
one block does not affect the
L L
next block
TSymbol
data+guard
}
RX L L
TX
NO Inter Symbol Interference!
Modulated Signal: {
s (t ) = Re e j 2πFct x(t ) }
FC = carrier frequency
FT
− FC FC F F
k=
NF
∑ce
2
j 2πkΔF ( t −Tg )
x(t ) = A k
0 ≤ t ≤ TSymbol
k =−
NF
2
k ≠0
kΔF = subcarrier frequency offset
just a gain
ck = data
Limitations of OFDM
Overhead TSymbol
(no data)
data
t
Tguard Tb
•The Guard Time (or Cyclic Prefix) does not carry data and
therefore it represents a loss of power
Tb 1
Pdata = Psymbol = Psymbol
Tb + Tguard ⎛ Tguard ⎞
1 + ⎜⎜ ⎟⎟
⎝ Tb ⎠
Frequency Spread S (t , F )
F
FMAX < kHz
t Time Spread
t MAX ≈ μ sec
t
guard interval Tg Tb data interval
1
ΔF Choose: ΔF =
Tb
FC F
Fk = FC + kΔF
Orthogonality:
t 0 +Tb t 0 +Tb
1 1 ⎧1 if k = l
∫e ∫e
j 2πFk t − j 2πFl t j 2π ( k − l ) ΔFt
e dt = dt = ⎨
Tb t0
Tb t0 ⎩0 if k ≠ l
Since the channel is Linear and Time Invariant (at least for the duration
of the frame), the exponentials e j 2πFk t are still orthogonal at the
receiver in steady state, ie after the transient has died.
Transmitted Received
subcarrier channel subcarrier
j 2πFk t
e
h(t )
t 0 Tg Tg + Tb
0
Tg + Tb
transient steady state
response response
H ( Fk )e j 2πFk t
Tg ≤ t ≤ Tg + Tb
NF NF
2 2
1 1
∑c e ∑c e
j 2πk ΔFF ( n − L ) jk 2Nπ ( n − L )
x(nTS ) = k
s
= k n = 0,.., L + N − 1
N k =−
NF N k =−
NF
2 2
TIME:
0 Tg Tb t
Sampling Interval TS = 1 / FS
Freq spacing ΔF = FS / N
FREQUENCY:
− FS / 2 0 FS / 2 F
N F N F FS
− F S
2 N 2 N
This can be written as
NF
2
1
∑c e
jk 2Nπ n
x[n + L] = k
N k =−
NF
2
NF
2 −1
1 1
∑c e ∑c e
jk 2Nπ n j ( N + k ) 2Nπ n
= k + k
N k =1 N k =−
NF
2
N −1
=IFFT {X [k ]}
1
∑ X [k ]e
jk 2Nπ n
=
N k =0
Where:
X [ k ] = ck , k = 1,..., N F / 2 positive subcarriers
X [k ] = 0, otherwise
Guard Time with Cyclic Prefix (CP)
0 L L + N −1
CP IFFT{ X }
14243 14243
N
M M
cN F / 2 (N F / 2 )
0
M IFFT
data
c− N F / 2
0
M
N − (N F / 2)
M
c−1 N−
N − 11 N −1 x[ L + N − 1]
Summary of OFDM
… and relevant parameters
Channel (given parameters):
1. Max Time Spread t_MAX in sec
2. Doppler Spread F_D in Hz
3. Bandwidth BW in Hz
w[n]
⎧ X m [0] Ym [0]
⎪
⎪ X [k ] M M
m-th data
OFDM OFDM
block
⎨ m TX h[n] RX
Ym [k ]
(data, pilots ⎪ M M
and nulls) ⎪⎩ X m [ N − 1] Ym [ N − 1]
Ym [k ] = H m [k ] X m [k ] + Wm [k ]
With H m [ k ] the frequency response of the channel within the time block
Data: d m [k ] X m [k ] = d m [k ] X m −1[k ]
X m−1[k ] Delay
one
frame
∠ X m [k ] = ∠ X m −1[k ] + ∠ d m [k ]
At the receiver
Y [k ] H m [k ] X m [k ] + Wm [k ]
dˆm [k ] = m = ≅ d m [k ]
Ym −1[k ] H m −1[k ] X m −1[k ] + Wm −1[k ]
Provided:
a. The channel changes slowly H m [ k ] ≅ H m −1[ k ] ≠ 0
b. High SNR
Ym [k ]
div d m [k ]
Delay Ym−1[k ]
one
frame
Lab 4: Single Carrier vs. OFDM Modulation
1. Using the Simulink model test_SC.mdl see the received signal for
various values of the symbol rate
2. Repeat the same with the Simulink model test_OFDM.mdl and see
the received signal for the same values of the symbol rate. Notice how
you can increase the data rate and still be able to demodulate the
received signal.
Example: IEEE 802.11a (WiFi)
1. Parameters
2. Simulink Example
3. “Frame based” and “Sample based”
signals
Parameters of IEEE802.11a:
NULL
0 0 x0
c1 1
M M
c26 26
M
N F = 52 NULL M N = 64
c− 26 38
M
M M
c−1 63 63 x63
IFFT
Frequency Time
Pilots at: -21, -7, 7, 21
Frequencies:
ΔF = 20 MHz / 64 = 312.5kHz
L L
38 63 1 26 k Subcarriers index
( 64 − 26 )
16.25MHz
DATA
F (MHz )
FCARRIER − 10 FCARRIER FCARRIER + 10
20 MHz = 1 / Ts
Time Block:
time
TG = 0.8μ sec TFFT = 3.2 μ sec
4
4x48=192 bits
Overall Implementation (IEEE 802.11a with 16QAM).
2. Map each block of 48 symbols into 64 samples
frequency domain time domain
null 0 0 xm [0]
xm [1]
24 data ⎧
1 1
+1+j3 ⎫ ⎨ M 2
… ⎬ 2 pilots ⎩
26
⎭
-3-j
+3-j3 ⎫
⎧
null ⎨
⎩ M
27
− 27 + 64 MM
… ⎬ 24 data ⎧ − 26 + 64
+1-j ⎭ ⎨
2 pilots ⎩ M 62 xm [62]
− 1+ 64 63 xm [63]
am [ l ] X m [k ] IFFT xm [ n ]
l = 1: 48 k = 0 : 63 n = 0 : 63
L L
− 26 −1 1 26 k
Simulink Example
To make it simpler:
1. let the number of carrier be the same as the FFT length, ie
N=NF;
2. Use Differential QPSK Encoding and Decoding, so that we do
not need to estimate the channel’s frequency response.
Initial Callback function:
% Channel Parameters
% 1. Doppler Spread
FC=5.0; % carrier freq. in GHz
v=50; % speed in km/h
FD=v*FC; % doppler freq in Hz
% Additive Noise
SNRdB=20; % dB
Simulink Implementation of OFDM IEEE802.11a
Block of 80 samples
IN:
Received Frame
Received Data
1
26 26
80 64 11 52
26 26
Differential enc/dec
3. “Frame based” and “Sample based”
N
“Sample based”
N
Typical Example: the FFT block
External Data
MAC-SAP
PHY-SAP
802.16-2004 802.16e-2005
Frequency Band 2GHz-11GHz 2GHz-11GHz fixed
2GHz-6GHz mobile
OFDM carriers OFDM: 256 OFDM: 256
OFDMA: 2048 OFDMA: 128, 256, 512,1024,
2048
Modulation QPSK, 16QAM, 64QAM QPSK, 16QAM, 64QAM
Transmission Rate 1Mbps-75Mbps 1Mbps-75Mbps
Duplexing TDD or FDD TDD or FDD
Channel Bandwidth (1,2,4,8)x1.75MHz (1,2,4,8)x1.75MHz
(1,4,8,12)x1.25MHz (1,4,8,12)x1.25MHz
8.75MHz 8.75MHz
IEEE802.16 Structure
data
Error
randomization Correction M-QAM OFDM TX
Coding mod mod
data Error
De-rand. Correction M-QAM OFDM RX
Decoding dem dem
Choices:
OFDM Symbol Ts
Tg Tb
guard data
(CP)
Tg 1 1 1 1
= , , ,
Tb 4 8 16 32
pilots data
frequency
channel Guard
Guard
band
band
N guards = to provide frequency guards between channels
N nulls = N guards + 1 (DC subcarrier is always zero)
N pilots = pilots for channel tracking and synchronization
N data = data subcarriers
N used = N pilots + N data
Recall the OFDM symbol is of the form
⎧ N
k = used
⎫
⎪ j 2πf ct j 2πkΔf ( t −Tg ) ⎪
∑Nused ck e
2
s (t ) = Re⎨e ⎬
⎪ k =− 2 ⎪
⎩ k ≠0 ⎭
| S( f ) |
f
− f c − BW
2 − fc − f c + BW
2 f c − BW
2 fc f c + BW
2
carrier
OFDM Subcarrier Parameters:
N_pilots 8 12 42 82 166
144444424444443
Fixed and
Fixed Mobile
WiMax WiMax
In 802.16 2004 we have N FFT = 256
N used = 200
Fs − BW BW Fs
−
2 2 2 2
Frequency Spacing Δf = 1 / data_symbol_length = 1 / Tb
M
IFFT M
155
12 156
168
24
193
24
218
24
12
243 M
255 255
Implementation of WiMax 2004 in Simulink
Data in 192x1
NFFT=256
NCP=64
5. Error Correcting Coding
Transmitted Received
Define the Channel Capacity:
Example:
SNRdB=20dB
⇒ ( )
C = 10 7 log 2 1 + 10 20 /10 = 66.5Mbits / sec
B=10MHz
rc
encoder
Ru Re > Ru
data rate Encoded data
rate
• number of errors corrected
# bits in error
BER =
total # of bits
Relation to Channel Capacity
SNR
rc rc
encoder channel decoder
Ru < C C C Ru
Given BER
B. Block Code (65520, 61425) low density parity check, with coding
rate r = 61425 = 15
c
65520 16
Code
Complexity
$$$
1/ 2 15 / 16 rc code rate
3. Minimum SNR Requirements
For a given Coding Rate, what is the minimum Eb / N 0 we can have?
Shannon Limit
1
0.9
0.8
0.7
0.6
coding rate
0.5
0.4
0.3
0.2
0.1
0
-2 -1 0 1 2 3 4 5 6 7 8
EbN0 dB
− 1.6dB
Eb
Notice: > −1.6dB always!!!
N0
2. Block Coding
encoder
(n, k , t )
k symbols n> k symbols
k
Code Rate rc =
n
Parameters: (n, k , t )
⎛ d min − 1 ⎞
t ≤ floor ⎜ ⎟ Max. number of errors corrected
⎝ 2 ⎠
where d min ≤ n − k + 1 Minimum distance between codewords
L C
t
A
d min
D
B L
codewords
non -codewords
receive
decode
transmit
C A
A channel decoder
D B Error !!!
d (C , A) ≤ t
where
d ( D, A) > t
2. Probability of Error
n
⎛n⎞ j
⎜ ⎟ k
(
Pe ≤ ∑ ⎜ ⎟ p (1 − p ) ≤ (2 − 1) 4 p (1 − p )
n− j
)d min / 2
j =t +1 ⎝ j ⎠
“n-j” bits right
“j” bits wrong
-2.5 Uncoded
-3
Golay (24,12,3)
-3.5
BCH (127,64,10)
log10(Prob of error)
-4
-4.5
-5
-5.5
-6
-6.5
-7
4 5 6 7 8 9 10 11
Eb/N0 dB
3. Reed Solomon Codes (non Binary Data)
(n, k , t ) ⎛ 2m − k ⎞
t = floor ⎜⎜ ⎟⎟
n = 2m − 1 ⎝ 2 ⎠
coded symbols k<n uncoded errors corrected
symbols
1 symbol = m bits
Good for Burst Error Correction at relatively high SNR
Example: (255,239,8)
= 239 symbols 16
data parity
Based on polynomials:
uncoded block
coded block
RS
u[0],..., u[k − 1] c[0],..., c[n − 1]
c( X ) = g ( X )u ( X )
encoder u( X )
errors
g( X ) e( X )
quotient
u( X ) y( X )
e( X )
remainder
g(X ) y ( X ) = c ( X ) + e( X )
= g ( X )u ( X ) + e( X )
3. Code Shortening and Puncturing
k’ (k’+16,k’,8) k’ 16
k’ (k’+16,k’,8) k’ 16
2. Code Puncturing
}
parity bytes
(N − k ) = 8 − T ⇒
16 − L
= 8−T ⇒ L = 2T
2 2
Puncturing Reed Solomon Codes (k '+16, k ' ,8), 0 < k ' ≤ 239
Code: k’ (k’+16,k’,8) k’ 16
(k '+16, k ' ,8)
8 bits/symbol 8 bits/symbol
RS Encoder
Raw data
288 bits Encoded data
416 bits
RS Decoder
Raw data
288 bits Received data
416 bits
Put Everything together:
It is easier to create subsystems:
Channel
RS decoder MQAM Demod
RS
Encoder n'
datablock
RS encoded
data Decoder data
RS Encoder:
1. edit
[239-k+1:255]
add parameters
You can customize the icon
the two
parameters from
previous slide
RS Decoder:
same vector
RS (40,36,2) decoder Sequence Operations>Insert Zero
Insert 12 zeros
Convolutional Encoders
raw data
L L
k M CC n
M
k
Rate
n
L L
Coded data
x1
z −1 z −1 z −1 z −1
y2
x2
z −1 z −1 z −1
y3
⎡ a11 a12 a13 ⎤
Polynomial description: [ y1 y3 ] = [x1 x2 ] ⎢
a23 ⎥⎦
y2
⎣a21 a22
y1
⎡23 35 0 ⎤
[ y1 y2 y3 ] = [x1 x2 ] ⎢ ⎥
⎣ 0 5 13⎦
no connection x2 → y1
CONSTRAINED_LENGTH = [4,3]
CODEGENERATOR=[23,35,0; 0,5,13]
x
z −1 z −1 z −1 z −1 z −1 z −1
[ y1 , y2 ] = x[a1 , a2 ] y2
a1 = (1)8 (111)8 (001)8 = 171
a2 = (1)8 (011)8 (011)8 = 133
constrained length = 7
Note: in some books (as in [Costello]) the binary coefficients are
determined in reverse order.
Example: the code in the previous page is defined by he polynomials
(begin counting from the right) as
From an (k,n) convolutional code make a code with higher rate (less
correcting capabilities), by periodically eliminating output bits.
⎡1 0⎤
P=⎢ ⎥
⎣1 1⎦
Since:
1 0
K , y1[n − 1], y2 [n − 1], y1[n], y2 [n],K
1 1
Rate 3/4:
⎡1 0 1⎤
P=⎢ ⎥
⎣1 1 0⎦
Since:
1 0 1
K , y1[n − 2], y2 [n − 2], y1[n − 1], y2 [n − 1], y1[n], y2 [n],K
1 1 0
Rate 5/6:
K, x[n − 4], x[n − 3], x[n − 2], x[n − 1], x[n],K
encoder
K , y1[n − 4], y2 [n − 4], y1[n − 3], y2 [n − 3], y1[n − 2], y2 [n − 2], y1[n − 1], y2 [n − 1], y1[n], y2 [n],K
• It is highly desirable to be able to set the system to a number of different data and
coding rates to adapt to channel conditions;
•IEEE802.16 achieves variable data rates by a combination of mechanisms:
• coding (shortening, puncturing)
• data block length (subchannelization)
• different rates have to be easily achieved by changing appropriate parameters
without major reconfigurations.
Recall from previous units:
k nRS n
Raw Data in RS CC
Encoded Data out
encoder encoder
RS parameters CC parameters
• encoder/decoder
• reduction
• puncturing
RS Encoder (k + 16 − 2T , k ,8 − T )
239 255 k + 16
nRS = k + 16 − 2T
Zero RS select puncture
k Pad (255,239,8)
k pRS = [11,...,1,0,...,0]
23 123
k + 16 − 2T 2T
Convolutional Encoder with coding rate rCC
nRS
CC
2nRS n=
nRS puncture rCC
[171,133]
rCC = 1 / 2, P = [1,1]
rCC = 2 / 3, P = [1,1,0,1]
rCC = 3 / 4, P = [1,1,0,1,1,0]
rCC = 5 / 6, P = [1,1,0,1,1,0,0,1,1,0]
By combining the two codes we obtain a number of data rates (section 8.3.3.2 of the
standard):
40
36
RS
40
CC
= 48
Raw Data in 5/6
encoder encoder
Encoded Data out
RS parameters CC parameters
k = 36
pRS = [11,...,1,0,...,0] pCC = [1,1,0,1,1,0,0,1,1,0]
23 123
36 + 16 − 2 × 6 = 40 2 × 6 = 12
This yields a table of parameters for each “Rate_ID”:
3 16 48 1 [1,1,0,1] 96 2/3
Symbol Block
8* n
= 192 symbols
log 2( M )
From Data
Source To IFFT
RS CC MQAM
k nRS n
bytes:
N_pilots 8 12 42 82 166
WiMax256.mdl
IEEE802.16 Implementation
In addition we need
• Frequency Offset Estimation: to compensate for phase errors and noise in the
oscillators
• Offset tracking: to track synchronization errors
Basic Structure of the Receiver
Time Synchronization:
Channel Estimation: detect the beginning of
estimate the frequency the packet and OFDM
response of the channel symbol
Received
Signal
Demodulated
Data
WiMax Demodulator
Time Synchronization
64 64 64 64 64 64 128 128
Tg Td Tg Td
The standard specifies the Down Link preamble as QPSK for subcarriers between -100
and +100:
⎧± 1 ± j , k = −100,...,−1,+1,...,+100
PALL [k ] = ⎨
⎩0, otherwise
⎧2 PALL
*
[k ], if k mod 4 = 0
P4 [k ] = ⎨
⎩0, otherwise
P4 [k ] p4 [ n]
FFT
L 64 64 64 64
0 255
0 4 8 252 255
⎧ 2 PALL [k ], if k mod 2 = 0
P2 [k ] = ⎨
⎩0, otherwise
P2 [k ] p2 [ n]
FFT
L 128 128
2 4 6 8 0 255
0 252 255
254 p2 [ n]
Add Cyclic Prefix:
64 128 128
1
424
3 319
0
CP
Several combinations for Up Link, Down Link and Multiple Antennas.
We can generate a number of preambles as follows:
⎧ 2 PALL [k ], if k mod 2 = 0
P [k ] = ⎨
2
0
⎩0, otherwise
⎧ 2 PALL [k ], if k mod 2 = 1
P [k ] = ⎨
2
1
⎩0, otherwise
⎧ 2 P *
[k ], if k mod 4 = 0
m=0 P40 [k ] = ⎨ ALL
⎩0, otherwise
⎩0, otherwise
Time Synchronization from Long Preamble
Received signal:
preamble OFDM Symbols
64 128 128 L
n0
Compute Crosscorrelation Coefficient: 2
127
∑ y[
l =0
n − l ] y *
[n − 128 − l]
ry2 [n] =
y[n] ⎛ 127 2⎞ ⎛
127
2⎞
⎜ ∑ y[n − l] ⎟ × ⎜ ∑ y[n − 128 − l] ⎟
xcorr ⎝ l =0 ⎠ ⎝ l =0 ⎠
z −128
Time Synchronization from Long Preamble
Received signal:
preamble OFDM Symbols
64 128 128 L
n0
Compute Autocorrelation : 2
127
∑ y[
l =0
n − l ] y *
[n − 128 − l]
ry2 [n] =
y[n] ⎛ 127 2⎞ ⎛
127
2⎞
⎜ ∑ y[n − l] ⎟ × ⎜ ∑ y[n − 128 − l] ⎟
xcorr ⎝ l =0 ⎠ ⎝ l =0 ⎠
z −128
Effect of Periodicity on Autocorrelation:
y[n]
64 128 128 L n
n0
y[n − 128]
64 128 128 Ln
ry2 [n] MAX when
1 y[n] = y[n − 128]
n0 n
n0 − 64
127 2
Compute it in Simulink:
∑ y[
l =0
n − l ] y *
[n − 128 − l]
ry2 [n]
y[n]
1 DF FIR
2
|u| u
In1 >= 0.8 1
Conj.
Product Abs Math Sync
Digital Filter Divide
-128 Function Compare
u
z To Constant
Delay
-128
z
DF FIR
Delay1
|u| u2 max
Product1
Abs1 Square Digital Filter2 MinMax
-C-
Constant
⎛ 127 2 ⎞⎛
127
2⎞
⎜ ∑ y[n − l] ⎟⎜ ∑ y[n − 128 − l] ⎟
⎝ l =0 ⎠⎝ l =0 ⎠
Example: perfect channel (no spread in time)
ry [n]
127 2
∑
y[n]
y[ n − l ] p *
[l ]
l =0
xcorr ryp [n] =
⎛ 127 2 ⎞⎛
127
2⎞
p[n] ⎜ ∑ y[n − l] ⎟⎜ ∑ p[l] ⎟
⎝ l =0 ⎠⎝ l =0 ⎠
Since the preamble is random (almost like white noise), it has a short autocorrelation:
y[n]
64 128 128 L n 1
ryp2 [n]
n0
p[n]
128
n0
0 127 n n0 − 128
… with dispersive channel
127 2
∑
y[n]
y[ n − l ] p *
[l ]
l =0
xcorr ryp [n] =
⎛ 127 2 ⎞⎛
127
2⎞
p[n] ⎜ ∑ y[n − l] ⎟⎜ ∑ p[l] ⎟
⎝ l =0 ⎠⎝ l =0 ⎠
Since the preamble is random, almost white, recall that the crosscorrelation yields the
impulse response of the channel
y[n] | h[n] |
64 128 128 L n
ryp [n]
1
n0
p[n]
128
n0
0 127 n n0 − 128
Compare the two (non dispersive channel):
Autocorrelation of ry
received data
Crosscorrelation with
preamble
ryp
Synchronization with Dispersive Channel
Channel impulse
response
In order to determine the starting point, compute the energy on a sliding window and
choose the point of maximum energy
y[n]
p[n]
xcorr Σ Maximum
ryp [n] c[n] energy
n − M +1
n
M=max length of M −1
channel = length of CP c[n] = ∑ ryp [n − k ]
k =0
Example
y[n]
p[n]
xcorr Σ
ryp [n] c[n]
Impulse response
of channel
Auto
correlation
y[n]
max
Cross
correlation Σ
p[n] c[n]
Autocorrelation (saw
previously)
Detect
Cross correlation
MAX
Sum
Channel Estimation
Recall that, at the receiver, we need the frequency response of the channel:
w[n]
⎧ X m [0] Ym [0]
⎪
⎪ X [k ] M OFDM OFDM M
m-th data block ⎨ m TX h[n] RX
Ym [k ]
⎪ M M
⎪⎩ X m [ N − 1] Ym [ N − 1]
Transmitted: Received:
Ym [k ] = H [k ] X m [k ] + W [k ]
X m [k ]
H [k ]
channel freq.
response
W [k ]
From the Preamble: at the beginning of the received packet. The transmitted signal in
the preamble is known at the receiver: after time synchronization, we take the FFT of
the received preamble
256 samples
L
FFT
L
Y [ 0] Y [k ] Y [255]
Y [k ] = H [k ] X p [k ] + W [k ], k = 0,...,255
Y [k ] = H [k ] X p [k ] + W [k ], k = 0,...,255
Y [k ] X *preamble [k ]
Hˆ [k ] =
| X p [k ] |2 +σ w2
noise covariance
X p [k ] = ±1 ± j k = 2,4,...,100
if
k = 156,158,...,254
Fact: by definition,
Y [k ] X *preamble [k ]
Hˆ [k ] =
| X p [k ] |2 +σ w2
only for the frequencies k such that
X p [k ] ≠ 0
and interpolate for the other frequencies. This might not yield good results and the
channel estimate might be unreliable;
known
L Linterpolate
k
2. Recall the FFT and use the fact that we know the maximum length L of the
channel impulse response
Y [k ] = H [k ] X p [k ] + W [k ]
2π
⎛ L −1 − jk n⎞
Y [k ] X p [k ] = ⎜⎜ ∑ h[n]e
* N ⎟ 2 + W [k ] X *p [k ]
⎟ for k = 2,4,...,100
⎝ n = 0 ⎠ k = 156,158,...,254
so that we have 100 equations and L=64 unknowns.
This is solved by a matrix multiplication
h = Finv YX *p( )
64 × 1 100 × 1
Simulink Implementation
Y [k ]
h[n]
Channel Data in
Estimate out
y[n]
H [k ]
X *p [k ]
Example:
Spectrum of
Received Signal
As expected, it
does not match in
NOT TO the Frequency
SCALE Guards
Estimated
Frequency
Response of
Channel
Start after processing WiMax-2004 Demodulator
preamble
WiMax256.mdl
Standard OFDM
Demod (256 carriers)
data
Error Correction
Decoding Ch.
Channel Tracking
In the FUSC (Full Use of Sub Carriers) scheme, the pilots subcarriers are chosen
within the non-null subcarriers as
9k + 3m + 1
OFDM
Symbol
nulls
DC
m (null)
pilots
data
nulls
Expand the
Demodulator
Demodulator
Channel
tracking
Multiple Antenna Systems (MIMO)
M M
TX M M RX
NT NR
Transmit Receive
Antennas Antennas
NT × N R
Different paths
Two cases:
1. Array Gain: if all paths are strongly correlated to which other the SNR can be
increased by array processing;
2. Diversity Gain: if all paths are uncorrelated, the effect of channel fading can be
attenuated by diversity combining
Receive Diversity:
h1
M y1
hN R M RX
TX
s
yNR
NT = 1 NR NR
Transmit Different paths Receive
Antennas Antennas
⎡ y1 ⎤ ⎡ h1 ⎤ ⎡ w1 ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ M = M
⎥ ⎢ ⎥ S E s + N 0⎢ M ⎥
⎢ y N ⎥ ⎢hN ⎥ ⎢ wN ⎥
⎣ R⎦ ⎣ R⎦ ⎣ R⎦
Energy per Noise PSD
symbol
Assume we know the channels at the receiver. Then we can decode the signal as
NR NR NR
y = ∑ hi* yi = ES ∑ | hi |2 s + N 0 ∑ hi* wi
i =1 i =1 i =1
signal noise
⎛ NR 2 ⎞ ES
SNR = ⎜⎜ ∑ | hi | ⎟⎟
⎝ i =1 ⎠ N0
NR
In the Wireless case the channels are random, therefore ∑| h |
i =1
i
2
is a random variable
h1 = h2 = ... = hN R = h
Then
NR
∑ i
| h
i =1
| 2
= N R | h | 2
= N χ
R 2
2
assuming { }
E | h |2 = 1
and
(
SNR = N R | h |
ES ⎛
2
) 1 2 ⎞ ES
= ⎜ NR χ2 ⎟
N0 ⎝ 2 ⎠ N0
From the properties of the Chi-Square distribution:
mSNR = E{SNR} = N R
ES
better on average …
N0
= var{SNR} =
N R ES
σ SNR … but with deep fades!
2 N0
⎛ NR 2 ⎞ ES
SNR = ⎜⎜ ∑ | hi | ⎟⎟
⎝ i =1 ⎠ N0
NR
1 2
Since: ∑i =1
| hi | = χ 2 N R
2
⎛ 1 2 ⎞ ES
SNR = ⎜ χ 2 N R ⎟
⎝2 ⎠ N0 Diversity of order N R
with
E{SNR} = N R
ES
N0
σ SNR 1
var{SNR} =
N R ES μ var = =
2 N0 mSNR 2 NR
Example: overall receiver gain with receiver diversity.
15
10 N R = 10
5
NR = 2
0
-5
NR = 1
-10
-15
-20
-25
0 20 40 60 80 100 120 140 160 180 200
Transmitter Diversity
h1
M y
s TX M hN R RX
NR = 1
NT NT
Transmit
Receive
Antennas Different paths Antennas
⎛ ES NT
⎞
y = ⎜⎜ ∑ hi ⎟⎟ s + N 0 w Equivalent to one channel,
with no benefit.
⎝ NT i =1 ⎠
Total energy equally distributed
on transmit antennas
However there is a gain if we use Space Time Coding.
Take the case of Transmitter diversity with two antennas
h1
x1[n]
y[n]
TX h2 RX
x2 [ n ]
Given two sequences s1[n], s2 [n]
code them within the two antennas as follows
x1 s1 −s * y[2n] =
ES
(h1s1 + h2 s2 ) + N 0 w1
2
2
x2 s2 s1*
2n 2n + 1
y[2n + 1] =
ES
2
( )
− h1s2* + h2 s1* + N 0 w2
This can be written as:
⎡ y[2n] ⎤ ES ⎡ h1 h2 ⎤ ⎡ s1 ⎤ ⎡ w1 ⎤
⎢ y *[2n + 1]⎥ = ⎢h* * ⎥⎢ ⎥
− h1 ⎦ ⎣ s2 ⎦
+ N0 ⎢ * ⎥
⎣ ⎦ 2 ⎣ 2 ⎣ w2 ⎦
⎡ z1 ⎤ ⎡ h1* h2 ⎤ ⎡ y[2n] ⎤ ⎛ ES ⎞ s
2 ⎡ 1⎤ ⎡ w%1 ⎤
⎢z ⎥ = ⎢ *
⎣ 2 ⎦ ⎣ h2
⎥⎢ * ⎥ = ⎜⎜
− h1 ⎦ ⎣ y [2n + 1]⎦ ⎝ 2
|| h || ⎟⎟ ⎢ ⎥ + ( )
N 0 || h || ⎢ ⎥
⎣ w% 2 ⎦
⎠ ⎣ s2 ⎦
( )
sˆ1 = K h1* y[2n] + h2 y *[2n + 1]
K=
2 / ES
= K (h y[2n] − h y [2n + 1])
with
sˆ1 *
2 1
*
| h1 |2 + | h2 |2 +2 N 0 / ES
It is like having two independent channels
ES N 0 || h || w% 1
|| h ||2
2 z1
s1
s2 z2
ES
|| h ||2
2
N 0 || h || w% 2
|| h ||2 ES 1 2
SNR = || h || =| h1 | + | h2 | = χ 4
2 2 2
2 N0 2
Apart from the factor ½, it has the same SNR as the receive diversity of order 2.
WiMax Implementation
h1
h2
Subscriber
Station
Base Station
Transmitter:
X 2m IFFT TX
Data in Xn
Error
M-QAM buffer STC
Coding
IFFT TX
X 2 m −1
X 2 m −1 X 2*m
2m 2m + 1 time
Receiver:
Y2 m
X 2m
Xn FFT RX
Data out
Error Un-
M-QAM STD
Correction
buffer
FFT RX
X 2 m −1
Y2 m +1
Space Time Decoding:
( )
For each subcarrier k
compute: Xˆ 2 m [k ] = K H1*[k ]Y2 m [k ] + H 2 [k ]Y2*m +1[k ]
Xˆ 2 m −1 (
[k ] = K H *[k ]Y [k ] − H [k ]Y * [k ]
2 2m 1 2 m +1 )
2 / ES
with K=
| H1[k ] |2 + | H 2 [k ] |2 +2 N 0 / ES
Preamble, Synchronization and Channel Estimation with
Transmit Diversity (DL)
The two antennas transmit two preambles at the same time, using different sets of
subcarriers
p0 [ n ]
EVEN subcarriers
CP 128
+ +
64 128 128
L L
0 319
n k
− 100 0 − 100
p1[n]
CP -
128 +
ODD subcarriers
64 128 128
frequency
time
Both preambles have a symmetry:
p0 [n] = p0 [n − 128]
n = 128,...,319
p1[n] = − p1[n − 128]
y[n]
h1[n]
p1[n]
Problems:
• time synchronization
• estimation of both channels
One possibility: use symmetry of the preambles
+
y0 [n] = 2h0 [n] * p0 [n]
64 128
+
y[n]
n0 + 128
64 256 z −128
−
n0
+
y1[n] = 2h1[n] * p1[n]
64 128
n0 + 128
e jϕ 3 e jϕ1
x1[n] Rayleigh y1[n]
ρT ρT
ρT ρT
x2 [ n ] Rayleigh y 2 [ n]
e jϕ 4 e jϕ 2
τ = [τ 1 L τ N ] sec
P = [ P1 L PN ] dB
Q
FIF FC − FIF
oscillator
oscillator
FIF FC − FIF
I
ADC LPF
M FFT M S/P
ADC LPF
DEM BPF DEM BPF
Q
Low Noise
Amp
Problems!!!
Non Linearities
Quantization Errors I/Q Imbalance
Power
Amp
I
DAC LPF
M IFFT M P/S
DAC LPF
MOD BPF MOD BPF
Q
FIF FC − FIF
oscillator
Peak to Average
Power Ratio
Frequency Drift
• Peak to Average Power Ratio (PAR)
A Single Carrier QPSK signal has a constant amplitude, since only the phase is
modulated.
A Multi Carrier OFDM signal has a random amplitude.
Example: see an OFDM signal with 1024 subcarriers. Plot 1,000 OFDM
symbols
0.015
Pmax=0.014
0.01
0.005
Pave=2e-4
0
0 2 4 6 8 10 12
5
x 10
Pmax/Pave=66.88=18dB
Effects:
• On the ADC: larger number of bits to accommodate large dynamics
• On the Power Amplifier: it has to be linear within a wider range
Remedies:
• the signal needs to be clipped to avoid saturating the amplifier
• the output power of the signal has to be reduced
Cause of large peaks:
OFDM signal is a sum of sinusoids. When all in phase, the sum can be large (peak
value) with respect to the average.
N −1
1
∑ Y [k ]e
jk 2Nπ n
y[n] =
N k =0
{ } { } { }
N −1
1 1
Average Power: E | y[n] |2 = 2
N
∑ E
k =0
| Y [ k ] | 2
=
N
E | Y [ k ] |2
PPeak
∝N It increases with the number of subcarriers
PAve
How bad is PAR?
Probability Distribution of PAR
(
Pr {PAR > z} = 1 − (1 − e )
− z 2.8 N
)
fairly accurate for number of carriers N ≥ 64
0
log10 P(PAR > z ) )
-1
N=128,256,512,1024
-2
-3
-4
-5
-6
-7
2 4 6 8 10 12 14
z dB
Notice:
1. The probability that PAR=N, the number of subcarriers, is almost zero;
2. The probability that PAR>4=12dB is of the order of 10 −4.5 − 10 −3.5
Remedies:
1. Data randomizing: if there is an error due to PAR, resend the data and most
likely it will be fine
2. Clipping: easy thing to do, at the expenses of introducing errors
3. Coding: potentially the best, but still not reliable solutions (not in the standard)
4. A number of iterative techniques: too complex for real time implementation
Effects of PAR on Digital to Analog
Converters (DAC)
ηQCL
VMAX
VMAX
Vmin Vmin
t t
Small clipping error, Large Large clipping error, Small
Quantization Noise Quantization Noise
We choose Clipping Level for best compromise between clipping error and
quantization noise.
ideal
vin [n] vout (t ) vin [n] vout (t )
DAC ⇔ ZOH
ηQCL
12 × 2 2b
SNR due to Q : SNRQ =
(2μ ) 2
3 μ2 /2
SNR due to CL : SNR
CL = π
8 μe
where μ = ACLIP / σ
σ = E {| x[n] |2 }
b = number of bits per sample
See both combined:
MAX around μ = ACLIP / σ = 4 − 5
65
SNR( dB ) 60
b = 12
55
b = 11
50
b = 10
45
40
b=9
35 b=8
30 number of bits
25
20
15
2 3 4 5 6 7 8
μ = ACLIP / σ
x(t ) y (t ) = g ( x(t ) )
g
1
Pout
g ( x) =
(1 + x )
1
2p 2p
p of the order of 3
Pave PMAX
Pin
Input
Back Off
(IBO)
Ideally you want the Input Back Off (IBO) to be larger than the PAR.
PMAX
IBO = 10 log10 > PAR
Pave
PAR ≤ 10log10 N
⎧ Ae j∠ x[ n ] if | x[n] |> A
x[n] xCL [n] = ⎨
clip ⎩ x[n] if | x[n] |≤ A
| x[n] | A time
FT
time
wide band noise
frequency
x [n] = ∑ ai e jφi δ [n − ni ]
~
i
| x[n] | A
time
ni
W (F )
F
It has two effects:
1. Additive Noise in the demodulated subcarriers
2. It generates out of band noise, so we need to add a Low Pass Filter
0.4
| x[n] | 0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
0 50 100 150 200 250 300
n
Clip it to 5dB (no filtering):
nulls nulls
data
F
f =
1 Nused / 2 0 Nused / 2 1 FS
− −
2 N N 2
unfiltered clipped signal
5
-5
Large values in
the freq. guards -10
-15
-20
-25
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
Choose a filter with this characteristics:
f pass = Nused / (2 N )
1
f pass < f stop < 1 / 2
f pass 0 .5 f
f stop
In matlab: use firpm
window
1.2 FT of window
h[n] | H( f )|
10
1
0
0.8
-10
0.6
-20
0.4
-30
0.2 -40
0 -50
-0.2 -60
-15 -10 -5 0 5 10 15 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
Clipped and Filtered:
-10
-20
-30
dB
-40
-50
-60
-70
-80
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
F/Fs
Negative effect on data!!!
1.5
0.5
-0.5
-1
-1.5
-1.5 -1 -0.5 0 0.5 1 1.5
Peak Cancellation
Detect and Cancel the peak to reduce out of band noise.
t0 t
| x(t ) | (x(t ) − Ae j∠ x ( t 0 )
)δ (t − t ) (x(t ) − Ae
0
j∠ x ( t 0 )
)g (t − t )
0
A 0 0
N −1
y[n ] = ∑ Y [k ]e
jk 2Nπ n
= y I [n ] + jyQ [n ]
k =0
jϕQ
y [n ] = AI e jϕ I y I [n ] + jAQ e yQ [n ]
= Ae jϕ ( (1 + δ )e jε y I [n ] + j (1 − δ )e − jε yQ [n ])
AI + AQ AI − AQ
A= δ=
with AI + AQ
2
ϕ I + ϕQ ϕ I − ϕQ
ϕ = ε=
2 ϕ I + ϕQ
The two parameters δ ,ε express the magnitude and phase of the I/Q imbalance.
Assume them small:
(1 + δ )e jε ≅ (1 + δ )(1 + jε ) ≅ 1 + δ + jε
(1 − δ )e − jε ≅ (1 − δ )(1 − jε ) ≅ 1 − δ − jε
y [n ] = Ae jϕ ( y[n ] + (δ + jε ) y *[n ])
N −1
y[n ] = ∑ Y [k ]e
jk 2Nπ n
Substitute:
k =0
⎛ N −1 N −1
− jl 2Nπ n ⎞
y [n ] = Ae ⎜ ∑ Y [k ]e + (δ + jε ) ∑ Y [l]e
jϕ jk 2Nπ n *
to obtain: ⎟
⎝ k =0 l =0 ⎠
⎛ N −1 jk 2Nπ n ⎞
= Ae ⎜ ∑ (Y [k ] + (δ + jε )Y [ N − k ]) e
jϕ *
⎟
⎝ k =0 ⎠
The effect is subcarrier N-k leaking into subcarrier k
Y [k ] Y [N − k ]
k
N −k
δ + jε
It is as having extra noise added to the signal:
I/Q Imbalance
y[n ]
L
noise
The factor | δ + jε | is called Negative Frequency Rejection and it can be
modeled as covariance of additive noise.
I/Q Imbalance
w2 [n]
Define:
y[n ]
y[n] σ y2
SNRi = 10 log 2
σi
w1[n]
noise
Implementation Loss:
10 log 2
σ y2
σ1 + σ 2
2
σ y2 ⎛ σ 22 ⎞
(
− 10 log 2 = −10 log⎜⎜1 + 2 ⎟⎟ = −10 log 1 + 10
σ1 ⎝ σ1 ⎠
SNR1− SNR2
10
)
Example: let
SNRnoise = 20dB
SNRIQ = 35dB
Implementation Loss (
− 10 log 1 + 10
20−35
10
) = −0.135
Total SNR: SNRnoise + IL = 20 − 0.135 = 18.65dB
Frequency Synchronization
• Drifts and errors in the oscillator frequencies cause a frequency offset, like a doppler
shift;
• This causes loss of subcarriers orthogonality and Inter Carrier Interference (ICI).
• The effect of ICI can be modeled as additive noise, which can be quantified
30
SNR
25
20
dB
15
10
5
0 0.02 0.04 0.06 0.08 0.1
epsilon
x[n]
CP xP xP
n
n0 N = 128 N = 128
y[n ] = y0 [n ]e j 2π Δf n
with Δf the digital frequency offset. Take the two received parts of the long
preamble:
y1[n ] = y0 [n ]e j ( 2π Δf n +α ) + w1[n ]
y2 [n ] = y0 [n ]e j(
2π Δf ( n + N ) +α )
+ w2 [n ] n = 0,..., N − 1
Comparing the two in vector form:
y2 = y1e j 2πΔf N + w
yi = [ yi [0] L yi [ N − 1]]
T
where
Then:
1 ⎛ Im { y1*T y2 } ⎞
Δf = arctan ⎜ ⎟
2π N ⎜ Re { y1 y2 } ⎟
*T
⎝ ⎠
Since, | arctan |< π then the frequency offset has to be at the most Δf <
1
2N
with N being the FFT length.