# Energy-Saving Traffic Scheduling in Hybrid Software Defined Wireless Reschargeable Sensor Networks
## 4 Mathematical Optimization Model
### Node Energy Consumption  
For a certain relay node \(v\) that receives data from some node \(u\) and transmits data to some other node \(w\) in a time span \(t\), there are four states: transmitting state, receiving state, idle state and sleeping state. We discuss below the energy consumption of these four states, respectively, referring to the energy consumption model in [39]. (1) Transmitting state. When node \(v\) is sending \(k_{vw}\) bits data to a random node \(w\), the energy consumption \(E_{Tvw}\) mainly relates to the amount of transmitted data \(k_{vw}\) and the distance to the receiver node \(w\), which is denoted with \(d_{vw}\). \(E_{Tvw}\) composes of two parts. The first part is the energy to run radio electronics \(E_{Tvw-elect}=E_{elec}\times k_{vw}\). \(E_{elec}\) depends on factors such as the digital coding, modulation, filtering, and spreading of the signal. Another part is \(E_{Tvw-amp}\), the energy consumed to amplify the signal. \(E_{Tvw-amp}\) depends on the distance \(d_{vw}\) from node \(v\) to target \(w\), and there is a threshold \(d_{0}\). When \(d_{vw}<d_{0}\), the free space model \(\epsilon_{fs}\) is used. Otherwise, the multipath model \(\epsilon_{mp}\) is used, i.e.,  
\[E_{Tvw-amp}=\left\{ \begin{array}{ll}k\times e_{fs}\times d_{vw}^{2}&d_{vw}< d_{0},\\ k\times\epsilon_{mp}\times d_{vw}^{4}&d_{vw}\geq d_{0}.\end{array} \right. \tag{1}\]  
Therefore, the energy consumption in transmitting state \(E_{Tvw}=E_{Tvw-elc}+E_{Tvw-amp}\). (2) Receiving state. In this state, node \(v\) is receiving some \(k_{uv}\) bits data from a random node \(u\). The energy consumption \(E_{Ruv}\) for node \(v\) only concerns about the radio electronics, i.e.,  
\[E_{Ruv}=E_{Ruv-elc}=E_{elec}\times k_{uv}. \tag{2}\]  
(3) Idle state. In this state, the only function for a node is to keep listening to the channel and being ready to receive data. Generally, the idle power consumption \(P_{Iv}\) is 0.8-1 times of receiving power \(P_{Rv}\). For simplicity and without loss of generality, we set \(P_{Iv}=P_{Rv}\), that is:  
\[P_{Iv}=P_{Rv}=\frac{E_{Ruv}}{t_{Ruv}}=\frac{E_{elec}\times k_{uv}}{t_{Ruv}}=E_{ elec}\times R, \tag{3}\]where \(t_{Ruv}\) is the time used for node \(u\) to transmit \(k_{uv}\) bits data to node \(v\), and \(R\) is the data rate of the wireless link from node \(u\) to node \(v\). Thus, the energy consumption \(E_{Iv}\) of an idle node \(v\) can be calculated as:  
\[E_{Iv}=P_{Iv}\times t_{Iv}, \tag{4}\]  
where \(t_{Iv}\) is the time of node \(v\) in idle state. (4) Sleeping state. In this state, the energy consumption \(E_{Sv}\) is very little and negligible. A common energy-saving mechanism is to allow the node to sleep when there is no task interested and wakes it up when communication happens. According to the analysis above, for a relay node \(v\), the energy consumption in a time span \(t\) is:  
\[E_{v}=\sum_{w\in\{\text{neighbours of $v$}\}}E_{Tvw}+\sum_{u\in\{\text{neighbours of $v$}\}}E_{Ruv}+E_{Iv}+E_{Sv}. \tag{5}\]  
However, in WRSN, what we are really concerned about is the actual energy \(E_{cv}\) provided by a wireless charger \(c\) to node \(v\). When radio waves travel in space, their powers attenuate with increased travel distance. The wireless charger usually charges the devices that are not far from itself. Long distance or obstructions may greatly recede the charging efficiency, which can be avoided by deploying more wireless chargers in practice. Consequently, we can adopt free space propagation model. According to [PERSON]'s free space equation, the receive power \(p_{r}\) of RF signal can be expressed as  
\[p_{r}=G_{s}G_{r}(\frac{\lambda}{4\pi d})^{2}p_{0}, \tag{6}\]  
where \(G_{s}\) is the source antenna gain, \(G_{r}\) is the receive antenna gain, \(\lambda\) is the wavelength, \(d\) is the distance between the source node and the receiver node, and \(p_{0}\) denotes the transmitting power of the source node [3]. Assume the maximum battery volume of node \(v\) is \(E_{mb-v}\), and the battery is full at the starting time.