INET Framework for OMNeT++/OMNEST
inet::physicallayer::UWBIRStochasticPathLoss Class Reference

Implements the Ghassmezadeh stochastic UWB channel path loss model. More...

#include <UWBIRStochasticPathLoss.h>

Inheritance diagram for inet::physicallayer::UWBIRStochasticPathLoss:
inet::physicallayer::PathLossBase inet::physicallayer::IPathLoss inet::physicallayer::IPrintableObject

Public Member Functions

 UWBIRStochasticPathLoss ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level) const override
 Prints this object to the provided output stream. More...
 
virtual double computePathLoss (mps propagationSpeed, Hz frequency, m distance) const override
 Returns the loss factor as a function of propagation speed, carrier frequency and distance. More...
 
virtual m computeRange (mps propagationSpeed, Hz frequency, double loss) const override
 Returns the range for the given loss factor. More...
 
- Public Member Functions inherited from inet::physicallayer::PathLossBase
virtual double computePathLoss (const ITransmission *transmission, const IArrival *arrival) const override
 Returns the loss factor for the provided transmission and arrival. More...
 
- Public Member Functions inherited from inet::physicallayer::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string getInfoStringRepresentation () const
 
virtual std::string getDetailStringRepresentation () const
 
virtual std::string getDebugStringRepresentation () const
 
virtual std::string getTraceStringRepresentation () const
 
virtual std::string getCompleteStringRepresentation () const
 

Protected Member Functions

virtual void initialize (int stage) override
 
virtual double getFDPathLoss (Hz frequency, m distance) const
 
virtual double getGhassemzadehPathLoss (double gamma, double S, m distance) const
 
virtual double getNarrowBandFreeSpacePathLoss (Hz frequency, m distance) const
 
virtual double simtruncnormal (double mean, double stddev, double a, int rng) const
 

Protected Attributes

double PL0
 
double muGamma
 
double muSigma
 
double sigmaGamma
 
double sigmaSigma
 
double pathloss_exponent
 
bool shadowing
 

Static Protected Attributes

static const Hz fc = MHz(4492.8)
 
static const m d0 = m(1)
 
static const double n1_limit = 1.25
 
static const double n2_limit = 2
 
static const double n3_limit = 2
 
static const double s_mu
 
static const double s_sigma
 
static const double kappa = 1
 

Additional Inherited Members

- Public Types inherited from inet::physicallayer::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 

Detailed Description

Implements the Ghassmezadeh stochastic UWB channel path loss model.

Citation of the following publication is appreciated if you use the MiXiM UWB PHY model for a publication of your own. J. Rousselot, J.-D. Decotignie, An ultra-wideband impulse radio PHY layer model for network simulation. SIMULATION January 2011 vol. 87 no. 1-2 82-112.

For more information, see also:

[1] J. Rousselot, J.-D. Decotignie, An ultra-wideband impulse radio PHY layer model for network simulation. SIMULATION January 2011 vol. 87 no. 1-2 82-112. http://dx.doi.org/10.1177/0037549710377767 [2] J. Rousselot, Ultra Low Power Communication Protocols for UWB Impulse Radio Wireless Sensor Networks. EPFL Thesis 4720, 2010. http://infoscience.epfl.ch/record/147987 [3] A High-Precision Ultra Wideband Impulse Radio Physical Layer Model for Network Simulation, Jérôme Rousselot, Jean-Dominique Decotignie, Second International Omnet++ Workshop,Simu'TOOLS, Rome, 6 Mar 09. http://portal.acm.org/citation.cfm?id=1537714

Constructor & Destructor Documentation

inet::physicallayer::UWBIRStochasticPathLoss::UWBIRStochasticPathLoss ( )
31  :
32  PL0(0),
33  muGamma(0),
34  muSigma(0),
35  sigmaGamma(0),
36  sigmaSigma(0),
37  pathloss_exponent(0.0),
38  shadowing(true)
39 {
40 }
bool shadowing
Definition: UWBIRStochasticPathLoss.h:69
double sigmaGamma
Definition: UWBIRStochasticPathLoss.h:66
double pathloss_exponent
Definition: UWBIRStochasticPathLoss.h:68
double sigmaSigma
Definition: UWBIRStochasticPathLoss.h:67
double muGamma
Definition: UWBIRStochasticPathLoss.h:64
double PL0
Definition: UWBIRStochasticPathLoss.h:63
double muSigma
Definition: UWBIRStochasticPathLoss.h:65

