# A Method for Energy Balance and Data Transmission Optimal Routing in Wireless Sensor Networks
## 4 Power Line Connection Scheme for Wireless Sensor Networks
### Optimal Data Transmission Path Algorithms  
In the scheme of power line connection, all nodes are fully balanced in energy, and each node can fully consider the overall energy optimization when selecting a data transmission path. A node farther from the base station, its data is transmitted to the base station in multiple hops. For a certain transmission distance, when the number of hops is too small, the distance of each hop is relatively long. Since energy consumption is proportional to the square of the distance, energy consumption is large. On the contrary, when there are too many hops, although the distance of each hop is close, and the energy consumption of one hop is small, the loss of additional receiving, transmitting, and merging data of the transit node increases. Therefore, choosing the right number of hops can save the energy of sending data. A node that is \(d\) meters away from the base station transmits 1 bit of data, and the data is transmitted to the base station through \(n\) hops. The total energy consumed in this process is \(E_{\mathrm{bit}}(d,n)\).  
Figure 6: Minimum spanning tree topological connection and energy transfer.  
\[E_{\text{bit}}(d,n)=n\times E_{\text{T}}+(n-1)\times\left(E_{\text{R}}+E_{ \text{DA}}\right) \tag{10}\] \[=\left\{\begin{array}{c}n\times\left(E_{\text{elec}}+\varepsilon_{ \text{fs}}\times\left(\frac{d}{n}\right)^{2}\right)+\\ (n-1)\times\left(E_{\text{elec}}+E_{\text{da}}\right),\frac{d}{n}<d_{0}\\ n\times\left(E_{\text{elec}}+\varepsilon_{\text{amp}}\times\left(\frac{d}{n} \right)^{4}\right)+\\ (n-1)\times\left(E_{\text{elec}}+E_{\text{da}}\right),\frac{d}{n}\geq d_{0} \end{array}\right.,\]  
We can always find the right number of hops to make \(E_{\text{bit}}(d,n)\) the smallest. We refer to some parameters in [1].  
\[E_{\text{elec}}=50,\ \varepsilon_{\text{fs}}=10,\varepsilon_{\text{amp}}=0.0013,E_{ \text{da}}=5,d_{0}=87\]  
Figure 7a shows the minimum energy required to transmit a single bit at different distances. The numbers indicated in the different intervals in the figure are the optimal number of hops that minimize the energy within this interval. Obviously, as the distance increases, the optimal hop count gradually increases. Overall, the energy consumption and distance through multi-hop transmission are approximately linear. When the distance is less than 105 m, the number of hops that minimize energy consumption is one. When the distance is greater than 105 m, the optimal hop count is increased by one for every \(d_{0}\) meter increase. That is to say, on the most energy-efficient communication path from one node to the base station, the distance between the two hops is within \(d_{0}\). Figure 7b shows the energy consumption for transmitting a single bit with a single hop. Comparing the energy consumption of single-hop and multi-hop, it can be concluded that as the distance increases, transmitting data according to the optimal hop count can significantly reduce energy consumption.  
The base station can aggregate the location information of all nodes and calculate the distance from each node to the base station. According to Figure 7, the optimal hop count of each node and the distance of each hop can be determined, thereby planning the optimal transmission path of this node. The base station broadcasts the routing information to all nodes, and does not need to update the routing table during the subsequent work.