339
Wireless Communications with Matlab and Simulink: IEEE802.16 (WiMax) Physical Layer by Roberto Cristi Professor Dept of Electrical and Computer Engineering Naval Postgraduate School Monterey, CA 93943 August 2009

Wireless Communications With Matlab and Simulink

  • Upload
    yesme37

  • View
    1.829

  • Download
    22

Embed Size (px)

Citation preview

Page 1: Wireless Communications With Matlab and Simulink

Wireless Communications with Matlab and Simulink: IEEE802.16

(WiMax) Physical Layer

by

Roberto Cristi

Professor Dept of Electrical and Computer Engineering

Naval Postgraduate School Monterey, CA 93943

August 2009

Page 2: Wireless Communications With Matlab and Simulink

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

Page 3: Wireless Communications With Matlab and Simulink

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

Page 4: Wireless Communications With Matlab and Simulink

Introduction to IEEE 802.16 and WiMax

Existing “Area Networks” for wireless communications:

• Personal (PAN), up to a few meters. It requires simple “thumb like” transmitters receivers. Typical: Bluetooth.

• Local (LAN), up to 300m. It requires simple “box like” devices. Typical: WiFi(IEEE802.11)

• Wide (WAN), up to a few miles. It requires towers and cellular technology. Typical: W-CDMA, CDMA 2000, UMTS …

IEEE 802.16 (WiMax) are possible future technologies for WAN.

Page 5: Wireless Communications With Matlab and Simulink

• IEEE802.16 is a standard for Broadband Wireless Access (BWA) Air Interface. It is purely technical (not commercial);

•“The WiMAX Forum® is an industry-led, not-for-profit organization formed to certify and promote the compatibility and interoperability of broadband wireless products based upon the harmonized IEEE 802.16/ETSI HiperMAN standard. A WiMAX Forum goal is to accelerate the introduction of these systems into the marketplace. WiMAXForum Certified™ products are fully interoperable and support broadband fixed, portable and mobile services. Along these lines, the WiMAX Forum works closely with service providers and regulators to ensure that WiMAX Forum Certified systems meet customer and government requirements” (from the WiMax website www.wimaxforum.org)

IEEE 802.16 and WiMax

Page 6: Wireless Communications With Matlab and Simulink

Current WAN Technologies for Voice and Data

3G: CDMA2000 and UMTS. All based on Spread Spectrum

3.5G: increased capacity by combining CDMA with TDM (Time Division Multiplexing). Voice and Data on separate channels. Current technology;

4G : to provide voice, data, multimedia services at low cost on an all IP (packets) network. IEEE802.16 (WiMax) is one of the technologies considered.

TODAY: voice and data on separate networks;

TOMORROW: voice and data on the same network. Data using Voice Over IP (VoIP). Advantages: flexibility, control of QoS, scalable.

Page 7: Wireless Communications With Matlab and Simulink

Evolution of IEEE802.16:

SC, 256OFDM, 128, 512, 1024, 2048 OFDMA

Fixed, Mobile, NOLOS

2-6GHzDec 2005802.16e-2005

SC, 256 OFDM, 2048 OFDMA

Fixed, NOLOS2-11GHzJune 2004802.16-2004

Single CarrierFixed, LOS 10-66GHzDec 2001802.16

In addition, IEEE802.16-2004 and 2005 have options based on Multi Antennas techniques.

Page 8: Wireless Communications With Matlab and Simulink

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

Page 9: Wireless Communications With Matlab and Simulink

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

Page 10: Wireless Communications With Matlab and Simulink

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

Page 11: Wireless Communications With Matlab and Simulink

Example

Wireless ChannelTX RX

Digital Mod

Digital Dem

• Design

•Test

• Automatically Generate Code

… 00010101011101010100101111

0010101010010010101001001001….

Simulink Model

Page 12: Wireless Communications With Matlab and Simulink

Modulator Demodulator

Fading channel

Compute Errors

Display signals

Page 13: Wireless Communications With Matlab and Simulink

Simulink has a very rich library of blocksets:

Page 14: Wireless Communications With Matlab and Simulink

1. Introduction to Digital Signal Processing and Matlab

1. Discrete time Signals and Systems

2. Fast Fourier Transform (FFT) and its Inverse (IFFT)

3. Convolution and Correlation

Page 15: Wireless Communications With Matlab and Simulink

1. Discrete Time Signals

1. Continuous Time to Discrete Time

2. Fundamental Signals: Delta Function, Sinusoid, Complex Exponential

Page 16: Wireless Communications With Matlab and Simulink

Continuous Time and Discrete Time Signals

)(tx ( )[ ] sx n x nT=

ss TF /1=

t

snT

[ ]x n

Sampling

sF

sTSampling frequency (Hz=1/sec)

Sampling interval (sec)

Page 17: Wireless Communications With Matlab and Simulink

Fundamental Discrete Time Signals

1. “Delta” or “Impulse”][nδ

n

2. Sinusoid

( ) ( )αωαπ +=+==

nAtFAnxsnTt 00 cos2cos][

amplitude

phase

Frequency (Hz)Digital

Frequency (radians)

sFF0

0 2πω =

Page 18: Wireless Communications With Matlab and Simulink

Generate it in matlab: plot_a_sinusoid.m

n=0:100;

A=10;

w0=2*pi/5;

alpha=0.1;

x=A*cos(w0*n+alpha);

plot(x);

Example:

kHzFkHzF

s 1020

==

02,000 22

10,000 5Hz radHz

πω π= =⇒

n=[0,1,2,…,100]

x=[10*cos(0.1), … , 10*cos((2*pi/5)*100+0.1)]

( ) ( )0[ ] 10cos 4,000 0.1 10cos 0.1st nT

x n t nπ ω=

= + = +

10sF kHz=

Digital frequency:

Page 19: Wireless Communications With Matlab and Simulink

3. Complex Exponentials

( ) ( )44 344 2144 344 21

PartImaginary

0

Part Real

0 )sin()cos( ][ 00

αωαω

ωααω

+++=== +

nAjnAeAeAeny njjnj

where imaginary basis1−=j

Then a sinusoid becomes the “real part” of a complex signal

( ){ }αωαω +=+ njAenA 0Re)cos( 0

Page 20: Wireless Communications With Matlab and Simulink

Sinusoids and Frequency Spectrum

Complex exponentials are the “building blocks” of signals and systems.

Reasons: all operations of interest boil down to multiplications or divisions

A sinusoid in terms of complex exponentials can also be written as

( ) ( )0 00cos( )

2 2j n j nA AA n e eω α ω αω α + − ++ = +

0ω0ω−

with two frequencies:

positive and negative

Page 21: Wireless Communications With Matlab and Simulink

The Fast Fourier Transform (FFT) and its Inverse (IFFT)

1. Definitions

2. Examples

3. Computation in Matlab

4. Symmetry

Page 22: Wireless Communications With Matlab and Simulink

The Fast Fourier Transform (FFT)

Given a finite sequence of data

1,...,0],[ −= Nnnx

x

n0 1N −1. Define the FFT

{ }xFFTX =

∑−

=

−=

1

0

2

][][N

n

nN

jkenxkX

π

1,...,0 −= Nkwhere

2. … and the IFFT (Inverse FFT)

{ }x IFFT X=

21

0

1[ ] [ ]N jk n

N

k

x n X k eN

π−

=

= ∑ 0,..., 1n N= −where

Page 23: Wireless Communications With Matlab and Simulink

Meaning:

1,...,0],[ −= NkkX

is the component of the spectrum due to frequency

NFkF s=

sampling frequency

data length

Example:

|][| kX

k10230 220

kHzFs 10=Let

1024N =

kHzkHzF 15.2102410220 ==

Page 24: Wireless Communications With Matlab and Simulink

Example: example_of_fft.m

Data length N=1024;

Sampling Frequency Fs=10kHz

X=fft(x);

k=0:1023; f=k*Fs/N; % frequency axis

plot(f,abs(X))

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 100000

500

1000

1500

2000

2500

3000

3500

4000FFT of cosine

Hz

Freq. = 1kHz

This corresponds to the “negative frequency”

(disregard)

Page 25: Wireless Communications With Matlab and Simulink

Convolution and Correlation

1. Convolution as system response

2. Autocorrelation of data

3. Crosscorrelation between data sets

4. Estimation of Impulse Response using Crosscorrelation

Page 26: Wireless Communications With Matlab and Simulink

Operations of Interest

1. Convolution. To compute the output of a Linear Time Invariant system

][nh[ ]x n [ ]y n

Input signal

output signal

Impulse response

Definition of Convolution:

∑+∞

−∞=

−==l

ll ][][][*][][ nxhnxnhny

Page 27: Wireless Communications With Matlab and Simulink

In general you deal with sequences of finite length

0

x0

h

Input data

Impulse response

*

convolution

=

0

y=Output data

]1[]1[...]2[]2[]1[]1[][]0[][ +−−++−+−+= MnxMhnxhnxhnxhny

1−N 1−M

2−+ MN

Page 28: Wireless Communications With Matlab and Simulink

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)

Page 29: Wireless Communications With Matlab and Simulink

2. Auto Correlation.

For a signal with zero mean, to see if the samples are “correlated” with each other

Definition of Auto Correlation: ∑+∞

−∞=

−=n

