WSN performance based on node placement by genetic algorithm at smart home environment

Wireless sensor connectivity is one of several factors that determines the communication reliability of each node. The placement of the node depends on the area that covered by wireless coverage area, so the node placement should be optimally placed. But the other aspect is the sensor coverage area. Sensor coverage area sometimes could be different with wireless sensor coverage area. Based on that situation, it needs to optimize that situation. Genetic Algorithm is an algorithm that utilizes a heuristic approach that uses biological mechanism evolution. It used to evolution the best position of Sensor Node based on Wireless and Sensor coverage area. After the position of each node generated by Genetic Algorithm, it still needs to evaluate the wireless sensor node performance. The performance indicates that the genetic algorithm can be used to determine sensor node placement in the smart home environment. The smart home environment used to monitor event at the house such as wildfire. In this research used Quality of Services (QoS) to measure wireless sensor performance. The experimental testing scenario will be used to place several nodes that generated. The QoS performed systems reliability that produced based on 3, 4 and 5 testing nodes, the minimum and maximum of each: delay is 6.21 and 8.74 milliseconds, jitter is 0.11 and 1.59 Hz and throughput is 68.83 and 90.49 bps. Based on ETSI classification, the performance of sensor node placement is Good and acceptable in real-time systems.

Placing the node location could be performed with several algorithms. One of several algorithms that can perform evolution is Genetic Algorithm (GA). GA is a powerful heuristics algorithm for solving the problems of optimization [17]. The individual solution that generated randomly would be evaluated in order to find the best solution. GA could implement at variety problem that not suited by another algorithm such as Ant Colony, Fuzzy Logic, Neural Network, Swarm Optimization etc. Several researchers have been successfully implemented GA in a WSN in order to locate the node [16]. Their research is only how to place many nodes with GA, but they didn't place it in real condition and didn't measure how quality that provides by their design. Another problem is if that sensor works did the wireless works too. The sensor has a different coverage area that reads data. Both wireless and it sensor have a circular coverage area, but their coverage area is different. Usually, the wireless coverage area is bigger than the sensor coverage area [18].
In order to solve the problem is needs to evaluate the quality of WSN services itself based on wireless and sensor node coverage area. The sensor used that low cost and efficient is the Flame Sensor 5 channel that has coverage area 700-100nm, the wireless that used is nRF24L01 and Arduino Uno. The measurement to prove the quality is QoS (Quality of Services) includes Delay, Jitter, and Throughput. This research is focused to measure how the sensor works and the process of sending data, by ignoring some parameters such as energy consumption, reading data error on the sensor, the power used an obstacle. The sensor placed inside a room that doesn't have an obstacle. To perform this research needs to do the several amounts of procedure to evaluate their performance. First, it needs to create the models of GA. After models created, it will be implemented and tested so it would be got the result of reliability between GA which is implemented with wireless coverage area and sensor parameters.

Research Method
This research aim is placing WSN nodes in the smart home environment. The environment here is not all of each room at home. This research is to models a room inside a house with several parameters. The size of a room at home is very varied, as needed. But the average requirement of the house area ranging from 2, 3 and 4 square meters [19,20]. So this research used 3 square meters as a case study, that is an average area at house room. This research focused to generate at one room only, the room represent at the smart home environment. A room used is 3 meters square with implementing one Coordinator and several Sensor Node that illustrated in Figure 1. That figures represent a case study which is a room that contain one coordinator and several sensor node that modelled by genetic algorithm. The communication between the Coordinator and Sensor Node would analyze the quality of their service. So it can meet how much the sensor node that requires that room. It will Step by step at this research represents in Figure 2 that is creating nodes, generating GA, testing and analysis. The first step is creating WSN nodes from 5 channel flame sensor and nRF24L01 combined in Arduino Uno. 5 channel flame sensor has some characteristic that is Vin DC 3.3V-9V, sensor range 1200, digital output, sensor range is 100 cm [21]. The nRF24L01 is a radio transceiver that has single chip and microcontroller used is Arduino Uno.

