## 3 System Model
### Clustering and Selection of Cluster Heads
It is worth mentioning that each CH or BS should perform ACLDT for each node to which it is connected. The query made by a user is analyzed and replied to, using the created predictive methods at the CH connecting with SN, which satisfies the quality based on a given boundary. Furthermore, a direct connection between SN and CH is required to update models at CH if the method is not accurate enough. The actual sensor values must be received in this situation, and the prediction model must be updated at both the CH and SN. It is pertinent to mention that an identical scenario is used to communicate between the CH and BS. When using a power line connection, all nodes are energy balanced. Each node can consider the overall energy optimization when choosing a data transmission channel, as shown in Algorithm 2. The data from a node that is further away from the BS are present in numerous hops to the BS. A node that is d meters away from BS emits 1 bit of data, which is routed through \(n\) hops to the base station, where \(E_{\text{bit}}(d,\ n)\) is the entire amount of energy used in this process, as shown in Equation (12):

\[E_{\text{bit}}(d,n)=n\times E_{T}+(n-1)\times(E_{\text{R}}+E_{\text{DA}})=\left\{ \begin{array}{l}n\times\left(E_{\text{elec}}+\varepsilon_{\text{fs}}\times \left(\frac{d}{n}\right)^{2}\right)+\\ (n-1)\times(E_{\text{elec}}+E_{\text{da}}),\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(E_{\text{elec}}+E_{\text{da}}),\frac{d}{n}\geq d_{0}\end{array} \right. \tag{12}\]
```
Input: Input sensor readings x Initialization: start = 1, While \(t\) < T do, \(\lambda=0\), ws, wf, \(\alpha\), emax \[\hat{y}_{f}\leftarrow\frac{1}{w_{f}}\sum\limits_{i=t-w_{f+1}}^{t-1}x_{e}(i);\] \[\hat{y}_{s}\leftarrow\frac{1}{w_{i}}\sum\limits_{i=t-1}^{t-1}x_{e} (i);\] \[\hat{y}(t)\leftarrow\lambda(t)\hat{y}_{f}+[1-\lambda(t)]\hat{y}_{s};\] \[e(t)\leftarrow\lambda_{e}(t)-\hat{y}(t);\] \[w\leftarrow\hat{y}_{f}-\hat{y}_{s};\] If \(\left|\left.e(t)\right|\right.<\text{emax}\), for ws consecutive steps and no ACK is neededthen \(x_{e}(t)=\hat{y}(t)\); \(\lambda(t+1)\leftarrow\lambda(t)\); else \(x_{e}(t)=x(t)\); \(\lambda(t+1)\leftarrow\lambda(t)+\alpha e(t)w\); \(\text{start }\gets t\); T = \(t+1\)
```
**Algorithm 2**ACLDT

### Low-Power Communication Using Swarm Intelligence Integrated with Multi-Hop Communication (SIMHC)

In general, the overall power consumption in the WSN is divided into two parts, PPA and Pc, as shown in Equations (13) and (14):

\[P_{\text{PA}}(d)=(1+\alpha)P_{\text{out}}(d) \tag{13}\]where \(\alpha\) is the drain efficiency. \[P_{\text{out}}\left(d\right)=\overset{\leftarrow}{E}_{\text{b}}R_{\text{b}}\frac{ (4\pi)^{2}d^{\beta}M_{\text{l}}N_{f}}{G_{\text{t}}G_{\text{r}}\lambda^{2}} \tag{14}\]

where \(R_{\text{b}}\) denotes bit rate; \(G_{\text{t}}\) stands for the transmitter antenna gain; and \(G_{\text{r}}\) represents the reception antenna gain; \(d\) is the transmission distances; \(M_{\text{l}}\) indicates the link margin; \(\beta\) is the path-loss exponent; and \(N_{f}\) denotes the power spectral density. Energy per bit for a particular BER, \(E_{b}\), is evaluated using the following equation:

\[ \begin{split}\overset{\leftarrow}{P}_{\text{b}}=\frac{4}{b} \Big{(}1-\frac{1}{2^{\beta/2}}\Big{)}\frac{1}{2^{N_{\text{t}}N_{\text{b}}}} \Big{(}1-\frac{1}{\sqrt{1+2N_{\text{o}}/E_{\text{b}}}}\Big{)}^{N_{\text{r}}N_ {\text{R}}}\\ \times\sum_{k=0}^{N_{\text{T}}N_{\text{R}}-1}\frac{1}{2^{\beta} }\bigg{(}\begin{array}{c}N_{\text{T}}N_{\text{R}}-1+\beta\\ \beta\end{array}\bigg{)}\times\bigg{(}1+\frac{1}{\sqrt{1+2N_{\text{o}}/E_{ \text{b}}}}\bigg{)}^{\beta}\end{split}  \tag{15}\]

where \(P_{b}\) stands for the BER, which is the number of SNs; NR denotes number of receiver nodes; and b is size of the constellation, which is calculated using Equation (16).