Energy and Delay Aware Data Aggregation in Routing Protocol for Internet of Things

Energy conservation is one of the most critical problems in Internet of Things (IoT). It can be achieved in several ways, one of which is to select the optimal route for data transfer. IPv6 Routing Protocol for Low Power and Lossy Networks (RPL) is a standardized routing protocol for IoT. The RPL changes its path frequently while transmitting the data from source to the destination, due to high data traffic in dense networks. Hence, it creates data traffic across the nodes in the networks. To solve this issue, we propose Energy and Delay Aware Data aggregation in Routing Protocol (EDADA-RPL) for IoT. It has two processes, namely parent selection and data aggregation. The process of parent selection uses routing metric residual energy (RER) to choose the best possible parent for data transmission. The data aggregation process uses the compressed sensing (CS) theory in the parent node to combine data packets from the child nodes. Finally, the aggregated data transmits from a downward parent to the sink. The sink node collects all the aggregated data and it performs the reconstruction operation to get the original data of the participant node. The simulation is carried out using the Contiki COOJA simulator. EDADA-RPL’s performance is compared to RPL and LA-RPL. The EDADA-RPL offers good performance in terms of network lifetime, delay, and packet delivery ratio.


Introduction
IoT is an emerging technology in Information and Technology (IT) [1]. It is a collection of internet-connected embedded devices that are capable of sensing and transmitting data from one location to another location without human support [2]. The name IoT indicates that things are connected tothe internet via communication technologies such as wireless sensor networks, near field communication, radio frequency identification, and Bluetooth [3]. IoT provides a lot of potential benefits in all aspects of human life [4]. IoT applications include smart homes, industrial Internet, smart supply chains, smart cities, wearables, smart grids, connected health, connected cars, smart farming, smart retail, etc. [5].
LLN is a type of IoT network which consists of routers and nodes restricted by resources [6]. The Routing Protocol for Low Power and Lossy Networks (RPL) has been standardized by IETF [7].

•
The EDADA-RPL's primary goal is to prevent redundant data transmission from the source to the root of DODAG.

•
The CS theory-based data aggregation avoids redundant data transmission and prolongs the network lifetime.

•
The efficiency of EDADA -RPL is assessed using COOJA simulator.
The paper is organized in the following way: the related work is described in Section 2. The network model is represented in Section 3. Section 4 discusses the CS theory. Section 5 represents the Energy and Delay Aware Data Aggregation in RPL. Section 6 discusses the results and discussion. Section 7 is the conclusion of the paper.