x mnxnxmr ][][][ *

Again, you deal with signals of finite length

1,...,0],[ −= Nnnx

,][][1][1

0

*∑−

=

−=N

nx mnxnx

Nmr

Example: White Noise with standard deviation

⎪⎩

⎪⎨

=== ∑

=

otherwise ,0

0 if ,|][|1][

1

0

22 mnxNmr

N

nx

x

σ

m

][mrx

1,...,1 −+−= NNm

Page 30: Wireless Communications With Matlab and Simulink

Example: xcorr_of_white_noise.m

% data

sigx=sqrt(2)

x=sigx*randn(1,1000);

plot(x);

% autocorrelation

N=length(x);

rx=xcorr(x)/N;

max_lag=length(x)-1;

m=-max_lag:max_lag;

plot(m,rx)

0 100 200 300 400 500 600 700 800 900 1000-4

-3

-2

-1

0

1

2

3

4white noise sequence

-1000 -800 -600 -400 -200 0 200 400 600 800 1000-0.2

0

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

time lag

autocorrelation of x

Page 31: Wireless Communications With Matlab and Simulink

2. Cross Correlation.

To see if two signals are “correlated” with each other

∑+∞

−∞=

−=n

yx mnxnymr ][][][ *

With finite length signals:

1,...,0],[1,...,0],[−=−=

MnnyNnnx

1),max(,...,1),max(,][][1][1

0

* −+−=−= ∑−

=

MNMNmmnxnyM

mrM

nyx

Page 32: Wireless Communications With Matlab and Simulink

][nx [ ]y n][nh

Case of Interest: estimation of the impulse response of a Linear Time Invariant system from input-output data

If is white noise, then ][nx ]0[/][][ xyx rnrnh =

Page 33: Wireless Communications With Matlab and Simulink

Example: impulse_response_with_xcorr.m

-1.5 -1 -0.5 0 0.5 1 1.5

x 104

-0.5

0

0.5

1

1.5

2

2.5

-40 -20 0 20 40 60-0.5

0

0.5

1

1.5

2

2.5

zoom in

h=[1, 0, 0.2, -0.5, 2, -0.1]; % impulse response

y=conv(h,x);

ryx=xcorr(y,x) /length(y)

h_est=ryx/ryx(length(x));

Page 34: Wireless Communications With Matlab and Simulink

Lab 1: Introduction to DSP and Matlab

1. Generate a sinusoidal signal of a given frequency

2. Check its frequency spectrum

A. Sinusoids and the FFT:

B. White Noise, Convolution, Correlation:

1. Generate a white noise signal with a given covariance

2. Determine the output of a given Linear Time Invariant System

3. From the input-output data, estimate the impulse response of the system

Page 35: Wireless Communications With Matlab and Simulink

A. Sinusoids and the FFT:

A.1 Generate a sinusoid with the following parameters and plot it vs time:

Amplitude

Frequency

Sampling Frequency

Phase

Length

0.5=AkHzF 0.50 =

kHzFS 0.15=030=α

samples 128

plot_a_sinusoid.mReference:

Page 36: Wireless Communications With Matlab and Simulink

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

Page 37: Wireless Communications With Matlab and Simulink

B. White Noise, Convolution, Correlation:

1. Generate a gaussian white noise signal with the following parameters:

Standard Deviation

Length

5=xσ

points data 000,10=N

Plot its autocorrelation and verify that it is as expected.

2. This signal is the input to a system with impulse response

]3.0,0,0,0,5.0,2,0,1[ −=h

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

Page 38: Wireless Communications With Matlab and Simulink

2. Digital Communications Fundamentals and the Additive White Gaussian Noise (AWGN) Channel

1. General Structure of a Digital Communication System

2. Channel Losses and Noise

3. Complex Baseband Representation

4. Bit Error Probabilities

5. Simulink Implementation

References:

J. Proakis, M. Salehi, “Digital Communications,” Prentice Hall, 2007

Page 39: Wireless Communications With Matlab and Simulink

1. General Structure of a Digital Communications System

1.1 General Overview

1.2 Goals

1.3 Parameters of Interest

Page 40: Wireless Communications With Matlab and Simulink

1.1 General Overview

Digital Mod

source of information

channel decision

destination

noise, disturbances, other users

..01010110…

I

..01010010…

Errors!

bits symbols

Discrete TimeContinuous

Time Discrete Time

symbols bits

IQ

I

Q Q

IQ

Carrier frequency

Carrier frequency

Digital Dem

pulses pulses

TX RX

Page 41: Wireless Communications With Matlab and Simulink

1.2 Goals

channel..01010110… ..01010010…

Errors!

TX RX

• Bit Error Rate within acceptable values;

• Stay within the available resources:

Transmitted Power

Channel Bandwidth

Noise Interference Variability

…Receiver

Complexity

Page 42: Wireless Communications With Matlab and Simulink

1.3 Parameters

RF

channel

Digital Modulator

DAC

Digital Demodulator

][nxI

DAC][nxQ

RFADC

ADC

][nyI

][nyQ

symbols

][na

bits

symbols

][ˆ na

bits

)(tw

symbolbitsNb =

secsymbolsFS = symbol

JoulesES =

WattsFEP SST =

WattsPW =

WattsPAP TR ×=W

R

PPSNR =

T

R

PPA =

Bit Error Rate

)(txI

)(txQ

)(tyI

)(tyQ

pulses

pulses

Page 43: Wireless Communications With Matlab and Simulink

I (Re)

Q (Im)

BPSK1+1−

I

Q

1+1−

4-QAM (QPSK)

→0b 01

01→0b

0

1

→1b

][ 0b

],[ 10 bb

Bits to Symbols:

the Constellation Mapping in 802.16 (Gray Code)

bit/symbol 1=bN

lbits/symbo 2=bN

Page 44: Wireless Communications With Matlab and Simulink

I

Q

16-QAM

11→23,bb

],,,[ 3210 bbbb

10 00 01

→01,bb

01

00

10

11

Notice : only one bit difference between close neighbors

lbits/symbo 4=bN

Page 45: Wireless Communications With Matlab and Simulink

Symbols to Pulses:

Digital to Analog (DAC) and Analog to Digital (ADC) Conversion

n

][nxDAC )(tgT

)(txsymbol pulse

n

][nyADC )(tgR

)(tysymbol pulse

)(][ SnTtgnx −

SnT t

t

t

SnT t

∑+∞

−∞=

−n

SnTtgnx )(][

Page 46: Wireless Communications With Matlab and Simulink

Bandwidth, Symbol Rate and Transmitted Power

)(tg

(sec)tST

Symbol interval

)(HzF

SS TF /1=

B

)(FG

Bandwidth

Symbol Rate

Energy per symbol ∫∫+∞

∞−

+∞

∞−

== dFFGdttgES22 |)(||)(|

Transmitted PowerSS

S

ST FE

TEP ×==

Page 47: Wireless Communications With Matlab and Simulink

-4 -3 -2 -1 0 1 2 3 4-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

t

a=0.0 a=0.3 a=0.6

-1.5 -1 -0.5 0 0.5 1 1.50

0.5

1

1.5

f

a=0.0

a=0.3a=0.6

( )g t

Typical: Raised Cosine

• smaller bandwidth

• more ISI

• larger bandwidth

• less ISI

)(FG

110 ≤=−≤ αSF

BSF

F

Page 48: Wireless Communications With Matlab and Simulink

2. Channel Losses and Noise

2.1 Transmitted Pulses to Received Pulses

2.2 Energy per Symbol, Power Spectral Density

2.3 Signal to Noise Ratio and “Eb/N0”

Page 49: Wireless Communications With Matlab and Simulink

Transmit Receive

• attenuation: free space, obstacles, foliage …

• noise: thermal, interferences from other systems/users

• multipath: reflections from buildings, structures, hills …

• doppler shift: motion of transmitter, receivers, reflectors …

2.1 Transmitted Pulses to Received Pulses:

Page 50: Wireless Communications With Matlab and Simulink

Channel Attenuation

channel

)(tw

WattsBNPW ×= 0

WattsPAP TR ×=

T

R

PPA =

WattsFEP SST =

Transmitted Power

Received Power

Channel Losses and Noise

Noise

F

Noise Power Spectral Density

20N

BB

Page 51: Wireless Communications With Matlab and Simulink

BNFESNR SS

××

==0Power Noise

Power Signal

Energy per symbol Symbol Rate

Noise Power Spectral Density

Bandwidth

2.2 Energy per Symbol and Power Spectral Density

Page 52: Wireless Communications With Matlab and Simulink

Thermal Noise

• Present in all electronic systems, it is dependent on temperature;

• It is “white”, in the sense that it is equally spread in frequency.

)(HzF

Power Spectral Density

2/0N

TKJkTN ××== − )/10383.1( 230

temperature in kelvinBoltzman’s constant

Ambient temperature =290K

HzdBmN dB /1740 −=In dBm:

Page 53: Wireless Communications With Matlab and Simulink

Example:

• Temperature = 290K (ambient)

• Bandwidth = 2.0MHz

Noise Power =

( ) dBmHzdBmBN dB 111102log10/174 6100 −=×+−=

Page 54: Wireless Communications With Matlab and Simulink

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛=⎟⎟

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛=

00 NE

BFN

NE

BFSNR bS

bSS

symbolper bits(Joules)bit per Energy

(Joules) symbolper Energy density spectralpower noise

sec)/1(bandwidth (1/sec) rate symbol

0

====

≥===

b

b

S

S

S

NEEN

FHzBF

2.3 Signal to Noise Ratio and “Eb/N0”

Page 55: Wireless Communications With Matlab and Simulink

3. Complex Baseband Representation

3.1 Complex Signals

3.2 Baseband Channel Representation

Page 56: Wireless Communications With Matlab and Simulink

3.1 Complex Signals

][nxI

][nxQ

DAC )(tgT

( )tFA cπ2cos

DAC )(tgT

( )tFA cπ2sin−

)(tyT

][nyI

][nyQ

)(tgR

( )tFA cπ2cos

)(tgR

( )tFA cπ2sin−

channel

sT

)(tyR

)(txI

)(txQ

)(tyI

)(tyQ

I

Q

I

QReceived

Transmitted

Symbols:

Page 57: Wireless Communications With Matlab and Simulink

Recall: Complex Numbers and Complex Exponentials

4342143421)sin()cos( ααα AjAAe j +=

amplitude phase (angle)

Real Part Imaginary Part

1−=j

Re

Im

As a consequence:

)2sin()2cos(2 tFjAtFAAe CCtFj C πππ +=

Page 58: Wireless Communications With Matlab and Simulink

It is easier to define one complex signal which combines In Phase and Quadrature components:

][][][ njxnxnx QI +=

DAC )(tgT

tFj cAe π2

)(tyT

)(tgR

channel

sT

)(tyR

Re{.}

tFj cAe π2−

][][][ njynyny QI +=

Re

Im

Re

Im

Page 59: Wireless Communications With Matlab and Simulink

If the carrier frequency is larger than the bandwidth of the filters, then it can be simplified as

][][][ njxnxnx QI +=

DAC )(tgT

tFj ceA π2

2

)(tgR

channel

sTtFj ceA π2

2−

][][][ njynyny QI +=

Baseband Channel

Re

Re

Im

Page 60: Wireless Communications With Matlab and Simulink

)(tgT

tFj ceA π2

2

)(tgR

tFj ceA π2

2−

3.2 Baseband Channel Representation

)(tx

)(ty

CFCF− F

Real channel)(FC

)(tgT

)(tgR

)(tx

)(ty

F

Complex Baseband channel

)(2 CFFCA

−+

⇒⇐ same

Advantage: all signals at lower frequencies, therefore much easier to simulate and analyze.

Page 61: Wireless Communications With Matlab and Simulink

Encodersource of

information

Baseband Channel

Digital Modulator

Decoder Digital Demodulator

Received Data

][nx

][ny

Digital Transmitter/Receiver with Baseband Channel:

complex

Binary Complex

Binary Complex

Page 62: Wireless Communications With Matlab and Simulink

4. Bit Error Probabilities for M-QAM Modulation

4.1 “Eb/N0” and SNR for MQAM Signals

4.2 Probability of Symbol Error in Additive White Gaussian Noise (AWGN) Channel;

Page 63: Wireless Communications With Matlab and Simulink

⎟⎠⎞

⎜⎝⎛⎟⎟⎠

⎞⎜⎜⎝

⎛==

BF

NEM

BNTESNR SbSS

0

2

0

)(log/

Energy per bit# of bits per symbol

M-QAM:

4.1 “Eb/N0” and SNR for MQAM Signals

….01001011001010… M-QAM

Page 64: Wireless Communications With Matlab and Simulink

SNRMN

Eb⎟⎟⎠

⎞⎜⎜⎝

⎛=

)(log1

20

Therefore, if :BFS ≅

Significance: the error probabilities for MQAM are functions of 0/ NEb

Page 65: Wireless Communications With Matlab and Simulink

Example.

Given:

Transmitted Power: 100mW

Bandwidth: 1.75MHz

Channel Attenuation: -120dB

Modulation: QPSK (2 bits/symbol)

Compute:0/ NEb

Assume: Thermal Noise only at ambient temperature

Page 66: Wireless Communications With Matlab and Simulink

Solution:

1. Energy per Symbol at the transmitter

HzdBmHzmWMHzmWES /4.42/1014.5775.1/100 6 −=×== −

2. Energy per Symbols at the receiver

HzdBmES /4.1621204.42 −=−−=

3. SNR at the receiver

dBNESNR

dB

S 6.11)174(4.1620

=−−−=⎟⎟⎠

⎞⎜⎜⎝

⎛=

4. Finally ( ) dBNE dBb 6.82log106.11/ 100 =−=

Page 67: Wireless Communications With Matlab and Simulink

4.2 Probability of Symbol Error in AWGN

BPSK: ( )0

2 NE

SbQP =

4-QAM:

M-QAM:

( )0

22 NE

SbQP ≈

⎟⎟

⎜⎜

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎠⎞

⎜⎝⎛

−≈

0

2

1log34

NE

MMQP b

S

Probability of Bit Error with Gray Coding:

M-QAM: Sb PM

P)(log

1

2

where

⎟⎠⎞

⎜⎝⎛=

= ∫+∞

2

21)(

21

2

xerfc

exQx

dtt

π

Page 68: Wireless Communications With Matlab and Simulink

Symbol Error Rates (Exact Values)

-5 0 5 10 15 2010-6

10-5

10-4

10-3

10-2

10-1Symbol Error Rate

Eb/No dB

Pro

b. b

it E

rror

4QAMBPSK

16QAM64QAM

Page 69: Wireless Communications With Matlab and Simulink

Example.

Same as previous example

Compute: a. Symbol Error Rate, b. Bit Error Rate

Solution:

1. From the previous Example dBNEb 6.8/ 0 =

2. Symbol Error Rate: errors per symbol (see graphs) 410−

3. Bit Error Rate: errors per bit 54 1052/10 −− ×=

Page 70: Wireless Communications With Matlab and Simulink

5. Simulink Implementation

5.1 Fundamentals of Simulink

5.2 Digital Communications in AWGN: Simulink Implementation;

5.3 Example

Page 71: Wireless Communications With Matlab and Simulink

5.1 Fundamentals of Simulink

Simulink has three classes of blocksets:

• sources (outputs only)

• processes (inputs/outputs)

• sinks (inputs only)

source processsink

• generate data

• read data

• import files …

• display results

• plots, scopes…

• send data to devices

Page 72: Wireless Communications With Matlab and Simulink

5.2 Digital Communications in AWGN: Simulink Implementation

Generate Complex Data

BaseBandChannel

Display Received Data

Compute Bit Error Rate

Simulink Model: AWGN_no_coding.mdl

Page 73: Wireless Communications With Matlab and Simulink

5.3 Example

M=4; % MQAM modulation

Fs=10^6; % symbol rate (1/sec)

SNRdB=20; % SNR in dB’s

PT=5; % Transmitted Power in Watts

A=1/100; % Channel Attenuation

PR=A*PT; % Received Power

Let’s simulate a Digital Communications System with the following parameters:

Page 74: Wireless Communications With Matlab and Simulink

Edit > Model Properties

Enter the parameters

Page 75: Wireless Communications With Matlab and Simulink

Generate Complex Data

• M-QAM

• Fs symbols/sec

Communications Sources

>Random Data Sources

>>Bernoulli Binary

Modulation

>Digital Baseband Mod

>>AM

>>>Rectangular QAM

Parameters:

Page 76: Wireless Communications With Matlab and Simulink

Baseband Channel

⎟⎟⎠

⎞⎜⎜⎝

⎛+×= ][][1][ nw

SNRPnxPA

Pny T

TR

Transmitter Gain

Channels

> AWGN Channel

Page 77: Wireless Communications With Matlab and Simulink

Analysis of Data by Computer Simulation

Blocks:• Comms Sinks > Error Rates Calculation

•Simulink > Sinks > Display

error rateerrors

bits

received

transmitted

Page 78: Wireless Communications With Matlab and Simulink

Lab2: Digital Communications Fundamentals

M=4; % MQAM modulation

Fs=10^6; % symbol rate (1/sec)

PT=2; % Transmitted Power in Watts

A=1/50; % Channel Attenuation

PR=A*PT; % Received Power

Given a digital Communication System defined by the following parameters:

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

Page 79: Wireless Communications With Matlab and Simulink

Probability of Symbol Error

-5 0 5 10 15 2010-6

10-5

10-4

10-3

10-2

10-1Symbol Error Rate

Eb/No dB

Pro

b. b

it E

rror

4QAMBPSK

16QAM64QAM

Probability of Bit Error=Probability of Symbol Error / log2(M)

Page 80: Wireless Communications With Matlab and Simulink

3. Channel Models

1. Introduction and Channel Losses

2. Models of Fading Channels

3. Channel Parameterization

4. Estimation of Channel Parameters from Data

Page 81: Wireless Communications With Matlab and Simulink

1. Introduction and Channel Losses

1.1. Large Scale fading: Free Space Losses1.2. Medium Scale Fading: Shadowing1.3. Small Scale Fading: Multipath

References:

A. Goldsmith, Wireless Communications, Cambridge Univ. Press, 2005 – Chapter 2.

Page 82: Wireless Communications With Matlab and Simulink

1. Large Scale Fading: due to distance and

multipath

2. Medium Scale Fading: due to shadowing and

obstacles 3. Small Scale Fading: due to

multipath

Signal Losses due to three Effects:

Page 83: Wireless Communications With Matlab and Simulink

Wireless Channel

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.

transm

rec

PP

10log10

distancelog10

Frequencies of Interest: in the UHF (.3GHz – 3GHz) and SHF (3GHz – 30 GHz) bands;

Page 84: Wireless Communications With Matlab and Simulink

Line of Sight (LOS) only

Non Line of Sight (NOLOS)

Frequencies:

30GHz

3GHz

300MHz

UHF

SHF

6GHz

Line of Sight and Frequencies

Page 85: Wireless Communications With Matlab and Simulink

Path Loss due to Free Space Propagation:

Transmit antenna

Receive antenna

2

4rec transmP Pd

λπ

⎛ ⎞= ⎜ ⎟⎝ ⎠

wavelength cF

λ =

d

Path Loss in dB:

10 10 1010log 20log ( ( )) 20log ( ( )) 32.45transm

rec

PL F MHz d kmP

⎛ ⎞= = + +⎜ ⎟

⎝ ⎠

1.1. Large Scale Propagation: Free Space

For isotropic antennas:

Page 86: Wireless Communications With Matlab and Simulink

Free Space Attenuation

10log ( )ddistance

010d0d

decdB /20

Valid for:

• Satellite Communicationss

• Point to Point LOS Microwave

• Reference for Path Loss Models

pL

dBLp 20=Δ

100/20 2121 recrecpp PPdBLL =⇒=−

Page 87: Wireless Communications With Matlab and Simulink

Typical of open environments such as rural roads

ThRh

ThRh

TxRx

l

Tx Rx

l 1 je φ− Δ+

2 T Rx xφ πλ

+ −Δ =

l

d

• Small to medium distances constructive/distructive interference

• Large distances

monotonic

Multipath Models: Two Ray Reflection

Page 88: Wireless Communications With Matlab and Simulink

100

101

102

103

104

105

-220

-200

-180

-160

-140

-120

-100

-80

-60

-40

-20

d in meters

Pre

c/Ptr

ans in

dB

f=0.3GHz

f=3GHz

f=30GHz

Two Ray Model Power Received

40 /dB dec−independent of frequencyrec

trans

PP

4

22

dhh

PP RT

trans

rec ≈

Assume: reflecting surface a pure dielectric

Page 89: Wireless Communications With Matlab and Simulink

Free Space:

Two Ray Approximation:

ThRh

10log ( )d

pL

10110− 010210−

20dB

40dB

)(log20)4/(log20 1010 dLp +−= πλ

)(log40)(log20 1010 dhhL RTp +−=

Compare the two:

Page 90: Wireless Communications With Matlab and Simulink

2. Medium Scale Fading: Losses due to Buildings, Trees, Hills, Walls …

{ } χ+= pp LEL

The Power Loss in dB is random:

approximately gaussian with dB126−≈σ

expected value

random, zero mean

Page 91: Wireless Communications With Matlab and Simulink

00

10log10}{ LddLE p +⎟⎟⎠

⎞⎜⎜⎝

⎛= γ

Path loss exponent Reference distance

• indoor 1-10m

• outdoor 10-100m

Free space loss at reference distance

dB

Values for Exponent :

Free Space 2

Urban 2.7-3.5

Indoors (LOS) 1.6-1.8

Indoors(NLOS) 4-6

γ

Average Loss

Page 92: Wireless Communications With Matlab and Simulink

• Okumura: urban macrocells 1-100km, frequencies 0.15-1.5GHz, BS antenna 30-100m high;

• Hata: similar to Okumura, but simplified

• COST 231: Hata model extended by European study to 2GHz

Empirical Models for Propagation Losses to Environment

Page 93: Wireless Communications With Matlab and Simulink

Typical: Hata Models (1980)

Frequencies 0.15-1.5GHz

1044.9 6.55log ( )hβ = −

0 10 102

0 102

0 10 10

69.55 26.16log ( ) 13.82log ( ) ( )

2 log ( / 28) 5.4

4.78log ( ) 18.33log ( ) 40.94

T Rf h a h

f

f f

α α

α α

α α

= = + − −

= − −

= − + −

urban

suburban

rural

10log ( )d

pL

f = frequency in MHz

hT, hR = transmitter antenna elevation over average terrain (in meters)

where

Propagation Loss10log ( )pL dα β= +

( )Ra h corrective factor for receiver antenna

Page 94: Wireless Communications With Matlab and Simulink

( ) ( )10 10( ) 1.1 log ( ) 0.7 1.56log ( ) 0.8R Ra h f h f dB= − − −

( )210( ) 3.2 log (11.75 ) 4.97R Ra h h dB= −

Receiver antenna correcting factor

Small to medium city

Large city

Page 95: Wireless Communications With Matlab and Simulink

COST 231 Model: Urban Model

1044.9 6.55log ( )hβ = −

0 10 1046.3 33.9 log ( ) 13.82log ( ) ( )T Rf h a hα α= = + − −

where

Propagation Loss

10log ( )p ML d Cα β= + +

0 medium sized city and suburbs3 metropolitan areaM

dBC

dB⎧

= ⎨⎩

Restrictions: 1.5 230 2001 101 20

T

R

GHz f GHzm h m

m h mkm d km

< << <

< << <

Page 96: Wireless Communications With Matlab and Simulink

Example:

Base Station

Subscribermd 500=

TP

?=RP

Page 97: Wireless Communications With Matlab and Simulink

χγ ++⎟⎟⎠

⎞⎜⎜⎝

⎛= 0

010log10 L

ddLpChannel:

dB

dBLmd

63451

0

0

====

σγ

Transmitted Power:

dBmWatt 300.1 =

Received Power: χχ +−=++××−=−= dBmLP pR 96)45500log310(3030 10

Bandwidth: 10MHz

Noise:

Given:

HzdBmN /1740 −= thermal

Noise at the Receiver: dBmPNoise 10410log10174 710 −=+−=

Then:

SNR at the receiver: dBSNR χχ +=−−+−= 8)104(96random

Page 98: Wireless Communications With Matlab and Simulink

Probability that the SNR is sufficiently large

( ) ⎟⎠

⎞⎜⎝

⎛==> ∫+∞ ⎟

⎠⎞

⎜⎝⎛−

σσπχ σ

221

21

2

21 aerfcdxeaP

a

x

Where we define ∫+∞

−=x

t dtexerfc22)(

π( ) ( ) ⎟

⎟⎠

⎞⎜⎜⎝

⎛ −=>+=>

628

218 aerfcaPaSNRP χ

BPSK: a=3dB 16QAM: a=14.7dB

-1 -0.5 0 0.5 1 1.5 20

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1(1/2)erfc(x)

x

75.0

10.0

Required for low BER:

16QAM 10% of the time

BPSK 75% of the time

Page 99: Wireless Communications With Matlab and Simulink

3. Small Scale Fading due to Multipath.

a. Spreading in Time: different paths have different lengths;

time

Transmit Receive

0( ) ( )x t t tδ= −

0t

0( ) ( ) ...k ky t h t tδ τ= + − − +L

1τ 2τ 3τ0t

2138

100 10 sec3 10c

τ μ= = =×

Example for 100m path difference we have a time delay

Page 100: Wireless Communications With Matlab and Simulink

Typical values channel time spread:

channel

0( ) ( )x t t tδ= −

1τ 2τ MAXτ0t

0t

1

Indoor 10 50 secSuburbs 2 10 2 secUrban 1 3 secHilly 3-10 sec

μμ

× −−

Page 101: Wireless Communications With Matlab and Simulink

b. Spreading in Frequency: motion causes frequency shift (Doppler)

time

time

Transmit Receive

Frequency (Hz)

Doppler Shift

v

cf

2( ) cj f tTx t X e π=

( )2( ) cj f f tRy t Y e π +Δ=

for each path

cf f+ Δ

Page 102: Wireless Communications With Matlab and Simulink

time

Transmit Receive

v

Put everything together

time

2 ( )( )( ) Re ( ) kc kj F tF

kk ky t x t ea τπτ + −Δ⎧ ⎫

= −⎨ ⎬⎩ ⎭∑

Each path has … …shift in time …

…shift in frequency …

… attenuation…

(this causes small scale time variations)

)(tx )(ty

paths

Page 103: Wireless Communications With Matlab and Simulink

2. Models of Fading Channels

2.1. Statistical Models of Fading Channels2.2. Non Line of Sight (Rayleigh) and Line of Sight (Rice) Channels2.3. Simulink Example

Page 104: Wireless Communications With Matlab and Simulink

2.1 Statistical Models of Fading Channels

Several Reflectors:

TransmitReceive

v

( )x t

( ) ( )y t y t= ∑ ll

each reflector has several paths all with different time delays and doppler shifts

Page 105: Wireless Communications With Matlab and Simulink

For each path with NO Line Of Sight (NOLOS):

vr

( )y tl

τ laverage time delay

2 ( ( ))( ) Re ( )c kkj F tk k

F

k

y t a e x tπ τ ε τ ε+ − −Δ⎧ ⎫⎛ ⎞= − −⎨ ⎬⎜ ⎟⎝ ⎠⎩ ⎭∑ l

l l

• each time delay

• each doppler shift

kτ ε+l

cos( )k kF v θλ

Δ =

Page 106: Wireless Communications With Matlab and Simulink

{ }

2 2 ( ) 2

2

( ) Re ( )

Re ( ) ( )cos(2 ) ( )sin(2 )

k k kc c

c

j t j F j F t

k

j F tI c Q c

kF

kFy t e ea x t e

r t e r t F t r t F t

τπ π π

π

τ

π π

− +Δ Δ⎧ ⎫⎛ ⎞= −⎨ ⎬⎜ ⎟⎝ ⎠⎩ ⎭

= = −

In Phase and Quadrature Components

( )2 ( )2( ) ( ) ( ) ( )c k kk j F Fj F tI Q k

k

r t r t jr t a e e x tπ τ επ τ− +Δ +Δ= + ≅ −∑ l

l

Assume ( ) ( )kx t x t ε≅ −… leading to this:

( ) ( ) ( )r t c t x t τ= −l l

with( )2 ( )2( ) c k kk j F Fj F t

kk

c t a e e π τ επ − +Δ +Δ= ∑ l

l

Some mathematical manipulation …

random, time varying

Page 107: Wireless Communications With Matlab and Simulink

Statistical Model for the time varying coefficients( )2 cos 2 ( cos )

1

( ) k k kcv vM j t j F

kk

c t a e eπ π τλ λ

θ θ ε− + +

=

= ∑ l

l

randomrandom

{ ( )} 0E c t =l kθsince random uniformly distributed in [0,2 ]π

{ } 2 cos* 2

1

( ) ( ) {| | } kvM j t

kk

E c t c t t E a eπ θλ

− Δ

=

+ Δ = ∑l l

By the CLT is gaussian with:( )c tl

Assume

Then

2{| | }kPE aM

= l

{ } 2 cos 2 cos*

1

1( ) ( ) kv vM j t j t

k

E c t c t t P e P E eM

π θπ θλ λ

− Δ − Δ

=

⎧ ⎫+ Δ = = ⎨ ⎬

⎩ ⎭∑l l l l

22 cos

00

1 (2 )2

vj t

DP e d P J F tπ

πλ

θθ π

π− Δ

= = Δ∫l l

Page 108: Wireless Communications With Matlab and Simulink

Each coefficient is complex, gaussian, WSS with autocorrelation

{ }*0( ) ( ) (2 )DE c t c t t P J F tπ+ Δ = Δl l l

( )c tl

And PSD2

2 1 if | |( ) 1 ( / )

0 otherwise

DD D

P F FFS F F Fπ

⎧ <⎪= −⎨⎪⎩

l

l

with maximum Doppler frequency.DF

)(FSl

DF F

This is called Jakesspectrum.

Page 109: Wireless Communications With Matlab and Simulink

Bottom Line. This:

time

v

time

)(tx )(ty

1τ1( )c t

τ l( )c tl

Nτ( )Nc t

L

L

( )y t∑)(tx

… can be modeled as:

delays

τ lNτ

time time

time

Page 110: Wireless Communications With Matlab and Simulink

For each path

)()( tgPtc ll =

• unit power

• time varying (from autocorrelation)• time invariant

• from power distribution

Page 111: Wireless Communications With Matlab and Simulink

Parameters for a Multipath Channel (No Line of Sight):

Time delays: [ ]Lτττ L21 sec

Power Attenuations: [ ]LPPP L21 dB

Doppler Shift: DF Hz

Page 112: Wireless Communications With Matlab and Simulink

Non Line of Sight (NOLOS) and Line of Sight (LOS) Fading Channels1. Rayleigh (No Line of Sight).

Specified by:

Time delays

Power distribution

],...,,[ 21 NT τττ=

],...,,[ 21 NPPPP =

Maximum Doppler DF

0)}({ =tcE l

2. Ricean (Line of Sight) 0)}({ ≠tcE l

Same as Rayleigh, plus Ricean Factor

Power through LOS

Power through NOLOS

TotalLOS PK

KP+

=1

TotalNOLOS PK

P+

=1

1

K

Page 113: Wireless Communications With Matlab and Simulink

-K-

TransmitterGain

B-FFT

SpectrumScope

RectangularQAM

Rectangular QAMModulatorBaseband

-K-

Receiver Gain

RayleighFading

Multipath RayleighFading Channel

-K-ChannelAttenuation

Bernoull iBinary

Bernoulli BinaryGenerator

Simulink Example

Rayleigh Fading Channel Parameters

M-QAM Modulation

Bit Rate

Page 114: Wireless Communications With Matlab and Simulink

Set Numerical Values:

modulation

power

channel

CD FcvF =Recall the Doppler Frequency:

carrier freq.

sec/103 8 m×

velocity

Easy to show that: ( ) ( ) ( )GHzChkmHzD FvF /≈

Page 115: Wireless Communications With Matlab and Simulink

Typical Received Power Spectrum

-K-

TransmitterGain

B-FFT

SpectrumScope

RectangularQAM

Rectangular QAMModulatorBaseband

-K-

Receiver Gain

RayleighFading

Multipath RayleighFading Channel

-K-ChannelAttenuation

Bernoull iBinary

Bernoulli BinaryGenerator

2/SF2/SF−

HzFD 70=

MHzFS 10=

MHzFb 20=

2 (QPSK)

Doppler freq:

Symbol rate:

Bit rate:

Bits/Symbol:

Page 116: Wireless Communications With Matlab and Simulink

Similar Example, different parameters

-K-

TransmitterGain

B-FFT

SpectrumScope

RectangularQAM

Rectangular QAMModulatorBaseband

-K-

Receiver Gain

RayleighFading

Multipath RayleighFading Channel

-K-ChannelAttenuation

Bernoull iBinary

Bernoulli BinaryGenerator

2/SF2/SF−

HzFD 2=

MHzFS 10=

MHzFb 20=

2 (QPSK)

Doppler freq:

Symbol rate:

Bit rate:

Bits/Symbol:

Page 117: Wireless Communications With Matlab and Simulink

Channel Parameterization

1. Time Spread and Frequency Coherence Bandwidth

2. Flat Fading vs Frequency Selective Fading

3. Doppler Frequency Spread and Time Coherence

4. Slow Fading vs Fast Fading

Page 118: Wireless Communications With Matlab and Simulink

Recall that the Channel Spreads in Time (due to Multipath):

channel

0( ) ( )x t t tδ= −

MAXτ0t

RMSτ

0

10−

20−

Received Power

time

15c

RMS

1. Time Spread and Frequency Coherence Bandwidth

FT

frequencyCoherence Bandwidth

Channel “Flat” up to the Coherence Bandwidth

Page 119: Wireless Communications With Matlab and Simulink

2. Flat Fading vs Frequency Selective Fading

• Based on Channel Time Spread:

Signal Bandwidth

Frequency CoherenceSignal Bandwidth <>

Frequency Selective Fading

Flat Fading

F FFrequency coherence

Just attenuation, no distortion

Distortion!!!

F

15c

RMS

Page 120: Wireless Communications With Matlab and Simulink

Example: Flat Fading

Channel : Delays T=[0 10e-6 15e-6] secPower P=[0, -3, -8] dBSymbol Rate Fs=10kHzDoppler Fd=0.1HzModulation QPSK

Spectrum: fairly uniform

Very low Inter Symbol Interference (ISI)

Page 121: Wireless Communications With Matlab and Simulink

Example: Frequency Selective Fading

Channel : Delays T=[0 10e-6 15e-6] secPower P=[0, -3, -8] dBSymbol Rate Fs=1MHzDoppler Fd=0.1HzModulation QPSK

Spectrum with deep variations

Very high ISI

Page 122: Wireless Communications With Matlab and Simulink

3. Doppler Frequency Spread and Time Coherence

CT

⎫⎪⎪⎪⎬⎪⎪⎪⎭

same response( )x t ( )y t

916C

D

TFπ

≈Coherence Time: Max Doppler

different response

∑=

−=M

txtcty1

)()()(l

ll τ

)()( ttctc Δ+≅ ll DC FTt /1|| <≤Δif

Page 123: Wireless Communications With Matlab and Simulink

4. Slow Fading vs Fast Fading

• Based on Doppler Spread Delay and Time Coherence:

Symbol period

Time CoherenceSymbol period <>

Slow Fading

Fast Fading

Time coherence

t t

Channel quickly changing

Channel almost time invariant

916C

D

TFπ

Page 124: Wireless Communications With Matlab and Simulink

Time Spread

Frequency Spread ),( FtS

F

t

RMSτ

DF

Summary of Time/Frequency spread of the channel

Frequency Coherence

15c

RMS

Time Coherence

916C

D

TFπ

≈meanτ

Page 125: Wireless Communications With Matlab and Simulink

Channel Estimation from Data

1. Recall Impulse Response Identification from Correlation

2. Estimation of Time Spread and Doppler Shift

3. Simulink/Matlab Example

4. Stanford University Interim (SUI) Channel Models

Page 126: Wireless Communications With Matlab and Simulink

Estimation of Channel Characteristics from Input - Output data.

1. For Linear Time Invariant (LTI) systems:

][nx ][ny][nh ∑

+∞

−∞=

−==m

knxkhnxnhny ][][][*][][

Excite the system with white noise and unit variance

{ } ][][][][ * mmnxnxEmRxx δ=−=m

and compute the crosscorrelation between input and output

{ }{ } ][][][][][][

][][][

*

*

mhkmkhmnxknxEkh

mnxnyEmR

kk

yx

=−=−−=

−=

∑∑∞+

−∞=

∞+

−∞=

δ

Page 127: Wireless Communications With Matlab and Simulink

In matlab:

x

y

][nx ][ny?

1. Get data (same length for simplicity):

2. Compute crosscorrelation between input and output:

h=xcorr(x,y);

If x[n] is white noise, h[n] is the impulse response.

Page 128: Wireless Communications With Matlab and Simulink

2. For a Linear Time Varying Channel:

][nx ][ny],[ nmh ∑

+∞

−∞=

−=k

knxnkhny ][],[][

Known:

1. Sampling frequency

2. Upper bound on max Doppler FrequencysF

maxDF

Page 129: Wireless Communications With Matlab and Simulink

1. Collect Data and partition in blocks of length :

xy

L

LminDs TTN <<×

maxD

s

FFN <<

xN=reshape(x,N,length(x)/N);

yN=reshape(x,N,length(y)/N);[ ]L NxN,yN=

2. Estimate impulse response in each block

0=n Nn = Nn 2= Nn l=

hN=xcorr(xN,yN);LhN= [

Nnnmh

l=],[

l

m

BN

BN

]

L

L

NNn B ×=

Page 130: Wireless Communications With Matlab and Simulink

3. Compute Power Spectrum on each row, to determine time variability of the channel (If the channel is Time Invariant all columns of hN are the same):

hN= [Nn

nmhl=

],[

l

mL

L

S=fft(hN’);

S=S’.*conj(S’);S= [ ],[ kmS

(time) m(freq.) k

]

]N

BN

Page 131: Wireless Communications With Matlab and Simulink

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

sFmt /= B

s

NNFkf )/(

=

StSf

Frequency Resolution: HzNN

FFB

S

)length(sec data total1

Therefore if we want to a resolution in the doppler spread of (say) 1Hz, we need to collect at least 1 sec of data.

Time Resolution: SFt /1=Δ

Page 132: Wireless Communications With Matlab and Simulink

Example: % channelFs=10^6; % sampling freq. In HzP=[0,-2,-3]; % attenuations in dBT=[0, 10, 15]*10^(-6); % time delays in secfd=70; %doppler shift in Hz

y

To Workspace1

x

To Workspace

RectangularQAM

Rectangular QAMModulatorBaseband

RayleighFading

Multipath RayleighFading Channel

BernoulliBinary

Bernoulli BinaryGenerator

test_scattering.mdl

Page 133: Wireless Communications With Matlab and Simulink

Channel Freq. Response:

Page 134: Wireless Communications With Matlab and Simulink

-1.5 -1 -0.5 0 0.5 1

x 10-4

0

1

2

3

4

5

6

7

8

9x 10-3 Time Spread

time (sec)

-1000 -800 -600 -400 -200 0 200 400 600 800 10000

0.2

0.4

0.6

0.8

1

1.2x 10

-3 Frequency Spread

frequency (Hz)

Time Spread

Hz70+Hz70−

Frequency Spread

sec15μ

St(t)

Sf(f)

[St, Sf,t,f]=scattering(x,y,Fs,Tmax, FDmax);Tmax=10^(-4) sec;

FDmax=150Hz;

Page 135: Wireless Communications With Matlab and Simulink

Stanford University Interim (SUI) Channel Models

Extension of Work done at AT&T Wireless and Erceg etal.

Three terrain types:

• Category A: Hilly/Moderate to Heavy Tree density;

• Category B: Hilly/ Light Tree density or Flat/Moderate to Heavy Tree density

• Category C: Flat/Light Tree density

Six different Scenarios (SUI-1 – SUI-6).

Found in

IEEE 802.16.3c-01/29r4, “Channel Models for Wireless Applications,”http://wirelessman.org/tg3/contrib/802163c-01_29r4.pdf

V. Erceg etal, “An Empirical Based Path Loss Model for Wireless Channels in Suburban Environments,” IEEE Selected Areas in Communications, Vol 17, no 7, July 1999

Page 136: Wireless Communications With Matlab and Simulink

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 dopplerfrequency 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.

Lab 3

Page 137: Wireless Communications With Matlab and Simulink

4. Multi Carrier Modulation and OFDM

1. Single Carrier and Multi Carrier Modulation

2. Orthogonal Frequency Division Multiplexing (OFDM)

3. Example: basics of IEEE 802.11a (WiFi)

Page 138: Wireless Communications With Matlab and Simulink

Single Carrier and Multi Carrier Modulation

1. Transmission of Data through Frequency Selective and Time Varying Channels

2. Single Carrier Modulation in Flat Fading Channels

3. Single Carrier Modulation in Frequency Selective Channels

4. Simulink Example of Single Carrier Modulation

5. The Multi Carrier Approach

Page 139: Wireless Communications With Matlab and Simulink

1. Transmission of Data Through Frequency Selective Time VaryingChannels

We have seen a wireless channel is characterized by time spread and frequency spread.

Time Spread

Frequency Spread ),( FtS

F

t

MAXt

MAXF

Page 140: Wireless Communications With Matlab and Simulink

2. Single Carrier Modulation in Flat Fading Channels:

• if symbol duration >> time spread then there is almost no Inter Symbol Interference (ISI).

1 0 time

channel

1 0phase still recognizable

ST

Problem with this: Low Data Rate!!!

Page 141: Wireless Communications With Matlab and Simulink

• this corresponds to Flat Fading

Frequency Frequencychannel

ST/1Flat Freq. Response

Frequency

Page 142: Wireless Communications With Matlab and Simulink

3. Single Carrier Modulation in Frequency Selective Channels:

• if symbol duration ~ time spread then there is considerable Inter Symbol Interference (ISI).

1 0time

channel

? ?phase not recognizable

Page 143: Wireless Communications With Matlab and Simulink

One Solution: we need equalization

1 0time

channel equalizer

1 0time

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

Page 144: Wireless Communications With Matlab and Simulink

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)

1 0

time channel

time

time

0

0

1

1

“symbol” “symbol”

Page 145: Wireless Communications With Matlab and Simulink

Compare Single Carrier and Multi Carrier Modulation

Frequency Frequency

channel

0 1 0 1 1 1

Block of symbols

subcarriers

Each subcarrier sees a Flat Fading

Channel: Easy Demod

MC

Frequency

1One symbol

Frequency

Flat Fading Channel: Easy Demod

SC

101 1 LL

0 1 0 1 1 1 LL

Page 146: Wireless Communications With Matlab and Simulink

Orthogonal Frequency Division Multiplexing (OFDM)

1. Basic Structure of Multi Carrier Modulation

2. “Orthogonal” Subcarriers and OFDM

3. Generating the OFDM Symbol using the IFFT

Page 147: Wireless Communications With Matlab and Simulink

In MC modulation each “MC symbol” is defined on a time interval and it contains a block of data

gT bT

SymbolT

data interval

t

guard interval

( )

⎪⎭

⎪⎬

⎪⎩

⎪⎨

⎧=

⎪⎭

⎪⎬

⎪⎩

⎪⎨

⎧= ∑∑

−=

Δ

−=

Δ+2

2

222

2

2 ReRe)(F

F

C

F

F

C

N

Nk

Ftkjk

tFj

N

Nk

tFkFjk ecAeecAts πππ

SymbolTt ≤≤0

L Ltime

OFDM Symbol

data datadatadata

data

data

Page 148: Wireless Communications With Matlab and Simulink

•Each data point is modulated by a subcarrier

cFcF− 2BW

cF − 2BW

cF +2BW

cF +−2BW

cF −−carrier

F

|)(| FS FkFF Ck Δ+=

FNBW F Δ×=

kc

0,2

,...,2

, ≠−=Δ+= kNNkFkFF FFCk

•Subcarrier is not used since its magnitude and phase would be influenced by the carrier

0=kCF

Page 149: Wireless Communications With Matlab and Simulink

L L

L L

}

