1. 程式人生 > 實用技巧 >CCS - Error Rate Performance of the Detectors

CCS - Error Rate Performance of the Detectors

Simulation of MIMO Systems

Perform a Monte Carlo simulation to assess the error rate performance of an
(Ny,NR) MIMO system in a Rayleigh fading AWGN channel.

Matlab Coding

 1 % MATLAB script for the 2T2R MIMO system
 2 
 3 Nt = 2;                                 % No. of transmit antennas
 4 Nr = 2
; % No. of receive antennas 5 S = [1 1 -1 -1; 1 -1 1 -1]; % Reference codebook 6 Eb = 1; % Energy per bit 7 EbNo_dB = 0:5:30; % Average SNR per bit 8 No = Eb*10.^(-1*EbNo_dB/10); % Noise variance
9 BER_ML = zeros(1,length(EbNo_dB)); % Bit-Error-Rate Initialization 10 BER_MMSE = zeros(1,length(EbNo_dB)); % Bit-Error-Rate Initialization 11 BER_ICD = zeros(1,length(EbNo_dB)); % Bit-Error-Rate Initialization 12 13 % Maximum Likelihood Detector: 14 % echo off; 15 for i = 1:length(EbNo_dB)
16 no_errors = 0; 17 no_bits = 0; 18 while no_errors <= 100 19 mu = zeros(1,4); 20 s = 2*randi([0 1],Nt,1) - 1; 21 no_bits = no_bits + length(s); 22 H = (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr); 23 noise = sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1)); 24 y = H*s + noise; 25 for j = 1:4 26 mu(j) = sum(abs(y - H*S(:,j)).^2); % Euclidean distance metric 27 end 28 [Min idx] = min(mu); 29 s_h = S(:,idx); 30 no_errors = no_errors + nnz(s_h-s); 31 end 32 BER_ML(i) = no_errors/no_bits; 33 end

34 % echo on; 35 % Minimum Mean-Sqaure-Error (MMSE) Detector: 36 echo off; 37 for i = 1:length(EbNo_dB) 38 no_errors = 0; 39 no_bits = 0; 40 while no_errors <= 100 41 s = 2*randi([0 1],Nt,1) - 1; 42 no_bits = no_bits + length(s); 43 H = (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr); 44 noise = sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1)); 45 y = H*s + noise; 46 w1 = (H*H' + No(i)*eye(Nr))^(-1) * H(:,1); % Optimum weight vector 1 47 w2 = (H*H' + No(i)*eye(Nr))^(-1) * H(:,2); % Optimum weight vector 2 48 W = [w1 w2]; 49 s_h = W'*y; 50 for j = 1:Nt 51 if s_h(j) >= 0 52 s_h(j) = 1; 53 else 54 s_h(j) = -1; 55 end 56 end 57 no_errors = no_errors + nnz(s_h-s); 58 end 59 BER_MMSE(i) = no_errors/no_bits; 60 end
61 %echo on; 62 63 % Inverse Channel Detector: 64 % echo off; 65 for i = 1:length(EbNo_dB) 66 no_errors = 0; 67 no_bits = 0; 68 while no_errors <= 100 69 s = 2*randi([0 1],Nt,1) - 1; 70 no_bits = no_bits + length(s); 71 H = (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr); 72 noise = sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1)); 73 y = H*s + noise; 74 s_h = H\y; 75 for j = 1:Nt 76 if s_h(j) >= 0 77 s_h(j) = 1; 78 else 79 s_h(j) = -1; 80 end 81 end 82 no_errors = no_errors + nnz(s_h-s); 83 end 84 BER_ICD(i) = no_errors/no_bits; 85 end 86 % echo on;
87 % Plot the results: 88 semilogy(EbNo_dB,BER_ML,'-o',EbNo_dB,BER_MMSE,'-*',EbNo_dB,BER_ICD) 89 xlabel('Average SNR/bit (dB)','fontsize',10) 90 ylabel('BER','fontsize',10) 91 legend('ML','MMSE','ICD')


Simulation Results,

 1 % MATLAB script for 2T3R MIMO system
 2 
 3 Nt = 2;                                 % No. of transmit antennas
 4 Nr = 3;                                 % No. of receive antennas
 5 S = [1 1 -1 -1; 1 -1 1 -1];             % Reference codebook
 6 Eb = 1;                                 % Energy per bit
 7 EbNo_dB = 0:5:30;                       % Average SNR per bit
 8 No = Eb*10.^(-1*EbNo_dB/10);            % Noise variance
 9 BER_ML = zeros(1,length(EbNo_dB));      % Bit-Error-Rate Initialization
