# Enhancement of RWSN Lifetime via Firework Clustering Algorithm Validated by ANN
## 3 The Framework of the Present Study
### Energy Consumption Model  
The proposed model is used for controlling the data flow and energy, used for each sensor node for the rechargeable wireless sensor network (WRSNs). This model brings forth a routing scheme with the use of following data flow balance constraints. \[\sum_{k\in\mathrm{N}}^{k\
eq i}g_{ki}(t)+R_{i}=\sum_{j\in\mathrm{N}}^{j\
eq i }g_{ij}(t)+g_{iB}(t)\ (i\in N,t\geq 0) \tag{1}\]  
Here, \(g_{ij}(t)\) and \(g_{iB}(t)\) denotes as data flow traveling over a link from sensor node \(i\) to sensor node \(j\) and to the base station respectively. Two important requirements are requisites for the energy consumption of a sensor node during a renewable energy phase. \begin{table}
\begin{tabular}{c l} \hline \hline
**Notation** & **Definition** \\ \hline WCV & Wireless charging vehicle \\ BS & Base station \\ \(N\) & Sensor nodes deploy in WSN \\ E\({}_{max}\) & Maximum battery capacity of nodes \\ E\({}_{min}\) & Minimal battery level of a node to remain operational \\ V & Moving velocity of wireless charging vehicle \\ \(R_{i}\) & The rate of generating sensing data at sensor node \(i\) \\ \(R_{c}\) & Communication Radius of wireless charging vehicle \\ \(g_{ij}(t)\) or \(g_{iB}(t)\) & Data flow rate over a link from node \(i\) to node \(j\) and the BS \\ \(\rho\) & Energy consumption coefficient for retrieving the information \\ \(C_{ij}\) or \(C_{iB}\) & Energy consumption per transmitting the data rate from node \(i\) to \(j\) and the BS \\ \(p_{i}(t)\) & Energy consumption rate \\ \(\tau\) & Overall time consumed by the wireless charging vehicle in a charging cycle \\ \(\tau_{i}\) & Time consumed by wireless charging vehicle to charge the battery of node \(i\) \\ \(\tau_{\mathrm{vac}}\) & Vacation time of wireless charging vehicle to recharge itself \\ \(X_{c}\), \(Y_{c}\) & Center of gravity \\ \(x_{i},y_{i}\) & Coordinates of sensor \\ \(CH\) & Cluster head \\ \(D\) & Distance between the sensor node and center of gravity \\ \(T\) & Each round of data transmission cycle in the network \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The notations used in the paper. During the renewable energy process, the energy of each sensor node remains equal both at the beginning and at the end of the renewable cycle with the time of \(t\). 2. The battery of each sensor node is fully charged initially and has a capacity of E\({}_{max}\). 3. To make a sensor node operational; the energy of the sensor node is never less than the E\({}_{min}\). The following energy constraint handles the issues above:  
\[p_{i}(t)=\rho\underset{k\in\mathbb{N}}{\overset{k\
eq i}{\sum}}g_{ki}(t)+ \underset{j\in\mathbb{N}}{\overset{j\
eq i}{\sum}}C_{ij}g_{ij}(t)+C_{iB}g_{iB}( t)\ (i\in N,t\geq 0) \tag{2}\]  
In a recent study, the following equation is used as the energy consumption model. Here, it is defined as energy consumption for data reception and data transmission. The \(p_{i}(t)\) represents the energy consumption rate at the node \(i\in N,\ t\geq 0\). Whereas \(\rho\) denoted as energy consumption for retrieving the information, \(C_{ij}\) is the energy consumption per transmitting the data rate from sensor node \(i\) to \(j\) and the base station. In this energy consumption model, \(\rho\underset{k\in\mathbb{N}}{\overset{k\
eq i}{\sum}}g_{ki}(t)\) represents the energy consumption rate for collecting the information (reception) and \(\underset{j\in\mathbb{N}}{\overset{j\
eq i}{\sum}}C_{ij}g_{ij}(t)+C_{iB}g_{iB}( t)\) is the energy consumption rate for transmitting the information (transmission) from the sensor nodes. According to the proposed model, when the residual energy falls below a given threshold E\({}_{min}\), this sensor node cannot be operational anymore. A charging cycle can be summarized into three parts. 1. The charging tour of the wireless charging device starts from the service station and reach sensor node \(i\) on the given path. 2. During the time, the wireless charging device charges the battery of sensor node \(i\) wirelessly via wireless energy transfer (WET).