Improving Energy Efficiency With Content-Based Adaptive and Dynamic Scheduling in Wireless Sensor Networks

Wireless Sensor Networks (WSNs) have revolutionized the era of conventional computing into a digitized world, commonly known as “The Internet of Things”. WSN consists of tiny low-cost sensing devices, having computation, communication and sensing capabilities. These networks are always debatable for their limited resources and the most arguable and critical issue in WSNs is energy efficiency. Sensors utilize energy in broadcasting, routing, clustering, on-board calculations, localization, and maintenance, etc. However, primary domains of energy consumption at node level are three i.e. sensing by sensing-module, processing by microprocessor and communication by radio link. Extensive sensing, over-costs processing and frequent communication not only minimize the network life-time, but also affects the availability of these resources for other tasks. To increase life-time and provide an energy-efficient WSN, here we have proposed a new scheme called “A Content-based Adaptive and Dynamic Scheduling (CADS) using two ways communication model in WSNs”. CADS dynamically changes a node states during data aggregation and each node adapts a new state based on contents of the sensed data packets. Analyzer module at the Base-Station investigates contents of sensed data packets and regulates functions of a node by transmitting control messages in a backward direction. CADS minimizes energy consumption by reducing unnecessary network traffic and avoid redundant message-forwarding. Simulation results have been shown that it increases energy-efficiency in terms of network life-time by 9.65% in 100 nodes-network, 11.36% in 150 nodes-network and 0.94% in 300 nodes. The proposed scheme is also showing stability in terms of increasing cluster life by 87.5% for a network of 100 nodes, 94.73% for 150 nodes and 53.9% in 300 nodes.


I. INTRODUCTION
Wireless Sensor Network (WSN) is a group of resource constraint minute sensors, distributed over an area for monitoring physical or environmental phenomenon. These sensors have limited processing capabilities in terms of computation, The associate editor coordinating the review of this manuscript and approving it for publication was Chan Hwang See . memory and communication. They are used to acquire any physical or environmental condition and convert these analog patterns into digital form. A Sink/Base station (BS) is a central point where all sensors send their sensed values for further analysis [1], [2]. BS is rich in resources and is considered to be the decision-center for all sensor nodes. WSNs are typically used in recording physical conditions (temperature, humidity, pressure) traffic monitoring, weather condition, like energy [7], distance [2] and coverage, convergence areas [9], [34]. An energy-efficient routing protocol known as a Distributed Energy-Efficient Adaptive Clustering Protocol (DEACP) [25] has proposed. Using queue overflow in routing strategy among all cluster members, dropping probability is minimized. It adjusts energy dissipation among all nodes. The CH selection is optimized and all area is covered with full connectivity and minimum consumption of energy. The radio module of a node is turned off for a definite time according to a sleeping schedule. A comprehensive discussion of routing in WSNs and IoT is presented in [35]. Many factors affect performance during communication of data from sensor to sink. This section discussed all those parameters including delay, latency and throughput on layered basis.
For reducing packets loss during mobility with efficient CH selection, LEACH-MF [36] is proposed. It enhances the former clustering protocol for mobility patterns of nodes based on fuzzy interference system. Those nodes which having lesser mobility with better pause timing and more energy are best candidates to be the CH. They used the first order radio model with mobility patterns. Three phases algorithm are used i.e. the CH selection phase, Cluster formation phase and Data transmission phase. Analysis of this scheme proves enhancement in energy-efficiency and reduces packet loss due to mobility. Another clustering protocol based on fuzzy logic is SET-FL [37] to increase energy efficiency in distributed WSNs. Free-nodes are used for direct communication to BS and cluster-nodes are used for collecting data from leaf-sensors. The Four fuzzy metrics used are energy level of BS, energy level of nodes, node proximity and position of nodes with CH. For balancing energy utilization in large scale networks and resolve set cover problem, KMSPGA [38] is proposed. It basically schedules different sensors into complete disjoint sets. Dimensionality reduction is achieved by divide and conquer method. For refining more novelty, KMSPGA uses eight parameters for increasing efficiency. It improves coverage rate, success rate, scalability and is showing high robustness. For balance energy consumption for optimum network topology, ULGATE and ULGAT-GAF [39] is proposed. It uses physically adaptive confirmation for some node to become sleep. It mainly consists fitness function, selection, crossover and mutation processes and optimized problem formulation. Genetic algorithm and AHP uses reshape topology by initiating partial CMs.

