Anybody please add rayleigh channel to the below program … to make it work in rayleigh flat fading channel environment ----pls very urgent because I need to submit very soon …..
Note : application of the program is for WLAN ( 802.11) and make some assumption no problem for me…. I need this program with rayleigh one…
clear
S=10000; % length of data
N=6; % assume M tx and N rx antennas (N>M)
M=4;
bsic=[];bzf=[];bmm=[];
data=randint(S,1,4) ; %generates an M-by-N matrix of random integers %
smod=qammod(data,4) ; %outputs the complex envelope of the modulation of the
% message signal X using - 4QAM%
for snr=0:4:25
rec=[];rzf=[];rmm=[];
a=10^(-snr/10);
for i=1:M:S
s=smod(i:i+M-1);
h1=randn(N,M,1);%randn function generates arrays of random numbers
%whose elements are normally distributed with mean 0, variance =1%
h=h1;
ref=1:M;
x=h*s; %data without noise
x=awgn(x,snr,'measured');% received data with noise
zf=pinv(h)*x;%zf equalizer
mm=inv(a.*eye(M,M)+h'*h)*h'*x;%mmse equalizer
rzf=[rzf qamdemod(zf,4)'];
rmm=[rmm qamdemod(mm,4)'];
end
[b1,b2]=symerr(data',rzf);
bzf=[bzf b2];
[b1,b2]=symerr(data',rmm);
bmm=[bmm b2];
end
semilogy(0:4:25,bmm,'blue');
hold on
semilogy(0:4:25,bzf,'green');
grid on
legend('bmm','bzf');
ylabel('Symbol Error Rate');
xlabel('SNR in dB');