Sailor Localization in Oceans Beds using Genetic and Firefly Algorithm

The Localization is the core element in Wireless Sensor Network WSN, especially for those nodes without GPS or BDS; leaning towards improvement, based on its effective and increased use in the past decade. Localization methods are thus very important for estimating the position of relative nodes in the network allowing a better and effective network for increasing the efficiency and thus increasing the lifeline of the network. Determining the current limitations in FA that are applied for solving different optimization problems is poor exploitation capability when the randomization factor is taken large during firefly changing position. This poor exploitation may lead to skip the most optimal solution even present in the vicinity of the current solution which results in poor local convergence rate that ultimately degrades the solution quality. This paper presents GEFIR (GenFire) algorithm to calculate position of unknown nodes for the fishermen in the ocean. The proposed approach calculates the position of unknown nodes, the proposed method effectively selects the anchor node in the cluster head to reduce the energy dissipation. Major benefits over other similar localization algorithms are a better positioning of nodes is provided and average localization error is reduced which eventually leads to better efficiency thus optimize the lifetime of the network for sailors. The obtained results depict that the proposed model surpasses the previous generation of localization algorithm in terms of energy dispersion and location estimation which is suitable for fishermen on the ocean bed.


1-Introduction
By the symphony of the wind carrying the burden of the IOT technology that is transposing the means by which individuals strive, a huge deprivation leads to more utilization thus leading to a better solution. IOT having the similar case requiring node positioning for various real life application[1-7], our work revolves around the requirement of node localization and positioning in WSN (backbone of IOT) ; as depicted by various leaflet about 80% of the contingent information is related to location [2].WSN(Wireless Sensor network) is a substantial unit of IOT and is defined as a group of sensor network that are randomly distributed over a particular area that tends to provide different information in an orderly fashion [1][2][3].Upon diagnosing the problem with GPS and BDS: the cost of installation, the energy required to run them and the space that the technology occupy, a better approach of providing GPS/BDS for the few of the nodes (beacon nodes) are used and others are positioned using localization algorithm. Therefore, a better and more suitable localization algorithm for bettr positioning the nodes is required. Location has been an important aspect in practical usage of any wireless sensor network thus localization is important, making it important to construct various localization algorithms based on the needs. Localization algorithms can be defined as a group of algorithms which are used by the WSN to make decisions in real time based on local and limited knowledge unlike global network knowledge. Thus, 'locality' is often referred to as the knowledge processed by the WSN in its area of reach. [8] Localization thus consists of the problem of finding the geographical location of a node in a WSN, which can be calculated either by a central WSN that contains the global network knowledge or a more practical approach in which WSN are spread in a distributed manner. [9,10,11,12,13,14] Localization can be broadly classified into two categories: Ranged based and Range free algorithms. Range based algorithms shine in accurate positioning of the WSN in a specific distance but at the high cost of deployment and need high end hardware. Range based algorithms efficiently use ranging techniques and operate on the distance measurement between different internodes for calculating location of nodes. Some of the range-based algorithms are Received Signal Strength Indicator (RSSI), Time of Arrival (ToA), and Time Difference of Arrival (TDoA) [15]. Due to the high cost of deployment and taking into account the efficiency, Range free algorithms are used as they don't require high tier hardware and rather are operated on connectivity, multihop routing and other real time-shared information for calculating the distance between the nodes. Range free algorithms have their research oriented towards hop-count estimation that is based on the probability that there exists a function which can be mapped such that the physical distance between the nodes is somewhat related to the smallest hop-counts. But due to the deployment of sensor nodes in complex scenarios, mapping function can no longer be defined accurately resulting in blunders which yield errors. Another major problem with multi-hop is ambiguity. Another example is Centroid localization algorithm which computes the position of nodes based on supported close sensors among a pre outlined radio range. The main advantage is its low computational complexity but it has a high location estimation error that is dependent on the node density (The number of nodes located in a particular range respective to the centroid node) [ The choice of computational algorithm to use to estimate the distance between to nodes in a wireless sensor network majorly affects the final performance of the system; but we can't simply take into account the final performance rather other factors like size of hardware and cost is equally important for the sake of which the position estimation method is chosen wisely.  [18], Fuzzy logic [19], and optimization algorithms, such as Genetic Algorithms [20], Particle Swarm Optimization (PSO) [21], Bacterial Foraging Algorithm (BFA) [22], and Gravitational Search Algorithm (GSA) [23]. These Artificial intelligence localization techniques are generally combined with baseline algorithms that are range based and range free algorithms which provide some degree of betterment but still unsatisfactory results are obtained.