B. STATE-BASED MODEL
Many state-based models have also proposed for energy efficiency, in which node acquires different transition states (Active/Sleep/Idle, etc.). The first node level sensing is PEAS: A Robust Energy Conserving Protocol for Long-Lived Sensor Networks [40]. In this approach, a node works in three operating modes. Main drawback, when a node is in active mode, it will never change its state to sleep again. PECAS [41] removes main drawbacks in PEAS. Nodes wake-up and start probing. If no communication is found for an active node, it becomes active. However, active node can adapt sleep state after a specific time. In both approaches, nodes are deployed in a random and unplanned topology. Another improvement in PEAS for the deployment of sensors in a deterministic way is ''Energy Efficient Coverage Guaranteed protocol (EECG)'' [42]. Deterministic deployment of nodes minimizes the cascading effects in which near to BS node will frequently drain because of huge and multi-time usage of these nodes. EEGG minimizes the cascading effect by adding additional sleepy nodes. However, many nodes connected directly to BS in a deterministic way and dies frequently.
Random Back-off Sleep Protocol (RBSP) [43] is another improvement in PEAS. Active node information is used for probing and for changing states in three states. States are calculated from different parameters using back-off algorithm. The discharge curve back-off sleep protocol (DCBPS) [44] removes the drawback of RBSP and based on back-off sleep timing. The sleeping time of neighbors is calculated and based on the battery discharge curve. This algorithm only activates sleepy nodes when an active node is near to drain completely. Coverage and Energy Strategy for WSNs (CES) [45] is working in two stages and each node can adapt four conditions. In first stage, all nodes are working and interchange their location information to other neighbors. As active nodes provide coverage and connectivity, these nodes may die more frequently compared to other nodes. Maintaining sensing coverage and connectivity in large sensor networks (CCP) [46] removes the drawback of CES. In CCP, nodes are basically in three states: sleep, active, and listen with circular topology and location awareness. Based on sensing range, nodes deactivate and activate its states from sleep to active. Fewer active nodes may not cover full area and as a result, disconnect network. To remove the drawbacks of CCP, another scheme known as ''An Enhanced Coverage Control Protocol (ECCP)'' [47] has proposed. ECCP is used for covering full area in a specific region and a balance zone-based active sensing mechanism. More nodes are used for full-time coverage. ECCP is famous for deploying more active nodes for covering the boundaries of overlap areas. Another scheme for full coverage and with minimum number of active nodes is OGDC [46], [48]. Nodes in this scheme are synchronized, location-aware and coverage area is twice the sensing area. Node actives from an Undecided state if there is a minimum overlapping region. However, changing state after each round is time-consuming and result, more overhead.
Energy-efficient protocol for deterministic and Probabilistic Coverage (PCB) [49] is proposed for reducing overlapping zones. In PCB, nodes are activated by an activator, which working on probabilistic and deterministic ways. Many nodes work as an activator on the hexagonal structure and activate other nodes in Active and Sleep modes. All those nodes will be activating; whose energy time is minimum. Probabilistic Coverage Preserving Protocol (PCPP) [50] is an enhanced form of PCB. In PCPP, BS transmits a message for each node randomly to adapt active-state or remains in sleep. When the network is established and some uncovered intersection is discovered, roughly new and unused sensors are deployed there. Balanced Energy and Coverage Guaranteed protocol (BECG) [51] is another state-based scheme. BEGG works in three states, Sleeping, Checking and Working-state. Working and sleeping nodes exchange its states to each other. But the exact/proximate number of working nodes in target area is not possible known in prior. Coverage enhancement algorithms for distributed mobile sensors (EBC) [52] removes the problem of redundant covered areas by using mobility of the nodes. A sensor network is divided into many polygons using the Voronoi diagram. From all polygons, uncovered holes have identified. If area is increased, new sensor needs moves to that new area.
Connectivity preserving localized coverage algorithm (CPL) [53] is another state based scheduling scheme. In CPL, Area of Interest (AoI) is determined. Overlapping coverage areas are calculated by the Euclidian algorithm. Nodes receive Hello message and respond to CH and send their locations and IDs. For full connectivity and efficient use of energy resources, another scheme named, Connectivity and Energy-Efficiency (CEE) [54] has proposed. Based on probability theory, a relationship is obtained between connectivity and communication radius. Different nodes attain wake-up and sleep based on connectivity probability. Residual energy and distance are the two parameters used for energy efficiency. To increase the life-time in terms of reducing idle listening and overhearing issues, another scheme known as, An Energy Consumption Model for Multimodal Wireless Sensor Networks based on Wake-up Radio Receivers [55], [56] is proposed. The radio wakeup (WuRx) and Low Duty Cycling (LDC) with addressing mechanism is used in estimating the energy model. The performance is checked with addressing WuRx and without addressing it. For minimizing idle listening at radio component, the radio is activated on periodic time on receiving a message. It uses M2WSNs and multi-hop communications to analyze the behavior and performance of wakeup protocol.
Another routing based scheme is based on relay selection joint consecutive packet routing (RS-CPR) [57] for energy efficiency has proposed. Each node is weighted on distance from the sink, remaining energy and number of packets in a queue. Nodes are selected from the forwarding node-set with high weight. Two thresholds are tested for each node, the packet queue length and maximum packet waiting time. Fewer nodes with data are selected as relay nodes and, as a result, minimize the contention conflict for the channel. Energy-aware scheduling with quality guarantee method (ESQG) [58] is a state-based scheme based on the degree of investigating the area and residual energy. Voronoi diagram is used for the scope of an active node and calculates importance in the form of residual energy. It uses awakening frequency and individual sensing for changing the state of a node. This scheme is useful where individual sensing is important (scattered network) but it creates overhead in calculating residual energy and multicasting that information to all neighbors.
176498 VOLUME 8, 2020 For reducing the scheduling overhead in on-demand WSNs, overhearing (OH) based on Double Modulation (DM) [59] has proposed. Extra receiver for maintaining wakeup-sleep scheduling is used. An extra signal in the payload is broadcasted for wakeup. It minimizes the impact of sensed data packets on delay and size. This scheme combined the best features of OH and DM. Distributed Minimum-Delay Energy-efficient flooding Tree (MDET) [60] is a scheduling algorithm proposed for better scheduling and with reliable links in WSNs. Undetermined-delay-constrained minimum spanning tree is used for reducing the latency and delay causes by flooding. Very useful in NP-complete problems, but sometimes it creates extra overhead due to such a massive calculation.
Enhanced multimodal switching mechanisms for node scheduling and data gathering (ESMS) [61] is another state-based scheme. Time driven is useful where constant supervision is required while event-driven is used for the detection of specific events. Two switching mechanisms are implemented eHNS and eHNS based on state machine states. Changing of state based on outcomes of PED and PAD algorithms. Another approach for 3D heterogonous based on k-coverage probabilistic [62] has proposed. Sensing sphere of each sensor has detected and redundant points are calculated using k-coverage algorithm. For deployment of sensors, it does not need any terrestrial position.
Energy-efficient sleep scheduling mechanism with similarity measure (ESSM) [63] is another state based scheme. ESSM is based on changing state of node from Active to Sleep. The algorithm has focused on condensed sensor deployment and useful for congested WSNs. But in dispersed deployment, the correlation of data will be low and network will be used more energy. An Effective Scheduling Algorithm for Coverage Control in Underwater Acoustic Sensor Network (UASNs) [64] is state based approach for underwater acoustic sensor networks. Based on ESACC Active-Sleep strategy is deployed with redundant nodes in two portions. Memetic procedure is used for activating sleep state while some nodes will be Active state for sensing. The sleepy nodes are activated during network operations to become as Active/Live. A Method of Balanced Sleep Scheduling in Renewable Wireless Sensor Networks (BSSR) [65], [66] has proposed for introducing harvesting layer in WSNs. Energy are harvested by charging-points from harvesting to underlying layers. Energy harvesters are solar, light or electromagnetic waves. In congested network, sleep-wake up strategy has applied to preserved storage battery power. Many nodes are active for sensing and communication while redundant nodes are kept in sleep to save energy usage. Heuristic Algorithm for Clustering Hierarchy (HACH) [67] is a sleep-wake up scheduling algorithm. Many nodes remain active using stochastic selection of inactive nodes (SSIN). Boltzmann selection is used for sleeping and activating nodes by ensuring full coverage. To enhances clustering process, HEECHS algorithm is used. Advance heuristics is used global and local search process to improve quality of solution.
Both clustering and sleep schedules improve optimization process and increase energy-efficiency.
Motivation: In all of the above schemes, states are changed in passive and proactive manner. They are saving energy by applying strategies on upper and lower layers. Clustering is the management of bunch of nodes at upper layer. While duty cycling is performed at lower layers. Most of the schemes used some definite criteria for changing state from active to sleep. Some dominant parameters for changing states are including: 1) Residual Energy, 2) Distances from BS/CH, 3) RSSI based sensing, 4) Periodic checking of beacons packets, 5) Broadcast packets on time intervals, 6) Location based Hello packets and many other parameters which have already been discussed in the literature. To accomplish certain criteria and meet some predefined measures, some calculation and assessment is needed. In total, these schemes create extra overhead because of changing states in an unintelligent style. A table of all schemes with merits and demerits have included in Appendix-B which mentioned main parameters and its applicability. There is no checking for contents of sensed data packets or inspection the frequency of data or analysis of repeating certain patterns. We always need a reactive mechanism which works on real-time sensing and change states according to contents/frequency/pattern of the sensed data packets. The scheme should avoid un-necessary message-forwarding (redundant sensed values) and minimizes re-clustering overhead. Here we have proposed a new scheme ''A Content-based Adaptive and Dynamic Scheduling (CADS) using two-way communication model in WSNs''. CADS controls the sensing capabilities by introducing state-based procedure. Four state model is derived on internal components of sensor node. The analyzer module at BS analyzes data patterns/contents/frequency and sends control message for adapting any specific state. CADS prolongs network life-time by consuming minimum energy and reduces overall network traffic.