Related Works
In this section, we discuss energy-aware data aggregation techniques in RPL to increase the packet delivery ratio, decrease the delay, and improve the lifetime of the network in IoT.
Mohammad Hossein Homaei et al. [20] proposed an enhanced data aggregation method for IoT. It proposed a distributed method to balance the child node and reduce the congestion among the nodes in the network. Also, a learning automata-based dynamic data aggregation technique is proposed to aggregate the data in RPL (LA-RPL). Each node has a learning automaton to perform the data aggregation and transmission from one node to another node. The simulation has been done using a Contiki Cooja simulator. The LA-RPL's performance is compared to RPL, BD-RPL, m-RPL, and A-RPL. However, LA-RPL causes congestion, as it doesn't consider the trickle timer.
Ainaz Bahramlou and Reza Javidan [21] proposed a data aggregation based RPL (A-RPL) protocol for IoT. In IoT, the routing protocol changes its path frequently due to its resource-constrained nature. It proposed a dynamic method to reconstruct the DODAG quickly, which finds a suitable objective function among the number of objective functions. In this dynamic method, the sink node collects the aggregated data from the downstream nodes. A-RPL selects the parent node based on the environmental changes and control overhead in the network. The performance of A-RPL is compared with RPL and A-RPL. A-RPL provides substantial packet delivery consistency and increases the lifespan of the network. However, it causes congestion in a particular situation, as it does not consider the dynamic trickle timer.
Mauro Conti et al. [22] proposed a reliable group communication protocol (RECOUP) for IoT. RPL is a network routing protocol for IoT. However, it lacks reliability, scalability, and security. So, it proposed a reliable group communication (RECOUP) protocol, which performs cluster-based multicast routing. The performance of RECOUP improves the packet delivery ratio by 25% and decrease the delay by 100 ms. Thus, it extends the network lifetime. However, it takes more energy consumption, as it checks each data packet in each node.
YichaoJin et al. [23] proposed content-centric routing in RPL (CCR-RPL) for IoT. Nowadays, IoT can be used in various applications. However, the routing protocol faces difficulty while collecting the data present in the dense network. To avoid this issue, it proposed a content-centric routing protocol for IoT. It identifies the content via the routing path. Then, the data aggregation process is carried out in the intermediate node from the source to the destination. The simulation has been conducted in COOJA and TelosB. The performance of CCR-RPL is compared to RPL. The CCR-RPL achieves better performance in terms of latency, energy efficiency, and reliability in both the scenarios. However, it creates congestion due to dynamic network conditions. Ming Zhao et al. [24] suggested a parent cluster RPL (C-RPL) for IoT. C-RPL uses the opportunistic forwarding scheme for synchronization and selects the optimal parent cluster set to reduce the latency between source and destination. While transferring the data, the priority-based scheduling scheme is incorporated in RPL. The simulation has been conducted in NS3. C-RPL performance is compared to RPL and ORPL performance. It achieves not able performance by means of reliability and by avoiding the packet retransmission. However, C-RPL packet loss occurs, as it takes more time to select the cluster parent.
Madan Mohan Agarwal et al. [25] proposed a fuzzy-based data fusion technique for IoT (FLWP). FLWP is proposed to maximize the lifespan of the network. The operations of FLWP is as follows: first, it performs data fusion using fuzzy logic. Later, it predicts the optimal route based on the data fusion value. The performance of FLWP is compared with the AODV routing protocol. It provides superior performance to the AODV protocol. However, it takes a longer time to predict the parent node.
Marc Barcode et al. [26] proposed cooperative interaction in multiple RPL. It proposed cooperative RPL (C-RPL), which creates multiple instances based on the cooperative strategy. The simulation has been conducted in the Contiki Cooja simulator. The C-RPL provides better performance by means of energy consumption and the cost of the nodes in the networks. However, it takes additional time to choose the parent node present in the multiple DODAG.
S. Sankar and P. Srinivasan [27] proposed a fuzzy set based cluster routing (FC-RPL) protocol for IoT. The FC-RPL consists of three phases, namely cluster formation, CH selection, and CH parent selection. The cluster is formed from the Euclidean distance. The CH selection is performed by considering the fuzzy logic over the routing metrics residual energy, centrality, and nearest neighbor node. The CH parent node is selected from the CH parent rank. The simulation has been conducted using the Contiki COOJA simulator. The performance of FC-RPL is compared to RPL. The proposed FC-RPL extends the network lifetime. However, it forms an excess number of clusters in the network.
Yaarob Al-Nidavi et al. [28] proposed a cluster-based routing (MUCBR-RPL) protocol for LLN. The MUCBR protocol divides the entire network into multiple clusters. In each cluster, the MUCBR selects the cluster head based on the residual energy. The CH node collects the data packets from cluster members and performs the data aggregation. Finally, the aggregated data is forwarded to the Sink node. The simulation has been conducted using the COOJA simulator. The performance of MUCBR-RPL provides better performance in terms of network lifetime and reliability. However, initially, it takes time to form the cluster. The literature review of Data aggregation on routing protocols is given in Table 1.