the “guard time” is long enough, so the multipath in one block does not affect the next block

TX

RX

NO Inter Symbol Interference!

Data BlockData Block

TX RX

We leave a “guard time”between blocks to allow multipath

gTGuard Time

bT

SymbolTdata+guard

Page 150: Wireless Communications With Matlab and Simulink

∑=

≠−=

−Δ=2

20

)(2)(FN

FN

g

k

kk

TtFkjkecAtx π

Modulated Signal:frequencycarrier =CF

data=kc

offsetfrequency subcarrier=ΔFk

SymbolTt ≤≤0

{ })(Re)( 2 txets tFj cπ=

Baseband Complex Signal:

just a gain

CFCF− F

FT

F

FT

Page 151: Wireless Communications With Matlab and Simulink

Limitations of OFDM

bT

SymbolT

t

data

guardT

bguard TT <<

Overhead (no data)

•To minimize overhead

ie the longer the data frame the better!

•The Guard Time (or Cyclic Prefix) does not carry data and therefore it represents a loss of power

symbol

b

guardsymbol

guardb

bdata P

TT

PTT

TP

⎟⎟⎠

⎞⎜⎜⎝

⎛+

=+

=1

1

Page 152: Wireless Communications With Matlab and Simulink

However, as expected, the channel (not the sky!) is the limit.

Time Spread

Frequency Spread ),( FtS

F

t

secμ≈MAXt

kHzFMAX <

OFDM Symbol Duration: MAXb tT >>

OFDM Freq. Spacing: MAXS F

NFF >>=Δ

Are these two compatible?

to minimize CP overhead

to ensure orthogonality

Since we have: bS

S

TNTNF 11

== MAXbMAX FTt /1<<<<sec10 6− sec10 3− roughly!!!

Page 153: Wireless Communications With Matlab and Simulink

2. “Orthogonal” Subcarriers and OFDM

gT bT data intervalt

guard interval

FCF

FΔbT

F 1=Δ

FkFF Ck Δ+=

⎩⎨⎧

≠=

== ∫∫+

Δ−+

l

lll

kk

dteT

dteeT

bb

k

Tt

t

Ftkj

b

Tt

t

tFjtFj

b if 0 if 111 0

0

0

0

)(222 πππ

Choose:

Orthogonality:

Page 154: Wireless Communications With Matlab and Simulink

)(tht0

tFjk

keFH π2)(

0

transient response

bg TT +

bgg TTtT +≤≤

still orthogonal at the receiver!!!

Since the channel is Linear and Time Invariant (at least for the duration of the frame), the exponentials are still orthogonal at the receiver in steady state, ie after the transient has died.

tFj ke π2

tFj ke π2

gT

steady state response

bg TT +

Transmitted subcarrier channel

Received subcarrier

Page 155: Wireless Communications With Matlab and Simulink

Each OFDM symbol is generated in discrete time.

Let

• be the sampling frequency;

• be the number of data samples in each symbol;

• the subcarriers spacing

• A=1/N

Then:

SF

( ) NFTNF SS //1 ==Δ

∑∑−=

−=

−==

Δ 2

2

)(2

2

)(2 211)(F

F

N

F

F

sFF

N

Nk

Lnjkk

N

Nk

LnkjkS ec

Nec

NnTx

ππ1,..,0 −+= NLn

FNN >

With the guard time.Sg TLT ×=

Page 156: Wireless Communications With Matlab and Simulink

SS FT /1=t0 gT

L

bT

FNN >

Sampling Interval

guard data

OFDM Symbol: discrete time

TIME:

NFF S /=Δ

FNFN SF

2−

Freq spacing

FREQUENCY:2/SF2/SF−

NFN SF

2

0

4. Generating the OFDM symbol using the IFFT

# samples# subcarriers

Sampling Frequency BandwidthFS >

Page 157: Wireless Communications With Matlab and Simulink

This can be written as

{ }][][1

11

1][

1

0

1

2

)(2

1

2

2

2

22

2

kXIFFTekXN

ecN

ecN

ecN

Lnx

N

k

njk

Nk

nkNjk

N

k

njkk

N

Nk

njkk

N

F

N

F

N

F

F

N

∑∑

=

−=

+

=

−=

==

+=

=+

π

ππ

π

otherwise ,0][2/,...,1 ,][

2/,...,1 ,][

=−−==+

==

kXNkckNX

NkckX

Fk

Fk

Where:positive subcarriers

negative subcarriers

Page 158: Wireless Communications With Matlab and Simulink

][][ nNxnx +=

{ }1,...,0],[]1[],...,[ −==−+ NkkXIFFTNLxLx

N

0 L 1−+ NL

43421 43421

CP from the periodicity:

]1[]1[...

]1[]1[][]0[

−+=−

+==

NLxLx

NxxNxx

Guard Time with Cyclic Prefix (CP)

IFFT{ X }CP

Page 159: Wireless Communications With Matlab and Simulink

M IFFT

k n

0 0

1−N

0

0

0

1c 1

( )2/FNM

2/FNc

1−N

( )2/FNN −

M1−c

2/FNc−

data

1−N

M

][Lx

]1[ −+ NLx

M

OFDM Symbol

]1[]1[ −+=− LNxLx

][]0[ Nxx =

MCyclic Prefix

Page 160: Wireless Communications With Matlab and Simulink

Summary of OFDM

… and relevant parametersChannel (given parameters):

1. Max Time Spread t_MAX in sec

2. Doppler Spread F_D in Hz

3. Bandwidth BW in Hz

OFDM (design parameters):

1. Sampling Frequency Fs>BW in Hz

2. Cyclic Prefix L > t_MAX * Fs, integer

3. FFT size (power of 2) 4*L<N<<Fs/F_D, integer

4. Number of Carriers NF=[N*BW/Fs], integer

Page 161: Wireless Communications With Matlab and Simulink

Test in Simulation:

][nh

][nw

OFDM TX

OFDM RX

]0[mX

][kX m

]1[ −NX m

]0[mY

][kYm

]1[ −NYm

M

M

M

M

m-th data block

(data, pilots and nulls) ⎪

⎪⎩

⎪⎪⎨

Recall that for every transmitted block of data we receive

][][][][ kWkXkHkY mmmm +=

With the frequency response of the channel within the time block][kHm

In order to estimate we need to know the channel.][kX m

Page 162: Wireless Communications With Matlab and Simulink

A way to avoid it is to use differential encoding:

][kdmData: ][][][ 1 kXkdkX mmm −=

Delay one

frame

][1 kX m−

With QPSK it is equivalent to accumulating the phase

][][][ 1 kdkXkX mmm ∠+∠=∠ −

Page 163: Wireless Communications With Matlab and Simulink

][][][][

][][][][

][][ˆ1111

kdkWkXkH

kWkXkHkY

kYkd mmmm

mmm

m

mm ≅

++

==−−−−

Provided:

a. The channel changes slowly

b. High SNR

0][][ 1 ≠≅ − kHkH mm

At the receiver

][kdm

Delay one

frame

][1 kYm−

][kYm

div

Page 164: Wireless Communications With Matlab and Simulink

Lab 4: Single Carrier vs. OFDM Modulation

Goal: In this Lab we want to compare Single Carrier (SC) modulation with Orthogonal Frequency Division Multiplexing (OFDM), with Differential Modulation .

1. Using the Simulink model test_SC.mdl see the received signal for various values of the symbol rate

kHzFS 0.2000,0.200,0.20,0.2=

As the symbol rate increases, notice the effect of Inter Symbol Interference in the scattering plot.

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.

Page 165: Wireless Communications With Matlab and Simulink

Example: IEEE 802.11a (WiFi)

1. Parameters

2. Simulink Example

3. “Frame based” and “Sample based”signals

Page 166: Wireless Communications With Matlab and Simulink

Parameters of IEEE802.11a:

Channel (given parameters):

1. Max Time Spread t_MAX=0.5 microsec

2. Doppler Spread F_D=50Hz

3. Bandwidth BW=16MHz

OFDM (design parameters):

1. Sampling Frequency Fs=20MHz

2. Cyclic Prefix L=16 > 0.5*20=10

3. FFT size (power of 2) N=64<<20e06/50

4. Number of Carriers NF=52=[64*16/20]

Page 167: Wireless Communications With Matlab and Simulink

Sub-carriers: (48 data + 4 pilots) + (12 nulls) = 64

01

26

38

63

M

M

M

NULL

NULL

0

63

M

M

M

M

Frequency Time

1c

26c

26−c

1−c

0x

63x

IFFT

Pilots at: -21, -7, 7, 21

52=FN 64=N

Page 168: Wireless Communications With Matlab and Simulink

k2638( )64 26−

20 / 64 312.5F MHz kHzΔ = =

( )F MHz

LL

8.1258.125−

CARRIERF)(MHzF

MHz25.16

DATA

Frequencies:

sTMHz /120 =

163 Subcarriers index

10−CARRIERF 10+CARRIERF

Page 169: Wireless Communications With Matlab and Simulink

Time Block:

sec2.3 μ=FFTT

sec105064/ 9−×== FFTs TT

sec8.0 μ=GT

sec0.4 μ=FRAMET

time

Page 170: Wireless Communications With Matlab and Simulink

Overall Implementation (IEEE 802.11a with 16QAM).

1. Map encoded data into blocks of 192 bits and 48 symbols:

data Encode Interleave

…010011010101…

Buffer (192 bits)

111001111000

1101

4x48=192 bits

Map to 16QAM

…48

4

+1+j3-1+j+3-j3

…+1-j

al

48

Page 171: Wireless Communications With Matlab and Simulink

Overall Implementation (IEEE 802.11a with 16QAM).

2. Map each block of 48 symbols into 64 samples

[ ]mX k

+1+j3…-3-j

+3-j3…

+1-j

M

01

2627

6427 +−M

M6426+−

M

[0]mx

IFFT

012

6362

time domainfrequency domainnull

null⎩⎨⎧

⎩⎨⎧

⎩⎨⎧

24 data 2 pilots

24 data 2 pilots

⎭⎬⎫

⎭⎬⎫ M

LLk1 2626−

641+−

1−

[ ]ma l [ ]mx n1: 48=l 0 : 63k = 0 : 63n =

[1]mx

[62]mx[63]mx

Page 172: Wireless Communications With Matlab and Simulink

Simulink Example

To make it simpler:

1. let the number of carrier be the same as the FFT length, ieN=NF;

2. Use Differential QPSK Encoding and Decoding, so that we do not need to estimate the channel’s frequency response.

Page 173: Wireless Communications With Matlab and Simulink

Initial Callback function:

% OFDM parameters (IEEE802.11a)Fs=20e6; % symbol data rate (uncoded) in HzN=64; % FFT sample sizeL=16; % Cyclic Prefix sample length

% Channel Parameters% 1. Doppler SpreadFC=5.0; % carrier freq. in GHzv=50; % speed in km/hFD=v*FC; % doppler freq in Hz

%2. Time Spreadtau=[0, 0.1, 0.4]*1e-6; % time delays in secondsP=[0, -2, -4]; % attenuations in dB

% Additive NoiseSNRdB=20; % dB

Page 174: Wireless Communications With Matlab and Simulink

Simulink Implementation of OFDM IEEE802.11a

Recall how we compute the IFFT at the Modulator

01

26

38

63

M

M

M

NULL

NULL

0

63

M

M

M

M1d

26d

27d

52d

)1(x

)64(xIFFT

Block of 52 data points (data + pilots)

CP

)49(x

)64(x)1(x

)64(x

Block of 80 samplesIN:

OUT:

M

M

MRecall: vectors in

Matlab begin at n=1

Page 175: Wireless Communications With Matlab and Simulink

Vector operations.

OFDM Modulator:

52 data points

(include the pilots)

26

26

1

110

0

IFFT

64

ADD CP

80

Split Data

26

2652

Transmitted FrameConcatenate in a vector

Page 176: Wireless Communications With Matlab and Simulink

OFDM Modulator:

Simulink > Commonly Used Blocks > demux

Simulink > Math Operations > Matrix Concatenate

Simulink > Signal Routing > Selector

repeat last 16 entries

[49:64, 1:64]

Page 177: Wireless Communications With Matlab and Simulink

OFDM Demodulator:

80

Remove CP

26

26

1

11

FFT

64

Concatenate in a vector

26

2652

Received FrameReceived Data

Page 178: Wireless Communications With Matlab and Simulink

Simulink > Signal Routing > Selector

Signal Processing > Signal Management > Signal Attributes

demuxSimulink > Math Operations > Matrix Concatenate

Simulink > Commonly Used Blocks > Terminator

Page 179: Wireless Communications With Matlab and Simulink

Put Everything Together:

Differential enc/dec

M=4 (QPSK)

f_D=doppler freq.

Page 180: Wireless Communications With Matlab and Simulink

3. “Frame based” and “Sample based”

In Simulink a signal can be

• Frame based

• Sample based

This is particularly important when the signals are vectors.

• Some blocks want the input to be Frame based, others want it Sample based, others don’t care

• When you have to process a large number of data, it is more efficient to process blocks of samples, using Frames, rather than one sample at a time.

Page 181: Wireless Communications With Matlab and Simulink

Frame Based [Nx1]

N

“Frame based”

Each vector is part (a “frame”) of the same signal

Page 182: Wireless Communications With Matlab and Simulink

Sample Based [Nx1]

N

“Sample based”

There are N different signals. Each element of the vector belongs to a different signal.

Page 183: Wireless Communications With Matlab and Simulink

Typical Example: the FFT block

FFT To Frame

[Nx1] [Nx1] [Nx1]

frame sample frame

Page 184: Wireless Communications With Matlab and Simulink

IEEE 802.16 Standard

IEEE 802.16 2004:

Part 16: Air Interface for Fixed Broadband Wireless Access SystemsFrom the Abstract:

• It specifies air interface for fixed Broadband Wireless Access (BWA) systems supporting multimedia services;

• MAC supports point to multipoint with optional mesh topology;

• multiple physical layer (PHY) each suited to a particular operational environment:

Page 185: Wireless Communications With Matlab and Simulink

IEEE 802.16-2004 Standard

• WirelessMAN-SC, Single Carrier (SC), Line of Sight (LOS), 10-66GHz, TDD/FDD

• WirelessMAN-SCa, SC, 2-11GHz licensed bands,TDD/FDD

• WirelessMAN OFDM, 2-11GHZ licensed bands,TDD/FDD

• WirelessMAN-OFDMA, 2-11GHz licensed bands,TDD/FDD

• WirelessHUMAN 2-11GHz, unlicensed,TDD

MAN: Metropolitan Area Network

HUMAN: High Speed Unlicensed MAN

Table 1 (Section 1.3.4) Air Interface Nomenclature:

Page 186: Wireless Communications With Matlab and Simulink

IEEE 802.16e 2005:

Part 16: Air Interface for Fixed and Mobile Broadband Wireless Access Systems

Amendment 2: Physical and Medium Access Control Layers for Combined Fixed and Mobile Operation in Licensed Bands

and

Corrigendum 1

Scope (Section 1.1):

• it enhances IEEE 802.16-2004 to support mobility at vehicular speed, for combined fixed and mobile Broadband Wireless Access;

• higher level handover between base stations;

• licensed bands below 6GHz.

Page 187: Wireless Communications With Matlab and Simulink

IEEE 802.16-2004: Reference Model (Section 1.4), Figure 1

By Layers:

Service Specific Convergence Sublayer (CS)

CS-SAP SAP=Service Access Point

MAC Common Part Convergence Sublayer (CS)

MAC-SAP

Security Sublayer

Physical Layer

PHY-SAP

MAC

PHY

Section 5

Section 6

Section 7

Section 8

External Data

Page 188: Wireless Communications With Matlab and Simulink

Parameters for IEEE 802.16 (OFDM only)

(1,2,4,8)x1.75MHz(1,4,8,12)x1.25MHz8.75MHz

(1,2,4,8)x1.75MHz(1,4,8,12)x1.25MHz8.75MHz

Channel BandwidthTDD or FDDTDD or FDDDuplexing

1Mbps-75Mbps1Mbps-75MbpsTransmission RateQPSK, 16QAM, 64QAMQPSK, 16QAM, 64QAMModulation

OFDM: 256OFDMA: 128, 256, 512,1024, 2048

OFDM: 256OFDMA: 2048

OFDM carriers

2GHz-11GHz fixed2GHz-6GHz mobile

2GHz-11GHzFrequency Band

802.16e-2005802.16-2004

Page 189: Wireless Communications With Matlab and Simulink

randomization

dataError

CorrectionCoding

TX

IEEE802.16 Structure

M-QAM mod

OFDM mod

De-rand.

data Error CorrectionDecoding

RXM-QAM dem

OFDM dem

3/45/6

2/31/2

Coding rates

1664

42

M-QAM

10242048

512256

OFDM carriers

Choices:

10 MHz…

5 MHz1.25 MHz

Channel B/width

Page 190: Wireless Communications With Matlab and Simulink

OFDM and OFDMA (Orthogonal Frequency Division Multiple Access)

• Mobile WiMax is based on OFDMA;

• OFDMA allows for subchannellization of data in both uplink and downlink;

• Subchannels are just subsets of the OFDM carriers: they can use contiguous or randomly allocated frequencies;

• FUSC: Full Use of Subcarriers. Each subchannel has up to 48 subcarriers evenly distributed through the entire band;

• PUSC: Partial Use of Subcarriers. Each subchannel has subcarriers randomly allocated within clusters (14 subcarriers per cluster) .

Page 191: Wireless Communications With Matlab and Simulink

Section 8.3.2: OFDM Symbol Parameters and Transmitted Signal

OFDM Symbol

gT bT

sT

dataguard

(CP)

Cyclic Prefix has a variable length. It represents a loss of

( ))/(log10 gbbCP TTTL +=

1 1 1 1, , ,4 8 16 32

g

b

TT

=

Page 192: Wireless Communications With Matlab and Simulink

An OFDM Symbol is made of

• Data Carriers: data

• Pilot Carriers: synchronization and estimation

• Null Carriers: guard frequency bands and DC (at the modulating carrier)

channel

frequency

pilots data

Guard band

Guard band

to provide frequency guards between channels

1 (DC subcarrier is always zero)

pilots for channel tracking and synchronization

data subcarriers

guards

nulls guards

pilots

data

used pilots dat

N

N N

N

NN N N

=

= +

=

=

= + a

Page 193: Wireless Communications With Matlab and Simulink

Recall the OFDM symbol is of the form

⎪⎭

⎪⎬

⎪⎩

⎪⎨

⎧= ∑

=

≠−=

−Δ2

20

)(22Re)(usedN

usedN

gc

k

kk

Ttfkjk

tfj ecets ππ

cfcf− 2BW

cf − 2BW

cf +2BW

cf +−2BW

cf −−

carrier

f

|)(| fS

Page 194: Wireless Communications With Matlab and Simulink

153676838496192N_data

1668242128N_pilots

346174862056N_nulls

1702850426108200N_used

20481024512128256FFT size

OFDM Subcarrier Parameters:

Fixed WiMax

444444 3444444 21

Fixed and Mobile WiMax

Page 195: Wireless Communications With Matlab and Simulink

In 802.16 2004 we have200256

==

used

FFT

NN

fNF FFTs Δ=

2sF

2sF

− 2BW

2BW

sFFT

usedused F

NNfNBW =Δ=

Sampling frequency

Bandwidth

Since we want the sampling rate to be integer multiple of a fixed rate (say 8kHz), the formula for the sampling rate is

( ) 000,8000,8/ ××= BWnfloorFs

With n a factor (Table 213) of the order 200256,

5057,

275316,

125144,

7586,

78

≈=n

Frequency Spacing bTf /1l_lengthdata_symbo/1 ==Δ

Page 196: Wireless Communications With Matlab and Simulink

IEEE 802.16, with N=256

0

100

155

255

MM

M13

38

88

63

168

218

193

243

101

M

][ Lnx +][kX0

255

IFFT

datapilots

nulls12

24

24

24

12

12

12

24

24

24

↓k

↓n

156

Page 197: Wireless Communications With Matlab and Simulink

Implementation of WiMax 2004 in Simulink

NFFT=256

NCP=64

Data in 192x1

Page 198: Wireless Communications With Matlab and Simulink

5. Error Correcting Coding

1. Channel Capacity and Error Correction Coding

2. Block Coding

3. Code Shortening and Puncturing

4. Simulink Implementation of Block Codes

5. Convolutional Codes

6. Simulink Implementation of Convolutional Codes

7. Concatenated Codes in IEEE802.16

Page 199: Wireless Communications With Matlab and Simulink

1. Channel Capacity and Error Correction Coding

1.1 Channel Capacity

1.2 Error Correction Coding

1.3 Minimum SNR Requirement and Shannon Limit

Page 200: Wireless Communications With Matlab and Simulink

1. Channel Capacity

Problem: given a AWGN Channel, defined in terms of

• Signal to Noise Ratio (SNR)

• Bandwidth B

and a desired Bit Error Rate (BER),

what is the maximum data rate we can transmit?

channel..01010110…

Errors!

..01010010…MOD DEM

noise

Transmitted Received

Page 201: Wireless Communications With Matlab and Simulink

( )SNRBC += 1log2 bits/sec

Significance: if the transmitted data rate R<C then we can always find a coding scheme to make the bit error rate arbitrarily small.

Define the Channel Capacity:

Example:

SNRdB=20dB

B=10MHz⇒ ( ) sec/5.66101log10 10/20

27 MbitsC =+=

Problem: How do we encode the data to obtain an acceptable error rate?

Use Error Correction Coding!

Page 202: Wireless Communications With Matlab and Simulink

2. Error Correction Coding

Purpose: detect and Correct Errors by adding redundant information.

How to Define an Encoder:

• code rate

uR ue RR >encoder

data rate

1<=e

uc R

Rr

cr

• number of errors corrected

Encoded data rate

bits of # totalerrorin bits #

=BER

Page 203: Wireless Communications With Matlab and Simulink

Relation to Channel Capacity

CCRu <encoder

crchannel

SNR

Cdecoder

cr

uRBERGiven

• a data rate

•a desired Bit Error Rate (BER) arbitrarily small

you can always find a code with coding rate

1<≤CRr u

c

CRu <

with desired BER.

Page 204: Wireless Communications With Matlab and Simulink

Clearly the Complexity goes up with the coding rate.

cr16/15

Code Complexity

$$$

code rate

Example: see two situations with the same and 510−=BER

A. Convolutional Encoder with rate

B. Block Code (65520, 61425) low density parity check, with coding rate

2/1=cr

dBNEb 4/ 0 ≈

1615

6552061425

==cr

2/1

Page 205: Wireless Communications With Matlab and Simulink

For a given Coding Rate, what is the minimum we can have?0/ NEb

dBNEb 6.1

0

−>

3. Minimum SNR Requirements

-2 -1 0 1 2 3 4 5 6 7 80

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1Shannon Limit

EbN0 dB

codi

ng ra

te

dB6.1−

Notice: always!!!

Page 206: Wireless Communications With Matlab and Simulink

2. Block Coding

2.1 Parameters of Block Codes

2.2 Probability of Error

2.3 Reed Solomon Codes (non binary data)

2.3 Simulink Implementation

Page 207: Wireless Communications With Matlab and Simulink

1. Parameters of Block Codes

encoder

raw data encoded data

k symbols n> k symbols

Code Rate nkrc =

),,( tkn

It encodes k blocks of data symbols into n blocks of encoded symbols:

Parameters: ),,( tkn

Max. number of errors corrected⎟⎠⎞

⎜⎝⎛ −

≤2

1mindfloort

1min +−≤ kndwhere Minimum distance between codewords

Page 208: Wireless Communications With Matlab and Simulink

codewordsnon -codewords

L

L

mind

tA

B

C

D

A

transmitreceive decode

channel decoderC A

D B Error !!!

wheretADdtACd

>≤

),(),(

Page 209: Wireless Communications With Matlab and Simulink

If the code corrects up to t errors, the probability that the wrong codeword is decoded is given by

( ) 2/

1

min)1(4)12()1( dkn

tj

jnje pppp

jn

P −−≤−⎟⎟⎠

⎞⎜⎜⎝

⎛≤ ∑

+=

“j” bits wrong“n-j” bits right

with p the probability of error for one bit.

( )0/2 NEQp c=For BPSK, QPSK: bc EnkE Bit Coded ofEnergy ==

2. Probability of Error

kPpp

jn

jP en

tj

jnjb ≈−⎟⎟

⎞⎜⎜⎝

⎛≈ ∑

+=

1)1(

Bit Error Probability for HDDcodeword error

bits per codeword

Page 210: Wireless Communications With Matlab and Simulink

4 5 6 7 8 9 10 11-7

-6.5

-6

-5.5

-5

-4.5

-4

-3.5

-3

-2.5

-2

Eb/N0 dB

log1

0(P

rob

of e

rror)

Probability of Error: BPSK coded and uncoded

Some Probabilities of Error for BPSK:

Uncoded

Golay (24,12,3)

BCH (127,64,10)

Page 211: Wireless Communications With Matlab and Simulink

⎟⎟⎠

⎞⎜⎜⎝

⎛ −=

22 kfloort

m

Good for Burst Error Correction at relatively high SNR

3. Reed Solomon Codes (non Binary Data)

Example: (255,239,8)

239 symbols 255 symbols RS

( )tkn ,,12 −= mn

coded symbols k<n uncodedsymbols

errors corrected

1 symbol = m bits

239 symbols= 16

data parity

Page 212: Wireless Communications With Matlab and Simulink

Based on polynomials:

RSuncoded block

coded block

]1[],...,0[ −kuu ]1[],...,0[ −ncc

1]1[...]1[]0[)( −−+++= kXkuXuuXu 1]1[...]1[]0[)( −−+++= nXncXccXc

)()()( XuXgXc =)(Xu

)(Xg

encoder

)(Xeerrors

)()()( )()()(

XeXuXgXeXcXy+=

+=)()(

XgXy)(Xu

)(Xe

quotient

remainder

Page 213: Wireless Communications With Matlab and Simulink

3. Code Shortening and Puncturing

3.1 Code Shortening

3.2 Code Puncturing

3.3 RS Coding in IEEE802.16

Page 214: Wireless Communications With Matlab and Simulink

1. Code Shortening

Start with a block code, say RS (n=255, k=239, t=8).

We can generate a different code by Shortening:

1. Shortened to k’ data bytes by adding 239-k’ null symbols

2. At the output eliminate the corresponding 239-k’ terms

k’ (255, 239,8) 16 00000

239 symbols

k’ 00000

255 symbols

(k’+16,k’,8)k’ k’ 16

Page 215: Wireless Communications With Matlab and Simulink

By shortening Reed Solomon (255,239,8) we obtain codes

( ),8,',16' kk +

All these codes correct up to 8 errors (bytes).

239'0 ≤< k

(k’+16,k’,8)k’ k’ 16

Page 216: Wireless Communications With Matlab and Simulink

By puncturing we eliminate L parity bytes to obtain a code correcting 8-T errors. Therefore we determine L from

( ) TLTLTkN 282

1682

=⇒−=−

⇒−=−}bytesparity

