diff --git a/src/buildings/doc/source/buildings-design.rst b/src/buildings/doc/source/buildings-design.rst index 0ebdf4892..7212d04d3 100644 --- a/src/buildings/doc/source/buildings-design.rst +++ b/src/buildings/doc/source/buildings-design.rst @@ -151,7 +151,7 @@ HybridBuildingsPropagationLossModel The ``HybridBuildingsPropagationLossModel`` pathloss model included is obtained through a combination of several well known pathloss models in order to mimic different outdoor and indoor scenarios, as well as indoor-to-outdoor and outdoor-to-indoor scenarios. In detail, the class ``HybridBuildingsPropagationLossModel`` integrates the following pathloss models: - * OkumuraHataPropagationLossModel (OH) + * OkumuraHataPropagationLossModel (OH) (at frequencies > 2.3 GHz substituted by Kun2600MhzPropagationLossModel) * ItuR1411LosPropagationLossModel and ItuR1411NlosOverRooftopPropagationLossModel (I1411) * ItuR1238PropagationLossModel (I1238) * the pathloss elements of the BuildingsPropagationLossModel (EWL, HG, IWL) diff --git a/src/buildings/model/hybrid-buildings-propagation-loss-model.cc b/src/buildings/model/hybrid-buildings-propagation-loss-model.cc index fdbf9dd39..789925084 100644 --- a/src/buildings/model/hybrid-buildings-propagation-loss-model.cc +++ b/src/buildings/model/hybrid-buildings-propagation-loss-model.cc @@ -30,6 +30,7 @@ #include "ns3/itu-r-1411-los-propagation-loss-model.h" #include "ns3/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h" #include "ns3/itu-r-1238-propagation-loss-model.h" +#include "ns3/kun-2600-mhz-propagation-loss-model.h" #include "ns3/buildings-mobility-model.h" #include "ns3/enum.h" @@ -50,6 +51,7 @@ HybridBuildingsPropagationLossModel::HybridBuildingsPropagationLossModel () m_ituR1411Los = CreateObject (); m_ituR1411NlosOverRooftop = CreateObject (); m_ituR1238 = CreateObject (); + m_kun2600Mhz = CreateObject (); } HybridBuildingsPropagationLossModel::~HybridBuildingsPropagationLossModel () @@ -125,6 +127,7 @@ HybridBuildingsPropagationLossModel::SetFrequency (double freq) m_ituR1411Los->SetAttribute ("Frequency", DoubleValue (freq)); m_ituR1411NlosOverRooftop->SetAttribute ("Frequency", DoubleValue (freq)); m_ituR1238->SetAttribute ("Frequency", DoubleValue (freq)); + m_frequency = freq; } void @@ -255,7 +258,14 @@ HybridBuildingsPropagationLossModel::GetLoss (Ptr a, Ptr a, Ptr b) const { - return m_okumuraHata->GetLoss (a, b); + if (m_frequency <= 2.3e9) + { + return m_okumuraHata->GetLoss (a, b); + } + else + { + return m_kun2600Mhz->GetLoss (a, b); + } } double diff --git a/src/buildings/model/hybrid-buildings-propagation-loss-model.h b/src/buildings/model/hybrid-buildings-propagation-loss-model.h index 687483489..37b786da1 100644 --- a/src/buildings/model/hybrid-buildings-propagation-loss-model.h +++ b/src/buildings/model/hybrid-buildings-propagation-loss-model.h @@ -32,6 +32,7 @@ class OkumuraHataPropagationLossModel; class ItuR1411LosPropagationLossModel; class ItuR1411NlosOverRooftopPropagationLossModel; class ItuR1238PropagationLossModel; +class Kun2600MhzPropagationLossModel; /** * \ingroup propagation @@ -48,10 +49,6 @@ class ItuR1238PropagationLossModel; * - Building penetretation loss * - floors, etc... * - * Frequency: 200 MHz to 2000 MHz - * Link Distance:up to 20 km - * Short/long distance commutation: 1 Km - * * \warning This model works only with BuildingsMobilityModel * */ @@ -111,9 +108,11 @@ private: Ptr m_ituR1411Los; Ptr m_ituR1411NlosOverRooftop; Ptr m_ituR1238; + Ptr m_kun2600Mhz; double m_itu1411NlosThreshold; ///< in meters (switch Los -> NLoS) double m_rooftopHeight; + double m_frequency; }; diff --git a/src/propagation/doc/propagation.rst b/src/propagation/doc/propagation.rst index a7246f7a9..4855d27f2 100644 --- a/src/propagation/doc/propagation.rst +++ b/src/propagation/doc/propagation.rst @@ -133,15 +133,6 @@ The extension for the standard OH in open area is The literature lacks of extensions of the COST231 to open area (for suburban it seems that we can just impose C = 0); therefore we consider it a special case fo the suburban one. -Regarding the pathloss at 2600 MHz, in literature we found a paper presenting a model coming from an empirical evaluation for urban area [pl26ghz]_: - -.. math:: - - L = 36 + 26\log{d} - -Therefore, also in this case, the suburban and openareas environment scenarios are model as the urban one. - - ItuR1411LosPropagationLossModel @@ -288,6 +279,17 @@ where: +Kun2600MhzPropagationLossModel +++++++++++++++++++++++++++++++ + +This is the empirical model for the pathloss at 2600 MHz for urban areas which is described in [kun2600mhz]_. The model is as follows. Let :math:`d` be the distance between the transmitter and the receiver in meters; the pathloss :math:`L` in dB is calculated as: + +.. math:: + + L = 36 + 26\log{d} + + + +++++++++++++++++++++ PropagationDelayModel @@ -314,10 +316,10 @@ ConstantSpeedPropagationDelayModel .. [cost231] “Digital Mobile Radio: COST 231 View on the Evolution Towards 3rd Generation Systems”, Commission of the European Communities, L-2920, Luxembourg, 1989 -.. [pl26ghz] Sun Kun, Wang Ping, Li Yingze, "Path loss models for suburban scenario at 2.3GHz, 2.6GHz and 3.5GHz", - in Proc. of ISAPE 2008, Kunming, China, Nov 2008. - .. [walfisch] J.Walfisch and H.L. Bertoni, "A Theoretical model of UHF propagation in urban environments," in IEEE Trans. Antennas Propagat., vol.36, 1988, pp.1788- 1796 .. [ikegami] F.Ikegami, T.Takeuchi, and S.Yoshida, "Theoretical prediction of mean field strength for Urban Mobile Radio", in IEEE Trans. Antennas Propagat., Vol.39, No.3, 1991 +.. [kun2600mhz] Sun Kun, Wang Ping, Li Yingze, "Path loss models for suburban scenario at 2.3GHz, 2.6GHz and 3.5GHz", + in Proc. of the 8th International Symposium on Antennas, Propagation and EM Theory (ISAPE), Kunming, China, Nov 2008. + diff --git a/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc b/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc index 1d154f648..1da9afc98 100644 --- a/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc +++ b/src/propagation/model/itu-r-1411-los-propagation-loss-model.cc @@ -52,7 +52,7 @@ ItuR1411LosPropagationLossModel::GetTypeId (void) double ItuR1411LosPropagationLossModel::GetLoss (Ptr a, Ptr b) const { - NS_LOG_FUNCTION (this); + NS_LOG_FUNCTION (this); double dist = a->GetDistanceFrom (b); double lossLow = 0.0; double lossUp = 0.0; @@ -80,6 +80,7 @@ ItuR1411LosPropagationLossModel::GetLoss (Ptr a, Ptr 0.0); m_lambda = 300000000 / freq; } diff --git a/src/propagation/model/itu-r-1411-los-propagation-loss-model.h b/src/propagation/model/itu-r-1411-los-propagation-loss-model.h index f4aa66ba4..9615116a0 100644 --- a/src/propagation/model/itu-r-1411-los-propagation-loss-model.h +++ b/src/propagation/model/itu-r-1411-los-propagation-loss-model.h @@ -27,6 +27,18 @@ namespace ns3 { + +/** + * \ingroup propagation + * + * \brief the ITU-R 1411 LOS propagation model + * + * This class implements the ITU-R 1411 LOS propagation model for + * Line-of-Sight (LoS) short range outdoor communication in the + * frequency range 300 MHz to 100 GHz. + * For more information about the model, please see + * the propagation module documentation in .rst format. + */ class ItuR1411LosPropagationLossModel : public PropagationLossModel { diff --git a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc index 186350583..57f1d3338 100644 --- a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc +++ b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc @@ -104,7 +104,10 @@ ItuR1411NlosOverRooftopPropagationLossModel::GetLoss (Ptr a, Ptr< NS_LOG_FUNCTION (this << a << b); double Lori = 0.0; double fmhz = m_frequency / 1e6; - if ((m_streetsOrientation >= 0)&&(m_streetsOrientation < 35)) + + NS_ASSERT_MSG (((m_streetsOrientation >= 0) && (m_streetsOrientation <= 90)), + " Street Orientation must be in [0,90]"); + if (m_streetsOrientation < 35) { Lori = -10.0 + 0.354 * m_streetsOrientation; } @@ -112,14 +115,11 @@ ItuR1411NlosOverRooftopPropagationLossModel::GetLoss (Ptr a, Ptr< { Lori = 2.5 + 0.075 * (m_streetsOrientation - 35); } - else if ((m_streetsOrientation >= 55)&&(m_streetsOrientation < 90)) + else // m_streetsOrientation >= 55 { Lori = 2.5 + 0.075 * (m_streetsOrientation - 55); } - else - { - NS_FATAL_ERROR (this << " Street Orientation must be in [0,90]"); - } + double distance = a->GetDistanceFrom (b); double hb = (a->GetPosition ().z > b->GetPosition ().z ? a->GetPosition ().z : b->GetPosition ().z); double hm = (a->GetPosition ().z < b->GetPosition ().z ? a->GetPosition ().z : b->GetPosition ().z); @@ -127,7 +127,6 @@ ItuR1411NlosOverRooftopPropagationLossModel::GetLoss (Ptr a, Ptr< double Dhb = hb - m_rooftopHeight; double ds = (m_lambda * distance * distance) / (Dhb * Dhb); double Lmsd = 0.0; - double pi = 3.141592653589793; NS_LOG_LOGIC (this << " build " << m_buildingsExtend << " ds " << ds << " roof " << m_rooftopHeight << " hb " << hb << " lambda " << m_lambda); if (ds < m_buildingsExtend) { @@ -184,7 +183,7 @@ ItuR1411NlosOverRooftopPropagationLossModel::GetLoss (Ptr a, Ptr< } else { - Qm = m_buildingSeparation / (2 * pi * distance) * sqrt (m_lambda / rho) * (1 / theta - (1 / (2 * pi + theta))); + Qm = m_buildingSeparation / (2 * M_PI * distance) * sqrt (m_lambda / rho) * (1 / theta - (1 / (2 * M_PI + theta))); } Lmsd = -10 * log10 (Qm * Qm); } diff --git a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h index 314650220..89805c57d 100644 --- a/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h +++ b/src/propagation/model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h @@ -28,6 +28,17 @@ namespace ns3 { +/** + * \ingroup propagation + * + * \brief the ITU-R 1411 NLOS over rooftop propagation model + * + * This class implements the ITU-R 1411 LOS propagation model for + * Non-Line-of-Sight (NLoS) short range outdoor communication over + * rooftops in the frequency range 300 MHz to 100 GHz. + * For more information about the model, please see + * the propagation module documentation in .rst format. + */ class ItuR1411NlosOverRooftopPropagationLossModel : public PropagationLossModel { diff --git a/src/propagation/model/kun-2600-mhz-propagation-loss-model.cc b/src/propagation/model/kun-2600-mhz-propagation-loss-model.cc new file mode 100644 index 000000000..43a34e0eb --- /dev/null +++ b/src/propagation/model/kun-2600-mhz-propagation-loss-model.cc @@ -0,0 +1,63 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Marco Miozzo , + * Nicola Baldo + * + */ +#include "ns3/log.h" +#include "ns3/double.h" +#include "ns3/enum.h" +#include "ns3/mobility-model.h" +#include + +#include "kun-2600-mhz-propagation-loss-model.h" + +NS_LOG_COMPONENT_DEFINE ("Kun2600MhzPropagationLossModel"); + +namespace ns3 { + +NS_OBJECT_ENSURE_REGISTERED (Kun2600MhzPropagationLossModel); + + +TypeId +Kun2600MhzPropagationLossModel::GetTypeId (void) +{ + static TypeId tid = TypeId ("ns3::Kun2600MhzPropagationLossModel") + .SetParent (); + + return tid; +} + +double +Kun2600MhzPropagationLossModel::GetLoss (Ptr a, Ptr b) const +{ + double dist = a->GetDistanceFrom (b); + double loss = 36 + 26 * log10 (dist); + return loss; +} + +double +Kun2600MhzPropagationLossModel::DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const +{ + return (txPowerDbm - GetLoss (a, b)); +} + + +} // namespace ns3 diff --git a/src/propagation/model/kun-2600-mhz-propagation-loss-model.h b/src/propagation/model/kun-2600-mhz-propagation-loss-model.h new file mode 100644 index 000000000..3aa9db994 --- /dev/null +++ b/src/propagation/model/kun-2600-mhz-propagation-loss-model.h @@ -0,0 +1,71 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Marco Miozzo + * Nicola Baldo + * + */ + +#ifndef KUN_2600MHZ_PROPAGATION_LOSS_MODEL_H +#define KUN_2600MHZ_PROPAGATION_LOSS_MODEL_H + +#include + +namespace ns3 { + + +/** + * \ingroup propagation + * + * \brief Empirical propagation model for the 2.6 GHz frequency + * + * This class implements the empirical model for 2.6 GHz taken from this paper: + * Sun Kun, Wang Ping, Li Yingze + * "Path Loss Models for Suburban Scenario at 2.3GHz, 2.6GHz and 3.5GHz" + * 8th International Symposium on Antennas, Propagation and EM Theory (ISAPE), 2008. + */ +class Kun2600MhzPropagationLossModel : public PropagationLossModel +{ + +public: + + // inherited from Object + static TypeId GetTypeId (void); + + /** + * \param a the first mobility model + * \param b the second mobility model + * + * \return the loss in dBm for the propagation between + * the two given mobility models + */ + double GetLoss (Ptr a, Ptr b) const; + +private: + + // inherited from PropagationLossModel + virtual double DoCalcRxPower (double txPowerDbm, + Ptr a, + Ptr b) const; + +}; + +} // namespace ns3 + + +#endif // KUN_2600MHZ_PROPAGATION_LOSS_MODEL_H + diff --git a/src/propagation/model/okumura-hata-propagation-loss-model.cc b/src/propagation/model/okumura-hata-propagation-loss-model.cc index 92522ee5f..86186c7e7 100644 --- a/src/propagation/model/okumura-hata-propagation-loss-model.cc +++ b/src/propagation/model/okumura-hata-propagation-loss-model.cc @@ -74,7 +74,8 @@ OkumuraHataPropagationLossModel::GetLoss (Ptr a, PtrGetDistanceFrom (b) / 1000.0; if (m_frequency <= 1.500e9) { - // standard Okumura Hata (from wikipedia) + // standard Okumura Hata + // see eq. (4.4.1) in the COST 231 final report double log_f = log10 (fmhz); double hb = (a->GetPosition ().z > b->GetPosition ().z ? a->GetPosition ().z : b->GetPosition ().z); double hm = (a->GetPosition ().z < b->GetPosition ().z ? a->GetPosition ().z : b->GetPosition ().z); @@ -97,7 +98,7 @@ OkumuraHataPropagationLossModel::GetLoss (Ptr a, PtrGetDistanceFrom (b))) << " logb " << log_bHeight); + NS_LOG_INFO (this << " logf " << 26.16 * log_f << " loga " << log_aHeight << " X " << (((44.9 - (6.55 * log10(hb)) ))*log10 (a->GetDistanceFrom (b))) << " logb " << log_bHeight); loss = 69.55 + (26.16 * log_f) - log_aHeight + (((44.9 - (6.55 * log10 (hb)) )) * log10 (dist)) - log_bHeight; if (m_environment == SubUrbanEnvironment) { @@ -109,9 +110,11 @@ OkumuraHataPropagationLossModel::GetLoss (Ptr a, PtrGetPosition ().z > b->GetPosition ().z ? a->GetPosition ().z : b->GetPosition ().z); double hm = (a->GetPosition ().z < b->GetPosition ().z ? a->GetPosition ().z : b->GetPosition ().z); @@ -132,14 +135,6 @@ OkumuraHataPropagationLossModel::GetLoss (Ptr a, Ptr 1 Km + * and frequencies ranging from 150 MHz to 2.0 GHz. + * For more information about the model, please see + * the propagation module documentation in .rst format. + */ class OkumuraHataPropagationLossModel : public PropagationLossModel { @@ -37,8 +49,6 @@ public: static TypeId GetTypeId (void); /** - * - * * \param a the first mobility model * \param b the second mobility model * diff --git a/src/propagation/model/propagation-environment.h b/src/propagation/model/propagation-environment.h index 1eae7493b..192796b2f 100644 --- a/src/propagation/model/propagation-environment.h +++ b/src/propagation/model/propagation-environment.h @@ -28,6 +28,8 @@ namespace ns3 { /** + * \ingroup propagation + * * The type of propagation environment * */ @@ -38,6 +40,8 @@ enum EnvironmentType /** + * \ingroup propagation + * * The size of the city in which propagation takes place * */ diff --git a/src/propagation/wscript b/src/propagation/wscript index 7764d5fe4..8153214cc 100644 --- a/src/propagation/wscript +++ b/src/propagation/wscript @@ -11,6 +11,7 @@ def build(bld): 'model/okumura-hata-propagation-loss-model.cc', 'model/itu-r-1411-los-propagation-loss-model.cc', 'model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.cc', + 'model/kun-2600-mhz-propagation-loss-model.cc', ] module_test = bld.create_ns3_module_test_library('propagation') @@ -29,6 +30,7 @@ def build(bld): 'model/okumura-hata-propagation-loss-model.h', 'model/itu-r-1411-los-propagation-loss-model.h', 'model/itu-r-1411-nlos-over-rooftop-propagation-loss-model.h', + 'model/kun-2600-mhz-propagation-loss-model.h', ] if (bld.env['ENABLE_EXAMPLES']):