5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After...

49
1 Lecture 5: Simulation of OFDM communication systems March 28 – April 19 2008 Yuping Zhao (Doctor of Science in technology) Professor, Peking University Beijing, China [email protected]

Transcript of 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After...

Page 1: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

1

Lecture 5: Simulation of OFDM communication systems

March 28 – April 19 2008

Yuping Zhao (Doctor of Science in technology)

Professor, Peking UniversityBeijing, China

[email protected]

Page 2: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

2

Time

Single carrier communcation systems

T=1/B (1μs)

Frequency

B(1MHz)

If τ_max>T

→intersymbol interference (ISI)

bandwidth = BSymbol period T=1/B

Equalization

2

Page 3: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

3

Frequency

Time

T (1ms)

B

OFDM communication system

Δf(1kHz)

•Bandwidth is divided into N sub-band•Symbol period is N time longer

Δf=B/N

Symbol duration T=N/B; T=1/ Δf

3

Page 4: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

4

( )⎩⎨⎧

=<≤=

.,0),(,0,2exp),(

otherwisektgTttfjktg kπ

⎪⎩

⎪⎨⎧

===⋅

≠=⋅

∫∫∫

TT

T

pkTdtktgdtptgktg

pkdtptgktg

0

2

0

*0

*

.,),(),(),(

,,0),(),(

for the kth sub-carrier

Orthogonal condition

4

Page 5: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

5

OFDM-BPSK signal: 1,1,-1,-1,1

data Real part: cos(2πfkt) Imaginary part: sing(2πfkt)

1

1

-1

-1

1

OFDM symbol 5

0 100 200 300 400 500 6000

1

2

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-5

0

5

0 100 200 300 400 500 6000

1

2

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-1

0

1

0 100 200 300 400 500 600-5

0

5

Page 6: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

6

OFDM spectrum

6

Page 7: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

77fΔ

2

( ( )) ( 2 )( ( ) ) ( 2 ( ))j ft

f t F j ff t e F j f fπ

π

πΔ

=>

⋅ => − Δ

FF

0 490 500 510 520 530 540 550 5

1+ 1+ 1+

1− 1−

Page 8: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

8

Block diagram of OFDM systems

Encoding (BPSK…) IFFT Guard

insertionLowpass filtering

Carrier modulation

Binary data

Channel

Carrier demodulation

Lowpass filteringA/D converting

Guard deletingFFTdecoding

(BPSK…)Binary data

OFDM symbol synchronisation

Channel estimation

X(k) x(n) x’(n) s(t)

y’(k) y(n) y’(n) r(t)

Page 9: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

99

Using FFT and IFFT

1,...1,0,1,...1,0,2exp)( −=−=⎟⎠⎞

⎜⎝⎛= NnNkkn

Njkg π

⎪⎪⎩

⎪⎪⎨

≠=⎟⎠⎞

⎜⎝⎛−⎟

⎠⎞

⎜⎝⎛

==⎟⎠⎞

⎜⎝⎛−⎟

⎠⎞

⎜⎝⎛

∑−

=

=

1

0

1

0

,02exp2exp

,2exp2exp

N

n

N

n

pkknN

jpnN

j

pkNknN

jpnN

j

ππ

ππ

Page 10: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

1010

1

0

2( ) ( ) expN

ks n X k j nk

Nπ−

=

⎛ ⎞= ⎜ ⎟⎝ ⎠

OFDM signal expressions

10 −≤≤ Nn

Assume the information data be X(k), then the transmitted signal is s(n)

The received signals

( ) ( ) ( )twtstr +=w(t): AWGN signal.

Page 11: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

1111

The signal on the kth subcarrier

1

0

1 2( ) ( ) expN

nY k r n j kn

N Nπ−

=

⎛ ⎞= −⎜ ⎟⎝ ⎠

10,2exp)(1)(1

0−≤≤⎟

⎠⎞

⎜⎝⎛−= ∑

=

NkknN

jnwN

kWN

n

π

1

0

1 2( )exp ( ), 0 1N

n

s n j kn W k k NN N

π−

=

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

Page 12: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

1212

About the guard interval

Time

τ_max (5μs,17μs,...)

Time

τ_max (5μs,17μs,...)

Multipath delay profile

Page 13: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

1313

OFDM Symbol s(t)

Guard interval G > τ_max

OFDM Symbol s(t)

Guard interval G > τ_max

O F D M S y m b o l s ( t )

S a m e s i g n a l s

h ( t ) O F D M S y m b o l s ( t )

S a m e s i g n a l s

h ( t )

Page 14: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

1414

Page 15: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

1515

Problems in OFDM systems

• Peak to average power ratio (PAPR)• Symbol synchronization• Channel response estimation• Impact of frequency error • Impact of clock error

Page 16: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

16

-10 -8 -6 -4 -2 0 2 4 6 8 100

50

100

150

200

250

300Central Limit theorem, N=60

Peak to average power ratio (PAPR)Pdf function of the OFDM samples

The peak to average power ratio (PAPR ) is very large !

Figure 1

Page 17: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

17

The impact of high PAPR to OFDM Normal amplifier response

Input

Output

Linear range

Page 18: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

18

Truncation of OFDM time domain signals caused by amplifier

-10 -8 -6 -4 -2 0 2 4 6 8 100

50

100

150

200

250

300Central Limit theorem, N=60

Page 19: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

19

About the OFDM time domain signals

• It appears as Gaussian distribution• The truncation of amplifier may cause

distortion of the received signals• The incorrect A/D conversion range may

cause the distortion of the received signals• The special time domain synchronization

procedure should be introduced

Page 20: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

20

Why the synchronization is needed?

•To get the starting point of the FFT window

•The guard period is used for the symbol synchronization

•The guard period is not used for the signal demodulation

Symbol synchronization

Page 21: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

21

Symbol Symbol

O F D M S y m b o l s ( t )

S a m e s i g n a l s

h ( t ) O F D M S y m b o l s ( t )

S a m e s i g n a l s

h ( t )

Page 22: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

22

×

Delay T conjugate

Integral synch

Input time domain signals

Get the maximum

Frequency error

Get the phase

Synchronization using guard interval

Page 23: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

23

相关窗

L

Page 24: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

24

相关窗

L

Page 25: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

25

相关窗

L

Page 26: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

26

相关窗

L

Page 27: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

27

L

相关窗

Page 28: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

28The correlation function for OFDM synchronization (ideal condition)

Figure 2

The symbol synchronization of OFDM systems

Page 29: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

29

The correlation function for OFDM synchronization

(SNR = 3dB, Multipath channel, carrier frequency error)

Page 30: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

30

Frequency domain channel response

Note: when transmitted signal on all sub carriers are 1, you get the frequency domain channel response

Figure 3

Page 31: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

31

Pilot for OFDM frequency domain signals

Page 32: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

32

Interpolation results

Zero order interpolation

Page 33: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

33

Interpolation results

first order (linear) interpolation

Page 34: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

34

Signal Constellation with different lowpass filters

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

-3

-2

-1

0

1

2

3

4

R=0.5; % roll-factordelay=3; % number of side lobes

Page 35: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

35

Signal Constellation with different lowpass filters

R=0.2; % roll-factordelay=3; % number of side lobes

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

-3

-2

-1

0

1

2

3

4

Page 36: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

36

Signal Constellation with different lowpass filters

R=0.2; % roll-factordelay=5; % number of side lobes

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

-3

-2

-1

0

1

2

3

4

Page 37: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

37

Exercise 2

• Build OFDM system with 8 times upper sampling

• The channel are three types:– Ch-1: No AWGN and no multipath delay– Ch-2: AWGN channel– Ch-3: multipath delay without AWGN (channel

parameters can be decided by yourself)

Page 38: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

38

Exercise 2: Show the following figures and discuss the results

• Get time domain signal histograms for Ch-1, Ch-2, Ch-3, after down sampling, three figures (figure 1-3, see instruction 2-1)

• Perform time domain symbol synchronizations before or after down sampling for Ch-1, Ch-2, Ch-3, three figures, (Figure 4-6, see instruction 2-2)

• Modulate signal 1 on all sub-carriers, show the frequency domain response for Ch-1, Ch-2, Ch-3, in real and imaginary parts separately, three figures (figure 7-9, see instruction 2-3)

• Assume the pilot signals are given in page 32 and 33, using Ch-3 channel, perform interpolation for channel response estimation. Draw the figure together with Figure 9 see instruction 2-4)

