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

an implementation of DSSS error rate model More...

#include <dsss-error-rate-model.h>

Static Public Member Functions

static double DqpskFunction (double x)
 
static double GetDsssDbpskSuccessRate (double sinr, uint32_t nbits)
 
static double GetDsssDqpskSuccessRate (double sinr, uint32_t nbits)
 
static double GetDsssDqpskCck5_5SuccessRate (double sinr, uint32_t nbits)
 
static double GetDsssDqpskCck11SuccessRate (double sinr, uint32_t nbits)
 

Static Protected Attributes

static const double WLAN_SIR_PERFECT = 10.0
 
static const double WLAN_SIR_IMPOSSIBLE = 0.1
 

Static Private Attributes

static const double spectralEfficiency1bit = 2000000.0 / 1000000.0
 
static const double spectralEfficiency2bit = 2000000.0 / 1000000.0 / 2.0
 

Detailed Description

an implementation of DSSS error rate model

The 802.11b modulations:

  • 1 Mbps mode is based on DBPSK. BER is from equation 5.2-69 from John G. Proakis Digitial Communications, 2001 edition
  • 2 Mbps model is based on DQPSK. Equation 8 from "Tight bounds and accurate approximations for dqpsk transmission bit error rate", G. Ferrari and G.E. Corazza ELECTRONICS LETTERS, 40(20):1284-1285, September 2004
  • 5.5 Mbps and 11 Mbps are based on equations (18) and (17) from "Properties and performance of the ieee 802.11b complementarycode-key signal sets", Michael B. Pursley and Thomas C. Royster. IEEE TRANSACTIONS ON COMMUNICATIONS, 57(2):440-449, February 2009.

This model is designed to run with highest accuracy using the Gnu Scientific Library (GSL), but if GSL is not installed on the platform, will fall back to (slightly less accurate) Matlab-derived models for the CCK modulation types.

More detailed description and validation can be found in http://www.nsnam.org/~pei/80211b.pdf

Member Function Documentation

double inet::physicallayer::DsssErrorRateModel::DqpskFunction ( double  x)
static

Referenced by GetDsssDqpskSuccessRate().

43 {
44  return ((sqrt(2.0) + 1.0) / sqrt(8.0 * 3.1415926 * sqrt(2.0)))
45  * (1.0 / sqrt(x))
46  * exp(-(2.0 - sqrt(2.0)) * x);
47 }
value< Value, pow< Unit, 1, 2 > > sqrt(const value< Value, Unit > &a)
Definition: Units.h:247
double inet::physicallayer::DsssErrorRateModel::GetDsssDbpskSuccessRate ( double  sinr,
uint32_t  nbits 
)
static

Referenced by inet::physicallayer::Ieee80211NistErrorModel::getDSSSAndHrDSSSChunkSuccessRate(), and inet::physicallayer::Ieee80211YansErrorModel::getDSSSAndHrDSSSChunkSuccessRate().

50 {
51  double EbN0 = sinr * spectralEfficiency1bit; // 1 bit per symbol with 1 MSPS
52  double ber = 0.5 * exp(-EbN0);
53  return pow((1.0 - ber), (int)nbits);
54 }
static const double spectralEfficiency1bit
Definition: dsss-error-rate-model.h:71
double inet::physicallayer::DsssErrorRateModel::GetDsssDqpskCck11SuccessRate ( double  sinr,
uint32_t  nbits 
)
static

Referenced by inet::physicallayer::Ieee80211NistErrorModel::getDSSSAndHrDSSSChunkSuccessRate(), and inet::physicallayer::Ieee80211YansErrorModel::getDSSSAndHrDSSSChunkSuccessRate().

