19
MATLAB Simulation Environment for Linear Modulation Communication Systems Pavel Loskot [email protected] Centre for Wireless Communications University of Oulu – Finland 11 th November 2000 – Foil T E X < > c Pavel Loskot 11/11/00 1(19) of UNIVERSITY O U L U

Multiuser MIMO-OFDM simulation framework in Matlab

Embed Size (px)

Citation preview

Page 1: Multiuser MIMO-OFDM simulation framework in Matlab

MATLAB Simulation Environment forLinear Modulation Communication

Systems

Pavel [email protected]

Centre for Wireless CommunicationsUniversity of Oulu – Finland

11th November 2000

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 1(19)of

UNIVERSITY

O U L U

Page 2: Multiuser MIMO-OFDM simulation framework in Matlab

General Features

• current version: 1.0 released on 10/25/2000

• general simulation environment for multiuser systemover MIMO channel

• complex envelope signal representation

• basic framework (I/O, data sources, signal buffers, MIMOchannel model) plus model of Tx/Rx

• block-like structure

• suitable for any linear modulation transceiver(nonlinear modulation – how to handle signal buffers ?)

• fully parametrized

• time-domain realization (universality, speed, nonlineartechniques)

• sample-wise modelling

Suppor t

• MIMO channels in sense of multiple Tx/Rx antennas

• single-carrier/multi-carrier modulation w/wo direct-sequencespreading

• speed and memory optimization through simulationscheduling

• adaptive modulation – variable constellation and power

• MATLAB→C

• simulation and development of communication systems

• bit/(sub)symbol/frame error rate measurements

• block-wise measurements for slowly fading channels

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 2(19)of

UNIVERSITY

O U L U

Page 3: Multiuser MIMO-OFDM simulation framework in Matlab

Implemented

• Multicarrier Transceivers (Transmultiplexers)1. basic OFDM (OFDM)2. adaptive version of basic OFDM (AOFDM)3. Cosine Modulated Filter Bank

(CMFB1 and CMFB2)

• Modulation format1. M − ary PSK, M − ary ASKM − ary SquareQAM , QPSK16/64 − StarQAM , 16− CircularQAM

2. adaptive version of those3. differential modulation with differential encoding

across time or frequency:M − ary DPSK, DQPSK, Π4 − DQPSK,16/64 −DAPSK

4. offset modulation - offset of imaginary part

• optionally Gray encoding

• pulse shaping - RRC, RC, NRZ

• direct-sequence spreading (e.g. MC-CDMA)

• optionally pilot symbols– continuous pilots– scattered pilots

N.B. offset modulation and filter-banks require equalization(so far only simple channel inversion at the receiverimplemented)

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 3(19)of

UNIVERSITY

O U L U

Page 4: Multiuser MIMO-OFDM simulation framework in Matlab

Implemented (2)

−4 −2 0 2 4−4

−2

0

2

4Constellation for 16−qam

−2 −1 0 1 2

−2

−1

0

1

2

Constellation for 16dapsk/16stqam

−2 0 2

−3

−2

−1

0

1

2

3

Constellation for 64dapsk/64stqam

−4 −2 0 2 4−4

−2

0

2

4Constellation for 16crqam

Example of QAM constellations.

0 2 4 6 8 10 12 14 16 18 20 2210

−6

10−5

10−4

10−3

10−2

10−1

100

Bit−error Rate of BPSK, QPSK, 16−QAM, 64−QAM over AWGN

ES/N

0

BE

R

simulation

BER results over AWGN.

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 4(19)of

UNIVERSITY

O U L U

Page 5: Multiuser MIMO-OFDM simulation framework in Matlab

Implemented (3)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 230

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 230

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17Continuous Pilot Symbols

Scattered Pilot Symbols PilTpos

PilF

po

s

PilTpos

PilTpos1

PilF

po

sP

ilFp

os1

time

frequency

Pilot Symbols Location.

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 5(19)of

UNIVERSITY

O U L U

Page 6: Multiuser MIMO-OFDM simulation framework in Matlab

Multicarrier Modulation

Some of the transmultiplexer front ends.

Multicarrier communication system.

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 6(19)of

UNIVERSITY

O U L U

Page 7: Multiuser MIMO-OFDM simulation framework in Matlab

Channel Filtering

Signal flow.

• inner MATLAB routine filter

• filtering on symbol by symbol basis (universality)

• maximum delay spread limited to one symbol interval

• channel can be kept constant over arbitrary number ofsamples

• block-wise simulation for slowly fading channels(i.e. channel generator is independently reinitialized foreach block of the simulation)

• SISO, SIMO, MISO, MIMO structures available (faster)

• fading can be randomly initialized but kept constantthroughout the simulation run

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 7(19)of

UNIVERSITY

O U L U

Page 8: Multiuser MIMO-OFDM simulation framework in Matlab

Error Measurements

Simulation Structure

