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
16namespace 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 */
26{
27 public:
28 /**
29 * \brief Get the type ID.
30 * \return the object TypeId
31 */
32 static TypeId GetTypeId();
33
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 */
76{
77 public:
78 /**
79 * \brief Get the type ID.
80 * \return the object TypeId
81 */
82 static TypeId GetTypeId();
83
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 */
a linear model of the Wifi transmit current
static TypeId GetTypeId()
Get the type ID.
ampere_u CalcTxCurrent(dBm_u txPower) const override
A base class which provides memory management and object aggregation.
Definition object.h:78
a unique identifier for an interface.
Definition type-id.h:48
Model the transmit current as a function of the transmit power and mode.
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.
Declaration of the SI units (as weak types aliases) used across wifi module.