1-1-Paper Organization
The flow of paper is organized as follows in section 2 the literature review gives the details about various implementations of localization algorithm, A and firefly and identification of gap in same. Section 3 describes the methodology of GEFIR algorithm that gives the detailed description of implementing the proposed algorithm, Section 4 gives the simulation and result of GA Firefly and GEFIR and comparison between them based on different parameters.

2-Related work
Localization holds a major aspect in WSN and is thus optimized by various entities across the globe in different fashion [24,25].
Localization is in this way required as about 13.7% of streamlining includes localization angle [26].There are numerous calculation, for example, Localization-network, bionics restriction calculation centroid confinement calculation, district cover confinement calculation, bionics confinement calculation, checklimitation calculation, milestone arrangement limitation calculation, milestone overhaul limitation calculation, limitation calculation, geometric limitation calculation, way arranging limitation calculation, time confinement calculation and likelihood circulation confinement calculation that are talked about and future examination bearings in limitation are suggested. [26] The proposition talked about above spotlights just on one procedure to improve the outcomes while a few substances have even delivered half and half models conveying more than one enhancement calculations.A cross breed approach including Fuzzy Logic and GAs was distributed by Yun et al. [27], who incorporated a half and half model along these lines ad-libbing his past working [28], which utilized just a FL approach, by joining those two techniques to determine the correct loads. At first, GA algo was utilized to alter the participation capacity of FL (utilizing an iterative process) for edge loads dependent on RSSI data. In any case, this technique has restrictions like the GA-based confinement strategy: it accepts that the real position is realized while figuring the mean square mistake. Additionally, an in half and half methodology including NNs and GAs was assessed and talked about by Chagas et al. [29], in which the GA was utilized to determine ideal boundaries preceding contribution to at that point, yet once more, these techniques include an exchange among precision and multifaceted nature. Rather than applying FL to determine the weight legitimately, Huan Xiang Et al. [30] integrated GAs to alter the weighted centroid estimation to accomplish higher exactness dependent on signal quality sources of info and restriction reference data. Additionally, Yang et al. [31] applied GAs utilizing a channel recharging methodology to deliver better combination-a procedure that can be utilized with enormous scope WSNs.
Here, the wellness work was gotten from the genuine area of the assessment.

2-1-Motivation
Upon studying the annual rate of sailor deaths due to weather hazards and unable to reach the shore on time the idea of deploying WSN onto this particular problem statement was developed. Being aware that the node position would be the key issue in order to locate precisely the sailors, a new algorithm was proposed keeping the challenges of the Sailors in mind. Thus, a new GEFIR algorithm was proposed and deployed. The lives of sailors are constantly endangered due to the abnormal weather aspects shown over the past few years in different parts of the world. Working on the same problem and trying to get a way out of it a wireless sensor network deployment was introduced on the sailors that are deployed on the sea bed. A new algorithm was considered to be introduced that would consider mobile beacon nodes and anchor nodes that would help the sailors (small fishermen) to be easily located and can be rescued in case of an emergency. The proposed WSN is built and tweaked keeping the problem statement of the sailors in mind and thus the algorithm is capable of both optimizing the large area and accurately finding the relative accurate position of the sailors.

