A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
wifi-tx-current-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014 Universita' degli Studi di Napoli "Federico II"
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Stefano Avallone <stefano.avallone@unina.it>
7
*/
8
9
#ifndef WIFI_TX_CURRENT_MODEL_H
10
#define WIFI_TX_CURRENT_MODEL_H
11
12
#include "
wifi-units.h
"
13
14
#include "ns3/object.h"
15
16
namespace
ns3
17
{
18
19
/**
20
* \ingroup energy
21
*
22
* \brief Model the transmit current as a function of the transmit power and mode
23
*
24
*/
25
class
WifiTxCurrentModel
:
public
Object
26
{
27
public
:
28
/**
29
* \brief Get the type ID.
30
* \return the object TypeId
31
*/
32
static
TypeId
GetTypeId
();
33
34
WifiTxCurrentModel
();
35
~WifiTxCurrentModel
()
override
;
36
37
/**
38
* \param txPower the nominal TX power
39
* \returns the transmit current
40
*/
41
virtual
ampere_u
CalcTxCurrent
(
dBm_u
txPower)
const
= 0;
42
};
43
44
/**
45
* \ingroup energy
46
*
47
* \brief a linear model of the Wifi transmit current
48
*
49
* This model assumes that the transmit current is a linear function
50
* of the nominal transmit power used to send the frame.
51
* In particular, the power absorbed during the transmission of a frame \f$ W_{tx} \f$
52
* is given by the power absorbed by the power amplifier \f$ W_{pa} \f$ plus the power
53
* absorbed by the RF subsystem. The latter is assumed to be the same as the power
54
* absorbed in the IDLE state \f$ W_{idle} \f$.
55
*
56
* The efficiency \f$ \eta \f$ of the power amplifier is given by
57
* \f$ \eta = \frac{P_{tx}}{W_{pa}} \f$, where \f$ P_{tx} \f$ is the output power, i.e.,
58
* the nominal transmit power. Hence, \f$ W_{pa} = \frac{P_{tx}}{\eta} \f$
59
*
60
* It turns out that \f$ W_{tx} = \frac{P_{tx}}{\eta} + W_{idle} \f$. By dividing both
61
* sides by the supply voltage \f$ V \f$: \f$ I_{tx} = \frac{P_{tx}}{V \cdot \eta} + I_{idle} \f$,
62
* where \f$ I_{tx} \f$ and \f$ I_{idle} \f$ are, respectively, the transmit current and
63
* the idle current.
64
*
65
* For more information, refer to:
66
* Francesco Ivan Di Piazza, Stefano Mangione, and Ilenia Tinnirello.
67
* "On the Effects of Transmit Power Control on the Energy Consumption of WiFi Network Cards",
68
* Proceedings of ICST QShine 2009, pp. 463--475
69
*
70
* If the TX current corresponding to a given nominal transmit power is known, the efficiency
71
* of the power amplifier is given by the above formula:
72
* \f$ \eta = \frac{P_{tx}}{(I_{tx}-I_{idle})\cdot V} \f$
73
*
74
*/
75
class
LinearWifiTxCurrentModel
:
public
WifiTxCurrentModel
76
{
77
public
:
78
/**
79
* \brief Get the type ID.
80
* \return the object TypeId
81
*/
82
static
TypeId
GetTypeId
();
83
84
LinearWifiTxCurrentModel
();
85
~LinearWifiTxCurrentModel
()
override
;
86
87
ampere_u
CalcTxCurrent
(
dBm_u
txPower)
const override
;
88
89
private
:
90
double
m_eta
;
///< ETA
91
volt_u
m_voltage
;
///< voltage
92
ampere_u
m_idleCurrent
;
///< idle current
93
};
94
95
}
// namespace ns3
96
97
#endif
/* WIFI_TX_CURRENT_MODEL_H */
double
ns3::LinearWifiTxCurrentModel
a linear model of the Wifi transmit current
Definition
wifi-tx-current-model.h:76
ns3::LinearWifiTxCurrentModel::LinearWifiTxCurrentModel
LinearWifiTxCurrentModel()
Definition
wifi-tx-current-model.cc:66
ns3::LinearWifiTxCurrentModel::m_eta
double m_eta
ETA.
Definition
wifi-tx-current-model.h:90
ns3::LinearWifiTxCurrentModel::m_idleCurrent
ampere_u m_idleCurrent
idle current
Definition
wifi-tx-current-model.h:92
ns3::LinearWifiTxCurrentModel::m_voltage
volt_u m_voltage
voltage
Definition
wifi-tx-current-model.h:91
ns3::LinearWifiTxCurrentModel::~LinearWifiTxCurrentModel
~LinearWifiTxCurrentModel() override
Definition
wifi-tx-current-model.cc:71
ns3::LinearWifiTxCurrentModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
wifi-tx-current-model.cc:41
ns3::LinearWifiTxCurrentModel::CalcTxCurrent
ampere_u CalcTxCurrent(dBm_u txPower) const override
Definition
wifi-tx-current-model.cc:77
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::WifiTxCurrentModel
Model the transmit current as a function of the transmit power and mode.
Definition
wifi-tx-current-model.h:26
ns3::WifiTxCurrentModel::~WifiTxCurrentModel
~WifiTxCurrentModel() override
Definition
wifi-tx-current-model.cc:34
ns3::WifiTxCurrentModel::WifiTxCurrentModel
WifiTxCurrentModel()
Definition
wifi-tx-current-model.cc:30
ns3::WifiTxCurrentModel::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
wifi-tx-current-model.cc:24
ns3::WifiTxCurrentModel::CalcTxCurrent
virtual ampere_u CalcTxCurrent(dBm_u txPower) const =0
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
wifi-units.h
Declaration of the SI units (as weak types aliases) used across wifi module.
src
wifi
model
wifi-tx-current-model.h
Generated on Fri Nov 8 2024 13:59:08 for ns-3 by
1.11.0