Generating Uncorrelated fading channel coefficients using complex gaussian distribution ~CN(0,1)

23 visualizaciones (últimos 30 días)
I donot have communication toolbox for this. I want to generate channel state information or channel coefficients randomly from complex gaussian distribution. The values of my channel coefficients must be uncorrelated to each other. How shall I implement this?(like the rayleigh fading model)
I have implemented a function which gives me complex numbers as channel coefficient matrix. But I want my channels to be uncorrelated to each other. How can i fix this?
function result =channel(R,T)
rp=1/sqrt(2)*randn(R,T);
imgp=1/sqrt(2)*randn(R,T);
result=rp+1j*imgp;
end
%function to generate complex gaussian distributed channel coefficients
%~CN(0,1)
%the channel coefficients must be uncorrelated
%it is a fading channel model

Respuestas (1)

Shashi Kiran
Shashi Kiran el 19 de Ag. de 2024
Hi @Kavya,
I understand that you want to generate uncorrelated channel coefficients randomly from complex gaussian distribution. Since you're using randn to generate these coefficients, according to the MATLAB documentation for randn(https://www.mathworks.com/help/matlab/ref/randn.html?s_tid=doc_ta#mw_6dadd167-e8bc-42bb-9aaa-9bcfb97f6815), the function produces independent Gaussian random variables. Here is the basic difference between Uncorrelatedness and Independence,
  • Uncorrelated: There is no predictable relationship between the two variables, and the covariance between them is zero.
  • Independent: Knowing one variable gives no information about the other, and the two variables are completely unrelated.
In probability theory, if variables are independent, they’re automatically uncorrelated. So, because randn generates independent coefficients, they are naturally uncorrelated.
Below is the way to check the uncorrelatedness of the generated channel
function result = channel(R, T)
% Generate Normally distributed variables
rp = (1/sqrt(2)) * randn(R, T);
imgp = (1/sqrt(2)) * randn(R, T);
result = rp + 1j * imgp;
end
% Checking the uncorrelation
R = 1000; % Receivers
T = 1000; % Transmitters
H = channel(R, T);
% Compute covariance matrices for the real and imaginary parts across rows
cov_matrix_real = cov(real(H).');
cov_matrix_imag = cov(imag(H).');
% Extract only off-diagonal elements (non-self covariances)
off_diag_real = cov_matrix_real(~eye(size(cov_matrix_real)));
off_diag_imag = cov_matrix_imag(~eye(size(cov_matrix_imag)));
% Calculate the mean of off-diagonal elements
off_diag_mean_real = mean(off_diag_real);
off_diag_mean_imag = mean(off_diag_imag);
disp(['Mean off-diagonal covariance of real parts: ', num2str(off_diag_mean_real)]);
Mean off-diagonal covariance of real parts: 4.7052e-06
disp(['Mean off-diagonal covariance of imaginary parts: ', num2str(off_diag_mean_imag)]);
Mean off-diagonal covariance of imaginary parts: 8.6303e-06
The covariance is close to zero, which suggests that the generated channel coefficients are uncorrelated.
Refer the below sources for further information.
  1. https://www.mathworks.com/help/matlab/ref/randn.html?s_tid=doc_ta#mw_6dadd167-e8bc-42bb-9aaa-9bcfb97f6815
  2. https://www.mathworks.com/help/matlab/ref/conv.html
  3. https://libanswers.lib.miamioh.edu/stats-faq/faq/343636#:~
Hope this solves your query.

Categorías

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

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by