Analysis Resource Aware Framework by Combining Sunspot and Imote2 Platform Wireless Sensor Networks Using Distance Vector Algorithm

Efficiency energy and stream data mining on Wireless Sensor Networks (WSNs) are a very interesting issue to be discussed. Routing protocols technology and resource-aware can be done to improve energy efficiency. In this paper we try to merge routing protocol technology using routing Distance Vector and Resource-Aware (RA) framework on heterogeneity wireless sensor networks by combining sun-SPOT and Imote2 platform wireless sensor networks. RA perform resource monitoring process of the battery, memory and CPU load more optimally and efficiently. The process uses Light-Weight Clustering (LWC) and Light Weight Frequent Item (LWF). The results obtained that by adapting Resource-Aware in wireless sensor networks, the lifetime of wireless sensor improve up to Â± 16.62%. Efisiensi energi dan stream data mining pada Wireless Sensor Networks (WSN) adalah masalah yang sangat menarik untuk dibahas. Teknologi Routing Protocol dan Resource-Aware dapat dilakukan untuk meningkatkan efisiensi energi. Dalam penelitian ini peneliti mencoba untuk menggabungkan teknologi Routing Protocol menggunakan routing Distance Vector dan Resource-Aware (RA) framework pada Wireless Sensor Networks heterogen dengan menggabungkan sun-SPOT dan platform Imote2 Wireless Sensor Networks. RA melakukan proses pemantauan sumber daya dari memori, baterai, dan beban CPU lebih optimal dan efisien. Proses ini menggunakan Light-Weight Clustering (LWC) dan Light Weight Frequent Item (LWF). Hasil yang diperoleh bahwa dengan mengadaptasi Resource-Aware dalam Wireless Sensor Networks, masa pakai wireless sensor meningkatkan sampai Â± 16,62%.


Introduction 1
Today Wireless Sensor Networks (WSNs) have been inplemented in high speed data streaming online where WSNs system are always required to operate stably. Here, the concept of resource-aware framework on Mining Data Online is a very important part for WSNs. Resource-Aware framework can be applied to This paper is the extended version from paper titled "Analysis Resource Aware Framework Using Distance Vector Algorithm on Heterogeneity Wireless Sensor Networks " that has been published in Proceeding of ICACSIS 2011. many data mining techniques that require continuous monitoring, data aggregation and processing internetworks [1].
Memory, CPU and Battery are part which make the Wireless Sensor Network can be operate continuously for long periods. Gaber introduce a processing data model that is based on data mining techniques that is Granularity Algorithm [2] namely: Light Weight Clustering (LWC), Light Weight Classification (LWClass) and Light Weight Frequent Item (LWF) by utilizing available resources as memory, CPU and battery. The shortest distance to transmit data from sensor nodes to the base station is done by using Distance Vector Algorithm and the amount of energy which is required to transmit a number of data bits is measured according to the distance between sensor nodes and base station. In this paper we will compare the platform of sunSPOT and imote2 wireless sensor networks.
In the next section we shall review about the Distance Vector Routing, energy consumption model, Resource-Aware framework, and platform of sunSPOT and Imote2. In section 3, we will explain the reseach metodology. Their result and analysis are given in Section 4.
In Distance Vector algorithm, each router will periodically inform the topology changes. Distance Vector calculates the best path for each prefix to destination independently; typically try to minimize costs through measures such as number of router hops to the destination [3]. Each intermediate step in the algorithm, the router has the best path to destination prefix and then the router tells the information to all its neighbors, as well as with other routers. The exchange of information enable to find the best route based on the shortest path and low energy consumes, so the router will update its information and tell the router neighbors about the latest track. After going through several iterations, the way of route will be stable with each router which has the best path to the destination. Here, Bellman Ford algorithm is used to find the best path to destination where Bellman-Ford algorithm is a single-source shortest-paths algorithms that can solve a problem to find the shortest which has possibility to calculate negative path [4].
A model of energy consumption is commonly used is known as first radio-order model [5][6][7][8]. Each sensor node will consume some energy for ETX to send l-bit message over distance d, can be written as the following equation: Formula the amount of energy used to receive messages (ERX) can be found using the equation below: The equation for the amount of energy to forward the message (EFX) is:   [9] has found a number of algorithms that can adjust resource availability on the stream data mining algorithm called Granularity Setting (AGS) which shows in figure  2. AGS consists of three algorithms they are input algorithm granularity (AIG), algorithm output granularity (AOG), and algorithm processing granularity (APG). AIG is the algorithm used to transform a data rate, AOG is an algorithm that is used to alter the size of the output with the aim of maintaining a limited memory space, and APG is a process to change the parameter settings Random Factor (RF) on the CPU.
There are three main components of RA framework [10]: Resource Monitoring is a resource that will monitor the level of battery, remaining memory, and CPU utilization; the data mining algorithm processes the data stream in real time; and algorithm granularity settings used for adjust the parameters of mining algorithm based on the availability of resources. Figure 1 shows the resource aware framework [9].
LWC algorithm has two main components namely resource aware component and the LWC algorithm which is shown in figure 3. The first is Resource-Aware components using data adaptation techniques to catch the data rate with high-speed data streams and at the same time be able to achieve optimum accuracy in accordance with the availability of resources. The algorithm complexity is expressed by the index O (nm), where n is the data set size, and m is the maximum number of subsequent data points.
Light-Weight Frequent Item (LWF) or called Resource-Aware Frequent Item (RA-Frequent Item) has been simulated by Parenreng [11] using java programming which use Gaber theory [12] as shown in figure 4.

