38 .AddConstructor<NistErrorRateModel> ()
50 double z = std::sqrt (snr);
51 double ber = 0.5 * erfc (z);
58 double z = std::sqrt (snr / 2.0);
59 double ber = 0.5 * erfc (z);
66 double z = std::sqrt (snr / (5.0 * 2.0));
67 double ber = 0.75 * 0.5 * erfc (z);
68 NS_LOG_INFO (
"16-Qam" <<
" snr=" << snr <<
" ber=" << ber);
74 double z = std::sqrt (snr / (21.0 * 2.0));
75 double ber = 7.0 / 12.0 * 0.5 * erfc (z);
76 NS_LOG_INFO (
"64-Qam" <<
" snr=" << snr <<
" ber=" << ber);
81 uint32_t bValue)
const
89 pe = std::min (pe, 1.0);
90 double pms = std::pow (1 - pe, nbits);
95 uint32_t bValue)
const
103 pe = std::min (pe, 1.0);
104 double pms = std::pow (1 - pe, nbits);
110 double D = std::sqrt (4.0 * p * (1.0 - p));
115 pe = 0.5 * ( 36.0 * std::pow (D, 10.0)
116 + 211.0 * std::pow (D, 12.0)
117 + 1404.0 * std::pow (D, 14.0)
118 + 11633.0 * std::pow (D, 16.0)
119 + 77433.0 * std::pow (D, 18.0)
120 + 502690.0 * std::pow (D, 20.0)
121 + 3322763.0 * std::pow (D, 22.0)
122 + 21292910.0 * std::pow (D, 24.0)
123 + 134365911.0 * std::pow (D, 26.0)
126 else if (bValue == 2)
129 pe = 1.0 / (2.0 * bValue) *
130 ( 3.0 * std::pow (D, 6.0)
131 + 70.0 * std::pow (D, 7.0)
132 + 285.0 * std::pow (D, 8.0)
133 + 1276.0 * std::pow (D, 9.0)
134 + 6160.0 * std::pow (D, 10.0)
135 + 27128.0 * std::pow (D, 11.0)
136 + 117019.0 * std::pow (D, 12.0)
137 + 498860.0 * std::pow (D, 13.0)
138 + 2103891.0 * std::pow (D, 14.0)
139 + 8784123.0 * std::pow (D, 15.0)
142 else if (bValue == 3)
145 pe = 1.0 / (2.0 * bValue) *
146 ( 42.0 * std::pow (D, 5.0)
147 + 201.0 * std::pow (D, 6.0)
148 + 1492.0 * std::pow (D, 7.0)
149 + 10469.0 * std::pow (D, 8.0)
150 + 62935.0 * std::pow (D, 9.0)
151 + 379644.0 * std::pow (D, 10.0)
152 + 2253373.0 * std::pow (D, 11.0)
153 + 13073811.0 * std::pow (D, 12.0)
154 + 75152755.0 * std::pow (D, 13.0)
155 + 428005675.0 * std::pow (D, 14.0)
167 uint32_t bValue)
const
175 pe = std::min (pe, 1.0);
176 double pms = std::pow (1 - pe, static_cast<double> (nbits));
181 uint32_t bValue)
const
189 pe = std::min (pe, 1.0);
190 double pms = std::pow (1 - pe, static_cast<double> (nbits));
double GetQpskBer(double snr) const
Return BER of QPSK at the given SNR.
static double GetDsssDqpskCck11SuccessRate(double sinr, uint32_t nbits)
Return the chunk success rate of the differential encoded QPSK for 11Mbps data rate.
static TypeId GetTypeId(void)
enum WifiModulationClass GetModulationClass() const
#define NS_ASSERT(condition)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
static double GetDsssDqpskSuccessRate(double sinr, uint32_t nbits)
Return the chunk success rate of the differential encoded QPSK.
double GetFec64QamBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of QAM64 at the given SNR after applying FEC.
double GetFec16QamBer(double snr, uint32_t nbits, uint32_t bValue) const
Return BER of QAM16 at the given SNR after applying FEC.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
the interface for Wifi's error models
NS_LOG_COMPONENT_DEFINE("NistErrorRateModel")
double CalculatePe(double p, uint32_t bValue) const
Return the coded BER for the given p and b.
double GetFecBpskBer(double snr, double nbits, uint32_t bValue) const
Return BER of BPSK at the given SNR after applying FEC.
enum WifiCodeRate GetCodeRate(void) const
double Get16QamBer(double snr) const
Return BER of QAM16 at the given SNR.
uint8_t GetConstellationSize(void) const
double Get64QamBer(double snr) const
Return BER of QAM64 at the given SNR.
static double GetDsssDqpskCck5_5SuccessRate(double sinr, uint32_t nbits)
Return the chunk success rate of the differential encoded QPSK for 5.5Mbps data rate.
double GetFecQpskBer(double snr, double nbits, uint32_t bValue) const
Return BER of QPSK at the given SNR after applying FEC.
static double GetDsssDbpskSuccessRate(double sinr, uint32_t nbits)
Return the chunk success rate of the differential BPSK.
a unique identifier for an interface.
uint64_t GetDataRate(void) const
TypeId SetParent(TypeId tid)
DSSS PHY (Clause 15) and HR/DSSS PHY (Clause 18)
virtual double GetChunkSuccessRate(WifiMode mode, double snr, uint32_t nbits) const
A pure virtual method that must be implemented in the subclass.
double GetBpskBer(double snr) const
Return BER of BPSK at the given SNR.