A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-spectrum-propagation-loss-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015, NYU WIRELESS, Tandon School of Engineering,
3 * New York University
4 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
5 * University of Padova
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation;
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
22#define THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
23
24#include "ns3/matrix-based-channel-model.h"
25#include "ns3/phased-array-spectrum-propagation-loss-model.h"
26#include "ns3/random-variable-stream.h"
27
28#include <complex.h>
29#include <map>
30#include <unordered_map>
31
32namespace ns3
33{
34
35class NetDevice;
36
52{
53 public:
58
63
64 void DoDispose() override;
65
70 static TypeId GetTypeId();
71
77
83
90 void SetChannelModelAttribute(const std::string& name, const AttributeValue& value);
91
98 void GetChannelModelAttribute(const std::string& name, AttributeValue& value) const;
99
125 Ptr<const PhasedArrayModel> aPhasedArrayModel,
126 Ptr<const PhasedArrayModel> bPhasedArrayModel) const override;
127
128 private:
132 struct LongTerm : public SimpleRefCount<LongTerm>
133 {
142 };
143
148 double GetFrequency() const;
149
161 Ptr<const PhasedArrayModel> aPhasedArrayModel,
162 Ptr<const PhasedArrayModel> bPhasedArrayModel) const;
173 const PhasedArrayModel::ComplexVector& uW) const;
174
186 Ptr<SpectrumValue> txPsd,
190 const Vector& sSpeed,
191 const Vector& uSpeed) const;
192
193 mutable std::unordered_map<uint64_t, Ptr<const LongTerm>>
196};
197} // namespace ns3
198
199#endif /* THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H */
Hold a value for an Attribute.
Definition: attribute.h:70
MatrixArray class inherits ValArray class and provides additional interfaces to ValArray which enable...
Definition: matrix-array.h:83
spectrum-aware propagation loss model that is compatible with PhasedArrayModel type of ns-3 antenna
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
A template-based reference counting class.
void GetChannelModelAttribute(const std::string &name, AttributeValue &value) const
Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > params, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const override
Computes the received PSD.
PhasedArrayModel::ComplexVector GetLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
Looks for the long term component in m_longTermMap.
Ptr< MatrixBasedChannelModel > m_channelModel
the model to generate the channel matrix
void SetChannelModel(Ptr< MatrixBasedChannelModel > channel)
Set the channel model object.
std::unordered_map< uint64_t, Ptr< const LongTerm > > m_longTermMap
map containing the long term components
void SetChannelModelAttribute(const std::string &name, const AttributeValue &value)
Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< MatrixBasedChannelModel > GetChannelModel() const
Get the channel model object.
Ptr< SpectrumValue > CalcBeamformingGain(Ptr< SpectrumValue > txPsd, PhasedArrayModel::ComplexVector longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, Ptr< const MatrixBasedChannelModel::ChannelParams > channelParams, const Vector &sSpeed, const Vector &uSpeed) const
Computes the beamforming gain and applies it to the tx PSD.
PhasedArrayModel::ComplexVector CalcLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, const PhasedArrayModel::ComplexVector &sW, const PhasedArrayModel::ComplexVector &uW) const
Computes the long term component.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Data structure that stores the long term component for a tx-rx pair.
PhasedArrayModel::ComplexVector m_uW
the beamforming vector for the node u used to compute the long term
Ptr< const MatrixBasedChannelModel::ChannelMatrix > m_channel
pointer to the channel matrix used to compute the long term
PhasedArrayModel::ComplexVector m_longTerm
vector containing the long term component for each cluster
PhasedArrayModel::ComplexVector m_sW
the beamforming vector for the node s used to compute the long term