III. CONTENT BASED ADAPTIVE AND DYNAMIC SCHEDULING (CADS) SCHEME USING TWO-WAY COMMUNICATION MODEL IN WSNs
CADS implements four state model in which each node adapts a specific state. Each state works on definite energy level. Nodes collect sensed data packets and send to BS for further analysis. Analyzer module at BS checks and analyzes the contents of sensed data packets. According to contents, analyzer module transmits different control messages for different nodes. Each node receives control message and adapts a specific state. Control messages regulate the functionality of each node while the analyzer module plays a vital role in changing state of a node.
Let sensors are deployed in a network topology (T SN−work ) such that T SN−work ε N where N=1, 2, 3, (Natural Numbers). T SN−work consists a number of immovable homogenous sensor nodes SN 1 , SN 2 , SN 3 , . . . , SN k where K = 1, 2, 3,.... (Natural Numbers) Omni-directional with two-way communication with elected Cluster Heads (CH i ) and specific Base VOLUME 8, 2020 Station (BS i ) where i = 1, 2, 3,.... (Natural Numbers). Three types of data is communicated in T SN−work i.e. Discovery Messages (D Message ), Sensing Data (S Data ) and Aggregated Frames (A aggregated ). D Messages are broadcast by BS to all SNs for discovering the position of SNs in T SN−work and for formation of clusters (K Cluster ). When D Message received from BS, SNs broadcast necessary information including its unique Identity (ID k ) and hop count (H P ) to reach the BS. With the help of D Message BS knows overall topology of network and select a suitable CH for each zone.
BS sends D CH with a unique ID CH to a specific SN based on degree of node and its location. The receiver node of this message now becomes a CH i for a specific zone. BS also broadcasts a message embedded with same ID for all surrounding SNs which tells about the elected CH. Now all SNs sends its S Data to that CH and CH aggregate sense data with related IDs of SNs and forward that A aggregated to BS. CADS works in two-way communications i.e. forward and backward communication between SNs, CH k and BS. When SN sense an event, it sends collected packets to CH and CH aggregates and sends data packets to BS, the communication is known as Forward communication. while all Control Message (C Messages ) transmits by BS for CH and for SNs is known as Backward communication. The size of the C Messages is very small as compared to actual data packets. Following are changing states based on Control Messages.

Two types of communication occur in CADS. ''Forward
Communication'' is regular communication where data is sensed through leaf nodes and send to CH. While ''Backward Communication'' is newer way of communication where BS controls all activities of a node by sending control messages to leaf nodes. Analyzer module of BS analyzes and categories the contents and transmits control messages to those sensors which need to change the state.

A. CADS NETWORK MODEL
BS broadcasts C Messages for all SNs to broadcast their IDs and other information (remaining energy) to its surrounding nodes. When SNs received this message on its radio link, they also broadcast a message in its surrounding. Every SN received C Messages and transmits broadcast message. Consider the deployment of SNs in a Target Area (T Area ) as shown in FIGURE 1. Where SNi=1. . . .n T SN-work with eight nodes. The CH1 is the Cluster Head for all nearby nodes with maximum dense node in the T SN−work . CH 1 is responsible for collection of sense data from these eight nodes, aggregates it, appends IDs of all concerned nodes and send A Aggregated to BS for further necessary action. BS controls the entire network by sending C Messages to CH i and CH further sends to connected nodes. When T SN−work is formed and C Messages change the states of SNs, there are approximate distribution of states transition in the T SN−work . 25% of each state is maintain in the topology i.e. total of four states, each state maintains 25% of all 100 nodes. Sensor's components change their states from one to another (Active/Sleep), based on C Messages received from BS.

B. NODE'S COMPONENTS AND ITS ENERGY LEVEL
A typical sensor node consists of micro-controller, magnetic sensor, communication link (radio link) and a built-in battery (power source). Microcontroller is responsible for processing all onboard data calculations and aggregations. It uses operative method for minimum utilization of energy. Micro-controller is three operating states i.e. Idle, Sleep and Active. We have used only two states; either the microcontroller is in Active-state or in Sleep-state. The Radio link is used for communication and it has three states i.e. Idle, Sleep and Active but we have used only two Active and Sleep. The magnetic sensor has two states i.e. Active and Idle; we have used both active state and idle. In TABLE 1 [28], details of different components are shown. Each component of a node consumes a specific amount of energy at each transaction.

C. CADS FOUR STATE TRANSITION MODEL
The SNs first install in target area for collecting information are in firing state. CH is any SN i with more density as compared to other SNs in T SN−work as discussed in network  [4] and in Geography-informed energy conservation for ad hoc routing (GAF) [68]. The analyzer module transits C Messages and each node adapts the state accordingly. These states are based on the internal components of a node.