Resource Monitoring
Granularity Setting Algorithm Mining Algorithm  The responsibility of the resource monitor is to monitor remaining battery, memory and CPU utilization periodically, and also to publish resource reports, which outline status of various resource availabilities. There are two ways of updating the resource report, namely: periodic and aperiodic updating schemes. The periodic scheme is the traditional way of updating. It is also the initial scheme used by Gaber and Yu [9] in their research, where the resource monitor notifies the subscribed processing techniques over fixed timeframes. The drawback of this approach is that if the resource levels are stable, many of the updates will be wasted as there is no need to adjust the algorithm settings.
An alternative method is the aperiodic scheme. The aperiodic scheme only notifies subscribed processing techniques when the accumulative change in resource level is greater than a significant threshold. This threshold is submitted to the resource monitor during the DOJRULWKP ¶V VXEVFULSWLRQ )RU H[DPSOH DQ algorithm can request to be notified only if there is more than 10% or 5% change in resource level. This approach can greatly reduce processing. Using either approach, there is only one resource event object that follows the singleton pattern. This is to minimize unnecessary usage of the limited memory of the wireless sensor device.
Both resource-aware clustering and resource-aware frequent items using resource monitors to examine battery charge, free memory and CPU utilization. For the memory, the research uses the available API provided by Sun SPOT and Imote2, to obtain actual memory availability. For the battery and CPU utilization used two simulations to facilitate the manipulation of resource availabilities. This will make it easier to examine the experiment with resource adaptation and accuracy. The battery simulation employs the credit point system used by Younis and Fahmy [12]. By using their approach, each activity of the sensor node is assigned an amount of points, and the maximum battery capacity is defined. During the data stream classification process, the battery level is decreased gradually due to the sensor activities, while for the CPU simulation, used randomly generated service time CPU utilizations. The CPU utilization is computed as the percentage of the total service time of existing tasks in the queue over maximum load. LWC will establish a set of algorithms that is formed clusters based on proximity data. Euclidean Distance (ED) is used to determine the degree of closeness between each of the incoming data stream. The data will be inserted to an existing cluster when the calculation results of ED less than the range of radius threshold (RT). On the other hand, data will be inserted to the new cluster.
The formula to calculate the degree of closeness is shown below [13]: In the LWF algorithm, the proximity of the data is calculate by using the Manhattan Distance with the following formula: Bellman-Ford algorithm is a single-source shortest-paths an algorithm to find the shortest path problem with edge weights can be negative (Cormen, Leiserson, Rivest, & Stein, 2004). For instance, the source node is S, and Bellman-Ford algorithm will look for the shortest path from S to all other nodes which are connected to the base station.

Methodology
Research methodology is done by implement the distance vector routing algorithm on a network WSNs on heterogeneity platform to find the best path for sending data from sensor nodes to a base station which is the process will consider the relationship between the number of bits data transfer and the distance to the amount of energy required.This process will be combined with data mining process using an algorithm LWF and LWC and also involving resource-aware. As a comparison, the researcher also compares a similar analysis without involving resource-aware. In our previous study, the distance factor and the number of bits of data on energy consumption had not computed.

Results and Analysis
In this research, we used Iris data to simulate the process of streaming data. Testing simulation using SunSPOT Wireless Microsystems with battery capacity is 750 mAh and the amount of battery consumption at the wireless operate is ± 80 mA [14] and Imote2 platform with battery capasity is 750 mAh and battery consumption at the wireless operate is is ± 66 mA [14]. Testing environment using a scale of 1:100, so the maximum capacity of the battery is 750×360 = 2.700.000/100 = 27.000 mAs.
Testing LWC and LWF with RA and without RA on sunSPOT. This testing will compare the lifetime of sensor nodes using an algorithm LWF and LWC involving resourceaware and without resource-aware on sunSPOT wireless. The second test of this algorithm, we only take the test on the sunSPOT wireless with the consideration that will be analyzed only in response to the battery, memory and CPU utilization. Figures 3 and 4 shows the lifetime in sensor 7 with LWC algorithm. Figure 5 shows testing     Figure 7 shows that without RA sensor can only survive for 353 seconds, whereas with RA the sensor can with stand up to 390 seconds as shown in figure 8. Table II 9  334  382  338  386  8  350  406  353  390  7  335  420  353  390  6  347  406  338  403  5  345  403  338  403  4  347  419  352  395  3  333  419  338  404  2  335  404  337  394  1  346  420  352  397  0  348  420  353  397 Testing LWC and LWF with RA and without RA on Imote2. This testing will show the lifetime of sensor nodes using an algorithm LWC involving resource-aware and without resourceaware on Imote2 wireless. Figure 9 shows result without RA. Here, sensor stand for 452 seconds while with RA the sensor stand up to 530 seconds as shown in figure 10. In this case, the simulation result of sensor nodes lifetime using LWC algorithm with RA is longer than without RA where the efficiency is 14,71%. Figure 11 shows result without RA sensor can stand for 450 seconds while with RA the sensor stand longer up to 507 seconds as shown in figure 12. In this case, the simulation result of sensor nodes lifetime using LWC algorithm with RA is longer than without RA where the efficiency is 11,24%. Figure 13 shows the wireless sensor networks environment. Green line is route to transmitt data and the blue line is condition when node sensor transmitt data. Further testing will be made scenario when the condition of the sensor node will soon run out of batteries (off / inactive) then the thing to do is save the data stream that has been processed on the node, so that a node will not lose data that has been processed.    Figure 15 shows Distance Vector Routing using the Bellman Ford algorithm with some variation of the test by disabling one or more nodes. For example, when node 6 inactive then the node 3 to node 6 before using the route to transmit to the base station will use the route via node 5 as shown in figure 15(a), as well as other non-active node, the algorithm will still find the shortest route to transmit data to a base station as shown in figure 4(b, c, and d).
The next part will discuss about the amount of energy each sensor node needs to transmit a number of data bits to the base station which is shown in table III. Table III shows linear relationship between the magnitude of the distance and the amount of energy required, which mean the longer of distance the greater energy will be used.

Conclusion
In this study, simulation result of WSNs with sunSPOT wireless by combining the Distance Vector Routing and Resource-Aware framework using the LWF algorithm increase the network efficiency by 12.94% compared to 16.62% network efficiency using LWC algorithm. On the other hand, simulation result of WSNs with Imote2 wireless using the LWF algorithm increase the network efficiency by 14.71% compared to 11,24% using the LWC algorithm. According to these simulation results, implement the algorithm granularity settings (AGS) or Resource-aware (RA) will increase the sensor lifetime.