A Distributed Method to Reconstruct Connection in Wireless Sensor Networks by Using Genetic Algorithm

In recent years most of the research in the field of sensor networks is allocated to the wireless sensor and actor networks due to their complicacy and vastness of research area. This type of network is a group of sensors and actors wirelessly linked to each other. Sensors gather information of physical world while actors take appropriate decisions on the basis of gathered information and then perform proper actions upon the environment. In wireless sensor and actor networks, it is very important to maintain the connection between actors. Failure of one or more actors can break up the network into separated parts and this failure acts as a barrier to the network to perform its duties. The purpose of the present paper was to provide a genetic algorithm in wireless sensor and actor networks, to improve evaluation and to maintain the connection between actors’ networks. In order to evaluate strong points and weaknesses of the recommended approach, the OMNet++ simulation was used and the outcomes of the simulation were indicative of the recommended approach’s validity.


Introduction
Wireless sensor and actor networks are principally used to monitor distributed environments including specific phenomena.For these kinds of applications it's usually required to observe for a long period of time a distributed environment mainly unavailable for people.In recent years the interest in wireless sensor and actor networks has escalated.These types of networks are growing fast in the fields of research, functional, operational and commercial fields.Wireless sensor and actor networks are used to monitor an arbitrary field in the environment.The countless functions of these networks with low cost caused them to have many roles in different fields.In these networks the important issue is the coverage and connectivity within network.At the present time a lot of attention is given to the wireless sensor and actor networks due to their stability in applications.The reason is that these applications require intelligent and automated interaction with environment.Sensor nodes sense their interested event and the role of an actor to timely respond to these events is very important.The actors in order to design a favorable reaction need to match and cooperate with each other.For example in forest observation plan, the sensors report fire detection to the adjacent actors.The actors like fire extinguishing robots and flying aircrafts need to control fire immediately and prevent the created stress.To do this the actors must be able to connect to each other and keep their internal topology firmly linked all the time.For this reason a physical or logical failure of one or more actors divides actors' internal network into separate parts.And therefore the interaction between actors is stopped and network is unable to timely respond the serious events.For these reasons recognition of critical node and choosing the best backup and relocating as quickly as possible with slightest amount of relocation are very essential and important.One of the innovations of this research is a scenario to reconstruct network and determine location of new actors.

Wireless Sensor and Actor Networks
Wireless sensor and actor networks are used to monitor and control a specific environment which is difficult for human to access and observe.They are made of multiple small and fixed sensors and a number of actors distributed densely in the environment.Sensor nodes perform the duty of sensing their interested events as usual and after processing, report the interested events to one or more actors.Actors receive report from sensors and in order to give a coordinated and desirable response, process received reports and share with each other.In these kinds of networks density of sensors is very high and this is while the number of actors is fewer than sensors.Sensors are cheap and in regard of energy, communication and computation (processing and memory) have fewer sources than actors.Communication range of sensors depends on communicative hardware parts used in them however actors' communication range can be the maximum Euclidean distance that their transceiver can access it; a actor may use two separated transceiver for sensor-actor and actor-actor communication.Action range of an actor is the maximum level it can cover.

Sensors and Actors
Sensors are multiple sensor nodes distributed accidently in the environment.Generally a sensor node is made of 4 components as following: 1-Sensing unit including one or more sensors.
2-Processing unit including a microcontroller and a memory to process data.Actors, as their names imply, shape their identity according to the environment existing in it.For example an actor in order to extinguish forest fire can be extinguishing robot or flying aircraft.