D. ENERGY STATE
Four states of CADS have defined based on the internal components. Different combination of microcontroller, communication-link and sensing components defined different states. Four states derived from internal structure of sensor has been shown in TABLE 2.   Initially all nodes are in Active-Live state. After a number of transactions, if same values are sensed consecutive times by a node and these redundant values are sent to analyzer module. It analyzes the contents and transmits different C Messages . When analyzer discovers similarities in sensed data packets or observes same pattern of data for consecutive sensing cycles, it transmits C Messages in backward direction. Normally, analyzer module sends C Messages in a sequence. The node state is switched from Active-Live to Sleep-Live. In Sleep-Live, a node is only Listening the sense values and microcontroller make aggregation of packets only. The communication is in sleep-state where no communication take place.
Based on these values, node state is changed to Sleep-Sleep if these values remain persistent for last three times. Sleep-Sleep state is a condition in which node consumes minimum energy. Active-Sleep is rare-time state which are used for maintaining communication paths and is useful only for routing nodes. Routing nodes are path establishing nodes which take part in communication only but have no concerned with assessment of values.
All other schemes have also defined different states as discussed in literature review but in CADS, states of node are defined based on actual amount of energy consumed by each unit. Other schemes passively sense the phenomena and have no comparisons between data. But in CADS, contents of sensed data packets are checked and based on the assessment, states of nodes are changed.

E. MODULE BASED EVENT DRIVEN MODEL
CADS works in different operating phases where analyzer module streamlines all nodes in specific states. Four states model categorizes nodes in four operating states based on activating different components inside a sensor node. When an event occurs, sensing module senses the event, it proceeds that information to microprocessor. Microprocessor aggregates these packets, append identities and forwards that information to communication module to send it to CH or BS. Each component in a node have different operating states, depends upon the state of the node, these modules can transit from one to another. Sensing module have two states (Active/Idle), processing module have three states (Idle/Active/Sleep) and communication module have also three operating states (Active/Idle/Sleep). These components are actually utilizing certain amount of energy when performing their tasks. Active state always consumed more energy while idle-state have moderate consumption of energy and sleep have its minimum level of energy. In CADS, the analyzer module changes these components from one to another (Active → Idle → Sleep) for different energy levels. Here different energy level means different types of tasks performing by these components. There are sixteen possible cases when these internal component are combined but we have only derived four state. These four state are useful states which helps in reducing energy consumption and avoids to missed any important event. In TABLE 3, CADS states for a node by combining these components have been shown and components-based activities of CADS are shown in FIGURE 3.

F. ANALYZER MODULE
The sensed data packets are sent to analyzer unit of BS for further assessment and necessary action. Analyzer module investigates the contents of data and takes necessary decision for a node to obtained different states. This module is the important part and sensing are minimized due to transmitting C Messages . The contents of received data packets are examined and keeps it in buffer. If consecutive three values remain the same or if some pattern is repeated, the analyzer transmits different C Messages to different nodes while maintaining the overall network in active state. In FIGURE 4, the analyzer module has shown, in which different C Messages are transmitted for switching states. When sensed data packets are received for the first time (T1), the analyzer checks the contents and retain one copy/signature in buffer. In second time (T2) of receiving data, analyzer checks the contents again and retain one copy in buffer. In same way, third times (T3), contents are checked and examined for similarities. If consecutive three times, contents remain the same then state is changed to another i.e. β1 = β2 = β3, where β n is the contents of data. The analyzer module repeats the sensing cycle for each state, consecutive three times (T4, T5, T6) and state change accordingly. The analyzer module also enforces strategy for routing nodes. Any node which is path established-node will never adapt the sleep state. Acquiring sleep state for routing node, will disconnect certain node and results as network partitions. In same figure, an analyzer module has been shown in which β n are compared and different, C (messages) are transmitted while RN is routing nodes For mathematical model, T SN−work is constructed including seven nodes namely SN1, SN2, SN3, SN5, SN6, SN7 and CH1 as in FIGURE 2. These nodes sense the events and sends the sensing data packets (S Data ) to CH1, where it aggregates S Data into aggregated frames (A aggregated ) and sends to BS. For first time, these nodes in firing state with full active mode. When they receive C Messages from the BS it triggers itself according to the message and configure their states. After selecting any node as CH i based on D Messages in CH selection process, the BS now knows the overall network T SN−work. The BS locates actual position of CH and location of all SNs. For the first time when SNs are deployed, the D Messages are broadcast by BS. i.e.
SNs also send their identities (ID i ) to CH i . CH forwards these ID i to BS for recorded in network database. With the help of these IDi, the overall network structure are mapped at BS.
When these SNs responds for the first time to the CH, it aggregates the packets into a single packet, appends the ID i of these SNs and sends to BS. The SNs in this stage is in Active-Live state with maximum utilization of energy (40.50 mA) where all components of SN are in active mode. After sensing in the T Area , the SNs senses the data packets uniformly and sends the D Sense to CH i.e.
Where β1 is the D Sense is sensed uniformly in T Area . All SNs send the D Sense to CH. The CH aggregates the same data into a single packet with one copy of D Sense and ID i of all VOLUME 8, 2020 participating nodes. For time being the data is same (β1). SN1β1+SN2β1+SN3β1+SN5β1+SN6β1+SN7β1 The CH appends its ID CH−1 to the packet and sends to BS for further necessary action.
After some interval of time when system re-sense certain event with same data packets, the S sense is collected at CH1 and sends to BS and this cycle is repeated. After receiving data packets, the analyzer module examines the contents of data packets and take necessary decision. It is also possible that after sometime S sense changed (β2) but sense same data in over T SN−Work , i.e.
SnSN == CH1+β2 (7) It is also possible that sensed data is varied and diverse. For example, two different data are sensed in T SN−Work . i.e. β1 and β2. CH categorizes the events and arranges the S Sense according to its contents. The procedure is repeated with categorizing in different segments i.e.
where || is used for concatenation.

