You are on page 1of 10

Shahriar, Tarek

Project Report

ECE 920

Multiple-Input Multiple-Output (MIMO) is the technique of using multiple antennas in both transmitting and receiving sides. This makes use special multiplexing to achieve higher data throughput compared to Single-Input Single -Output (SISO) systems. Orthogonal Frequency-Division Multiplexing (OFDM) is a method of multiplexing digital data over multiple orthogonal subcarrier frequencies. The term orthogonal refers that the frequencies do not interfere with each other. In this technique, a wideband signal is divided into many slowly modulated narrowband signals. The benefits of OFDM are high spectral efficiency, resiliency to RF interference, and lower multi-path distortion. The orthogonal nature of OFDM allows subcarriers to overlap, having a positive effect on spectral efficiency. [2]

Introduction

Simulation of a MIMO-OFDM System based on MATLAB

In the paper [1], the authors implement a MIMO-OFDM system in MATLAB. They employed space-time coding at the transmitter side and used a Rayleigh Fading channel. They investigated into the system performances such as bit error rates for different number of antennas in the MIMO system and for different number of carriers in the OFDM technique. The results show that BER performance is better as the antenna number increases. The increase of receive antennas has larger effect on BER performance than the increase of transmit antennas. The performance of the system also gets better as the number of subcarriers increases. However, as subcarrier number increases beyond a certain threshold, then BER performance stays the same due to inter-subcarrier interference.

Problem

The goal of the simulation is to implement the MIMO-OFDM system mentioned in the paper using MATLAB and to reproduce the results of system performance for different number of antennas and subcarriers.

Goal

Procedure

The system model (Figure 1) mentioned in the paper [1] has the following specifications. Bandwidth 20 MHz Maximum delay in multipath: 200 nanosecond Cyclic Prefix time: 800 nanosecond Convolutional Encoder Polynomial Not specified Doppler Spread Not specified Correlation between antennas Not specified

In my simulation, I made the following assumption for the parameters not specified in [1]. Convolutional Encoder Polynomial : Constraint Length 7 and Polynomial MATLAB default ([1 111 001] & [1 011 011] in binary)

Shahriar, Tarek No Doppler spread No correlation among antennas

Project Report

ECE 920

Data Source

Rate Convolutional Encoder

Constellation Mapping

OSTBC Encoder

OFDM

BER Computation

Channel Estimation

Rayleigh Fading Channel

AWGN Channel Received Data Viterbi Decoder Constellation Demapping OSTBC Decoder Inverse OFDM

Figure 1 : System Model for Simulation

Shahriar, Tarek

Project Report

ECE 920

Results

Figure 2 : BER Performance for Variation of Number of Antennas (Paper [1])

2x1

10

-1

2x2

2x3

Bit Error Rate

10

-2

2x4

10

-3

10

-4

-12

-10

-8

-6

-4 SNR (dB)

-2

Figure 3 : BER Performance for Variation of Number of Antennas

Shahriar, Tarek

Project Report

ECE 920

Figure 4 : BER Performance for Variation of Subcarrier Number (Paper [1])

10

-1

NSubcarrier: 16
Bit Error Rate
10
-2

NSubcarrier: 32 NSubcarrier: 64

10

-3

NSubcarrier: 128

10

-4

-8

-7

-6

-5

-4 SNR (dB)

-3

-2

-1

Figure 5 : BER Performance for Variation of Subcarrier Number

Shahriar, Tarek

Project Report

ECE 920

For variation of number of antennas, the result reproduced by the simulation (Figure 3) supports the results (Figure 2) in [1]. However, there is some offset in the value of SNR, which may be due to the assumptions made in channel characteristics and convolutional encoder, which was not specified in [1]. In addition, for high SNR, the BER diminishes but does not go to zero. Due to finite packet size, this error stays at the level of 10-4, which causes the BER level to hit the floor of 10-4 for high SNR. In the case of subcarrier number variation, there are some discrepancies in [1] between the description of the result and the plot. The result in Figure 5 shows that the increase from 16 to 32 subcarriers increases system BER performance but performance degrades for further increase of subcarrier. However, in Figure 4, we see increase in performance with subcarrier numbers. Although, the paper describes performance deterioration for subcarrier numbers increasing beyond 32.

Discussion