92 {
93 #ifdef ENABLE_GSL
94  // symbol error probability
95  double EbN0 = sinr * 22000000.0 / 1375000.0 / 8.0;
96  double sep = SymbolErrorProb256Cck(8.0 * EbN0 / 2.0);
97  return pow(1.0 - sep, nbits / 8.0);
98 #else // ifdef ENABLE_GSL
99  EV << "Running a 802.11b CCK Matlab model less accurate than GSL model" << endl;
100  // The matlab model
101  double ber;
102  if (sinr > WLAN_SIR_PERFECT) {
103  ber = 0.0;
104  }
105  else if (sinr < WLAN_SIR_IMPOSSIBLE) {
106  ber = 0.5;
107  }
108  else { // fitprops.coeff from matlab berfit
109  double a1 = 7.9056742265333456e-003;
110  double a2 = -1.8397449399176360e-001;
111  double a3 = 1.0740689468707241e+000;
112  double a4 = 1.0523316904502553e+000;
113  double a5 = 3.0552298746496687e-001;
114  double a6 = 2.2032715128698435e+000;
115  ber = (a1 * sinr * sinr + a2 * sinr + a3) / (sinr * sinr * sinr + a4 * sinr * sinr + a5 * sinr + a6);
116  }
117  return pow((1.0 - ber), (int)nbits);
118 #endif // ifdef ENABLE_GSL
119 }
static const double WLAN_SIR_IMPOSSIBLE
Definition: dsss-error-rate-model.h:87
static const double WLAN_SIR_PERFECT
Definition: dsss-error-rate-model.h:86
double inet::physicallayer::DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate ( double  sinr,
uint32_t  nbits 
)
static

Referenced by inet::physicallayer::Ieee80211NistErrorModel::getDSSSAndHrDSSSChunkSuccessRate(), and inet::physicallayer::Ieee80211YansErrorModel::getDSSSAndHrDSSSChunkSuccessRate().

64 {
65 #ifdef ENABLE_GSL
66  // symbol error probability
67  double EbN0 = sinr * 22000000.0 / 1375000.0 / 4.0;
68  double sep = SymbolErrorProb16Cck(4.0 * EbN0 / 2.0);
69  return pow(1.0 - sep, nbits / 4.0);
70 #else // ifdef ENABLE_GSL
71  EV << "Running a 802.11b CCK Matlab model less accurate than GSL model" << endl;
72  // The matlab model
73  double ber;
74  if (sinr > WLAN_SIR_PERFECT) {
75  ber = 0.0;
76  }
77  else if (sinr < WLAN_SIR_IMPOSSIBLE) {
78  ber = 0.5;
79  }
80  else { // fitprops.coeff from matlab berfit
81  double a1 = 5.3681634344056195e-001;
82  double a2 = 3.3092430025608586e-003;
83  double a3 = 4.1654372361004000e-001;
84  double a4 = 1.0288981434358866e+000;
85  ber = a1 * exp(-(pow((sinr - a2) / a3, a4)));
86  }
87  return pow((1.0 - ber), (int)nbits);
88 #endif // ifdef ENABLE_GSL
89 }
static const double WLAN_SIR_IMPOSSIBLE
Definition: dsss-error-rate-model.h:87
static const double WLAN_SIR_PERFECT
Definition: dsss-error-rate-model.h:86
double inet::physicallayer::DsssErrorRateModel::GetDsssDqpskSuccessRate ( double  sinr,
uint32_t  nbits 
)
static

Referenced by inet::physicallayer::Ieee80211NistErrorModel::getDSSSAndHrDSSSChunkSuccessRate(), and inet::physicallayer::Ieee80211YansErrorModel::getDSSSAndHrDSSSChunkSuccessRate().

57 {
58  double EbN0 = sinr * spectralEfficiency2bit; // 2 bits per symbol, 1 MSPS
59  double ber = DqpskFunction(EbN0);
60  return pow((1.0 - ber), (int)nbits);
61 }
static const double spectralEfficiency2bit
Definition: dsss-error-rate-model.h:72
static double DqpskFunction(double x)
Definition: dsss-error-rate-model.cc:42

Member Data Documentation

const double inet::physicallayer::DsssErrorRateModel::spectralEfficiency1bit = 2000000.0 / 1000000.0
staticprivate

Referenced by GetDsssDbpskSuccessRate().

const double inet::physicallayer::DsssErrorRateModel::spectralEfficiency2bit = 2000000.0 / 1000000.0 / 2.0
staticprivate

Referenced by GetDsssDqpskSuccessRate().

const double inet::physicallayer::DsssErrorRateModel::WLAN_SIR_IMPOSSIBLE = 0.1
staticprotected
const double inet::physicallayer::DsssErrorRateModel::WLAN_SIR_PERFECT = 10.0
staticprotected

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