Network Model
The IoT network consists of 'N' number of nodes and one DODAG root. The nodes are randomly deployed in the network. The EDADA-RPL follows the tree-based approach. The sensor node generates the data and transmits it to the parent node. Each parent node collects the data packets and performs the data aggregation using compressed sensing (CS) theory [29]. Likewise, the data aggregation operation performs from a downward parent to the root of the DODAG. Finally, the DODAG root obtains the compressed data and it performs the data recovery using the matching pursuit algorithm. Figure 1 shows the network model of EDADA-RPL.
The Figure 2 shows the data collection and aggregation process using CS theory. In this, the path1 contains the subset of nodes in the DODAG, which are represented the data aggregation process. The parent node (PN) generates the aggregated data d i multiplied by the random weight value r i . In each level in DODAG, the current parent node (PN) obtains the aggregated data in their child nodes along with downward parent transmitted data PN k = k i=1 r 1i × d i . The detailed discussions of the data aggregation process are given in Section 5. The Figure 2 shows the data collection and aggregation process using CS theory. In this, the path1 contains the subset of nodes in the DODAG, which are represented the data aggregation process. The parent node (PN) generates the aggregated data multiplied by the random weight value .In each level in DODAG, the current parent node (PN) obtains the aggregated data in their child nodes along with downward parent transmitted data = ∑ 1 ×

=1
. The detailed discussions of the data aggregation process are given in Section 5. Nodes are deployed randomly on the network. ii.
All nodes are having the same energy. iii.
The rate of data transfer is one packet a minute.

Data Aggregation
Data aggregation is an essential process in wireless routing for collecting the data from various sources in the network [15]. It aggregates the sensor's data, which removes the data redundancy and  The Figure 2 shows the data collection and aggregation process using CS theory. In this, the path1 contains the subset of nodes in the DODAG, which are represented the data aggregation process. The parent node (PN) generates the aggregated data multiplied by the random weight value .In each level in DODAG, the current parent node (PN) obtains the aggregated data in their child nodes along with downward parent transmitted data . The detailed discussions of the data aggregation process are given in Section 5. Nodes are deployed randomly on the network. ii.
All nodes are having the same energy. iii.
The rate of data transfer is one packet a minute.

Data Aggregation
Data aggregation is an essential process in wireless routing for collecting the data from various sources in the network [15]. It aggregates the sensor's data, which removes the data redundancy and Nodes are deployed randomly on the network. ii.
All nodes are having the same energy. iii.
The rate of data transfer is one packet a minute.

Data Aggregation
Data aggregation is an essential process in wireless routing for collecting the data from various sources in the network [15]. It aggregates the sensor's data, which removes the data redundancy and reduces the number of data transmissions. Thus, it saves the energy on the network nodes in IoT. Data fusion clubs the sensor's data and removes the noise from various sources. Finally, it generates accurate data for data transmission. The data aggregation process is shown in Figure 3. reduces the number of data transmissions. Thus, it saves the energy on the network nodes in IoT. Data fusion clubs the sensor's data and removes the noise from various sources. Finally, it generates accurate data for data transmission. The data aggregation process is shown in Figure 3.

Compressed Sensing Theory
A sensor data or signal can be converted from lower dimensional space to higher-dimensional space is called sparse. Generally, the data is converted into a sparse matrix. Later, it converts the sparse matrix into the observation matrix. Finally, the data recoveries will perform from the observation matrix [30]. Figure 4 shows the overall process of the compressed sensing theory. .

Compressed Sensing Theory
A sensor data or signal can be converted from lower dimensional space to higher-dimensional space is called sparse. Generally, the data is converted into a sparse matrix. Later, it converts the sparse matrix into the observation matrix. Finally, the data recoveries will perform from the observation matrix [30]. Figure 4 shows the overall process of the compressed sensing theory.
reduces the number of data transmissions. Thus, it saves the energy on the network nodes in IoT. Data fusion clubs the sensor's data and removes the noise from various sources. Finally, it generates accurate data for data transmission. The data aggregation process is shown in Figure 3.

Compressed Sensing Theory
A sensor data or signal can be converted from lower dimensional space to higher-dimensional space is called sparse. Generally, the data is converted into a sparse matrix. Later, it converts the sparse matrix into the observation matrix. Finally, the data recoveries will perform from the observation matrix [30]. Figure 4 shows the overall process of the compressed sensing theory. .