3-1-Proposed Mechanism for Node localization
The proposed gear for routing data based on the localization is based on the natural selection as done in firefly algorithm [31] by creating a newly developed algorithm for estimating nearly exact location of the sailors. The proposed algorithm helps to achieve better accuracy in a cost effective and energy efficient manner. The localization system can be divided into 3 distinct parts that are distance estimation, position computation and then the most important phase localization algorithm. As figure 1 shows the complete description of implementing GEFIR algorithm. As in the paper to obtain the results we started with initialization of the parameter for both GA and FA. Then we have generated the random population and on the random population we applied the objective function. For each iteration calculate the distance then we update all the positions in firefly for all the offspring. We are applying GA to populate more offspring of best fireflies. We will compute till either we reached our results or till the maximum iterations. As the implementation approach divides in three stages. In the bottom of the paper each stage describing their own working. Distance estimation component is accountable for computing the distance between the two nodes which can serve as valuable information The System of equation is described as below The distance of unknown nodes is calculated using the RSSI value as it doesn't require any additional hardware and most radios can receive it directly. Firstly, the anchors diffuse their neighbor traditional nodes then receive the transmitted beacon from links and measure the strength.
Then position is calculated on the basis of RSSI by the beacon nodes. The method used for computing the position is multilateration.This method was initially developed for the military as then it didn't want to be seen. In this case scenario we opted this method as there won't be the possibility of clear visibility on the sea bed.
I=1to N ε is the random variable with 0 mean The above system can be linearized and can be solved using the standard method like least square [33,34]The computed position using this method is defined as: Where, xi and yi are the position coordinates of the ith reference node, di is the estimated distance.

3-3-Stage2: Deployment Scheme: Genetic Algorithm
Action: This type of algorithm is used to obtain a better optimized result over a huge space. Nature selects what's best for the world and going by this principle of selecting the most optimized path is the purpose of this algorithm as devised by John Holland in 1960 based on Darwin's theory of evolution this algorithm was proposed [35].They are mostly used to generate high quality optimization results over a larger data set by going through the tunnel of processes like natural selection, mutation and crossover [36].Major advantage and the basic purpose to select this particular algorithm is that It doesn't have the need for derivative information which in this case may or may not be available at first glance. Other features include the optimization ability of the algorithm to optimize both continuous and discrete functions depending upon the function deployed on the problem statement. Basic terminology is described as below i.
Population: The total number of nodes constitutes the population ii. Chromosomes: Defines the set of coordinated i.e. a chromosome contains 2 genes; the 1st gene defining the x coordinate of the node and the 2nd gene defining the y coordinate of the node.
iii. Gene: A gene is one element position of a chromosome; for this particular set it contains 2 genes-x and y coordinate iv.
Allele: The numeric value of a gene. [18] A genetic algorithm initializes with an initial population which is made up of a set of solutions. This population then evolves into a different population as generation passes and lastly the best individual is returned as the solution of the problem. For each generation the evolution is preceded by a fixed set of rules [36]. The two parents from the population are chosen and based on some traits they are allowed to be a crossover operator to produce a new generation offspring containing traits of both the parents. The offspring is then modified by mutation operators to generate an unexplored search space to the population thus enhancing the diversity. After a while the offspring replace the entire population and thus evolution is met and it is continued until desired condition is met.