2. Code Puncturing

Page 217: Wireless Communications With Matlab and Simulink

Puncturing Reed Solomon Codes

1. The last 16 bytes are parity bytes

2. For a code, correcting 8-T errors, just eliminate the first 2T bytes of the parity check.

( )TkTk −−+ 8,',216'

( )8,',16' kk +Code:

( ),8,',16' kk + 239'0 ≤< k

(k’+16,k’,8)k’ k’ 16

(k’+16,k’,8-T)k’ k’( )TkTk −−+ 8,',216'16-2T parity

Page 218: Wireless Communications With Matlab and Simulink

RS codes used in IEEE802.16:

(32,24,4)

(40,36,2)

(64,48,8)

(80,72,4)

(108,96,6)

(120,108,6)

k’=24, T=4

k’=36, T=6

k’=48, T=0

k’=72, T=4

k’=96, T=2k’=108, T=2

( )TkTk −−+ 8,',216'

Page 219: Wireless Communications With Matlab and Simulink

4. Simulink Implementation of Block Codes

4.1 Shortened Codes

4.2 Punctured Codes

Page 220: Wireless Communications With Matlab and Simulink

Simulink Implementation of Shortened RS Codes

Let’s implement the code (52,36,8) by shortening

1. Shortened to k’=36 data bytes (=36x8=288 bits) by adding 239-k’null symbols at the beginning of the block