Sensor Data
In IoT, the nodes are deployed randomly in the network. Each sensor nodes generate the data N

Sparse Matrix Representation
A sparse matrix is matrix representation which contains the sensor data d of the network nodes N. It is an orthogonal domain representation [31]. The data aggregation operation performs a regular interval, 't'. The sparse matrix at parent node 's' representation is given in Equation (1).
where r i,t = { r 1,t , r 2,t , . . . r i,t , r i,t is a random number and d i,t is a sensor data of respective time interval.

Observation Matrix Representation
The DODAG root collects the aggregated data from each path i = 1,2, . . . ,M. The DODAG root collects data in path 1, represented in Equation (2).
Similarly, the DODAG root collects the aggregated data from the M paths, represented in Equation (3).
where y i indicates the aggregated data in a particular path and y indicates the aggregated data from the M paths.

Data Recovery
The data can be recovered through solving the combinatorial problem, represented in Equation (4).

Energy and Delay Aware Data Aggregation in RPL
The Proposed Energy and Delay Aware Data aggregation in RPL (EDADA-RPL) has two processes, namely parent selection and data aggregation. The process of parent selection uses routing metric residual energy (RER) to choose the best possible parent for data transmission. The data aggregation process uses the compressed sensing (CS) theory in the parental node to combine data packets from the child nodes. Finally, the aggregated data transmits from a downward parent to the DODAG root or sink. The DODAG root gathers aggregated data and conducts the reconciliation process to recover the original data.

Parent Selection
In EDADA-RPL, the DODAG root node broadcasts the DODAG Information Object (DIO) to the neighbor nodes in the network. The DODAG Advertisement Object (DAO) message is sent to the parent or DODAG root by the participant node. The DODAG root or parent node sends the signal of the DODAG Advertisement Object-Acknowledgement (DAO-ACK) to the child node within the trickle interval. The participant node chooses the parent node depended on the DODAG node-level routing remaining metric energy (RER).
Residual energy shows the present energy available in the RPL routers. The RER measures the difference between the original energy and the energy currently consumed by the node [32]. The formula for calculating the remaining energy is provided in Equation (5).

Parent Rank Calculation
Rank indicates the root of the DODAG, how far from the node of the participant. The node 'x' rank computes from the parent node(x) rank and its value, Rank_Increase_Value. The value of Rank Increase calculates the value of residual energy and the value of MinHop_RankIncrease. The MinHop_RankIncrease value is 256, which is the default value in the rank calculation [33,34]. The calculation of the rank is shown in Equations (6) and (7).

Data Aggregation in Parent Node Using CS Theory
In the data aggregation process, the sensor nodes transmit the data d = {d1, d2 . . . dn} T to the parent node. The parent node PN 1 performs the data collection and aggregation operation and it transmits the aggregated data packets to the DODAG root [35]. Each parent node gets the weighted sum of the random number multiply by the sensor data 'd', called a sparse matrix. In path 1, the node PN 1 generates the values are r 11 × d 1 , given in Equation (8).
where r 11 indicates the random values of parent node 1 (PN 1 ) and d 1 indicates the aggregated data of PN 1 . First, the parent node PN 1 sends the aggregated data r 11 × d 1 to PN 2 . Second, the parent node PN 2 collects the data from PN 1 and also it collects and aggregates the data from its child nodes. The mathematical representation is given in Equation (9). where r 11 × d 1 indicates the aggregated data in PN 1 and r 12 × d 2 indicates the aggregated data in PN 2 . Third, the parent node PN 2 sends the aggregated data to node PN 3 . The node PN 3 performs the data aggregation operation, given in Equation (10).
where k indicates the number of parent nodes in each path, r 1i indicates random number of each parent node in path 1.
In path 1, the parent nodes transmit the data from PN 1 to DODAG root. The DODAG root collects the aggregated data in path 1 is called the observation matrix and it is given in Equation (11).
where y 1 indicates the DODAG root collects the aggregated data in path 1.
Similarly, the DODAG root collects the aggregated data from M paths and the DODAG root receives the data packets y i , where i = 1,2, . . . ,M. So, we can represent the data aggregation process mathematically, given in Equation (12).
Finally, we can reconstruct the weighted sum of aggregated data from the M path to N node's original data using CS theory. Thus, we can reduce the number of data transmission (M<N) in the network.

Data Reconstruction Using Matching Pursuit Algorithm
Data reconstruction is a recovery technique, which is used to recover the compressed data over the network nodes. The DODAG root receives the compressed data in the form of observation matrix from M paths. Also, the DODAG root recovers the sparse matrix accurately using matching pursuit algorithm. Finally, the DODAG root rebuilds the compressed data and it matches with original data [36].
In matching pursuit algorithm, the EDADA-RPL recovers the data d from the input y = r × d. The residual error (r error ) is initialized as y. The sparse matrix in each parent node PN is generated and it is given in Equation (13) PN = d i−1 + r T × r error (13) where r T indicates the random number in each parent node (PN). The data recovery process will be continued until both original and recovered data are the same. The pseudo-code of the matching pursuit algorithm is given in Algorithm 3. We perform the reconstruction at the DODAG root and receive the original data d of N nodes. Finally, we compute the mean square error and its value is very low. So, it proves that EDADA-RPL provides less data loss when compared to other routing protocols.

Result and Discussions
In our simulation, all the nodes have equal energy, which is deployed randomly in the network. The network contains 120 RPL routers and one DODAG root. The data transfer interval is 60 s. We have taken the sky mote for our simulations [37]. The simulation has been conducted in the COOJA simulator [38]. The data transfer rate is one packet per minute. All results presented in the figures below are averaged over 10 simulation runs and error bars show the 95% confidence intervals. The simulation parameters are given in the Table 2.

Performance Evaluation Metrics
The performance of proposed EDADA-RPL is compared with the familiar existing protocols RPL and LA-RPL.
Packet delivery ratio: the proportion of data packets received successfully to the total sent. Delay: time taken for transmitting the data from source to DODAG root. Energy consumption: the number of miliwatts spent on transmitting data packets in the network from source to DODAG root.
Packet overhead: the amount of control packets generated in the transmission of data packets. Figure 5 shows the average end-to-end delay between the participant and the root of DODAG for a number of hops. In general, the LLN network takes more time to transfer the data, due to its resource-constrained nature. The effective routing mechanism tackles these issues and increases the network performances. However, the end to end delay is one factor to deliver the sensor information on time to the sink time. It is noted that EDADA-RPL, LA-RPL, and RPL delays are 3.5 s, 3.9 s, and 4.2 s respectively, when the hop count number is 10. It is also observed that the delay increases as the number of hop count increases. It is due to a reduction in path breakage and the amount of redundant data transmission.

Performance Evaluation Metrics
The performance of proposed EDADA-RPL is compared with the familiar existing protocols RPL and LA-RPL.
Packet delivery ratio: the proportion of data packets received successfully to the total sent. Delay: time taken for transmitting the data from source to DODAG root. Energy consumption: the number of miliwatts spent on transmitting data packets in the network from source to DODAG root.
Packet overhead: the amount of control packets generated in the transmission of data packets. Figure 5 shows the average end-to-end delay between the participant and the root of DODAG for a number of hops. In general, the LLN network takes more time to transfer the data, due to its resource-constrained nature. The effective routing mechanism tackles these issues and increases the network performances. However, the end to end delay is one factor to deliver the sensor information on time to the sink time. It is noted that EDADA-RPL, LA-RPL, and RPL delays are 3.5 sec, 3.9 sec, and 4.2 sec respectively, when the hop count number is 10. It is also observed that the delay increases as the number of hop count increases. It is due to a reduction in path breakage and the amount of redundant data transmission.  If the network has fewer parent changes during the simulation, it can have more stability and also the chance of packet losses is very low. The parent change values of EDADA-RPL, LA-RPL, and RPL for a 1-h simulation are 0.07, 0.10, and 0.20, respectively. The proposed protocol is introduced the compressed sensing theory to aggregate the data from its child node. It is a hybrid aggregation technique, which reduces the data losses from the source to the destination. Thus, it reduces the number of redundant data transmission and path breakages. So, it maintains route stability during the data transmission. stability and also the chance of packet losses is very low. The parent change values of EDADA-RPL, LA-RPL, and RPL for a 1-hour simulation are 0.07, 0.10, and 0.20, respectively. The proposed protocol is introduced the compressed sensing theory to aggregate the data from its child node. It is a hybrid aggregation technique, which reduces the data losses from the source to the destination. Thus, it reduces the number of redundant data transmission and path breakages. So, it maintains route stability during the data transmission.  Figure 7 depicts the number of hop count for the network size. In a dense network, the number of hops between the sources to the destination is very high. The reason is that the numbers of nodes are deployed randomly in a small network area. The simulation experiment is conducted and the results are noted for the performance analysis. The hop counts of RPL, LA-RPL and EDADA-RPL are 8, 7, and 5 respectively, for the network size of 120. It is also found that the size of the network is increasing; the number of hop counts also increases. In EDADA-RPL, the number of hop count decreases, as it performs the data aggregation during the data transmission. Thus, it reduces the number of hop count and provides route stability among the nodes in the network.   Figure 7 depicts the number of hop count for the network size. In a dense network, the number of hops between the sources to the destination is very high. The reason is that the numbers of nodes are deployed randomly in a small network area. The simulation experiment is conducted and the results are noted for the performance analysis. The hop counts of RPL, LA-RPL and EDADA-RPL are 8, 7, and 5 respectively, for the network size of 120. It is also found that the size of the network is increasing; the number of hop counts also increases. In EDADA-RPL, the number of hop count decreases, as it performs the data aggregation during the data transmission. Thus, it reduces the number of hop count and provides route stability among the nodes in the network. network stability. If the network has fewer parent changes during the simulation, it can have more stability and also the chance of packet losses is very low. The parent change values of EDADA-RPL, LA-RPL, and RPL for a 1-hour simulation are 0.07, 0.10, and 0.20, respectively. The proposed protocol is introduced the compressed sensing theory to aggregate the data from its child node. It is a hybrid aggregation technique, which reduces the data losses from the source to the destination. Thus, it reduces the number of redundant data transmission and path breakages. So, it maintains route stability during the data transmission.  Figure 7 depicts the number of hop count for the network size. In a dense network, the number of hops between the sources to the destination is very high. The reason is that the numbers of nodes are deployed randomly in a small network area. The simulation experiment is conducted and the results are noted for the performance analysis. The hop counts of RPL, LA-RPL and EDADA-RPL are 8, 7, and 5 respectively, for the network size of 120. It is also found that the size of the network is increasing; the number of hop counts also increases. In EDADA-RPL, the number of hop count decreases, as it performs the data aggregation during the data transmission. Thus, it reduces the number of hop count and provides route stability among the nodes in the network.   Figure 8 depicts the packet loss ratio for the failed node scenario. It is noted that RPL, LA-RPL and EDADA-RPL's packet loss ratiosare 25%, 18%, and 12%, respectively, while the node size failed is 50. It is also found that, as the number of failed node size decreases, the packet loss increases.It is due to the lack of neighbor nodes, coverage issues, and difficultyin finding alternate nodes. Nevertheless, the EDADA-RPL identifies an alternative node to immediately transfer data to the DODAG root.

Packet Loss Ratio with Presence of Failed Node Scenario
and EDADA-RPL's packet loss ratiosare 25 %, 18 %, and 12 %, respectively, while the node size failed is 50.It is also found that, as the number of failed node size decreases, the packet loss increases.It is due to the lack of neighbor nodes, coverage issues, and difficultyin finding alternate nodes. Nevertheless, the EDADA-RPL identifies an alternative node to immediately transfer data to the DODAG root.  Figure 9 depicts the actual data for the reconstructed sensor data. It is observed that the actual sensor data and reconstructed sensor data in EDADA-RPL is almost similar when compared to both the values. It is noted that the sensor IDs are represented from 1 to 120. Here, the sensor readings are nearly 30. The sensor values are varying, due to various reasons such as noise, the distance between the source and the destination, etc. So, the sensor values are falling up and down, but it maintains the consistency value by using compressed sensing theory. Hence, the EDADA-RPL recovers the original data from the source node without any losses.   Figure 9 depicts the actual data for the reconstructed sensor data. It is observed that the actual sensor data and reconstructed sensor data in EDADA-RPL is almost similar when compared to both the values. It is noted that the sensor IDs are represented from 1 to 120. Here, the sensor readings are nearly 30. The sensor values are varying, due to various reasons such as noise, the distance between the source and the destination, etc. So, the sensor values are falling up and down, but it maintains the consistency value by using compressed sensing theory. Hence, the EDADA-RPL recovers the original data from the source node without any losses.

Actual and Reconstructed Sensor Data
failed is 50.It is also found that, as the number of failed node size decreases, the packet loss increases.It is due to the lack of neighbor nodes, coverage issues, and difficultyin finding alternate nodes. Nevertheless, the EDADA-RPL identifies an alternative node to immediately transfer data to the DODAG root.  Figure 9 depicts the actual data for the reconstructed sensor data. It is observed that the actual sensor data and reconstructed sensor data in EDADA-RPL is almost similar when compared to both the values. It is noted that the sensor IDs are represented from 1 to 120. Here, the sensor readings are nearly 30. The sensor values are varying, due to various reasons such as noise, the distance between the source and the destination, etc. So, the sensor values are falling up and down, but it maintains the consistency value by using compressed sensing theory. Hence, the EDADA-RPL recovers the original data from the source node without any losses.  6.2.6. Node Energy Consumption Figure 10 illustrates the amount of node energy consumption in the network. Energy is a scarce resource in IoT, as it contains the resource-constrained devices. It is noted that the energy consumption of RPL, LA-RPL, and EDADA-RPL are 7 mW, 6 mW, and 5.5 mW, respectively, for a network size of 120. The proposed EDADA-RPL reduces the energy consumption by 1.5 mW. It is also found that the node energy consumption increases, as the number of nodes in the network increases. It is due to the number of nodes required to sense, listen, accumulate, and transmit the data from one node to another. Thus, it increases the energy consumption among the nodes in the networks. However, the EDADA-RPL consumes less energy when compared to RPL and LA-RPL. The reason is that it reduces the number of redundant data in the network from one node to another. Figure 10 illustrates the amount of node energy consumption in the network. Energy is a scarce resource in IoT, as it contains the resource-constrained devices. It is noted that the energy consumption of RPL, LA-RPL, and EDADA-RPL are 7 mW, 6 mW, and 5.5 mW, respectively, for a network size of 120. The proposed EDADA-RPL reduces the energy consumption by 1.5 mW. It is also found that the node energy consumption increases, as the number of nodes in the network increases. It is due to the number of nodes required to sense, listen, accumulate, and transmit the data from one node to another. Thus, it increases the energy consumption among the nodes in the networks. However, the EDADA-RPL consumes less energy when compared to RPL and LA-RPL. The reason is that it reduces the number of redundant data in the network from one node to another.   6.2.7. Reconstruction MSE Value Figure 11 depicts the reconstruction of Mean Square Error (MSE) value for the number of observations. It is noted that reconstruction MSE of LA-RPL and EDADA-RPL are 0.02 and 0.01 respectively for the 120th iterations. In that, the RPL always the MSE values are 0 because there is no compression process during the data transmission. Reconstruction of the MSE value has been observed to decrease as the number of observations increases.It is due to the variation in node energy and data traffic between the nodes of the network.
consumption of RPL, LA-RPL, and EDADA-RPL are 7 mW, 6 mW, and 5.5 mW, respectively, for a network size of 120. The proposed EDADA-RPL reduces the energy consumption by 1.5 mW. It is also found that the node energy consumption increases, as the number of nodes in the network increases. It is due to the number of nodes required to sense, listen, accumulate, and transmit the data from one node to another. Thus, it increases the energy consumption among the nodes in the networks. However, the EDADA-RPL consumes less energy when compared to RPL and LA-RPL. The reason is that it reduces the number of redundant data in the network from one node to another.  Figure 11 depicts the reconstruction of Mean Square Error (MSE) value for the number of observations. It is noted that reconstruction MSE of LA-RPL and EDADA-RPL are 0.02 and 0.01 respectively for the 120th iterations. In that, the RPL always the MSE values are 0 because there is no compression process during the data transmission. Reconstruction of the MSE value has been observed to decrease as the number of observations increases.It is due to the variation in node energy and data traffic between the nodes of the network.  6.2.8. Packet Loss Ratio Figure 12 depicts the packet loss ratio with respect to the network size. In our simulation, we observed that packet loss ration increases dramatically, while increasing the network size. It is noted that the RPL, LA-RPL, and EDADA-RPL packet loss ratios are 12%, 8%, and 6% respectively, for a network size of 120. It confirms that the data packet loss is also found to increase, as the network size increases. It is due to the lack of neighbor nodes, coverage issues and difficult to find alternate nodes. However, EDADA-RPL finds an alternate node to transfer the data quickly to the DODAG root.
observed that packet loss ration increases dramatically, while increasing the network size. It is noted that the RPL, LA-RPL, and EDADA-RPL packet loss ratios are 12%, 8%, and 6% respectively, for a network size of 120. It confirms that the data packet loss is also found to increase, as the network size increases. It is due to the lack of neighbor nodes, coverage issues and difficult to find alternate nodes. However, EDADA-RPL finds an alternate node to transfer the data quickly to the DODAG root.

Conclusion and Future works
Energy conservation is important role in Internet of Things (IoT). Therefore, routing plays an essential role in IoT. We proposed Energy and Delay Aware Data aggregation in Routing Protocol (EDADA-RPL) for IoT. It has two processes, namely parent selection and data aggregation. The parent selection process uses the routing metric residual energy (RER) to select the optimal parent for data transfer. The data aggregation process uses the compressed sensing (CS) theory in the parent node to combine data packets from the child nodes. Then, the aggregated data is transmitted to the DODAG root from the downward parent. The DODAG root node collects all the aggregated data and performs the reconstruction operation to get original data. The performance of EDADA-RPL is compared with RPL and LA-RPL. The EDADA-RPL decreases the delay and packet loss ratio by 8-15 seconds and 6-10%, respectively.
In our future work, we plan to deploy sky motes in a real-time environment and toanalyse EDADA-RPL efficiency in various scenarios.

Conclusions and Future Works
Energy conservation is important role in Internet of Things (IoT). Therefore, routing plays an essential role in IoT. We proposed Energy and Delay Aware Data aggregation in Routing Protocol (EDADA-RPL) for IoT. It has two processes, namely parent selection and data aggregation. The parent selection process uses the routing metric residual energy (RER) to select the optimal parent for data transfer. The data aggregation process uses the compressed sensing (CS) theory in the parent node to combine data packets from the child nodes. Then, the aggregated data is transmitted to the DODAG root from the downward parent. The DODAG root node collects all the aggregated data and performs the reconstruction operation to get original data. The performance of EDADA-RPL is compared with RPL and LA-RPL. The EDADA-RPL decreases the delay and packet loss ratio by 8-15 s and 6-10%, respectively.
In our future work, we plan to deploy sky motes in a real-time environment and toanalyse EDADA-RPL efficiency in various scenarios.