Member Function Documentation

double inet::physicallayer::UWBIRStochasticPathLoss::computePathLoss ( mps  propagationSpeed,
Hz  frequency,
m  distance 
) const
overridevirtual

Returns the loss factor as a function of propagation speed, carrier frequency and distance.

The value is in the range [0, 1] where 1 means no loss at all and 0 means all power is lost.

Implements inet::physicallayer::PathLossBase.

97 {
98  double n1 = simtruncnormal(0, 1, n1_limit, 1);
99  double n2 = simtruncnormal(0, 1, n2_limit, 2);
100  double n3 = simtruncnormal(0, 1, n3_limit, 3);
101  double gamma = muGamma + n1 * sigmaGamma;
102  double sigma = muSigma + n3 * sigmaSigma;
103  double S = n2 * sigma;
104  return getGhassemzadehPathLoss(gamma, S, distance);
105 }
double sigmaGamma
Definition: UWBIRStochasticPathLoss.h:66
static const double n2_limit
Definition: UWBIRStochasticPathLoss.h:57
double sigmaSigma
Definition: UWBIRStochasticPathLoss.h:67
static const double n1_limit
Definition: UWBIRStochasticPathLoss.h:56
double muGamma
Definition: UWBIRStochasticPathLoss.h:64
virtual double getGhassemzadehPathLoss(double gamma, double S, m distance) const
Definition: UWBIRStochasticPathLoss.cc:85
compose< A, pow< V,-1 > > S
Definition: Units.h:778
virtual double simtruncnormal(double mean, double stddev, double a, int rng) const
Definition: UWBIRStochasticPathLoss.cc:42
static const double n3_limit
Definition: UWBIRStochasticPathLoss.h:58
double muSigma
Definition: UWBIRStochasticPathLoss.h:65
virtual m inet::physicallayer::UWBIRStochasticPathLoss::computeRange ( mps  propagationSpeed,
Hz  frequency,
double  loss 
) const
inlineoverridevirtual

Returns the range for the given loss factor.

The value is in the range [0, +infinity) or NaN if unspecified.

Implements inet::physicallayer::IPathLoss.

82 { return m(NaN); }
#define NaN
Definition: INETMath.h:103
value< double, units::m > m
Definition: Units.h:1047
double inet::physicallayer::UWBIRStochasticPathLoss::getFDPathLoss ( Hz  frequency,
m  distance 
) const
protectedvirtual
75  {
76  return 0.5 * PL0 * pow(unit(frequency / fc).get(), -2 * (kappa + 1)) / pow(unit(distance / d0).get(), pathloss_exponent);
77 }
static const m d0
Definition: UWBIRStochasticPathLoss.h:55
double pathloss_exponent
Definition: UWBIRStochasticPathLoss.h:68
static const double kappa
Definition: UWBIRStochasticPathLoss.h:61
pow< internal::none, 0 > unit
Definition: Units.h:60
double PL0
Definition: UWBIRStochasticPathLoss.h:63
static const Hz fc
Definition: UWBIRStochasticPathLoss.h:54
double inet::physicallayer::UWBIRStochasticPathLoss::getGhassemzadehPathLoss ( double  gamma,
double  S,
m  distance 
) const
protectedvirtual

Referenced by computePathLoss().