2) BACKWARD COMMUNICATION
Then analyzer module responds with different C Messages in the form of backward communication. These messages also include the first message transmits by BS for CH selection process as in equation- (1). C Messages are transmitted in response of sensed data packets received at BS [50]. The analyzer unit checks the contents of S Sense and responds to nodes in the form of different C Messages . When analyzer receives same data again and again from T SN−Work , the analyzer transmits C Messages to change the states of the SNs. Different types of C Messages in backward communication are shown in FIGURE 2 and in FIGURE 4. First, the SNs are in Active-Live state, it senses data and transmits to CH and onward to analyzer unit. If same data is received consecutive three times, C Sleep−Live is transmitted and node change state from Active-Live to Sleep-Live. In some situations, there are rapid variations in sensed data, the Active-Live will remains the same (state is not changing). In Sleep-Live, communication is in sleep while processor and sensing is active. In CADS, TDMA is used in synchronous form with adoptive cycling of Sensor-MAC (S-MAC) protocol [69]. S-MAC is RTC-CTS based MAC protocol, used for fixed time-slots. It works in three modes, adaptive listening, periodic sleeping and virtual clustering. Here adaptive sleeping is an ideal method of availing the channel. Adaptive sleeping reduces sleeping delay and minimize latency at node level. Fixed slots alternative scheduling mechanism has used when the BS creates S-MAC for equal time slot for each node. One-time slot is assigned to two nodes at the same time. If one node is in Sleep-Sleep state and not in a position to transmit data, then another node transmits its sensed value. Therefore, one slot is alternatively used by others. The same slot can be used for more than two nodes as well but here we have implement it only for two nodes as in TABLE 4 has shown [70]. T1 slot is assigned to SN1 and SN8 at same time if SN1 is in Sleep state then SN8 will be use the same T1 slot. In the same way in T2 slot, SN2 and SN7 can use the same slot alternatively.
This amount is used to run an electric circuit for receiving and transmitting while for permittivity in free space the amount is used as For receiving ''L'' length of message After applying the concerned amount of each parameter, we have known that these processes consumed more energy.
To reduce the energy consumption, we should have minimized these messages. For intermediate nodes routing overhead is covered as  VOLUME 8, 2020 Now in this way each node will transmit data for its near node and each node will receive ''n-1'' data at a distance of ''nd'', we can express it as In Hierarchical cluster formation, first CH is randomly selected while after ten rounds CH is reselected on bases on remaining energy. A threshold has been defined and calculated after hundred rounds. This CH selection is initial and after checking the contents and state-based policy, this threshold is calculated after greater number of rounds. Threshold is defined as While distance and remaining energy is related in For inter and intra cluster communication, the energy usage is For CADS, four states model is defined and implemented in first order radio model. The equations (11) and (12) are redesigned and the distances are checked for D (Threshold) . The energy is now calculated normal with a factor of any defined state. There are eight possible conditions, four for inter-cluster and four for intra-cluster communication. In TABLE 5, four states with eight conditions have shown.
While other metrics will remain the same, While D (Threshold) is calculated as; For each node energy consumption will be E (Residual) = E (Supply) − (E (Transmit) (L, D) + E (Receive) (L)).
Now total energy of the Network will be While average energy will be And for each round, we can calculate energy as E (Round) = L (total) [( n (i,j) E (Aggregated) ) + (2 n (i,j) E (Electirc) ) + ( n (i,j) )ε amp * D 2 ) In CADS the value of L=1000 bits, D will be calculated dynamically and the value of E (Electric) will be calculated form predefined values of E (Transmit) and E (Receive).

Lemma 1: In CADS, the algorithmic complexity of each node is O(n).
Proof: CADS processes each node SN i , in each sensing cycle for checking the contents of sensed data packets. Processing every node for changing the state of a node need ''n'' number of iterations and the worst case is the ''n''. The analyzer module (BS) elects any SN as CH among all SN i with complexity O (1) and each node except the CH is now working as Active-Live nodes, with (n-1) worse complexity.

Accordingly, the Algorithmic Complexity of CADS is O(n). Lemma 2: Average Time complexity of CADS is O[log(n)].
Proof: CADS starts functioning when first time SNs are deployed. BS broadcast a C Message to send position and IDs of each node to BS and neighbors. The BS elects the suitable CH and after that CH communicates with BS with time complexity O(n). After a number of sensing cycle. The analyzer module transmits different C Message to change the state of each SN. After applying the proportion ratio, nearly 25% of each state is utilized. It means that Active-Live SN = 25%, Sleep-Live = 25%, Active-Sleep = 25% and Sleep-Sleep = 25% of the total. This forward communication with variation is time complexity like a binary search complexity [77], [78]

IV. SIMULATION SETUP FOR CADS
CADS is evaluated with different parameters and its performance is checked in different scenarios. The contents-based strategy, enforces nodes to adapt a specific energy level. Defining different energy levels, not only improves the energy-efficiency but also prolongs the network life-time.

A. SIMULATION PARAMETERS AND NETWORK SETUP
CADS four state model has implemented in MATLAB (V.R 2018a) using parameters set of ''off-shelf'' product ''CC2420'' [79]. Network topology has established with 100 to 300 nodes with area of 200 x 200 with variations and with initial energy of 0.5 joules for each node. Broadcast packet size is 512 bits (C Message ) while actual data packet (L) size is 1000 bits. After applying different operations, energy consumption is calculated at each point. Contents of sensed data packets are compared at analyzer and subsequently it regulates the functionality of each node which enhanced the functionality of the system. For uniform analysis, the experiments repeatability was checked. The experiments were repeated from 5 times to 30 times. After 25 times, the values become uniform and causes very minor deviation from its means value. This argument is verified by the minimization in the difference in the error of the consecutive values of the number of times the experiments were repeated as shown FIGURE 6 and TABLE 7, where X represent the former and Y the latter value in the sequence (e.g. 5t-10t). Hence, we believe that the expected results will be more stable. However, to be on safe-side, repeatability for each experiment was taken as 30 times. The result of these experiments are given in FIGURE 5. Different metrics, symbolic presentations and concerned values have been shown in TABLE 6 for simulation and these values are derived from product CC2420.   of CADS. Based on network requirements, it works better in congested and scattered network. Network topology is established in Simulink (MATLAB) in same area of 100×100 m 2 with 100, 150 and 300 nodes. This implementation is shown in FIGURE 7. The number of CH and cluster size is varying from network to network. (a) 100 nodes network is scattered network with 0.1 CH probability. Cluster size is larger and fewer nodes covered all area. In scattered network, fewer nodes are in Sleep-Sleep state while maximum nodes are in Active-Live state. This is because CADS are trying to never miss any crucial event. (b) 150 nodes' network is moderate network where CH and cluster size is large and same area is covered by more nodes. Here probability of CH is same as 0.1 but large than 100 nodes. (c) 300 nodes, size of network is same while cluster size is small. Changing state between different nodes are more exercised here in 300 nodes with same probability of 0.1 CH selection.

