Analysis: In the two simulations, channel two has better performance than channel 1. Also, the SNR
required to achieve less errors is smaller in the case of the equalizer with fewer taps. There is little
difference between MMSE and ZF equalizers but the errors seem to decrease for the MMSE.
Sm=[-3 -1 1 3];
s=zeros(1,length(Xint));
for i=1:length(Xint)
for j=1:4;
if Xint(1,i) == j
s(:,i) = Sm(:,j);
end
end
end
Yint1=zeros(1,length(Xint));
D1=zeros(1,4);
NE1=zeros(1,13);
Yint2=zeros(1,length(Xint));
D2=zeros(1,4);
NE2=zeros(1,13);
a=1:4;
for i=0:2:24
ypr01 = conv(y1,c1);
ypr1 = ypr01(k+(L1+1)/2:end);
yhat1 = ypr1(1:1:K);
ypr02 = conv(y2,c2);
ypr2 = ypr02(k+(L2+1)/2:end);
yhat2 = ypr2(1:1:K);
for j=1:length(Xint)
Y1=repmat(yhat1(:,j),1,M);
D1(1,a)=sqrt((Y1(1,:)-Sm(1,a)).^2);
[minD1,ind1]= min(D1);
Yint1(j)=ind1;
Y2=repmat(yhat2(:,j),1,M);
D2(1,a)=sqrt((Y2(1,:)-Sm(1,a)).^2);
[minD2,ind2]= min(D2);
Yint2(j)=ind2;
end
NE1(k/5,(i+2)/2)=length(find(Xint-Yint1));
NE2(k/5,(i+2)/2)=length(find(Xint-Yint2));
end
end
SER1=NE1/length(Xint);
SER2=NE2/length(Xint);
SNR=0:2:24;
semilogy(SNR,(SER1(1,:)),'*-')
title('Symbol error probability curve for ZF Equalizer');
xlabel('SNR [dB]');
ylabel('SER');
grid on;
hold on;
semilogy(SNR,(SER1(2,:)),'*-')
semilogy(SNR,(SER1(3,:)),'*-')
semilogy(SNR,(SER2(1,:)),'*-')
semilogy(SNR,(SER2(2,:)),'*-')
semilogy(SNR,(SER2(3,:)),'*-')
% upbound=zeros(1,13);
% for i=0:2:24
% upbound(1,(i+2)/2) = 2*((M-1)/M)*qfunc(sqrt(2*10^(i/10)*log2(M)*(sin(pi/M)^2)));%%%is the value
of i (SNR) correct???
% end
% semilogy(SNR,upbound,'*-')
%
% Nmin=2;
% lowbound=zeros(1,21);
% for i=0:20
% lowbound(1,i+1) = (Nmin/M)*qfunc(sqrt(2*10^(i/10)*log2(M)*(sin(pi/M)^2)));%%%is the value of i
(SNR) correct???
% end
% semilogy(SNR,lowbound,'*-')
%
legend('11-taps - Channel 1','21-taps - Channel 1','31-taps - Channel 1','11-taps - Channel
2','21-taps - Channel 2','31-taps - Channel 2');