Professional Documents
Culture Documents
2009 08 20 WiMax PDF
2009 08 20 WiMax PDF
by
Roberto Cristi
Professor
Dept of Electrical and Computer Engineering
Naval Postgraduate School
Monterey, CA 93943
August 2009
Table of Content:
1. Introduction: WiMax, Matlab and Simulink
2. Introduction to Digital Signal Processing and Matlab
2.1 Discrete time Signals and Systems
2.2 Fast Fourier Transform (FFT) and its Inverse (IFFT)
2.3 Convolution and Correlation
Lab 1: Matlab/Simulink Code
3. Digital Communications Fundamentals
3.1 General Structure of a Digital Communication System
3.2 Channel Losses and Noise
3.3 Complex Baseband Representation
3.4 Bit Error Probabilities
3.5 Simulink Implementation
Lab 2: Matlab/Simulink Code
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
5. Multi Carrier Modulation and OFDM
5.1 Single Carrier and Multi Carrier Modulation
5.2 Orthogonal Frequency Division Multiplexing (OFDM)
5.3 Example: basics of IEEE 802.11a (WiFi)
Lab 4: Matlab/Simulink Code
6. Error Correction Coding
6.1 Channel Capacity and Error Correction Coding
6.2 Block Codes
6.3 Convolutional Codes
6.4 Code Shortening and Puncturing
6.5 Simulink Implementation of IEEE802.16 coding schemes
Simulink/Matlab Code: Error Correction
7. IEEE802.16 Implementation
7.1 Time Synchronization and Channel Estimation using the
Preamble
7.2 Channel Tracking for Mobile Applications
7.3 Simulink Implementation of IEEE802.16-2004 (Fixed)
7.4 Simulink Implementation of IEEE802.16e-2005 (Mobile)
Simulink/Matlab Code: IEEE802.16 Implementation
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
9. Issues in OFDM Systems Implementations
9.1 Peak to Average Power Ratio (PAPR)
9.2 IQ Imbalance
9.3 Frequency Offset
Evolution of IEEE802.16:
802.16
Dec 2001
10-66GHz
Fixed, LOS
Single Carrier
802.16-2004
June 2004
2-11GHz
Fixed, NOLOS
SC, 256
OFDM, 2048
OFDMA
802.16e-2005
Dec 2005
2-6GHz
Fixed, Mobile,
NOLOS
SC, 256OFDM,
128, 512,
1024, 2048
OFDMA
Introduction to Simulink
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
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
Digital
Mod
Wireless
Channel
TX
RX
Design
Test
Automatically Generate Code
00010101011101010100101111
0010101010010010101001001001.
Digital
Dem
Compute Errors
Modulator
Demodulator
Fading
channel
Display signals
x[n]
Sampling
nTs
x(t )
x[n] = x ( nTs )
t
Fs = 1 / Ts
Fs
Ts
[n]
1. Delta or Impulse
2. Sinusoid
phase
amplitude
F0
0 = 2
Fs
Frequency (Hz)
Digital
Frequency
(radians)
Example: F = 10kHz
s
Digital frequency:
F0 = 2kHz
Fs = 10kHz
0 = 2
2, 000 Hz 2
=
rad
10, 000 Hz
5
n=[0,1,2,,100]
A=10;
w0=2*pi/5;
alpha=0.1;
x=A*cos(w0*n+alpha);
plot(x);
x=[10*cos(0.1), , 10*cos((2*pi/5)*100+0.1)]
3. Complex Exponentials
y[n] = Ae j (0 n + ) = Ae j e j0 n
= A cos(0 n + ) + j A sin(0 n + )
144244
3 144244
3
Real Part
where
j = 1
Imaginary Part
imaginary basis
A cos(0 n + ) = Re Ae
j (0 n + )
A j (0 n + ) A j (0 n + )
A cos(0 n + ) = e
+ e
2
2
1. Definitions
2. Examples
3. Computation in Matlab
4. Symmetry
x[n], n = 0,..., N 1
X = FFT {x}
N 1
where
X [k ] = x[n]e
jk
2
n
N
n =0
k = 0,..., N 1
x = IFFT { X }
where
1
x[n] =
N
N 1
X [k ]e
k =0
jk
2
n
N
n = 0,..., N 1
N 1
Meaning:
X [k ], k = 0,..., N 1
is the component of the spectrum due to frequency
F
F =k s
N
sampling frequency
data length
Example:
Let
| X [k ] |
Fs = 10kHz
N = 1024
0
220
F = 220
1023
10
kHz = 2.15kHz
1024
Example: example_of_fft.m
Data length N=1024;
FFT of cosine
4000
plot(f,abs(X))
3500
3000
2500
2000
1500
1000
500
0
Freq. = 1kHz
1000
2000
3000
4000
5000
Hz
6000
7000
8000
9000 10000
Operations of Interest
x[n]
y[n]
h[n]
Input
signal
output
signal
Definition of Convolution:
h[l]x[n l]
l =
convolution
Input data
x
0
Impulse
response
N 1
h
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
]
x
[ n m]
n =
x[n], n = 0,..., N 1
1
rx [m] =
N
N 1
*
x
[
n
]
x
[n m], m = N + 1,..., N 1
n =0
2 1
x =
rx [m] =
N
0,
N 1
rx [m]
2
|
[
]
|
, if m = 0
x
n
n =0
otherwise
Example: xcorr_of_white_noise.m
4
3
2
% data
sigx=sqrt(2)
1
0
-1
x=sigx*randn(1,1000);
plot(x);
-2
-3
-4
% autocorrelation
N=length(x);
100
200
300
400
500
600
700
800
900
1000
autocorrelation of x
1.8
1.6
1.4
rx=xcorr(x)/N;
max_lag=length(x)-1;
m=-max_lag:max_lag;
1.2
1
0.8
0.6
0.4
plot(m,rx)
0.2
0
-0.2
-1000
-800
-600
-400
-200
0
200
time lag
400
600
800
1000
2. Cross Correlation.
To see if two signals are correlated with each other
ryx [m] =
*
y
[
n
]
x
[ n m]
n =
x[n], n = 0,..., N 1
y[n], n = 0,..., M 1
1
ryx [m] =
M
M 1
*
y
[
n
]
x
[n m], m = max( N , M ) + 1,..., max( N , M ) 1
n =0
Case of Interest: estimation of the impulse response of a Linear Time Invariant system
from input-output data
x[n]
y[n]
h[n]
If
Example: impulse_response_with_xcorr.m
2.5
1.5
y=conv(h,x);
ryx=xcorr(y,x) /length(y)
0.5
h_est=ryx/ryx(length(x));
-0.5
-1.5
-1
-0.5
0.5
1.5
4
x 10
2.5
1.5
zoom in
0.5
-0.5
-40
-20
20
40
60
A = 5. 0
Frequency
F0 = 5.0 kHz
Sampling Frequency
FS = 15.0 kHz
Phase
= 30 0
128 samples
Length
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
Standard Deviation
x = 5
Length
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
References:
J. Proakis, M. Salehi, Digital Communications, Prentice
Hall, 2007
destination
source of
information
Carrier
frequency
..01010110
Carrier
frequency
..01010010
Errors!
I
Q
Digital
Mod
bits
symbols
pulses
Discrete Time
channel
TX
RX
I
Q
pulses
noise,
disturbances,
other users
Continuous
Time
Digital
Dem
decision
symbols
Q
Discrete Time
bits
1.2 Goals
Transmitted
Power
TX
..01010110
Channel
Bandwidth
Noise
Interference
Variability
channel
Receiver
Complexity
RX
..01010010
Errors!
1.3 Parameters
FS =
bits
Nb =
bits
symbol
ES =
Joules
symbol
PT = ES FS Watts
symbols
xI [n]
a[n]
symbols
sec
Digital
Modulator
DAC
xQ [n]
DAC
pulses
xI (t )
xQ (t )
RF
A=
bits
a[n]
symbols
Digital
Demodulator
y I [n]
PR
PT
channel
PW = Watts
ADC
yQ [n]
y I (t )
yQ (t )
w(t )
RF
ADC
Bit Error
Rate
P
SNR = R
PW
pulses
PR = A PT Watts
Bits to Symbols:
the Constellation Mapping in 802.16 (Gray Code)
Q (Im)
I (Re)
BPSK
[b0 ]
N b = 1 bit/symbol
b0
+1
Q
b1 0
4-QAM
(QPSK)
[b0 , b1 ]
N b = 2 bits/symbol
I
1
b0
+1
Q
01
16-QAM
[b0 , b1 , b2 , b3 ]
00
b1 , b0
I
10
N b = 4 bits/symbol
11
b3 , b2
11
10
00
01
Symbols to Pulses:
Digital to Analog (DAC) and Analog to Digital (ADC) Conversion
x[n]g (t nTS )
pulse
symbol
x[n]
x(t )
DAC
nTS
gT (t )
n
t
pulse
symbol
y[n]
n
y (t )
ADC
g R (t )
t
+
x[n]g (t nT )
n =
nTS
FS = 1 / TS Symbol Rate
g (t )
G (F )
TS
F (Hz )
t (sec)
Symbol
interval
Bandwidth
+
ES = | g (t ) |2 dt = | G ( F ) |2 dF
PT =
ES
= ES FS
TS
g (t )
1.5
1
0.8
0.6
a=0.6
a=0.3
0.4
a=0.0
a=0.0
a=0.3
a=0.6
0.2
0.5
-0.2
-0.4
-4
-3
-2
-1
0
t
0
smaller bandwidth
more ISI
0
-1.5
B
1 = 1
FS
-1
-0.5
0
f
F
FS
larger bandwidth
less ISI
0.5
1.5
Transmit
Receive
Transmitted Power
PT = ES FS Watts
Channel Attenuation
channel
A=
PR
PT
Received Power
PR = A PT Watts
w(t )
Noise
N0
2
Noise Power
Spectral Density
B
PW = N 0 B Watts
Symbol Rate
Signal Power ES FS
=
SNR =
Noise Power N 0 B
Bandwidth
Noise Power Spectral Density
Thermal Noise
N0 / 2
F (Hz )
N 0 = kT = (1.383 10 23 J / K ) T
temperature in kelvin
Boltzmans constant
N 0 dB = 174dBm / Hz
Example:
Temperature = 290K (ambient)
Bandwidth = 2.0MHz
Noise Power =
FS
SNR =
B
ES
FS
= Nb
N 0
B
Eb
N 0
Transmitted
xI [n]
DAC
gT (t )
DAC
xQ [n]
gT (t )
xQ (t )
yT (t )
A sin (2Fc t )
A cos(2Fc t )
Received
Q
xI (t )
y I [n]
I
g R (t )
Ts
g R (t )
yQ [n]
y I (t )
yQ (t )
A sin (2Fc t )
channel
y R (t )
j = 1
phase (angle)
Ae
= A cos( ) + j A sin( )
1
424
3 1
424
3
Real Part
Im
Imaginary Part
Re
As a consequence:
Ae
j 2FC t
Ae j 2Fct
gT (t )
DAC
Re{.}
yT (t )
Re
channel
y R (t )
g R (t )
Re
Ts
Ae j 2Fct
If the carrier frequency is larger than the bandwidth of the filters, then it
can be simplified as
Baseband Channel
A j 2Fct
e
2
gT (t )
Re
channel
y[n] = y I [n] + jyQ [n]
g R (t )
Im
Ts
Re
A j 2Fct
e
2
x(t )
x(t )
gT (t )
gT (t )
C (F )
Real channel
FC
y (t )
FC
Complex
Baseband
channel
same
y (t )
g R (t )
A j 2Fct
e
2
A
C+ ( F FC )
2
F
g R (t )
Binary
source of
information
Complex
Encoder
Digital
Modulator
x[n]
complex
Received
Data
Binary
Decoder
Digital
Demodulator
Complex
y[n]
Baseband
Channel
.01001011001010
M-QAM
ES / TS log 2 ( M ) Eb FS
SNR =
=
N0 B
N0
Therefore, if FS B :
Eb
1
SNR
=
N 0 log 2 ( M )
Example.
Given:
Transmitted Power:
100mW
Bandwidth:
1.75MHz
QPSK (2 bits/symbol)
Solution:
1. Energy per Symbol at the transmitter
ES = 100mW / 1.75MHz = 57.14 10 6 mW / Hz = 42.4dBm / Hz
ES
= 162.4 (174) = 11.6dB
SNR =
N 0 dB
4. Finally
( )
P 2Q ( 2 )
PS = Q 2 NEb0
BPSK:
4-QAM:
Eb
N0
3 log M
2
PS 4Q
M 1
M-QAM:
Eb
N 0
M-QAM:
where
Pb
1
PS
log 2 ( M )
1
Q( x) =
2
t
e
dt
x
= 12 erfc
-1
10
BPSK
4QAM
16QAM
64QAM
-2
10
-3
10
-4
10
-5
10
-6
10
-5
10
Eb/No dB
15
20
Example.
Same as previous example
Compute: a. Symbol Error Rate, b. Bit Error Rate
Solution:
1. From the previous Example Eb / N 0 = 8.6dB
2. Symbol Error Rate: 10 4 errors per symbol (see graphs)
3. Bit Error Rate: 10 4 / 2 = 5 10 5 errors per bit
5. Simulink Implementation
source
process
sink
generate data
display results
read data
plots, scopes
import files
Compute Bit
Error Rate
BaseBand
Channel
Display Received Data
Simulink Model: AWGN_no_coding.mdl
5.3 Example
% MQAM modulation
Fs=10^6;
SNRdB=20;
% SNR in dBs
PT=5;
A=1/100;
% Channel Attenuation
PR=A*PT;
% Received Power
Parameters:
M-QAM
Fs symbols/sec
Modulation
Communications Sources
>>AM
>>>Rectangular
>>Bernoulli
Binary
QAM
Baseband Channel
1
PT
w[n]
y[n] =
A PT x[n] +
SNR
PR
Transmitter Gain
Channels
> AWGN Channel
transmitted
error rate
errors
bits
received
Blocks:
Comms Sinks > Error Rates Calculation
Simulink > Sinks > Display
% MQAM modulation
Fs=10^6;
PT=2;
A=1/50;
% Channel Attenuation
PR=A*PT;
% Received Power
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
-1
10
BPSK
4QAM
16QAM
64QAM
-2
10
-3
10
-4
10
-5
10
-6
10
-5
10
Eb/No dB
15
20
3. Channel Models
References:
A. Goldsmith, Wireless Communications, Cambridge Univ.
Press, 2005 Chapter 2.
1. Large Scale
Fading: due to
distance and
multipath
3. Small Scale
Fading: due to
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
30GHz
SHF
6GHz
UHF
300MHz
Prec =
Ptransm
4 d
c
wavelength =
F
2
Receive
antenna
Ptransm
L = 10log10
= 20log10 ( F ( MHz )) + 20log10 (d (km )) + 32.45
Prec
Lp
20dB / dec
L p = 20dB
d0
10d 0
Valid for:
Satellite Communicationss
Point to Point LOS Microwave
Reference for Path Loss Models
log10 ( d )
distance
1 + e j
l
hT
xT
constructive/distructive interference
xR
hR
= 2
Large distances
xT + xR l
l
hT
xT
xR
hR
monotonic
f=3GHz
-60
f=30GHz
-80
Prec
Ptrans
Prec/Ptran s in dB
f=0.3GHz
40dB / dec
-100
independent of
frequency
-120
-140
-160
Prec
hT2 hR2
4
Ptrans
d
-180
-200
-220
0
10
10
10
10
d in meters
10
10
L p = 20 log10 ( / 4) + 20 log10 (d )
40dB
Lp
20dB
hT
hR
101 100 10
log10 ( d )
L p = E {L p }+
expected value
6 12 dB
Average Loss
Free space loss at reference
distance
d
E{L p } = 10 log10 + L0
d0
Path loss
exponent
dB
Reference distance
indoor 1-10m
outdoor 10-100m
:
Free Space
Urban
2.7-3.5
Indoors (LOS)
1.6-1.8
Indoors(NLOS)
4-6
Lp
Frequencies 0.15-1.5GHz
Propagation Loss
Lp = + log10 ( d )
= 44.9 6.55log10 (h )
urban
log10 ( d )
rural
where
f = frequency in MHz
hT, hR = transmitter antenna elevation over average terrain (in
meters)
a ( hR ) corrective factor for receiver antenna
Propagation Loss
Lp = + log10 (d ) + CM
= 44.9 6.55log10 (h )
= 0 = 46.3 + 33.9 log10 ( f ) 13.82 log10 (hT ) a (hR )
where
Restrictions:
Example:
PT
PR = ?
Base
Station
d = 500m
Subscriber
Given:
d
Channel: L p = 10 log10
d + L0 +
0
d = 1m
0
L0 = 45dB
=3
= 6dB
Transmitted Power:
N 0 = 174dBm / Hz thermal
Then:
Received Power:
SNR = 96 + (104) = 8 + dB
random
P ( > a ) =
Where we define
1
2
+ 1 x
2
e
a
erfc( x) =
dx =
t 2
1
a
erfc
2
2
dt
x
a 8
1
(1/2)erfc(x)
1
0.9
BPSK 75% of
the time
0.75
0.8
0.7
0.6
0.5
0.4
0.3
0.2
16QAM 10% of
the time
0.10
0.1
0
-1
-0.5
BPSK: a=3dB
0.5
x
1.5
16QAM: a=14.7dB
Receive
Transmit
x (t ) = (t t0 )
t0
y (t ) = L + hk (t t0 k ) + ...
t0 1 2
time
100
102
1
=
=
=
3 sec
8
c
3 10
x (t ) = (t t0 )
t0
channel
Indoor
10 50 n sec
Suburbs
2 10 1 2 sec
Urban
Hilly
1 3 sec
3-10 sec
t0 1 2 MAX
Receive
Transmit
y (t ) = YR e
j 2 ( f c +f )t
time
v
for each path
Doppler Shift
fc
f c + f
Frequency (Hz)
time
Transmit
x(t )
Receive
y (t )
time
time
attenuation
shift in time
j 2 ( Fc + Fk )( t k )
y (t ) = Re ak x (t k )e
paths
shift in frequency
(this causes small scale time variations)
Several Reflectors:
x (t )
Transmit
Receive
y ( t ) = yl (t )
l
r
v
l + k
cos( k )
j 2 ( Fc + Fk )( t l k )
yl (t ) = Re ak e
x (t l k )
yl ( t )
j 2 Fct
j 2Fk t j 2 ( Fc + Fk ) k
y (t ) = Re ak e
e
x (t k ) e
r (t ) = rI (t ) + jrQ (t ) ak e
j 2Fk t j 2 ( Fc +Fk )( l + k )
x (t l )
Assume
leading to this:
x (t ) x (t k )
r (t ) = cl (t ) x (t l )
with
cl (t ) = ak e
k
j 2Fk t j 2 ( Fc +Fk )( l + k )
cl (t ) = ak e
k =1
E{cl (t )} = 0
since
E {cl (t )c (t + t )} = E{| ak | }e
M
*
l
Assume
Then
random
random
j 2
cos k t
k =1
Pl
E{| ak | } =
M
2
1
*
E {cl (t )cl (t + t )} = Pl
M
j 2
cos k t
k =1
1
= Pl
2
e
0
j 2
j 2 v cos t
= Pl E e
cos t
d = Pl J 0 (2 FD t )
E {cl (t )cl* (t + t )} = Pl J 0 (2 FD t )
1
2 Pl
F
Sl ( F ) = D 1 ( F / FD ) 2
0
And PSD
with
FD
if | F |< FD
otherwise
S l (F )
FD
x(t )
y (t )
time
time
v
1
l
time
L
x(t )
time
c1 (t )
cl (t )
delays
cN (t )
y (t )
time
cl (t ) = Pl g (t )
unit power
time invariant
from power distribution
Power Attenuations:
[ 1
[P1
Doppler Shift:
FD
Time delays:
2 L L]
P2 L PL ]
sec
dB
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:
Time delays
T = [ 1 , 2 ,..., N ]
Power distribution
P = [ P1 , P2 ,..., PN ]
Maximum Doppler
FD
E{cl (t )} 0
K
K
PTotal
1+ K
PLOS =
PNOLOS =
1
PTotal
1+ K
Simulink Example
M-QAM Modulation
Bernoulli
Binary
Rectangular
QAM
Bernoulli Binary
Generator
Rectangular QAM
Modulator
Baseband
Channel
Transmitter
Attenuation
Gain
Multipath Rayleigh
Fading Channel
-KB-FFT
Spectrum
Scope
Bit Rate
-K-
Receiver
Gain
-K-
Rayleigh
Fading
v
FD = FC
c
3 108 m / sec
modulation
power
channel
Bernoulli
Binary
Rectangular
QAM
Bernoulli Binary
Generator
Rectangular QAM
Modulator
Baseband
-KChannel
Transmitter
Attenuation
Gain
Multipath Rayleigh
Fading Channel
-K-
Rayleigh
Fading
-KB-FFT
Spectrum
Scope
Receiver
Gain
Doppler freq:
FD = 70 Hz
Fb = 20MHz
Bits/Symbol: 2 (QPSK)
FS / 2
FS / 2
Bernoulli
Binary
Rectangular
QAM
Bernoulli Binary
Generator
Rectangular QAM
Modulator
Baseband
-KChannel
Transmitter
Attenuation
Gain
Multipath Rayleigh
Fading Channel
-K-
Rayleigh
Fading
-KB-FFT
Spectrum
Scope
Receiver
Gain
Doppler freq:
FD = 2 Hz
Fb = 20MHz
Bits/Symbol: 2 (QPSK)
FS / 2
FS / 2
Channel Parameterization
x (t ) = (t t0 )
0
10
t0
channel
20
MAX
time
frequency
RMS
FT
Coherence Bandwidth
Bc =
5 RMS
Bc =
1
5 RMS
Frequency
coherence
Signal
Bandwidth
Flat Fading
Signal Bandwidth
<
>
Frequency Coherence
Frequency Selective
Fading
Distortion!!!
y (t ) = cl (t ) x(t l )
l =1
c l (t ) c l (t + t )
if
x (t )
| t | TC < 1 / F D
y (t )
same
response
different
response
TC
Coherence Time:
TC
9
16 FD
Max Doppler
Time
coherence
Symbol
period
Slow Fading
Symbol period
<
>
TC
9
16 FD
Time Coherence
Fast Fading
Frequency Spread
Time
Coherence
TC
9
16 FD
S (t , F )
F
FD
mean
RMS
Frequency
Coherence
Bc =
1
5 RMS
Time Spread
x[n]
y[n]
h[n]
h[k ]x[n k ]
m =
R yx [m] = E y[n]x*[n m]
=
k =
k =
In matlab:
y[n]
x[n]
x
2. Compute crosscorrelation between input and output:
h=xcorr(x,y);
If
h[n]
x[n]
y[n]
h[m, n]
y[n] =
h[k , n]x[n k ]
k =
Known:
1. Sampling frequency
Fs
n=N
n = 2N
x
y
N Ts << TD min
n = lN
Fs
xN=reshape(x,N,length(x)/N);
FD max
n = NB N
L
xN,yN=
yN=reshape(x,N,length(y)/N);
NB
l
hN=xcorr(xN,yN);
hN=
NB
h[m, n] n =lN
[ ]
L
hN=
h[m, n] n =lN
k (freq.)
m (time)
S=fft(hN);
S=S.*conj(S);
S=
[ ]
S [m, k ]
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
f =k
t = m / Fs
Time Resolution:
( Fs / N )
NB
t = 1 / FS
Frequency Resolution:
F =
FS
1
Hz
=
N N B total data length(sec)
Example:
% channel
Fs=10^6;
P=[0,-2,-3];
T=[0, 10, 15]*10^(-6);
fd=70;
Bernoulli
Binary
Rectangular
QAM
Bernoulli Binary
Generator
Rectangular QAM
Modulator
Baseband
% sampling freq. In Hz
% attenuations in dB
% time delays in sec
%doppler shift in Hz
Rayleigh
Fading
y
To Workspace1
Multipath Rayleigh
Fading Channel
x
To Workspace
test_scattering.mdl
Tmax=10^(-4) sec;
FDmax=150Hz;
-3
St(t)
Time Spread
x 10
8
7
Time Spread
6
5
4
3
2
-3
1
1.2
0
-1.5
-1
-0.5
0.5
time (sec)
1
-4
x 10
Frequency Spread
x 10
Sf(f)
1
15 sec
0.8
Frequency Spread
0.6
0.4
0.2
0
-1000
-800
-600
-400
-200
0
200
frequency (Hz)
70 Hz
400
+ 70 Hz
600
800
1000
Lab 3
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.
1.
2.
3.
1.
2.
3.
4.
5.
S (t , F )
Frequency Spread
F
FMAX
t
t MAX
Time Spread
if symbol duration >> time spread then there is almost no Inter Symbol
Interference (ISI).
channel
TS
time
1
0
phase still recognizable
channel
1 / TS
Frequency
Frequency
Flat Freq. Response
Frequency
time
? ?
phase not recognizable
equalizer
time
time
Channel and
Equalizer
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
1
symbol
0
time
0
time
1
time
channel
Frequency
One symbol
L
Frequency
0 1 0 1 1 1
Block of
symbols
channel
MC
subcarriers
0 1 0 1 1 1
Frequency
Each subcarrier sees
a Flat Fading
Channel: Easy
Demod
data
data
data
data
time
TSymbol
data
t
Tg
guard interval
Tb
data interval
data
NF
N2F
2
j 2FC t
j 2 ( FC + kF )t
j 2kFt
s (t ) = Re A ck e
A ck e
= Re e
N
k = N F
k = F
2
2
0 t TSymbol
ck
is modulated by a subcarrier
NF
NF
Fk = FC + kF , 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 ) |
Fc
BW
2
Fc
Fc +
BW
2
Fk = FC + kF
Fc
BW
2
Fc
Fc +
carrier
BW = N F F
BW
2
TX
Guard Time
Tg
Data Block
Data Block
Tb
RX
L
TSymbol
data+guard
RX
TX
s (t ) = Re e j 2Fct x(t )
Modulated Signal:
FC = carrier frequency
FT
FC
FC
FT
x(t ) = A
NF
2
ce
j 2kF ( t Tg )
k =
k 0
0 t TSymbol
NF
2
just a gain
ck = data
Limitations of OFDM
TSymbol
Overhead
(no data)
data
t
Tguard
Tb
The Guard Time (or Cyclic Prefix) does not carry data and
therefore it represents a loss of power
Pdata
Tb
=
Psymbol =
Tb + Tguard
To minimize overhead
1
Tguard
1 +
Tb
Tguard << Tb
Psymbol
S (t , F )
Frequency Spread
F
FMAX < kHz
Time Spread
t MAX sec
OFDM Symbol Duration:
OFDM Freq. Spacing:
Tb >> t MAX
F =
FS
>> FMAX
N
to minimize CP overhead
to ensure orthogonality
FS
1
1
=
=
N NTS Tb
we have:
10 3 sec roughly!!!
t
guard interval Tg
Tb data interval
1
Choose: F =
Tb
FC
Orthogonality:
1
Tb
t 0 +Tb
t0
j 2Fk t j 2Fl t
F
Fk = FC + kF
1
dt =
Tb
t 0 +Tb
t0
j 2 ( k l ) Ft
1 if k = l
dt =
0 if k l
Since the channel is Linear and Time Invariant (at least for the duration
of the frame), the exponentials e j 2Fk t are still orthogonal at the
receiver in steady state, ie after the transient has died.
Transmitted
subcarrier
j 2Fk t
Received
subcarrier
channel
t
0
Tg + Tb
h(t )
0
Tg
Tg + Tb
H ( Fk )e j 2Fk t
Tg t Tg + Tb
A=1/N
Then:
1
x(nTS ) =
N
NF
2
c e
k
k =
NF
2
j 2k FF ( n L )
s
1
=
N
NF
2
c e
k
k =
NF
2
jk 2N ( n L )
n = 0,.., L + N 1
data
N > NF
TIME:
0
Tg
Tb
Sampling Interval TS = 1 / FS
Sampling Frequency FS > Bandwidth
Freq spacing F = FS / N
FREQUENCY:
FS / 2
N F
F S
2 N
N F FS
2 N
FS / 2
NF
2
c e
jk 2N n
k =
NF
2
NF
2
1
=
N
c e
1
=
N
N 1
k =1
jk 2N n
X [k ]e
1
+
N
jk 2N n
c e
j ( N + k ) 2N n
k =
NF
2
=IFFT {X [k ]}
k =0
Where:
X [ k ] = ck ,
k = 1,..., N F / 2
X [ N + k ] = ck ,
k = 1,..., N F / 2
X [k ] = 0,
otherwise
positive subcarriers
negative subcarriers
L + N 1
CP
IFFT{ X }
14243
14243
x[n] = x[ N + n]
x[0] = x[ N ]
x[1] = x[ N + 1]
...
x[ L 1] = x[ L + N 1]
OFDM Symbol
Cyclic
Prefix
c1
x[L]
(N F / 2 )
IFFT
c N F / 2
c1
x[ L 1] = x[ N + L 1]
cN F / 2
data
k
0
x[0] = x[ N ]
N (N F / 2)
N
N
11
N 1
x[ L + N 1]
Summary of OFDM
and relevant parameters
Channel (given parameters):
t_MAX in sec
2. Doppler Spread
F_D in Hz
3. Bandwidth
BW in Hz
1. Sampling Frequency
Fs>BW in Hz
2. Cyclic Prefix
4*L<N<<Fs/F_D, integer
4. Number of Carriers
NF=[N*BW/Fs], integer
Test in Simulation:
w[n]
m-th data
block
(data, pilots
and nulls)
X m [0]
X [k ] M
m
M
X m [ N 1]
OFDM
TX
h[n]
OFDM
RX
Ym [k ] = H m [k ] X m [k ] + Wm [k ]
With H m [ k ] the frequency response of the channel within the time block
In order to estimate X m [k ] we need to know the channel.
M
M
Ym [0]
Ym [k ]
Ym [ N 1]
Data:
X m [k ] = d m [k ] X m 1[k ]
d m [k ]
X m1[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 ]
dm [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
Delay
one
frame
Ym1[k ]
d m [k ]
1. Parameters
2. Simulink Example
3. Frame based and Sample based
signals
Parameters of IEEE802.11a:
Channel (given parameters):
t_MAX=0.5 microsec
2. Doppler Spread
F_D=50Hz
3. Bandwidth
BW=16MHz
1. Sampling Frequency
Fs=20MHz
2. Cyclic Prefix
N=64<<20e06/50
4. Number of Carriers
NF=52=[64*16/20]
NULL
c1
c26
N F = 52
0
1
26
NULL
c 26
c1
Frequency
Pilots at: -21, -7, 7, 21
38
M
M
63
63
IFFT
x0
N = 64
x63
Time
Frequencies:
F = 20 MHz / 64 = 312.5kHz
L
38
( 64 26 )
L
63 1
8.125
26
8.125
F ( MHz )
Subcarriers index
16.25MHz
DATA
F (MHz )
FCARRIER 10
FCARRIER
20 MHz = 1 / Ts
FCARRIER + 10
Time Block:
Ts = TFFT / 64 = 50 10 9 sec
TG = 0.8 sec
time
Encode
Buffer
Interleave
(192 bits)
010011010101
Map to
16QAM
48
1110
0111
1000
1101
4
4x48=192 bits
al
+1+j3
-1+j
+3-j3
+1-j
48
-3-j
+3-j3
+1-j
24 data
2 pilots
null
24 data
2 pilots
am [ l ]
26
27
27 + 64
26 + 64
X m [k ]
l = 1: 48
1
2
1+ 64
IFFT
k = 0 : 63
L
26
1 1
MM
62
63
xm [62]
xm [63]
xm [ n ]
n = 0 : 63
L
26
xm [1]
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 channels frequency response.
Block of 80 samples
IN:
Block of 52 data
points (data + pilots)
NULL
d1
d 52
x(64)
x(1)
x(1)
26
NULL
d 27
0
1
d 26
x(49)
Recall: vectors in
Matlab begin at n=1
38
M
M
63
63
IFFT
CP
M
M
x(64)
x(64)
Vector operations.
OFDM Modulator:
Concatenate
in a vector
0
52 data points
(include the pilots)
26
0
52
26
Split
Data
1
26
11
26
Transmitted Frame
64
IFFT
80
ADD CP
OFDM Modulator:
OFDM Demodulator:
Received Frame
Received Data
80
Remove
CP
64
1
26
11
26
FFT
26
52
26
Concatenate
in a vector
demux
M=4 (QPSK)
f_D=doppler freq.
Differential enc/dec
Frame based
Sample based
[Nx1]
To
Frame
FFT
frame
[Nx1]
[Nx1]
sample
frame
By Layers:
CS-SAP
Service Specific Convergence
Sublayer (CS)
MAC-SAP
MAC
Security Sublayer
Section 6
Section 7
PHY-SAP
PHY
Physical Layer
Section 8
802.16-2004
802.16e-2005
Frequency Band
2GHz-11GHz
2GHz-11GHz fixed
2GHz-6GHz mobile
OFDM carriers
OFDM: 256
OFDMA: 2048
OFDM: 256
OFDMA: 128, 256, 512,1024,
2048
Modulation
Transmission Rate
1Mbps-75Mbps
1Mbps-75Mbps
Duplexing
TDD or FDD
TDD or FDD
Channel Bandwidth
(1,2,4,8)x1.75MHz
(1,4,8,12)x1.25MHz
8.75MHz
(1,2,4,8)x1.75MHz
(1,4,8,12)x1.25MHz
8.75MHz
IEEE802.16 Structure
data
randomization
data
De-rand.
Error
Correction
Coding
Error
Correction
Decoding
M-QAM
mod
OFDM
mod
M-QAM
dem
OFDM
dem
TX
RX
Choices:
Coding rates
M-QAM
1/2
2/3
3/4
16
5/6
64
OFDM
carriers
Channel
B/width
256
1.25 MHz
512
5 MHz
1024
10 MHz
2048
Ts
Tg
guard
Tb
data
(CP)
Tg
1 1 1 1
= , , ,
Tb 4 8 16 32
data
frequency
Guard
band
channel
Guard
band
N
k = used
2
j 2f ct
j 2kf ( t Tg )
s (t ) = Ree
Nused ck e
k = 2
k 0
| S( f ) |
f c BW
2
fc
f c + BW
2
f c BW
2
fc
carrier
f c + BW
2
FFT size
256
128
512
1024
2048
N_used
200
108
426
850
1702
N_nulls
56
20
86
174
346
N_pilots
12
42
82
166
N_data
192
96
384
768
1536
144444424444443
Fixed
WiMax
Fixed and
Mobile
WiMax
N FFT = 256
N used = 200
Fs BW
2
2
BW
2
Fs
2
Fs = N FFT f
BW = N used f =
N used
Fs
N FFT
Since we want the sampling rate to be integer multiple of a fixed rate (say
8kHz), the formula for the sampling rate is
X [k ]
0
12
x[n + L]
13
24
38
24
24
12
63
88
100
101
M
12
24
IFFT
155
156
168
193
24
218
24
12
243
255
255
NFFT=256
NCP=64
1. Channel Capacity
Problem: given a AWGN Channel, defined in terms of
..01010110
MOD
channel
DEM
..01010010
Errors!
Transmitted
Received
C = B log 2 (1 + SNR )
bits/sec
SNRdB=20dB
B=10MHz
Ru
<1
Re
rc
Ru
encoder
data rate
Re > Ru
Encoded data
rate
rc
encoder
Ru < C
rc
decoder
channel
C
BER
Given
a data rate Ru < C
a desired Bit Error Rate (BER) arbitrarily small
you can always find a code with coding rate
Ru
rc
<1
C
with desired BER.
Ru
rc = 1 / 2
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
coding rate
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-2
-1
3
EbN0 dB
1.6dB
Notice:
Eb
> 1.6dB
N0
always!!!
2. Block Coding
encoded data
encoder
(n, k , t )
k symbols
n> k symbols
Code Rate
Parameters:
k
rc =
n
(n, k , t )
d min 1
t floor
where
d min n k + 1
t
A
d min
codewords
non -codewords
receive
decode
A
transmit
C
A
channel
decoder
D
where
d (C , A) t
d ( D, A) > t
Error !!!
2. Probability of Error
If the code corrects up to t errors, the probability that the wrong
codeword is decoded is given by
n j
d min / 2
n j
k
(
)
Pe p (1 p ) (2 1) 4 p (1 p )
j =t +1 j
n
j bits wrong
with p the probability of error for one bit.
For BPSK, QPSK:
p = Q 2 Ec / N 0
k
Eb
n
n j
Pe
n j
Pb j p (1 p )
k
j =t +1 j
n
codeword error
Uncoded
-2.5
-3
Golay (24,12,3)
log10(Prob of error)
-3.5
BCH (127,64,10)
-4
-4.5
-5
-5.5
-6
-6.5
-7
7
8
Eb/N0 dB
10
11
(n, k , t )
2m k
t = floor
2
n = 2m 1
coded symbols
errors corrected
k<n uncoded
symbols
1 symbol = m bits
Good for Burst Error Correction at relatively high SNR
Example: (255,239,8)
239 symbols
RS
255 symbols
239 symbols
data
16
parity
Based on polynomials:
uncoded block
coded block
RS
u[0],..., u[k 1]
c[0],..., c[n 1]
encoder
c( X ) = g ( X )u ( X )
u( X )
errors
g( X )
e( X )
quotient
u( X )
e( X )
remainder
y( X )
g(X )
y ( X ) = c ( X ) + e( X )
= g ( X )u ( X ) + e( X )
1. Code Shortening
00000
239 symbols
(k+16,k,8)
(255, 239,8)
16
00000
255 symbols
16
(k+16,k,8)
16
2. Code Puncturing
parity bytes
(N k ) = 8 T
2
16 L
= 8T
L = 2T
Code:
(k+16,k,8)
16
(k '+16 2T , k ' ,8 T )
(k+16,k,8-T)
k
16-2T parity
(k '+16 2T , k ' ,8 T )
(32,24,4)
k=24, T=4
(40,36,2)
k=36, T=6
(64,48,8)
k=48, T=0
(80,72,4)
k=72, T=4
(108,96,6)
k=96, T=2
k=108, T=2
(120,108,6)
239 36 = 203
203
239
255
416 bits
288 bits
bits to
symbols
8 bits/symbol
36
RS
52
symbols
to bits
8 bits/symbol
RS Encoder
Raw data
288 bits
Encoded data
416 bits
RS Decoder
Raw data
288 bits
Received data
416 bits
RS decoder
MQAM Mod
Channel
MQAM Demod
Masked Subsystems
In Simulink we can create customized blocks, where we can enter
parameters values.
Example: Reed Solomon Encoder and Decoder
RS
Encoder
datablock
data
RS
Decoder
n'
encoded
data
RS Encoder:
1. edit
[239-k+1:255]
add parameters
the two
parameters from
previous slide
RS Decoder:
RS (40,36,2) encoder
Sequence Operations>Puncture
same vector
RS (40,36,2) decoder
Insert 12 zeros
Convolutional Encoders
Convolutional Encoders
raw data
L
k
CC
Rate
M
k
n
L
Coded data
x1
z 1
z 1
z 1
z 1
y2
x2
z 1
z 1
z 1
y3
[ y1
Polynomial description:
y2
y3 ] = [x1
a11
x2 ]
a21
a12
a22
a13
a23
y1
x1
z 1
z 1
z 1
z 1
y2
x2
1
z 1
z 1
z 1
y3
Therefore the code is described by the matrix (all entries are octal)
no connection x1 y3
[ y1
y2
y3 ] = [x1
23 35 0
x2 ]
0
5
13
no connection
x2 y1
z 1
z 1
[ y1 , y2 ] = x[a1 , a2 ]
a1 = (1)8 (111)8 (001)8 = 171
a2 = (1)8 (011)8 (011)8 = 133
constrained length = 7
z 1
z 1
z 1
z 1
y2
Punctured Codes
From an (k,n) convolutional code make a code with higher rate (less
correcting capabilities), by periodically eliminating output bits.
Example in IEEE 802.16e:
The code [171,133] seen before is a (1,2) code:
K, x[n],K
encoder
K , y1[n], y2 [n],K
Rate 2/3:
K , y1[n 1], y2 [n 1], y1[n], y2 [n],K
encoder
1 1
Since:
0
Rate 3/4:
K , y1[n 2], y2 [n 2], y1[n 1], y2 [n 1], y1[n], y2 [n],K
encoder
1 1 0
Since:
1
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
1 1 0 1 0
Since:
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
Simulink Implementation
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.
k
Raw Data in
RS
encoder
nRS
RS parameters
CC
encoder
CC parameters
encoder/decoder
reduction
puncturing
n
Encoded Data out
RS Encoder
(k + 16 2T , k ,8 T )
239
Zero
Pad
255
RS
(255,239,8)
k + 16
nRS = k + 16 2T
select
puncture
pRS = [11,...,
1,0,...,0]
23 123
k + 16 2T
2T
nRS
CC
[171,133]
2nRS
puncture
nRS
n=
rCC
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):
Rate ID
MQAM
Data
block k
(bytes)
Coded
block n
(bytes)
Coding
rate
k/n
RS Code
CC
coding
rate
12
24
1/2
(12,12,0)
1/2
24
48
1/2
(32,24,4)
2/3
36
48
3/4
(40,36,2)
5/6
16
48
96
1/2
(64,48,8)
2/3
16
72
96
3/4
(80,72,4)
5/6
64
96
144
2/3
(108,96,6)
3/4
64
108
144
3/4
(120,108,6)
5/6
Example:
take Rate_ID=2
Rate ID
M-QAM
Data block k
(bytes)
Coded
block n
(bytes)
Coding rate
k/n
RS Code
CC coding
rate
36
48
3/4
(40,36,2)
5/6
36
Raw Data in
RS
encoder
40
CC
encoder
40
= 48
5/6
Encoded Data out
RS parameters
k = 36
pRS = [11,...,
1,0,...,0]
23 123
36 + 16 2 6 = 40 2 6 = 12
CC parameters
pCC = [1,1,0,1,1,0,0,1,1,0]
Rate
ID
MQAM
Data
block
k
pRS
pCC
Coded
block n
(bytes)
coding
rate
CC
(bytes)
12
No RS
[1,1]
24
1/2
24
[ones(1,32),zeros(1,8)]
[1,1,0,1]
48
2/3
36
[ones(1,40),zeros(1,12)]
[1,1,0,1,1,0,0,1,1,0]
48
5/6
16
48
[1,1,0,1]
96
2/3
16
72
[ones(1,80),zeros(1,8)]
[1,1,0,1,1,0,0,1,1,0]
96
5/6
64
96
[ones(1,108),zeros(1,4)]
[1,1,0,1,1,0]
144
3/4
64
108
[ones(1,120),zeros(1,4)]
[1,1,0,1,1,0,0,1,1,0]
144
5/6
The Coding Rates and the MQAM modulation parameters are designed in such a way
that, in all cases
8* n
= 192 symbols
log 2( M )
Symbol Block
From Data
Source
To IFFT
RS
bytes:
k
Row Data
Block
CC
nRS
Coded Data
Block
MQAM
n
Coded Data
Block
FFT size
256
128
512
1024
2048
N_used
200
108
426
850
1702
N_nulls
56
20
86
174
346
N_pilots
12
42
82
166
N_data
192
96
384
768
1536
2x192
4x192
8x192
IEEE802.16 Implementation
In addition to OFDM Modulator/Demodulator and Coding we need
In addition we need
Frequency Offset Estimation: to compensate for phase errors and noise in the
oscillators
Offset tracking: to track synchronization errors
Time Synchronization:
detect the beginning of
the packet and OFDM
symbol
Received
Signal
Demodulated
Data
WiMax Demodulator
Time Synchronization
In IEEE802.16 (256 carriers, 64 CP) Time and Frequency Synchronization are
performed by the Preamble.
Long Preamble: composed of 2 OFDM Symbols
Short Preamble: only the Second OFDM Symbol
First OFDM Symbol
320 samples
2 repetitions of a long
pulse + CP
4 repetitions of a short
pulse+CP
64
Tg
64
64
Td
64
64
64
Tg
128
128
Td
The standard specifies the Down Link preamble as QPSK for subcarriers between -100
and +100:
1 j ,
PALL [k ] =
0,
k = 100,...,1,+1,...,+100
otherwise
PALL [k ], k = 1,...,100
100
156
255
P4 [k ]
p4 [ n]
FFT
L
0
64
64
64
252 255
255
p4 [ n]
64
0
64
64
64
64
64
255
319
2 PALL [k ], if k mod 2 = 0
P2 [k ] =
otherwise
0,
P2 [k ]
p2 [ n]
FFT
L
0
2 4 6
128
252 255
254
128
255
p2 [ n]
128
128
1
424
3 319
CP
2 PALL [k ], if k mod 2 = 0
P [k ] =
otherwise
0,
0
2
2 PALL [k ], if k mod 2 = 1
P [k ] =
otherwise
0,
1
2
m=0
P
2
[k ], if k mod 4 = 0
P40 [k ] = ALL
otherwise
0,
m = 1,2,3
P
m
ALL [ k + 2 m], if k mod 4 = m
P4 [k ] =
otherwise
0,
128
OFDM Symbols
128
n0
Compute Crosscorrelation Coefficient:
127
ry2 [n] =
y[n]
z 128
xcorr
y
[
n
l
]
y
[n 128 l]
l =0
127
127
2
2
y[n l] y[n 128 l]
l =0
l =0
128
OFDM Symbols
128
n0
Compute Autocorrelation :
127
ry2 [n] =
y[n]
z 128
xcorr
y
[
n
l
]
y
[n 128 l]
l =0
127
127
2
2
y[n l] y[n 128 l]
l =0
l =0
y[n]
64
128
128
n0
y[n 128]
64
128
128
ry2 [n]
Ln
MAX when
n0 64
n0
127
*
y
[
n
l
]
y
[n 128 l]
Compute it in Simulink:
l =0
ry2 [n]
y[n]
DF FIR
|u|
In1
Conj.
-128
z
2
>= 0.8
Product
Abs
Digital Filter
Math
Function
Divide
Compare
To Constant
1
Sync
Delay
-128
z
|u|
u2
Abs1
Square
DF FIR
Delay1
max
Product1
MinMax
Digital Filter2
-CConstant
127
127
2
2
y[n l] y[n 128 l]
l =0
l =0
ry [n]
64
*
y
[
n
l
]
p
[l ]
y[n]
ryp [n] =
xcorr
p[n]
l =0
127
127
2
2
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
n0
ryp2 [n]
p[n]
128
127
n0 128
n0
*
y
[
n
l
]
p
[l ]
y[n]
ryp [n] =
xcorr
p[n]
l =0
127
127
2
2
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]
64
128
128
n0
| h[n] |
ryp [n]
p[n]
128
127
n0 128
n0
Autocorrelation of
received data
ry
Crosscorrelation with
preamble
ryp
64 L
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]
xcorr
p[n]
ryp [n]
c[n]
ryp [n] 1
n M +1
n
M=max length of
channel = length of CP
c[n]
M 1
c[n] = ryp [n k ]
k =0
Maximum
energy
Example
y[n]
xcorr
p[n]
ryp [n]
Impulse response
of channel
c[n]
Auto
correlation
y[n]
max
Cross
correlation
p[n]
c[n]
Autocorrelation (saw
previously)
Detect
MAX
Cross correlation
Sum
Channel Estimation
Recall that, at the receiver, we need the frequency response of the channel:
X m [0]
X [k ] M
m
M
X m [ N 1]
w[n]
OFDM
TX
h[n]
Transmitted:
OFDM
RX
Ym [0]
Ym [k ]
Ym [ N 1]
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
Estimated initial time
Received Preamble:
64
128
128
256 samples
FFT
L
Y [ 0]
Y [k ] = H [k ] X p [k ] + W [k ], k = 0,...,255
Y [k ]
Y [255]
Y [k ] = H [k ] X p [k ] + W [k ], k = 0,...,255
Solve for
H [k ]
H [k ] =
Y [k ] X *preamble [k ]
| X p [k ] |2 + w2
noise covariance
X p [k ] = 0
frequency response H [k ]
Problem: when
X p [k ] = 1 j
Fact: by definition,
X p [k ] = 0
if
k = 2,4,...,100
k = 156,158,...,254
Two solutions:
1. Compute the channel estimate
H [k ] =
Y [k ] X *preamble [k ]
| X p [k ] |2 + w2
X p [k ] 0
and interpolate for the other frequencies. This might not yield good results and the
channel estimate might be unreliable;
known
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 ]
Since the the preamble is such that either
For the indices where
| X p [k ] |= 2
| X p [k ] |= 0
| X p [k ] |= 2
we can write:
2
L 1
jk
n
*
N
2 + W [k ] X *p [k ]
Y [k ] X p [k ] = h[n]e
0
=
n
h = Finv YX *p
64 1
k = 2,4,...,100
for
or
100 1
k = 156,158,...,254
Simulink Implementation
h[n]
Channel
Estimate out
Y [k ]
Data in
y[n]
H [k ]
X *p [k ]
Example:
Spectrum of
Received Signal
NOT TO
SCALE
As expected, it
does not match in
the Frequency
Guards
Estimated
Frequency
Response of
Channel
WiMax-2004 Demodulator
WiMax256.mdl
Standard OFDM
Demod (256 carriers)
data
Error Correction
Decoding
Ch.
Channel Tracking
In mobile applications, the channel changes and we need to track it.
IEEE802.16-2005 tracks the channel by embedding pilots within the data.
In the FUSC (Full Use of Sub Carriers) scheme, the pilots subcarriers are chosen
within the non-null subcarriers as
9k + 3m + 1
with
FFT = 1024
k =
0,...,47 for N FFT = 512
0,...,11 for N FFT = 128
subcarrier
0 1 4 7L
OFDM
Symbol
nulls
DC
(null)
pilots
data
nulls
Expand the
Demodulator
Demodulator
Channel
tracking
M
TX
M RX
NT
NR
Transmit
Antennas
Receive
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
TX
s
NT = 1
Transmit
Antennas
y1
hN R
M RX
yNR
NR
Different paths
NR
Receive
Antennas
w1
y1 h1
M
M
E
s
N
M
+
=
0
S
wN
y N hN
R
R R
Energy per
symbol
Noise PSD
Assume we know the channels at the receiver. Then we can decode the signal as
NR
NR
NR
i =1
i =1
i =1
y = hi* yi = ES | hi |2 s + N 0 hi* wi
signal
and the Signal to Nose Ratio
NR
2 ES
SNR = | hi |
i =1
N0
noise
NR
| h |
i =1
is a random variable
h1 = h2 = ... = hN R = h
Then
NR
2
2
2
|
h
|
=
N
|
h
|
=
N
i
R
R 2
i =1
assuming
{ }
E | h |2 = 1
and
ES
1 2 ES
SNR = N R | h |
= NR 2
N0
2 N0
2
mSNR = E{SNR} = N R
SNR
ES
N0
N R ES
= var{SNR} =
2 N0
better on average
var =
SNR
mSNR
1
=
2
y = x + x + ... + x
2
1
Then
with
y = n2
2
2
2
n
E{ y} = n
var{ y} = 2n
y =| x1 |2 + | x2 |2 +...+ | xn |2
xi = ai + jbi CN (0,1) complex gaussian, i.i.d .
Then
with
1 2
2n
2
E{ y} = n
y=
1
var{ y} = n
2
Since:
NR
2 ES
SNR = | hi |
i =1
N0
NR
1 2
2
| hi | = 2 N R
2
i =1
1 2 ES
SNR = 2 N R
N0
2
with
E{SNR} = N R
var{SNR} =
Diversity of order N R
ES
N0
N R ES
2 N0
var =
SNR
mSNR
1
2 NR
15
N R = 10
10
5
NR = 2
0
-5
NR = 1
-10
-15
-20
-25
20
40
60
80
100
120
140
160
180
200
Transmitter Diversity
h1
M
TX M
hN R
RX
NR = 1
NT
NT
Transmit
Antennas
ES
y =
NT
Different paths
hi s + N 0 w
i =1
Receive
Antennas
NT
h1
x1[n]
TX
y[n]
RX
h2
x2 [ n ]
s1[n], s2 [n]
x1
x2
s1
s2
*
2
s1*
2n 2n + 1
ES
(h1s1 + h2 s2 ) + N 0 w1
y[2n] =
2
ES
h1s2* + h2 s1* + N 0 w2
y[2n + 1] =
2
y[2n]
y *[2n + 1] =
ES
2
h1
h*
2
h2 s1
w1
+ N0 *
*
h1 s2
w2
z1 h1*
z = *
2 h2
s
h2 y[2n] ES
2 1
=
|| h || +
*
h1 y [2n + 1] 2
s2
w%1
N 0 || h ||
w% 2
(
)
= K (h y[2n] h y [2n + 1])
*
2
with
2 / ES
K=
| h1 |2 + | h2 |2 +2 N 0 / ES
s1
ES
|| h ||2
2
N 0 || h || w% 1
z1
s2
ES
|| h ||2
2
|| h ||2 ES
SNR =
2 N0
z2
N 0 || h || w% 2
1 2
|| h || =| h1 | + | h2 | = 4
2
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
SS->BS
Receive Diversity
Error
Coding
X 2m
Xn
M-QAM
buffer
IFFT
TX
STC
IFFT
TX
X 2 m 1
Block to be
transmitted
X 2m
X 2*m 1
X 2 m 1
X 2*m
2m
2m + 1
time
Receiver:
Y2 m
Data out
Error
Correction
Xn
M-QAM
X 2m
FFT
Un-
RX
STD
buffer
FFT
X 2 m 1
RX
Y2 m +1
Space Time Decoding:
with
K=
2m
2 / ES
| H1[k ] |2 + | H 2 [k ] |2 +2 N 0 / ES
2 m +1
The two antennas transmit two preambles at the same time, using different sets of
subcarriers
p0 [ n ]
EVEN subcarriers
CP
128
+
64
128
128
319
p1[n]
CP
64
128
128
time
L
0
100
ODD subcarriers
128
frequency
100
p0 [n] = p0 [n 128]
p1[n] = p1[n 128]
p0 [ n ]
n = 128,...,319
h0 [n]
y[n]
p1[n]
h1[n]
Problems:
time synchronization
estimation of both channels
+
+
y[n]
64
n0
256
64 128
n0 + 128
z 128
e j 3
e j1
x1[n]
y1[n]
Rayleigh
T
Rayleigh
x2 [ n ]
e j 4
= [ 1 L N ] sec
P = [ P1 L PN ] dB
y 2 [ n]
e j 2
OFDM Transceiver
IFFT
DAC
Power
Amp
LPF
P/S
MOD
BPF
MOD
BPF
LPF
DAC
FC FIF
FIF
oscillator
FIF
FFT
ADC
LPF
S/P
DEM
oscillator
BPF
FC FIF
DEM
BPF
LPF
ADC
Q
Low Noise
Amp
Problems!!!
Non Linearities
Quantization Errors
IFFT
DAC
I/Q Imbalance
Power
Amp
LPF
P/S
MOD
BPF
MOD
BPF
LPF
DAC
FC FIF
FIF
oscillator
Peak to Average
Power Ratio
Frequency Drift
Pmax=0.014
0.01
0.005
Pave=2e-4
0
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
1
y[n] =
N
N 1
Y [k ]e
jk 2N n
k =0
Average Power:
1
E | y[n] |2 = 2
N
N 1
k =0
PPeak
N
PAve
2
E
|
Y
[
k
]
|
=
1
E | Y [ k ] |2
N
E | y[n] | Y [k ] =| Y | Y
2
}
2
Pr {PAR > z} = 1 (1 e
fairly accurate for number of carriers
z 2.8 N
N 64
-1
N=128,256,512,1024
-2
-3
-4
-5
-6
-7
2
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
vin [n]
vout (t )
DAC
vin [n]
vout (t )
ZOH
QCL
In the DAC there are two sources of errors:
Quantization Error;
Saturation error due to clipping
VMAX
VMAX
Vmin
t
Small clipping error, Large
Quantization Noise
Vmin
Large clipping error, Small
Quantization Noise
We choose Clipping Level for best compromise between clipping error and
quantization noise.
vin [n]
vout (t )
DAC
ideal
vin [n]
vout (t )
ZOH
QCL
Total SNR due to Q and CL:
SNR due to Q :
12 2 2b
SNRQ =
(2 ) 2
CL
3 2 /2
= ACLIP /
= E {| x[n] |2 }
b = number of bits per sample
1 1
CL
where
1
Q
= ACLIP / = 4 5
65
SNR( dB )
60
b = 12
55
b = 11
50
b = 10
45
b=9
40
35
b=8
30
number of bits
25
20
15
= ACLIP /
x(t )
g
g ( x) =
y (t ) = g ( x(t ) )
Pout
(1 + x )
2p
1
2p
p of the order of 3
Pave PMAX
Input
Back Off
(IBO)
Pin
Ideally you want the Input Back Off (IBO) to be larger than the PAR.
IBO = 10 log10
PMAX
> PAR
Pave
PAR 10log10 N
This can be excessive and very inefficient.
Example: with N=256 carriers you need a IBO of
Remedies: Clipping
Ae j x[ n ] if | x[n] |> A
xCL [n] =
if | x[n] | A
x[n]
x[n]
clip
| x[n] |
time
FT
time
wide band noise
frequency
~
x [n] = ai e ji [n ni ]
i
| x[n] |
ni
time
x[n]
clip
Filter
X (F )
~
X (F )
x[n] ai e ji w[n ni ]
i
W (F )
F
Example:
See one of OFDM symbol with the following parameters (this is not random but
chosen with high PAR):
FFT length N=256
Data Carriers: Nused=200
Large peak value
Modulation: 4QAM
0.4
| x[n] |
0.35
0.3
0.25
0.2
0.15
0.1
0.05
0
50
100
150
200
250
300
nulls
data
1
Nused / 2
N
2
Nused / 2
N
-5
Large values in
the freq. guards
-10
-15
-20
-25
-0.5
-0.4
-0.3
-0.2
-0.1
0.1
0.2
0.3
0.4
0.5
1
2
f =
F
FS
f pass = Nused / (2 N )
f stop
0 .5
FT of window
h[n]
| H( f )|
10
0.8
-10
0.6
-20
0.4
-30
0.2
-40
-50
-0.2
-15
-10
-5
10
15
-60
-0.5
-0.4
-0.3
-0.2
-0.1
0.1
0.2
0.3
0.4
0.5
dB
-30
-40
-50
-60
-70
-80
-0.5
-0.4
-0.3
-0.2
-0.1
0
F/Fs
0.1
0.2
0.3
0.4
0.5
1.5
0.5
-0.5
-1
-1.5
-1.5
-1
-0.5
0.5
1.5
Peak Cancellation
Detect and Cancel the peak to reduce out of band noise.
+
Detect
peak
Generate
impulses
LPF
t0
| x(t ) |
(x(t ) Ae
0
j x ( t 0 )
) (t t )
0
(x(t ) Ae
0
j x ( t 0 )
)g (t t )
0
Effects:
The LPF completely controls the out of band noise. It can be completely eliminated;
It reduced PAR and therefore the Input Back Off.
It causes an increase of in band noise and therefore a higher BER.
y[n ] = Y [k ]e
jk 2N n
k =0
= y I [n ] + jyQ [n ]
y [n ] = AI e j I y I [n ] + jAQ e
jQ
yQ [n ]
= Ae j ( (1 + )e j y I [n ] + j (1 )e j yQ [n ])
with
A=
AI + AQ
2
I + Q
AI AQ
AI + AQ
I Q
I + Q
(1 + )e j (1 + )(1 + j ) 1 + + j
(1 )e j (1 )(1 j ) 1 j
After a bit of algebra:
y [n ] = Ae j ( y[n ] + ( + j ) y *[n ])
N 1
Substitute:
y[n ] = Y [k ]e
jk 2N n
k =0
to obtain:
N 1
N 1
jk 2N n
jl 2N n
*
+ ( + j ) Y [l]e
y [n ] = Ae Y [k ]e
l =0
k =0
N 1
jk 2N n
*
= Ae (Y [k ] + ( + j )Y [ N k ]) e
k =0
Y [N k ]
Y [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]
y[n ]
Define:
y[n]
y2
SNRi = 10 log 2
i
w1[n]
noise
Implementation Loss:
y2
y2
22
10 log 2 = 10 log1 + 2 = 10 log 1 + 10
10 log 2
2
1 + 2
1
1
SNR1 SNR2
10
Example: let
SNRnoise = 20dB
SNRIQ = 35dB
Implementation Loss
Total SNR:
10 log 1 + 10
2035
10
) = 0.135
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
dB
20
15
10
0.02
0.04
0.06
0.08
0.1
epsilon
x[n]
CP
n0
xP
xP
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
y2 = y1e j 2f N + w
where
yi = [ yi [0] L yi [ N 1]]
Then:
Im { y1*T y2 }
1
f =
arctan
*
T
Re { y1 y2 }
2 N
Since,
f <
1
2N