Review of the Related Literature
Like many other technologies, the field of sensor networks was developed for military purposes.Development history of wireless sensor networks can be divided into 4 phases as following: First phase is related to cold war military sensor networks.In cold war years sound surveillance system (SOSUS), a system made of sound sensors, was used undersea to unveil and detect submarines of Soviet Union.These systems are still used by organizations involved in oceanography and airway management.These systems developed during cold war years and networks with hierarchical structure (processing in consecutive levels and transferring information from creator to the user) were created in which human being played a basic and key role.
Second phase is related to creativity of Defense Advance Researched Agency (DARPA).The main motivation for advanced research on sensor networks was created in early 1980 through programs supported by this center.At that time in the absence of PCs and workstations, weak processing and low-speed of information transfer such an idea seemed ambitious.In fact one of the purposes of the center was to utilize distributed sensor networks as distributed sensor nodes which are very cheap and can work in a collective and autonomous mode.
Third phase is related to developed and arranged military purposes in 1980s and 1990s (this can be called the first age of commercial products).Despite the wide range of research, technology of sensor networks was not completely ready yet.The expression of central network wars was first coined at that time.
The fourth phase is related to research on sensor networks in the twenty-first century (this can be called second age of commercial products).Advances achieved in the field of telecommunication and computation in late 1990s and early 2000, changed research on sensor networks drastically.Cheap and tiny sensors made on the basis of micro-electromechanical systems' technology, wireless reticulation and cheap and low-consumption processors have paved the way to use the ad hoc wireless networks for special purposes.In the following the algorithms presented in this field are given.
Detection and connectivity restoration (DCR) method is taken from concepts of social and legal systems.DCR is a combinatorial algorithm including two parts: proactive and responsive.This algorithm doesn't have a scenario to defeat several actors in one moment and is only able to check failure of an actor in a moment.This algorithm is distributed, centralized and combinatorial.
Distributed Actor Recovery Algorithm (DARA) is a distributed algorithm which restores connectivity of the partitioned network.It tries to centralize retrieval range in order to minimize additional relocations of actors.In this case it needs low level of coordination.DARA algorithm is performed in the 4 following stages: 1-Keeping active and neighboring actors in one list 2-Detection of actor's failure and retrieval procedure 3-Choosing the best candidate

4-Cascade relocation of nodes
This algorithm is a centralized design which prevents intervention of any actor in the network.This algorithm is distributed, centralized and combinatorial.
Coverage Conscious Connectivity Restoration (C3R 13 ) algorithm tries to show connectivity and coverage in one integrated plan and in connection retrieval it is able to investigate failure of one or several nodes.In this algorithm in order to maintain coverage of each one of the nodes, the overlap degree of coverage is calculated which is a percentage of the whole area covered by node and must be in sensing range of at least one of the neighbors.This algorithm is distributed, centralized and responsive.
A.zamanifar, M.sharifi, O.kashefi (AOM) is a distributed method used in actor's connectivity retrieval at the time of actor's failure.In order to recognize critical nodes this node requires neighbors' information.This combinatorial algorithm helps recognition of critical actors and makes choice of alternative actor more precise.AOM tries to minimize the whole number of messages needed for network retrieval, recovery time and all relocations of actor.
PADRA algorithm is a distributed connectivity retrieval which uses CDS for critical node failure.The developed model of this algorithm is called MPADRA (Multiple Partition Detection and Recovery Algorithm) which can check several nodes simultaneously but requires the information of hop-2.
Partition Detection and Recovery Algorithm (PCR) is a distributed partition detection and connectivity retrieval algorithm that actively and on the basis of native topological information, detects critical actors.PCR determines a suitable backup node to inspect failure of a node.A backup actor recognizes failure and starts recovery procedure which may include relocation of several actors.

