A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-propagation-loss-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
3 * University of Padova
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 */
7
8#ifndef THREE_GPP_PROPAGATION_LOSS_MODEL_H
9#define THREE_GPP_PROPAGATION_LOSS_MODEL_H
10
13
14namespace ns3
15{
16
17/**
18 * @ingroup propagation
19 *
20 * @brief Base class for the 3GPP propagation models
21 */
23{
24 public:
25 /**
26 * @brief Get the type ID.
27 * @return the object TypeId
28 */
29 static TypeId GetTypeId();
30
31 /**
32 * Constructor
33 */
35
36 /**
37 * Destructor
38 */
40
41 // Delete copy constructor and assignment operator to avoid misuse
44
45 /**
46 * @brief Set the channel condition model used to determine the channel
47 * state (e.g., the LOS/NLOS condition)
48 * @param model pointer to the channel condition model
49 */
51
52 /**
53 * @brief Returns the associated channel condition model
54 * @return the channel condition model
55 */
57
58 /**
59 * @brief Set the central frequency of the model
60 * @param f the central frequency in the range in Hz, between 500.0e6 and 100.0e9 Hz
61 */
62 void SetFrequency(double f);
63
64 /**
65 * @brief Return the current central frequency
66 * @return The current central frequency
67 */
68 double GetFrequency() const;
69
70 /**
71 * @brief Return true if the O2I Building Penetration loss
72 * corresponds to a low loss condition.
73 * @param cond The ptr to the channel condition model
74 * @return True for low loss, false for high
75 */
77
78 /**
79 * @brief Clear cached O2I Building Penetration loss.
80 * Triggers a recomputation of losses.
81 * Used for testing.
82 */
84
85 private:
86 /**
87 * Computes the received power by applying the pathloss model described in
88 * 3GPP TR 38.901
89 *
90 * @param txPowerDbm tx power in dBm
91 * @param a tx mobility model
92 * @param b rx mobility model
93 * @return the rx power in dBm
94 */
95 double DoCalcRxPower(double txPowerDbm,
97 Ptr<MobilityModel> b) const override;
98
99 /**
100 * @brief Computes the pathloss between a and b
101 * @param cond the channel condition
102 * @param a tx mobility model
103 * @param b rx mobility model
104 * @return pathloss value in dB
105 */
107
108 /**
109 * @brief Computes the pathloss between a and b considering that the line of
110 * sight is not obstructed
111 * @param a tx mobility model
112 * @param b rx mobility model
113 * @return pathloss value in dB
114 */
115 virtual double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
116
117 /**
118 * @brief Computes the pathloss between a and b considering that the line of
119 * sight is obstructed
120 * @param a tx mobility model
121 * @param b rx mobility model
122 * @return pathloss value in dB
123 */
124 virtual double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
125
126 /**
127 * @brief Returns the minimum of the two independently generated distances
128 * according to the uniform distribution between the minimum and the maximum
129 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
130 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
131 * for RMa.
132 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
133 * generated. 2D−in distance is used for the O2I penetration losses
134 * calculation according to 3GPP TR 38.901 7.4.3.
135 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
136 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
137 */
138 virtual double GetO2iDistance2dIn() const = 0;
139
140 /**
141 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
142 * If not found or if the channel condition changed it generates a new
143 * independent realization and stores it in the map, otherwise it calculates
144 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
145 *
146 *
147 * @param a tx mobility model (used for the key calculation)
148 * @param b rx mobility model (used for the key calculation)
149 * @param cond the LOS/NLOS channel condition
150 * @return o2iLoss
151 */
155
156 /**
157 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
158 * If not found or if the channel condition changed it generates a new
159 * independent realization and stores it in the map, otherwise it calculates
160 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
161 *
162 * Note that all child classes should implement this function to support
163 * low losses calculation. As such, this function should be purely virtual.
164 *
165 * @param a tx mobility model (used for the key calculation)
166 * @param b rx mobility model (used for the key calculation)
167 * @param cond the LOS/NLOS channel condition
168 * @return o2iLoss
169 */
173
174 /**
175 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
176 * If not found or if the channel condition changed it generates a new
177 * independent realization and stores it in the map, otherwise it calculates
178 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
179 *
180 * Note that all child classes should implement this function to support
181 * high losses calculation. As such, this function should be purely virtual.
182 *
183 * @param a tx mobility model (used for the key calculation)
184 * @param b rx mobility model (used for the key calculation)
185 * @param cond the LOS/NLOS channel condition
186 * @return o2iLoss
187 */
191
192 /**
193 * @brief Computes the o2i vehicular penetration loss by looking at m_o2iVehicularUtLossMap.
194 * The loss is composed by the sum of losses for each UT, if vehicles,
195 * as implied by their speed (30-120 km/h).
196 * The loss for each UT is defined in 3GPP TR 38.901 7.4.3.2.
197 *
198 * @param a tx mobility model (used for the key calculation)
199 * @param b rx mobility model (used for the key calculation)
200 * @param cond the O2I channel condition (O2I, O2O)
201 * @return vehicular o2iLoss
202 */
206 /**
207 * @brief Indicates the condition of the o2i building penetration loss
208 * (defined in 3GPP TR 38.901 7.4.3.1).
209 * The default implementation returns the condition as set
210 * (either based on the buildings materials, or if the probabilistic
211 * model is used in the ThreeGppChannelConditionModel, then
212 * based on the result of a random variable).
213 * The derived classes can change the default behavior by overriding
214 * this method.
215 * @param cond the ptr to the channel condition model
216 * @return True for low losses, false for high losses
217 */
219
220 /**
221 * @brief Computes the pathloss between a and b considering that the line of
222 * sight is obstructed by a vehicle. By default it raises an error to
223 * avoid misuse.
224 * @param a tx mobility model
225 * @param b rx mobility model
226 * @return pathloss value in dB
227 */
228 virtual double GetLossNlosv(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
229
230 /**
231 * @brief Retrieves the shadowing value by looking at m_shadowingMap.
232 * If not found or if the channel condition changed it generates a new
233 * independent realization and stores it in the map, otherwise it correlates
234 * the new value with the previous one using the autocorrelation function
235 * defined in 3GPP TR 38.901, Sec. 7.4.4.
236 * @param a tx mobility model
237 * @param b rx mobility model
238 * @param cond the LOS/NLOS channel condition
239 * @return shadowing loss in dB
240 */
244
245 /**
246 * @brief Sample the SpatialGaussianField of shadow fading owned by a
247 * (site, condition slot) pair, see the InterUeSpatialConsistency
248 * attribute.
249 *
250 * @param siteNodeId Node id of the site endpoint owning the field.
251 * @param condSlot Channel condition slot (0 = LOS, 1 = NLOS, 2 = O2I).
252 * @param position Sampling position (only x and y are used).
253 * @param corrDist Correlation distance in meters; non-positive values
254 * degrade to a single deterministic draw at the position.
255 * @return A sample of the field with N(0,1) marginal distribution.
256 */
258 uint8_t condSlot,
259 const Vector& position,
260 double corrDist) const;
261
262 /**
263 * @brief Returns the shadow fading standard deviation
264 * @param a tx mobility model
265 * @param b rx mobility model
266 * @param cond the LOS/NLOS channel condition
267 * @return shadowing std in dB
268 */
272
273 /**
274 * @brief Returns the shadow fading correlation distance
275 * @param cond the LOS/NLOS channel condition
276 * @return shadowing correlation distance in meters
277 */
280
281 /**
282 * @brief Returns the shadow fading correlation distance of O2I links (3GPP
283 * TR 38.901 Table 7.5-6, O2I column); scenarios without an O2I
284 * column reuse the NLOS distance.
285 * @return shadowing correlation distance in meters
286 */
287 virtual double GetO2iShadowingCorrelationDistance() const;
288
289 /**
290 * @brief Returns an unique key for the channel between a and b.
291 *
292 * The key is the value of the Cantor function calculated by using as
293 * first parameter the lowest node ID, and as a second parameter the highest
294 * node ID.
295 *
296 * @param a tx mobility model
297 * @param b rx mobility model
298 * @return channel key
299 */
301
302 /**
303 * @brief Get the difference between the node position
304 *
305 * The difference is calculated as (b-a) if Id(a) < Id (b), or
306 * (a-b) if Id(b) <= Id(a).
307 *
308 * @param a First node
309 * @param b Second node
310 * @return the difference between the node vector position
311 */
313
314 protected:
315 void DoDispose() override;
316 void NotifyConstructionCompleted() override;
317 /**
318 * @brief Returns a a single, link-specific, uniformly distributed variable
319 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
320 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
321 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
322 * generated. 2D−in distance is used for the O2I penetration losses
323 * calculation according to 3GPP TR 38.901 7.4.3.
324 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
325 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
326 */
327 virtual double GetO2iDistance2dInSub6Ghz() const;
328
329 /**
330 * @brief Returns the upper bound of the uniform variables of the O2I 2D-in
331 * distance of GetO2iDistance2dIn(), i.e., 25 m for UMa and
332 * UMi-Street Canyon and 10 m for RMa. The base implementation
333 * returns 0 (no indoor distance).
334 * @return The upper bound in meters.
335 */
336 virtual double GetO2iDistance2dInMax() const;
337
338 /**
339 * @brief Returns the upper bound of the uniform variable of the O2I 2D-in
340 * distance of GetO2iDistance2dInSub6Ghz(), i.e., 25 m for UMa and
341 * UMi-Street Canyon. The base implementation returns 0 (no indoor
342 * distance).
343 * @return The upper bound in meters.
344 */
345 virtual double GetO2iDistance2dInSub6GhzMax() const;
346
347 /**
348 * @brief Computes the 2D distance between two 3D vectors
349 * @param a the first 3D vector
350 * @param b the second 3D vector
351 * @return the 2D distance between a and b
352 */
353 static double Calculate2dDistance(Vector a, Vector b);
354
355 Ptr<ChannelConditionModel> m_channelConditionModel; //!< pointer to the channel condition model
356 double m_frequency; //!< operating frequency in Hz
357 bool m_shadowingEnabled; //!< enable/disable shadowing
358 bool m_enforceRanges; //!< strictly enforce TR 38.901 parameter ranges
359 bool m_buildingPenLossesEnabled; //!< enable/disable building penetration losses
360 double m_meanVehicleO2iLoss; //!< normal cars (9dB), cars with metal coated glass panels (20dB)
362
363 /** Define a struct for the m_shadowingMap entries */
365 {
366 double m_shadowing; //!< the shadowing loss in dB
368 Vector m_distance; //!< the vector AB
369 };
370
371 mutable std::unordered_map<uint32_t, ShadowingMapItem>
372 m_shadowingMap; //!< map to store the shadowing values
373
374 /** Define a struct for the m_o2iLossMap entries */
376 {
377 double m_o2iLoss; //!< the o2i loss in dB
379 };
380
381 mutable std::unordered_map<uint32_t, O2iLossMapItem>
382 m_o2iLossMap; //!< map to store the o2i Loss values
383
384 mutable std::unordered_map<uint32_t, double>
385 m_o2iVehicularUtLossMap; //!< vehicular O2I loss for each individual UT with speed x, such
386 //!< that 30 < x <= 120 km/h.
387 //!< UT is addressed by NodeId
388
389 Ptr<UniformRandomVariable> m_randomO2iVar1; //!< a uniform random variable for the calculation
390 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
391 Ptr<UniformRandomVariable> m_randomO2iVar2; //!< a uniform random variable for the calculation
392 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
394 m_normalO2iLowLossVar; //!< a normal random variable for the calculation of 02i low loss,
395 //!< see TR38.901 Table 7.4.3-2
397 m_normalO2iHighLossVar; //!< a normal random variable for the calculation of 02i high loss,
398 //!< see TR38.901 Table 7.4.3-2
399
401 m_normalO2iVehicularLossVar; //!< a normal random variable for the calculation of
402 //!< penetration loss for vehicles see TR38.901 section 7.4.3.2
403 int64_t DoAssignStreams(int64_t stream) override;
404};
405
406/**
407 * @ingroup propagation
408 *
409 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
410 * for the RMa scenario.
411 */
413{
414 public:
415 /**
416 * @brief Get the type ID.
417 * @return the object TypeId
418 */
419 static TypeId GetTypeId();
420
421 /**
422 * Constructor
423 */
425
426 /**
427 * Destructor
428 */
430
431 // Delete copy constructor and assignment operator to avoid misuse
434
435 private:
436 /**
437 * @brief Computes the pathloss between a and b considering that the line of
438 * sight is not obstructed
439 * @param a tx mobility model
440 * @param b rx mobility model
441 * @return pathloss value in dB
442 */
443 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
444
445 /**
446 * @brief Returns the minimum of the two independently generated distances
447 * according to the uniform distribution between the minimum and the maximum
448 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
449 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
450 * for RMa.
451 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
452 * generated. 2D−in distance is used for the O2I penetration losses
453 * calculation according to 3GPP TR 38.901 7.4.3.
454 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
455 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
456 */
457 double GetO2iDistance2dIn() const override;
458 double GetO2iDistance2dInMax() const override;
459
460 /**
461 * @brief Indicates the condition of the o2i building penetration loss
462 * (defined in 3GPP TR 38.901 7.4.3.1).
463 * @param cond the ptr to the channel condition model
464 * @return True for low losses, false for high losses
465 */
467
468 /**
469 * @brief Computes the pathloss between a and b considering that the line of
470 * sight is obstructed
471 * @param a tx mobility model
472 * @param b rx mobility model
473 * @return pathloss value in dB
474 */
475 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
476
477 /**
478 * @brief Returns the shadow fading standard deviation
479 * @param a tx mobility model
480 * @param b rx mobility model
481 * @param cond the LOS/NLOS channel condition
482 * @return shadowing std in dB
483 */
486 ChannelCondition::LosConditionValue cond) const override;
487
488 /**
489 * @brief Returns the shadow fading correlation distance
490 * @param cond the LOS/NLOS channel condition
491 * @return shadowing correlation distance in meters
492 */
494 double GetO2iShadowingCorrelationDistance() const override;
495
496 /**
497 * @brief Computes the PL1 formula for the RMa scenario
498 * @param frequency the operating frequency in Hz
499 * @param distance3D the 3D distance between the tx and the rx nodes in meters
500 * @param h the average building height in meters
501 * @param w the average street width in meters
502 * @return result of the PL1 formula
503 */
504 static double Pl1(double frequency, double distance3D, double h, double w);
505
506 /**
507 * @brief Computes the breakpoint distance for the RMa scenario
508 * @param frequency the operating frequency in Hz
509 * @param hA height of the tx node in meters
510 * @param hB height of the rx node in meters
511 * @return the breakpoint distance in meters
512 */
513 static double GetBpDistance(double frequency, double hA, double hB);
514
515 double m_h; //!< average building height in meters
516 double m_w; //!< average street width in meters
517};
518
519/**
520 * @ingroup propagation
521 *
522 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
523 * for the UMa scenario.
524 */
526{
527 public:
528 /**
529 * @brief Get the type ID.
530 * @return the object TypeId
531 */
532 static TypeId GetTypeId();
533
534 /**
535 * Constructor
536 */
538
539 /**
540 * Destructor
541 */
543
544 // Delete copy constructor and assignment operator to avoid misuse
547
548 private:
549 int64_t DoAssignStreams(int64_t stream) override;
550
551 /**
552 * @brief Computes the pathloss between a and b considering that the line of
553 * sight is not obstructed
554 * @param a tx mobility model
555 * @param b rx mobility model
556 * @return pathloss value in dB
557 */
558 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
559
560 /**
561 * @brief Returns the minimum of the two independently generated distances
562 * according to the uniform distribution between the minimum and the maximum
563 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
564 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
565 * for RMa.
566 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
567 * generated. 2D−in distance is used for the O2I penetration losses
568 * calculation according to 3GPP TR 38.901 7.4.3.
569 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
570 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
571 */
572 double GetO2iDistance2dIn() const override;
573
574 /**
575 * @brief Returns a a single, link-specific, uniformly distributed variable
576 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
577 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
578 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
579 * generated. 2D−in distance is used for the O2I penetration losses
580 * calculation according to 3GPP TR 38.901 7.4.3.
581 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
582 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
583 */
584 double GetO2iDistance2dInSub6Ghz() const override;
585 double GetO2iDistance2dInMax() const override;
586 double GetO2iDistance2dInSub6GhzMax() const override;
587
588 /**
589 * @brief Computes the pathloss between a and b considering that the line of
590 * sight is obstructed.
591 * @param a tx mobility model
592 * @param b rx mobility model
593 * @return pathloss value in dB
594 */
595 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
596
597 /**
598 * @brief Returns the shadow fading standard deviation
599 * @param a tx mobility model
600 * @param b rx mobility model
601 * @param cond the LOS/NLOS channel condition
602 * @return shadowing std in dB
603 */
606 ChannelCondition::LosConditionValue cond) const override;
607
608 /**
609 * @brief Returns the shadow fading correlation distance
610 * @param cond the LOS/NLOS channel condition
611 * @return shadowing correlation distance in meters
612 */
614 double GetO2iShadowingCorrelationDistance() const override;
615
616 /**
617 * @brief Computes the breakpoint distance
618 * @param hUt height of the UT in meters
619 * @param hBs height of the BS in meters
620 * @param distance2D distance between the two nodes in meters
621 * @return the breakpoint distance in meters
622 */
623 double GetBpDistance(double hUt, double hBs, double distance2D) const;
624
625 Ptr<UniformRandomVariable> m_uniformVar; //!< a uniform random variable used for the computation
626 //!< of the breakpoint distance
627};
628
629/**
630 * @ingroup propagation
631 *
632 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
633 * for the UMi-Street Canyon scenario.
634 */
636{
637 public:
638 /**
639 * @brief Get the type ID.
640 * @return the object TypeId
641 */
642 static TypeId GetTypeId();
643
644 /**
645 * Constructor
646 */
648
649 /**
650 * Destructor
651 */
653
654 // Delete copy constructor and assignment operator to avoid misuse
659
660 private:
661 /**
662 * @brief Computes the pathloss between a and b considering that the line of
663 * sight is not obstructed
664 * @param a tx mobility model
665 * @param b rx mobility model
666 * @return pathloss value in dB
667 */
668 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
669
670 /**
671 * @brief Returns the minimum of the two independently generated distances
672 * according to the uniform distribution between the minimum and the maximum
673 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
674 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
675 * for RMa.
676 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
677 * generated. 2D−in distance is used for the O2I penetration losses
678 * calculation according to 3GPP TR 38.901 7.4.3.
679 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
680 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
681 */
682 double GetO2iDistance2dIn() const override;
683
684 /**
685 * @brief Returns a a single, link-specific, uniformly distributed variable
686 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
687 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
688 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
689 * generated. 2D−in distance is used for the O2I penetration losses
690 * calculation according to 3GPP TR 38.901 7.4.3.
691 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
692 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
693 */
694 double GetO2iDistance2dInSub6Ghz() const override;
695 double GetO2iDistance2dInMax() const override;
696 double GetO2iDistance2dInSub6GhzMax() const override;
697
698 /**
699 * @brief Computes the pathloss between a and b considering that the line of
700 * sight is obstructed.
701 * @param a tx mobility model
702 * @param b rx mobility model
703 * @return pathloss value in dB
704 */
705 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
706
707 /**
708 * @brief Returns the shadow fading standard deviation
709 * @param a tx mobility model
710 * @param b rx mobility model
711 * @param cond the LOS/NLOS channel condition
712 * @return shadowing std in dB
713 */
716 ChannelCondition::LosConditionValue cond) const override;
717
718 /**
719 * @brief Returns the shadow fading correlation distance
720 * @param cond the LOS/NLOS channel condition
721 * @return shadowing correlation distance in meters
722 */
724 double GetO2iShadowingCorrelationDistance() const override;
725
726 /**
727 * @brief Computes the breakpoint distance
728 * @param hUt height of the UT node in meters
729 * @param hBs height of the BS node in meters
730 * @param distance2D distance between the two nodes in meters
731 * @return the breakpoint distance in meters
732 */
733 double GetBpDistance(double hUt, double hBs, double distance2D) const;
734};
735
736/**
737 * @ingroup propagation
738 *
739 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
740 * for the Indoor Office scenario.
741 */
743{
744 public:
745 /**
746 * @brief Get the type ID.
747 * @return the object TypeId
748 */
749 static TypeId GetTypeId();
750
751 /**
752 * Constructor
753 */
755
756 /**
757 * Destructor
758 */
760
761 // Delete copy constructor and assignment operator to avoid misuse
763 delete;
766
767 private:
768 /**
769 * @brief Computes the pathloss between a and b considering that the line of
770 * sight is not obstructed
771 * @param a tx mobility model
772 * @param b rx mobility model
773 * @return pathloss value in dB
774 */
775 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
776
777 /**
778 * @brief Returns the minimum of the two independently generated distances
779 * according to the uniform distribution between the minimum and the maximum
780 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
781 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
782 * for RMa.
783 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
784 * generated. 2D−in distance is used for the O2I penetration losses
785 * calculation according to 3GPP TR 38.901 7.4.3.
786 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
787 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
788 */
789 double GetO2iDistance2dIn() const override;
790
791 /**
792 * @brief Computes the pathloss between a and b considering that the line of
793 * sight is obstructed
794 * @param a tx mobility model
795 * @param b rx mobility model
796 * @return pathloss value in dB
797 */
798 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
799
800 /**
801 * @brief Returns the shadow fading standard deviation
802 * @param a tx mobility model
803 * @param b rx mobility model
804 * @param cond the LOS/NLOS channel condition
805 * @return shadowing std in dB
806 */
809 ChannelCondition::LosConditionValue cond) const override;
810
811 /**
812 * @brief Returns the shadow fading correlation distance
813 * @param cond the LOS/NLOS channel condition
814 * @return shadowing correlation distance in meters
815 */
817};
818
819/**
820 * @ingroup propagation
821 *
822 * @brief Base class for the NTN pathloss models defined in 3GPP TR 38.811.
823 *
824 * This class holds the path loss computations common to all NTN scenarios.
825 * The scenario subclasses provide the scenario-specific channel condition
826 * model, shadow fading and clutter loss table, and shadowing correlation
827 * distances.
828 *
829 * The model is defined for satellite-to-ground links with elevation angles
830 * between 10 and 90 degrees. For links outside this domain, i.e., with a
831 * non-positive elevation angle (such as between two ground terminals, or
832 * with the satellite below the horizon) or an undefined elevation angle
833 * (coincident positions), the elevation-dependent terms are not evaluated
834 * and a fixed loss of 500 dB is returned instead.
835 */
837{
838 public:
839 /**
840 * @brief Get the type ID.
841 * @return the object TypeId
842 */
843 static TypeId GetTypeId();
844
845 /**
846 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
847 * Does nothing in NTN scenarios.
848 */
849 double GetO2iDistance2dIn() const override;
850
851 protected:
852 /**
853 * @brief The nested map containing the Shadow Fading and Clutter Loss
854 * values for the scenario, set by the subclass constructor
855 */
856 const std::map<int, std::vector<float>>* m_SFCL{nullptr};
857 double m_shadowingCorrDistanceLos{0}; //!< shadowing correlation distance for LOS, in meters
858 double m_shadowingCorrDistanceNlos{0}; //!< shadowing correlation distance for NLOS, in meters
859 bool m_ionoScintLossEnabled{true}; //!< whether the ionospheric scintillation loss is applied
860 bool m_tropoScintLossEnabled{true}; //!< whether the tropospheric scintillation loss is applied
861
862 private:
863 // Inherited
864 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
865 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
868 ChannelCondition::LosConditionValue cond) const override;
870};
871
872/**
873 * @ingroup propagation
874 *
875 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Sec. 6.6.2,
876 * for the NTN Dense Urban scenario.
877 */
879{
880 public:
881 /**
882 * @brief Get the type ID.
883 * @return the object TypeId
884 */
885 static TypeId GetTypeId();
886
887 /**
888 * Constructor
889 */
891
892 /**
893 * Destructor
894 */
896
897 /**
898 * @brief Copy constructor
899 *
900 * Deleted in base class
901 */
903 delete;
904
905 /**
906 * @brief Copy constructor
907 *
908 * Deleted in base class
909 * @returns the ThreeGppNTNDenseUrbanPropagationLossModel instance
910 */
913};
914
915/**
916 * @ingroup propagation
917 *
918 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Sec. 6.6.2,
919 * for the NTN Urban scenario.
920 */
922{
923 public:
924 /**
925 * @brief Get the type ID.
926 * @return the object TypeId
927 */
928 static TypeId GetTypeId();
929
930 /**
931 * Constructor
932 */
934
935 /**
936 * Destructor
937 */
939
940 /**
941 * @brief Copy constructor
942 *
943 * Deleted in base class
944 */
946
947 /**
948 * @brief Copy constructor
949 *
950 * Deleted in base class
951 * @returns the ThreeGppNTNUrbanPropagationLossModel instance
952 */
954 delete;
955};
956
957/**
958 * @ingroup propagation
959 *
960 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Sec. 6.6.2,
961 * for the NTN Suburban scenario.
962 */
964{
965 public:
966 /**
967 * @brief Get the type ID.
968 * @return the object TypeId
969 */
970 static TypeId GetTypeId();
971
972 /**
973 * Constructor
974 */
976
977 /**
978 * Destructor
979 */
981
982 /**
983 * @brief Copy constructor
984 *
985 * Deleted in base class
986 */
988 delete;
989
990 /**
991 * @brief Copy constructor
992 *
993 * Deleted in base class
994 * @returns the ThreeGppNTNSuburbanPropagationLossModel instance
995 */
998};
999
1000/**
1001 * @ingroup propagation
1002 *
1003 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Sec. 6.6.2,
1004 * for the NTN Rural scenario.
1005 */
1007{
1008 public:
1009 /**
1010 * @brief Get the type ID.
1011 * @return the object TypeId
1012 */
1013 static TypeId GetTypeId();
1014
1015 /**
1016 * Constructor
1017 */
1019
1020 /**
1021 * Destructor
1022 */
1024
1025 /**
1026 * @brief Copy constructor
1027 *
1028 * Deleted in base class
1029 */
1031
1032 /**
1033 * @brief Copy constructor
1034 *
1035 * Deleted in base class
1036 * @returns the ThreeGppNTNRuralPropagationLossModel instance
1037 */
1039 delete;
1040};
1041
1042} // namespace ns3
1043
1044#endif /* THREE_GPP_PROPAGATION_LOSS_MODEL_H */
O2iConditionValue
Possible values for Outdoor to Indoor condition.
LosConditionValue
Possible values for Line-of-Sight condition.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:70
ThreeGppIndoorOfficePropagationLossModel(const ThreeGppIndoorOfficePropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is obstructed.
ThreeGppIndoorOfficePropagationLossModel & operator=(const ThreeGppIndoorOfficePropagationLossModel &)=delete
double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed.
ThreeGppNTNDenseUrbanPropagationLossModel(const ThreeGppNTNDenseUrbanPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNDenseUrbanPropagationLossModel & operator=(const ThreeGppNTNDenseUrbanPropagationLossModel &)=delete
Copy constructor.
Base class for the NTN pathloss models defined in 3GPP TR 38.811.
const std::map< int, std::vector< float > > * m_SFCL
The nested map containing the Shadow Fading and Clutter Loss values for the scenario,...
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed.
double m_shadowingCorrDistanceLos
shadowing correlation distance for LOS, in meters
bool m_tropoScintLossEnabled
whether the tropospheric scintillation loss is applied
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
bool m_ionoScintLossEnabled
whether the ionospheric scintillation loss is applied
double m_shadowingCorrDistanceNlos
shadowing correlation distance for NLOS, in meters
double GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is obstructed.
ThreeGppNTNRuralPropagationLossModel(const ThreeGppNTNRuralPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNRuralPropagationLossModel & operator=(const ThreeGppNTNRuralPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNSuburbanPropagationLossModel(const ThreeGppNTNSuburbanPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNSuburbanPropagationLossModel & operator=(const ThreeGppNTNSuburbanPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNUrbanPropagationLossModel & operator=(const ThreeGppNTNUrbanPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNUrbanPropagationLossModel(const ThreeGppNTNUrbanPropagationLossModel &)=delete
Copy constructor.
Ptr< ChannelConditionModel > GetChannelConditionModel() const
Returns the associated channel condition model.
virtual double GetO2iLowPenetrationLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
Ptr< UniformRandomVariable > m_randomO2iVar2
a uniform random variable for the calculation of the indoor loss, see TR38.901 Table 7....
double m_meanVehicleO2iLoss
normal cars (9dB), cars with metal coated glass panels (20dB)
double GetFrequency() const
Return the current central frequency.
virtual double GetO2iShadowingCorrelationDistance() const
Returns the shadow fading correlation distance of O2I links (3GPP TR 38.901 Table 7....
double GetLoss(Ptr< ChannelCondition > cond, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Computes the pathloss between a and b.
Ptr< UniformRandomVariable > m_randomO2iVar1
a uniform random variable for the calculation of the indoor loss, see TR38.901 Table 7....
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the shadowing value by looking at m_shadowingMap.
static double Calculate2dDistance(Vector a, Vector b)
Computes the 2D distance between two 3D vectors.
void SetChannelConditionModel(Ptr< ChannelConditionModel > model)
Set the channel condition model used to determine the channel state (e.g., the LOS/NLOS condition).
std::unordered_map< uint32_t, ShadowingMapItem > m_shadowingMap
map to store the shadowing values
virtual double GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
Computes the pathloss between a and b considering that the line of sight is obstructed.
virtual bool DoIsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const
Indicates the condition of the o2i building penetration loss (defined in 3GPP TR 38....
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
virtual double GetLossNlosv(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Computes the pathloss between a and b considering that the line of sight is obstructed by a vehicle.
Ptr< NormalRandomVariable > m_normalO2iVehicularLossVar
a normal random variable for the calculation of penetration loss for vehicles see TR38....
ThreeGppPropagationLossModel & operator=(const ThreeGppPropagationLossModel &)=delete
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading correlation distance.
ThreeGppPropagationLossModel(const ThreeGppPropagationLossModel &)=delete
Ptr< NormalRandomVariable > m_normRandomVariable
normal random variable
Ptr< ChannelConditionModel > m_channelConditionModel
pointer to the channel condition model
void NotifyConstructionCompleted() override
Notifier called once the ObjectBase is fully constructed.
std::unordered_map< uint32_t, O2iLossMapItem > m_o2iLossMap
map to store the o2i Loss values
virtual double GetO2iDistance2dIn() const =0
Returns the minimum of the two independently generated distances according to the uniform distributio...
std::unordered_map< uint32_t, double > m_o2iVehicularUtLossMap
vehicular O2I loss for each individual UT with speed x, such that 30 < x <= 120 km/h.
virtual double GetO2iHighPenetrationLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
double SampleSpatiallyCorrelatedNormal(uint32_t siteNodeId, uint8_t condSlot, const Vector &position, double corrDist) const
Sample the SpatialGaussianField of shadow fading owned by a (site, condition slot) pair,...
bool IsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const
Return true if the O2I Building Penetration loss corresponds to a low loss condition.
virtual double GetO2iDistance2dInMax() const
Returns the upper bound of the uniform variables of the O2I 2D-in distance of GetO2iDistance2dIn(),...
virtual double GetO2iDistance2dInSub6Ghz() const
Returns a a single, link-specific, uniformly distributed variable value depending on the specific 3GP...
void SetFrequency(double f)
Set the central frequency of the model.
void ClearO2iLossCacheMap()
Clear cached O2I Building Penetration loss.
virtual double GetO2iDistance2dInSub6GhzMax() const
Returns the upper bound of the uniform variable of the O2I 2D-in distance of GetO2iDistance2dInSub6Gh...
void DoDispose() override
Destructor implementation.
static uint32_t GetKey(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Returns an unique key for the channel between a and b.
Ptr< NormalRandomVariable > m_normalO2iLowLossVar
a normal random variable for the calculation of 02i low loss, see TR38.901 Table 7....
bool m_enforceRanges
strictly enforce TR 38.901 parameter ranges
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading standard deviation.
Ptr< NormalRandomVariable > m_normalO2iHighLossVar
a normal random variable for the calculation of 02i high loss, see TR38.901 Table 7....
double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the received power by applying the pathloss model described in 3GPP TR 38....
double GetO2iSub6GhzPenetrationLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
static Vector GetVectorDifference(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Get the difference between the node position.
bool m_buildingPenLossesEnabled
enable/disable building penetration losses
double GetO2iVehicularLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::O2iConditionValue cond) const
Computes the o2i vehicular penetration loss by looking at m_o2iVehicularUtLossMap.
virtual double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
Computes the pathloss between a and b considering that the line of sight is not obstructed.
double GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is obstructed.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
static double Pl1(double frequency, double distance3D, double h, double w)
Computes the PL1 formula for the RMa scenario.
ThreeGppRmaPropagationLossModel & operator=(const ThreeGppRmaPropagationLossModel &)=delete
double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetO2iDistance2dInMax() const override
Returns the upper bound of the uniform variables of the O2I 2D-in distance of GetO2iDistance2dIn(),...
ThreeGppRmaPropagationLossModel(const ThreeGppRmaPropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double m_h
average building height in meters
static double GetBpDistance(double frequency, double hA, double hB)
Computes the breakpoint distance for the RMa scenario.
bool DoIsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const override
Indicates the condition of the o2i building penetration loss (defined in 3GPP TR 38....
double GetO2iShadowingCorrelationDistance() const override
Returns the shadow fading correlation distance of O2I links (3GPP TR 38.901 Table 7....
double GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is obstructed.
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance.
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed.
ThreeGppUmaPropagationLossModel(const ThreeGppUmaPropagationLossModel &)=delete
double GetO2iShadowingCorrelationDistance() const override
Returns the shadow fading correlation distance of O2I links (3GPP TR 38.901 Table 7....
ThreeGppUmaPropagationLossModel & operator=(const ThreeGppUmaPropagationLossModel &)=delete
double GetO2iDistance2dInMax() const override
Returns the upper bound of the uniform variables of the O2I 2D-in distance of GetO2iDistance2dIn(),...
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetO2iDistance2dInSub6GhzMax() const override
Returns the upper bound of the uniform variable of the O2I 2D-in distance of GetO2iDistance2dInSub6Gh...
Ptr< UniformRandomVariable > m_uniformVar
a uniform random variable used for the computation of the breakpoint distance
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetO2iDistance2dInSub6Ghz() const override
Returns a a single, link-specific, uniformly distributed variable value depending on the specific 3GP...
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
ThreeGppUmiStreetCanyonPropagationLossModel & operator=(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
double GetO2iShadowingCorrelationDistance() const override
Returns the shadow fading correlation distance of O2I links (3GPP TR 38.901 Table 7....
double GetO2iDistance2dInSub6Ghz() const override
Returns a a single, link-specific, uniformly distributed variable value depending on the specific 3GP...
double GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is obstructed.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed.
ThreeGppUmiStreetCanyonPropagationLossModel(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double GetO2iDistance2dInMax() const override
Returns the upper bound of the uniform variables of the O2I 2D-in distance of GetO2iDistance2dIn(),...
double GetO2iDistance2dInSub6GhzMax() const override
Returns the upper bound of the uniform variable of the O2I 2D-in distance of GetO2iDistance2dInSub6Gh...
a unique identifier for an interface.
Definition type-id.h:50
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ChannelCondition::LosConditionValue m_condition
the LOS/NLOS condition
ChannelCondition::LosConditionValue m_condition
the LOS/NLOS condition