This commit is contained in:
Marco Miozzo
2012-03-07 18:15:12 +01:00
17 changed files with 121 additions and 55 deletions

View File

@@ -1092,12 +1092,19 @@ The physical layer model provided in this LTE simulator is based on
the one described in [Piro2011]_, with the following modifications. The model now includes the
inter cell intereference calculation and the simulation of uplink traffic, including both packet transmission and CQI generation.
MAC to Channel delay
^^^^^^^^^^^^^^^^^^^^
To model the latency of real MAC and PHY implementations, the PHY model simulates a MAC-to-channel delay in multiples of TTIs (1ms). The transmission of both data and control packets are delayed by this amount.
CQI feedback
^^^^^^^^^^^^
The generation of CQI feedback is done accordingly to what specified in [FFAPI]_. In detail, we considered the generation
of periodic wideband CQI (i.e., a single value of channel state that is deemed representative of all RBs
in use) and inband CQIs (i.e., a set of value representing the channel state for each RB).
in use) and inband CQIs (i.e., a set of value representing the channel state for each RB).
Interference Model
^^^^^^^^^^^^^^^^^^
@@ -1174,8 +1181,8 @@ For estimating the :math:`CBLER_i`, the MI evaluation has been implemented accor
where :math:`x` is the MI of the TB, :math:`b_{ECR}` represents the "transition center" and :math:`c_{ECR}` is related to the "transition width" of the Gaussian cumulative distribution for each Effective Code Rate (ECR) which is the actual transmission rate according to the channel coding and MCS. For limiting the computational complexity of the model we considered only a subset of the possible ECRs in fact we would have potentially 5076 possible ECRs (i.e., 27 MCSs and 188 CB sizes). On this respect, we will limit the CB sizes to some representative values (i.e., 40, 140, 160, 256, 512, 1024, 2048, 4032, 6144), while for the others the worst one approximating the real one will be used (i.e., the smaller CB size value available respect to the real one). This choice is aligned to the typical performance of turbo codes, where the CB size is not strongly impacting on the BLER. However, it is to be notes that for CB sizes lower than 1000 bits the effect might be relevant (i.e., till 2 dB); therefore, we adopt this unbalanced sampling interval for having more precision where it is necessary. This behaviour is confirmed by the figures presented in the Annes Section.
Link Layer Performance
^^^^^^^^^^^^^^^^^^^^^^
BLER Curves
^^^^^^^^^^^
On this respect, we reused part of the curves obtained within [PaduaPEM]_. In detail, we introduced the CB size dependency to the CB BLER curves with the support of the developers of [PaduaPEM]_ and of the LTE Vienna Simulator. In fact, the module released provides the link layer performance only for what concerns the MCSs (i.e, with a given fixed ECR). In detail the new error rate curves for each has been evaluated with a simulation campaign with the link layer simulator for a single link with AWGN noise and for CB size of 104, 140, 256, 512, 1024, 2048, 4032 and 6144. These curves has been mapped with the Gaussian cumulative model formula presented above for obtaining the correspondents :math:`b_{ECR}` and :math:`c_{ECR}` parameters.
@@ -1259,8 +1266,8 @@ The BLER perfomance of all MCS obtained with the link level simulator are plotte
Simulator Design
^^^^^^^^^^^^^^^^
Integration of the BLER curves in the ns-3 LTE module
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The model implemented uses the curves for the LSM of the recently LTE PHY Error Model released in the ns3 community by the Signet Group [PaduaPEM]_ and the new ones generated for different CB sizes. The ``LteSpectrumPhy`` class is in charge of evaluating the TB BLER thanks to the methods provided by the ``LteMiErrorModel`` class, which is in charge of evaluating the TB BLER according to the vector of the perceived SINR per RB, the MCS and the size in order to proper model the segmentation of the TB in CBs. In order to obtain the vector of the perceived SINR two instances of ``LtePemSinrChunkProcessor`` (child of ``LteSinrChunkProcessor`` dedicated to evaluate the SINR for obtaining physical error performance) have been attached to UE downlink and eNB uplink ``LteSpectrumPhy`` modules for evaluating the error model distribution respectively of PDSCH (UE side) and ULSCH (eNB side).

View File

@@ -29,7 +29,9 @@
#include <iomanip>
#include <string>
#include <vector>
#include <ns3/gtk-config-store.h>
// uncomment this to use GtkConfigStore
//#include <ns3/gtk-config-store.h>
// The topology of this simulation program is inspired from
// 3GPP R4-092042, Section 4.2.1 Dual Stripe Model

View File

