5G-LENA nr-v3.3-81-g75c7590d
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
67 double GetBeamSearchAngleStep() const;
68
72 void SetBeamSearchAngleStep(double beamSearchAngleStep);
73
78
82 ~CellScanBeamforming() override = default;
83
91 BeamformingVectorPair GetBeamformingVectors(
92 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
93 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
94
95 private:
96 double m_beamSearchAngleStep{30};
97};
98
104{
105 public:
110 static TypeId GetTypeId();
111
116
121
129 BeamformingVectorPair GetBeamformingVectors(
130 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
131 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
132
133 private:
134 std::vector<double> m_azimuth{-56.25, -33.75, -11.25, 11.25, 33.75, 56.25};
135 std::vector<double> m_zenith{112.5, 157.5};
136};
137
143{
144 public:
149 static TypeId GetTypeId();
150
154 double GetBeamSearchAngleStep() const;
155
159 void SetBeamSearchAngleStep(double beamSearchAngleStep);
160
165
169 ~CellScanQuasiOmniBeamforming() override = default;
170
177 BeamformingVectorPair GetBeamformingVectors(
178 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
179 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
180
181 private:
182 double m_beamSearchAngleStep{30};
183};
184
190{
191 public:
196 static TypeId GetTypeId();
197
205 BeamformingVectorPair GetBeamformingVectors(
206 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
207 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
208};
209
215{
216 public:
221 static TypeId GetTypeId();
222
231 BeamformingVectorPair GetBeamformingVectors(
232 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
233 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
234};
235
241{
242 public:
247 static TypeId GetTypeId();
248
258 BeamformingVectorPair GetBeamformingVectors(
259 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
260 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
261};
262
271{
272 public:
277 static TypeId GetTypeId();
278
287 BeamformingVectorPair GetBeamformingVectors(
288 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
289 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
290};
291
297{
298 public:
303 static TypeId GetTypeId();
304
308 std::vector<double> GetColRxBeamAngles() const;
309
313 std::vector<double> GetColTxBeamAngles() const;
314
318 std::vector<double> GetRowRxBeamAngles() const;
319
323 std::vector<double> GetRowTxBeamAngles() const;
324
328 void SetColRxBeamAngles(std::vector<double> colAngles);
329
333 void SetColTxBeamAngles(std::vector<double> colAngles);
334
338 void SetRowRxBeamAngles(std::vector<double> rowAngles);
339
343 void SetRowTxBeamAngles(std::vector<double> rowAngles);
344
349
353 ~KroneckerBeamforming() override = default;
354
362 BeamformingVectorPair GetBeamformingVectors(
363 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
364 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
365
366 private:
367 std::vector<double> m_colRxBeamAngles{0, 90};
368 std::vector<double> m_colTxBeamAngles{0, 90};
369 std::vector<double> m_rowRxBeamAngles{0, 90};
370 std::vector<double> m_rowTxBeamAngles{0, 90};
371};
372
378{
379 public:
384 static TypeId GetTypeId();
385
389 std::vector<double> GetColBeamAngles() const;
390
394 std::vector<double> GetRowBeamAngles() const;
395
399 void SetColBeamAngles(std::vector<double> colAngles);
400
404 void SetRowBeamAngles(std::vector<double> rowAngles);
405
410
414 ~KroneckerQuasiOmniBeamforming() override = default;
415
423 BeamformingVectorPair GetBeamformingVectors(
424 const Ptr<NrSpectrumPhy>& gnbSpectrumPhy,
425 const Ptr<NrSpectrumPhy>& ueSpectrumPhy) const override;
426
427 private:
428 std::vector<double> m_colBeamAngles{0, 90};
429 std::vector<double> m_rowBeamAngles{0, 90};
430};
431} // namespace ns3
432#endif
The CellScanBeamformingAzimuthZenith 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 cell sca...
CellScanBeamformingAzimuthZenith()=default
constructor
~CellScanBeamformingAzimuthZenith() override=default
destructor
The CellScanBeamforming class.
void SetBeamSearchAngleStep(double beamSearchAngleStep)
Sets the value of BeamSearchAngleStep attribute.
~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...