Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

MATLAB coding for MIMO systems

Status
Not open for further replies.

kalaimathi

Newbie level 3
Joined
Jan 24, 2011
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,296
hi all
could anyone please tell me where can i get matlab coding for ML detection for 4x4 MIMO using MMSE I HAVE TO COMPARE THE ML PERFORMANCE USING MMSE WITH ZF AND MRC THAT IS PLOTTING BER VS SNR FOR 4X4 MIMO :|
please help
 

pashasrp67

Newbie level 1
Joined
Jan 6, 2011
Messages
1
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,283
Activity points
1,296
This is the code for 2*2 MIMO system, which employs BPSK Modulation.


Eb_N0_dB= 0:32; % multiple Eb/N0 values
nTx = 2;
nRx = 2;
M=input('Enter the M Value for M-Ary: \n');
% Transmitter
[c t]=Rayleigh_Calculation(M);
figure,plot(t,c);
ip= rand(1,N)>0.5; % generating 0,1 with equal probability
tt=N/M;
s = 2*ip-1;
for ii = 1:length(Eb_N0_dB)

sMod = kron(s,ones(nRx,1)); %
sMod = reshape(sMod,[nRx,nTx,M/nTx]); % grouping in [nRx,nTx,N/NTx ] matrix

h = 1/sqrt(2)*[randn(nRx,nTx,M/nTx) + j*randn(nRx,nTx,M/nTx)]; % Rayleigh channel
n = 1/sqrt(2)*[randn(nRx,M/nTx) + j*randn(nRx,M/nTx)]; % white gaussian noise, 0dB variance
y = squeeze(sum(h.*sMod,2)) + 10^(-Eb_N0_dB(ii)/20)*n;

% Receiver
inv(H^H*H+sigma^2*I)*H^H
hCof = zeros(2,2,M/nTx) ;
hCof(1,1,:) = sum(h:),2,:).*conj(h:),2,:)),1) + 10^(-Eb_N0_dB(ii)/10); hCof(2,2,:) = sum(h:),1,:).*conj(h:),1,:)),1) + 10^(-Eb_N0_dB(ii)/10); hCof(2,1,:) = -sum(h:),2,:).*conj(h:),1,:)),1); % c term
hCof(1,2,:) = -sum(h:),1,:).*conj(h:),2,:)),1); % b term
hDen = ((hCof(1,1,:).*hCof(2,2,:)) - (hCof(1,2,:).*hCof(2,1,:))); % ad-bc term
hDen = reshape(kron(reshape(hDen,1,M/nTx),ones(2,2)),2,2,M/nTx); % formatting for division
hInv = hCof./hDen; % inv(H^H*H)

hMod = reshape(conj(h),nRx,M); % H^H operation

yMod = kron(y,ones(1,2)); % formatting the received symbol for equalization
yMod = sum(hMod.*yMod,1); % H^H * y
yMod = kron(reshape(yMod,2,M/nTx),ones(1,2)); % formatting
yHat = sum(reshape(hInv,2,M).*yMod,1); % inv(H^H*H)*H^H*y
ipHat = real(yHat)>0;
nErr(ii) = size(find([ip- ipHat]),2);

end
end
 

kalaimathi

Newbie level 3
Joined
Jan 24, 2011
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,296
@pashasrp67 thanks for you help and could you please tell me where can i get the matlab coding for 4x4 mimo using mmse and the modulation is QAM
 

dhekoura

Newbie level 3
Joined
Jul 11, 2013
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
63
This code is for 4QAM modulation , it help you to understand this modulation and use this function to complete your code:
function s=modulation_4_qam(m,n)
%modulation 4 qam
i=sqrt(-1);
for I=0:n-1,
if m(2*I+1)==1 & m(2*I+2)==1 s(I+1)=-1-i;
elseif m(2*I+1)==1 & m(2*I+2)==-1 s(I+1)=-1+i;
elseif m(2*I+1)==-1 & m(2*I+2)==1 s(I+1)=1-i;
else s(I+1)=1+i;
end
end
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top