2. At the output eliminate the first 239-k’ terms

36

20336239 =−

52

203255239

RSbits to symbols

symbols to bits

8 bits/symbol 8 bits/symbol

288 bits416 bits

Page 221: Wireless Communications With Matlab and Simulink

RS EncoderRaw data 288 bits Encoded data

416 bits

Page 222: Wireless Communications With Matlab and Simulink

RS DecoderRaw data 288 bits Received data

416 bits

Page 223: Wireless Communications With Matlab and Simulink

Put Everything together:

Page 224: Wireless Communications With Matlab and Simulink

It is easier to create subsystems:

RS encoder

RS decoder

MQAM Mod

MQAM DemodChannel

Select each group of blocks and use

Edit > Create Subsystem

It cannot be undone!

Page 225: Wireless Communications With Matlab and Simulink
Page 226: Wireless Communications With Matlab and Simulink

Masked Subsystems

In Simulink we can create customized blocks, where we can enter parameters values.

Example: Reed Solomon Encoder and Decoder

data

'n

encodeddata

RS Encoder

RS Decoder

datablock

Page 227: Wireless Communications With Matlab and Simulink

[239-k+1:255]

RS Encoder:

1. edit

2. right click on subsystem and select Mask Subsystem

3. Edit Mask:

add parameters

