Borrar filtros
Borrar filtros

Related to MATLAB code of signal detection using Maximum likelihood detector in GSSK modulation based MIMO system.

4 visualizaciones (últimos 30 días)
Hello all, I had written the code for signal detection using Maximum likelihood detector in GSSK modulation based MIMO system as mentioned in the following link: https://dsp.stackexchange.com/questions/87353/understanding-maximum-likelihood-detector-expression/87437?noredirect=1#comment192939_87437
My query is that the program is running properly but bit error rate (BER) is not decreasing with increase in signal to noise ratio (SNR).
Any help in this regard will be highly appreciated.
% For ML detector
% This is only for Nt = 8 antennas
% This is with SIC consideration
clc;
clear all;
close all;
%% Initializations
L = 500; % total number of time slots
N_t = 8; N_r = 2; N_s = 1; n_t = 2;M_1 = nchoosek(N_t,n_t); M = floor(log2(M_1));
N = 2^M; Labels = N; v_H = 1; No = 1; v_S = 1; al = 0.5;
SNRdB = 0:3:21;
error_ML = [];
for snr = 1:length(SNRdB)
snr
X = []; Wn =[]; Y = []; AA_nrm = []; x_4nrm = [];
varNoise = 1/10^(SNRdB(snr)/10);
for sl = 1:L % for loop of slots
sl
xs = sqrt(v_S/2)*(randn(1,1)+1i*randn(1,1));
Hst = sqrt(v_H/2)*(randn(N_t,N_s)+1i*randn(N_t,N_s));
x_1 = al*Hst.*[xs xs 0 0 0 0 0 0 ]'; x_2 = al*Hst.*[xs 0 xs 0 0 0 0 0 ]'; x_3 = al*Hst.*[xs 0 0 xs 0 0 0 0 ]'; x_4 = al*Hst.*[xs 0 0 0 xs 0 0 0 ]';
x_5 = al*Hst.*[xs 0 0 0 0 xs 0 0 ]'; x_6 = al*Hst.*[xs 0 0 0 0 0 xs 0 ]'; x_7 = al*Hst.*[xs 0 0 0 0 0 0 xs ]'; x_8 = al*Hst.*[0 xs xs 0 0 0 0 0 ]';
x_9 = al*Hst.*[0 xs 0 xs 0 0 0 0 ]'; x_10 = al*Hst.*[0 xs 0 0 xs 0 0 0 ]'; x_11 = al*Hst.*[0 xs 0 0 0 xs 0 0 ]'; x_12 = al*Hst.*[0 xs 0 0 0 0 xs 0 ]';
x_13 = al*Hst.*[0 xs 0 0 0 0 0 xs]'; x_14 = al*Hst.*[0 0 xs xs 0 0 0 0]'; x_15 = al*Hst.*[0 0 xs 0 xs 0 0 0]'; x_16 = al*Hst.*[0 0 xs 0 0 xs 0 0]';
X_GSSK = [x_1 x_2 x_3 x_4 x_5 x_6 x_7 x_8 x_9 x_10 x_11 x_12 x_13 x_14 x_15 x_16];
pos = randi(length(X_GSSK));
x = X_GSSK(:,pos); % This is transmitted signal
X = [X, x];
AWGN = sqrt(varNoise/2)*(randn(N_r,1)+1i*randn(N_r,1));
Wn = [Wn, AWGN];
Htr = sqrt(v_H/2)*(randn(N_r,N_t)+1i*randn(N_r,N_t));
y_r_1 = (Htr*x);
y_r = y_r_1+AWGN; % Received Signal with other way
Y = [Y, y_r];
x_4nrm = [x_4nrm,x];
end
A = Y-(Htr*X); % As per the given link, 'A' is coming from eq (2)
A_nr = vecnorm(A,2);
AA_nrm = A_nr.^2;
[min_nrm, min_nrm_idx] = min(AA_nrm);
x_hat = x_4nrm(:,min_nrm_idx);
k_hat = find(x_hat);
%
rows_to_match = k_hat';
nz = X ~= 0;
pattern = false(height(X),1);
pattern(rows_to_match) = true;
matching_column_mask = all(nz == pattern, 1);
sum_match_col = sum(matching_column_mask);
error_ML_1 = L- (sum_match_col);
error_ML = [error_ML,error_ML_1];
end

Respuestas (0)

Categorías

Más información sobre Link-Level Simulation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by