Figure 2. Research methods
Communication Protocol used in nRF24L series is Enhanced Shockburst Protocol (ESB), it provides radio communication, ease of use, small code size and consuming a small power consumption (Low Power). Each node communication would communicate with ESB that has a bi-directional data link. It is the basic protocol that was embedded in the nRF24L series. This protocol supporting two-way communication, it is the basic protocol that sent packet buffering, acknowledgment, and automatic re-transmission of loss packet [22][23]. The ESB would not discuss deeply, this research just makes use of this protocol.
After nodes created and well communicated, the GA method will be created in Matlab. Matlab and Simulink have Genetic Algorithm toolbox that presents a familiar and unified environment for control engineer. That toolbox uses to develop or simulate at control system engineering [24]. At this research, GA used to generate node based on user requirement. But on this system designed by representing in one room at the house only. So in one room, we just need one Coordinator Node and more than one sensor node. The GA input has several parameters which are used to model the real world could see at Figure. 2, that each is: a. Node Quantity: this input model how many nodes that would be implemented at a certain area b. Node Range: node range is the characteristic of the node that would be used to give node range parameters, this about how wide the distance is owned by the node c. Amount Fitness Iteration: we could give the number of iteration. The iteration could be determined manually. It would affect is that the greatest fitness will be generated. The greater the iteration value given, will not have much effect on the amount of fitness generated. But the best or greatest fitness is dependent on several aspects suppose to the number of initially generated nodes, the node range, and the range area all affect the best fitness value to be generated. d. Population Quantity: is how many parents that generated randomly based on user input. We could determine how much a parent for this problem.
e. Area Range: this research used the nRF24L01 range as parameters, we could change range if we use other hardware. After input generated with that criteria, it will conduct by standard GA includes Initialization, Crossover, Mutation, Fitness [16], [25] and The biggest fitness that generated will be nodes that implemented and tested. The node which has the biggest fitness is the node that would be implemented and tested.
GA that used can be seen in Figure 3 started with Initialization, at initialization, it will generate a random place node. We can set how much random place node generated based on the amount of node what would place a room. At Initialization, the parameter that didn't have the effect of a random process is node and area range. The range could set dynamically based on requirement too. The amount of iteration is set manually, the amount of iteration doesn't affect the quality of the biggest fitness that produced. The best fitness that produced based on a random place node that generated, so it could be set differencing in every testing scenario.
The second step is generating data that produced by Initialization process to get the best parent that will process to produce the best child. But it still long steps to get the new generation. Several parents that selected is processed on Crossover, at this process several selected couples would perform crossover. Crossover is combined with two parents (based on biological crossover) that could produce an individual/a child for the next generation, at this research use single point crossover. After that is Mutation process. Based on Crossover result, the individual that produced by Crossover is processed. A mutation is an option that an individual has a small change that produced by random probability option. This process produced generic diversity and enabling GA to search a wider space for the individual that produced. Mutation used probability that used to how much a chromosome that mutate. A chromosome is the smallest part of the individual body. After that, it produced the individual that have different fitness. is the solution of the node placement. The node placement is the node where the Coordinator and Sensor Node would be placed. At this research, Coordinator Node is identified by number "1" in the Matlab simulator, and the other node is Sensor Node. With an assumption, the Coordinator has a sensor for sensing too. Next process is measuring the QoS (Quality of Services). With the QoS measurement, it would meet the accurate or reliable monitoring condition at a room in the smart home environment. The QoS used is Delay, Throughput, and Jitter to measure between Sensor Node to Coordinator Node. Packet Loss is not included in this scenario because this parameter used to measure between Coordinator Node and this research use only one Coordinator Node [26]. Measuring the QoS is the next step after the node implementer. This is the testing scenario with the direct trial scenario. The QoS used is a delay, jitter, and throughput [27]. Therefore the system function is to monitor the environment such as a smart home environment and it could measure well [28].

