# Energy Saving in Wireless Sensor Networks via LEACH-Based, Energy-Efficient Routing Protocols
## 4 Threshold LEACH with Sleep-Awake Scheduling Protocol
### Overview of T-LEACH\({}_{\text{SAS}}\) Operation  
T-LEACH\({}_{\text{SAS}}\) protocol aims to achieve energy conservation in both the selection of cluster heads and the operation of non-cluster head nodes. In order to do so, it combines an energy threshold-based approach for the selection of cluster heads along with a sleep-awake scheduling mechanism that pursues the management of the energy states of sensor nodes. Specifically, in the T-LEACH\({}_{\text{SAS}}\) protocol, following [34], as long as the residual energy of an existing cluster head exceeds the value of a predefined threshold, this node remains as a cluster head. A new round for the election of a different cluster head is initiated as soon as the remaining energy of an existing cluster head becomes less than this threshold. At the same time, T-LEACH\({}_{\text{SAS}}\) adopts the usage of sleep-awake scheduling, which is a well-known energy management technique employed in WSNs [21, 26, 27, 28, 54, 55], where nodes periodically alternate between active (awake) and inactive (sleep) states. The nodes during the awake periods perform sensing, data transmission, and other tasks before returning to a low-power sleep mode, while in sleep mode, the nodes skip the rest of the processing for that round, conserving energy. Practically, in T-LEACH\({}_{\text{SAS}}\), a scheduler assigns specific time slots for when nodes should be awake and when they should sleep. This can be on a periodic basis, in order to let a node be awake for certain duration and sleep for all the rest time. This scheduling strategy plays a critical role in conserving energy and extending network longevity. The operation of T-LEACH\({}_{\text{SAS}}\) is performed in two phases, which are the setup phase and the steady-state phase. Specifically, as soon as the operation of T-LEACH\({}_{\text{SAS}}\) begins, the setup phase is initiated. During the setup phase, the formation of clusters takes place. At the same time, each sensor node decides whether to become a cluster head or not, based on a probability model that considers the node's residual energy and the desired percentage of cluster heads within the overall network. This strategy aims to perform the rotation of cluster heads in a way that distributes energy consumption evenly across the network nodes. Each new cluster head broadcasts its status to other nodes in an advertisement message, which includes its identity and possibly its location (if this is known). Each node in the network that is not selected to be a cluster head receives these advertisements, chooses which cluster to join, and then, notifies its decision to the corresponding cluster head. In this way, each cluster head forms its own cluster. Following cluster formation, each cluster head creates a TDMA schedule, which is crucial for the sleep-awake mechanism. Actually, a model based on the sleep mode TDMA scheduling approach presented in [56] is used. In this approach, the nodes rely on internal low-power timers that remain active during sleep mode. Specifically, nodes follow a predefined schedule, which indicates the time to wake up to transmit or listen. Additionally, nodes along a path can be alerted on-demand by short wake-up messages in order to make possible unscheduled immediate wake-ups. Initial synchronization is accomplished when the central gateway floods the schedule to all nodes, and afterwards, timing is maintained independently in each node by means of their internal timers without a continuous synchronization requirement. This approach reduces idle listening, conserves energy, and keeps delays minimal. This schedule assigns each member node a specific time slot for transmission, allowing them to know when to be awake for transmitting data and when they can turn off their radio components to save energy. Finally, cluster heads broadcast this schedule to their cluster members. As soon as the setup phase is completed, the steady-state is initiated. For the period of the steady-state phase, sensor nodes monitor their ambient conditions.