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
#include "ns3/wifi-export.h"
16
17
namespace
ns3
18
{
19
20
/**
21
* @ingroup energy
22
*
23
* @brief Model the transmit current as a function of the transmit power and mode
24
*
25
*/
26
class
WIFI_EXPORT
WifiTxCurrentModel
:
public
Object
27
{
28
public
:
29
/**
30
* @brief Get the type ID.
31
* @return the object TypeId
32
*/
33
static
TypeId
GetTypeId
();
34
35
WifiTxCurrentModel
();
36
~WifiTxCurrentModel
()
override
;
37
38
/**
39
* @param txPower the nominal TX power
40
* @returns the transmit current
41
*/
42
virtual
ampere_u
CalcTxCurrent
(
dBm_u
txPower)
const
= 0;
43
};
44
45
/**
46
* @ingroup energy
47
*
48
* @brief a linear model of the Wifi transmit current
49
*
50
* This model assumes that the transmit current is a linear function
51
* of the nominal transmit power used to send the frame.
52
* In particular, the power absorbed during the transmission of a frame \f$ W_{tx} \f$
53
* is given by the power absorbed by the power amplifier \f$ W_{pa} \f$ plus the power
54
* absorbed by the RF subsystem. The latter is assumed to be the same as the power
55
* absorbed in the IDLE state \f$ W_{idle} \f$.
56
*
57
* The efficiency \f$ \eta \f$ of the power amplifier is given by
58
* \f$ \eta = \frac{P_{tx}}{W_{pa}} \f$, where \f$ P_{tx} \f$ is the output power, i.e.,
59
* the nominal transmit power. Hence, \f$ W_{pa} = \frac{P_{tx}}{\eta} \f$
60
*
61
* It turns out that \f$ W_{tx} = \frac{P_{tx}}{\eta} + W_{idle} \f$. By dividing both
62
* sides by the supply voltage \f$ V \f$: \f$ I_{tx} = \frac{P_{tx}}{V \cdot \eta} + I_{idle} \f$,
63
* where \f$ I_{tx} \f$ and \f$ I_{idle} \f$ are, respectively, the transmit current and
64
* the idle current.
65
*
66
* For more information, refer to:
67
* Francesco Ivan Di Piazza, Stefano Mangione, and Ilenia Tinnirello.
68
* "On the Effects of Transmit Power Control on the Energy Consumption of WiFi Network Cards",
69
* Proceedings of ICST QShine 2009, pp. 463--475
70
*
71
* If the TX current corresponding to a given nominal transmit power is known, the efficiency
72
* of the power amplifier is given by the above formula:
73
* \f$ \eta = \frac{P_{tx}}{(I_{tx}-I_{idle})\cdot V} \f$
74
*
75
*/
76
class
WIFI_EXPORT
LinearWifiTxCurrentModel
:
public
WifiTxCurrentModel
77
{
78
public
:
79
/**
80
* @brief Get the type ID.
81
* @return the object TypeId
82
*/
83
static
TypeId
GetTypeId
();
84
85
LinearWifiTxCurrentModel
();
86
~LinearWifiTxCurrentModel
()
override
;
87
88
ampere_u
CalcTxCurrent
(
dBm_u
txPower)
const override
;
89
90
private
:
91
double
m_eta
;
///< ETA
92
volt_u
m_voltage
;
///< voltage
93
ampere_u
m_idleCurrent
;
///< idle current
94
};
95
96
}
// namespace ns3
97
98
#endif
/* WIFI_TX_CURRENT_MODEL_H */
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:91
ns3::LinearWifiTxCurrentModel::m_idleCurrent
ampere_u m_idleCurrent
idle current
Definition
wifi-tx-current-model.h:93
ns3::LinearWifiTxCurrentModel::m_voltage
volt_u m_voltage
voltage
Definition
wifi-tx-current-model.h:92
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::Object
Object()
Caller graph was not generated because of its size.
Definition
object.cc:93
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:50
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.
ns3::ampere_u
double ampere_u
ampere weak type
Definition
wifi-units.h:33
ns3::dBm_u
double dBm_u
dBm weak type
Definition
wifi-units.h:27
ns3::volt_u
double volt_u
volt weak type
Definition
wifi-units.h:34
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
for ns-3 by
1.16.1