Recommended Algorithm
In the present paper retrieval of lost connection in wireless sensor and actor networks by using actor nodes is considered efficiently; in such a way that these nodes act as bridges in sections created in the whole network.In this way the average of communicational path between network nodes and sink and also the number of utilized nodes will be minimized.Therefore we formulize optimal connection retrieval in form of a multipurpose relation.Besides that in order to solve this problem we have provided a distributed algorithm based on genetic algorithm.
First genetic algorithm is introduced.In wireless sensor networks, due to various reasons a number of active nodes may become inactive and affect integrity of network by their performance.Because of elimination of a number of nodes this event may unintentionally change to separated parts.In the meantime, several responsive protocols are provided for making connection between created parts.These protocols have used special nodes named actor nodes so that by making a bridge between created parts, make the network integrated and the problem elevated.These mobile and active nodes can be provided in various forms.But from another point of view making connection between nodes and sinks through bridges made by active nodes leads to low-quality paths between nodes and sinks (i.e.average of communicational paths between nodes and sinks increases in comparison with optimal mode).In fact these active nodes must be placed with a high precision and by taking into account the diverse features and conditions of the mentioned network.
For example in figure 2, two modes are given in which geometrical information of parts affects the number of mobile nodes and also average communicational path between nodes and sinks.In figure 2 stable nodes are shown as SN and mobile nodes as MN.In part A of figure, average of hops of nodes from S1 part to sink through mobile node of p is equal to 15.5.But if connection of two parts is made through mobile node of Q, average of part S1 nodes' hops is reduced to 2.5 in which only one actor node is added.In part B it can also be observed that adding two more mobile nodes inside part S1 cavity reduces average of transitive steps between nodes of sink's separated parts; this is while placing only one mobile node of p integrates the network but adding mobile nodes of q and r reduces soldier in transition of dispatched packages between nodes and sinks.The reason is that some of the packages don't need transition and circulation in sink path.In other words, this algorithm must provide a mechanism to detect parts of the network and intentionally use the form of network's resulting parts so to provide optimization of possible connection reconstruction.The recommended method is to minimize both the number of mobile node used to reconstruct connection in network and reduce the average of paths between nodes and sinks in such a way that the connection between different parts of network is reconstructed.
Because optimization is a challenging problem, by using a genetic algorithm we have provided an intelligent algorithm to solve this problem.Moreover a scenario will be defined for managing conditions when network topology is not completely available or when network is inadvertently disintegrated.

System Model and Formulizing the Problem
We consider wireless sensor network to be made of several set of parts shown with s={s1,s2,….,sn}.Stable nodes are shown with X={SN1,SN2,…..SNn} and mobile nodes with Y={MN1,MN2,…<MNn}.It is also supposed that through GPS, nodes are aware of their location and nodes are distributed in all parts evenly.

Definition of Graph Structure
In order to model the intended network including sensors and mobile nodes, a graph is used.CG(r,x,y) graph is considered as a graph with XŪY nodes and related edges.In such a way that xy edge exists if for all (x,yϵxŪy) and D(x,y)<R in a way that D(x,y) is Euclidean distance between x,y node and R is communicational range of every node.

Definition of Constraints
In one set, the given stable nodes including a set of X and a set of ∑ parts and cause of optimal integration reconstruction which relocate mobile nodes of Y by considering the following 3 conditions: 1-Average of all nodes' path is minimized.

2-Number of mobile nodes is minimized.
3-The intended sensor network is connective.Therefore for this issue preprocessing is done on areas to achieve the desired partition.In this condition nodes are aware of their location and accordingly are aware of their condition in this partitioning.As a result the output of problem will be optimal integration reconstruction of binary Y ij variable in which Y j =1.

Making Connective Relation among Stable Nodes
This part of recommended algorithm is related to placement of actor nodes to retrieve connection between stable nodes and sink.In a network that includes stable nodes and sink, the intended algorithm will try to find out the best possible location for actor nodes to retrieve connection between stable nodes, sink and also minimum path average between actor nodes and sink.In the following different parts of recommended genetic algorithm for such an approach are introduced.

The Initial Population
Answers of optimization problem in genetic algorithm are expressed as chromosomes.In such a way that each chromosome is arranged in form of a bit string made of related variables.In our problem every bit of chromosome is indicative of a discrete area of the whole network.In this representation if a mobile node exists in the intended partitioned parts, then score 1 is allocated to that bit of chromosome, otherwise it is initialized to zero.

Evaluation Function of Genetic Algorithm
This algorithm replaces all stable nodes settled in each one of partitioned areas with an assumed node.Therefore when computing the shortest path average, it only calculates the surrounding path from assumed node to the sink.As shown in the following figure the index of every partitioned area in the network is considered as a bit of chromosome.Recommended evaluation function calculates value of every chromosome on the basis of average of the shortest path between stable nodes and sink and makes decision.Therefore: In this equation for all chromosomes the average of all paths between representative nodes of every area and sink is calculated and then in prioritization of all chromosomes, the minimum of paths which are the most valuable chromosomes are labeled.