Page 228: Wireless Communications With Matlab and Simulink

You can customize the icon

When you “click” on the icon, you get the following:

the two parameters from previous slide

Page 229: Wireless Communications With Matlab and Simulink

RS Decoder:

2. right click on subsystem and select Mask Subsystem

3. Edit Mask:

Page 230: Wireless Communications With Matlab and Simulink

Simulink Implementation of (40,36,2).

1. Start with the previous code (52,36,8);

2. Puncture it by eliminating 2T=12 (ie T=6) bytes in the parity

Page 231: Wireless Communications With Matlab and Simulink

RS (40,36,2) encoder

RS (40,36,2) decoder

Sequence Operations>Puncture

same vector

Sequence Operations>Insert Zero

Eliminate last 12 bytes

Insert 12 zeros

Page 232: Wireless Communications With Matlab and Simulink

Convolutional Encoders

1. Definition of Convolutional Encoders

2. Puncturing

3. Simulink Implementation

Page 233: Wireless Communications With Matlab and Simulink

Convolutional Encoders

M Mk nCC

LL

L LnkRate

raw data

Coded data

It continuously updates k data symbols into n>k coded symbols.

Page 234: Wireless Communications With Matlab and Simulink

Example: a 2/3 encoder

1−z 1−z 1−z 1−z

1−z 1−z 1−z

1x

2x

1y

2y

3y

Page 235: Wireless Communications With Matlab and Simulink

Polynomial description:

1−z 1−z 1−z 1−z

1−z 1−z 1−z

1x

2x

1y

2y

3y

[ ] [ ] ⎥⎦

⎤⎢⎣

⎡=

232221

13121121321 aaa

aaaxxyyy

1 1 1

1 1 1 1

1 1

1 1 1

0 0

0 0

0

0

