9#include "nr-mimo-chunk-processor.h"
10#include "nr-mimo-signal.h"
12#include "ns3/random-variable-stream.h"
13#include "ns3/uinteger.h"
32 void SetAmc(Ptr<const NrAmc> amc);
39 void SetGnbParams(
bool isDualPol,
size_t numHPorts,
size_t numVPorts);
90 size_t numPrbs)
const;
136 Ptr<UniformRandomVariable>
166 ComplexMatrixArray& downsampledChanMat)
const;
175 ComplexMatrixArray& downsampledChanMat)
const;
185 ComplexMatrixArray& downsampledChanMat)
const;
187 double m_rankThreshold;
Base class for searching optimal precoding matrices and creating full CQI/PMI feedback This is a most...
static TypeId GetTypeId()
Get TypeId.
int64_t AssignStreams(int64_t stream)
size_t GetSubbandSize() const
void SetSubbandSize(size_t subbandSize)
Set the subband size (in number of RBs)
Ptr< UniformRandomVariable > m_downsamplingUniRand
Uniform variable stream used to downsample PRBs.
NrPmSearch()
Default constructor.
bool m_enforceSubbandSize
Enforce sub-band sizes according to 3GPP.
void SetGnbParams(bool isDualPol, size_t numHPorts, size_t numVPorts)
Set the antenna parameters of the gNB antenna.
@ FirstPRB
Downsample m_subbandSize samples to bands based on the first PRB.
@ AveragePRB
Downsample m_subbandSize samples to bands based on the average of PRBs.
@ RandomPRB
Downsample m_subbandSize samples to bands based on a random PRB.
uint8_t m_rankLimit
Limit the UE's maximum supported rank.
enum DownsamplingTechnique m_downsamplingTechnique
Technique used to downsample PRBs.
void SetUeParams(size_t numTotalPorts)
Set the antenna parameters of the UE antenna.
virtual void InitCodebooks()=0
Create and initialize the codebook for each rank.
size_t m_nRxPorts
Number of receive ports at this UE.
virtual uint8_t SelectRank(NrIntfNormChanMat &channelMatrix) const
Select the MIMO rank for a given channel matrix.
size_t m_nGnbHPorts
Number of horizontal ports in the gNB antenna array.
Ptr< const NrAmc > m_amc
The NrAmc to be used for computing TB size and MCS.
size_t m_nGnbPorts
Total number of ports in the gNB antenna array.
std::vector< uint8_t > m_ranks
The set of ranks for which to compute precoding matrices.
virtual NrIntfNormChanMat SubbandUpsampling(const NrIntfNormChanMat &precMat, size_t numPrbs) const
Upsample the input per-subband precoding matrix into a per-PRB precoding matrix.
bool m_isGnbDualPol
True when gNB has a dual-polarized antenna array.
virtual PmCqiInfo CreateCqiFeedbackMimo(const NrMimoSignal &rxSignalRb, PmiUpdate pmiUpdate)=0
Create CQI feedback with optimal rank, optimal PMI, and corresponding CQI values. Optimal rank is con...
virtual NrIntfNormChanMat SubbandDownsampling(const NrIntfNormChanMat &channelMatrix)
Downsample the input channel matrix into bins of at most m_subbandSize PRBs.
@ WaterFilling
Select MIMO rank via water-filling technique,.
@ Sasaoka
Select MIMO rank via rank increment capacity technique.
@ SVD
Select MIMO rank via SVD decomposition.
void SetAmc(Ptr< const NrAmc > amc)
Set the AMC object to be used for MCS and TB size calculation.
size_t m_subbandSize
Size of each subband (in number of RBs)
size_t m_nGnbVPorts
Number of vertical ports in the gNB antenna array.
bool m_subbandCqiClamping
Helper struct for processing and storing received signals for use in CSI feedback.
Parameters that define if PMI should be updated or if previous PMI values are used.
bool updateWb
Defines whether to update WB PMI.
bool updateSb
Defines whether to update SB PMI.
ComplexMatrixArray sbPrecMat
Precoding matrix (nGnbPorts * rank * nSubbands)
std::vector< size_t > sbPmis
Subband PMI values (i2, indices of W2 matrices)
size_t wbPmi
Wideband PMI (i1, index of W1 matrix)
The structure used for the CQI feedback message that contains the optimum CQI, RI,...