# Modified Echo State Network Enabled Dynamic Duty Cycle for Optimal Opportunistic Routing in EH-WSNs
## 3 Proposed Modified Echo State Network (MESN) Model
### Update the Position of the Current Solution
Now we are explaining the various parameters used for relay selection as follows:  
The energy consumption in the data transmission mechanism consists of three parts, such as energy consumption in sending data, energy consumption in receiving data and energy consumption  
Figure 3: The working structure of the proposed modified echo state network (MESN) based dynamic duty cycle (DC) with optimal opportunistic routing (OOR). for the fusion of data [31]. The energy consumption in sending data can be expressed as given in Equation (14):  
\[E_{sending}(D,n)=E_{circuit\_loss\_sending}+E_{circuit\_loss\_amplification} \tag{14}\]  
Here, \(D\) is the distance for sending n bits data, \(E_{circuit\_loss\_sending}\) represents energy consumption due to the circuit loss and \(E_{circuit\_loss\_amplification}\) shows the energy consumption due to the amplification circuit loss. Similarly, the energy consumption in sending into two different transmission environments, namely, free space and multipath can be expressed as given in Equation (15):  
\[E_{sending}(D,n)=\left\{ \begin{array}{l}n\times E_{transmitting\_unit\_bit}+n \times\varepsilon_{free\_space}\times D^{2};\;if\;D<D_{0}\\ n\times E_{transmitting\_unit\_bit}+n\times\varepsilon_{multi\_path}\times D ^{4};\;if\;D\geq D_{0}\end{array} \right. \tag{15}\]  
\(E_{transmitting\_unit\_bit}\) represent energy consumption in sending unit bit data, \(\varepsilon_{free\_space}\) shows energy consumption of unit bit in free space and \(\varepsilon_{multi\_path}\) demonstrates energy consumption of unit bit in multi-path, and \(D_{0}=\sqrt{\frac{\varepsilon_{free\_space}}{\varepsilon_{multi\_path}}}\). Similarly, the energy consumption in receiving n bit data can be expressed as given in Equation (16):  
\[E_{receiving}(n)=n\times E_{transmitting\_unit\_bit} \tag{16}\]  
Similarly, the energy consumption in n bit data fusion can be expressed as given in Equation (17):  
\[E_{fusing}(n)=n\times E_{fuse\_unit\_bit\_data} \tag{17}\]  
where, \(E_{fuse\_unit\_bit\_data}\) shows energy consumption in unit bit data fusion. The congestion rate (CR) [24] is used to evaluate the load of relay nodes. Here, each intermediate node can adaptively detect the occurrence of congestion and then notify the parent node to reduce the packet delivery rate according to the congestion level. The CR at each neighbor node can be expressed as given in Equation (18):  
\[CR_{i}=\frac{\sum_{i=1}^{N}\sum_{n_{i}\in L_{ij}^{m}}Connectivity\_degree(n _{i})-\sum_{n_{i}\in L_{ij}^{m}}Connectivity\_degree(n_{i})}{\sum_{i=1}^{N} \sum_{n_{i}\in L_{ij}^{m}}Connectivity\_degree(n_{i})} \tag{18}\]  
Here \(Connectivity\_degree(n_{i})\) represents degree of connectivity, and \(L_{ij}\) is the route. The relay set formation from the neighborhoods of the sensor nodes utilizes the concept of the EDW required to transmit packets from source to destination efficiently [23]. The EDW of particular node \(i\) can be expressed as given in Equation (19):  
\[EDW(i)=\frac{1}{\sum_{j:[PERSON]\_set(i)}Link\_Parameter(i,j)}+\frac{\sum_{ j:[PERSON]\_set(i)}Link\_Parameter(i,j).EDW(j)}{\sum_{j:[PERSON]\_set(i)}P(i,j)}+weight \tag{19}\]  
here \(\frac{1}{\sum_{j:[PERSON]\_set(i)}Link\_Parameter(i,j)}\) is the expected number of duty cycle wakeups in single-hop transmission, and \(\frac{\sum_{j:[PERSON]\_set(i)}Link\_Parameter(i,j).EDW(j)}{\sum_{j:[PERSON]\_set(i)}P(i,j)}\) is the expected number of duty cycle wakeups in multi hop transmission, and weight represent the forwarding cost in terms of energy. Also, Link_Parameter (_i,j_) represents success probabilities and Forwarder_set(_i_) denotes the set of candidate forwarders. Next, we collect the current duty cycle of relay nodes from the initial relay set \(Set_{initial}\) generated in step-1 (Figure 3). The relay set is updated based on the current duty cycle of relay nodes, and \(Set_{actual}\) is the updated relay set. The step-2 (Figure 3) consists of two primary functions, namely; calculation of expected active transmission cost (EATC) and prioritization of relay nodes by using EATC.