5G NR物理层处理与MATLAB建模解析
1. 物理层处理与预编码矩阵计算
在MATLAB脚本中,采用了理想信道估计,通过奇异值分解(SVD)来确定预编码矩阵,因为SVD已知可实现MIMO信道容量。以下是获取预编码矩阵的 getPrecodingMatrix
局部函数:
function wtx = getPrecodingMatrix(PRBSet,NLayers,hestGrid)
% Calculate precoding matrix given an allocation and a channel
% estimate
% Allocated subcarrier indices
allocSc = (1:12)' + 12*PRBSet(:).';
allocSc = allocSc(:);
% Average channel estimate
[~,~,R,P] = size(hestGrid);
estAllocGrid = hestGrid(allocSc,:,:,:);
Hest = permute(mean(reshape(estAllocGrid,[],R,P)),[2 3 1]);
% SVD decomposition
[~,~,V] = svd(Hest);
wtx = V(:,1:NLayers).';
end
该函数的输入参数包括PRB集合、层数和信道估计网格,通过一系列计算得到预编码矩阵。