Hello There, Guest!
 Login  Register
 Login  Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

2x2 mimo ofdm channel estimation matlab code


#1

Can anybody please provide me MIMO-OFDM code for 16QAM?

Thanks
Soniya Kapur
 Reply
#2
(04-15-2017, 06:52 PM)rnagesh Wrote: Can anybody please provide me MIMO-OFDM code for 16QAM?

Thanks
Soniya Kapur


% function [ofdm chan] = MIMO_OFDM_LSE_CHAN_EST(ofdmIn,chanIn)
clc
clear all
close all
%% Parameters
   % system parameters (independent)
   ofdm.Nb      = 500;                 % number of blocks
   ofdm.Nt      = 1;                   % number of transmit antenna    
   ofdm.Nr      = 1;                   % number of receive antenna
   ofdm.K       = 200;                 % number of subcarriers    
   ofdm.G       = 1/4;                 % Guard interval percentage    
   ofdm.Mod     = 4;                   % QPSK Modulation    
   ofdm.PSpace  = 1;                   % pilot space between two pilots
   % channel parameters
   chan.L       = 6;                   % number of channel taps between each transmit-receive antenna
   
   % control parameters
   ofdm.ifDemodulateData = 1;          % (1,0) if 1, the code demodulates the transmitted data via LS algorithm, and calculates the BER
   ofdm.ifDisplayResults = 1;          % (1,0) if 1, displays the results in the command window
   
   % dependent parameters
   ofdm.PPos    = 1:(ofdm.PSpace+1):ofdm.K;    % OFDM pilot positionss    
   ofdm.PL      = length(ofdm.PPos);           % Length of pilot subcarriers  
   ofdm.DPos    = setxor(1:ofdm.K,ofdm.PPos);  % OFDM data positions      
   ofdm.DL      = length(ofdm.DPos);           % Length of data subcarriers  
   ofdm.BER     = 0;                           % set the BER to zero        
   
   % normalization of the energy for the constelation        %
   % normalization factor attainig process happends
       temp         = 0:ofdm.Mod-1;           % possible symbols
       temp         = qammod(temp,ofdm.Mod);  % modulated symbols
       temp         = abs(temp).^2;           % power of each point in the constellation
       temp         = mean(temp);             % average energy of the constellation
       ofdm.ModNorm = 1/sqrt(temp);           % normaliztion factor

chan.SNR_dB = [0 1 2 3 4 5 6 7 8 9 10];% EbN0 in dB

F11=randi(255,200,10);
Etxt=F11;
Etxt11=reshape(Etxt,2000,1);
Etxt_bin=de2bi(Etxt11,'left-msb');


for i = 1:length(chan.SNR_dB)
  % Make random data (0/1)
     ber64qam(i) = 0;
     
