5G-LENA nr-v4.0
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ideal-beamforming-algorithm.h
1// Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
2//
3// SPDX-License-Identifier: GPL-2.0-only
4
5#ifndef SRC_NR_MODEL_IDEAL_BEAMFORMING_ALGORITHM_H_
6#define SRC_NR_MODEL_IDEAL_BEAMFORMING_ALGORITHM_H_
7
8#include "beam-id.h"
9#include "beamforming-vector.h"
10
11#include "ns3/object.h"
12
13namespace ns3
14{
15
16class SpectrumModel;
17class SpectrumValue;
18class NrGnbNetDevice;
19class NrUeNetDevice;
20class NrSpectrumPhy;
21
32class IdealBeamformingAlgorithm : public Object
33{
34 public:
39 static TypeId GetTypeId();
40
46 virtual BeamformingVectorPair GetBeamformingVectors(
47 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
48 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const = 0;
49};
50
56{
57 public:
62 static TypeId GetTypeId();
63
68
72 ~CellScanBeamforming() override = default;
73
81 BeamformingVectorPair GetBeamformingVectors(
82 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
83 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
84
85 private:
86 uint8_t m_oversamplingFactor;
87};
88
94{
95 public:
100 static TypeId GetTypeId();
101
105 double GetBeamSearchAngleStep() const;
106
110 void SetBeamSearchAngleStep(double beamSearchAngleStep);
111
116
120 ~CellScanQuasiOmniBeamforming() override = default;
121
128 BeamformingVectorPair GetBeamformingVectors(
129 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
130 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
131
132 private:
133 double m_beamSearchAngleStep{30};
134};
135
141{
142 public:
147 static TypeId GetTypeId();
148
156 BeamformingVectorPair GetBeamformingVectors(
157 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
158 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
159};
160
166{
167 public:
172 static TypeId GetTypeId();
173
182 BeamformingVectorPair GetBeamformingVectors(
183 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
184 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
185};
186
192{
193 public:
198 static TypeId GetTypeId();
199
209 BeamformingVectorPair GetBeamformingVectors(
210 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
211 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
212};
213
222{
223 public:
228 static TypeId GetTypeId();
229
238 BeamformingVectorPair GetBeamformingVectors(
239 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
240 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
241};
242
248{
249 public:
254 static TypeId GetTypeId();
255
259 std::vector<double> GetColRxBeamAngles() const;
260
264 std::vector<double> GetColTxBeamAngles() const;
265
269 std::vector<double> GetRowRxBeamAngles() const;
270
274 std::vector<double> GetRowTxBeamAngles() const;
275
279 void SetColRxBeamAngles(std::vector<double> colAngles);
280
284 void SetColTxBeamAngles(std::vector<double> colAngles);
285
289 void SetRowRxBeamAngles(std::vector<double> rowAngles);
290
294 void SetRowTxBeamAngles(std::vector<double> rowAngles);
295
300
304 ~KroneckerBeamforming() override = default;
305
313 BeamformingVectorPair GetBeamformingVectors(
314 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
315 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
316
317 private:
318 std::vector<double> m_colRxBeamAngles{0, 90};
319 std::vector<double> m_colTxBeamAngles{0, 90};
320 std::vector<double> m_rowRxBeamAngles{0, 90};
321 std::vector<double> m_rowTxBeamAngles{0, 90};
322};
323
329{
330 public:
335 static TypeId GetTypeId();
336
340 std::vector<double> GetColBeamAngles() const;
341
345 std::vector<double> GetRowBeamAngles() const;
346
350 void SetColBeamAngles(std::vector<double> colAngles);
351
355 void SetRowBeamAngles(std::vector<double> rowAngles);
356
361
365 ~KroneckerQuasiOmniBeamforming() override = default;
366
374 BeamformingVectorPair GetBeamformingVectors(
375 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
376 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
377
378 private:
379 std::vector<double> m_colBeamAngles{0, 90};
380 std::vector<double> m_rowBeamAngles{0, 90};
381};
382} // namespace ns3
383#endif
The CellScanBeamforming class.
~CellScanBeamforming() override=default
destructor
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using cell sca...
static TypeId GetTypeId()
Get the type id.
CellScanBeamforming()=default
constructor
The CellScanQuasiOmniBeamforming class.
void SetBeamSearchAngleStep(double beamSearchAngleStep)
Sets the value of BeamSearchAngleStep attribute.
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using cell sca...
static TypeId GetTypeId()
Get the type id.
~CellScanQuasiOmniBeamforming() override=default
destructor
CellScanQuasiOmniBeamforming()=default
constructor
The DirectPathBeamforming class.
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using the dire...
static TypeId GetTypeId()
Get the type id.
The QuasiOmniDirectPathBeamforming class.
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using the dire...
Generate "Ideal" beamforming vectors.
static TypeId GetTypeId()
Get the type id.
virtual BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const =0
Function that generates the beamforming vectors for a pair of communicating devices.
The KroneckerBeamforming class.
std::vector< double > GetRowRxBeamAngles() const
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using kronecke...
void SetColTxBeamAngles(std::vector< double > colAngles)
Sets the value of BeamColAngles of Tx attribute.
std::vector< double > GetColTxBeamAngles() const
void SetRowTxBeamAngles(std::vector< double > rowAngles)
Sets the value of BeamRowAngles of Tx attribute.
KroneckerBeamforming()=default
constructor
~KroneckerBeamforming() override=default
destructor
static TypeId GetTypeId()
Get the type id.
std::vector< double > GetRowTxBeamAngles() const
void SetRowRxBeamAngles(std::vector< double > rowAngles)
Sets the value of BeamRowAngles of Rx attribute.
void SetColRxBeamAngles(std::vector< double > colAngles)
Sets the value of BeamColAngles of Rx attribute.
std::vector< double > GetColRxBeamAngles() const
KroneckerQuasiOmniBeamforming()=default
constructor
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using kronecke...
void SetRowBeamAngles(std::vector< double > rowAngles)
Sets the value of BeamRowAngles attribute.
void SetColBeamAngles(std::vector< double > colAngles)
Sets the value of BeamColAngles attribute.
~KroneckerQuasiOmniBeamforming() override=default
destructor
The OptimalCovMatrixBeamforming class not implemented yet. TODO The idea was to port one of the initi...
static TypeId GetTypeId()
Get the type id.
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using the dire...
The QuasiOmniDirectPathBeamforming class.
BeamformingVectorPair GetBeamformingVectors(const Ptr< NrSpectrumPhy > &gnbSpectrumPhy, const Ptr< NrSpectrumPhy > &ueSpectrumPhy) const override
Function that generates the beamforming vectors for a pair of communicating devices by using the quas...