C. DATA SET USED IN CADS
CADS scheme is tested with Live Nodes, Node state position and Number of CH selection, however, we would like to explain the experimental setup to justify our analysis. For the analysis of CADS, a standard and widely used dataset [80]- [83] is obtained from Intel Lab experimental setup [84] as shown in FIGURE 8. In this experimental setup 54 SNs nodes were deployed to monitor and cover the entire building. The data aggregated from the deployed sensors was stored in a file. However, tailored to our needs, we only used the temperature data/values. Different sensed values were obtained on periodic basis having repetition in sensed data packets. Data collection in the WSN is a continuous process and many sensing cycles are executed in one hour which produce a large file. However, the dataset shown in TABLE 8, a sample of data for 10 nodes obtained from the original file produced. The experiment spanned over 12 hours and were performed in the Lab in a closed-environment and indoor scenario. Hence, we believe, that the circumstances parameters will have a minimum effect on the results. This argument is further supported by the already performed experiment that in a closed environment the environmental parameters have a least effect on temperature values [85]- [87]. Many classes have defined in implementing CADS in real scenario. Each class has their own methods and variables bound by object of the classes. SNs is abstract class while four derived classes (Active-Live, Sleep-live, Active-Sleep, Sleep-Sleep) are derived from it. Three methods (sense (), Process (), communicate ()) is defined inside each class with other variables. Class diagram of proposed scheme has included in Appendix-A at end of the paper.

V. COMPARISON OF CADS WITH OTHER SCHEMES
System performance of CADS has experimented with other recent and benchmark schemes including ''An energy-efficient sleep scheduling mechanism with similarity measure for wireless sensor networks'' (ESSM) [63], ''A Method of Balanced Sleep Scheduling in Renewable Wireless Sensor Networks'' (BSSR) [65], [66], ''An Effective Scheduling Algorithm for Coverage Control in Underwater Acoustic Sensor Network'' (UASNs) [64], ''HACH: Heuristic Algorithm for Clustering Hierarchy protocol in wireless sensor networks'' [67]. These benchmark schemes have their own state-level implementation while in CADS, an analyzer module have implemented. The analyzer checks the sending packets for similarities. The analyzer module plays a vital role in changing state of a node. These experiments demonstrate that CADS is more energy-efficient and the results has been shown the prolonging of network life-time.
For checking the performance and observing network behavior, three most important metrics are used. These parameters are Live-Node, status of each sensor's component and number of CH selection procedure. For each experiment, these parameters are mapped in graphs and analyzed for different observations. These parameters satisfy our network's requirements which includes no-disconnections in network, full coverage, long-live clusters and certainly not missing an event.
We have experimented with standard metrics because these values are: (1) practically applied for implementation, (2) due to its low cost in-terms of complexity and reliability, (3) high acceptance in WSNs and (4) for formal validity of such schemes which working in energy-efficiency. We have used these parameters for high precision and without biasness. CADS is fixed with these parameters for manipulating performance in congested and scattered networks. We have tried to find out the linear and non-linear effect of these parameters on CADS performance. We have tried to find-out how these parameters affect performance on larger and smaller values. In fact, we have used and fixed a response surface methodology [88] for setting different parameters for WSN. VOLUME 8, 2020

A. STABILITY THROUGH LIVE-NODES
Stability period of SNs (SPN) is the time when network start operation till the first node died (FSND) due to energy depletion. While instability period (ISN) is the time length when the first node dies till last node dies (LSND). While network life-time (NLT) is the time period start from first node died to last node died. In fact, network divided into partitions when 90% of nodes is dead. At this stage, many SNs and BS is live but breakup into different partitions, no communication towards BS. The performance of CADS with other schemes (HACH, UASNs, BSSR, ESSM) is equated in terms of SPN, ISN and LSND.
In scattered network (T SN−Work = 100 Nodes), CADS maintains network stability in terms of first node dead is 602 rounds. This stability is maximum in all other schemes as shown in FIGURE 9 (100 Nodes network). Other schems i.e, HACH, UASNs, BSSR and ESSM are maintaining 401, 399, 403 and 206 rounds respectfully. CADS maintains ISN is 380 rounds while HACH, UASNs, BSSR and ESSM maintain 774, 467, 470 and 466. The ISN is minimum among all other schemes. CADS also maintains LSND is 982 rounds while HACH, UASNs, BSSR and ESSM completes 980, 970, 869 and 867 respectively. The LSND of CADS is matching with ESSM but it is better than HACH, UASNs and BSSR.
In moderate network (T SN−Work = 150 Nodes) with 50% more nodes, CADS lasts in 698 rounds SPN which is better than HACH, UASNs, BSSR and ESSM. CADS verifies better results in SPN and it is concluded that CADS is more stable than other schemes. In order of ISN, CADS performed better than ESSM while rest of the scheme have shown low ISN values, i.e. 282 (CADS), HACH (196), UASNs (198), BSSR (202) and ESSM (498). For network life-time, CADS completes 980 rounds (maximum) while HACH, UASNs, BSSR and ESSM complete 966, 885, 872 and 797 respectively. HACH performed better in network life-time but HACH is longer ISN period while the most stable ISN is CADS.
In congested network (T SN−Work = 300 Nodes), with 100% increase in nodes, CADS completes 1097 rounds in SPN and here CADS covers longer stability period than HACH, UASNs, BSSR and ESSM. In this experiment, it is mentioned that compared HACH, UASNs, BSSR and ESSM, CADS is more stable in terms of long live clusters. CADS also covers 190 ISN value which is smallest and 1287 network life-time value, which is maximum. All these parameters have been shown in TABLE 9. The average is calculated and compared with other scheme. The performance of CADS with other schemes are mapped in graphs (a) 100 Nodes network (b) 150 Nodes network (c) 300 Nodes network as shown in FIGURE 9.
For refinement and optimal analysis, each scheme (CADS, ESSM, BSSR, UASNs and HACH) has been experimented for more than 200 times. First, a substantial population of results is obtained from these 200 experiments. These experiments are repeated 25 times for 100, 150 and 300 nodes with various number of rounds ranging from 100-1000. Second, averages were calculated from all these obtained values to get optimal results. Finally, based on the obtained data, the standard average errors for number of live nodes were calculated which are mentioned in TABLE 9. The results achieved from analysis of average error rate, verifies that these values have minimum effect on original experiment. Although, every scheme performed differently and show divert values from its mean position but did not show any abrupt change in their performance. Hence, it is concluded that these experiments show an optimum scenario and all schemes show how they are close to actual models.

B. CHANGING STATES AT NODE LEVEL
CADS maintains a topology of different SNs in different energy levels. These energy levels are states and each node is retained one of the state. Attaining a specific state for node, mainly depends on the contents of sensed data packets and subsequently the C Messages from the analyzer module. Here CADS has implemented for 100 nodes and checked the changing policy for all state with the constraints: any state < 10 % && any state > 50%, it means that for a particular time, any specific state cannot acquire by less than 10% nodes and cannot be acquire more than 50% nodes. The behavior of all nodes in different states has shown in

