Skip to content

Commit d0d9e72

Browse files
committed
PHY: fix: breakpoint distances use the 3.0e8 m/s the reports define
TR 36.814 Table B.1.2.1-1, TR 36.873 Table 7.2-1 and TR 38.901 Table 7.4.1-1 all introduce the breakpoint distance with the same note: c = 3.0e8 m/s is the propagation velocity in free space. The three models divided by INET's SPEED_OF_LIGHT, 299792458 m/s, which puts every breakpoint 0.07% further out than specified. That reads like a rounding difference of no consequence, and it would be if the breakpoint only chose a branch. It does more: dBP appears in the beyond-breakpoint LOS formulas themselves, in the -9 log10(dBP^2 + (hBS - hUT)^2) term of 3D-UMi, UMi-Street Canyon and UMa and in the PL1(dBP) + 40 log10(d3D/dBP) form of RMa. Every LOS result past a breakpoint therefore came out about 0.005 dB below the specified value. The value is named rather than repeated at each of the thirteen sites, so that the reason it is not the exact speed of light stays attached to it.
1 parent 0fa2e4a commit d0d9e72

4 files changed

Lines changed: 23 additions & 13 deletions

File tree

src/simu5g/stack/phy/channelmodel/PathLossModel.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ class PathLossModel
4949
double log10CarrierFrequencyGHz_ = 0;
5050
bool tolerateMaxDistViolation_ = false;
5151

52+
/*
53+
* Propagation velocity in free space, as the breakpoint-distance notes of
54+
* all three reports define it. This is the rounded 3.0e8 m/s they write,
55+
* not the exact speed of light: the breakpoint distance appears in the
56+
* beyond-breakpoint path-loss formulas themselves and not only in the
57+
* branch condition, so the two choices differ by about 0.005 dB on every
58+
* LOS link past a breakpoint.
59+
*/
60+
static constexpr double PROPAGATION_VELOCITY = 3.0e8;
61+
5262
public:
5363
virtual ~PathLossModel() {}
5464

src/simu5g/stack/phy/channelmodel/Tr36814PathLossModel.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ double Tr36814PathLossModel::getShadowingStdDev(double d3D, double d2D, bool los
9191
{
9292
// Breakpoint distance of the RMa/SMa path loss, the only scenarios whose
9393
// LOS branch uses different sigma values below and above it.
94-
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
94+
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
9595
return selectStdDev(d3D < dbp, losState);
9696
}
9797

@@ -167,7 +167,7 @@ double Tr36814PathLossModel::computeUrbanMicro(double d, bool los)
167167
d = 10;
168168

169169
double dbp = 4 * (hNodeB_ - 1) * (hUe_ - 1)
170-
* (carrierFrequencyHz_ / SPEED_OF_LIGHT);
170+
* (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
171171
if (los) {
172172
// LOS situation
173173
if (d > 5000) {
@@ -200,7 +200,7 @@ double Tr36814PathLossModel::computeUrbanMacro(double d, bool los)
200200
d = 10;
201201

202202
double dbp = 4 * (hNodeB_ - 1) * (hUe_ - 1)
203-
* (carrierFrequencyHz_ / SPEED_OF_LIGHT);
203+
* (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
204204
if (los) {
205205
if (d > 5000) {
206206
if (tolerateMaxDistViolation_)
@@ -238,7 +238,7 @@ double Tr36814PathLossModel::computeSubUrbanMacro(double d, double& dbp, bool lo
238238
d = 10;
239239

240240
dbp = 2 * M_PI * hNodeB_ * hUe_
241-
* (carrierFrequencyHz_ / SPEED_OF_LIGHT);
241+
* (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
242242
if (los) {
243243
if (d > 5000) {
244244
if (tolerateMaxDistViolation_)
@@ -281,7 +281,7 @@ double Tr36814PathLossModel::computeRuralMacro(double d, double& dbp, bool los)
281281
d = 10;
282282

283283
dbp = 2 * M_PI * hNodeB_ * hUe_
284-
* (carrierFrequencyHz_ / SPEED_OF_LIGHT);
284+
* (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
285285
if (los) {
286286
// LOS situation
287287
if (d > 10000) {

src/simu5g/stack/phy/channelmodel/Tr36873PathLossModel.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ double Tr36873PathLossModel::getShadowingStdDev(double d3D, double d2D, bool los
8383
// Breakpoint distance of the RMa/SMa path loss, the only scenarios whose
8484
// LOS branch uses different sigma values below and above it. Unlike
8585
// TR 36.814, the comparison uses the 2D distance (Q1).
86-
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
86+
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
8787
return selectStdDev(d2D < dbp, losState);
8888
}
8989

@@ -140,7 +140,7 @@ double Tr36873PathLossModel::computeUrbanMicro3D(double threeDimDistance, double
140140
// compute break-point distance
141141
double hNodeB = hNodeB_ - 1.0;
142142
double hUe = hUe_ - 1.0;
143-
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
143+
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
144144

145145
double pLoss_los = 0.0;
146146
if (twoDimDistance < dbp)
@@ -208,7 +208,7 @@ double Tr36873PathLossModel::computeUrbanMacro3D(double threeDimDistance, double
208208
double hNodeB = hNodeB_ - hEnvir;
209209
double hUe = hUe_ - hEnvir;
210210

211-
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
211+
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
212212

213213
double pLoss_los = 0.0;
214214
if (twoDimDistance < dbp)
@@ -243,7 +243,7 @@ double Tr36873PathLossModel::computeRuralMacro3D(double threeDimDistance, double
243243
throw cRuntimeError("Error: rural macrocell path loss model is valid for d < 10000 m");
244244
}
245245

246-
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
246+
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
247247

248248
double a1 = (0.03 * pow(hBuilding_, 1.72));
249249
double b1 = 0.044 * pow(hBuilding_, 1.72);

src/simu5g/stack/phy/channelmodel/Tr38901PathLossModel.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ double Tr38901PathLossModel::getShadowingStdDev(double d3D, double d2D, bool los
8585
// the LOS branch of that scenario uses different sigma values below and
8686
// above it. The comparison uses the 2D distance (Q1), like the base
8787
// classes' shadowing breakpoint.
88-
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
88+
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
8989
bool belowBreakpoint = d2D < dbp;
9090

9191
switch (scenario_) {
@@ -185,7 +185,7 @@ double Tr38901PathLossModel::computeUrbanMacro3D(double threeDimDistance, double
185185
}
186186
double hNodeB = hNodeB_ - hEnvir;
187187
double hUe = hUe_ - hEnvir;
188-
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
188+
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
189189

190190
// Compute LOS path loss
191191
double pLoss_los = 0.0;
@@ -225,7 +225,7 @@ double Tr38901PathLossModel::computeUrbanMicro3D(double threeDimDistance, double
225225
double hEnvir = 1.0;
226226
double hNodeB = hNodeB_ - hEnvir;
227227
double hUe = hUe_ - hEnvir;
228-
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
228+
double dbp = 4 * hNodeB * hUe * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
229229

230230
// Compute LOS path loss
231231
double pLoss_los = 0.0;
@@ -268,7 +268,7 @@ double Tr38901PathLossModel::computeRuralMacro3D(double threeDimDistance, double
268268
}
269269

270270
// Compute break-point distance
271-
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / SPEED_OF_LIGHT);
271+
double dbp = 2 * M_PI * hNodeB_ * hUe_ * (carrierFrequencyHz_ / PROPAGATION_VELOCITY);
272272

273273
double h = 5.0; // Average building height
274274
double A = 0.03 * pow(h, 1.72);

0 commit comments

Comments
 (0)