# rSEM: System-Entropy-Measure-Guided Routing Algorithm for Industrial Wireless Sensor Networks
## 3 rSEM Algorithm  
Considering the needs of the efficient transfer of data and energy saving, this section will explore the routing based on system entropy suitable for future industrial networks. The system entropy measure is a network performance measure based on topology. In addition, the topology structure of the network inherently contains various advantages or disadvantages in power consumption and delay performance. Therefore, the optimization of the network based on the system entropy measure is expected to reduce the network power consumption from the perspective of topology. At the same time, from the experimental results, the rSEM algorithm also outperforms the Dijkstra algorithm in delay. Firstly, the rSEM algorithm uses Laplace matrix \(\mathbf{L}\) to describe the network topology. The elements \(L_{\{i,j\}}\) at the diagonal of the Laplace matrix represent degrees, and the elements outside the diagonal \(L_{\{i,j\}}\)s are represented by negative capacity values as  
\[L_{\{i,j\}}=-\text{log}_{2}\Big{(}\frac{Pathloss(i,j)}{N_{0}}+1\Big{)} \tag{3}\]  
where \(Pathloss(i,j)\) represents the path loss between node \(i\) and node \(j\), \(N_{0}\) is the noise power. If there is no connection between two points in the routing, \(L_{\{i,j\}}=0\). The expression of system entropy is as follows [12; 13]:  
\[H^{sys}(\mathbf{L})=\frac{1}{1-\alpha}\text{log}_{2}\big{[}tr\big{(}(\mathbf{ L})^{\alpha}\big{)}\big{]} \tag{4}\]  
where \(\alpha\) represents the parameter of system entropy and its value is 2, which is different from the description in the literature [11]. When using the capacity as a path metric, an \(\alpha\) of less than one leads to the system entropy in complex form. The system entropy-based routing uses the hierarchical routing architecture within 2 hops. Sinknode selects cluster heads, and cluster member nodes select cluster head nodes connecting to themselves to achieve network optimization. Next, the specific network optimization steps based on system entropy theory are introduced. Assuming that \(N\) nodes and 1 sinknode are at known positions. Firstly, \(N^{ch}\) (preset) cluster heads needs to be selected from \(N\). Once the number of cluster heads is determined, \(N^{ch}\) nodes that are most suitable to be cluster heads can be determined through traversal, and the selection method is as follows [11]:  
\[\mathbf{L}^{ch}=\underset{\mathbf{L}^{ch}\in\Omega}{\text{arg min}}\left[H^{ sys}\Big{(}\mathbf{L}^{ch}_{i}\Big{)}\right] \tag{5}\]where \(\Omega\) represents all the cases that need to be considered in the problem, obviously, \(|\Omega|= \begin{pmatrix}N\\ N^{ch}\end{pmatrix} \), where \( \begin{pmatrix}n\\ m\end{pmatrix} \) is the combinatorial function. \(\mathbf{L}_{i}^{ch}\in\mathbb{R}^{\left(N^{ch}+1\right)\times\left(N^{ch}+1 \right)}\) represents the topology of the network composed of some \(N^{ch}\) nodes and the sinknode. If the cluster head only needs to report to the sinknode, all the elements on the diagonal are 1 except that of the sinknode. The cluster head selection method is similar to the maximum likelihood traversal method, and all cases are exhaustively compared to find \(N^{ch}\) cluster heads corresponding to the case with the minimum system entropy. After the cluster heads selection, the cluster member nodes will choose cluster heads, or connect directly to the sinknode. Obviously, if all the cases were tried, the algorithm has to traverse \(\left(N-N^{ch}\right)^{N^{ch}+1}\) cases in total. In order to simplify the algorithm better, the parameter \(v\) can be set to describe the number of potential cluster heads considering by each member node. The definition of potential cluster heads is by minimum distance: member nodes consider only the nearest \(v\) cluster heads (or \(v-1\) cluster heads and the sinknode). Member nodes in this step are added one by one.