- #1
thestrong
- 9
- 0
I am not seeing why my curve is not smooth. I normalized the data so it is not due to that. The partial LSE just assumes all other channels are part of the noise term (i.e. it performs worse than the full LSE model).
Code:
clear all;
close all;
clc;
%Parameters
M = 5; %base station antennas
K = 8; %number of users
tau = 4; %pilot length
SNR = 1:30; %range of SNR
TRIALS = 10000;
MSE = 0;
%pilots
% s_i = randn(tau, K);
% s_i = ones(tau, K); %all pilot sequences are non ortho
% s_i = 2*(randi(2, tau, K)-1) -1;
% s_i = s_i/tau;
% s_i = randi(2, tau, K) -1;
s_i = [1, 1, 1, 1, 1, 1, 1, 1;
1, 1, 1, 1, -1, -1, -1, -1;
1, 1, -1, -1, 1, 1, -1, -1;
1, -1, 1, -1, 1, -1, 1, -1;]
% s_i = triu(s_i)
% for j = 1:K
% v = s_i(:, j);
% for i = 1:j-1
% R(i, j) = Q(:,i)'* s_i(:,j);
% v = v - R(i, j)*Q(:,i);
% end
% R(j,j) = norm(v);
% Q(:, j) = v/R(j,j);
%
% end
for i = 1:K
S_i(:, : , i) = kron(s_i(:,i), eye(M));
end
for n = 1:size(SNR, 2);
for t = 1:TRIALS
%channel vector (not needed based on model)
h_i = randn(M, K);
%noise vector
z_i = 1/(sqrt(SNR(n)*2))*(rand(tau*M, 1) + 1i * rand(tau*M, 1));
%MSE
p_wbe = (K - tau)/((K-1)*tau); %using WBE, (roe_ij)^2
sum_hj = sum(h_i(:,2:end),2);
MSE_t = p_wbe*sum_hj + S_i(:, :, 1).'*z_i;
MSE_t = norm(MSE_t)^2;
MSE(TRIALS, n) = MSE_t;
end %end Trialsend %end SNR
MSE = sum(MSE,1)/TRIALS
MSE_dB = 10*log10(MSE)
figure, plot(MSE)
figure, plot(MSE_dB)
Last edited by a moderator: