38 .SetGroupName (
"Wifi")
52 double z = std::sqrt (snr);
53 double ber = 0.5 * erfc (z);
62 double z = std::sqrt (snr / 2.0);
63 double ber = 0.5 * erfc (z);
72 double z = std::sqrt (snr / (5.0 * 2.0));
73 double ber = 0.75 * 0.5 * erfc (z);
74 NS_LOG_INFO (
"16-Qam" <<
" snr=" << snr <<
" ber=" << ber);
82 double z = std::sqrt (snr / (21.0 * 2.0));
83 double ber = 7.0 / 12.0 * 0.5 * erfc (z);
84 NS_LOG_INFO (
"64-Qam" <<
" snr=" << snr <<
" ber=" << ber);
92 double z = std::sqrt (snr / (85.0 * 2.0));
93 double ber = 15.0 / 32.0 * 0.5 * erfc (z);
94 NS_LOG_INFO (
"256-Qam" <<
" snr=" << snr <<
" ber=" << ber);
102 double z = std::sqrt (snr / (341.0 * 2.0));
103 double ber = 31.0 / 160.0 * 0.5 * erfc (z);
104 NS_LOG_INFO (
"1024-Qam" <<
" snr=" << snr <<
" ber=" << ber);
110 uint32_t bValue)
const 120 double pms = std::pow (1 - pe, nbits);
126 uint32_t bValue)
const 136 double pms = std::pow (1 - pe, nbits);
144 double D = std::sqrt (4.0 * p * (1.0 - p));
149 pe = 0.5 * (36.0 * std::pow (D, 10)
150 + 211.0 * std::pow (D, 12)
151 + 1404.0 * std::pow (D, 14)
152 + 11633.0 * std::pow (D, 16)
153 + 77433.0 * std::pow (D, 18)
154 + 502690.0 * std::pow (D, 20)
155 + 3322763.0 * std::pow (D, 22)
156 + 21292910.0 * std::pow (D, 24)
157 + 134365911.0 * std::pow (D, 26));
159 else if (bValue == 2)
162 pe = 1.0 / (2.0 * bValue) *
163 (3.0 * std::pow (D, 6)
164 + 70.0 * std::pow (D, 7)
165 + 285.0 * std::pow (D, 8)
166 + 1276.0 * std::pow (D, 9)
167 + 6160.0 * std::pow (D, 10)
168 + 27128.0 * std::pow (D, 11)
169 + 117019.0 * std::pow (D, 12)
170 + 498860.0 * std::pow (D, 13)
171 + 2103891.0 * std::pow (D, 14)
172 + 8784123.0 * std::pow (D, 15));
174 else if (bValue == 3)
177 pe = 1.0 / (2.0 * bValue) *
178 (42.0 * std::pow (D, 5)
179 + 201.0 * std::pow (D, 6)
180 + 1492.0 * std::pow (D, 7)
181 + 10469.0 * std::pow (D, 8)
182 + 62935.0 * std::pow (D, 9)
183 + 379644.0 * std::pow (D, 10)
184 + 2253373.0 * std::pow (D, 11)
185 + 13073811.0 * std::pow (D, 12)
186 + 75152755.0 * std::pow (D, 13)
187 + 428005675.0 * std::pow (D, 14));
189 else if (bValue == 5)
193 pe = 1.0 / (2.0 * bValue) *
194 (92.0 * std::pow (D, 4.0)
195 + 528.0 * std::pow (D, 5.0)
196 + 8694.0 * std::pow (D, 6.0)
197 + 79453.0 * std::pow (D, 7.0)
198 + 792114.0 * std::pow (D, 8.0)
199 + 7375573.0 * std::pow (D, 9.0)
200 + 67884974.0 * std::pow (D, 10.0)
201 + 610875423.0 * std::pow (D, 11.0)
202 + 5427275376.0 * std::pow (D, 12.0)
203 + 47664215639.0 * std::pow (D, 13.0));
214 uint32_t bValue)
const 224 double pms = std::pow (1 - pe, nbits);
230 uint32_t bValue)
const 240 double pms = std::pow (1 - pe, nbits);
246 uint32_t bValue)
const 256 double pms = std::pow (1 - pe, nbits);
262 uint32_t bValue)
const 272 double pms = std::pow (1 - pe, nbits);
400 NS_ASSERT (
"undefined DSSS/HR-DSSS datarate");
double Get64QamBer(double snr) const
Return BER of QAM64 at the given SNR.
static TypeId GetTypeId(void)
Get the type ID.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
double GetFecQpskBer(double snr, uint64_t nbits, uint32_t bValue) const
Return BER of QPSK at the given SNR after applying FEC.
This class mimics the TXVECTOR which is to be passed to the PHY in order to define the parameters whi...
double GetFec16QamBer(double snr, uint64_t nbits, uint32_t bValue) const
Return BER of QAM16 at the given SNR after applying FEC.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
static double GetDsssDbpskSuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential BPSK.
the interface for Wifi's error models
double GetFec1024QamBer(double snr, uint64_t nbits, uint32_t bValue) const
Return BER of QAM1024 at the given SNR after applying FEC.
double GetFecBpskBer(double snr, uint64_t nbits, uint32_t bValue) const
Return BER of BPSK at the given SNR after applying FEC.
WifiMode GetMode(void) const
double Get256QamBer(double snr) const
Return BER of QAM256 at the given SNR.
double Get16QamBer(double snr) const
Return BER of QAM16 at the given SNR.
A model for the error rate for different modulations.
WifiModulationClass GetModulationClass() const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double GetFec64QamBer(double snr, uint64_t nbits, uint32_t bValue) const
Return BER of QAM64 at the given SNR after applying FEC.
static double GetDsssDqpskCck5_5SuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK for 5.5Mbps data rate.
uint16_t GetConstellationSize(void) const
double GetFec256QamBer(double snr, uint64_t nbits, uint32_t bValue) const
Return BER of QAM256 at the given SNR after applying FEC.
double GetQpskBer(double snr) const
Return BER of QPSK at the given SNR.
double CalculatePe(double p, uint32_t bValue) const
Return the coded BER for the given p and b.
double Get1024QamBer(double snr) const
Return BER of QAM1024 at the given SNR.
double GetChunkSuccessRate(WifiMode mode, WifiTxVector txVector, double snr, uint64_t nbits) const
A pure virtual method that must be implemented in the subclass.
static double GetDsssDqpskSuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK.
WifiCodeRate GetCodeRate(void) const
double GetBpskBer(double snr) const
Return BER of BPSK at the given SNR.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint64_t GetDataRate(uint16_t channelWidth, uint16_t guardInterval, uint8_t nss) const
static double GetDsssDqpskCck11SuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK for 11Mbps data rate.