A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
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
25
namespace
ns3
26
{
27
28
#ifdef HAVE_GSL
29
/**
30
* Structure for integral function parameters
31
*/
32
struct
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
*/
46
double
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
*/
72
class
DsssErrorRateModel
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 */
ns3::DsssErrorRateModel
an implementation of DSSS error rate model
Definition:
dsss-error-rate-model.h:73
ns3::DsssErrorRateModel::GetDsssDqpskSuccessRate
static double GetDsssDqpskSuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK.
Definition:
dsss-error-rate-model.cc:61
ns3::DsssErrorRateModel::WLAN_SIR_PERFECT
static const double WLAN_SIR_PERFECT
WLAN perfect.
Definition:
dsss-error-rate-model.h:128
ns3::DsssErrorRateModel::GetDsssDbpskSuccessRate
static double GetDsssDbpskSuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential BPSK.
Definition:
dsss-error-rate-model.cc:52
ns3::DsssErrorRateModel::GetDsssDqpskCck5_5SuccessRate
static double GetDsssDqpskCck5_5SuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK for 5.5Mbps data rate.
Definition:
dsss-error-rate-model.cc:70
ns3::DsssErrorRateModel::GetDsssDqpskCck11SuccessRate
static double GetDsssDqpskCck11SuccessRate(double sinr, uint64_t nbits)
Return the chunk success rate of the differential encoded QPSK for 11Mbps data rate.
Definition:
dsss-error-rate-model.cc:104
ns3::DsssErrorRateModel::WLAN_SIR_IMPOSSIBLE
static const double WLAN_SIR_IMPOSSIBLE
WLAN impossible.
Definition:
dsss-error-rate-model.h:130
ns3::DsssErrorRateModel::DqpskFunction
static double DqpskFunction(double x)
A function DQPSK.
Definition:
dsss-error-rate-model.cc:44
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
wifi
model
non-ht
dsss-error-rate-model.h
Generated on Tue May 28 2024 23:40:21 for ns-3 by
1.9.6