5G NR物理层处理与MATLAB建模详解
1. MATLAB脚本中的预编码矩阵计算
在MATLAB脚本中,采用了理想的信道估计方法。预编码矩阵通过奇异值分解(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
该函数的主要步骤包括:
1. 计算分配的子载波索引。
2. 对分配的子载波上的信道估计值求平均。