## 2 Proposed Routing Scheme
### The Routing Scheme
#### 2.2.2 Steady Phase  
In this section, the energies dissipated by the active sensor nodes in each region are determined and the total energy of the network is calculated. Applying the energy dissipation equation proposed by [35], the equations below are obtained. The energy \(E_{non-BS}\) each low energy sensor in Region 1 \(R1\) spent in relaying \(k\) bits report to \(BS\) is given by Equation (6). \[E_{non-BS}=E_{TX}(K,d_{BS}) \tag{6}\]  
where \(d_{BS}\) is the distance between the homogeneous nodes in Region 1 and the \(BS\). Each low energy sensor in Region 2 \(R2\) spent energy \(E_{guo-BS}\) in relaying \(k\) bits report to the gateway node and is given by Equation (7). \[E_{non-gw}=E_{TX}(K,d_{gw}) \tag{7}\]  
where \(d_{gw}\) is the distance between the homogeneous nodes in Region 2 and the gateway node. The energy \(E_{gw-BS}\) spent by the gateway node in receiving \(k\) bits of data from Region 2 and 3, aggregating them, and relaying the report to the \(BS\) is given by Equation (8). \[E_{gw-BS}=kE_{elect}+kE_{elect}\Big{(}\frac{n}{c}\Big{)}+k\Big{(}\frac{n}{c} \Big{)}E_{DA}+E_{TX}(k,d_{BS}) \tag{8}\]  
where \(E_{elect}\) is the electronic energy of the transmitter, \(n\) is the number of nodes deployed in the network, \(c\) is the number of clusters in the network, and \(E_{DA}\) is energy for data aggregation. The energy spent in receiving and relaying \(k\) bits report by the cluster head \(CH1\) in Region 3 to the gateway node is given by Equation (9). \[E_{CH1-gw}=kE_{elect}+kE_{elect}\Big{(}\frac{n}{c}-1\Big{)}+E_{TX}(k,d_{gw}) \tag{9}\]  
The energy spent in receiving and relaying \(k\) bits report from the cluster head \(CH2\) in Region 4 to the cluster head \(CH1\) in Region 3 is given by Equation (10). \[E_{CH2-CH1}=kE_{elect}\Big{(}\frac{n}{c}-1\Big{)}+E_{TX}(k,d_{CH1}) \tag{10}\]  
where \(dCH1\) is the distance between the cluster heads in Region 3 and 4. Total energy \(E_{T}\) used in the network is given by Equation (11)  
\[E_{T}=E_{non-BS}+E_{guo-BS}+E_{CH1-gw}+E_{CH2-CH1} \tag{11}\]```
1 Choose first \(S_{CH}\) in Region 3\(\triangleright\)\(S_{CH}\) is the set of cluster heads. 2 compute \(P_{het1}\) using Equation (2)
3 Choose first \(S_{CH}\) in Region 4 compute \(P_{ht2}\) using Equation (3)
4 forevery node in Region 1 do
5 if\(E>E_{max1}\)then\(\triangleright\) E is the energy of nodes
6
7\(\triangleright\)\(E_{max1}\) is the maximum energy for homogeneous nodes
8 Send data to \(BS\)
9
10 else
11 sleep
12 forevery node in Region 2 do
13 if\(E>E_{max1}\)then
14 Send data to \(GW\)
15
16 else
17 sleep
18
19 forevery node in Region 3 do
20 if\(E>E_{max2}\)then
21 Send data to \(GW\) to aggregate and then to \(BS\)
22\(\triangleright\)\(E_{max2}\) is the maximum energy for heterogeneous nodes
23
24 else
25 sleep
26
27 forevery node in Region 4 do
28 if\(E>E_{max2}\)then
29 Send data to \(CH_{1}\)\(\triangleright\)\(CH_{1}\) is cluster head in Region 3
30\(CH_{1}\) Send data to \(GW\) for aggregation
31\(GW\) Send data to \(BS\)
32
33 else
34 sleep
```

**Algorithm 2**Selection of in Regions 3 and 4 and data transmission. ## 3 Simulation Results and Analysis

The proposed heterogeneous routing protocol was compared with the SEP and MGEAR routing protocols using MATLAB R2018a simulation. For the simulation, a system consisting of 100 sensor nodes was randomly deployed in a field of dimension \(100\) m \(\times\) 100 m. The BS and the gateway node were positioned, respectively, at (50 m, 120 m) and (50 m, 50 m) in the network. Approximately 20% of heterogeneous nodes are prepared with greater energy than the homogeneous nodes (\(m=0.2\) and \(\alpha=1\)). All the nodes are stationary after deployment. Table 1 defines the simulation parameters used in this research work. As assumed in [21; 25], the cluster heads and gateway node receive the reports and successfully aggregate them before transmission. Therefore, the fusion validation is not considered in this experiment, though it could be a good contribution for future research.