86 {
87  double attenuation = PL0;
88  if (distance < d0)
89  distance = d0;
90  attenuation = attenuation - 10 * gamma * log10(unit(distance / d0).get());
91  if (shadowing)
92  attenuation = attenuation - S;
93  return math::dB2fraction(attenuation);
94 }
bool shadowing
Definition: UWBIRStochasticPathLoss.h:69
static const m d0
Definition: UWBIRStochasticPathLoss.h:55
double dB2fraction(double dB)
Converts a dB value to fraction.
Definition: INETMath.h:166
pow< internal::none, 0 > unit
Definition: Units.h:60
compose< A, pow< V,-1 > > S
Definition: Units.h:778
double PL0
Definition: UWBIRStochasticPathLoss.h:63
double inet::physicallayer::UWBIRStochasticPathLoss::getNarrowBandFreeSpacePathLoss ( Hz  frequency,
m  distance 
) const
protectedvirtual
80 {
81  double attenuation = 4 * M_PI * unit(distance * frequency / mps(SPEED_OF_LIGHT)).get();
82  return 1.0 / (attenuation * attenuation);
83 }
#define SPEED_OF_LIGHT
Definition: INETDefs.h:67
#define M_PI
Definition: PlotFigure.cc:27
pow< internal::none, 0 > unit
Definition: Units.h:60
compose< m, pow< s,-1 > > mps
Definition: Units.h:968
void inet::physicallayer::UWBIRStochasticPathLoss::initialize ( int  stage)
overrideprotectedvirtual
51 {
52  if (stage == INITSTAGE_LOCAL) {
53  PL0 = par("PL0");
54  muGamma = par("muGamma");
55  muSigma = par("muSigma");
56  sigmaGamma = par("sigmaGamma");
57  sigmaSigma = par("sigmaSigma");
58  shadowing = par("shadowing");
59  }
60 }
bool shadowing
Definition: UWBIRStochasticPathLoss.h:69
double sigmaGamma
Definition: UWBIRStochasticPathLoss.h:66
double sigmaSigma
Definition: UWBIRStochasticPathLoss.h:67
Local initializations.
Definition: InitStages.h:35
double muGamma
Definition: UWBIRStochasticPathLoss.h:64
double PL0
Definition: UWBIRStochasticPathLoss.h:63
double muSigma
Definition: UWBIRStochasticPathLoss.h:65
std::ostream & inet::physicallayer::UWBIRStochasticPathLoss::printToStream ( std::ostream &  stream,
int  level 
) const
overridevirtual

Prints this object to the provided output stream.

Function calls to operator<< with pointers or references either const or not are all forwarded to this function.

Reimplemented from inet::physicallayer::IPrintableObject.

63 {
64  stream << "UWBIRStochasticPathLoss";
65  if (level <= PRINT_LEVEL_TRACE)
66  stream << ", PL0 = " << PL0
67  << ", muGamma = " << muGamma
68  << ", muSigma = " << muSigma
69  << ", sigmaGamma = " << sigmaGamma
70  << ", sigmaSigma = " << sigmaSigma
71  << ", shadowing = " << shadowing;
72  return stream;
73 }
bool shadowing
Definition: UWBIRStochasticPathLoss.h:69
double sigmaGamma
Definition: UWBIRStochasticPathLoss.h:66
double sigmaSigma
Definition: UWBIRStochasticPathLoss.h:67
double muGamma
Definition: UWBIRStochasticPathLoss.h:64
double PL0
Definition: UWBIRStochasticPathLoss.h:63
double muSigma
Definition: UWBIRStochasticPathLoss.h:65
double inet::physicallayer::UWBIRStochasticPathLoss::simtruncnormal ( double  mean,
double  stddev,
double  a,
int  rng 
) const
protectedvirtual

Referenced by computePathLoss().

43 {
44  double result = a + 1;
45  while (result > a || result < -a)
46  result = normal(mean, stddev, 0);
47  return result;
48 }

Member Data Documentation

const m inet::physicallayer::UWBIRStochasticPathLoss::d0 = m(1)
staticprotected
const Hz inet::physicallayer::UWBIRStochasticPathLoss::fc = MHz(4492.8)
staticprotected

Referenced by getFDPathLoss().

const double inet::physicallayer::UWBIRStochasticPathLoss::kappa = 1
staticprotected

Referenced by getFDPathLoss().

double inet::physicallayer::UWBIRStochasticPathLoss::muGamma
protected
double inet::physicallayer::UWBIRStochasticPathLoss::muSigma
protected
const double inet::physicallayer::UWBIRStochasticPathLoss::n1_limit = 1.25
staticprotected

Referenced by computePathLoss().

const double inet::physicallayer::UWBIRStochasticPathLoss::n2_limit = 2
staticprotected

Referenced by computePathLoss().

const double inet::physicallayer::UWBIRStochasticPathLoss::n3_limit = 2
staticprotected

Referenced by computePathLoss().

double inet::physicallayer::UWBIRStochasticPathLoss::pathloss_exponent
protected

Referenced by getFDPathLoss().

double inet::physicallayer::UWBIRStochasticPathLoss::PL0
protected
const double inet::physicallayer::UWBIRStochasticPathLoss::s_mu
staticprotected
const double inet::physicallayer::UWBIRStochasticPathLoss::s_sigma
staticprotected
bool inet::physicallayer::UWBIRStochasticPathLoss::shadowing
protected
double inet::physicallayer::UWBIRStochasticPathLoss::sigmaGamma
protected
double inet::physicallayer::UWBIRStochasticPathLoss::sigmaSigma
protected

The documentation for this class was generated from the following files: