ruwad
Newbie level 2
- Joined
- Mar 13, 2013
- Messages
- 2
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,283
- Activity points
- 1,350
hello,
I'm working in my Graduation Project on MIMO-OFDM Implementation using Matlab
i made the following code but i m a little lost , can't figure out what to do next ,
i generated the data , modulated them , then branched the data into 2 branches to be sent , but i cant figure out how to multiply the channel matrix by the modulated data matrix .....
check the code :
% Script for computing the BER of 2x2 MIMO OFDM System
% in Rayleigh Fading Channel with Zero Force Receiver.
% Note : Simulation Parameters are OFDM Specs for the IEEE 802.11a Standard
clear all
nFFT = 64; % fft size
nDSC = 52; % number of data subcarriers
nBitPerSym = 52; % number of bits per OFDM symbol (same as the number of subcarriers for BPSK)
nSym = 100; % number of symbols
totalBits = 2*nBitPerSym*nSym; % total number of Data Bits
bitsPerBranch = nBitPerSym*nSym; % total number of data Bits in each of the two branches
nTx = 2 ; nRx = 2 ; % 2x2 MIMO System
EbN0dB = [0:10]; % bit to noise ratio
EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80); % converting Bit Energy into Symbol energy
% Transmitter
ipBit = rand(1,totalBits) > 0.5; % random 1's and 0's , multiplied by 2 for the two branches of the transmitting Antennas
ipMod = 2*ipBit-1; % BPSK modulation 0 --> -1, 1 --> +1
ipMod1 = ipMod(1,1:bitsPerBranch); % 1st Branch Data
ipMod2 = ipMod(bitsPerBranch+1:totalBits); % 2nd Branch Data
ipMod1 = reshape(ipMod1,nBitPerSym,nSym).'; % 1st Branch grouping into multiple symbols and transposing as Pre-IFFT Stage
ipMod2 = reshape(ipMod2,nBitPerSym,nSym).'; % 2nd Branch grouping into multiple symbols and transposing as Pre-IFFT Stage
% Assigning modulated symbols to subcarriers from [-26 to -1, +1 to +26]
x1F = [zeros(nSym,6) ipMod1,[1:nBitPerSym/2]) zeros(nSym,1) ipMod1,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;
x2F = [zeros(nSym,6) ipMod2,[1:nBitPerSym/2]) zeros(nSym,1) ipMod2,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;
% Taking FFT, the term (nFFT/sqrt(nDSC)) is for normalizing the power of transmit symbol to 1
x1t = (nFFT/sqrt(nDSC))*ifft(fftshift(x1F.')).';
x2t = (nFFT/sqrt(nDSC))*ifft(fftshift(x1F.')).';
% Appending cylic prefix
x1t = [x1t,[49:64]) x1t];
x2t = [x2t,[49:64]) x2t];
% Generating White Gaussian Noise and the Rayleigh fading Channel parameters
N = 1/sqrt(2)*[randn(nRx,nSym/nTx) + j*randn(nRx,nSym/nTx)]; % white gaussian noise, 0dB variance
H = 1/sqrt(2)*[randn(nRx,nTx,nSym/nTx) + j*randn(nRx,nTx,nSym/nTx)]; % Rayleigh fading channel
any help here please ?
I'm working in my Graduation Project on MIMO-OFDM Implementation using Matlab
i made the following code but i m a little lost , can't figure out what to do next ,
i generated the data , modulated them , then branched the data into 2 branches to be sent , but i cant figure out how to multiply the channel matrix by the modulated data matrix .....
check the code :
% Script for computing the BER of 2x2 MIMO OFDM System
% in Rayleigh Fading Channel with Zero Force Receiver.
% Note : Simulation Parameters are OFDM Specs for the IEEE 802.11a Standard
clear all
nFFT = 64; % fft size
nDSC = 52; % number of data subcarriers
nBitPerSym = 52; % number of bits per OFDM symbol (same as the number of subcarriers for BPSK)
nSym = 100; % number of symbols
totalBits = 2*nBitPerSym*nSym; % total number of Data Bits
bitsPerBranch = nBitPerSym*nSym; % total number of data Bits in each of the two branches
nTx = 2 ; nRx = 2 ; % 2x2 MIMO System
EbN0dB = [0:10]; % bit to noise ratio
EsN0dB = EbN0dB + 10*log10(nDSC/nFFT) + 10*log10(64/80); % converting Bit Energy into Symbol energy
% Transmitter
ipBit = rand(1,totalBits) > 0.5; % random 1's and 0's , multiplied by 2 for the two branches of the transmitting Antennas
ipMod = 2*ipBit-1; % BPSK modulation 0 --> -1, 1 --> +1
ipMod1 = ipMod(1,1:bitsPerBranch); % 1st Branch Data
ipMod2 = ipMod(bitsPerBranch+1:totalBits); % 2nd Branch Data
ipMod1 = reshape(ipMod1,nBitPerSym,nSym).'; % 1st Branch grouping into multiple symbols and transposing as Pre-IFFT Stage
ipMod2 = reshape(ipMod2,nBitPerSym,nSym).'; % 2nd Branch grouping into multiple symbols and transposing as Pre-IFFT Stage
% Assigning modulated symbols to subcarriers from [-26 to -1, +1 to +26]
x1F = [zeros(nSym,6) ipMod1,[1:nBitPerSym/2]) zeros(nSym,1) ipMod1,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;
x2F = [zeros(nSym,6) ipMod2,[1:nBitPerSym/2]) zeros(nSym,1) ipMod2,[nBitPerSym/2+1:nBitPerSym]) zeros(nSym,5)] ;
% Taking FFT, the term (nFFT/sqrt(nDSC)) is for normalizing the power of transmit symbol to 1
x1t = (nFFT/sqrt(nDSC))*ifft(fftshift(x1F.')).';
x2t = (nFFT/sqrt(nDSC))*ifft(fftshift(x1F.')).';
% Appending cylic prefix
x1t = [x1t,[49:64]) x1t];
x2t = [x2t,[49:64]) x2t];
% Generating White Gaussian Noise and the Rayleigh fading Channel parameters
N = 1/sqrt(2)*[randn(nRx,nSym/nTx) + j*randn(nRx,nSym/nTx)]; % white gaussian noise, 0dB variance
H = 1/sqrt(2)*[randn(nRx,nTx,nSym/nTx) + j*randn(nRx,nTx,nSym/nTx)]; % Rayleigh fading channel
any help here please ?