C. STABILITY USING NUMBER OF CLUSTER HEADS
Frequent CH selection (re-clustering) requires more calculations for comparisons and more C Messages is broadcasted in the network, which creates extra traffic and consequently more energy is consumed. To minimize the network overhead (excessive sensing and broadcasting) reclustering is minimized and as a result, number of C Messages is reduced which ultimately prolong network lifetime. Frequent re-clustering means that more energy is consumed and this network management is less efficient. CADS works in different phases for reducing the overall sensing cycles. The contents of sensed data packets are analyzed and checked. Different C Messages are broadcasted to SNs to acquire different transition states. Traffic in network is adjusted and controlled by these C Messages . Different states of nodes minimize the energy consumption and it also ensures less disconnection in the network. Contents of sensed data packets are checked by analyzer module and multicast C Messages to SNs for changing current state to another state. Regulating SNs in different transition states, minimizes traffic inside network and it reduces energy consumption at node level. SNs in Sleep-Live and Sleep-Sleep states, do not send data to analyzer while SNs in Active-Live and Active-Sleep sends data to analyzer. In few consecutive sensing cycles, all SN states are changed dynamically. The overall topology of the network remains active while different nodes achieves different transition states.
CADS is analyzed and compared for number of CHs and re-clustering with other schemes (BSSR, UASNs, ESSM, HACH). In 1000 rounds and 100-300 nodes, CADS performs better in CH selection and it ensures more stable network topology compared to other schemes.
In first scenario, 100 SNs (T SN−Work = 100) are examined for re-cluster ratio in 100 rounds. CADS have selected 10 number of CHs for total of 100 SNs, with a ratio of 1/10 (0.1 probability). Other schemes have different ratios i.e. BSSR = 23, UASNs = 27, ESSM =23 and HACH =18 in 1000 rounds in 100 nodes. In TABLE 10, CHs (re-cluster) in each scheme has been calculated after 100 rounds and average is determined for comparison. CADS reduces CHs selection/re-clustering up to 50% as shown in FIGURE 11 (a). VOLUME 8, 2020   Hence, these errors are recorded in their mean (average) values of last iterations of experiments (1000 rounds), their effect on overall results is minimum. The standard error and error margin in averages has been shown in TABLE 9 and  TABLE 10. It is observed that these values are not sufficient large that affect the obtained results.

D. COMPARATIVE STUDY OF PUBLISHED AND PRESENTED RESULTS
The published results of ESSM and UASNs are compared with the presented results of ESSM, UASNS and CADS.
We observed that ESSM and UASNs published results are correlating with minor differences. While ESSM and UASN presented results are correlating with minor differences. Hence, we conclude that the simulation setup and assumptions of ESSM and UASNs (published), ESSM and UASNs (presented) are same. Moreover, for the validation of the correctness of presented Vs published, we performed few more experiments. From the resultant graph as shown in FIGURE 12 and TABLE 11, we also can see a visible difference between the graph lines for the schemes under consideration. We believe that the difference between the published and presented results are due to the following reasons: • Another notable reason could be the use of custom-build simulator and network setup in ESSM. In contrast, we believe that our results are more reliable and authentic due to the MATLAB simulator, which is widely-used for more realistic network simulation.
• Furthermore, our results are valid, because our simulation setup was carefully designed while taking care all the required parameters. VOLUME 8, 2020  • Finally, to find the reasons behind such difference needs further investigation and experimentations.

E. PERFORMANCE ANALYSIS
The results obtained from above experiments is clearly mentioning the effectiveness of CADS. In experiment for stability of network, CADS is depicting more stable network because of the implementation of four state model. In the second experiments, in FIGURE 10, sensing is controlled and analyzer module imposes four state policy. The C Messages transmitted by analyzer module, it categories all SNs in different transition states. Nodes adapt different states after directing by analyzer and each node now consumes a definite amount of energy. When SNs only sensed useful data packets and dropped redundant values, the traffic inside network is reduced. As a result, the number of C Messages and L Messages are minimized and consequently, cluster maintain its shape for longer period and the process of re-cluster is minimized. Which ultimately results in prolonging cluster life and reducing re-cluster overhead. All this process reduced frequent communication and avoid congestion. Therefore, the overall traffic of the network has decreased and as results, it prolongs the network life-time. This experiment has shown actual positions of each sensor component at a specific time. It is the generic four state model where each node adapts any transition state. While in last experiment in FIGURE 11, network stability is calculated with selecting number of CH. Frequent re-clustering/CH selection procedure requires more operations and it consumes more energy. It means a scheme with frequent CH selection consume more energy. CADS minimizes overall network traffic including C Messages and L Messages . In 100, 150 and 300 nodes network, proposed scheme has lesser number of CH and it confirms more stability in terms of CH selection/re-cluster.
Energy-efficiency in WSNs is also affected and correlated with security mechanisms. As these networks need lightweight, massive and heavy protocols are hard to implement. Limited energy and constraints on other resources, always needed a new architecture where security of network resources are ensured with minimum consumption of energy [89], [90]. Some schemes can improve the efficiency and security of CADS. For example, efficient resource management, an architecture for monitoring and collecting data of patient's health condition is proposed for mutual authentication [91]. Mutual authentication is confirmed by using five step procedure. Hash function, session key and BAN logic is mainly used for authentication of mobile users. Another energy efficient, light-weight and privacy-preserving mutual authentication protocol for industrial WSNs [92] has proposed. They have used XOR operation, light-weight one-way hash function and physical un-clone-able function for physical secure authentication process. No secret credentials are hosted in communicating devices. To minimize energy consumption and reduce communication delay, another scheme known as ''GA enabled distributed zone approach'' [93] has proposed. In this scheme, first calculate shortest route among all paths. Genetic algorithm (less complex, better performance) is used for decreasing these two factors. Complete genetic algorithm is mapped and an optimized solution is resultant which is based on chromosome, selection, crossover and mutation. All parameters (delay, energy consumption, computational cost and full connectivity) are analytically derived and tested with other algorithms including DIR, MFR, RRDLA, Dijkstra and Ahn-Ramakrishna [94]. To minimize communication and computation overhead in WSN, 3-factor user authentication based on Elliptic curve cryptography has proposed [95]. These factors are password, smart card and biometric. The BAN method is used for both user and device authentication. Another scheme is which authors have implemented SHA-3 in hardware for WBSN [96]. The Random-access memory, logic gates and finite state machines are combined in establishing the structure of SHA-3. FPGA is used for implementation and checking the effectiveness of the SHA-3 for WBSN. To minimize the transmission delay and resistance to all known security attacks with efficient energy management, security disjoint routing-based verified message (SDRVM) [97] is proposed. Two sets are created for data are; data CDS and message CDS. Depends upon the remaining energy of a node, data packets are retransmitted for effective data delivery. Data packets are marked with ID information and these ID are used by nodes for logging. These ID are updated probabilistically when data is received with same IDs. Depends on energy, if remaining energy is minimizing, the marking probability will be decreased. And if remaining energy is greater, then marking probability is increasing [98], [99].
We tested CADS with 100, 150, 300 nodes. These may be applying in any case either for scattered or congested network. The out-come (Probability density function) may be vary in other scenarios. On the other hand, network experiences extra overhead in arranging all nodes unison because of different transition states of nodes. Although, energy consumption decreases in CADS, but due to changing states, extra overhead generates which also effects network efficiency. We have experimented CADS with Live nodes in the form of network life-time NLT (SPN, FSND, ISN, LSND), nodes states at different energy levels at different time slots and number CH selection. CADS can be tested for delay, latency and throughput in the form of C Messages and L Messages . These factors can affect the performance because overall traffic decreases but C Message creates extra overhead and it can affect the normal procedures of CADS.
The authenticity of presented results is verified by comparing them with the benchmark published results. We created a table and mentioned published results with presented results and also calculated the difference. The experiments comprise of 100, 150 and 300 nodes and with three parameters i.e. Stability Period, Instability period and Last node died. We calculated these parameters for HACH, UASNs, BSSR, ESSM and compared CADS with the average of all these values as shown in TABLE 9.
The presented and published results show variance in the difference of both values. It means, in some cases proposed CADS performs close to other scheme whereas in other scenario, CADS performed diverse values. Presented results validate published results in some cases but not in all cases. There is no correlation between all difference values of proposed CADS and other benchmark schemes. Proposed CADS validates presented results by implementing node operations in simulation and with closed environment in Lab. In simulations, complete network is testified with extreme values while in Lab, we have only ten sensors and a limited For reliability, in the proposed CADS solution, the network is simulated in real time scenario. All reliability measures have been checked, For instance, established connected links, operating environment, broadcast and multicast communications, optimum state transitions (FIGURE 10) and reclustering (FIGURE 11). Furthermore, for stability, CADS is found to be more consistent in configuring node states by transmitting control massages. These messages dynamically manage network structure and maintain a stable network topology. Experiments proved that CADS is comparatively more stable as shown in FIGURE 9 and TABLE 9 which shows the stability and instability period. The figure also shows that CADS is scalable where it performs better by increasing the number of nodes in network.

