# Trusted Energy-Aware Hierarchical Routing (TEAHR) for Wireless Sensor Networks
## 3 Proposed Studies
### Proposed Algorithm
The fundamental trust score T\({}_{\rm basic}\) (i) of Node i can be estimated as follows based on the residual energy of Node i:

\[T_{\rm basic}({\rm i})=E_{\rm res}({\rm i})/E_{\rm ref} \tag{16}\]

This equation means that the trust score is directly proportional to the lasting energy of a node compared with the chosen reference energy level. In a more dynamic scenario, where it becomes relevant that a chosen maximum residual energy, E\({}_{\rm max}\), for the network at the time of evaluation could change over time, the normalized trust score would be:

\[T_{norm}({\rm i})=E_{\rm res}({\rm i})/E_{max} \tag{17}\]

The normalization of the trust score is such that it falls within a range [0, 1], with one corresponding to a node with maximum residual energy in the network. Furthermore, F(i) can have several other factors related to the centrality of the Node, its mobility, or historical performance in trust assessment. Then, a weighted trust score \(T_{weighted}({\rm i})\) can be in the form:

\[T_{weighted}({\rm i})=w_{1}\Big{(}E_{\rm res}({\rm i})/E_{\rm ref}\Big{)}+w_{ 2}{\rm F}({\rm i}) \tag{18}\]

where \(w_{1}\) and \(w_{2}\) are the weights assigned to the energy-based trust component and the additional factors, respectively, with \(w_{1}+w_{2}=1\). For Adaptive CH Probability Update each non-CH candidate node j, the updated CH probability \({\rm P^{\prime}}_{\rm ch}\) (j) is calculated as follows:

\[P^{\prime}_{\rm ch}({\rm j})=P_{\rm ch}({\rm j})+\alpha\big{(}E_{\rm res}({\rm j })/E_{avg\_am}-1\big{)} \tag{19}\] \begin{table}
\begin{tabular}{c c} \hline
**Notation** & **Description** \\ \hline \(T_{\rm basic}({\rm i}),E_{\rm res}({\rm i}),E_{\rm ref}\) & The fundamental trust score of Node I is based on its residual energy relative to a reference energy level. \\ \(T_{norm}({\rm i}),E_{\rm res}({\rm i}),E_{\rm max}\) & Normalized trust score of nodes i relative to the maximum residual energy in the network. \\ \(T_{weighted}({\rm i}),E_{\rm res}({\rm i}),E_{\rm ref},w_{1},\ w_{2},{\rm F}({ \rm i})\) & The weighted trust score of nodes considers energy-based Trust and additional factors like centrality or mobility. \\ \(P^{\prime}_{ch}({\rm j}),P_{ch}({\rm j}),E_{\rm res}({\rm j}),E_{avg\_am}-1\) & Updated CH probability for node j based on residual energy and the average residual energy of neighboring nodes. \\ \(S(i,k),\ \beta_{1},\ \beta_{2},\ \beta_{3},\ E_{\rm res}({\rm i}),D(i,k),P_{ch}({ \rm i})\) & Suitability metric for selecting a tentative CH based on residual energy, distance, and CH probability. \\ \(M(i,j),\gamma 1,\ \gamma 2,\ \gamma 3\ {\rm Eres}(j),\ D(i,j),C(i,j)\) & A composite metric for selecting the most suitable CH based on energy, distance, and communication cost. \\ \(T_{threshold}\),network conditions,historical data & Dynamic trust threshold that adapts based on network conditions and historical data. \\ \(T_{new}({\rm i},{\rm t}),\ T_{initial},\delta,T_{observed\ actions}({\rm i},{\rm t})\) & The new trust value for Node i at time t was adjusted based on observed actions and initial Trust. \\ \hline \end{tabular}
\end{table} 
Table 2: Notation description. Here, \(E_{eng\_ann}\) is the average of the residual energies announced by neighboring nodes, and \(\alpha\) is a scaling factor to adjust the influence of the residual energy difference. So on the basis of that, the tentative CH selection Evaluation for each non-CH node k evaluates tentative CHs based on a suitability metric S(i,k), which could consider the announced Eres and Pch, and selects the one with the highest S(i,k). \[S(i,k)=\beta_{1}E_{res}(i)+\beta_{2}D(i,k)+\beta_{3}P_{\alpha}(i) \tag{20}\]

Here, D(i,k) represents the distance or signal strength between nodes i and k, and \(\beta_{1},~{}\beta_{2},~{}and~{}\beta_{3}\) are weights. Nodes with similar \(E_{res}\) might be further evaluated based on secondary parameters like proximity or communication cost C(i,k), selecting the CH that minimizes this cost. Minimize C(i,k).