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 Returns the shadow fading standard deviation
247 * @param a tx mobility model
248 * @param b rx mobility model
249 * @param cond the LOS/NLOS channel condition
250 * @return shadowing std in dB
251 */
255
256 /**
257 * @brief Returns the shadow fading correlation distance
258 * @param cond the LOS/NLOS channel condition
259 * @return shadowing correlation distance in meters
260 */
263
264 /**
265 * @brief Returns an unique key for the channel between a and b.
266 *
267 * The key is the value of the Cantor function calculated by using as
268 * first parameter the lowest node ID, and as a second parameter the highest
269 * node ID.
270 *
271 * @param a tx mobility model
272 * @param b rx mobility model
273 * @return channel key
274 */
276
277 /**
278 * @brief Get the difference between the node position
279 *
280 * The difference is calculated as (b-a) if Id(a) < Id (b), or
281 * (a-b) if Id(b) <= Id(a).
282 *
283 * @param a First node
284 * @param b Second node
285 * @return the difference between the node vector position
286 */
288
289 protected:
290 void DoDispose() override;
291 void NotifyConstructionCompleted() override;
292 /**
293 * @brief Returns a a single, link-specific, uniformly distributed variable
294 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
295 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
296 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
297 * generated. 2D−in distance is used for the O2I penetration losses
298 * calculation according to 3GPP TR 38.901 7.4.3.
299 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
300 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
301 */
302 virtual double GetO2iDistance2dInSub6Ghz() const;
303
304 /**
305 * @brief Computes the 2D distance between two 3D vectors
306 * @param a the first 3D vector
307 * @param b the second 3D vector
308 * @return the 2D distance between a and b
309 */
310 static double Calculate2dDistance(Vector a, Vector b);
311
312 Ptr<ChannelConditionModel> m_channelConditionModel; //!< pointer to the channel condition model
313 double m_frequency; //!< operating frequency in Hz
314 bool m_shadowingEnabled; //!< enable/disable shadowing
315 bool m_enforceRanges; //!< strictly enforce TR 38.901 parameter ranges
316 bool m_buildingPenLossesEnabled; //!< enable/disable building penetration losses
317 double m_meanVehicleO2iLoss; //!< normal cars (9dB), cars with metal coated glass panels (20dB)
319
320 /** Define a struct for the m_shadowingMap entries */
322 {
323 double m_shadowing; //!< the shadowing loss in dB
325 Vector m_distance; //!< the vector AB
326 };
327
328 mutable std::unordered_map<uint32_t, ShadowingMapItem>
329 m_shadowingMap; //!< map to store the shadowing values
330
331 /** Define a struct for the m_o2iLossMap entries */
333 {
334 double m_o2iLoss; //!< the o2i loss in dB
336 };
337
338 mutable std::unordered_map<uint32_t, O2iLossMapItem>
339 m_o2iLossMap; //!< map to store the o2i Loss values
340
341 mutable std::unordered_map<uint32_t, double>
342 m_o2iVehicularUtLossMap; //!< vehicular O2I loss for each individual UT with speed x, such
343 //!< that 30 < x <= 120 km/h.
344 //!< UT is addressed by NodeId
345
346 Ptr<UniformRandomVariable> m_randomO2iVar1; //!< a uniform random variable for the calculation
347 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
348 Ptr<UniformRandomVariable> m_randomO2iVar2; //!< a uniform random variable for the calculation
349 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
351 m_normalO2iLowLossVar; //!< a normal random variable for the calculation of 02i low loss,
352 //!< see TR38.901 Table 7.4.3-2
354 m_normalO2iHighLossVar; //!< a normal random variable for the calculation of 02i high loss,
355 //!< see TR38.901 Table 7.4.3-2
356
358 m_normalO2iVehicularLossVar; //!< a normal random variable for the calculation of
359 //!< penetration loss for vehicles see TR38.901 section 7.4.3.2
360 int64_t DoAssignStreams(int64_t stream) override;
361};
362
363/**
364 * @ingroup propagation
365 *
366 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
367 * for the RMa scenario.
368 */
370{
371 public:
372 /**
373 * @brief Get the type ID.
374 * @return the object TypeId
375 */
376 static TypeId GetTypeId();
377
378 /**
379 * Constructor
380 */
382
383 /**
384 * Destructor
385 */
387
388 // Delete copy constructor and assignment operator to avoid misuse
391
392 private:
393 /**
394 * @brief Computes the pathloss between a and b considering that the line of
395 * sight is not obstructed
396 * @param a tx mobility model
397 * @param b rx mobility model
398 * @return pathloss value in dB
399 */
400 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
401
402 /**
403 * @brief Returns the minimum of the two independently generated distances
404 * according to the uniform distribution between the minimum and the maximum
405 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
406 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
407 * for RMa.
408 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
409 * generated. 2D−in distance is used for the O2I penetration losses
410 * calculation according to 3GPP TR 38.901 7.4.3.
411 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
412 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
413 */
414 double GetO2iDistance2dIn() const override;
415
416 /**
417 * @brief Indicates the condition of the o2i building penetration loss
418 * (defined in 3GPP TR 38.901 7.4.3.1).
419 * @param cond the ptr to the channel condition model
420 * @return True for low losses, false for high losses
421 */
423
424 /**
425 * @brief Computes the pathloss between a and b considering that the line of
426 * sight is obstructed
427 * @param a tx mobility model
428 * @param b rx mobility model
429 * @return pathloss value in dB
430 */
431 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
432
433 /**
434 * @brief Returns the shadow fading standard deviation
435 * @param a tx mobility model
436 * @param b rx mobility model
437 * @param cond the LOS/NLOS channel condition
438 * @return shadowing std in dB
439 */
442 ChannelCondition::LosConditionValue cond) const override;
443
444 /**
445 * @brief Returns the shadow fading correlation distance
446 * @param cond the LOS/NLOS channel condition
447 * @return shadowing correlation distance in meters
448 */
450
451 /**
452 * @brief Computes the PL1 formula for the RMa scenario
453 * @param frequency the operating frequency in Hz
454 * @param distance3D the 3D distance between the tx and the rx nodes in meters
455 * @param h the average building height in meters
456 * @param w the average street width in meters
457 * @return result of the PL1 formula
458 */
459 static double Pl1(double frequency, double distance3D, double h, double w);
460
461 /**
462 * @brief Computes the breakpoint distance for the RMa scenario
463 * @param frequency the operating frequency in Hz
464 * @param hA height of the tx node in meters
465 * @param hB height of the rx node in meters
466 * @return the breakpoint distance in meters
467 */
468 static double GetBpDistance(double frequency, double hA, double hB);
469
470 double m_h; //!< average building height in meters
471 double m_w; //!< average street width in meters
472};
473
474/**
475 * @ingroup propagation
476 *
477 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
478 * for the UMa scenario.
479 */
481{
482 public:
483 /**
484 * @brief Get the type ID.
485 * @return the object TypeId
486 */
487 static TypeId GetTypeId();
488
489 /**
490 * Constructor
491 */
493
494 /**
495 * Destructor
496 */
498
499 // Delete copy constructor and assignment operator to avoid misuse
502
503 private:
504 int64_t DoAssignStreams(int64_t stream) override;
505
506 /**
507 * @brief Computes the pathloss between a and b considering that the line of
508 * sight is not obstructed
509 * @param a tx mobility model
510 * @param b rx mobility model
511 * @return pathloss value in dB
512 */
513 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
514
515 /**
516 * @brief Returns the minimum of the two independently generated distances
517 * according to the uniform distribution between the minimum and the maximum
518 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
519 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
520 * for RMa.
521 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
522 * generated. 2D−in distance is used for the O2I penetration losses
523 * calculation according to 3GPP TR 38.901 7.4.3.
524 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
525 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
526 */
527 double GetO2iDistance2dIn() const override;
528
529 /**
530 * @brief Returns a a single, link-specific, uniformly distributed variable
531 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
532 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
533 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
534 * generated. 2D−in distance is used for the O2I penetration losses
535 * calculation according to 3GPP TR 38.901 7.4.3.
536 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
537 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
538 */
539 double GetO2iDistance2dInSub6Ghz() const override;
540
541 /**
542 * @brief Computes the pathloss between a and b considering that the line of
543 * sight is obstructed.
544 * @param a tx mobility model
545 * @param b rx mobility model
546 * @return pathloss value in dB
547 */
548 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
549
550 /**
551 * @brief Returns the shadow fading standard deviation
552 * @param a tx mobility model
553 * @param b rx mobility model
554 * @param cond the LOS/NLOS channel condition
555 * @return shadowing std in dB
556 */
559 ChannelCondition::LosConditionValue cond) const override;
560
561 /**
562 * @brief Returns the shadow fading correlation distance
563 * @param cond the LOS/NLOS channel condition
564 * @return shadowing correlation distance in meters
565 */
567
568 /**
569 * @brief Computes the breakpoint distance
570 * @param hUt height of the UT in meters
571 * @param hBs height of the BS in meters
572 * @param distance2D distance between the two nodes in meters
573 * @return the breakpoint distance in meters
574 */
575 double GetBpDistance(double hUt, double hBs, double distance2D) const;
576
577 Ptr<UniformRandomVariable> m_uniformVar; //!< a uniform random variable used for the computation
578 //!< of the breakpoint distance
579};
580
581/**
582 * @ingroup propagation
583 *
584 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
585 * for the UMi-Street Canyon scenario.
586 */
588{
589 public:
590 /**
591 * @brief Get the type ID.
592 * @return the object TypeId
593 */
594 static TypeId GetTypeId();
595
596 /**
597 * Constructor
598 */
600
601 /**
602 * Destructor
603 */
605
606 // Delete copy constructor and assignment operator to avoid misuse
611
612 private:
613 /**
614 * @brief Computes the pathloss between a and b considering that the line of
615 * sight is not obstructed
616 * @param a tx mobility model
617 * @param b rx mobility model
618 * @return pathloss value in dB
619 */
620 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
621
622 /**
623 * @brief Returns the minimum of the two independently generated distances
624 * according to the uniform distribution between the minimum and the maximum
625 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
626 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
627 * for RMa.
628 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
629 * generated. 2D−in distance is used for the O2I penetration losses
630 * calculation according to 3GPP TR 38.901 7.4.3.
631 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
632 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
633 */
634 double GetO2iDistance2dIn() const override;
635
636 /**
637 * @brief Returns a a single, link-specific, uniformly distributed variable
638 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
639 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon.
640 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
641 * generated. 2D−in distance is used for the O2I penetration losses
642 * calculation according to 3GPP TR 38.901 7.4.3.
643 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
644 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
645 */
646 double GetO2iDistance2dInSub6Ghz() const override;
647
648 /**
649 * @brief Computes the pathloss between a and b considering that the line of
650 * sight is obstructed.
651 * @param a tx mobility model
652 * @param b rx mobility model
653 * @return pathloss value in dB
654 */
655 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
656
657 /**
658 * @brief Returns the shadow fading standard deviation
659 * @param a tx mobility model
660 * @param b rx mobility model
661 * @param cond the LOS/NLOS channel condition
662 * @return shadowing std in dB
663 */
666 ChannelCondition::LosConditionValue cond) const override;
667
668 /**
669 * @brief Returns the shadow fading correlation distance
670 * @param cond the LOS/NLOS channel condition
671 * @return shadowing correlation distance in meters
672 */
674
675 /**
676 * @brief Computes the breakpoint distance
677 * @param hUt height of the UT node in meters
678 * @param hBs height of the BS node in meters
679 * @param distance2D distance between the two nodes in meters
680 * @return the breakpoint distance in meters
681 */
682 double GetBpDistance(double hUt, double hBs, double distance2D) const;
683};
684
685/**
686 * @ingroup propagation
687 *
688 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
689 * for the Indoor Office scenario.
690 */
692{
693 public:
694 /**
695 * @brief Get the type ID.
696 * @return the object TypeId
697 */
698 static TypeId GetTypeId();
699
700 /**
701 * Constructor
702 */
704
705 /**
706 * Destructor
707 */
709
710 // Delete copy constructor and assignment operator to avoid misuse
712 delete;
715
716 private:
717 /**
718 * @brief Computes the pathloss between a and b considering that the line of
719 * sight is not obstructed
720 * @param a tx mobility model
721 * @param b rx mobility model
722 * @return pathloss value in dB
723 */
724 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
725
726 /**
727 * @brief Returns the minimum of the two independently generated distances
728 * according to the uniform distribution between the minimum and the maximum
729 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
730 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
731 * for RMa.
732 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
733 * generated. 2D−in distance is used for the O2I penetration losses
734 * calculation according to 3GPP TR 38.901 7.4.3.
735 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
736 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
737 */
738 double GetO2iDistance2dIn() const override;
739
740 /**
741 * @brief Computes the pathloss between a and b considering that the line of
742 * sight is obstructed
743 * @param a tx mobility model
744 * @param b rx mobility model
745 * @return pathloss value in dB
746 */
747 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
748
749 /**
750 * @brief Returns the shadow fading standard deviation
751 * @param a tx mobility model
752 * @param b rx mobility model
753 * @param cond the LOS/NLOS channel condition
754 * @return shadowing std in dB
755 */
758 ChannelCondition::LosConditionValue cond) const override;
759
760 /**
761 * @brief Returns the shadow fading correlation distance
762 * @param cond the LOS/NLOS channel condition
763 * @return shadowing correlation distance in meters
764 */
766};
767
768/**
769 * @ingroup propagation
770 *
771 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
772 * for the NTN Dense Urban scenario.
773 */
775{
776 public:
777 /**
778 * @brief Get the type ID.
779 * @return the object TypeId
780 */
781 static TypeId GetTypeId();
782
783 /**
784 * Constructor
785 */
787
788 /**
789 * Destructor
790 */
792
793 /**
794 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
795 * Does nothing in NTN scenarios.
796 */
797 double GetO2iDistance2dIn() const override;
798
799 /**
800 * @brief Copy constructor
801 *
802 * Deleted in base class
803 */
805 delete;
806
807 /**
808 * @brief Copy constructor
809 *
810 * Deleted in base class
811 * @returns the ThreeGppNTNDenseUrbanPropagationLossModel instance
812 */
815
816 private:
817 // Inherited
818 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
819 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
822 ChannelCondition::LosConditionValue cond) const override;
824
825 /**
826 * @brief The nested map containing the Shadow Fading and
827 * Clutter Loss values for the NTN Dense Urban scenario
828 */
829 const std::map<int, std::vector<float>>* m_SFCL_DenseUrban;
830};
831
832/**
833 * @ingroup propagation
834 *
835 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
836 * for the NTN Urban scenario.
837 */
839{
840 public:
841 /**
842 * @brief Get the type ID.
843 * @return the object TypeId
844 */
845 static TypeId GetTypeId();
846
847 /**
848 * Constructor
849 */
851
852 /**
853 * Destructor
854 */
856
857 /**
858 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
859 * Does nothing in NTN scenarios.
860 */
861 double GetO2iDistance2dIn() const override;
862
863 /**
864 * @brief Copy constructor
865 *
866 * Deleted in base class
867 */
869
870 /**
871 * @brief Copy constructor
872 *
873 * Deleted in base class
874 * @returns the ThreeGppNTNUrbanPropagationLossModel instance
875 */
877 delete;
878
879 private:
880 // Inherited
881 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
882 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
885 ChannelCondition::LosConditionValue cond) const override;
887
888 /**
889 * @brief The nested map containing the Shadow Fading and
890 * Clutter Loss values for the NTN Urban scenario
891 */
892 const std::map<int, std::vector<float>>* m_SFCL_Urban;
893};
894
895/**
896 * @ingroup propagation
897 *
898 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
899 * for the NTN Suburban scenario.
900 */
902{
903 public:
904 /**
905 * @brief Get the type ID.
906 * @return the object TypeId
907 */
908 static TypeId GetTypeId();
909
910 /**
911 * Constructor
912 */
914
915 /**
916 * Destructor
917 */
919
920 /**
921 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
922 * Does nothing in NTN scenarios.
923 */
924 double GetO2iDistance2dIn() const override;
925
926 /**
927 * @brief Copy constructor
928 *
929 * Deleted in base class
930 */
932 delete;
933
934 /**
935 * @brief Copy constructor
936 *
937 * Deleted in base class
938 * @returns the ThreeGppNTNSuburbanPropagationLossModel instance
939 */
942
943 private:
944 // Inherited
945 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
946 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
949 ChannelCondition::LosConditionValue cond) const override;
951
952 /**
953 * @brief The nested map containing the Shadow Fading and
954 * Clutter Loss values for the NTN Suburban and Rural scenario
955 */
956 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
957};
958
959/**
960 * @ingroup propagation
961 *
962 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
963 * for the NTN Rural scenario.
964 */
966{
967 public:
968 /**
969 * @brief Get the type ID.
970 * @return the object TypeId
971 */
972 static TypeId GetTypeId();
973
974 /**
975 * Constructor
976 */
978
979 /**
980 * Destructor
981 */
983
984 /**
985 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
986 * Does nothing in NTN scenarios.
987 */
988 double GetO2iDistance2dIn() const override;
989
990 /**
991 * @brief Copy constructor
992 *
993 * Deleted in base class
994 */
996
997 /**
998 * @brief Copy constructor
999 *
1000 * Deleted in base class
1001 * @returns the ThreeGppNTNRuralPropagationLossModel instance
1002 */
1004 delete;
1005
1006 private:
1007 // Inherited
1008 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
1009 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
1012 ChannelCondition::LosConditionValue cond) const override;
1014
1015 /**
1016 * @brief The nested map containing the Shadow Fading and
1017 * Clutter Loss values for the NTN Suburban and Rural scenario
1018 */
1019 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
1020};
1021
1022} // namespace ns3
1023
1024#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
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.
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