# An Optimized Framework for WSN Routing in the Context of Industry 4.0
## 3 Proposed Framework
### Optimization of OLSR Parameters  
Since more and intensive packet transmission leads to higher power consumption and quicker depletion of the battery, we focused on the attributes (distance, energy, hello interval) that are responsible for the reliable communication and the effects of their length on the amount of routing traffic. The hello interval parameter shows the time intermission  
Figure 3: Network setup. among hello packets. These packets are required to maintain end-to- end communication between nodes. Hello packets carry information of one and two hops neighbor's details. The primary goal of our optimization is to reduce the amount of routing traffic and also minimize a time period. Time is measured as an interval between leaving the transmitting range of the current neighbor node and being registered in the neighbor's list of another mobile node via reducing the delay of control messages. According to our assumptions, the value of 3 s should give the same effects with less control traffic because during \(t=20\) s, the mobile node sends six hello messages. The seventh hello message will be obtained by a new neighbor node in a new transmitting range. In the scenario shown in Figure 1, the time interval t is 1 s, which is an acceptable value. Following is the mathematical analysis of delay in transmitting the data as per the proposed approach  
1. End to End Stability: It shows the time period for which the packets are transmitted over all the channels. It is computed by Equation (5) where minimum transmission energy is used to transmit data from i to n in time t, i.e., \(\min\_trans\_l^{i,n}t\). \[E_{endtound\_stability}(t)\ =\ \frac{1}{\sum_{n=1}^{hop}\frac{1}{\min\_trans\_l^{i,n}t}} \tag{5}\]  
2. Analysis of Delay: Proposed approach is useful for industry applications due to the reduction in delay and can be observed from the following analysis Equations (6)-(22). The description of the symbols used in the analysis of delay can be found in Table 2. The upper bound of the traffic is computed by Equation (6), where the total size of the data is \(\delta\) tot. \begin{table}
\begin{tabular}{c c} \hline \hline
**Meaning** & **Symbol** \\ \hline Upper Bound of the Traffic & \(\varepsilon(t1,t1+tot)\) \\ \hline Channel Capacity & cap\({}^{n}t\) \\ \hline Total Capacity of all the links & tot\({}_{n}\_cap(t)\) \\ \hline Service for node n at time t & tot\({}_{s}\_{n}(t)\) \\ \hline Effective Capacity & \(\beta_{k}(3)\) \\ \hline Effective Bound & \(\phi_{k}(-3)\) \\ \hline Channel (\(k\)) Processing & \(\beta_{k}(3)\) \\ \hline Degree of the processes received at time interval \(t\) & \(\sigma_{k}(t1)\) \\ \hline Effective Capacity Function of Arrival Traffic & \(\chi_{i}(\phi)\) \\ \hline Received Flow & \(\delta_{i}(\phi)\) \\ \hline Difference between capacity of the channel and received flow & \(Qe_{i}(t1)\) \\ \hline Waiting time for the flow of traffic & \(\text{Ti}_{i}^{Flow,ser}\) (t1) \\ \hline Service Delay for the traffic & \(\text{S}_{delay}^{n}_{i=1}(t1)\) \\ \hline End to end delay & delay\({}^{n}_{i}(1)\) \\ \hline Switching Delay between Source to Destination & delay\({}^{s}_{path}\) (t1) \\ \hline Delay between hops & endtoend\(\_delay_{path}(t1)\) \\ \hline Bit loss due to switching & pkt\({}_{loss}_{path}(t1)\) \\ \hline Bit Rate & avail\({}^{bit,rate}_{path}(t1)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Meaning of symbols used in equations for delay in traffic flow. \[\varepsilon(t1,t1+tot)\leq\delta tot+bukt\_cap \tag{6}\]  
The capacity of the channel is calculated with theShannon theorem, as given below. \[cap^{n}_{i}=B^{n}_{i}\log_{2}(1+sn^{n}_{i}) \tag{7}\]  
Total capacity of all the links is:  
\[tot_{n\_cap}(t)=\sum_{i=1}^{n}cap_{n} \tag{8}\]  
Service at that time for node n is given by Equation (9). \[tot\_ser_{n}(t)=\int_{t=0}^{tn}tot_{n\_cap}(t) \tag{9}\]  
Effective bound or capacity of the function (ECF) is computed through Equations (10)-(12).