3-4-Stage 3: Localization Algorithm Using FA
Deployment scheme: Firefly Algorithm Action: This algorithm shines out in fine tuning but in a small space.
Firefly algorithm was constructed and implemented by Dr.Xin She Yang in 2008 and is based on the mating behavior of fireflies [32]. Fireflies use their ability to produce natural light to lure their mate or prey. Also known as the lightning bug there are around 2000 species which have the capability to generate short and rhythmic flashes. Flashes from these bugs even so often appear to be in a particular pattern and generate an amazing sight among the tropical areas throughout summer. If a firefly is starving or looking for a mate its light-weight glows brighter to make the attraction of mates additionally sensible. The brightness of the light-weight depends on the accessible quantity of a pigment referred to as 'luciferin', and tons of pigment suggests that tons of light-weight Based on the above mention communication phenomenon of fireflies, the SFA consists of set rules: firefly will be engrossed by other fireflies regardless of their gender. Attractiveness is proportional to their light-weight(brightness) and diminution occurs as the distance among them surges.
The landscape of the objective function determines the brightness of a firefly [20] Instead of old firefly algorithm a new modified firefly algorithm is deployed which would reduce the issue of formulation of attractiveness and irregularity due to variation in intensity.
[11] The construction of firefly algorithm for the proposed problem is defined as follows. Initially the brightness is calculated using the function(x,y) is computed using equation 3Next attractiveness between the firefly is calculated using eq3. Attractiveness refers to the movement of the ith firefly to the brighter jth firefly.
Where,q0 is the attractiveness at r=0; is the absorption factor; r is the distance between the two fireflies Where distance function ribest is defined by the equation: Depending upon the values obtained by the abovementioned equation movement is given by the equation: Where 0 − 2( − ) + 0 − 2( − ) is the attractiveness module; ȼ -randomizing parameter.
In this algorithm the randomizing parameter is not kept fixed rather than a changing parameter which is linearly decreasing as the iteration gradually increases. This particularly helps in finding the balance between exploration and exploitation.
gbrepresents the current global best which is used to redefine the measure and movement of the firefly. The above-mentioned algorithm is run for 100 iteration or till convergence is obtained. The position of the brightest firefly is the ideal location of the sensor node as calculated. Firefly algorithm.

3-5-Stage 4: Proposed Algorithm-GEFIR:
The GEFIR algorithm provides accurate and more timely information to the WSN as deployed for the sailors. GEFIR; it accomplishes path tuning to estimate unknown nodes and then by the fine-tuning capabilities nodes positions are estimated. The proposed algorithm as defined below outperforms GA and FA in almost every possible way. A total of 50 nodes include anchor and beacon nodes were taken which includes 10 nodes are the anchor nodes(nodes knowing their respective position) and the rest 40 are mobile beacon nodes whose location has to be formed .In real case scenario our beacon nodes get up to 100-200 nodes consisting of the fishermen whose location is to be estimated and the anchor nodes are the fixed landmark location on the shore and on the surface sea.

Start algorithm GEFIR
Initialization: Let թ be the solution space. Let n be the number of chromosomes in թ which represents the total population ranging from 1 to n. Each chromosome contains the coordinates of the fishermen in the sea; X coordinate and Y coordinate. For nodes n; n∈թ For individual j; u=(u1,u2,u3un) ∈n ji(1≤i≤n,1≤j≤n) For range (xp,yp) xp=0≤xp100 ;yp= 0≤yp≤100 Initial Round: 1. Tournament selection is deployed to find mating parents among the np. 2. Mating pool for fittest parents is to be calculated using the fitness function Fitness function is defined as f1=ƶ Ø Where Ø=i,j=1 i,j∈n n(ȃ ij-aij)2 f1=ƶ i,j=1 i,j∈n nȃ ij-aij2

3.
Partially mapped crossover is done on the parent chromosomes in the mating pool. Elite selection strategy: At the same instance of time the best fitted offspring is retained in the next generation without any changes or mutation.

4.
Mutation of genes in the np is done on the basis of mutation probability. GA performs course tune to estimate unknown nodes.

5.
Deploying steps 2 to 4 repeatedly up until it reaches maximum number of iterations.
The final population of evolution created by GA becomes initial population of firefly algorithm. Fine tuning: 6. Brightness (f (x ̂,y ̂ ))is estimated using equation 1 7.
Attractiveness is calculated using equation 2 8.
Distance of attraction is calculated using equation 3 9.
Firefly movement towards brighter firefly is then calculated using equation 4 10.
Select the global most light weight among the fireflies 11.
Location value of sensor node is estimated.

Stop algorithm GEFIR
Parameter estimation problem of the presented nonlinear dynamic system of identifying sailor boats (nodes) on the ocean bed is stated as the minimization of the distance measure J between the experimental and the model predicted values of the considered state variables: where m is the number of experimental data; n is the number of state variables; yexp is the known vector of experimental data; ymod is the vector of model predictions with a given set of parameters.