23)011()10( 8811 ==→ a

35)101()11( 8812 ==→ a

5)101()0( 8822 ==→ a

13)011()1( 8823 ==→ a

Page 236: Wireless Communications With Matlab and Simulink

[ ] [ ] ⎥⎦

⎤⎢⎣

⎡=

135003523

21321 xxyyy

Therefore the code is described by the matrix (all entries are octal)

no connection 31 yx →

no connection 12 yx →

The parameters are then:

CONSTRAINED_LENGTH = [4,3]

CODEGENERATOR=[23,35,0; 0,5,13]

which call the function “poly2trellis”

Page 237: Wireless Communications With Matlab and Simulink

In IEEE802.16e the Convolutinal Code has rate ½ and constrained length 7:

1−z 1−z 1−z 1−zx

1y

2y

1−z 1−z

],[],[ 2121 aaxyy =

7length dconstraine133)011()011()1(171)001()111()1(

8882

8881

=====

aa

Page 238: Wireless Communications With Matlab and Simulink

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

( ) ( ) ( )( ) ( ) ( ) 1550110111

1171110011

8882

8881

====

gg

Page 239: Wireless Communications With Matlab and Simulink

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:

KK ],[, nx KK ],[],[, 21 nynyencoder

Page 240: Wireless Communications With Matlab and Simulink

KK ],[],1[, nxnx − KK ],[],[],1[],1[, 2121 nynynyny −−

encoder

Rate 2/3:

We can represent it as a matrix with 2 rows:

⎥⎦

⎤⎢⎣

⎡=

1101

P

KK ],[],[],1[],1[, 2121 nynynyny −−1

1

0

1

Since:

Page 241: Wireless Communications With Matlab and Simulink

KK ],[],1[],2[, nxnxnx −−KK ],[],[],1[],1[],2[],2[, 212121 nynynynynyny −−−−

encoder

Rate 3/4:

We can represent it as a matrix with 2 rows:

⎥⎦

⎤⎢⎣

⎡=

011101

P

1

1

0

1

Since:

KK ],[],[],1[],1[],2[],2[, 212121 nynynynynyny −−−−1

0

Page 242: Wireless Communications With Matlab and Simulink

KK ],[],1[],2[],3[],4[, nxnxnxnxnx −−−−

KK ],[],[],1[],1[],2[],2[],3[],3[],4[],4[, 2121212121 nynynynynynynynynyny −−−−−−−−

encoder

Rate 5/6:

We can represent it as a matrix with 2 rows:

⎥⎦

⎤⎢⎣

⎡=

0101110101

P

1

1

0

1

Since:1

0KK ],[],[],1[],1[],2[],2[],3[],3[],4[],4[, 2121212121 nynynynynynynynynyny −−−−−−−−

0 1

01

Page 243: Wireless Communications With Matlab and Simulink

Simulink Implementation

Page 244: Wireless Communications With Matlab and Simulink

Implementation of Concatenated Codes using SimulinkAWGN_RSCC_masked.mdl

Page 245: Wireless Communications With Matlab and Simulink

Variable DataRates with Concatenated Codes in IEEE802.16

• 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.

Page 246: Wireless Communications With Matlab and Simulink

Recall from previous units:

kRS

encoderCC

encoderRSn n

Raw Data in Encoded Data out

RS parameters CC parameters

• encoder/decoder

• reduction

• puncturing

Page 247: Wireless Communications With Matlab and Simulink

Zero Pad

RS (255,239,8)

select puncturek

239 255 16+kTknRS 216−+=

]0,...,0,1,...,1[=RSp321 321

Tk 216−+ T2

RS Encoder

k

( )TkTk −−+ 8,,216

Page 248: Wireless Communications With Matlab and Simulink

Convolutional Encoder with coding rate

RSn CC [171,133] puncture

RSn2

CC

RS

rnn =

CCr

]0,1,1,0,0,1,1,0,1,1[,6/5]0,1,1,0,1,1[,4/3

]1,0,1,1[,3/2]1,1[,2/1

========

PrPrPrPr

CC

CC

CC

CC

Page 249: Wireless Communications With Matlab and Simulink

By combining the two codes we obtain a number of data rates (section 8.3.3.2 of the standard):

5/6(120,108,6)3/4144108646

3/4(108,96,6)2/314496645

5/6(80,72,4)3/49672164

2/3(64,48,8)1/29648163

5/6(40,36,2)3/4483642

2/3(32,24,4)1/2482441

1/2(12,12,0)1/2241220

CC coding

rate

RS CodeCoding rate k/n

Coded block n(bytes)

Data block k(bytes)

M-QAM

Rate ID

Page 250: Wireless Communications With Matlab and Simulink

Example:

take Rate_ID=2

36RS

encoderCC

encoder

40 486/5

40=

Raw Data in

Encoded Data out

RS parameters CC parameters

5/6(40,36,2)3/4483642

CC coding rate

RS CodeCoding rate k/n

Coded block n(bytes)

Data block k(bytes)

M-QAMRate ID

]0,...,0,1,...,1[=RSp321 321

40621636 =×−+ 1262 =×

36=k]0,1,1,0,0,1,1,0,1,1[=CCp

Page 251: Wireless Communications With Matlab and Simulink

This yields a table of parameters for each “Rate_ID”:

5/6144[1,1,0,1,1,0,0,1,1,0][ones(1,120),zeros(1,4)]108646

3/4144[1,1,0,1,1,0][ones(1,108),zeros(1,4)]96645

5/696[1,1,0,1,1,0,0,1,1,0][ones(1,80),zeros(1,8)]72164

2/396[1,1,0,1]148163

5/648[1,1,0,1,1,0,0,1,1,0][ones(1,40),zeros(1,12)]3642

2/348[1,1,0,1][ones(1,32),zeros(1,8)]2441

1/224[1,1]No RS1220

CC coding

rate

Coded block n(bytes)

Data block

k(bytes)

M-QAM

Rate ID RSp CCp

Page 252: Wireless Communications With Matlab and Simulink

All parameters can be computed from the

matlab program coding.m

Page 253: Wireless Communications With Matlab and Simulink

The Coding Rates and the MQAM modulation parameters are designed in such a way that, in all cases

symbolsMn 192

)(2log*8

=

Row Data Block

k

RS

Coded Data Block

nRS

MQAM

Symbol Block

From Data Source To IFFT

CC

Coded Data Block

nbytes:

Page 254: Wireless Communications With Matlab and Simulink

In all cases of NFFT=256,512,1024,2048 the number of data symbols transmitted is a multiple of 192.

Recall this table:

153676838496192N_data

1668242128N_pilots

346174862056N_nulls

1702850426108200N_used

20481024512128256FFT size

2x192 4x192 8x192

Page 255: Wireless Communications With Matlab and Simulink

Put Everything together for IEEE802.16 2004 with AWGN Channel

WiMax256.mdl

Page 256: Wireless Communications With Matlab and Simulink

IEEE802.16 Implementation

In addition to OFDM Modulator/Demodulator and Coding we need

• Time Synchronization: to detect when the packet begins

• Channel Estimation: needed in OFDM demodulator

• Channel Tracking: to track the time varying channel (for mobile only)

In addition we need

• Frequency Offset Estimation: to compensate for phase errors and noise in the oscillators

• Offset tracking: to track synchronization errors

Page 257: Wireless Communications With Matlab and Simulink

Basic Structure of the Receiver

WiMax Demodulator

Demodulated Data

Received Signal

Time Synchronization: detect the beginning of the packet and OFDM

symbol

Channel Estimation: estimate the frequency

response of the channel

Page 258: Wireless Communications With Matlab and Simulink

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 Second OFDM Symbol

320 samples 320 samples

L

4 repetitions of a short pulse+CP

64

2 repetitions of a long pulse + CP

64 64 64 64 128 128

dTgTdTgT

64

Time Synchronization

Page 259: Wireless Communications With Matlab and Simulink

The standard specifies the Down Link preamble as QPSK for subcarriers between -100 and +100:

⎩⎨⎧ ++−−=±±

=otherwise ,0

100,...,1,1,...,100 ,1][

kjkPALL

Using the periodicity of the FFT:

100,...,1],[ =kkPALL

1 100 156 255

1,...,100],256[][ −−=+= kkPkP ALLALL

Page 260: Wireless Communications With Matlab and Simulink

64 64 64 64

][4 kP ][4 np

0 255

L

0 4 8 252 255

FFT

• Short Preamble, to obtain the 4 repetitions, choose only subcarriers multiple of 4:

⎩⎨⎧ =

=otherwise ,0

04mod if ],[2][

*

4kkP

kP ALL

Add Cyclic Prefix:

64 64 64 64

0 319

64

255

][4 np

Page 261: Wireless Communications With Matlab and Simulink

• Long Preamble: to obtain the 2 repetitions, choose only subcarriers multiple of 2 :

⎩⎨⎧ =

=otherwise ,0

02mod if ],[2][2kkPkP ALL

128

][2 kP ][2 np

0 255

L

0 4 8 252 255

FFT

2254

6

128

Add Cyclic Prefix:

64

0 319

][2 np

128 12843421

CP

Page 262: Wireless Communications With Matlab and Simulink

Several combinations for Up Link, Down Link and Multiple Antennas.

We can generate a number of preambles as follows:

⎩⎨⎧ =

=otherwise ,0

02mod if ],[2][02

kkPkP ALL

⎩⎨⎧ =

=otherwise ,0

12mod if ],[2][12

kkPkP ALL

⎩⎨⎧ =−+

=otherwise ,0

4mod if ],2[][

*

4mkmkP

kP ALLm

⎩⎨⎧ =

=otherwise ,0

04mod if ],[2][

*0

4kkP

kP ALL

3,2,1=m

0=m

With 2 Transmitting Antennas:

With 4 Transmitting Antennas:

Page 263: Wireless Communications With Matlab and Simulink

Time Synchronization from Long Preamble

preamble OFDM Symbols

64 128 128 L

Received signal:

128−zxcorr

][ny⎟⎠

⎞⎜⎝

⎛−−×⎟

⎞⎜⎝

⎛−

−−−=

∑∑

==

=127

0

2127

0

2

2127

0

*

2

]128[][

]128[][][

ll

l

ll

ll

nyny

nynynry

0nCompute Crosscorrelation Coefficient:

1. Coarse Time Synchronization using Signal Autocorrelation

Page 264: Wireless Communications With Matlab and Simulink

Time Synchronization from Long Preamble

preamble OFDM Symbols

64 128 128 L

Received signal:

128−zxcorr

][ny⎟⎠

⎞⎜⎝

⎛−−×⎟

⎞⎜⎝

⎛−

−−−=

∑∑

==

=127

0

2127

0

2

2127

0

*

2

]128[][

]128[][][

ll

l

ll

ll

nyny

nynynry

0nCompute Autocorrelation :

1. Coarse Time Synchronization using Signal Autocorrelation

Page 265: Wireless Communications With Matlab and Simulink

1

][2 nry

0n n

MAX when]128[][ −= nyny

][ny

64 128 128 L0n

]128[ −ny

64 128 128 L

n

n

Effect of Periodicity on Autocorrelation:

640 −n

Page 266: Wireless Communications With Matlab and Simulink

][ny

2127

0

* ]128[][∑=

−−−l

ll nyny

⎟⎠

⎞⎜⎝

⎛−−⎟

⎞⎜⎝

⎛− ∑∑

==

127

0

2127

0

2 ]128[][ll

ll nyny

Compute it in Simulink:

][2 nry

1Sync

u2

SquareProduct1

Product

max

MinMax

u2

MathFunction Divide

DF FIR

Digital Filter2

DF FIR

Digital Filter

z-128

Delay1

z-128

Delay

-C-

Constant

u

Conj.>= 0.8

CompareTo Constant

|u|

Abs1

|u|

Abs

1In1

Page 267: Wireless Communications With Matlab and Simulink

Example: perfect channel (no spread in time)

64

][nry

The packet begins somewhere in here

Page 268: Wireless Communications With Matlab and Simulink

2. Fine Time Synchronization using Cross Corelation with Preamble

xcorr

][ny

][np ⎟⎠

⎞⎜⎝

⎛⎟⎠

⎞⎜⎝

⎛−

−=

∑∑

==

=127

0

2127

0

2

2127

0

*

][][

][][][

ll

lyp

pny

pnynr

ll

ll

Since the preamble is random (almost like white noise), it has a short autocorrelation:

][ny

64 128 128 L0n

n

n128

0 127

][np

0n1280 −n

][2 nryp

1

Page 269: Wireless Communications With Matlab and Simulink

… with dispersive channel

xcorr

][ny

][np ⎟⎠

⎞⎜⎝

⎛⎟⎠

⎞⎜⎝

⎛−

−=

∑∑

==

=127

0

2127

0

2

2127

0

*

][][

][][][

ll

lyp

pny

pnynr

ll

ll

Since the preamble is random, almost white, recall that the crosscorrelation yields the impulse response of the channel

][ny

64 128 128 L0n

n

n128

0 127

][np

0n1280 −n

][nryp

1

|][| nh

Page 270: Wireless Communications With Matlab and Simulink

Compare the two (non dispersive channel):

yr

ypr

Autocorrelation of received data

Crosscorrelation with preamble

Page 271: Wireless Communications With Matlab and Simulink

Synchronization with Dispersive Channel

Let L be the length of the channel impulse response

L−64

Channel impulse response

Page 272: Wireless Communications With Matlab and Simulink

In order to determine the starting point, compute the energy on a sliding window and choose the point of maximum energy

][nryp

1

xcorr

][ny

][npΣ

n

∑−

=

−=1

0][][

M

kyp knrnc

][nc

][nryp

Maximum energy

][nc

M=max length of channel = length of CP

1+−Mn

Page 273: Wireless Communications With Matlab and Simulink

][nryp

xcorr

][ny

][npΣ

][nc

Impulse response of channel

Example

Page 274: Wireless Communications With Matlab and Simulink

Σ][nc

Auto correlation

Cross correlation

][np

][ny

max

Page 275: Wireless Communications With Matlab and Simulink

Autocorrelation (saw previously)

Cross correlation

Sum

Detect MAX

Page 276: Wireless Communications With Matlab and Simulink

][nh

][nw

OFDM TX

OFDM RX

]0[mX

][kX m

]1[ −NX m

]0[mY

][kYm

]1[ −NYm

M

M

M

M

][kX m][][][][ kWkXkHkY mm +=

][kH

][kW

m-th data block

⎪⎪⎩

⎪⎪⎨

Channel Estimation

Recall that, at the receiver, we need the frequency response of the channel:

Transmitted: Received:

channel freq. response

Page 277: Wireless Communications With Matlab and Simulink

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

]0[Y

64 128 128Received Preamble:

Estimated initial time

256 samplesL

FFTL

]255[Y][kY

255,...,0],[][][][ =+= kkWkXkHkY p

Page 278: Wireless Communications With Matlab and Simulink

255,...,0],[][][][ =+= kkWkXkHkY p

Solve for using a Wiener Filter (due to noise):

22

*

|][|

][][][ˆ

wp kX

kXkYkH preamble

σ+=

noise covariance

][kH

Problem: when we cannot compute the corresponding

frequency response

0][ =kX p

][kH

Fact: by definition,

jkX p ±±= 1][254,...,158,156

100,...,4,2==

kk

if

0][ =kX potherwise (ie DC, odd values, frequency guards)

Page 279: Wireless Communications With Matlab and Simulink

Two solutions:

1. Compute the channel estimate

22

*

|][|

][][][ˆ

wp kX

kXkYkH preamble

σ+=

only for the frequencies k such that

0][ ≠kX p

and interpolate for the other frequencies. This might not yield good results and the channel estimate might be unreliable;

k

LL

known

interpolate

Page 280: Wireless Communications With Matlab and Simulink

2. Recall the FFT and use the fact that we know the maximum length L of the channel impulse response

][][2][][][ *1

0

2* kXkWenhkXkY p

L

n

nN

jk

p +⎟⎟⎠

⎞⎜⎜⎝

⎛= ∑

=

−π

][][][][ kWkXkHkY p +=

Since the the preamble is such that either or 0|][| =kX p 2|][| =kX p

For the indices where we can write:

254,...,158,156100,...,4,2

==

kkfor

so that we have 100 equations and L=64 unknowns.

This is solved by a matrix multiplication ( )*pinv YXFh =

164× 1100×

2|][| =kX p

Page 281: Wireless Communications With Matlab and Simulink

Data in

Trigger when preamble is detected

Channel Estimate out

Simulink Implementation

][ny

][kY

][* kX p

][nh

][kH

Page 282: Wireless Communications With Matlab and Simulink

Example:

Spectrum of Received Signal

Estimated Frequency Response of Channel

NOT TO SCALE

As expected, it does not match in

the Frequency Guards

Page 283: Wireless Communications With Matlab and Simulink

WiMax-2004 Demodulator

WiMax256.mdl

data

Ch.

Start after processing preamble

Standard OFDM Demod (256 carriers)

Error Correction Decoding

Page 284: Wireless Communications With Matlab and Simulink

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

139 ++ mk

with [ ] 2,1,03mod exsymbol_ind ==m

⎪⎪⎩

⎪⎪⎨

====

=

128for 11,...,0512for 47,...,01024for 95,...,02048for 191,...,0

FFT

FFT

FFT

FFT

NNNN

k

Page 285: Wireless Communications With Matlab and Simulink

nulls

DC (null)

pilotsdatanulls

OFDM Symbol

m

subcarrierk0 1 4 7 L

Page 286: Wireless Communications With Matlab and Simulink

Expand the Demodulator

Page 287: Wireless Communications With Matlab and Simulink

Demodulator

Channel tracking

Page 288: Wireless Communications With Matlab and Simulink

Multiple Antenna Systems (MIMO)

TX RXM M

TN RNTransmit Antennas

Receive Antennas

M M

RT NN ×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

Page 289: Wireless Communications With Matlab and Simulink

Receive Diversity:

TXRXM

1=TN RNTransmit Antennas

Receive Antennas

M

RN

Different paths

s

1y

RNy

⎥⎥⎥

⎢⎢⎢

+⎥⎥⎥

⎢⎢⎢

=⎥⎥⎥

⎢⎢⎢

RRR N

S

NN w

wNsE

h

h

y

yMMM

1

0

11

1h

RNh

Noise PSDEnergy per symbol

Page 290: Wireless Communications With Matlab and Simulink

Assume we know the channels at the receiver. Then we can decode the signal as

∑∑∑===

+==RRR N

iii

N

iiS

N

iii whNshEyhy

1

*0

1

2

1

* ||

signal noise

and the Signal to Nose Ratio

01

2||NEhSNR S

N

ii

R

⎟⎟⎠

⎞⎜⎜⎝

⎛= ∑

=

Page 291: Wireless Communications With Matlab and Simulink

Now there are two possibilities:

1. Channels strongly correlated. Assume they are all the same for simplicity

hhhhRN ==== ...21

In the Wireless case the channels are random, therefore is a random variable∑=

RN

iih

1

2||

Then

22

2

1

2 |||| χRR

N

ii NhNh

R

==∑=

and

( )0

22

0

2

21||

NEN

NEhNSNR S

RS

R ⎟⎠⎞

⎜⎝⎛== χ

assuming { } 1|| 2 =hE

Page 292: Wireless Communications With Matlab and Simulink

{ }0N

ENSNREm SRSNR ==

{ }02

varNENSNR SR

SNR ==σ

better on average …

… but with deep fades!

From the properties of the Chi-Square distribution:

Define the coefficient of variation

21

var ==SNR

SNR

mσμ

In this case we say that there is no diversity.

Page 293: Wireless Communications With Matlab and Simulink

Recall the Chi-Square distribution:

2ny χ=

222

21 ... nxxxy +++=

...,)1,0( diirealNxi ≈

1. Real Case. Let

Then

nynyE

2}var{}{

==

with

222

1ny χ=

222

21 ||...|||| nxxxy +++=

...,)1,0( diigaussiancomplexCNjbax iii ≈+=

2. Complex Case. Let

Then

ny

nyE

21}var{

}{

=

=with

Page 294: Wireless Communications With Matlab and Simulink

2. Channels Completely Uncorrelated.

22

1

2

21||

R

R

N

N

iih χ=∑

=

01

2||NEhSNR S

N

ii

R

⎟⎟⎠

⎞⎜⎜⎝

⎛= ∑

=

Since:

0

222

1NESNR S

NR⎟⎠⎞

⎜⎝⎛= χ

with{ }

0NENSNRE S

R=

{ }02

varNENSNR SR=

RSNR

SNR

Nm 21

var ==σμ

Diversity of order RN

Page 295: Wireless Communications With Matlab and Simulink

0 20 40 60 80 100 120 140 160 180 200-25

-20

-15

-10

-5

0

5

10

15

Example: overall receiver gain with receiver diversity.

1=RN

2=RN

10=RN

Page 296: Wireless Communications With Matlab and Simulink

Transmitter Diversity

TX RXM

TN1=RN

Transmit Antennas Receive

Antennas

M

TN

Different paths

s

y

1h

RNh

wNshNEy

TN

ii

T

S0

1+⎟

⎟⎠

⎞⎜⎜⎝

⎛= ∑

=

Total energy equally distributed on transmit antennas

Equivalent to one channel, with no benefit.

Page 297: Wireless Communications With Matlab and Simulink

However there is a gain if we use Space Time Coding.

Take the case of Transmitter diversity with two antennas

TX RX

][ny

1h

2h

][1 nx

][2 nx

Given two sequences

code them within the two antennas as follows

][],[ 21 nsns

n2 12 +n

1s

2s

*2s−*1s

1x2x

( ) 1022112]2[ wNshshEny S ++=

( ) 20*12

*212

]12[ wNshshEny S ++−=+

Page 298: Wireless Communications With Matlab and Simulink

This can be written as:

⎥⎦

⎤⎢⎣

⎡+⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡−

=⎥⎦

⎤⎢⎣

⎡+ *

2

10

2

1*1

*2

21* 2]12[

]2[ww

Nss

hhhhE

nyny S

To decode, notice that

( )*

1 1 121 20**

2 2 22 1

[2 ]|| || || ||

[2 1] 2Sz s wy nh h E h N h

z s wy nh h⎛ ⎞⎡ ⎤⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎡ ⎤

= = +⎜ ⎟⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎜ ⎟+− ⎣ ⎦⎣ ⎦ ⎣ ⎦ ⎣ ⎦⎣ ⎦ ⎝ ⎠

%

%

Use a Wiener Filter to estimate “s”:

( )( )]12[]2[ˆ

]12[]2[ˆ*

1*21

*2

*11

+−=

++=

nyhnyhKs

nyhnyhKs

S

S

ENhhE

K/2||||

/2

02

22

1 ++=with

Page 299: Wireless Communications With Matlab and Simulink

It is like having two independent channels

1z1s

2s

2||||2

hES

2||||2

hES

2z

0 1|| ||N h w%

0

2

2||||

NEhSNR S=

Apart from the factor ½, it has the same SNR as the receive diversity of order 2.

0 2|| ||N h w%

24

22

21

2

21|||||||| χ=+= hhh

Page 300: Wireless Communications With Matlab and Simulink

WiMax Implementation

1h

2h

Base Station

Subscriber Station

Down Link (DL): BS -> SS Transmit Diversity

Uplink (UL): SS->BS Receive Diversity

Page 301: Wireless Communications With Matlab and Simulink

Down Link: Transmit Diversity

Use Alamouti Space Time Coding:

Error Coding

Data inM-QAM buffer

nX

Block to be transmitted

mX 2

12 −mX

STC

IFFT TX

IFFT TX

m2 12 +m

mX 2

12 −mX

*12 −− mX

*2mX

Space Time Coding

time

Transmitter:

Page 302: Wireless Communications With Matlab and Simulink

Error Correction

Data outM-QAM

Un-

buffer

nX mX 2

12 −mX

STD

FFT RX

FFT RX

Receiver:

mY2

12 +mY

( )( )][][][][][ˆ

][][][][][ˆ*

1212*212

*1222

*12

kYkHkYkHKkX

kYkHkYkHKkX

mmm

mmm

+−

+

−=

+=

S

S

ENkHkHE

K/2|][||][|

/2

02

22

1 ++=with

Space Time Decoding:

For each subcarrier kcompute:

Page 303: Wireless Communications With Matlab and Simulink

Preamble, Synchronization and Channel Estimation with Transmit Diversity (DL)

The two antennas transmit two preambles at the same time, using different sets of subcarriers

12812864

CP

L L

k100− 100−0

128

128

12864

CP

128

EVEN subcarriers

ODD subcarriers

][0 np

][1 np

++

+-

n0 319

timefrequency

Page 304: Wireless Communications With Matlab and Simulink

Both preambles have a symmetry:

]128[][]128[][

11

00

−−=−=

npnpnpnp

319,...,128=n

][0 nh

][1 nh

][ny

][0 np

][1 np

received signal from the two antennas

Problems:

• time synchronization

• estimation of both channels

Page 305: Wireless Communications With Matlab and Simulink

One possibility: use symmetry of the preambles

][ny128−z

][*][2][ 111 npnhny =

+

+

+−

][*][2][ 000 npnhny =

0n

64 256 1280 +n

64 128

1280 +n

64 128

The two preambles can be easily separated

Page 306: Wireless Communications With Matlab and Simulink

MIMO Channel Simulation

Take the general 2x2 channel

3ϕje

4ϕje

1ϕje

2ϕje

Rayleigh

Rayleigh

][1 nx

][2 nx

][1 ny

][2 ny

dBPPP N

N

][sec][

1

1

L

L

== τττ

10 ≤≤ Tρ

10 ≤≤ Rρ Correlation at the receiver

Correlation at the transmitter

Page 307: Wireless Communications With Matlab and Simulink

OFDM Transceiver

IFFTM M P/S

I

Q

LPF

LPFMOD BPF MOD BPF

IFF C IFF F−

Power Amp

DAC

DAC

oscillator

BPFDEMBPFFFTM M S/P

I

Q

LPF

LPFDEM

ADC

ADC

IFF C IFF F−oscillator

Low Noise Amp

Page 308: Wireless Communications With Matlab and Simulink

Problems!!!

IFFTM M P/S

I

Q

LPF

LPFMOD BPF MOD BPF

IFF C IFF F−

Power Amp

DAC

DAC

oscillator

Quantization Errors I/Q Imbalance

Peak to Average Power Ratio

Non Linearities

Frequency Drift

Page 309: Wireless Communications With Matlab and Simulink

• 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.

0 2 4 6 8 10 12

x 105

0

0.005

0.01

0.015

Pmax=0.014

Pave=2e-4

Pmax/Pave=66.88=18dB

Example: see an OFDM signal with 1024 subcarriers. Plot 1,000 OFDM symbols

Page 310: Wireless Communications With Matlab and Simulink

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

Page 311: Wireless Communications With Matlab and Simulink

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.

∑−

=

=1

0

2

][1][N

k

njk NekYN

nyπ

Assume all subcarriers Y[k] are i.i.d.:

{ } { } { }21

0

22

2 |][|1|][|1|][| kYEN

kYEN

nyEN

k== ∑

=

Average Power:

Peak Power when all subcarriers are aligned: { } 22 ||][|][| YYkYnyE ≤=

NPP

Ave

Peak ∝ It increases with the number of subcarriers

Page 312: Wireless Communications With Matlab and Simulink

How bad is PAR?

Probability Distribution of PAR

{ } ( )( )2.8Pr 1 1

NzPAR z e−> = − −

fairly accurate for number of carriers 64N ≥

By the Central Limit Theorem the received signal is gaussian

The amplitude is Rayleigh distributed and the power is Chi-square.

Therefore we can compute the Cumulative Density Function analytically:

][ny

Page 313: Wireless Communications With Matlab and Simulink

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

2 4 6 8 10 12 14-7

-6

-5

-4

-3

-2

-1

0

z dB

( ))log10 zPARP >N=128,256,512,1024

