A Discrete-Event Network Simulator
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
17namespace 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 */
26class 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
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 */
77{
78 public:
79 /**
80 * @brief Get the type ID.
81 * @return the object TypeId
82 */
83 static TypeId GetTypeId();
84
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 */
static TypeId GetTypeId()
Get the type ID.
ampere_u CalcTxCurrent(dBm_u txPower) const override
Object()
Caller graph was not generated because of its size.
Definition object.cc:93
a unique identifier for an interface.
Definition type-id.h:50
static TypeId GetTypeId()
Get the type ID.
virtual ampere_u CalcTxCurrent(dBm_u txPower) const =0
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double ampere_u
ampere weak type
Definition wifi-units.h:33
double dBm_u
dBm weak type
Definition wifi-units.h:27
double volt_u
volt weak type
Definition wifi-units.h:34
Declaration of the SI units (as weak types aliases) used across wifi module.