## 3 The Methodology
### Secure Credentials (SCs)-Based Authentication
Table 1 also shows the representation of fuzzy rules for cluster head (CH) selection in the proposed research. It outlines the combinations of input variables (F1 to F6) and their corresponding CH selection outcomes (Yes or No), indicating the decision-making process for CH assignment based on the given fuzzy rules. Figure 4: _Cont._  
The threshold for a node \(n_{i}\) to become CH is computed as  
\[T(n_{i})=\left\{ \begin{array}{c}\frac{p_{i}}{1-p_{i}\times(r\ mod\ 1/p_{i})},\ if\ n_{i} \epsilon G\\ 0,\ Otherwise\end{array} \right. \tag{5}\]  
In this case, G is the collection of all candidates for CH who have been eliminated in earlier stages. The probability value (\(p_{i}\)) of each node is computed as follows:  
\[p_{i}=p\frac{E_{i}(r)}{E_{CJ}(r-1)} \tag{6}\] \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**F1** & **F2** & **F3** & **F4** & **F5** & **F6** & **CH** \\ \hline Low & Low & Low & Low & Low & Low & Low & No \\ \hline Low & Low & Medium & Medium & High & Medium & Yes \\ \hline Low & Medium & High & High & Medium & High & Yes \\ \hline Low & High & Medium & High & Low & High & Yes \\ \hline Low & Low & Low & Low & Medium & Low & No \\ \hline Low & Medium & Low & High & High & High & Yes \\ \hline Medium & Low & Medium & High & High & High & Yes \\ \hline Medium & Low & Medium & High & High & High & Yes \\ \hline Medium & Low & Low & Low & Low & Low & No \\ \hline Medium & High & Medium & Low & Low & No & No \\ \hline Medium & High & High & Medium & High & Medium & Yes \\ \hline Medium & Low & Medium & Low & Low & Medium & No \\ \hline High & High & High & High & High & High & Yes \\ \hline High & Low & Low & Low & Low & Low & No \\ \hline High & High & Medium & Medium & Low & Medium & Yes \\ \hline High & Low & Medium & Low & High & Low & No \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The Fuzzy Rules. Figure 4: (**a**) HMM, (**b**) time-series state prediction, and (**c**) data readings for sensor nodes. where \(E(r)\) denotes the residual energy at round \(r\) and \(\overline{E_{C,l}}\) is the average regional energy of node \(n_{i}\) in its cluster \(C\) at round \(r-1\). By computing the residual and average energy values, the CH selection probability is computed with the proposed method. The nodes are arranged from the highest to the lowest weight. The median weight value is then used in the following formula to obtain the cutoff value:  
\[\mu=\frac{(W(N_{1})+W(N_{2})+\cdots+W(N_{n}))}{n} \tag{7}\]  
Only the nodes whose weights are greater than a certain threshold (W\(>\)) are considered for the next phase. Thus, the number of nodes to be processed in the next stage is reduced based on the weight value. After CH selection, a cluster is formed with its cluster members (CMs). All IoMT devices in the region are sensed, and their data are transmitted to the CH. In this step, environmental monitoring is learned, and it is held in the blockchain gateway using Circular-based Hidden Markov Model (C-HMM). The main aim of this algorithm is to determine the hidden state that corresponds to the output and to observe the parameters from the output. C-HMM includes a set of hidden states \(h=\{h1,h2,\ldots hn\}\) at time t for any state. The hidden states are determined based on the output \(O=(O1,O2,\ldots On)\) with time \(t\). In the present work, C-HMM monitors the environment. Generally, C-HMM includes state emission probability and state transition probability. State probability is the probability that is obtained from hidden state \(h_{k}(t)\) at time t, and it is the transition to hidden state \(h_{j}(t+1)\) at time t + 1, which are represented as follows:  
\[TP=P\big{(}h_{j}(t+1)|h_{k}(t)\big{)}=tp_{jk} \tag{8}\]  
State emission probability is a probability that is received from hidden state \(h_{j}(t)\) at time t, and it emits observed states \(O_{i}(t)\), which are defined as follows:  
\[EP=P\big{(}O_{i}(t)|h_{j}(t)\big{)}=ep_{ij} \tag{9}\]  
Finally, C-HMM finds the current state of each IoMT device and updates its information to the gateway.