## 4 Proposed Model of SACFIR and SAMCFIR
### Network Settling Phase of SACFIR and SAMCFIR
As \(N\) sensor nodes are clustered into FECHs and non-FECHs, the major energy cost is the sum of intra-cluster communications and inter-cluster communications. Initially, non-FECHs generate \(f\) reports with \(fe\left[1,F\right]\), and we assume that this is the identifier of the application type supported by the node. A non-FECH \(i\) supporting the \(f\)-type application transmits corresponding information to the cluster's FECH, denoted by \(\Gamma_{if}\), and \(j\) FECHs receive all member data denoted by \(\Psi_{if}\). For all FECH data received at a single cluster, FECHs is denoted by \(\sum_{j=1}^{N}\Psi_{if}=1\) for all \(f\). The transportation communication cost from \(i\) non-FECH to \(j\) FECHs is represented by \(Z_{ij}\). Similarly, communication cost between FECH and \(s\) BS is denoted as \(Z_{js}\). Our basic assumption enforces the idea that the SDN central controller understands the network topology and remaining resources of all sensor nodes, so it can predict the analytical consumption of energy resources and can compute the overall communication cost of an existing routing configuration. Let \(\varrho_{f}\) be a binary variable taking values 0 and 1 to indicate, respectively, whether non-FECHs have generated a value or not. The overall system of intra-cluster cost from report generation to transmission towards FECHs can be calculated as:  
\[Intra-C-Cost\sum_{f=1}^{F}\sum_{i=1}^{N}\sum_{j=1}^{N}Z_{ij}\Gamma_{if}\Psi_{jf} \varrho_{f} \tag{15}\]  
Similarly, inter-cluster communication cost is calculated by:  
\[Inter-C-Cost\sum_{f=1}^{F}\sum_{j=1}^{N}l_{\varrho_{f}}Z_{js}\Psi_{jf} \tag{16}\]  
where \(l\) is the amount of aggregated information transmitted to BS. From the above two equations, the SDN controller can calculate the total communications cost. \[Total-C-CostIntra-C_{Cost}+Inter-C_{Cost} \tag{17}\]  
\[Total-C-Cost\sum_{f=1}^{F}\sum_{i=1}^{N}\sum_{j=1}^{N}Z_{ij}\Gamma_{if}\Psi_{jf} \varrho_{f}+\sum_{f=1}^{F}\sum_{j=1}^{N}l_{\varrho_{f}}Z_{js}\Psi_{jf} \tag{18}\]  
\[Total-C-Cost\sum_{f=1}^{F}\sum_{j=1}^{N}\Psi_{jf}(l_{\varrho_{f}}Z_{js}+\sum_{j =i}^{N}Z_{ij}\Gamma_{if}) \tag{19}\]  
where the right side of the equation is constant for any node \(i\) to transmit \(f\) reports through \(j\) FECHs, thus it can be replaced by constant:  
\[Total-C-Cost\sum_{f=1}^{F}\sum_{j=1}^{N}\zeta_{jf}\Psi_{jf} \tag{20}\]  
Hence, the major performance goal of our proposed models is to deal with the cost function minimization. The basic analytical task for the SDN controller is to calculate the possible minimum cost to achieve energy efficient reconfigurations. This minimum cost can be represented by the following inequalities:  
\[Min-Total-C-Cost\sum_{f=1}^{F}\sum_{j=1}^{N}\zeta_{jf}\Psi_{jf} \tag{21}\]  
\[Min-dist_{toBS}=^{\sqrt{(X-xj)^{2}+(Y-yj)^{2}}} \tag{13}\]0  
\[Min-dist_{toBS}=^{\sqrt{(X-xj)^{2}+(Y-yj)^{2}}} \tag{13}\]1  
The above problem description has the property of a binary integer program and it holds class NP-Hard complexity in general. For these problems, greedy algorithm executions are needed to experiment with all possible solutions by testing every combination. The SDN central controller has enough computational and energy resources to carry out complicated analytical operations. However, we have to consider the limitations of the capacity of real-time WSNs nodes at the infrastructure layer regarding sensing, processing and transmissions capabilities. At this particular instance, we focus on processing capabilities by certain quantitative values which is denoted by \(Fmax\). Now SDN controller's analytical operation will be more restricted;  
\[Min-dist_{toBS}=^{\sqrt{(X-xj)^{2}+(Y-yj)^{2}}} \tag{13}\]2 \[Min-dist_{toBS}=^{\sqrt{(X-xj)^{2}+(Y-yj)^{2}}} \tag{13}\]3 (25) \[Min-dist_{toBS}=^{\sqrt{(X-xj)^{2}+(Y-yj)^{2}}} \tag{13}\]4 (26) \[Min-dist_{toBS}=^{\sqrt{(X-xj)^{2}+(Y-yj)^{2}}} \tag{13}\]5  
Deployed sensor nodes at infrastructure layer face bandwidth limitation due to wireless domain and limited transceiver capabilities.