认识LTE(八):LTE中的反馈:闭环空分复用(TM4)

发布于:2023-01-11 ⋅ 阅读:(835) ⋅ 点赞:(0)

认识LTE(八):LTE中的反馈:闭环空分复用(TM4)

零.代码地址

https://github.com/liu-zongxi/LTE_simulation

请大家看完觉得有用别忘了点赞收藏,github项目给star哦

一.TM4到底反馈了什么?

这其实是很容易反馈的一个问题,反馈的就是CSI,CSI中包含三个东西CQI,PMI以及RI

这其中,CQI和RI是类似的东西,他反馈的本质上是SINR,CQI是根据SINR映射了MCS,这包括调制方式以及码率;RI就是根据SINR反馈了层数,信道条件不是很好就层数少一点。

PMI是比较特殊的,他反馈的是预编码矩阵,在MIMO中预编码矩阵的作用就是使得每个数据流之前的分别大一些,在TM3中,这使用的是CDD技术,它本质上是根据经验蒙的预编码矩阵,有了PMI,我们就可以根据信道反馈应该使用码本中的哪个矩阵。

二.CQI反馈

书中SINR的计算很暴力,跑起来会有突变,我也不知道咋解决。。。希望有大神能指点一二

image-20220819182214321

image-20220819182255461

image-20220819182312072

function sinr=CQIselection(bits, equalized,  nS, prmLTEDLSCH, prmLTEPDSCH)
%#codegen
% 这是在接收机的操作
% 首先把原数据恢复到调制完成后的状态
tbCrcOut1 =CRCgenerator(bits);
% Channel coding includes - CB segmentation, turbo coding, rate matching,
% bit selection, CB concatenation - per codeword
data = lteTbChannelCoding(tbCrcOut1, nS, prmLTEDLSCH, prmLTEPDSCH);
%Scramble codeword
scramOut = lteScramble(data, nS, 0, prmLTEPDSCH.maxG);
% Modulate
modOut = Modulator(scramOut, prmLTEPDSCH.modType);
% Map modulated symbols  to layers
LayerMapOut = LayerMapper(modOut, [], prmLTEPDSCH);
% Compute post-detection error
error=LayerMapOut-equalized;
% SINR,这是一个近似,并不是真正的信干燥比
sinr=10*log10(var(modOut(:))./var(error(:)));

function [Ms, Cr]=CQI2indexMCS(sinr)
%#codegen
% Table of SINR threshold values, 15 boundary points for an unbounded quantizer
% SINR的标准点,也就是说LTE给出了这些SINR下的码率和调制方式
thresh=[-6.7,-4.7,-2.3,0.2,2.4,4.3,5.9,8.1,10.3,11.7,14.1,16.3,18.7,21,22.7];
% Table of coding rate (16 value)
Map2CodingRate=[0.076, 0.076, 0.117, 0.188, 0.301, 0.438, 0.588, 0.369, 0.479,...
0.602, 0.455, 0.554, 0.650, 0.754, 0.853, 0.926];
% Table of modulation type (1=QPSK, 2=QAM16, 3=QAM64)
Map2Modulator=[1*ones(7,1);2*ones(3,1);3*ones(6,1)];
persistent hQ
if isempty(hQ)
    hQ=dsp.ScalarQuantizerEncoder(...
        'Partitioning', 'Unbounded',...
        'BoundaryPoints',  thresh,...
        'OutputIndexDataType','uint8');
end
indexCQI=step(hQ, sinr);
index1=indexCQI+1;                   % 1-based indexing
% Map CQI index to modulation type
Ms = Map2Modulator (index1);
% Map CQI index to coding rate
Cr = Map2CodingRate (index1);
if Cr < 1/3, Cr=1/3;end

二.PMI

我个人认为本书中的PMI反馈是存在严重错误的!但是我并没能成功的修正他,本书PMI反馈主要参考的是ICC这篇Link Adaptation in Linearly Precoded Closed-Loop MIMO-OFDM Systems with Linear Receivers,其中SINR是这样计算的

image-20220819182724676

首先这个公式就让我匪夷所思,矩阵怎么做除法呢?

matlab中的实现更是让人匪夷所思

function Gamma = Sinr_MMSE(chEst, nVar, Wn)
%#codegen
% SINR computation:
%   Based on received channel estimates
% Per layer noise variance 
% Precoder matrix 
% Uses the MMSE detector.
% Get params
% persistent Gmean
% if isempty(Gmean), Gmean=dsp.Mean('RunningMean', true);end
persistent Gmean;
if isempty(Gmean), Gmean = dsp.MovingAverage;end
% noisFac = diag(nVar);
noisFac = diag(nVar);
numData = size(chEst, 1);
numLayers = size(Wn,1);
F = inv(Wn);
%% MMSE receiver
for n = 1:numData
    h = chEst(n, :, :);                         % numTx x numRx
    h = reshape(h(:), numLayers, numLayers).';  % numRx x numTx
    Ht= inv((F'*(h'*h)*F) + noisFac);
    % Post-detection SINR
    % g=real((1./(diag(Ht).*(nVar.')))-1);
    g=real((1./(diag(Ht).*(nVar.')))-1);
    % Gamma = mean(g)
    % Gamma=step(Gmean,g);
    Gamma = step(Gmean,g);
end
reset(Gmean);

这明显是不对的!我自己尝试修改也没能解决这个问题,BER完全没有下降,所以这里就不献丑了。。。希望有大神指点!

三.RI

image-20220819183028111

本书中RI是用cond估计了信道状况,然后平均下来和阈值进行比较,非常简单就不详述了

function y = RIestimate(Q)
%#codegen
y=cond(Q);
% x=abs(eig(Q));
% y=max(x)/min(x);
function y=RIselection(Ri, threshold)
% RI estimation
if Ri > threshold
    y = 4;
else
    y=2;
end
function [y, ri] = MIMOReceiver_ZF_ri(in, chEst, Wn)
%#codegen
% MIMO Receiver:
%   Based on received channel estimates, process the data elements
%   to equalize the MIMO channel. Uses the ZF detector.
% Get params
numData = size(in, 1);
y = complex(zeros(size(in)));
ri=zeros(numData,1);
iWn = inv(Wn);
%% ZF receiver
for n = 1:numData
    h = squeeze(chEst(n, :, :)); % numTx x numRx
    h = h.';                     % numRx x numTx
    ri(n) = RIestimate(h);
    Q = inv(h);
    x = Q * in(n, :).';%#ok
    tmp = iWn * x; %#ok
    y(n, :) = tmp.';
end

四.总结

总的来说,这张的仿真是非常失败的。。。。跑出来的结果都不对,后面用到别的仿真系统再做尝试吧。。。

本文含有隐藏内容,请 开通VIP 后查看

网站公告

今日签到

点亮在社区的每一天
去签到