System Testing
GA implemented in Matlab with placing one coordinator and several node (one, two and three other node). The result that produced by Matlab would be tested in this testing scenario that can be seen at Figure 4. The room size used is 3 meter. At that room would be implementing 3 Nodes (1 Gateway, 2 Sensor nodes), 4 Nodes (1 Gateway, 3 Sensor nodes) and 5 Nodes (1 Gateway, 4 Sensor nodes). The simulation can be seen in Figure 4 that have "x" and "y" coordinates that representing the room width and node placement. The "1" coordinates are for Coordinator Node and "2", "3" and "4" is a placement for Sensor Nodes.
After the node placement generated, the second scenario is direct testing measurement. Each of Sensor Node sent data to Coordinator Node. After Coordinator Node receiving data, it could measure the QoS. The testing scenario measured 60 times while sensor detecting flames and data was sent. The testing includes 3, 4 and 5 nodes that placed. Each placement would be measured 20 times. The full result of the testing scenario is presented in Table 1. Testing on 4 Nodes. The testing performed 20 times of sending data between each Sensor Nodes to Coordinator. At the other nodes performed testing scenario in the same way. The QoS shows and ready to analyze. All of the summary of the testing shown in Table 2 that inducted by average, min and max result of all testing nodes. This research was done by testing with 3, 4 and 5 nodes. Each testing always has 1 Coordinator Nodes and the rest of it is Sensor Node. This testing has several results that will be explained below. a. Delay: minimum delay is 6.21 millisecond at 3 nodes and maximum delay is 8.74 millisecond at 4 nodes. But at the 5 nodes maximum delay is 8.39, the delay at 4 nodes is bigger than 5 nodes. b. Jitter: minimum jitter is 0.11 Hz at 4 and 5 nodes, but at 3 nodes the minimum jitter is 0.88 Hz. Maximum jitter is 1.58 Hz at 5 nodes. 5 nodes could produce the minimum and maximum jitter value. c. Throughput: minimum throughput is 63.83 bps at 3 nodes and maximum throughput is 90.49 at 4 nodes. 5 nodes don't produce minimum or maximum throughput. d. Based on the testing scenario produced the biggest delay at 4 nodes and the smallest delay at 3 nodes. The 5 nodes have the biggest and smallest jitter. Smallest throughput at 3 nodes a maximum throughput at 4 nodes. That all testing result can be seen in Table 2, each of testing scenario conducted by 20 times measurement. Based on the ETSI classification range that produced by all testing scenario is: a. Delay: an average delay that produced is smaller than 150 millisecond and categorized as Very Good. b. Jitter: average jitter that produced between 0 Hz to 75 Hz categorized as Good. c. Throughput: average throughput that produced between 75 bps to 100 bps and categorized as Good.

Conclussion and Future Works
This paper proposed Genetic Algorithm for implementing Node with Genetic Algorithm (GA) which are Coordinator and Sensor Node to deploy sensor. GA used to determine which place that planting sensor node which has several parameters like the amount of node, sensor This system works functionally and tested by QoS. The QoS resulting based on 3, 4 and 5 nodes have a minimum delay is 6.21 millisecond and maximum 8.74 milliseconds. The minimum jitter is 0.11 Hz and maximum jitter is 1.58, and the throughput minimum is 63.83 bps and maximum is 90.49. Data sent will send if the sensor was sense fire. Based on ETSI classification, the performance of sensor node placement is Good [27] and acceptable in real-time systems. The future works are how to implementing GA on a whole house in the smart system environment. The sensor not only a flame sensor to implement, but there are many sensors to implement such as temperature, gas or household equipment that could communicate so each household equipment and the sensor to read environmental condition could communicate and sent data each other. It could be improved by changing or adding several parameters that being GA input, could be choosing the best routing protocol. After that all, it could be connected to the internet or mobile phone. The other feature that could implement is placing node to control environment that covered by the node that sensing environment. So the smart home environment could be monitored and controlled well.