SNR : BER1 1 SNR : BERK K

Run#X

"inputsX.m" "outputsX.m"

round#1 round#X

block#1 block#X

frame#1 frame#X

symbol#1 symbol#X

subsymbol#1 subsymbol#X

The structure of simulation for measurements.

• Monte Carlo measurements

• a signle run - bit/(sub)symbol/frame error rate atpredefined SNR points

• a single round - sets constant SNR

• blocks for slowly fading channels

• frames to accomodate signalling from upper layers

• a symbol – basic step of the simulation measurements

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 8(19)of

UNIVERSITY

O U L U

Page 9: Multiuser MIMO-OFDM simulation framework in Matlab

Spreading

Nf1

Nt1

Tx

NfgNfg

Ntg

Ntg

Ntg

Ntg

Nf1

Nt1

Nf

Nt

Rx

x = Ntg

Nfg

(de)spreading matrix(de)spreading code

Nf

Nt

NfgNfg

Ntg

Ntg

Ntg

Ntg

DS – Despreading

Direct Sequence – Spreading

Spreading in multicarrier modulation.

• input to the transmitter still matrix• direct-sequence spreading

– across time– across frequency– or both

• DS-CDMA, MC-CDMA, MC-DS-CDMA

N.B. frequency hoping can be realized over subcarriers(anyway, more or less solution in practice)

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 9(19)of

UNIVERSITY

O U L U

Page 10: Multiuser MIMO-OFDM simulation framework in Matlab

System Model Structure

Nbranches

(1)

1

NTx NRx

Nbranches

(2)

data

data

awgn

awgn

awgn

awgn

Ntotal: x x L pathsTx Rx

pilots

data

MUX MODMAP buffer

Tx

MIMO

1 1

1

buffer

MRC Dem DeMap

Rx

buffer

MRC Dem DeMap

Rx

L-paths

pilots

data

MUX MODMAP buffer

Tx

No ICI

N

The system model and buffers.

NRx

data

w1

wNRx

DemOFDM

OFDMMOD

Tm

(N , )dc

(N , )dc(N , )dc

(N , )dc

N = number of subcarriersc

(N ,N ,L, )Rx Tx d

MIMO

1 1buffer

bufferbufferNTx

buffer

pilots

data

MUX MAP

Tx 1Rx

awgn

awgn

DeMap

TxBufSym-1 RxBufSym-1

Output Power BufferData Symbols Buffer

Pilot Symbols Buffer Modulation ConstellationBuffer

= delayd

ChBufPnt

The system model and buffers.

• channel buffer – circular

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 10(19)of

UNIVERSITY

O U L U

Page 11: Multiuser MIMO-OFDM simulation framework in Matlab

Flow Char t of the Simulation

pilotsdata

spreading

Channel

find XER

Ch. EstimationSynchronization

Fading Gener.

end while loop

end SNR loop

symbol source

init new block

while not enough errors and Xs do:

ChBuf

SNR loop

Transmitter

modulation

Receiver

demapping

mapping/spreading

PilBufDatBufSprBuf

Nc

DataEst

≈ buffer (delay)

PowBufModBuf

DataCrt

L×NTx ×NRx

L×NTx ×NRx

NTx

NRx

L×NTx ×NRx paths

X={Bit, Subsymbol, Symbol, Frame}

demod./despread.

Flow chart of the simulation algorithm.

• Monte Carlo measurements

• in fact, buffers≡ delays

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 11(19)of

UNIVERSITY

O U L U

Page 12: Multiuser MIMO-OFDM simulation framework in Matlab

Librar y and Scheduling

inputsX.mscheduleInitTx

InitChInitRx

InitMod

AOFDM

CMFB1

CMFB2

OFDM

errestrxademamodtx

aliblib

cmn

dspchfch

Execute

Close Simulation

Schedulter

Open Simulation

Execute

Processor

Pre-

outputsX.m

Scheduling and executing the simulation.

• facilitate stand-alone script to get– demo version (p-code)– further independent development– overcome ”designs from the scratch”– MATLAB into C compiling

• block-like structure of the final code

• extendable libraries– system≡local libraries (models of Tx and Rx)– global libraries (adaptive modulation dependend files)– common libraries (channel models, etc.)

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 12(19)of

UNIVERSITY

O U L U

Page 13: Multiuser MIMO-OFDM simulation framework in Matlab

Prepr ocessor

%#ifvalid

CODE1;

CODE2;

%#elvalid

%#endvalid

MATLAB_CONDITION

%#ifdef PRP_DEFINITION

CODE1;

%#eldef

CODE2;

%#enddef

%#define PRP_DEFINITION

%#ifexist

CODE1;

%#elexist

CODE2;

%#endexist

MATLAB_VARIABLE

%#ifundef

CODE1;

%#elundef

CODE2;

%#endundef

PRP_DEFINITION

%#undefine PRP_DEFINITION

