# Energy Efficient Multipath Routing Algorithm for Wireless Multimedia Sensor Network
## 4 Energy Efficient GA-Based Multipath Routing
### Multipath Formation Using Genetic Algorithm
#### 4.2.4 Mutation  
In this study, we applied the model explained in Equation (18) for the mutation process. The model acquires three randomly chosen genes from the parent chromosomes. A random number, \(\alpha\in(0,\ 1)\), is chosen for calculating the new position of the mutated gene. At the end of the mutation process, the fitness value of the new mutated genes is evaluated. If it is found fit or valid, then it will be inserted in to the current population. Finally, it will be passed to the next phase. The position of new gene:  
\[(x,y)=(x_{1},y_{1})+\alpha*\left(\left(x_{2},\ y_{2}\right)-\left(x_{3},\ y_{3}\right)\right. \tag{18}\]  
where \((x,y)\) is the new gene position in a chromosome, \((x_{n},y_{n})\ n=1,2,3\) are three randomly chosen parent gene positions, and \(0\leq\alpha\leq 1\). ``` BEGIN
1:Initialize population with equal to cluster size
2:Determine the fitness value for each sensor node
3:REPEAT
4:Select parent chromosomes from the population
5: Perform Crossover operation to produce a new child
6: Perform mutation
7: Compute the fitness of each mutated individual
8:IF (Child has higher fitness value)
9: Substitute the parents by the new offspring
10:END
11:END
12:END
13:END

## 5 Performance Analysis

In this section, we discuss the performance analysis of the proposed EMRGA protocol and compare it with several protocols. The experimental setup and the performance metrics used are also explained. The results are also discussed. Table 2 shows the network and GA related parameters with their values. The proposed technique was compared with the TEEN [44], and three multipath algorithms MP [45], MACS [46], and MRP [29],respectively. As in [47; 48; 49], we used MATLAB 2016(a) version running on an HP desktop system with internal processor Intel(r) Core(tm) i7-3770 CPU @ 3.40 GHz with 12 GB RAM and 500 GB HDD for the simulation. We used Matlab for the modeling environment, including nodes, timing, protocols etc. Briefly, we first created the WMSN by defining its parameters (location, radius, available battery power, etc.). These parameters were stored in different matrices. For each node, we considered that the node died when the node exhausted its available energy. The initial coordinates of the sensor were randomly generated using a Matlab function. The sensor nodes were then placed in the given space based on the randomly generated coordinates. We then connected nodes if the distance between them was less than or equal to the communication radius by creating a bidirectional link between them, each with its costs. We then ran the dynamic clustering mechanism to create the cluster and select the cluster head, and finally coded the routing scheme based on the genetic algorithm. The system runs in rounds and some parameters of the WMSN were calculated such as the time for sending a packet between sensor nodes and the energy consumption. The simulation ended when there was no path to the base station, meaning the cluster heads near the base station were out of energy. ### Experimental Setup

We used the following performance metrics to compare the routing protocols:

* _Average Residual Energy:_ This parameter provided the mean remaining node's energy per round, where \(n\) is the number of nodes in the network: \[E_{avg}=\frac{\sum_{i=1}^{n}E_{res}(i)}{n}\] (19)

\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline \begin{tabular}{c} Sink \\ Sink position \\ Sensor nodes \\ \end{tabular}  & \ \begin{tabular}{c} 1 \\ (0,200) \\ 100 \\ 200 m \(\times\) 200 m \\ Event radius \\ Transmission range \\ Packet size \\ Message size \\ Sensor initial energy (normal nodes) \\ Advanced sensor node initial energy \\ \end{tabular}  &
\begin{tabular}{c} 2 J \\ 5 nJ \\ 10 pJ \\ 0.0013 pJ \\ 0.000013 pJ \\ 0.0000013 pJ \\ 0.