36 return ((sqrt (2.0) + 1.0) / sqrt (8.0 * 3.1415926 * sqrt (2.0)))
38 * exp ( -(2.0 - sqrt (2.0)) *
x);
44 double EbN0 = sinr * 22000000.0 / 1000000.0;
45 double ber = 0.5 * exp (-EbN0);
46 return pow ((1.0 - ber), nbits);
52 double EbN0 = sinr * 22000000.0 / 1000000.0 / 2.0;
54 return pow ((1.0 - ber), nbits);
62 double EbN0 = sinr * 22000000.0 / 1375000.0 / 4.0;
63 double sep = SymbolErrorProb16Cck (4.0 * EbN0 / 2.0);
64 return pow (1.0 - sep,nbits / 4.0);
66 NS_LOG_WARN (
"Running a 802.11b CCK Matlab model less accurate than GSL model");
80 double a1 = 5.3681634344056195e-001;
81 double a2 = 3.3092430025608586e-003;
82 double a3 = 4.1654372361004000e-001;
83 double a4 = 1.0288981434358866e+000;
84 ber = a1 * exp (-(pow ((sinr - a2) / a3,a4)));
86 return pow ((1.0 - ber), nbits);
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);
99 NS_LOG_WARN (
"Running a 802.11b CCK Matlab model less accurate than GSL model");
113 double a1 = 7.9056742265333456e-003;
114 double a2 = -1.8397449399176360e-001;
115 double a3 = 1.0740689468707241e+000;
116 double a4 = 1.0523316904502553e+000;
117 double a5 = 3.0552298746496687e-001;
118 double a6 = 2.2032715128698435e+000;
119 ber = (a1 * sinr * sinr + a2 * sinr + a3) / (sinr * sinr * sinr + a4 * sinr * sinr + a5 * sinr + a6);
121 return pow ((1.0 - ber), nbits);
127 IntegralFunction (
double x,
void *params)
129 double beta = ((FunctionParameters *) params)->beta;
130 double n = ((FunctionParameters *) params)->n;
131 double IntegralFunction = pow (2 * gsl_cdf_ugaussian_P (x + beta) - 1, n - 1)
132 * exp (-x * x / 2.0) / sqrt (2.0 * M_PI);
133 return IntegralFunction;
137 DsssErrorRateModel::SymbolErrorProb16Cck (
double e2)
142 FunctionParameters params;
143 params.beta = sqrt (2.0 * e2);
146 gsl_integration_workspace *
w = gsl_integration_workspace_alloc (1000);
149 F.function = &IntegralFunction;
152 gsl_integration_qagiu (&F,-params.beta, 0, 1e-7, 1000, w, &sep, &error);
153 gsl_integration_workspace_free (w);
162 double DsssErrorRateModel::SymbolErrorProb256Cck (
double e1)
164 return 1.0 - pow (1.0 - SymbolErrorProb16Cck (e1 / 2.0), 2.0);