10 BER_MMSE = zeros(1,length(EbNo_dB));    % Bit-Error-Rate Initialization
11 12 
13 % Maximum Likelihood Detector:
14 echo off;
15 for i = 1:length(EbNo_dB)
16     no_errors = 0;
17     no_bits = 0;
18     while no_errors <= 100
19         mu = zeros(1,4);
20         s = 2*randi([0 1],Nt,1) - 1;
21         no_bits = no_bits + length(s);
22         H = (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr);
23         noise = sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1));
24         y = H*s + noise;
25         for j = 1:4
26             mu(j) = sum(abs(y - H*S(:,j)).^2);  % Euclidean distance metric
27         end
28         [Min idx] = min(mu);
29         s_h = S(:,idx);
30         no_errors = no_errors + nnz(s_h-s);
31     end
32     BER_ML(i) = no_errors/no_bits;
33 end
34 echo on;
35 
36 % Minimum Mean-Sqaure-Error (MMSE) Detector:
37 echo off;
38 for i = 1:length(EbNo_dB)
39     no_errors = 0;
40     no_bits = 0;
41     while no_errors <= 100
42         s = 2*randi([0 1],Nt,1) - 1;
43         no_bits = no_bits + length(s);
44         H = (randn(Nr,Nt) + 1i*randn(Nr,Nt))/sqrt(2*Nr);
45         noise = sqrt(No(i)/2)*(randn(Nr,1) + 1i*randn(Nr,1));
46         y = H*s + noise;
47         w1 = (H*H' + No(i)*eye(Nr))^(-1) * H(:,1); % Optimum weight vector 1
48         w2 = (H*H' + No(i)*eye(Nr))^(-1) * H(:,2); % Optimum weight vector 2
49         W = [w1 w2];
50         s_h = W'*y;
51         for j = 1:Nt
52             if s_h(j) >= 0
53                 s_h(j) = 1;
54             else
55                 s_h(j) = -1;
56             end
57         end
58         no_errors = no_errors + nnz(s_h-s);
59     end
60     BER_MMSE(i) = no_errors/no_bits;
61 end
62 echo on;
63 
64 % Plot the results:
65 semilogy(EbNo_dB,BER_ML,'-o',EbNo_dB,BER_MMSE,'-*')
66 xlabel('Average SNR/bit (dB)','fontsize',10)
67 ylabel('BER','fontsize',10)
68 legend('ML','MMSE')

Simulation Result

Conclusion

It is can be seen from the simulation results that the MLD exploits
the full diversity of order NR available in the received signal and, thus, its performance
is comparable to that of a maximal ratio combiner (MRC) of the NR received signals,
without the presence of interchannel interference; that is, (Ny, NR) = (1, NR). The two
linear detectors, the MMSE detector and the ICD, achieve an error rate that decreases
inversely as the SNR raised to the (NR - 1) power for Ny = 2 transmitting antennas.
Thus, when NR = 2, the two linear detectors achieve no diversity, and when NR = 3,
the linear detectors achieve dual diversity. We also note that the MMSE detector outperforms
the ICD, although both achieve the same order of diversity. In general, with
spatial multiplexing (Ny antennas transmitting independent data streams), the MLD
detector achieves a diversity of order NR and the linear detectors achieve a diversity
of order NR - Ny+ 1, for any NR>= Ny. In effect, with Ny antennas transmitting
independent data streams and NR receiving antennas, a linear detector has NR degrees
of freedom. In detecting any one data stream, in the presence of Ny - 1 interfering
signals from the other transmitting antennas, the linear detectors utilize Ny -1 degrees
of freedom to cancel the Ny - 1 interfering signals. Therefore, the effective order of
diversity for the linear detectors is NR - (Ny -1) = NR - Ny+ 1.

It is interesting to compare the computational complexity of the three detectors.
We note that the complexity of the MLD grows exponentially as Af Nr, where M is the
number of points (symbols) in the signal constellation, whereas the linear detectors
have a complexity that grows linearly with Ny and NR. Therefore, the computational
complexity of the MLD is significantly larger than that of the linear detectors when
Ny and M are large. However, for a small number of transmit antennas and small
number of signal constellation symbols (i.e., Ny .:::; 4 and M = 4), the computational
complexity of MLD is rather reasonable.

Reference,

  1.<<Contemporary Communication System using MATLAB>> -John G. Proakis