5.35.4 1010 −− −

Page 314: Wireless Communications With Matlab and Simulink

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

Page 315: Wireless Communications With Matlab and Simulink

ZOH][nvin

)(tvout

QCLη

DAC][nvin

)(tvout

In the DAC there are two sources of errors:

• Quantization Error;

• Saturation error due to clipping

For a fixed number of bits, we need to compromise between two sources of errors:

Effects of PAR on Digital to Analog Converters (DAC)

Page 316: Wireless Communications With Matlab and Simulink

Compromise between Number of Bits in DAC and Clipping Level

minV

MAXV

minV

MAXV

Small clipping error, Large Quantization Noise

Large clipping error, Small Quantization Noise

t t

We choose Clipping Level for best compromise between clipping error and quantization noise.

Page 317: Wireless Communications With Matlab and Simulink

ZOH][nvin

)(tvout

QCLη

( )

2/38

2

2

111

2

)2(212

μπ μ

μ

eSNR

SNR

SNRSNRSNR

CL

b

Q

CLQQCL

=

×=

+=−−−

DAC][nvin

)(tvout

/CLIPAμ σ=where

{ }2|][| nxE=σ

Total SNR due to Q and CL:

SNR due to Q :

SNR due to CL :

b = number of bits per sample

ideal

Page 318: Wireless Communications With Matlab and Simulink

/CLIPAμ σ=

( )SNR dB

8b =

9b =

10b =

11b =

12b =

2 3 4 5 6 7 815

20

25

30

35

40

45

50

55

60

65

MAX around / 4 5CLIPAμ σ= = −

{ }2][4 nvEV inMAX ≈Choose max clipping value:

number of bits

See both combined:

We have seen that the probability that PAR>4=12dB is very small.

Page 319: Wireless Communications With Matlab and Simulink

inP

outP

MAXPaveP

Input Back Off

(IBO)

( ) ppxxg

21

21

1)(+

=

)(tx ( ))()( txgty =g

p of the order of 3

Rapp’s model of a Power Amplifier:

Effects of PAR on Power Amplifiers

Page 320: Wireless Communications With Matlab and Simulink

PARPPIBO

ave

MAX >= 10log10

1010logPAR N≤

Ideally you want the Input Back Off (IBO) to be larger than the PAR.

This can be excessive and very inefficient.

Example: with N=256 carriers you need a IBO of

dBPARIBO 24256 ===

to guarantee that the amplifier always operates in the linear region.

Page 321: Wireless Communications With Matlab and Simulink

Remedies: Clipping

][nx⎩⎨⎧

≤>

=∠

AnxnxAnxAe

nxnxj

CL |][| if ][|][| if

][][

clip

A|][| nx

|][][| nxnx CL−

time

time

FT

frequency

wide band noise

Page 322: Wireless Communications With Matlab and Simulink

][~][][ nxnxnxCL −=

A|][| nx

timein

][nxclip Filter

∑−−≅

−−=

ii

ji

ii

jiW

nnweanx

nnweanwnxnx

i

i

][][

][][*][][

φ

φ

∑ −=i

ij

i nneanx i ][][~ δφ

)(FX

)(~ FX

F

F

)(FW

Page 323: Wireless Communications With Matlab and Simulink

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

The latter is not allowed, since it interferes with neighboring channels.

Page 324: Wireless Communications With Matlab and Simulink

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

Modulation: 4QAM

0 50 100 150 200 250 3000

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

|][| nx

n

Large peak value

Page 325: Wireless Communications With Matlab and Simulink

Clip it to 5dB (no filtering):

See the Frequency Spectrum:

SFFf =0

21

21

−N

Nused 2/N

Nused 2/−

datanullsnulls

-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5-25

-20

-15

-10

-5

0

5unfiltered clipped signal

Large values in the freq. guards

Page 326: Wireless Communications With Matlab and Simulink

-15 -10 -5 0 5 10 15-0.2

0

0.2

0.4

0.6

0.8

1

1.2 window

-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5-60

-50

-40

-30

-20

-10

0

10 FT of window

Choose a filter with this characteristics:

f5.0stopfpassf

( )NNusedf pass 2/=

2/1<< stoppass ff

In matlab: use firpm

h=firpm(M, [0,fpass,fstop,0.5]*2, [1,1,0,0]);

filter order, say M=40

1

][nh |)(| fH

Page 327: Wireless Communications With Matlab and Simulink

-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5-80

-70

-60

-50

-40

-30

-20

-10

0

10filtered and unfiltered clipped signal

F/Fs

dB

Clipped and Filtered:

Clipped only (no filter)

Page 328: Wireless Communications With Matlab and Simulink

Negative effect on data!!!

-1.5 -1 -0.5 0 0.5 1 1.5-1.5

-1

-0.5

0

0.5

1

1.5

Page 329: Wireless Communications With Matlab and Simulink

Peak Cancellation

Detect and Cancel the peak to reduce out of band noise.

Detect peak

Generate impulses

LPF

+

-

t

t

0t

0t( ) )()( 0

)(0

0 ttAetx txj −− ∠ δA|)(| tx ( ) )()( 0)(

00 ttgAetx txj −− ∠

It spreads the error to neighboring values.

Larger in band noise

Page 330: Wireless Communications With Matlab and Simulink

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.

Page 331: Wireless Communications With Matlab and Simulink

Effect of I/Q Imbalance

Ideally the received signal is of the form

][][][][1

0

2

njynyekYny QI

N

k

njk N +== ∑−

=

π

In practice the I and Q components have different gains, as

( )[ ] [ ] [ ]

(1 ) [ ] (1 ) [ ]

QI jjI I Q Q

j j jI Q

y n A e y n jA e y n

Ae e y n j e y n

ϕϕ

ϕ ε εδ δ −

= +

= + + −

2

2QI

QI AAA

ϕϕϕ

+=

+=with

QI

QI

QI

QI

AAAA

ϕϕϕϕ

ε

δ

+−

=

+−

=

Page 332: Wireless Communications With Matlab and Simulink

The two parameters express the magnitude and phase of the I/Q imbalance.

Assume them small:

εδεδδ ε jje j ++≅++≅+ 1)1)(1()1((1 ) (1 )(1 ) 1je j jεδ δ ε δ ε−− ≅ − − ≅ − −

( )( )*[ ] [ ] [ ]jy n Ae y n j y nϕ δ ε= + +

After a bit of algebra:

21

0

[ ] [ ] N

Njk n

k

y n Y k eπ−

=

= ∑Substitute:

εδ ,

( )

2 2

2

1 1*

0 0

1*

0

[ ] [ ] ( ) [ ]

[ ] ( ) [ ]

N N

N

N Njk n j nj

k

Njk nj

k

y n Ae Y k e j Y e

Ae Y k j Y N k e

π π

π

ϕ

ϕ

δ ε

δ ε

− −−

= =

=

⎛ ⎞= + +⎜ ⎟⎝ ⎠⎛ ⎞= + + −⎜ ⎟⎝ ⎠

∑ ∑

l

l

lto obtain:

Page 333: Wireless Communications With Matlab and Simulink

The effect is subcarrier N-k leaking into subcarrier k

kN −k

It is as having extra noise added to the signal:

][ny

noise

I/Q Imbalance

L

εδ j+

][kY [ ]Y N k−

Page 334: Wireless Communications With Matlab and Simulink

The factor is called Negative Frequency Rejection and it can be modeled as covariance of additive noise.

|| εδ j+

][ny

noise

I/Q Imbalance

][1 nw

][2 nw

][ny

( )1021

101log101log10log10log10 21

22

21

2

22

21

2SNRSNRyy −

+−=⎟⎟⎠

⎞⎜⎜⎝

⎛+−=−

+ σσ

σσ

σσσ

2

2

log10i

yiSNR

σσ

=

Define:

Implementation Loss:

Page 335: Wireless Communications With Matlab and Simulink

Example: let

dBSNRdBSNR

IQ

noise

3520

==

Implementation Loss ( ) 135.0101log10 103520

−=+−−

Total SNR: dBILSNRnoise 65.18135.020 =−=+

Page 336: Wireless Communications With Matlab and Simulink

Frequency Synchronization

• Drifts and errors in the oscillator frequencies cause a frequency offset, like a dopplershift;

• 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

Page 337: Wireless Communications With Matlab and Simulink

Fact: to maintain satisfactory SNR we need to limit the frequency offset to

%4/

||≤

Δ=

NFF

S

ε

0 0.02 0.04 0.06 0.08 0.15

10

15

20

25

30

epsilon

dB

SNR

Page 338: Wireless Communications With Matlab and Simulink

• Frequency Synchronization from Long Preamble.

0n

CP

n

][nx

Px Px

If there is a frequency offset (due to oscillator drifts or doppler shift) the received signal has an extra phase term

20[ ] [ ] j f ny n y n e π Δ=

with the digital frequency offset. Take the two received parts of the long preamble:

( )

( )

21 0 1

2 ( )2 0 2

[ ] [ ] [ ]

[ ] [ ] [ ]

j f n

j f n N

y n y n e w n

y n y n e w n

π α

π α

Δ +

Δ + +

= +

= + 1,...,0 −= Nn

128=N 128=N

Page 339: Wireless Communications With Matlab and Simulink

Comparing the two in vector form:

22 1

j f Ny y e wπΔ= +

[ ]Tiii Nyyy ]1[]0[ −= Lwhere

Then:

* 2 2 *1 2 1 1|| ||T j f N Ty y y e y wπ Δ= +

which yields the estimate of the frequency offset

{ }{ }

*1 2*1 2

Im1 arctan2 Re

T

T

y yf

N y yπ

⎛ ⎞Δ = ⎜ ⎟

⎜ ⎟⎝ ⎠

Since, then the frequency offset has to be at the most 12

fN

Δ <π<|arctan|

with N being the FFT length.