VI. CONCLUSION AND FUTURE WORK
Wireless Sensor Networks (WSNs) have numerous applications ranging from civil to military domains. They are usually deployed in inaccessible and hostile environment where normal data collection is impossible. Since WSNs are highly resource constrained therefore, efficient resource management is always desired. From the overall management perspective, for better power management, in this paper we have proposed a novel scheme ''Content-based Adaptive and Dynamic Scheduling (CADS) using two ways communication model in WSNs''. CADS is used to avoid redundant data values and reduces forwarding of un-necessary data packets. Four states (Active-Live, Sleep-Live, Active-Sleep, Sleep-Sleep) have defined and controlled by using C Messages transmitted by analyzer module of BS. States are derived on different combination of internal components of a node. Different states of a node are different energy levels and each state consumed a specific amount energy. C Messages in backward direction plays important role in changing these states either to aggregate or to avoid redundant data. CADS has implemented at component level for prolonging the life-time of WSNs and save precious energy at node level. CADS has experimented in both scattered and congested networks and the obtained results have proved that it performs better in both cases compared to other state-of-the-art schemes. Simulation results demonstrates that it increased energy-efficiency in terms of network life-time by 9.65% in 100 nodes-network, 11.36% in 150 nodes-network and 0.94% in 300 nodes. On the other hand, CADS has longer stability in terms of increasing cluster life by 87.5% in 100 node-network, 94.73% in 150 nodes-network and 53.9% in 300 nodes-network.
Although, CADS has implemented in four state model and a smart analyzer module in BS. In future, we are trying to implement CADS in deferent scenario and want to check its behavior in different mobility models, effect of pattern matching and frequency distribution, error analysis of different circumstances parameters and effect of security mechanism. It can be interesting by merging the main idea with authentication schemes like RAPM, LPPMA, 3-Factor authentication. The ESPDA is very near approach and the data gathering method can be implemented on CH in CADS. For secure path establishing between SNs and CH, between CH and BS we can merge Relay Selection Joint Consecutive Packet Routing and Adaptive Data and Verified Message Disjoint Security Routing. Energy-efficiency can be increased by combining the current scheme with other factors including energy and time. The performance may be different if CADS is tested in those scenarios where nodes/CH are mobile.
As per the circumstances parameters are concerned, our short time experiments having very little or negligible effect. However, it will be interesting to see that how in open real scenario, the performance is influenced by these parameters. We are committed to undertake this task in the future. Moreover, we also intend to formally verify and validate the proposed scheme using validation and verification tools such as Petri net. Furthermore, a mathematical and statistical analysis will also be carried out. Additionally, we intend to test the proposed scheme in a real time testbed scenario and then compare all the obtained results to find the authenticity of the results and behavior of the proposed scheme.

APPENDIX A
CADS has been implemented in MTALB with various topological structures both in a scattered and congested networks. Moreover, various matrices are used to evaluate the performance of CADS. The Figure, given below, shows the implementation of the CADS algorithm with the First-Order Radio Model with a class diagram. Main classes and flow of control has been shown. There are main sensing class with a method (sensing), Analyzer class with a method of check contents with three parameters (L1, L2, L3), ControlMessage class with a method and parameters Active-Live, Sleep-live, Active-Sleep and Sleep-Sleep. There is another class CH which is used for selection of CH with a method of selectCH. The main sensor Node class is abstract class and four child classes have been derived from it. These four classes are the states of that a node can acquire during sensing. Each of the derived classes has their own implementation each with three parameters.

APPENDIX B
All schemes are changing states based on some criteria in passive and proactive manner. In the following table, all those schemes have been argued with merits and demerits. The table also mentions how different parameters play vital role in changing states. Here type of control messages and strategy of transmission of control message are also stated.