Matlab Preprocessor ver. 1.0

Preprocessor directives.

• version 1.0

• text filteri.e. conditional script filtering (not executing!)

• C-like features

• strong tool for simulation scheduling

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 13(19)of

UNIVERSITY

O U L U

Page 14: Multiuser MIMO-OFDM simulation framework in Matlab

OFDM Transmitter/Receiver

pilots

data

zeropadding

cyclicprefix

NcNfft

D/A OFDMsignal

Nfft

Nc

cyclicpostfix

S/P

S/P

MUX MAP

IFFT P/S

A=f(P )s

= number of carriers= FFT order

P = power of continuous signal at PBs

OFDM Transmitter

Structure of OFDM transmitter.

Nfft

cyclicpostfix

cyclicprefix

w1

wN

data

detector

Nc

unusedsubcarriers

NfftNc

= FFT order= number of carriers

A/D

S/P FFT

from antenna N

channel

timing

knowledge

OFDM Receiver

P/S

from antenna 1

FEQ

Structure of OFDM receiver.

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 14(19)of

UNIVERSITY

O U L U

Page 15: Multiuser MIMO-OFDM simulation framework in Matlab

Filter Bank Modulation

• Minus– much higher complexity than FFT-based systems– very complex design– many open problems– equalization always necessary

• Plus– no guard interval needed– better spectral characteristics and efficiency– excellent flexibility– can exactly match the channel

• not widely accepted by industry, yet(Alcatel - filter-banks for DMT applications)

• very general, in fact filter-banks capable to describe anycommunication system scenario (special case - arbitrarymodulation in TDMA, FDMA, CDMA schemes)

• increased interest into filter-banks expected in future

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 15(19)of

UNIVERSITY

O U L U

Page 16: Multiuser MIMO-OFDM simulation framework in Matlab

Filter Bank Modulation (2)

Filter-bank based communication system.

• Example of Cosine Modulated Filter-Bank (CMFB)

Tx filters:

fk(n) = 2hp(n) cos (2k+1)π

2M(n−

N

2)−(−1)k

π

4

Rx filters:

hk(n) = 2hp(n) cos (2k+1)π

2M(n−

N

2)+(−1)k

π

4

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 16(19)of

UNIVERSITY

O U L U

Page 17: Multiuser MIMO-OFDM simulation framework in Matlab

On the Design of CMFB

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5−120

−100

−80

−60

−40

−20

0

20Prototype filter

Hs=−21.8dB

H3=−3dB

Fs=0.125F

−3dB=0.062

−70dB

Prototype filter.

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5−120

−100

−80

−60

−40

−20

0H

0(ejω).F

0(ejω) H

1(ejω).F

1(ejω) H

2(ejω).F

2(ejω) H

3(ejω).F

3(ejω)

CMFB frequency responses.

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 17(19)of

UNIVERSITY

O U L U

Page 18: Multiuser MIMO-OFDM simulation framework in Matlab

On the Design of CMFB (2)

−40 −20 0 20 40−0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

h0* f

0

−40 −20 0 20 40−0.2

−0.1

0

0.1

0.2

0.3

h1* f

1

−40 −20 0 20 40−0.2

−0.1

0

0.1

0.2

0.3

h2* f

2

−40 −20 0 20 40−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

h3* f

3

Tx/Rx Filter Convolution

CMFB time responses.

−40 −20 0 20 40−0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

h0* f

0

−40 −20 0 20 40−0.1

−0.05

0

0.05

0.1

h0* f

1

−40 −20 0 20 40−4

−2

0

2

4

6x 10

−4

h0* f

2

−40 −20 0 20 40−6

−4

−2

0

2

4x 10

−5

h0* f

3

Subchannel Crosstalk

CMFB crostalk in time domain.

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 18(19)of

UNIVERSITY

O U L U

Page 19: Multiuser MIMO-OFDM simulation framework in Matlab

Input/Output Files

• SY STEM = {OFDM,AOFDM, etc.} – systemname, X – simulation run

• inputsX.m – input file

• SY STEMcoreX.m – the core simulation file

• SY STEMinitX.m – the simulation part with initialization

• SY STEMwsX.mat – saved workspace after theinitialization

• outputsX.m – system messages resultsexecutable m-file to reread the results

• schedfileX.m – list of files inserted intoSY STEMcoreX.m and SY STEMinitX.m

• touchfileX.m – let you know the simulation is still alive

Other Features

• preprocessor on/off

• create stand-alone code yes/no

• record the channel realization yes/no

• include awg noise yes/no

Future Directions

• extending of the preprocessor(inline functions)

• extending of the librariers

• direct MATLAB→ C translation– own and yet simple translator– parameters initialization in MATLAB ,the simulation itself in C

– FoilTEX– � < > � ∇ c©Pavel Loskot 11/11/00 19(19)of

UNIVERSITY

O U L U