@@ -289,7 +289,7 @@ namespace ns3 {
class LteNetDevice;
/**
* The Fempto forum downlink CqiIdealControlMessage defines an ideal list of
* The downlink CqiIdealControlMessage defines an ideal list of
* feedback about the channel quality sent by the UE to the eNodeB.
*/
class DlCqiIdealControlMessage : public IdealControlMessage
@@ -332,7 +332,7 @@ namespace ns3 {
class LteNetDevice;
/**
* The Fempto forum uplink BsrIdealControlMessage defines the specific
* The uplink BsrIdealControlMessage defines the specific
* extension of the CE element for reporting the buffer status report
*/
class BsrIdealControlMessage : public IdealControlMessage

View File

@@ -140,6 +140,12 @@ LteEnbPhy::GetTypeId (void)
MakeDoubleAccessor (&LteEnbPhy::SetNoiseFigure,
&LteEnbPhy::GetNoiseFigure),
MakeDoubleChecker<double> ())
.AddAttribute ("MacToChannelDelay",
"The delay in TTI units that occurs between a scheduling decision in the MAC and the actual start of the transmission by the PHY. This is intended to be used to model the latency of real PHY and MAC implementations.",
UintegerValue (1),
MakeUintegerAccessor (&LteEnbPhy::SetMacChDelay,
&LteEnbPhy::GetMacChDelay),
MakeUintegerChecker<uint8_t> ())
;
return tid;
}
@@ -208,6 +214,19 @@ LteEnbPhy::GetNoiseFigure () const
return m_noiseFigure;
}
void
LteEnbPhy::SetMacChDelay (uint8_t delay)
{
m_macChTtiDelay = delay;
m_packetBurstQueue.resize (delay);
}
uint8_t
LteEnbPhy::GetMacChDelay (void) const
{
return (m_macChTtiDelay);
}
bool
LteEnbPhy::AddUePhy (uint16_t rnti, Ptr<LteUePhy> phy)
{
@@ -447,14 +466,10 @@ LteEnbPhy::EndFrame (void)
void
LteEnbPhy::GenerateCqiFeedback (const SpectrumValue& sinr)
LteEnbPhy::GenerateCqiReport (const SpectrumValue& sinr)
{
NS_LOG_FUNCTION (this << sinr);
Ptr<LteEnbNetDevice> thisDevice = GetDevice ()->GetObject<LteEnbNetDevice> ();
m_enbPhySapUser->UlCqiReport (CreateUlCqiReport (sinr));
}

View File

@@ -85,6 +85,7 @@ public:
*/
double GetTxPower () const;
/**
* \param pw the noise figure in dB
*/
@@ -95,6 +96,16 @@ public:
*/
double GetNoiseFigure () const;
/**
* \param delay the TTI delay between MAC and channel
*/
void SetMacChDelay (uint8_t delay);
/**
* \returns the TTI delay between MAC and channel
*/
uint8_t GetMacChDelay (void) const;
/**
* \brief Queue the MAC PDU to be sent
* \param p the MAC PDU to sent
@@ -165,7 +176,7 @@ public:
void PhyPduReceived (Ptr<Packet> p);
// inherited from LtePhy
virtual void GenerateCqiFeedback (const SpectrumValue& sinr);
virtual void GenerateCqiReport (const SpectrumValue& sinr);
private:

View File

@@ -232,21 +232,6 @@ LtePhy::GetRbgSize (void) const
return m_rbgSize;
}
void
LtePhy::SetMacChDelay (uint8_t delay)
{
m_macChTtiDelay = delay;
m_packetBurstQueue.resize (delay);
}
uint8_t
LtePhy::GetMacChDelay (void)
{
return (m_macChTtiDelay);
}
void
LtePhy::SetMacPdu (Ptr<Packet> p)
{

View File

@@ -194,14 +194,6 @@ public:
*/
uint8_t GetRbgSize (void) const;
/**
* \param delay the TTI delay between MAC and channel
*/
void SetMacChDelay (uint8_t delay);
/**
* \returns the TTI delay between MAC and channel
*/
uint8_t GetMacChDelay (void);
/**
* \param p queue MAC PDU to be sent
@@ -214,7 +206,7 @@ public:
Ptr<PacketBurst> GetPacketBurst (void);
/**
* \param p queue control message to be sent
* \param m the control message to be sent
*/
void SetControlMessages (Ptr<IdealControlMessage> m);
@@ -225,11 +217,11 @@ public:
/**
* generate CQI feedback based on the given SINR
* generate a CQI report based on the given SINR
*
* \param sinr the SINR vs frequency measured by the device
*/
virtual void GenerateCqiFeedback (const SpectrumValue& sinr) = 0;
virtual void GenerateCqiReport (const SpectrumValue& sinr) = 0;

View File

@@ -109,7 +109,7 @@ LteRadioBearerTag::GetLcid () const
void
LteRadioBearerTag::Print (std::ostream &os) const
{
os << "rnti=" << m_rnti << ", lcid=" << m_lcid;
os << "rnti=" << m_rnti << ", lcid=" << (uint16_t) m_lcid;
}
} // namespace ns3