• The instructions are given in the following pages

Page 39: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

39

Instruction 2-1: for Figure 1-3

16QAM modulation

N-points IFFT

Guard insertion

Lowpass filtering

Binarydata

Channel

Lowpass filteringA/D converting

Guard deleting

N-points FFT

16QAM demodulation

Binarydata

X(k) x(n) x’(n) s(t)

y’(k) y(n) y’(n) r(t)

Up sampling

Down sampling

Suggestions and instruction are shows in the next page

show Histogram

Page 40: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

40

Instruction 2-1: How to make OFDM system

• OFDM systems can be made simply by adding the yellow color blocks to your first exercise -16QAM communication system (Assume FFT point N=512; length of guard interval = 100)

• Build OFDM transmitter– Generate binary data sequence, for example length=N×4×10– Perform 16QAM modulation– Make 16QAM symbol as frames of length N, total 10 frames– Perform IFFT to each frame– Add guard interval to each frame, then, frame length = N+G– Make a vector consist of all frames, length of vector=(N+G) ×10– Up sampling and low pass filtering

• Build OFDM Receiver– Make received symbol (after down sampling) as frames of length N+G, total 10 frames– Remove guard interval for each frame– Perform IFFT to each frame– Make a vector consist of all frames, length of vector=N ×10

• In AWGN channel, the BER performance should be same as the original 16QAM system

