Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

matlab codes on mimo systems

Status
Not open for further replies.

aparna bhargava

Newbie level 1
Joined
Apr 17, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
gaziabad
Activity points
1,286
hey ,
please help me out i need the matlab codes for 1x2 , 2x1, 2x2 mimo systems comparing there performance on the ber vs eb/no plot.................please help me out if anhbody can provide me with these programs or atleast help me to know where will i get them
 

check this
**broken link removed**

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top