5G-LENA nr-v3.3-49-g235218b1
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
nr-mimo-matrices.h
1// Copyright (c) 2024 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef NR_MIMO_MATRICES_H
6#define NR_MIMO_MATRICES_H
7
8#include <ns3/matrix-array.h>
9#include <ns3/spectrum-value.h>
10
11namespace ns3
12{
13
14class NrIntfNormChanMat;
15class NrSinrMatrix;
16
21class NrCovMat : public ComplexMatrixArray
22{
23 public:
24 NrCovMat() = default;
25 NrCovMat(ComplexMatrixArray arr)
26 : ComplexMatrixArray(arr){};
27
30 virtual void AddInterferenceSignal(const ComplexMatrixArray& rhs);
31
34 virtual void SubtractInterferenceSignal(const ComplexMatrixArray& rhs);
35
40 virtual NrIntfNormChanMat CalcIntfNormChannel(const ComplexMatrixArray& chanMat) const;
41
42 private:
47 virtual NrIntfNormChanMat CalcIntfNormChannelMimo(const ComplexMatrixArray& chanMat) const;
48};
49
63class NrIntfNormChanMat : public ComplexMatrixArray
64{
65 public:
66 NrIntfNormChanMat() = default;
67 NrIntfNormChanMat(ComplexMatrixArray arr)
68 : ComplexMatrixArray(arr){};
69
73 virtual NrSinrMatrix ComputeSinrForPrecoding(const ComplexMatrixArray& precMats) const;
74
75 private:
79 virtual ComplexMatrixArray ComputeMse(const ComplexMatrixArray& precMats) const;
80
85 virtual ComplexMatrixArray ComputeMseMimo(const ComplexMatrixArray& precMats) const;
86};
87
89class NrSinrMatrix : public DoubleMatrixArray
90{
91 public:
92 NrSinrMatrix() = default;
93 NrSinrMatrix(DoubleMatrixArray arr)
94 : DoubleMatrixArray(arr){};
95 NrSinrMatrix(const std::valarray<double>& values)
96 : DoubleMatrixArray(values){};
97 NrSinrMatrix(uint8_t rank, size_t nRbs)
98 : DoubleMatrixArray(rank, nRbs){};
99
100 uint8_t GetRank() const;
101 size_t GetNumRbs() const;
105 SpectrumValue GetVectorizedSpecVal() const;
106};
107
108} // namespace ns3
109
110#endif // NR_MIMO_MATRICES_H
virtual NrIntfNormChanMat CalcIntfNormChannel(const ComplexMatrixArray &chanMat) const
Calculate the interference-normalized channel matrix for SISO and MIMO. See NrIntfNormChanMat for det...
virtual void SubtractInterferenceSignal(const ComplexMatrixArray &rhs)
virtual void AddInterferenceSignal(const ComplexMatrixArray &rhs)
virtual NrSinrMatrix ComputeSinrForPrecoding(const ComplexMatrixArray &precMats) const
Compute the MIMO SINR when a specific precoder is applied.
NrSinrMatrix stores the MIMO SINR matrix, with dimension rank x nRbs.
SpectrumValue GetVectorizedSpecVal() const
Linearize a 2D matrix into a vector, and convert that vector to a SpectrumValue Matches layer-to-code...