In this simulation, a simple MIMO-OFDM system with ideal assumptions was analyzed for performance variation with antenna numbers in MIMO and subcarrier numbers in OFDM. We can introduce some of the more parameters of a MIMO channel such as, Doppler spread and correlation among the antennas to analyze a more realistic scenario.

Conclusion

Reference
1. 2.

Study and Implementation of MIMO-OFDM System Based on MATLAB, Jiang Xuehua & Chen Peijiang. International Conference on Information Technology and Computer Science, 2009 Broadband MIMO-OFDM wireless communications, Stuber, G. L., Barry, J. R., Mclaughlin, S. W., Li, Y., Ingram, M. A., & Pratt, T. G. (2004). Proceedings of the IEEE, 92(2), 271-294.

Shahriar, Tarek

Project Report

ECE 920

Appendix
clc clear all close all

Parameter Initialization

generate_data = @(n) randi([0 1],n,1); BW = 20e6; % OFDM Bandwidth T_sample = 1/BW; % OFDM Sample Time N_fft = 64; % OFDM Sub-carriers T_OFDM = N_fft*T_sample; % OFDM Symbol Time T_CP = 800e-9; % Cyclic prefix time, as per the paper N_CP = T_CP/T_sample; MIMO_configurations = [2 1; 2 2; 2 3 2 4]; % No. of Antenna in MIMO SNR = -15:0.5:20; n_SNR = length(SNR); n_Ensemble = 25; N = 38400; % Size of stream coding_rate = 1/2; BER = zeros(size(MIMO_configurations,1),length(SNR));

Performance for variation of Antenna numbers


for config = 1:size(MIMO_configurations,1) % Defining Communication Blocks hEncConv = comm.ConvolutionalEncoder; hMod = comm.BPSKModulator; 'NumTransmitAntennas', hMIMOChan = comm.MIMOChannel(... 'SampleRate', 'PathDelays', 'AveragePathGains', 'MaximumDopplerShift', 'FadingDistribution', 'ReceiveCorrelationMatrix', 'RandomStream', 'Seed', 'NormalizePathGains', 'PathGainsOutputPort', % hAWGN = comm.AWGNChannel(... % BW,... 0,... 0,... 0,... 'Rayleigh',... eye(MIMO_configurations(config,2)),... 'mt19937ar with seed',... 38,... false,... true); % AWGN Channel % Space-Time Decoder hSpaceTimeCoder = comm.OSTBCEncoder(... % Convolutional Encoder % Space-Time Encoder % MIMO Rayleigh Fading Channel % BPSK Modulator MIMO_configurations(config,1));

'TransmitCorrelationMatrix', eye(MIMO_configurations(config,1)),...

'NoiseMethod', 'Signal to noise ratio (SNR)'); 'NumTransmitAntennas', 'NumReceiveAntennas', MIMO_configurations(config,1),... MIMO_configurations(config,2));

