# A question for the PMI calculation in +feedback/ClsmFeedback.m

**URL:** <https://vccsforum.nt.tuwien.ac.at/t/a-question-for-the-pmi-calculation-in-feedback-clsmfeedback-m/490>\
**Category:** Vienna 5G System Level Simulator\
**Created:** [March 8, 2025, 3:24pm UTC](https://vccsforum.nt.tuwien.ac.at/t/a-question-for-the-pmi-calculation-in-feedback-clsmfeedback-m/490 "2025-03-08T15:24:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Jay](https://vccsforum.nt.tuwien.ac.at/letter_avatar_proxy/v4/letter/n/6a8cbe/32.png) [@Nick\_Jay](https://vccsforum.nt.tuwien.ac.at/u/Nick_Jay)\
**Post date:** [March 8, 2025, 3:24pm UTC](https://vccsforum.nt.tuwien.ac.at/t/a-question-for-the-pmi-calculation-in-feedback-clsmfeedback-m/490/1 "2025-03-08T15:24:47Z")

</div>

Hello,  
I am currently focusing on the feedback of system simulation. It seems there is a mistake in the function " [pmi, SINRchosen] = calculatePMIlayer(obj, codeBook, iRBFreq) " of +feedback/ClsmFeedback.m. Therefore, I checked the paper cited by this function, " Calculation of the spatial preprocessing and link adaption feedback for 3GPP UMTS/LTE ".  
I list three lines of cods of the function below that I think exit mistakes along with the corresponding equations in the cited paper.

 ![function](https://vccsforum.nt.tuwien.ac.at/uploads/default/original/1X/5b49132bc77a3a5431a5c764f26db317cef4dbbf.png)  
 ![paper](https://vccsforum.nt.tuwien.ac.at/uploads/default/original/1X/16bd1717b988222afcffa96171090114d735089d.png)  
The first line of code " I = reshape(sum(log2(1+SINR), 1), nPrecoder, nRBFreq) " corresponds to equation 4 in the paper. Before the second line of code " [~, pmi] = max(I, , 1) “, it seems lacking a line of code eg.” I = sum(I,2) " which adds mutual information over RBs to find the optimum precoder, corresponding to the right part of the equation 3 in the paper. Finally, I think the third line of code " SINRchosen = SINR(:,pmi)’ " should be replaced by " SINRchosen = SINR(pmi,:)’ " because pmi represents the best precoder index and it is in the first dimension of SINR.

---

<div class="post-metadata">

**Author:** ![afastenb](https://vccsforum.nt.tuwien.ac.at/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@afastenb](https://vccsforum.nt.tuwien.ac.at/u/afastenb)\
**Post date:** [March 25, 2025, 3:47pm UTC](https://vccsforum.nt.tuwien.ac.at/t/a-question-for-the-pmi-calculation-in-feedback-clsmfeedback-m/490/2 "2025-03-25T15:47:35Z")

</div>

Hello,  
thank you for your feedback! There is indeed a mistake in the selection of `SINRchosen` in release version 1.4. The line `SINRchosen = SINR(:,pmi)` in `feedback.ClsmFeedback` should be replaced by:

```auto
SINRchosen = zeros(nRBFreq, nLayers);
for iRB = 1:nRBFreq
    SINRchosen(iRB,:) = SINR(:,:,pmi(iRB),iRB);
end

```

The sum in the line `I = reshape(sum(log2(1+SINR), 1), nPrecoder, nRBFreq);` adds up the mutual information of all layers. The following line `[~, pmi] = max(I, [], 1);` then chooses the appropriate precoder index for each resource block. The Vienna 5G SLS allows individual precoder setting for each resource block, so this is the intended functionality.

Your proposed solution chooses the same precoder for all resource blocks assigned to a user - which is a valid design choice, especially if you want a computationally more efficient system. For MISO and MIMO transmission, I recommend using the solution above - optionally with the simplification of using only one precoder. That simplification can be implemented by adding the sum over resource blocks for the mutual information `I = sum(I,2)`, as proposed by you, and removing the `iRB` indexing of the `pmi` in the SINR selection in the code snippet above.

Best,  
Agnes

---

<div class="post-metadata">

**Author:** ![Nick\_Jay](https://vccsforum.nt.tuwien.ac.at/letter_avatar_proxy/v4/letter/n/6a8cbe/32.png) [@Nick\_Jay](https://vccsforum.nt.tuwien.ac.at/u/Nick_Jay)\
**Post date:** [March 26, 2025, 7:35am UTC](https://vccsforum.nt.tuwien.ac.at/t/a-question-for-the-pmi-calculation-in-feedback-clsmfeedback-m/490/3 "2025-03-26T07:35:55Z")

</div>

Dear Agnes,

Thank you for your detailed explanation regarding the SINR selection in release 1.4. Your clarification on the per-RB precoder functionality was particularly insightful.

During simulation analysis, I noticed the feedback-reported CQI estimates show substantial deviation from the actual SINR measurements in the LQM component. I discovered another potential issue in the interference calculation within `+feedback/ClsmFeedback.m`. In the function `calculatePMIlayer()`, the current implementation:

```auto
interference = pagemtimes(intRxPower, psi); % Current line

```

appears to incorrectly multiply interference power (`intRxPower`) with the noise enhancement matrix `psi`, whereas according to J. Colom Ikuno’s reference (Sec. 3 of _"System Level Modeling and Optimization of the LTE Downlink_"), this should use the interference covariance matrix `theta`:

```auto
interference = pagemtimes(intRxPower, theta); % Proposed correction

```

and theta should be calculated additionally.  
Would you kindly confirm whether it is a mistake?

Thank you for your continued support in improving this excellent platform.

Best regards,  
Nick\_Jay

---

<div class="post-metadata">

**Author:** ![afastenb](https://vccsforum.nt.tuwien.ac.at/letter_avatar_proxy/v4/letter/a/6de8d8/32.png) [@afastenb](https://vccsforum.nt.tuwien.ac.at/u/afastenb)\
**Post date:** [March 26, 2025, 10:22am UTC](https://vccsforum.nt.tuwien.ac.at/t/a-question-for-the-pmi-calculation-in-feedback-clsmfeedback-m/490/4 "2025-03-26T10:22:34Z")

</div>

Dear Nick\_Jay,

you are correct that `theta` should be calculated to obtain optimal feedback performance. However, the calculation of the interference `theta` requires knowledge about the precoding matrices used by the interfering cells. These precoding matrices are chosen during the feedback calculation, so it is not possible to use them in the feedback calculation.

In order to circumvent this issue, the Vienna 5G SLS assumes for the feedback calculation that the interfering cells do not use any precoder. Thus, the interference power is calculated as the macroscopic receive power from the interfering cells affected only by the receive filter - which corresponds to the noise enhancement `psi` in the implementation. This approach is sub-optimal, but reasonably realistic in terms of assumptions about the knowledge available at the transmitter, and it is computationally feasible.

Alternative approaches are to assume no inter-cell interference, as is done in the _Calculation of the spatial preprocessing and link adaption feedback for 3GPP UMTS/LTE_ paper or using another interference estimation scheme.

I hope this helps, let me know if anything is still unclear.

Best,  
Agnes
