# Fault-Tolerant Topology of Agricultural Wireless Sensor Networks Based on a Double Price Function
## 3 The Related Theory
### The Topology Model Based on Potential Game with Double Price Function  
Game theory is a mathematical theory suitable for competitive behavior. When applied to topology control, it can better consider the energy consumption of each node and obtain a reasonable topology strategy. Potential game is a kind of strategy game, including player \(M\), strategy space \(S\), and price function \(u(S)\). Player \(M\) represents the set of game participants. The strategy space \(S\) is the Cartesian product of \(s=(s_{i},s_{-i})\in S\) (\(i\in M\)). \(s=(s_{i},s_{-i})\in S\) (\(i\in M\)) is used to represent a policy set, where \(s_{i}\) represents the policy selection of player \(i\) and \(s_{-i}\) represent the policy selection of other players. The set of price functions \(u\) is expressed as \(u=\{u_{1},u_{2},...,u_{M}\}\), where \(u_{i}\) represents the price obtained by player \(i\) with the policy set \((s_{i},s_{-i})\). Agricultural WSN topology control protocol should be optimized by considering multiple objectives such as node degree, energy consumption, residual energy, and network lifetime. Therefore, we established a double price function as follows:  
\[u(p_{i},p_{-i})=f(p_{i},p_{-i})(\alpha p_{i}^{\max}\frac{T_{i}^{\max}}{T_{i}^ {\min}}+\beta(\frac{neb(p_{i})}{neb(p_{i})}+\frac{Emin}{Emax}))-\alpha p_{i} \frac{T_{i}^{\max}}{T_{i}^{\min}}-\beta\frac{neb(p_{i})}{neb(p_{i})}\;Er_{i} \geq Er_{th} \tag{1}\]  
\[u(p_{i},p_{-i})=f(p_{i},p_{-i})(\alpha p_{i}^{\max}\frac{T_{i}^{\max}}{T_{i}^ {\min}})-\alpha p_{i}\frac{T_{i}^{\max}}{T_{i}^{\min}}\;Er_{i}<Er_{th} \tag{2}\]  
where, \(p_{i}\) represents the transmit power of the node. \(f\) (\(p_{i}\), \(p_{-i}\)) indicates network connectivity. If \(f\) (\(p_{i}\), \(p_{-i}\)) = 1, the network is connected. If \(f\) (\(p_{i}\), \(p_{-i}\)) = 0, the network is disconnected. When the price corresponding to node \(i\) is negative, the possibility of node \(i\) accessing the network at the transmit power \(p_{i}\) can be ignored during topology construction. \(\alpha\) and \(\beta\) are the weight factors, \(\alpha\), \(\beta\) = 0. \(E^{\max}\) is the maximum energy, and \(Er_{i}^{\min}\) represents the minimum residual energy in the set of neighbor nodes of \(i\). The worst transmission energy consumption under the current residual energy of the node \(i\) is introduced into the price function to measure the energy efficiency of the current transmit power. \(Er_{th}\) is the residual energy threshold. \(T_{i}^{\max}\) represents the theoretical maximum lifetime in neighbor nodes of node \(i\) and \(T_{i}^{\min}\) represents the theoretical minimum lifetime in neighbor nodes of node \(i\). \(neb(p_{i})\) is the node degree of node \(i\), and \(neb_{i}^{\max}\) indicates the number of neighbor nodes when node \(i\) has the maximum transmit power. At different transmit power, the maximum transmission distance of node \(i\) is different, so \(neb(p_{i})\) will be different. Because wireless nodes are sensitive to the environment, they collect data at a fixed rate and generate data traffic. According to existing studies, the total energy consumption of receiving 1 bit data at wireless node \(i\) and transmitting it to the next wireless node \(j\) is:  
\[Es_{i}=\kappa+c_{1}+c_{2}\times(d_{ij})^{r} \tag{3}\]  
where \(d_{ij}\) is the Euclidean distance between node \(i\) and node \(j\). \(c_{1}\) and \(c_{2}\) are the loss parameters of the radio transmission circuit. \(r\) is the loss factor related to the monitoring environment. Generally, \(r\) range is 2-4. Suppose that the energy consumption of node \(j\) receiving 1-bit data is a constant, recorded as \(\kappa\), and its value is 50 nJ/bit. _Er_ represents the residual energy of node \(i\), and the theoretical minimum lifetime \(T_{i}^{\min}\) of node \(i\) is:  
\[T_{i}^{\min}=\frac{Er_{i}}{(rt_{i}\times\kappa)+(rt_{i}+g_{i})\times(c_{1}+c_ {2}\times(d_{i}^{\max})^{r})} \tag{4}\]  
where, \(rt_{i}\) represents the data receiving rate of node \(i\), in bit/s.