hSpaceTimeDecoder = comm.OSTBCCombiner(...

Shahriar, Tarek

Project Report

ECE 920

hDeMod = comm.BPSKDemodulator; % BPSK Demodulator hDeConv = comm.ViterbiDecoder(... 'InputFormat', 'Hard',... % Convolutional Decoder

'TerminationMethod', 'Terminated'); hError = comm.ErrorRate; % BER Calculator progressBar = waitbar(0,'Progress Bar'); for k = 1:n_SNR progressBar = waitbar(k/n_SNR,progressBar,['MIMO Config: ',num2str(config)]); % hAWGN.SNR = 10^(0.1*SNR(k)); ensBERHolder = zeros(1,n_Ensemble); for ensemble = 1:n_Ensemble % Data Processing data = generate_data(N); % Generate Data dataEncConv = step(hEncConv, data); % Convolutional 1/2 rate Coding dataMod = step(hMod, dataEncConv); % BPSK Modulated dataSTCoded = step(hSpaceTimeCoder, dataMod); % Space-Time Encoding dataChannelInput = f_OFDM(dataSTCoded,N_fft,N_CP); % Perform OFDM [dataChannelOutput, pathGains] = step(hMIMOChan, dataChannelInput); % Transmit through MIMO Channel % hAWGN.SignalPower = real(diag(dataChannelOutput'*dataChannelOutput))'/size(dataChannelOutput,1); dataNoisyChannelOutput = awgn(dataChannelOutput,SNR(k),'measured');%step(hAWGN, dataChannelOutput); % Add AWGN Noise data_inv_OFDM = f_inv_OFDM(dataNoisyChannelOutput,N_fft,N_CP); pathGains((mod(1:size(pathGains,1),N_CP+N_fft)>0 & mod(1:size(pathGains,1),N_CP+N_fft)<=N_CP),:,:,:) = []; dataSTDecoded = step(hSpaceTimeDecoder, data_inv_OFDM, squeeze(sum(pathGains,2))); % Estimate Channel and Space-Time Decoding dataDemod = step(hDeMod, dataSTDecoded); % BPSK Demodulation dataDeConv = step(hDeConv, dataDemod); % Viterbi Decoding error_rate = step(hError, data, dataDeConv(1:length(data))); % Calculate BER ensBERHolder(ensemble) = error_rate(1); release(hDeConv); release(hDeMod); release(hEncConv); release(hError); release(hMIMOChan); release(hSpaceTimeCoder); release(hSpaceTimeDecoder); reset(hEncConv); reset(hDeConv); end BER(config,k) = mean(ensBERHolder); end close(progressBar) end legend_MIMO = cell(1,size(MIMO_configurations,1)); for config = 1:size(MIMO_configurations,1) legend_MIMO{1,config} = [num2str(MIMO_configurations(config,1)) 'x' num2str(MIMO_configurations(config,2))]; end figure plot(SNR,BER), grid on

Shahriar, Tarek

Project Report

ECE 920

xlabel('SNR (dB)'), ylabel('Bit Error Rate') legend(legend_MIMO,'Location','Best') figure semilogy(SNR,BER), grid on xlabel('SNR (dB)'), ylabel('Bit Error Rate') legend(legend_MIMO,'Location','Best')

Performance for variation of Subcarrier Numbers


N_fft = 2.^(4:7); % OFDM Sub-carriers T_CP = 800e-9; % Cyclic prefix time, as per the paper BER = zeros(length(N_fft),length(SNR)); for config = 1:length(N_fft) T_OFDM = N_fft(config)*T_sample; % OFDM Symbol Time N_CP = T_CP/T_sample;%N_fft(config)/4 % Defining Communication Blocks hEncConv = comm.ConvolutionalEncoder; hMod = comm.BPSKModulator; 'NumTransmitAntennas', hMIMOChan = comm.MIMOChannel(... 'SampleRate', 'PathDelays', 'AveragePathGains', 'MaximumDopplerShift', 'FadingDistribution', 'ReceiveCorrelationMatrix', 'RandomStream', 'Seed', 'NormalizePathGains', 'PathGainsOutputPort', % hAWGN = comm.AWGNChannel(... % BW,... 0,... 0,... 0,... 'Rayleigh',... eye(MIMO_configurations(2,2)),... 'mt19937ar with seed',... 38,... false,... true); % AWGN Channel % Space-Time Decoder hSpaceTimeCoder = comm.OSTBCEncoder(... % Convolutional Encoder % Space-Time Encoder % MIMO Rayleigh Fading Channel % BPSK Modulator MIMO_configurations(2,1));

'TransmitCorrelationMatrix', eye(MIMO_configurations(2,1)),...

'NoiseMethod', 'Signal to noise ratio (SNR)'); 'NumTransmitAntennas', 'NumReceiveAntennas', MIMO_configurations(2,1),... MIMO_configurations(2,2)); % Convolutional Decoder

hSpaceTimeDecoder = comm.OSTBCCombiner(...

hDeMod = comm.BPSKDemodulator; % BPSK Demodulator hDeConv = comm.ViterbiDecoder(... 'InputFormat', 'Hard',...

'TerminationMethod', 'Terminated'); hError = comm.ErrorRate; % BER Calculator progressBar = waitbar(0,'Progress Bar'); for k = 1:n_SNR progressBar = waitbar(k/n_SNR,progressBar,['# of Subcarrier: ',num2str(N_fft(config))]); % hAWGN.SNR = 10^(0.1*SNR(k)); ensBERHolder = zeros(1,n_Ensemble); for ensemble = 1:n_Ensemble % Data Processing data = generate_data(N); % Generate Data dataEncConv = step(hEncConv, data); % Convolutional 1/2 rate Coding dataMod = step(hMod, dataEncConv); % BPSK Modulated

Shahriar, Tarek

Project Report

ECE 920

dataSTCoded = step(hSpaceTimeCoder, dataMod); % Space-Time Encoding dataChannelInput = f_OFDM(dataSTCoded,N_fft(config),N_CP); % Perform OFDM [dataChannelOutput, pathGains] = step(hMIMOChan, dataChannelInput); % Transmit through MIMO Channel % hAWGN.SignalPower = real(diag(dataChannelOutput'*dataChannelOutput))'/size(dataChannelOutput,1); dataNoisyChannelOutput = awgn(dataChannelOutput,SNR(k),'measured');%step(hAWGN, dataChannelOutput); % Add AWGN Noise data_inv_OFDM = f_inv_OFDM(dataNoisyChannelOutput,N_fft(config),N_CP); pathGains((mod(1:size(pathGains,1),N_CP+N_fft(config))>0 & mod(1:size(pathGains,1),N_CP+N_fft(config))<=N_CP),:,:,:) = []; dataSTDecoded = step(hSpaceTimeDecoder, data_inv_OFDM, squeeze(sum(pathGains,2))); % Estimate Channel and Space-Time Decoding dataDemod = step(hDeMod, dataSTDecoded); % BPSK Demodulation dataDeConv = step(hDeConv, dataDemod); % Viterbi Decoding error_rate = step(hError, data, dataDeConv(1:length(data))); % Calculate BER ensBERHolder(ensemble) = error_rate(1); release(hDeConv); release(hDeMod); release(hEncConv); release(hError); release(hMIMOChan); release(hSpaceTimeCoder); release(hSpaceTimeDecoder); reset(hEncConv); reset(hDeConv); end BER(config,k) = mean(ensBERHolder); end close(progressBar) end legend_OFDM = cell(1,length(N_fft)); for config = 1:length(N_fft) legend_OFDM{1,config} = ['N_{Subcarrier}: ' num2str(N_fft(config))]; end figure plot(SNR,BER), grid on xlabel('SNR (dB)'), ylabel('Bit Error Rate') legend(legend_OFDM,'Location','Best') figure semilogy(SNR,BER), grid on xlabel('SNR (dB)'), ylabel('Bit Error Rate') legend(legend_OFDM,'Location','Best')

OFDM Multiplexer
function y_ofdm = f_OFDM(x, nSubCarrier, nCP) % Generate OFDM symbol % x : % nCP: Baseband Discrete-Time Signal, Column vector No. of Cylic Prefix to mitigate time dispersion % nSubCarrier: No. of Subcarrier, usually power of 2 zeroPad = zeros((nSubCarrier - mod(size(x,1),nSubCarrier))*(mod(size(x,1),nSubCarrier)~=0),1);

Shahriar, Tarek
nTxAntenna = size(x,2);

Project Report

ECE 920

y_ofdm = zeros((size(x,1)+size(zeroPad,1))/nSubCarrier*(nCP + nSubCarrier),nTxAntenna); for n = 1:nTxAntenna x_reshaped = reshape([x(:,n); zeroPad],nSubCarrier,[]); y_ofdm_temp = zeros(nCP + nSubCarrier,size(x_reshaped,2)); y_ofdm_temp(nCP+1:end,:) = ifft(x_reshaped,nSubCarrier); y_ofdm_temp(1:nCP,:) = y_ofdm_temp(end-nCP+1:end,:); % Prefix last nCP samples as Cyclic Prefix y_ofdm(:,n) = reshape(y_ofdm_temp,[],1); end

OFDM De-multiplexer
function y = f_inv_OFDM(x_OFDM, nSubCarrier, nCP) % Decode OFDM symbol % x_OFDM : % nCP: OFDM symbol, Column vector No. of Cylic Prefix to mitigate time dispersion % nSubCarrier: No. of Subcarrier, usually power of 2 nRxAntenna = size(x_OFDM,2); y = zeros(size(x_OFDM,1)/(nCP + nSubCarrier)*nSubCarrier,nRxAntenna); for n = 1:nRxAntenna x_OFDM_reshaped = reshape(x_OFDM(:,n),nCP + nSubCarrier,[]); x_OFDM_reshaped(1:nCP,:) = []; % Remove Cyclic Prefix y(:,n) = reshape(fft(x_OFDM_reshaped),[],1); end

You might also like