revised buildings+propagation after review by Pavel http://codereview.appspot.com/5728062/

This commit is contained in:
Nicola Baldo
2012-04-30 17:27:01 +02:00
parent 6848f41fd1
commit 044cf73b60
14 changed files with 219 additions and 40 deletions

View File

@@ -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)

View File

@@ -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<ItuR1411LosPropagationLossModel> ();
m_ituR1411NlosOverRooftop = CreateObject<ItuR1411NlosOverRooftopPropagationLossModel> ();
m_ituR1238 = CreateObject<ItuR1238PropagationLossModel> ();
m_kun2600Mhz = CreateObject<Kun2600MhzPropagationLossModel> ();
}
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<MobilityModel> a, Ptr<Mobility
double
HybridBuildingsPropagationLossModel::OkumuraHata (Ptr<BuildingsMobilityModel> a, Ptr<BuildingsMobilityModel> 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

View File

@@ -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<ItuR1411LosPropagationLossModel> m_ituR1411Los;
Ptr<ItuR1411NlosOverRooftopPropagationLossModel> m_ituR1411NlosOverRooftop;
Ptr<ItuR1238PropagationLossModel> m_ituR1238;
Ptr<Kun2600MhzPropagationLossModel> m_kun2600Mhz;
double m_itu1411NlosThreshold; ///< in meters (switch Los -> NLoS)
double m_rooftopHeight;
double m_frequency;
};

View File

@@ -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.

View File

@@ -52,7 +52,7 @@ ItuR1411LosPropagationLossModel::GetTypeId (void)
double
ItuR1411LosPropagationLossModel::GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> 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<MobilityModel> a, Ptr<MobilityMode
void
ItuR1411LosPropagationLossModel::SetFrequency (double freq)
{
NS_ASSERT (freq > 0.0);
m_lambda = 300000000 / freq;
}

View File

@@ -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
{

View File

@@ -104,7 +104,10 @@ ItuR1411NlosOverRooftopPropagationLossModel::GetLoss (Ptr<MobilityModel> 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<MobilityModel> 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<MobilityModel> 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<MobilityModel> 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);
}

View File

@@ -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
{

View File

@@ -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 <marco.miozzo@cttc.es>,
* Nicola Baldo <nbaldo@cttc.es>
*
*/
#include "ns3/log.h"
#include "ns3/double.h"
#include "ns3/enum.h"
#include "ns3/mobility-model.h"
#include <cmath>
#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<PropagationLossModel> ();
return tid;
}
double
Kun2600MhzPropagationLossModel::GetLoss (Ptr<MobilityModel> a, Ptr<MobilityModel> b) const
{
double dist = a->GetDistanceFrom (b);
double loss = 36 + 26 * log10 (dist);
return loss;
}
double
Kun2600MhzPropagationLossModel::DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const
{
return (txPowerDbm - GetLoss (a, b));
}
} // namespace ns3

View File

@@ -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 <marco.miozzo@cttc.es>
* Nicola Baldo <nbaldo@cttc.es>
*
*/
#ifndef KUN_2600MHZ_PROPAGATION_LOSS_MODEL_H
#define KUN_2600MHZ_PROPAGATION_LOSS_MODEL_H
#include <ns3/propagation-loss-model.h>
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<MobilityModel> a, Ptr<MobilityModel> b) const;
private:
// inherited from PropagationLossModel
virtual double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const;
};
} // namespace ns3
#endif // KUN_2600MHZ_PROPAGATION_LOSS_MODEL_H

View File

@@ -74,7 +74,8 @@ OkumuraHataPropagationLossModel::GetLoss (Ptr<MobilityModel> a, Ptr<MobilityMode
double dist = a->GetDistanceFrom (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<MobilityModel> a, Ptr<MobilityMode
log_bHeight = 0.8 + (1.1 * log_f - 0.7) * hm - 1.56 * log_f;
}
// 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);
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<MobilityModel> a, Ptr<MobilityMode
}
}
else if (m_frequency <= 2.170e9) // max 3GPP freq EUTRA band #1
else
{
// COST 231 Okumura model
// see eq. (4.4.3) 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);
@@ -132,14 +135,6 @@ OkumuraHataPropagationLossModel::GetLoss (Ptr<MobilityModel> a, Ptr<MobilityMode
loss = 46.3 + (33.9 * log_f) - log_aHeight + (((44.9 - (6.55 * log10 (hb)) )) * log10 (dist)) - log_bHeight + C;
}
else if (m_frequency <= 2.690e9) // max 3GPP freq EUTRA band #1
{
// Empirical model from
// "Path Loss Models for Suburban Scenario at 2.3GHz, 2.6GHz and 3.5GHz"
// Sun Kun, Wang Ping, Li Yingze
// Antennas, Propagation and EM Theory, 2008. ISAPE 2008. 8th International Symposium on
loss = 36 + 26 * log10 (dist * 1000);
}
return loss;
}

View File

@@ -28,6 +28,18 @@
namespace ns3 {
/**
* \ingroup propagation
*
* \brief this class implements the Okumura Hata propagation loss model
*
* this class implements the Okumura Hata propagation loss model,
* which is used to model open area pathloss for distances > 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
*

View File

@@ -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
*
*/

View File

@@ -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']):