Mimo Ofdm Matlab Code Pdf
WITH MATLAB MIMO-OFDM Wireless Communications with MATLAB® Yong Soo Cho, Jaekwon. Orthogonal frequency division multiplexing. TK5103.484.M56 2010 621.384–dc22. 7.2.2 PAPR Reduction Code 231 7.2.3 Selective Mapping 233 7.2.4 Partial Transmit Sequence 234. MIMO-OFDM is a key technology for next-generation cellular communications (3GPP-LTE, Mobile WiMAX, IMT-Advanced) as well as wireless LAN (IEEE 802.11a, IEEE 802.11n), wireless PAN (MB-OFDM), and broadcasting (DAB, DVB, DMB). In MIMO-OFDM Wireless Communications with MATLAB®, the authors provide a comprehensive introduction to the theory and practice of wireless channel modeling, OFDM. Communication system. Now after forming MIMO-MC-CDMA using convolution code in MATLAB 1 we analyze system performance in different modulation schemes like, QPSK, 8-PSK, 8-QAM, 16-QAM, 32-QAM and 64-QAM in Rayleigh fading channel. Keywords: OFDM,CDMA,MIMO,MIMO-MC-CDMA and convolution code. Introduction Due to increased demand of high data. In this scenario multiple input and multiple output (MIMO) system combined with OFDM, make MIMO -OFDM techniques very attractive and productive for vehicle-to-vehicle communications. (MIMO) and orthogonal frequency division multiplexing (OFDM) are individually implemented and their characteristics are studied. An environment to simulate a combined MIMO-OFDM system using space time block coding (STBC) is constructed using MATLAB. The results of 2x2 and 4x4 MIMO-OFDM system are compared and analysed with the. WITH MATLAB MIMO-OFDM Wireless Communications with MATLAB® Yong Soo Cho, Jaekwon. 10.2.3 Space-Time Code Design 292 10.3 Space-Time Block Code (STBC) 294. OFDM MATLAB Code. This section of MATLAB source code covers OFDM transmitter and OFDM receiver basic chain coded in matlab. This page covers basic OFDM transmitter chain viz. Binary data source,data mapping,IFFT,CP insertion. This time domain data is passed to the channel and AWGN. The OFDM receiver consists of CP removal,FFT, data demapping.
- Mimo Ofdm Matlab Code Pdf Download
- Mimo Ofdm Matlab Code
- Ofdm Signal Generation In Matlab
- Mimo Ofdm Matlab Code Pdf Editor
- Ofdm Pdf
OFDM MATLAB Code
This section of MATLAB source code covers OFDM transmitter andOFDM receiver basic chain coded in matlab.
This page covers basic OFDM transmitter chain viz. binary data source,data mapping,IFFT,CP insertion.This time domain data is passed to the channel and AWGN. The OFDM receiver consists of CP removal,FFT,data demapping and decoding of the same data.
OFDM Transmitter part
clear all;
close all;
%...............................
% Initiation
%...............................
no_of_data_bits = 64%Number of bits per channel extended to 128
M =4 %Number of subcarrier channel
n=256;%Total number of bits to be transmitted at the transmitter
block_size = 16; %Size of each OFDM block to add cyclic prefix
cp_len = floor(0.1 * block_size); %Length of the cyclic prefix
%..............................
% Transmitter
%.............................
%.............................
% Source generation and modulation
%............................
% Generate random data source to be transmitted of length 64
data = randsrc(1, no_of_data_bits, 0:M-1);
figure(1),stem(data); grid on; xlabel('Data Points'); ylabel('Amplitude')
title('Original Data ')
% Perform QPSK modulation on the input source data
qpsk_modulated_data = pskmod(data, M);
figure(2),stem(qpsk_modulated_data);title('QPSK Modulation ')
%..............................
%...............................
% Converting the series data stream into four parallel data stream to form
% four sub carriers
S2P = reshape(qpsk_modulated_data, no_of_data_bits/M,M)
Sub_carrier1 = S2P(:,1)
Sub_carrier2 = S2P(:,2)
Sub_carrier3 = S2P(:,3)
Sub_carrier4 = S2P(:,4)
figure(3), subplot(4,1,1),stem(Sub_carrier1),title('Subcarrier1'),grid on;
subplot(4,1,2),stem(Sub_carrier2),title('Subcarrier2'),grid on;
subplot(4,1,3),stem(Sub_carrier3),title('Subcarrier3'),grid on;
subplot(4,1,4),stem(Sub_carrier4),title('Subcarrier4'),grid on;
%.................................
%.................................
% IFFT OF FOUR SUB_CARRIERS
%.................................
%...............................
number_of_subcarriers=4;
cp_start=block_size-cp_len;
ifft_Subcarrier1 = ifft(Sub_carrier1)
ifft_Subcarrier2 = ifft(Sub_carrier2)
ifft_Subcarrier3 = ifft(Sub_carrier3)
ifft_Subcarrier4 = ifft(Sub_carrier4)
figure(4), subplot(4,1,1),plot(real(ifft_Subcarrier1),'r'),
title('IFFT on all the sub-carriers')
subplot(4,1,2),plot(real(ifft_Subcarrier2),'c')
subplot(4,1,3),plot(real(ifft_Subcarrier3),'b')
subplot(4,1,4),plot(real(ifft_Subcarrier4),'g')
%..............................
%..............................
% ADD-CYCLIC PREFIX%.............................
%..............................
for i=1:number_of_subcarriers,
ifft_Subcarrier(:,i) = ifft((S2P(:,i)),16)% 16 is the ifft point
for j=1:cp_len,
cyclic_prefix(j,i) = ifft_Subcarrier(j+cp_start,i)
end
Append_prefix(:,i) = vertcat( cyclic_prefix(:,i), ifft_Subcarrier(:,i))
% Appends prefix to each subcarriers
end
A1=Append_prefix(:,1);
A2=Append_prefix(:,2);
A3=Append_prefix(:,3);
A4=Append_prefix(:,4);
figure(5), subplot(4,1,1),plot(real(A1),'r'),title('Cyclic prefix added to all the sub-carriers')
subplot(4,1,2),plot(real(A2),'c')
subplot(4,1,3),plot(real(A3),'b')
subplot(4,1,4),plot(real(A4),'g')
figure(11),plot((real(A1)),'r'),title('Orthogonality'),hold on ,plot((real(A2)),'c'),hold on ,
plot((real(A3)),'b'),hold on ,plot((real(A4)),'g'),hold on ,grid on
%Convert to serial stream for transmission
[rows_Append_prefix cols_Append_prefix]=size(Append_prefix)
len_ofdm_data = rows_Append_prefix*cols_Append_prefix
% OFDM signal to be transmitted
ofdm_signal = reshape(Append_prefix, 1, len_ofdm_data);
figure(6),plot(real(ofdm_signal)); xlabel('Time'); ylabel('Amplitude');
title('OFDM Signal');grid on;
%................................
Passing time domain data through channel and AWGN
channel = randn(1,2) + sqrt(-1)*randn(1,2);
after_channel = filter(channel, 1, ofdm_signal);
awgn_noise = awgn(zeros(1,length(after_channel)),0);
recvd_signal = awgn_noise+after_channel; % With AWGN noise
figure(7),plot(real(recvd_signal)),xlabel('Time'); ylabel('Amplitude');
title('OFDM Signal after passing through channel');grid on;
%..............................
OFDM receiver part
recvd_signal_paralleled = reshape(recvd_signal,rows_Append_prefix, cols_Append_prefix);
%............................
%............................
% Remove cyclic Prefix
%............................
%...........................
recvd_signal_paralleled(1:cp_len,:)=[];
R1=recvd_signal_paralleled(:,1);
R2=recvd_signal_paralleled(:,2);
R3=recvd_signal_paralleled(:,3);
R4=recvd_signal_paralleled(:,4);
figure(8),plot((imag(R1)),'r'),subplot(4,1,1),plot(real(R1),'r'),
title('Cyclic prefix removed from the four sub-carriers')
subplot(4,1,2),plot(real(R2),'c')
subplot(4,1,3),plot(real(R3),'b')
subplot(4,1,4),plot(real(R4),'g')
%..........................
%..........................
% FFT Of recievied signal
for i=1:number_of_subcarriers,
% FFT
fft_data(:,i) = fft(recvd_signal_paralleled(:,i),16);
end
F1=fft_data(:,1);
F2=fft_data(:,2);
F3=fft_data(:,3);
F4=fft_data(:,4);
figure(9), subplot(4,1,1),plot(real(F1),'r'),title('FFT of all the four sub-carriers')
subplot(4,1,2),plot(real(F2),'c')
subplot(4,1,3),plot(real(F3),'b')
subplot(4,1,4),plot(real(F4),'g')
%................
%...............
% Signal Reconstructed
%.................
%.................
% Conversion to serial and demodulationa
recvd_serial_data = reshape(fft_data, 1,(16*4));
qpsk_demodulated_data = pskdemod(recvd_serial_data,4);
figure(10)
stem(data)
hold on
stem(qpsk_demodulated_data,'rx');
grid on;xlabel('Data Points');ylabel('Amplitude');
title('Recieved Signal with error')
OFDM basic Tx-Rx Chain
The ofdm matlab code for the above block schematic is provided below for download.OFDM transmitter in this example consists of FEC encoder, BPSK modulator and 256 point IFFT.OFDM receiver part consists of FFT, BPSK demodulator and viterbi decoder.
BER curve for this OFDM matlab model is mentioned below taken after passing the transmitter data from AWGN channel.
BER Curve
DOWNLOAD Source Code
Download OFDM MATLAB source code files as per above block diagram. /papers-please-mac-download-ita.html.
Useful Links to MATLAB codes
Refer following as well as links mentioned on left side panel for useful MATLAB codes.
PTS for PAPR reduction
OFDM Preamble generation
Time off estimation corr
Freq off estimation corr
channel estimation
11a WLAN channel
11g WLAN channel
15.3 UWB channel
15.4a UWB channel
16d SUI Channel
16e wimax channel
Rician channel
RF and Wireless tutorials
Share this page
Translate this page
2x2 MIMO matlab code STBC matlab code
This page covers MIMO MATLAB code for OFDM modulation. The STBC matlab code for 2x1 MIMO and 2x2 MIMO configurations are mentioned.
STBC 2x1 MIMO MATLAB Code
The figure-1 depicts STBC 2x1 MIMO configurations. Following is the script for 2x1 MIMO matlab code.
clc;
clear all;
close all;
ndata=2; % number of randam data
x=randint(ndata,1,1); % input data generated
x=[1 2];
%y=[x];
%INPUT DATA BITS
Data_input_bit(1,1)=x(1,1)
Data_input_bit(1,2)=x(1,2)
figure;plot(Data_input_bit);title('input data bits');
%performing 4 qam modulation on the input data
z=qammod(Data_input_bit,4);
%CHANNEL COEFFICENTS MATRIX
h=[0.3 -.2];
%h11=1; h12=1; h21=1; h22=1;
%NOISE COEFFICENTS
e=[.1 .1];
%e11=1; e12=1; e21=1; e22=1;
out=zeros(10,1);
for i=1;%:ndata-1;
% Symbols at time period T;
out(i,1)=z(i);
out(i+1,1)=z(i+1);
% Symbols at time period T+1;
out(i,2)=-conj(z(i+1));
out(i+1,2)=conj(z(i));
%time_t2(i,1)=-conj(z(i+1));
%time_t2(i+1,1)=conj(z(i));
end
s1=out(i,1);
s2=out(i+1,1);
%for j=1:100
for i=1;
%Recieved data by RX1 Antenna at time interval T
r(1,1)= (h(1,1)*s1) + (h(1,2)*s2) + e(1,1);
%Recieved data by RX1 Antenna at time interval (T+1)
r(1,2)= ((-h(1,1))*conj(s2)) + (h(1,2)*conj(s1)) + e(1,2);
end
t(1,1)=((conj(h(1,1))*r(1,1)));
t(1,2)=h(1,2)*(conj(r(1,2)));
t(2,1)=((conj(h(1,2)))*r(1,1));
t(2,2)=((h(1,1)*(conj(r(1,2)))));
%Maximum Likelehhod Detection Scehme
s1_e =t(1,1) + t(1,2);
s2_e= t(2,1) - t(2,2);
%s1_e= ((conj(h(1,1))*r(1,1))) + ((h(1,2)*(conj(r(1,2)))+ );
%s2_e= (((conj(h(2,1)))*r(2,1)) + ((h(1,2)*(conj(r(2,2))));
%performing 4 QAM Demodulation
%final output bits
final_output_Bits(1,1)=qamdemod(s1_e,4)
final_output_Bits(1,2)=qamdemod(s2_e,4)
figure;plot(final_output_Bits);title('final output Bits');
STBC 2x2 MIMO MATLAB Code
The figure-2 depicts STBC 2x2 MIMO configurations. Following is the script for 2x2 MIMO matlab code.
clc;
clear all;
close all;
ndata=2; % number of randam data
x=randint(ndata,1,1); % input data generated
x=[2 3];
%y=[x];
%INPUT DATA BITS
Data_input_bit(1,1)=x(1,1)
Data_input_bit(1,2)=x(1,2)
%performing 16 qam modulation on the input data
z=qammod(Data_input_bit,4);
%CHANNEL COEFFICENTS MATRIX
h=[0.3 -.2 ;.1 .11];
%h11=1; h12=1; h21=1; h22=1;
%NOISE COEFFICENTS
e=[.1 .1;.1 .1];
%e11=1; e12=1; e21=1; e22=1;
out=zeros(10,1);
for i=1;%:ndata-1;
% Symbols at time period T;
out(i,1)=z(i);
out(i+1,1)=z(i+1);
% Symbols at time period T+1;
out(i,2)=-conj(z(i+1));
out(i+1,2)=conj(z(i));
%time_t2(i,1)=-conj(z(i+1));
%time_t2(i+1,1)=conj(z(i));
end
s1=out(i,1);
s2=out(i+1,1);
%for j=1:100
for i=1;
%Recieved data by RX1 Antenna at time interval T
r(1,1)= (h(1,1)*s1) + (h(1,2)*s2) + e(1,1);
%Recieved data by RX1 Antenna at time interval (T+1)
r(1,2)= ((-h(1,1))*conj(s2)) + (h(1,2)*conj(s1)) + e(1,2);
%Recieved data by RX2 Antenna at time interval T
r(2,1)= (h(2,1)*s1) + (h(2,2)*s2) + e(2,1);
%Recieved data by RX1 Antenna at time interval (T+1)
r(2,2)= ((-h(2,1))*conj(s2)) + (h(2,2)*conj(s1)) + e(2,2);
end
t(1,1)=((conj(h(1,1))*r(1,1)));
t(1,2)=h(1,2)*(conj(r(1,2)));
t(2,1)=((conj(h(2,1)))*r(2,1));
t(2,2)=((h(1,2)*(conj(r(2,2)))));
c(1,1)= ((conj(h(1,2)))*r(1,1));
c(1,2)= h(1,1)*(conj(r(1,2)));
c(2,1)= ((conj(h(2,2)))*r(2,1));
c(2,2)= ((h(2,1)*(conj(r(2,2)))));
%Maximum Likelehhod Detection Scehme
s1_e =t(1,1) + t(1,2) + t(2,1) + t(2,2);
s2_e= c(1,1) - c(1,2) + c(2,1) - c(2,2);
%s1_e= ((conj(h(1,1))*r(1,1))) + ((h(1,2)*(conj(r(1,2)))+ ((conj(h(2,1)))*r(2,1)) + ((h(1,2)*(conj(r(2,2)))));
%s2_e= ((conj(h(1,2)))*r(1,1)) - ((h(1,1)*(conj(r(1,2)))) + ((conj(h(2,2)))*r(2,1)) - ((h(2,1)*(conj(r(2,2)))));
%performing 16 QAM Demodulation
%final output bits
final_output_Bits(1,1)=qamdemod(s1_e,4)
final_output_Bits(1,2)=qamdemod(s2_e,4)
Download SISO, SIMO, MISO, MIMO MATLAB codes
Mimo Ofdm Matlab Code Pdf Download
Follow links below to download SISO, SIMO, MISO and MIMO MATLAB codes.
DOWNLOAD MIMO
DOWNLOAD SISO
DOWNLOAD SIMO
DOWNLOAD MISO
Mimo Ofdm Matlab Code
Useful Links to MATLAB codes
Refer following as well as links mentioned on left side panel for useful MATLAB codes.
OFDM Preamble generationTime off estimation corrFreq off estimation corrchannel estimation11a WLAN channelPN sequence generationOFDMA Tx RxAES DEScarrier aggregationCCDFFIR FilterIIR FilterLow Pass FIRViterbi decoderCRC8 CRC32