A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dsss-error-rate-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 The Boeing Company
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Gary Pei <guangyu.pei@boeing.com>
18 */
19
20#ifndef DSSS_ERROR_RATE_MODEL_H
21#define DSSS_ERROR_RATE_MODEL_H
22
23#include <cstdint>
24
25namespace ns3
26{
27
28#ifdef HAVE_GSL
29/**
30 * Structure for integral function parameters
31 */
32struct FunctionParameters
33{
34 double beta; ///< Beta parameter
35 double n; ///< n parameter
36};
37
38/**
39 * Integral function using GSL library
40 *
41 * \param x the input x variable
42 * \param params a pointer to FunctionParameters struct
43 *
44 * \return the integral function
45 */
46double IntegralFunction(double x, void* params);
47#endif
48
49/**
50 * \brief an implementation of DSSS error rate model
51 * \ingroup wifi
52 *
53 * The 802.11b modulations:
54 * - 1 Mbps mode is based on DBPSK. BER is from equation 5.2-69 from John G. Proakis
55 * Digital Communications, 2001 edition
56 * - 2 Mbps model is based on DQPSK. Equation 8 from "Tight bounds and accurate
57 * approximations for DQPSK transmission bit error rate", G. Ferrari and G.E. Corazza
58 * ELECTRONICS LETTERS, 40(20):1284-1285, September 2004
59 * - 5.5 Mbps and 11 Mbps are based on equations (18) and (17) from "Properties and
60 * performance of the IEEE 802.11b complementarycode-key signal sets",
61 * Michael B. Pursley and Thomas C. Royster. IEEE TRANSACTIONS ON COMMUNICATIONS,
62 * 57(2):440-449, February 2009.
63 *
64 * This model is designed to run with highest accuracy using the GNU
65 * Scientific Library (GSL), but if GSL is not installed on the platform,
66 * will fall back to (slightly less accurate) Matlab-derived models for
67 * the CCK modulation types.
68 *
69 * More detailed description and validation can be found in
70 * http://www.nsnam.org/~pei/80211b.pdf
71 */
73{
74 public:
75 /**
76 * A function DQPSK
77 *
78 * \param x the input variable
79 *
80 * \return DQPSK (x)
81 */
82 static double DqpskFunction(double x);
83 /**
84 * Return the chunk success rate of the differential BPSK.
85 *
86 * \param sinr the SINR ratio (not dB) of the chunk
87 * \param nbits the size of the chunk
88 *
89 * \return the chunk success rate of the differential BPSK
90 */
91 static double GetDsssDbpskSuccessRate(double sinr, uint64_t nbits);
92 /**
93 * Return the chunk success rate of the differential encoded QPSK.
94 *
95 * \param sinr the SINR ratio (not dB) of the chunk
96 * \param nbits the size of the chunk
97 *
98 * \return the chunk success rate of the differential encoded QPSK.
99 */
100 static double GetDsssDqpskSuccessRate(double sinr, uint64_t nbits);
101 /**
102 * Return the chunk success rate of the differential encoded QPSK for
103 * 5.5Mbps data rate.
104 *
105 * \param sinr the SINR ratio (not dB) of the chunk
106 * \param nbits the size of the chunk
107 *
108 * \return the chunk success rate of the differential encoded QPSK for
109 */
110 static double GetDsssDqpskCck5_5SuccessRate(double sinr, uint64_t nbits);
111 /**
112 * Return the chunk success rate of the differential encoded QPSK for
113 * 11Mbps data rate.
114 *
115 * \param sinr the SINR ratio (not dB) of the chunk
116 * \param nbits the size of the chunk
117 *
118 * \return the chunk success rate of the differential encoded QPSK for
119 */
120 static double GetDsssDqpskCck11SuccessRate(double sinr, uint64_t nbits);
121#ifdef HAVE_GSL
122 static double SymbolErrorProb16Cck(double e2); /// equation (18) in Pursley's paper
123 static double SymbolErrorProb256Cck(double e1); /// equation (17) in Pursley's paper
124#else
125
126 protected:
127 /// WLAN perfect
128 static const double WLAN_SIR_PERFECT;
129 /// WLAN impossible
130 static const double WLAN_SIR_IMPOSSIBLE;
131#endif
132};
133
134} // namespace ns3
135
136#endif /* DSSS_ERROR_RATE_MODEL_H */
an implementation of DSSS error rate model
static double GetDsssDqpskSuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK.
static const double WLAN_SIR_PERFECT
WLAN perfect.
static double GetDsssDbpskSuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential BPSK.
static double GetDsssDqpskCck5_5SuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK for 5.5Mbps data rate.
static double GetDsssDqpskCck11SuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK for 11Mbps data rate.
static const double WLAN_SIR_IMPOSSIBLE
WLAN impossible.
static double DqpskFunction(double x)
A function DQPSK.
Every class exported by the ns3 library is enclosed in the ns3 namespace.