Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MmWave Radio Energy Model #195

Open
wants to merge 12 commits into
base: new-handover
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ The mmWave module for ns-3 can be used to simulate 5G cellular networks at mmWav

* Simulation of core network elements (with also the MME as a real node)

A seperate module is being developed for [mmWave UE Energy Consumption](https://github.com/arghasen10/mmwave-energy "mmwave-energy"). You can use this module for analyzing
Energy Consumption behaviour of mmwave UE. Check this repository for further details.

The following papers describe in detail the features implemented in the mmWave
module:
- [End-to-End Simulation of 5G mmWave Networks](https://ieeexplore.ieee.org/document/8344116/ "comst paper") is a comprehensive tutorial with a detailed description of the whole module. We advise the researchers interested in this module to start reading from this paper;
Expand Down
22 changes: 22 additions & 0 deletions src/mmwave/model/mmwave-spectrum-phy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
*
* Modified by: Tommaso Zugno <[email protected]>
* Integration of Carrier Aggregation
*
* Modified by: Argha Sen <[email protected]>
* MmWave Radio Energy Model
*/


Expand Down Expand Up @@ -125,6 +128,10 @@ MmWaveSpectrumPhy::GetTypeId (void)
"The no. of packets received and transmitted by the User Device",
MakeTraceSourceAccessor (&MmWaveSpectrumPhy::m_rxPacketTraceUe),
"ns3::UeTxRxPacketCount::TracedCallback")
.AddTraceSource ("State",
"State Value to trace",
MakeTraceSourceAccessor (&MmWaveSpectrumPhy::m_intstate),
"ns3::TracedValueCallback::Int32")
.AddAttribute ("DataErrorModelEnabled",
"Activate/Deactivate the error model of data (TBs of PDSCH and PUSCH) [by default is active].",
BooleanValue (true),
Expand Down Expand Up @@ -245,6 +252,21 @@ MmWaveSpectrumPhy::ChangeState (State newState)
{
NS_LOG_LOGIC (this << " state: " << m_state << " -> " << newState);
m_state = newState;
switch (newState)
{
case IDLE:
m_intstate = 0;
break;
case TX:
m_intstate = 1;
break;
case RX_DATA:
m_intstate = 2;
break;
case RX_CTRL:
m_intstate = 3;
break;
}
}


Expand Down
5 changes: 5 additions & 0 deletions src/mmwave/model/mmwave-spectrum-phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
*
* Modified by: Tommaso Zugno <[email protected]>
* Integration of Carrier Aggregation
* Modified by: Argha Sen <[email protected]>
* MmWave Radio Energy Model
*/


Expand Down Expand Up @@ -57,6 +59,8 @@
#include "mmwave-control-messages.h"
#include "mmwave-harq-phy.h"
#include "ns3/mmwave-beamforming-model.h"
#include "ns3/traced-value.h"
#include "ns3/trace-source-accessor.h"

namespace ns3 {

Expand Down Expand Up @@ -111,6 +115,7 @@ class MmWaveSpectrumPhy : public SpectrumPhy
RX_CTRL
};

TracedValue<int32_t> m_intstate;
static TypeId GetTypeId (void);
virtual void DoDispose () override;

Expand Down