# Reliable Fault Tolerant-Based Multipath Routing Model for Industrial Wireless Control Systems
## 3 Methodology and System Model
### Simulation Setup  
The simulations are performed on NS-2 with the WirelessHART simulator [24], which was validated by comparing it to existing WirelessHART networks [8; 24]. The simulation parameters are similar to those mentioned in the literature for IWSN monitoring applications that use WH. The network manager polls the type of battery and presents the predicted lifetime of the battery from nodes using the energy model [8] and simulator changes [26]. The battery lifetime in the WirelessHART standard is expressed in form of an integer that represents days. This value keeps decreasing as the simulation continues running. As the industrial WSNs are sensitive to variable wireless channel circumstances, a generic route loss model is included for RSL estimation (two-ray ground-reflection) with a power transmission of 0 dBm and a maximum contact range of 40 m [24]. On the physical layer, there is a probability model for packet loss for indoor layouts that uses the same transceiver family as the energy model [59]. [PERSON] et al. added the alarm path down command to the application layer so that nodes can report broken connections with neighbors to the network when a keep-alive message is not exchanged between linked nodes after a particular period of time [26]. We also used the adaptation proposed by [4], which tweaked the simulator to calculate the percentage of reliable nodes (PRN) in the uplink graph and test PDR and average latency by tracking the utmost frame number snippet that may be found in wirelessHART's network layer. One gateway was placed in the edge of a 20 \(\times\) 20 m field, with two access points located 7 m in the left and 7 m to the gateway's right side. The rest of the nodes are planned in organized pathways contracting multipath routing as in our proposed model. Wired and reliable links between the access points and the gateway are considered [60]. The nodes are assigned to numbers based on their distance from the gateway. According to [4], 50% of the nodes were powered by industrial-standard batteries (3.6 V, 17 Ah) while the other 50% of the nodes were line powered. Table 3 shows the NS-2 simulation parameters. Each simulation begins with the gateway and access points start-up. According to the topology's sequence number, after 5 min the first node is activated and followed by the rest of the nodes each i minute time interval. Listening to the channel for advertising packets by a node from its default parent (DP) happens before joining the operation. After entering, it demands bandwidth from the network manager, receives configurations (links and routes), and begins transmitting sensor measurements to the gateway over a 32-s cycle. Every 15 min, health reports are submitted, and the network manager performs a battery life polls each 1-min time interval. This routine of management is run every 10 min or when a new device enters the network. Simulation parameters used in [24; 26] are considered in this simulation. Figure 5: Proposed network structure of the deployment. ```
1:\(\text{\bf Input: Dimension of factory: }W\) meters \(L\) meters; Location \((X_{i},Y_{i})\) of all field devices, \(i\in\mathbb{N}_{D}\); T triangle cells edge length. 2:Set of multipath routers \(\mathbb{N}_{R}\) with their positions \((Xj,Yj)\), \(j\in\mathbb{N}_{R}\)
3:convert the factory area into grid of T length edge triangle cells, and obtain the positions \((X_{p},Y_{q})\) of each vertex \(v,v\in\mathbb{N}_{V}\). 4:Calculate: the least link H number \((a,b)\) between two random nodes, \(a,b\in\mathbb{N}_{V}\)\(U\)\(N_{D}\)
5:Figure out the vertices that satisfies \(\underset{j\in\mathbb{N}_{V}}{\text{argmin}}\)\(\underset{H(j,1)=1}{\sum_{i=1}^{\mathbb{N}_{D}}}\)\(H(i,j)\) to represent the location of access point number one \(A1\) LOOP Process
6:for field device \(I\in\mathbb{N}_{D}\)do
7:Figure out the closest vertices of the two neighbors \(R1\) and \(R2\), where \(R1\), \(R2\in\mathbb{N}_{V}\).