In this section, we introduce an integrated framework referred to as the CRTCA for WSNs. We incrementally integrate the proposed clustering, routing, and topology control approaches to construct the framework. We begin with the zone creation and active nodes selection that is followed by establishing paths among active nodes to the BS. Each of the integrated components is presented in the following sections.

### 3.1. Zone creation and active node selection

Once sensors are localized, the network area is divided into a number of zones. The BS assigns the sensor nodes to different zones based on their geometric positions.

For instance, if the network area is very small (e.g., 100 m × 100 m) and divided into four zones, then sensor nodes are distributed as follows. Nodes with positions between (0, 0) and (50, 50) reside in Zone 1. Whereas sensor nodes with positions between (50, 0) and (100, 50) reside in Zone 2. Figure 4 illustrates the zones construction where the BS is located outside of those zones.

Afterwards, a minimum number of active sensor nodes are chosen by the BS and it works as follows. Each zone is divided into squares where each square has at least one active sensor node. However, even if this assumption does not hold, the region of that square is sensed by an active node of the neighboring squares. This is because an active sensor node in a square has the sensing coverage of all the neighboring squares (Figure 5). Therefore, a very high probability of not having a sensing hole in the network is achieved. As a result, fault tolerance is accomplished. For instance, whenever the active sensor node of a square *g*_{1} fails, the network operation (i.e., sending and receiving messages) proceeds. This is done without activating another sensor node for that square or re-establishing the network topology. This is because the active node of the neighboring square of *g*_{1} fully covers *g*_{1}.

Using this topological structure, there is a high probability that no sensing hole exists in the network if (see Figure 5). The terms *h* and *R*_{s} is the side of a square and the sensing range, respectively. Let us consider the following. The active sensor node *a*_{1} of square *g*_{1} exists at the bottom left corner and the active node *a*_{2} of square *g*_{2} exists at the top right corner. If the node *a*_{2} fails, then the square *g*_{2} can still be covered by the node *a*_{1} of square *g*_{1}. This is even if no other neighboring square of *g*_{2} has active node. This is explained as follows. The farthest point *p*_{2} of *g*_{2} is within the sensing range of *a*_{1}. By following Pythagoras formula, the square coverage is possible. Figure 5 also clarifies this relationship between *R*_{s} and *h*.

This topological structure also ensures that several active sensor nodes (i.e., at least one sensor node) of a zone reside within the communication range (*R*_{c}) of the active nodes of the neighboring zones. This enables the sensor nodes to transmit the data to the BS through active nodes in their neighboring zones. This is because *R*_{c} > *R*_{s} and there is a defined relationship between those ranges [1]. In Figure 6, we find that sensor node *a*_{2} is at the border of two zones *Z*_{
i
} and *Z*_{i+1}. Sensor nodes *a*_{1} and *a*_{2} are at *R*_{s} apart. In addition, sensor nodes *a*_{1} and *a*_{3} are at *R*_{c} apart. In addition, a large number of nodes in *Z*_{i+1}reside within the *R*_{c} of node *a*_{1} of Zone *Z*_{
i
} . Using this topological structure even if a small number of sensor nodes are distributed into the zones, the network is still expected to be covered. The reason is that each sensor node in a square covers all surrounding squares.

The BS chooses a CH for each zone. The chosen node is responsible for controlling the zone as well as selecting active nodes of a zone. The criterion for choosing the CH is as follows. Based on our assumption that all sensor nodes initially have the same residual energy, the BS randomly chooses a sensor node. The chosen node becomes the CH. If the residual energy of the sensor nodes varies, the sensor node with the highest residual energy is chosen as CH. Then, the CH chooses active nodes in each zone based on (1) residual energy, (2) distance, (3) number of sleep rounds, and (4) free buffer spaces. If only one sensor node is located in a square, then it is chosen as an active node. Otherwise, having the same residual energy in nodes, say *A* and *B* in the same zone, node *A* is chosen as an active node. This is when node *A* is closer to the BS than *B* or active nodes of neighboring zones. Further ties are broken by comparing the remaining storage space or the number of sleep rounds of a node. Especially, node *A* is given more priority if it has more remaining storage space compared to node *B*. All other sensor nodes except the chosen active nodes remain in sleep mode. This is done by turning their sensing and transmission radios off. Thus, a number of active nodes are determined in each zone. The determined number of sensor nodes provides a high probability that these nodes provide the sensing coverage of the whole network. Then, each active node generates the shortest path to the BS. Once the CH and active nodes are chosen, they work for a certain period of time (or rounds). They stop working once their residual energy goes below a threshold value. After the clustering technique is proposed, we proceed with the second component of the proposed framework as follows.

### 3.2. Path establishment method