Initial Population Production
This stage is done in the following two steps: After detection of created parts, a point of every part is chosen randomly as representative of that part and then in accordance with the number of partitioned areas existing in every subpart, initial chromosome is produced.In second step connectivity of all produced in the first step is investigated and chromosomes are randomly replaced in locations owned by actor node.This procedure is repeated k times so that in the end K chromosome is created for initial population production.

Selection and Replacement of Superior Generation
In this section we use selection on the basis of priority.To implement this algorithm if we specifically have 4 chromosomes, the chromosome having fewer numbers of mobile nodes and smaller path length average is initialized 3 and accordingly superior half of initial population is chosen as superior generation.

Investigating Integration of Actors
The purpose of this stage is locating actor nodes in network and making connection between them through adjacency matrix of this graph.Connective graph is a graph that there is at least one edge between all nodes of it.In the case of lack of integration of this communication, it's tried to perform the mentioned genetic algorithm on a network of actor nodes; In such a way that our purpose is creating connection between all actor nodes.It should also be mentioned that in the adjacency matrix of network and while initializing matrix elements we should pay attention to initialize 1 to the elements having actor nodes and otherwise zero is initialized.This initialization is done according to communication radius of actor nodes and side length of each one of the partitioned areas in the network.Therefore communication radius of actor nodes will be to each one of the adjacent partitioned areas.Moreover in the adjacency matrix, adjacent elements of mobile nodes are initialized 1 and then connectivity of the outcome is investigated.If graph is not connected, mobile nodes are replaced and relocated so to achieve network connectivity.This process is shown in figure 6:

Entrance of New Actors
It's possible to rely on performance accuracy of network until the time that connectivity of network is guaranteed.If for any reason connectivity of internal network of actor nodes is unable to be guaranteed through backups existing in the environment then new actor is required to enter.In this case if several actors are lost, new actor entering the environment are placed in a better location than before; this is because before being located in proper place all intended parameters are investigated by recommended genetic algorithm.To do this first connectivity of adjacency matrix of mobile nodes is checked.Then to cover probable disconnected points, recommended algorithm is performed for only mobile nodes.Then algorithm will be the minimum amount of mobile nodes o cover problem atmosphere with condition of observing connectivity of the graph achieved form it.In the end and in evaluation stage, chromosomes are valued on the basis of minimum number of mobile nodes allocated for network connectivity.

4.Conclusion
Optimal energy consumption in wireless sensor networks is of prime importance; in such a way that optimal energy consumption leads to longevity of the network.
In the present research, the purpose of this algorithm in maximizing coverage and longevity of network by using genetic algorithm which is performed in central form in basic station, we have determined the place of cluster heads in such a way that energy consumption in the network gets minimum.Moreover the effect of ratio between evaluation area and communication range in optimized plan with the best coverage is investigated and fitness evaluation is done on the basis of minimum of energy consumed by network nodes during each data dispatch period.In fact choosing new generation population is done considering the criterion of "the least difference of network energy" with previous period.Creating balance and uniformity in energy consumption of nodes and making longer the life of network is the result of this research.Of course settlement mode including a number of sensors as a design variable and also as user status for uncertainty of location of sensor must be followed in future research.Coverage in wireless sensor networks is one of the important quality parameters and solving the problem of finding a set of optimal coverage nodes to cover a point is done by using effective elimination of additional nodes in which connection and relation between mobile nodes is also guaranteed.Using genetic algorithm can reduce and minimize the number of mobile nodes in one set covering the intended points.And by reducing the number of sensors of a set, more energy is stored which results in longevity of network.

Figure 1 .
Figure 1.Structure of Wireless Sensor and Actor Networks

3-
Transceiver unit to transfer data and communication.4-Power unit.

Figure 2 .
Figure 2. Effect of Actor Nodes in Reducing Communicational Paths to the Sink

Figure 3 .
Figure 3. Areas Covered by an Actor Node

Figure 4 .
Figure 4. Stages of Stable Nodes' Connection with Sink through Actor

Figure 5 .
Figure 5. Performance of Genetic Algorithm Evaluation Function

Figure 6 .
Figure 6.Adjacency Matrix of Actors' Location and Their Covered Area

Figure 7 .
Figure 7. Simulation Program in OMNet++ Software