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 int64_t DoAssignStreams(int64_t stream) override;
100
101 /**
102 * @brief Computes the pathloss between a and b
103 * @param cond the channel condition
104 * @param a tx mobility model
105 * @param b rx mobility model
106 * @return pathloss value in dB
107 */
109
110 /**
111 * @brief Computes the pathloss between a and b considering that the line of
112 * sight is not obstructed
113 * @param a tx mobility model
114 * @param b rx mobility model
115 * @return pathloss value in dB
116 */
117 virtual double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
118
119 /**
120 * @brief Computes the pathloss between a and b considering that the line of
121 * sight is obstructed
122 * @param a tx mobility model
123 * @param b rx mobility model
124 * @return pathloss value in dB
125 */
126 virtual double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
127
128 /**
129 * @brief Returns the minimum of the two independently generated distances
130 * according to the uniform distribution between the minimum and the maximum
131 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
132 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
133 * for RMa.
134 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
135 * generated. 2D−in distance is used for the O2I penetration losses
136 * calculation according to 3GPP TR 38.901 7.4.3.
137 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
138 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
139 */
140 virtual double GetO2iDistance2dIn() const = 0;
141
142 /**
143 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
144 * If not found or if the channel condition changed it generates a new
145 * independent realization and stores it in the map, otherwise it calculates
146 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
147 *
148 *
149 * @param a tx mobility model (used for the key calculation)
150 * @param b rx mobility model (used for the key calculation)
151 * @param cond the LOS/NLOS channel condition
152 * @return o2iLoss
153 */
157
158 /**
159 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
160 * If not found or if the channel condition changed it generates a new
161 * independent realization and stores it in the map, otherwise it calculates
162 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
163 *
164 * Note that all child classes should implement this function to support
165 * low losses calculation. As such, this function should be purely virtual.
166 *
167 * @param a tx mobility model (used for the key calculation)
168 * @param b rx mobility model (used for the key calculation)
169 * @param cond the LOS/NLOS channel condition
170 * @return o2iLoss
171 */
175
176 /**
177 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
178 * If not found or if the channel condition changed it generates a new
179 * independent realization and stores it in the map, otherwise it calculates
180 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
181 *
182 * Note that all child classes should implement this function to support
183 * high losses calculation. As such, this function should be purely virtual.
184 *
185 * @param a tx mobility model (used for the key calculation)
186 * @param b rx mobility model (used for the key calculation)
187 * @param cond the LOS/NLOS channel condition
188 * @return o2iLoss
189 */
193
194 /**
195 * @brief Computes the o2i vehicular penetration loss by looking at m_o2iVehicularUtLossMap.
196 * The loss is composed by the sum of losses for each UT, if vehicles,
197 * as implied by their speed (30-120 km/h).
198 * The loss for each UT is defined in 3GPP TR 38.901 7.4.3.2.
199 *
200 * @param a tx mobility model (used for the key calculation)
201 * @param b rx mobility model (used for the key calculation)
202 * @param cond the O2I channel condition (O2I, O2O)
203 * @return vehicular o2iLoss
204 */
208 /**
209 * @brief Indicates the condition of the o2i building penetration loss
210 * (defined in 3GPP TR 38.901 7.4.3.1).
211 * The default implementation returns the condition as set
212 * (either based on the buildings materials, or if the probabilistic
213 * model is used in the ThreeGppChannelConditionModel, then
214 * based on the result of a random variable).
215 * The derived classes can change the default behavior by overriding
216 * this method.
217 * @param cond the ptr to the channel condition model
218 * @return True for low losses, false for high losses
219 */
221
222 /**
223 * @brief Computes the pathloss between a and b considering that the line of
224 * sight is obstructed by a vehicle. By default it raises an error to
225 * avoid misuse.
226 * @param a tx mobility model
227 * @param b rx mobility model
228 * @return pathloss value in dB
229 */
230 virtual double GetLossNlosv(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
231
232 /**
233 * @brief Retrieves the shadowing value by looking at m_shadowingMap.
234 * If not found or if the channel condition changed it generates a new
235 * independent realization and stores it in the map, otherwise it correlates
236 * the new value with the previous one using the autocorrelation function
237 * defined in 3GPP TR 38.901, Sec. 7.4.4.
238 * @param a tx mobility model
239 * @param b rx mobility model
240 * @param cond the LOS/NLOS channel condition
241 * @return shadowing loss in dB
242 */
246
247 /**
248 * @brief Returns the shadow fading standard deviation
249 * @param a tx mobility model
250 * @param b rx mobility model
251 * @param cond the LOS/NLOS channel condition
252 * @return shadowing std in dB
253 */
257
258 /**
259 * @brief Returns the shadow fading correlation distance
260 * @param cond the LOS/NLOS channel condition
261 * @return shadowing correlation distance in meters
262 */
265
266 /**
267 * @brief Returns an unique key for the channel between a and b.
268 *
269 * The key is the value of the Cantor function calculated by using as
270 * first parameter the lowest node ID, and as a second parameter the highest
271 * node ID.
272 *
273 * @param a tx mobility model
274 * @param b rx mobility model
275 * @return channel key
276 */
278
279 /**
280 * @brief Get the difference between the node position
281 *
282 * The difference is calculated as (b-a) if Id(a) < Id (b), or
283 * (a-b) if Id(b) <= Id(a).
284 *
285 * @param a First node
286 * @param b Second node
287 * @return the difference between the node vector position
288 */
290
291 protected:
292 void DoDispose() override;
293
294 /**
295 * @brief Returns a a single, link-specific, uniformly distributed variable
296 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
297 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
298 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
299 * generated. 2D−in distance is used for the O2I penetration losses
300 * calculation according to 3GPP TR 38.901 7.4.3.
301 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
302 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
303 */
304 virtual double GetO2iDistance2dInSub6Ghz() const;
305
306 /**
307 * @brief Computes the 2D distance between two 3D vectors
308 * @param a the first 3D vector
309 * @param b the second 3D vector
310 * @return the 2D distance between a and b
311 */
312 static double Calculate2dDistance(Vector a, Vector b);
313
314 Ptr<ChannelConditionModel> m_channelConditionModel; //!< pointer to the channel condition model
315 double m_frequency; //!< operating frequency in Hz
316 bool m_shadowingEnabled; //!< enable/disable shadowing
317 bool m_enforceRanges; //!< strictly enforce TR 38.901 parameter ranges
318 bool m_buildingPenLossesEnabled; //!< enable/disable building penetration losses
319 double m_meanVehicleO2iLoss; //!< normal cars (9dB), cars with metal coated glass panels (20dB)
321
322 /** Define a struct for the m_shadowingMap entries */
324 {
325 double m_shadowing; //!< the shadowing loss in dB
327 Vector m_distance; //!< the vector AB
328 };
329
330 mutable std::unordered_map<uint32_t, ShadowingMapItem>
331 m_shadowingMap; //!< map to store the shadowing values
332
333 /** Define a struct for the m_o2iLossMap entries */
335 {
336 double m_o2iLoss; //!< the o2i loss in dB
338 };
339
340 mutable std::unordered_map<uint32_t, O2iLossMapItem>
341 m_o2iLossMap; //!< map to store the o2i Loss values
342
343 mutable std::unordered_map<uint32_t, double>
344 m_o2iVehicularUtLossMap; //!< vehicular O2I loss for each individual UT with speed x, such
345 //!< that 30 < x <= 120 km/h.
346 //!< UT is addressed by NodeId
347
348 Ptr<UniformRandomVariable> m_randomO2iVar1; //!< a uniform random variable for the calculation
349 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
350 Ptr<UniformRandomVariable> m_randomO2iVar2; //!< a uniform random variable for the calculation
351 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
353 m_normalO2iLowLossVar; //!< a normal random variable for the calculation of 02i low loss,
354 //!< see TR38.901 Table 7.4.3-2
356 m_normalO2iHighLossVar; //!< a normal random variable for the calculation of 02i high loss,
357 //!< see TR38.901 Table 7.4.3-2
358
360 m_normalO2iVehicularLossVar; //!< a normal random variable for the calculation of
361 //!< penetration loss for vehicles see TR38.901 section 7.4.3.2
362};
363
364/**
365 * @ingroup propagation
366 *
367 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
368 * for the RMa scenario.
369 */
371{
372 public:
373 /**
374 * @brief Get the type ID.
375 * @return the object TypeId
376 */
377 static TypeId GetTypeId();
378
379 /**
380 * Constructor
381 */
383
384 /**
385 * Destructor
386 */
388
389 // Delete copy constructor and assignment operator to avoid misuse
392
393 private:
394 /**
395 * @brief Computes the pathloss between a and b considering that the line of
396 * sight is not obstructed
397 * @param a tx mobility model
398 * @param b rx mobility model
399 * @return pathloss value in dB
400 */
401 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
402
403 /**
404 * @brief Returns the minimum of the two independently generated distances
405 * according to the uniform distribution between the minimum and the maximum
406 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
407 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
408 * for RMa.
409 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
410 * generated. 2D−in distance is used for the O2I penetration losses
411 * calculation according to 3GPP TR 38.901 7.4.3.
412 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
413 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
414 */
415 double GetO2iDistance2dIn() const override;
416
417 /**
418 * @brief Indicates the condition of the o2i building penetration loss
419 * (defined in 3GPP TR 38.901 7.4.3.1).
420 * @param cond the ptr to the channel condition model
421 * @return True for low losses, false for high losses
422 */
424
425 /**
426 * @brief Computes the pathloss between a and b considering that the line of
427 * sight is obstructed
428 * @param a tx mobility model
429 * @param b rx mobility model
430 * @return pathloss value in dB
431 */
432 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
433
434 /**
435 * @brief Returns the shadow fading standard deviation
436 * @param a tx mobility model
437 * @param b rx mobility model
438 * @param cond the LOS/NLOS channel condition
439 * @return shadowing std in dB
440 */
443 ChannelCondition::LosConditionValue cond) const override;
444
445 /**
446 * @brief Returns the shadow fading correlation distance
447 * @param cond the LOS/NLOS channel condition
448 * @return shadowing correlation distance in meters
449 */
451
452 /**
453 * @brief Computes the PL1 formula for the RMa scenario
454 * @param frequency the operating frequency in Hz
455 * @param distance3D the 3D distance between the tx and the rx nodes in meters
456 * @param h the average building height in meters
457 * @param w the average street width in meters
458 * @return result of the PL1 formula
459 */
460 static double Pl1(double frequency, double distance3D, double h, double w);
461
462 /**
463 * @brief Computes the breakpoint distance for the RMa scenario
464 * @param frequency the operating frequency in Hz
465 * @param hA height of the tx node in meters
466 * @param hB height of the rx node in meters
467 * @return the breakpoint distance in meters
468 */
469 static double GetBpDistance(double frequency, double hA, double hB);
470
471 double m_h; //!< average building height in meters
472 double m_w; //!< average street width in meters
473};
474
475/**
476 * @ingroup propagation
477 *
478 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
479 * for the UMa scenario.
480 */
482{
483 public:
484 /**
485 * @brief Get the type ID.
486 * @return the object TypeId
487 */
488 static TypeId GetTypeId();
489
490 /**
491 * Constructor
492 */
494
495 /**
496 * Destructor
497 */
499
500 // Delete copy constructor and assignment operator to avoid misuse
503
504 private:
505 int64_t DoAssignStreams(int64_t stream) override;
506
507 /**
508 * @brief Computes the pathloss between a and b considering that the line of
509 * sight is not obstructed
510 * @param a tx mobility model
511 * @param b rx mobility model
512 * @return pathloss value in dB
513 */
514 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
515
516 /**
517 * @brief Returns the minimum of the two independently generated distances
518 * according to the uniform distribution between the minimum and the maximum
519 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
520 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
521 * for RMa.
522 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
523 * generated. 2D−in distance is used for the O2I penetration losses
524 * calculation according to 3GPP TR 38.901 7.4.3.
525 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
526 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
527 */
528 double GetO2iDistance2dIn() const override;
529
530 /**
531 * @brief Returns a a single, link-specific, uniformly distributed variable
532 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
533 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
534 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
535 * generated. 2D−in distance is used for the O2I penetration losses
536 * calculation according to 3GPP TR 38.901 7.4.3.
537 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
538 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
539 */
540 double GetO2iDistance2dInSub6Ghz() const override;
541
542 /**
543 * @brief Computes the pathloss between a and b considering that the line of
544 * sight is obstructed.
545 * @param a tx mobility model
546 * @param b rx mobility model
547 * @return pathloss value in dB
548 */
549 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
550
551 /**
552 * @brief Returns the shadow fading standard deviation
553 * @param a tx mobility model
554 * @param b rx mobility model
555 * @param cond the LOS/NLOS channel condition
556 * @return shadowing std in dB
557 */
560 ChannelCondition::LosConditionValue cond) const override;
561
562 /**
563 * @brief Returns the shadow fading correlation distance
564 * @param cond the LOS/NLOS channel condition
565 * @return shadowing correlation distance in meters
566 */
568
569 /**
570 * @brief Computes the breakpoint distance
571 * @param hUt height of the UT in meters
572 * @param hBs height of the BS in meters
573 * @param distance2D distance between the two nodes in meters
574 * @return the breakpoint distance in meters
575 */
576 double GetBpDistance(double hUt, double hBs, double distance2D) const;
577
578 Ptr<UniformRandomVariable> m_uniformVar; //!< a uniform random variable used for the computation
579 //!< of the breakpoint distance
580};
581
582/**
583 * @ingroup propagation
584 *
585 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
586 * for the UMi-Street Canyon scenario.
587 */
589{
590 public:
591 /**
592 * @brief Get the type ID.
593 * @return the object TypeId
594 */
595 static TypeId GetTypeId();
596
597 /**
598 * Constructor
599 */
601
602 /**
603 * Destructor
604 */
606
607 // Delete copy constructor and assignment operator to avoid misuse
612
613 private:
614 /**
615 * @brief Computes the pathloss between a and b considering that the line of
616 * sight is not obstructed
617 * @param a tx mobility model
618 * @param b rx mobility model
619 * @return pathloss value in dB
620 */
621 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
622
623 /**
624 * @brief Returns the minimum of the two independently generated distances
625 * according to the uniform distribution between the minimum and the maximum
626 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
627 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
628 * for RMa.
629 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
630 * generated. 2D−in distance is used for the O2I penetration losses
631 * calculation according to 3GPP TR 38.901 7.4.3.
632 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
633 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
634 */
635 double GetO2iDistance2dIn() const override;
636
637 /**
638 * @brief Returns a a single, link-specific, uniformly distributed variable
639 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
640 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
641 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
642 * generated. 2D−in distance is used for the O2I penetration losses
643 * calculation according to 3GPP TR 38.901 7.4.3.
644 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
645 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
646 */
647 double GetO2iDistance2dInSub6Ghz() const override;
648
649 /**
650 * @brief Computes the pathloss between a and b considering that the line of
651 * sight is obstructed.
652 * @param a tx mobility model
653 * @param b rx mobility model
654 * @return pathloss value in dB
655 */
656 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
657
658 /**
659 * @brief Returns the shadow fading standard deviation
660 * @param a tx mobility model
661 * @param b rx mobility model
662 * @param cond the LOS/NLOS channel condition
663 * @return shadowing std in dB
664 */
667 ChannelCondition::LosConditionValue cond) const override;
668
669 /**
670 * @brief Returns the shadow fading correlation distance
671 * @param cond the LOS/NLOS channel condition
672 * @return shadowing correlation distance in meters
673 */
675
676 /**
677 * @brief Computes the breakpoint distance
678 * @param hUt height of the UT node in meters
679 * @param hBs height of the BS node in meters
680 * @param distance2D distance between the two nodes in meters
681 * @return the breakpoint distance in meters
682 */
683 double GetBpDistance(double hUt, double hBs, double distance2D) const;
684};
685
686/**
687 * @ingroup propagation
688 *
689 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
690 * for the Indoor Office scenario.
691 */
693{
694 public:
695 /**
696 * @brief Get the type ID.
697 * @return the object TypeId
698 */
699 static TypeId GetTypeId();
700
701 /**
702 * Constructor
703 */
705
706 /**
707 * Destructor
708 */
710
711 // Delete copy constructor and assignment operator to avoid misuse
713 delete;
716
717 private:
718 /**
719 * @brief Computes the pathloss between a and b considering that the line of
720 * sight is not obstructed
721 * @param a tx mobility model
722 * @param b rx mobility model
723 * @return pathloss value in dB
724 */
725 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
726
727 /**
728 * @brief Returns the minimum of the two independently generated distances
729 * according to the uniform distribution between the minimum and the maximum
730 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
731 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
732 * for RMa.
733 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
734 * generated. 2D−in distance is used for the O2I penetration losses
735 * calculation according to 3GPP TR 38.901 7.4.3.
736 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
737 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
738 */
739 double GetO2iDistance2dIn() const override;
740
741 /**
742 * @brief Computes the pathloss between a and b considering that the line of
743 * sight is obstructed
744 * @param a tx mobility model
745 * @param b rx mobility model
746 * @return pathloss value in dB
747 */
748 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
749
750 /**
751 * @brief Returns the shadow fading standard deviation
752 * @param a tx mobility model
753 * @param b rx mobility model
754 * @param cond the LOS/NLOS channel condition
755 * @return shadowing std in dB
756 */
759 ChannelCondition::LosConditionValue cond) const override;
760
761 /**
762 * @brief Returns the shadow fading correlation distance
763 * @param cond the LOS/NLOS channel condition
764 * @return shadowing correlation distance in meters
765 */
767};
768
769/**
770 * @ingroup propagation
771 *
772 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
773 * for the NTN Dense Urban scenario.
774 */
776{
777 public:
778 /**
779 * @brief Get the type ID.
780 * @return the object TypeId
781 */
782 static TypeId GetTypeId();
783
784 /**
785 * Constructor
786 */
788
789 /**
790 * Destructor
791 */
793
794 /**
795 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
796 * Does nothing in NTN scenarios.
797 */
798 double GetO2iDistance2dIn() const override;
799
800 /**
801 * @brief Copy constructor
802 *
803 * Deleted in base class
804 */
806 delete;
807
808 /**
809 * @brief Copy constructor
810 *
811 * Deleted in base class
812 * @returns the ThreeGppNTNDenseUrbanPropagationLossModel instance
813 */
816
817 private:
818 // Inherited
819 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
820 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
823 ChannelCondition::LosConditionValue cond) const override;
825
826 /**
827 * @brief The nested map containing the Shadow Fading and
828 * Clutter Loss values for the NTN Dense Urban scenario
829 */
830 const std::map<int, std::vector<float>>* m_SFCL_DenseUrban;
831};
832
833/**
834 * @ingroup propagation
835 *
836 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
837 * for the NTN Urban scenario.
838 */
840{
841 public:
842 /**
843 * @brief Get the type ID.
844 * @return the object TypeId
845 */
846 static TypeId GetTypeId();
847
848 /**
849 * Constructor
850 */
852
853 /**
854 * Destructor
855 */
857
858 /**
859 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
860 * Does nothing in NTN scenarios.
861 */
862 double GetO2iDistance2dIn() const override;
863
864 /**
865 * @brief Copy constructor
866 *
867 * Deleted in base class
868 */
870
871 /**
872 * @brief Copy constructor
873 *
874 * Deleted in base class
875 * @returns the ThreeGppNTNUrbanPropagationLossModel instance
876 */
878 delete;
879
880 private:
881 // Inherited
882 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
883 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
886 ChannelCondition::LosConditionValue cond) const override;
888
889 /**
890 * @brief The nested map containing the Shadow Fading and
891 * Clutter Loss values for the NTN Urban scenario
892 */
893 const std::map<int, std::vector<float>>* m_SFCL_Urban;
894};
895
896/**
897 * @ingroup propagation
898 *
899 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
900 * for the NTN Suburban scenario.
901 */
903{
904 public:
905 /**
906 * @brief Get the type ID.
907 * @return the object TypeId
908 */
909 static TypeId GetTypeId();
910
911 /**
912 * Constructor
913 */
915
916 /**
917 * Destructor
918 */
920
921 /**
922 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
923 * Does nothing in NTN scenarios.
924 */
925 double GetO2iDistance2dIn() const override;
926
927 /**
928 * @brief Copy constructor
929 *
930 * Deleted in base class
931 */
933 delete;
934
935 /**
936 * @brief Copy constructor
937 *
938 * Deleted in base class
939 * @returns the ThreeGppNTNSuburbanPropagationLossModel instance
940 */
943
944 private:
945 // Inherited
946 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
947 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
950 ChannelCondition::LosConditionValue cond) const override;
952
953 /**
954 * @brief The nested map containing the Shadow Fading and
955 * Clutter Loss values for the NTN Suburban and Rural scenario
956 */
957 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
958};
959
960/**
961 * @ingroup propagation
962 *
963 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
964 * for the NTN Rural scenario.
965 */
967{
968 public:
969 /**
970 * @brief Get the type ID.
971 * @return the object TypeId
972 */
973 static TypeId GetTypeId();
974
975 /**
976 * Constructor
977 */
979
980 /**
981 * Destructor
982 */
984
985 /**
986 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
987 * Does nothing in NTN scenarios.
988 */
989 double GetO2iDistance2dIn() const override;
990
991 /**
992 * @brief Copy constructor
993 *
994 * Deleted in base class
995 */
997
998 /**
999 * @brief Copy constructor
1000 *
1001 * Deleted in base class
1002 * @returns the ThreeGppNTNRuralPropagationLossModel instance
1003 */
1005 delete;
1006
1007 private:
1008 // Inherited
1009 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
1010 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
1013 ChannelCondition::LosConditionValue cond) const override;
1015
1016 /**
1017 * @brief The nested map containing the Shadow Fading and
1018 * Clutter Loss values for the NTN Suburban and Rural scenario
1019 */
1020 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
1021};
1022
1023} // namespace ns3
1024
1025#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:67
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.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
ThreeGppNTNDenseUrbanPropagationLossModel & operator=(const ThreeGppNTNDenseUrbanPropagationLossModel &)=delete
Copy constructor.
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.
const std::map< int, std::vector< float > > * m_SFCL_DenseUrban
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Dense Urban scenario.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
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.
const std::map< int, std::vector< float > > * m_SFCL_SuburbanRural
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Suburban and Rural sc...
ThreeGppNTNRuralPropagationLossModel(const ThreeGppNTNRuralPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNRuralPropagationLossModel & operator=(const ThreeGppNTNRuralPropagationLossModel &)=delete
Copy constructor.
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.
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 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 GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
const std::map< int, std::vector< float > > * m_SFCL_SuburbanRural
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Suburban and Rural sc...
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.
ThreeGppNTNSuburbanPropagationLossModel(const ThreeGppNTNSuburbanPropagationLossModel &)=delete
Copy constructor.
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.
ThreeGppNTNSuburbanPropagationLossModel & operator=(const ThreeGppNTNSuburbanPropagationLossModel &)=delete
Copy constructor.
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.
ThreeGppNTNUrbanPropagationLossModel & operator=(const ThreeGppNTNUrbanPropagationLossModel &)=delete
Copy constructor.
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.
const std::map< int, std::vector< float > > * m_SFCL_Urban
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Urban scenario.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
ThreeGppNTNUrbanPropagationLossModel(const ThreeGppNTNUrbanPropagationLossModel &)=delete
Copy constructor.
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 GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
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.
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
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.
bool IsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const
Return true if the O2I Building Penetration loss corresponds to a low loss condition.
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.
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...
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 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
ThreeGppUmaPropagationLossModel & operator=(const ThreeGppUmaPropagationLossModel &)=delete
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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 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.
a unique identifier for an interface.
Definition type-id.h:49
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