View File

@@ -98,7 +98,7 @@ LteRlcAm::GetTypeId (void)
void
LteRlcAm::DoTransmitPdcpPdu (Ptr<Packet> p)
{
NS_LOG_FUNCTION (this);
NS_LOG_FUNCTION (this << p->GetSize ());
/** Store arrival time */
Time now = Simulator::Now ();
@@ -191,11 +191,15 @@ LteRlcAm::DoNotifyTxOpportunity (uint32_t bytes)
else if ( m_retxBufferSize > 0 )
{
NS_LOG_LOGIC ("Sending data from Retransmission Buffer");
Ptr<Packet> packet = m_retxBuffer.at (m_vtA.GetValue ()).m_pdu;
Ptr<Packet> packet = m_retxBuffer.at (m_vtA.GetValue ()).m_pdu->Copy ();
if ( packet->GetSize () <= bytes )
{
LteRlcAmHeader rlcAmHeader;
packet->PeekHeader (rlcAmHeader);
NS_LOG_LOGIC ("AM RLC header: " << rlcAmHeader);
// Send RLC PDU to MAC layer
LteMacSapProvider::TransmitPduParameters params;
params.pdu = packet;
@@ -205,6 +209,12 @@ LteRlcAm::DoNotifyTxOpportunity (uint32_t bytes)
m_macSapProvider->TransmitPdu (params);
return;
}
else
{
NS_LOG_LOGIC ("Tx opportunity too small for retransmission of the packet (" << packet->GetSize () << " bytes)");
NS_LOG_LOGIC ("Waiting for bigger tx opportunity");
return;
}
}
else if ( m_txonBufferSize > 0 )
{
@@ -478,7 +488,12 @@ LteRlcAm::DoNotifyTxOpportunity (uint32_t bytes)
// Store new PDU into the Transmitted PDU Buffer
NS_LOG_LOGIC ("Put transmitted PDU in the txedBuffer");
m_txedBufferSize += packet->GetSize ();
m_txedBuffer.at ( rlcAmHeader.GetSequenceNumber ().GetValue () ) = packet;
m_txedBuffer.at ( rlcAmHeader.GetSequenceNumber ().GetValue () ) = packet->Copy ();
// Sender timestamp
RlcTag rlcTag (Simulator::Now ());
packet->AddByteTag (rlcTag);
m_txPdu (m_rnti, m_lcid, packet->GetSize ());
// Send RLC PDU to MAC layer
LteMacSapProvider::TransmitPduParameters params;
@@ -498,11 +513,21 @@ LteRlcAm::DoNotifyHarqDeliveryFailure ()
void
LteRlcAm::DoReceivePdu (Ptr<Packet> p)
{
NS_LOG_FUNCTION (this);
NS_LOG_FUNCTION (this << p->GetSize ());
// Receiver timestamp
RlcTag rlcTag;
Time delay;
if (p->FindFirstMatchingByteTag (rlcTag))
{
delay = Simulator::Now() - rlcTag.GetSenderTimestamp ();
}
m_rxPdu (m_rnti, m_lcid, p->GetSize (), delay.GetNanoSeconds ());
// Get RLC header parameters
LteRlcAmHeader rlcAmHeader;
p->PeekHeader (rlcAmHeader);
NS_LOG_LOGIC ("AM RLC header: " << rlcAmHeader);
if ( rlcAmHeader.IsDataPdu () )
{
@@ -893,7 +918,7 @@ LteRlcAm::DoReceivePdu (Ptr<Packet> p)
if (m_txedBuffer.at (seqNumberValue))
{
NS_LOG_INFO ("Move SN = " << seqNumberValue << " to retxBuffer");
m_retxBuffer.at (seqNumberValue).m_pdu = m_txedBuffer.at (seqNumberValue);
m_retxBuffer.at (seqNumberValue).m_pdu = m_txedBuffer.at (seqNumberValue)->Copy ();
m_retxBuffer.at (seqNumberValue).m_retxCount = 0;
m_retxBufferSize += m_retxBuffer.at (seqNumberValue).m_pdu->GetSize ();

View File

@@ -382,7 +382,7 @@ LteRlcUm::DoReceivePdu (Ptr<Packet> p)
{
delay = Simulator::Now() - rlcTag.GetSenderTimestamp ();
}
m_rxPdu(m_rnti, m_lcid, p->GetSize (), delay.GetNanoSeconds ());
m_rxPdu (m_rnti, m_lcid, p->GetSize (), delay.GetNanoSeconds ());
// 5.1.2.2 Receive operations

View File

@@ -74,7 +74,7 @@ LteCqiSinrChunkProcessor::End ()
NS_LOG_FUNCTION (this);
if (m_totDuration.GetSeconds () > 0)
{
m_phy->GenerateCqiFeedback ((*m_sumSinr) / m_totDuration.GetSeconds ());
m_phy->GenerateCqiReport ((*m_sumSinr) / m_totDuration.GetSeconds ());
}
else
{

View File

@@ -65,7 +65,7 @@ struct EutraChannelNumbers
{ 17, 734, 5730, 5730, 5849, 704, 23730, 23730, 23849},
{ 18, 860, 5850, 5850, 5999, 815, 23850, 23850, 23999},
{ 19, 875, 6000, 6000, 6149, 830, 24000, 24000, 24149},
{ 20, 791, 6150, 6150, 6449, 832, 24150, 24150 - 24449},
{ 20, 791, 6150, 6150, 6449, 832, 24150, 24150, 24449},
{ 21, 1495.9, 6450, 6450, 6599, 1447.9, 24450, 24450, 24599},
{ 33, 1900, 36000, 36000, 36199, 1900, 36000, 36000, 36199},
{ 34, 2010, 36200, 36200, 36349, 2010, 36200, 36200, 36349},

View File

@@ -314,7 +314,7 @@ LteUeMac::DoConfigureUe (uint16_t rnti)
void
LteUeMac::DoAddLc (uint8_t lcId, LteMacSapUser* msu)
{
NS_LOG_FUNCTION (this << " lcId" << lcId);
NS_LOG_FUNCTION (this << " lcId" << (uint16_t) lcId);
NS_ASSERT_MSG (m_macSapUserMap.find (lcId) == m_macSapUserMap.end (), "cannot add channel because LCID " << lcId << " is already present");
m_macSapUserMap[lcId] = msu;
}

View File

@@ -152,6 +152,12 @@ LteUePhy::GetTypeId (void)
MakeDoubleAccessor (&LteUePhy::SetNoiseFigure,
&LteUePhy::GetNoiseFigure),
MakeDoubleChecker<double> ())
.AddAttribute ("MacToChannelDelay",
"The delay in TTI units that occurs between a scheduling decision in the MAC and the actual start of the transmission by the PHY. This is intended to be used to model the latency of real PHY and MAC implementations.",
UintegerValue (1),
MakeUintegerAccessor (&LteUePhy::SetMacChDelay,
&LteUePhy::GetMacChDelay),
MakeUintegerChecker<uint8_t> ())
;
return tid;
}
@@ -207,6 +213,19 @@ LteUePhy::GetTxPower () const
return m_txPower;
}
void
LteUePhy::SetMacChDelay (uint8_t delay)
{
m_macChTtiDelay = delay;
m_packetBurstQueue.resize (delay);
}
uint8_t
LteUePhy::GetMacChDelay (void) const
{
return (m_macChTtiDelay);
}
void
LteUePhy::DoSendMacPdu (Ptr<Packet> p)
{
@@ -282,7 +301,7 @@ LteUePhy::CreateTxPowerSpectralDensity ()
}
void
LteUePhy::GenerateCqiFeedback (const SpectrumValue& sinr)
LteUePhy::GenerateCqiReport (const SpectrumValue& sinr)
{
NS_LOG_FUNCTION (this);
// check periodic wideband CQI

View File

@@ -101,6 +101,16 @@ public:
*/
double GetNoiseFigure () const;
/**
* \param delay the TTI delay between MAC and channel
*/
void SetMacChDelay (uint8_t delay);
/**
* \returns the TTI delay between MAC and channel
*/
uint8_t GetMacChDelay (void) const;
/**
* \brief Queue the MAC PDU to be sent
* \param p the MAC PDU to sent
@@ -151,7 +161,7 @@ public:
// inherited from LtePhy
virtual void GenerateCqiFeedback (const SpectrumValue& sinr);
virtual void GenerateCqiReport (const SpectrumValue& sinr);
virtual void DoSendIdealControlMessage (Ptr<IdealControlMessage> msg);
virtual void ReceiveIdealControlMessage (Ptr<IdealControlMessage> msg);

View File

@@ -78,7 +78,7 @@ LteTestUePhy::CreateTxPowerSpectralDensity ()
}
void
LteTestUePhy::GenerateCqiFeedback (const SpectrumValue& sinr)
LteTestUePhy::GenerateCqiReport (const SpectrumValue& sinr)
{
NS_LOG_FUNCTION (this);

View File

@@ -58,7 +58,7 @@ public:
*/
virtual Ptr<SpectrumValue> CreateTxPowerSpectralDensity ();
virtual void GenerateCqiFeedback (const SpectrumValue& sinr);
virtual void GenerateCqiReport (const SpectrumValue& sinr);
virtual void ReceiveIdealControlMessage (Ptr<IdealControlMessage> msg);