3-6-Tuning of The Parameters for Sailor Specific Problem
Each algorithm has its set of defined parameters that affect its performance in terms of solution space of sailor and execution time. To use FA and GA at their best in terms of network efficiency, it is necessary to provide the modifications of the parameters depending on the domain. With the appropriate choice of the algorithm parameters the accuracy of the algorithms and the execution time can be optimized. Parameters of the FA and GA are tuned based on many pre-tests.

4-1-Simulation Setup
This section simulation experiments are deployed on the derived algorithm for the sailor problem and accuracy is calculated based on Matlab R2019a deployed on Windows 10 i9-9000k. We set up and deploy the GA, FA and GEFIR algorithm and thus results were obtained. Note that 50 nodes were placed in a solution space of 100*100 m. The simulation results were calculated several times in a random fashion. On account of the FA-GA calculation, the unadulterated FA begins from arbitrarily produced introductory arrangements (population) which can be very apart from the ideal one. The FA is executed for 10 cycles just and in this way the underlying population for GA, which are nearer to the ideal, is produced. The GA begins from arrangements which are not passage from the ideal and subsequently the convergence of the calculation is expanded. Progressively over crossover plots the population(chromosomes and fireflies) are little, just 20 (versus 100 individuals in unadulterated GA and FA). Such little populace extensively diminishes the pre-owned memory. A graphical portrayal of the union of the target work J (mean estimations of the 30 runs) for both unadulterated GA and FA calculations with time is appeared (in logarithmic scale) in Fig.2 The outcomes about the half breed GA-FA and FA-GA are appeared (in logarithmic scale) in Fig. 3.As the structure from Fig.2 the FA calculation shows somewhat better intermingling execution in the start of the streamlining procedure, contrasted with the GA. The FA meets quicker than the GA and accomplishes lower value for J toward the finish of the advancement. The FA better execution is much clearer in the half breed calculations (see Fig.3). For the half and half FA-GA it is unmistakably noticeable that FA unites quicker than the GA for the initial 10 emphases (10 cycles and 20 chromosomes/fireflies -250 objective capacity assessments). At that point GA with starting population -FA last arrangement. In the other case, hybrid GA-FA, even the more inaccurate initial population FA convergence fast and achieved similar to FA-GA hybrid solution -JGA−F A = 6.0502 vs. JF A−GA = 6.0479. Total running time for the hybrid algorithms is about 25-30 s vs. about 220 s for pure GA and FA. Total objective function evaluations are 1250 for the hybrid schemes vs. 10000 for the pure GA and FA. Thus, the presented hybrid algorithms have two advantages -much less running time and much less memory usage. Keeping this in mind and comparing the values obtained for J from the equation 7 we have opted to implement the GA-FA structure as our method for identifying the nodes on the ocean bed in the form of sailor nodes. Table 6 summarizes the parameters that were used in GEFIR Algorithm and sequentially the output was obtained fig 4 and Fig 5 depicts the global optimal value of the objective function against the transmission radius.   Performance of the proposed GEFIR algorithm was analyzed and compared with existing firefly and genetic algorithm on the problem statement defined above. The generated results show that the GEFIR algorithm is best suited in terms of time complexity as well as accuracy in table 7

5-Conclusion:
GEFIR calculation was built and executed on the issue of the mariners on the seabed and expected outcomes were obtained. The calculation was utilized to advance the limitation blunder and to accomplish the generally exact situation of the sensor hub on the ocean bed. The proposed calculation was tried for several fireflies and were modified to accomplish better accuracy. Though many have proposed the same arrangement for the calculation our relational work was explicitlystreamlined remembering theissue proclamation. A future arrangement of this calculation would send it on a real sensor and develop an engineering of a similar model. Being cornered by the irregular factors of the condition the proposed calculation was as yet ready to beat the current calculation for the mariners on the ocean bed and had the option to moderately discover the area and along these lines a stage towards progressively situating was taken. This framework was all around forced however experienced irregular condition factors which caused interruption and accordingly nearly low speed of correspondence.