for dtlp=1:8
   tx=Etxt_bin(:,dtlp);
   %%
   %Interleaving coded data
   s2=size(tx',2);
   j=s2/4;
   matrix=reshape(tx,j,4);
   intlvddata = matintrlv(matrix',2,2)'; % Interleave.
   intlvddata=intlvddata';

   %% Binary to decimal conversion
   dec=bi2de(intlvddata','left-msb');
   %% 64-QAM Modulation
   y(1,:) = qammod(dec,16);
   for lp=1:200
       ofdm.dMod(lp,:)=y;
   end
%% Pilot insertion
   for nt = 1 : ofdm.Nt
       ofdm.dMod(ofdm.PPos,:,nt) = repmat(exp(-sqrt(-1)*2*pi*(nt-1)*chan.L*(1:ofdm.PL).'/ofdm.PL),1,ofdm.Nb);      %
   end
   % checking the power of the transmit signal (it has to be 1 after normalization)
       ofdm.pow = var(ofdm.dMod(:))+abs(mean(ofdm.dMod(:)))^2;
%% IFFT operation    
   ofdm.ifft   = zeros(ofdm.K,ofdm.Nb,ofdm.Nt);    % memory allocation for the ofdm blocks transmitted from each Tx antenna after ifft
   for nt = 1 : ofdm.Nt
       ofdm.ifft(:,:,nt) = sqrt(ofdm.K)*ifft(ofdm.dMod(:,:,nt),ofdm.K); % ifft is square root of the subcarrier values multiplied by ifft transformation
   end
%% Cyclic perfix
   % copy the end of signal to the begining of signal
   ofdm.ifftG = [ofdm.ifft(ofdm.K*(1-ofdm.G)+1:ofdm.K,:,:);ofdm.ifft]; % the gaurd intervel position is taken frm the 75 percent value of the original ifft data to final values of the data
%% Channel
   % for each block we generate a rayleigh fading MIMO channel which is fixed over a block
   
   chan.Coeff = 1/sqrt(2)*1/sqrt(chan.L)*(randn(ofdm.Nt,ofdm.Nr,chan.L,ofdm.Nb)+sqrt(-1)*randn(ofdm.Nt,ofdm.Nr,chan.L,ofdm.Nb));  
   Rhh=chan.Coeff;
%% Channel pass and filter
   chan.sigma   = sqrt(10^(-0.1*chan.SNR_dB(i))); % noise power
   if ofdm.K*ofdm.G < chan.L+1
       error('Guard interval is shorter than channel length, and the system does not function properly')
   end
   ofdm.Y = zeros(ofdm.K*(1+ofdm.G),ofdm.Nb,ofdm.Nr);
   % adding noise
   ofdm.Y = ofdm.ifftG + chan.sigma*1/sqrt(2)*(         randn(ofdm.K*(1+ofdm.G),ofdm.Nb,ofdm.Nr)+...
                                           sqrt(-1)*randn(ofdm.K*(1+ofdm.G),ofdm.Nb,ofdm.Nr)     );
%% Cyclic prefix removal
   ofdm.fftG = ofdm.Y(ofdm.K*ofdm.G+1:ofdm.K*(1+ofdm.G),:,:);
%% FFT operation
   ofdm.fft  = zeros(ofdm.K,ofdm.Nb,ofdm.Nr);
   for nr = 1 : ofdm.Nr
       ofdm.fft(:,:,nr)  = 1/sqrt(ofdm.K)*fft(ofdm.fftG(:,:,nr),ofdm.K);
   end
%% Channel estimation
   % building the first L columns of the fft matrix
   F = dftmtx(ofdm.K);
   F = F(:,1:chan.L);
   % Memory allocation for the estimated channel coefficients
   chan.CoeffEst = zeros(ofdm.Nt,ofdm.Nr,chan.L,ofdm.Nb);
   for nb = 1 : ofdm.Nb
       for nr = 1 : ofdm.Nr
           % Building matrix A (see the paper)
           chan.A = zeros(ofdm.PL,chan.L*ofdm.Nt);
           for nt = 1 : ofdm.Nt
               chan.A(:,(1:chan.L)+(nt-1)*chan.L) = diag(ofdm.dMod(ofdm.PPos,nb,nt))*F(ofdm.PPos,:);
           end
           ChanEst = pinv(chan.A)*ofdm.fft(ofdm.PPos,nb,nr);
           for nt = 1 : ofdm.Nt
               chan.CoeffEst(nt,nr,:,nb) = ChanEst((1:chan.L)+(nt-1)*chan.L);
           end
       end        
   end

%% Demodulation
   if ofdm.ifDemodulateData == 1 && ofdm.DL > 0
       % Building channel coefficients in frequency domain
       chan.CoeffEstFreq = zeros(ofdm.K,ofdm.Nt,ofdm.Nr,ofdm.Nb);
       for nb = 1 : ofdm.Nb
           for nr = 1 : ofdm.Nr
               for nt = 1 : ofdm.Nt
                   chan.CoeffEstFreq(:,nt,nr,nb) = F*squeeze(chan.CoeffEst(nt,nr,:,nb));
               end
           end
       end
       % demodulation
       ofdm.dDemod = zeros(ofdm.DL,ofdm.Nb,ofdm.Nt);
       for nb = 1 : ofdm.Nb
           for dl = 1 : ofdm.DL
               ofdm.dDemod(dl,nb,:) = pinv(reshape(chan.CoeffEstFreq(ofdm.DPos(dl),:,:,nb),ofdm.Nt,ofdm.Nr).')...
                                      *squeeze(ofdm.fft(ofdm.DPos(dl),nb,:));
           end
       end
%% detection
%% Demodulation
       dem_data= qamdemod(ofdm.dDemod,16);
%% Decimal to binary conversion
       bin=de2bi(dem_data(1,:)','left-msb');
       bin = imresize(bin,[500 4]);
       bin=bin';
%% De-Interleaving
       deintlvddata = matdeintrlv(bin,2,2); % De-Interleave
       deintlvddata=deintlvddata';
       rx=reshape(deintlvddata,2000,1);
           dtrxd(:,dtlp)=rx;
           
%             disp('processing ... ')
   end
end
   dtrxd = uint8(dtrxd);
   data_rxd=bi2de(dtrxd,'left-msb');
   ch_ext=reshape(data_rxd,200,10);
Dtext=ch_ext;
% Hacker scenario chaos code disabled
       hack_ext=reshape(data_rxd,200,10);
       
       F11_rp=reshape(F11,2000,1);
       Dtext_rp=reshape(Dtext,2000,1);
       hack_rp=reshape(hack_ext,2000,1);
       
%         F11_bin=de2bi(F11_rp);
%         hack_ext_bin=de2bi(hack_rp);
%         Dtext_bin=de2bi(Dtext_rp);
       
       Hacker_ber1x(i,:)=(length(find(F11_rp~=hack_rp)))/1000;
%         Hack_ber=
       orig_ue_ber1x(i,:)=(length(find(F11_rp~=Dtext_rp)))/(16*1000);
%         orig_ber=
end % for j`


% Get average of BER
%     disp(['BER :',num2str(berbpsk)]);
   save A11x Hacker_ber1x
   save B11x orig_ue_ber1x
% Plot the result
   semilogy(chan.SNR_dB, Hacker_ber1x, 'r*-');
   hold on
   semilogy(chan.SNR_dB, orig_ue_ber1x, 'g*-');
   xlabel('SNR [dB]')
   ylabel('MSE of LSE channel estimation')
   grid on
   legend('Nc=16 Eavesdropper','Nc=16 Legitimate');
%     title(['Nt = ',num2str(ofdm.Nt),', Nr = ',num2str(ofdm.Nr),',BPSK']);
 Reply
#3
In this paper, we create a framework for training-based channel estimation under different channel and interference statistics. The minimum mean square error (MMSE) estimator for channel matrix estimation in Rician fading multi-antenna systems is analyzed, and especially the design of mean square error (MSE) minimizing training sequences. By considering Kronecker-structured systems with a combination of noise and interference and arbitrary training sequence length, we collect and generalize several previous results in the framework. We clarify the conditions for achieving the optimal training sequence structure and show when the spatial training power allocation can be solved explicitly. We also prove that spatial correlation improves the estimation performance and establish how it determines the optimal training sequence length. The analytic results for Kronecker-structured systems are used to derive a heuristic training sequence under general unstructured statistics.

The MMSE estimator of the squared Frobenius norm of the channel matrix is also derived and shown to provide far better gain estimates than other approaches. It is shown under which conditions training sequences that minimize the non-convex MSE can be derived explicitly or with low complexity. Numerical examples are used to evaluate the performance of the two estimators for different training sequences and system statistics. We also illustrate how the optimal length of the training sequence often can be shorter than the number of transmit antennas.
 Reply
#4
Can anyone provide MIMO OFDM performance Improvement by Interleaving Technique ? Please
 Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Tagged Pages: mimo ofdm matlab,
Popular Searches: mimo ofdm seminar report, the mimo ofdm system in the 4g mobile communication ppt, decision directed channel estimation wiki, matlab code and abstracts channel estimation in ofdm, preamble based snr estimation in frequency selective channels for wireless ofdm systems matlab code, broadband mimo ofdm wireless communications with matlab free download, channel tracking in wireless ofdm systems with ppt downloadblet for conceiving,

Quick Reply
[-]
Message Type your reply to this message here.
Image VerificationPlease enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)


Possibly Related Threads...
Thread
Author
  /  
Last Post
Replies: 3
Views: 257
02-21-2021, 03:23 PM
Last Post: Guest
Replies: 1
Views: 1,082
06-03-2020, 08:49 AM
Last Post: Guest
Replies: 4
Views: 1,659
12-17-2018, 04:01 PM
Last Post: Guest
Replies: 2
Views: 934
10-19-2018, 12:22 PM
Last Post: Guest
Replies: 1
Views: 1,052
04-28-2018, 12:08 PM
Last Post: Guest
Replies: 2
Views: 913
01-12-2018, 06:27 AM
Last Postdhanabhagya
Replies: 2
Views: 1,345
01-06-2018, 09:57 AM
Last Postdhanabhagya
Replies: 4
Views: 1,054
11-08-2017, 05:27 AM
Last Postjaseela123
Replies: 3
Views: 927
09-26-2017, 04:43 AM
Last Postjaseela123

 
Forum Jump:


Users browsing this thread: 1 Guest(s)