• The histogram is shown in blue block for three channels

Page 41: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

41

Instruction 2-2: synchronization for OFDM---After down sampling

16QAM modulation

N-points IFFT

Guard insertion

Lowpass filtering

Binary data

Channel

Lowpass filteringA/D converting

Guard deleting

N-points FFT

16QAM demodulation

Binary data

OFDM symbol synchronisation

X(k) x(n) x’(n) s(t)

y’(k) y(n) y’(n) r(t)

Up sampling

Down sampling

The instruction for the synchronization is shown in next page

Page 42: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

42

×

conjugate

Sum up G signals

The peak value --synchronization pointInput time

domain signals(After down sampling)

Get the maximum

FFT length = N; Guard length = G

DelayN samples

y(n)

x(n)

In your report, you need to show y(n) value, where n is time domain index.y(n) can be expressed as (n=1,2,3…)

( ) ( ) ( )∑−

=

+++=1

0

*G

iNinxinxny

Instruction 2-2: synchronization for OFDM---After down sampling

Page 43: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

43

16QAM modulation

N-points IFFT

Guard insertion

Lowpass filtering

Binarydata

Channel

Lowpass filteringA/D converting

Guard deleting

N-points FFT

16QAM demodulation

Binary data

OFDM symbol synchronisation

X(k) x(n) x’(n) s(t)

y’(k) y(n) y’(n) r(t)

Up sampling

Down sampling

FFT length = N; Guard length = G

Instruction 2-2: synchronization for OFDM---After down sampling

Page 44: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

44

×

conjugate

Sum up G×Ksignals

The peak value --synchronization pointInput time

domain signals(Before down sampling)

Get the maximum

DelayN×K samples

FFT length = N; Guard length = G; Up sampling rate = K

Instruction 2-2: synchronization for OFDM---before down sampling

( ) ( ) ( )∑−×

=

×+++=1

0

*KG

iKNinxinxny

x(n)

y(n)

Page 45: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

45

Instruction 2-3: Show Channel response of OFDM systems

16QAM modulation

N-points IFFT

Guard insertion

Lowpass filtering

1,1,1,1…

Channel

Lowpass filteringA/D converting

Guard deleting

N-points FFT

16QAM demodulation

1,1,1,1…

Show Channel response (real and Imaginary parts), for one frame ONLY

X(k) x(n) x’(n) s(t)

y’(k) y(n) y’(n) r(t)

Up sampling

Down sampling

For figure 7,8,9

Page 46: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

46

Instructions 2-4: channel response estimation of OFDM

N-points IFFT

Guard insertion

Lowpass filtering

1,0,0,0,1,0,0,0,1,0,0,0,1…

Channel

Lowpass filteringA/D converting

Guard deleting

N-points FFT

1,1,1,1…

Interpolation to get channel response (real and imaginary), show one frame ONLY

X(k) x(n) x’(n) s(t)

y’(k) y(n) y’(n) r(t)

Up sampling

Down sampling

Detail explanation is given in next page

Page 47: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

47

Instructions 2-4: channel response estimation of OFDM systems

• Assume you have pilot subcarriers with carrier number 1,5,9,13…,

• The pilot subcarriers are modulated by signal value 1 and rest of subcarriers are empty

• You get received signals at those pilot subcarriers (in fact it is frequency domain channel response)

• You need to get the frequency domain channel response of the empty subcarriers, you can do the interpolation as shown in the next page

Page 48: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

48

Interpolation results

Accurate channel response

Solid line: accurate channel response of your figure 9Dotted line: Linear interpolation results

Page 49: 5 Simulation of OFDM systems - · PDF fileInstruction 2-2: synchronization for OFDM---After down sampling. 44 ... Microsoft PowerPoint - 5 Simulation of OFDM systems Author: Administrator

49