The path establishment method works as follows. Sensor nodes at level *L*_{1} calculate their distances to the BS and send this distance information to the sensor nodes at level *L*_{2}. Then, nodes at level *L*_{2} calculate their distances to the sensor nodes at level *L*_{1} and then calculate the total distance to the BS. This is done through different active nodes at level *L*_{1}. Thus, active nodes at the level *L*_{2} find out the shortest path to the BS (see Figure 7).

Similarly, nodes at level *L*_{
k
} compute the total distance of the neighboring nodes at the upper level *L*_{k-1}to the BS. Afterwards, these nodes identify the shortest path to the BS. Based on this information, an active node creates a communication path with the neighboring active nodes. As a result, the total distance to the BS as well as the power consumptions is minimized as compared to existing tree-based routing protocols since power consumptions are proportional to the distance of transmission path.

Moreover, each active sensor node *x* at the level *L*_{
i
} chooses another active sensor node *y* at the level *L*_{i-1}with which *x* has the second lowest distance to the BS. The sensor node *y* acts as an alternative node or as an intermediate node of an alternative path for each leaf node to the BS. This enables the leaf node to transmit data to the BS in case of any active node fails. Once the paths are established, active nodes sense and route the data to the BS. Figure 7 demonstrates the path establishment method, where the shortest path from a leaf node to the BS is represented by bold arrows. Figure 8 illustrates the alternative path establishment and the transmission of data through alternative node when an active sensor node fails. For instance, if node *K* at level 1 fails, active sensor node *F* at level 2 transmits data through node *L*. The alternative path is shown as red arrows. Based on the proposed framework, a new set of graphs for underlying topologies is proposed as follows.

### 3.3. A set of topology control algorithms

We introduce a new set of graphs referred to as the MG geometric graphs. These graphs are sub-graphs of the UDGs. Each sensor node, *u*, running these graphs chooses the nearest neighboring node, *v*. Afterwards, a midpoint mid is calculated between the sensor nodes *u* and *v*. As a result, a circle *c* is constructed with a center located at mid with a radius *r* _*mid* equal to *s* (|*uv*|/2). The term *s* is a constant parameter within the range of [0, 1] which shortens or increases the *r* _*mid*. If *c* contains a sensor node, say *w*, in its area, then the edge [*u*, *v*] is removed. Otherwise, the edge [*u*, *v*] is preserved.

The algorithm proceeds on each sensor node until the network originally modeled by the UDG is reconstructed. This construction is based on a given *s* value. Because the MG only needs the position of the sensor node running this algorithm (i.e., current sensor node) as well as its neighboring nodes, this algorithm is therefore local. If *s* is equal to1, then a special case of the graph is constructed, a GG [7, 10]. However, the new set of graphs preserves more edges by using smaller circles and it may have crossing edges (i.e., non-planar graphs if *s* ≠ 1). This is compared to that circle constructed by the GG. The possibility of maintaining shorter paths is therefore increased in the MG. This is compared to the GG which makes the MG a denser graph. The MG runs in *O*(*l***l*) where *l* is the degree of sensor nodes. This is because each time a sensor node, say *u*, runs the MG, chooses the nearest neighbor. Afterword, *u* checks all the possible neighbors if they are inside the circle constructed. In addition, the algorithm behaves locally which means that the complexity is analyzed per one sensor node. For completeness, the MG's algorithm is included as shown in Algorithm 1 (appendix).

In the following section, we present the last framework's component, i.e., the routing sensors data.

### 3.4. Routing of sensors data

The proposed routing protocol has two phases: (1) setup and (2) steady phase. The setup phase includes zones creation, active nodes selection, and path establishment. All the framework's components are based on MG and GG. In the steady phase, data are transmitted from the source active node to the BS through intermediate active nodes. Active nodes at different levels work using TDMA scheme. The length of the timeslots at different levels is variable. For instance, at Timeslot 1, the active nodes at the farthest level *L*_{
k
} sense the subscribed events. Furthermore, the nodes send the corresponding data to active nodes at upper level *L*_{k-1}. At Timeslot 2, active nodes at the level *L*_{k-1}receive data packet. These nodes send acknowledgements to nodes at the level *L*_{
k
}. Moreover, they transmit data packet to nodes at the upper level *L*_{k-2}. Hence, the length of Timeslot 1 is shorter than that of Timeslot 2.

The network is scalable since when more nodes are added to the network BS assigns zone ID to each node based on their locations and notifies CH without initiating any network setup phase. These nodes will be considered to be selected as active nodes whenever the setup phase is initiated after a certain number of rounds, *numOfRound*, based on the current network energy status.

numOfRound=\frac{prevNoOfRounds}{prevNetEnergy}\times currentNetEnergy

(1)