{'fraction_non_alphanumeric': 0.026151058397166624, 'fraction_numerical': 0.006136232600280043, 'mean_word_length': 4.878237714839022, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Energy Attentive and Pre-fault Recognize Mechanism for Distributed Wireless Sensor Network Using Fuzzy Logic Approach

Wireless sensor networks (WSNs) have been transforming over recent years with development in the design of smart real-time applications. However, it presents numerous challenges in terms of fault-tolerant communication, low latency, scalability, and transmission efficiency. It is extremely difficult for WSNs to detect runtime faults since they're unaware of the internal processes at work within the sensor node. As a result, valuable sensed information cannot reach its destination and performance starts degrading. Towards this objective, the proposed mechanism applies a novel pre-fault detection mechanism based on a fuzzy rule-based method for multilevel transmission in distributed sensor networks. The proposed mechanism uses a fuzzy rule set to make routing decisions. A fuzzy decision rule set is proposed to perform routing based on the fuzzy fault count status of a node. The proposed mechanism assists in identifying the fault in advance and determining the optimal routing path to save energy and improve network performance. In accordance with the node fault status, the data transmission rate is finalized to prevent further energy consumption. The results demonstrated that the proposed mechanism performed well on judgment evaluation metrics like the energy dissipation ratio, throughput, packet loss rate and communication delay.


Introduction
The wireless sensor network has a self-organized setup and deploys in a hostile environment where human interference is negligible. In order to get better results from the sensor network, the sensor node needs to remain active for a longer time and should maintain the network connectivity. A sensor network's lifespan is affected by how well it utilizes the available resources, and in particular the battery capacity of the sensor node [1]. Wireless sensor networks face the challenge of minimizing battery consumption. The design of fault-tolerant routing is also a significant challenge for WSNs. Sensor nodes can fail if they are exposed to several environmental threats. The performance of a WSN can be improved by identifying and recovering the defective nodes immediately so that network connections can be maintained. To maintain quality of service (QoS), faulty nodes must be discovered and recovered within a reasonable timeframe. Without adequate control over sensor faults, the quality of services (QoS) of the network continuously let down [2].
Wireless sensor networks (WSNs) have proven to be a promising technology for designing and deploying real-time applications due to their potential to monitor the real world. Wireless radio transducers, supervisor equipment, and storage units comprise the sensors, which are deployed in distributed and dynamic forms [3]. With the rapid development of micro-electronic devices, it is feasible to design sensors with enhanced features, greater reliability, and support a comprehensive set of real-time applications such as target following, natural disaster management, hazardous atmosphere detection, and seismic distinguishing. [4].
In WSNs, instant fault detection due to unstructured and unpredictable behavior is a very crucial issue. The majority of the fault detection methods currently in use, detect only permanent faults during fault diagnosis periods. The sensor node spreads the data to other sensor nodes that are within transmission range, and if acknowledgement isn't received, it detects a permanent fault. The transfer of data to the failure node, however, consumes energy. A pre-fault detection method can be used to restrict this. In order to transmit data correctly, note the energy level of the next node before transmitting. If the energy level is below the threshold, stop the transmission since the node is not able to process the information [5]. In this mechanism, energy is conserved. Using the proposed study, one can detect a permanent fault in low energy networks, a transit fault, and a stuck fault using sensed information in the network, and save energy by adjusting operations accordingly. The results of wireless sensor networks can be improved by using fuzzy logic based decision-making procedures.
It has been demonstrated that fuzzy logic can be used in WSNs because it permits various parameters to be integrated efficiently and produces realistic results [6,7]. Fuzzy logic is the best approach for sensor functionality. A fuzzy logic approach can be applied across a wide range of research areas, beyond what one might expect. The fuzzy logic approach has been used to make decisions about routing data in WSNs when there is a fault. This reduces power consumption and makes network performance much more efficient [8].
The following are the major contributions of the proposed mechanism: • A novel fuzzy logic approach was presented to detect faulty nodes in the target monitoring area categorized into three faults like permanent fault, transit fault, and stuck fault. • The proposed mechanism allows each node to participate in the routing process according to their computing capabilities.
• Enhances the accuracy of fault detection during the data routing process.

Related Work
An overview of the existing research based on fault detection using fuzzy logic systems is given in this section. Based on fuzzy interpretation attributes, Javanmard et al. [9] proposed faulty node detection. The voting technique is used in this case to predict the percentage of faulty nodes. According to the author, the routing protocol aims to detect faults at intermediate nodes as well. The author demonstrates the study by using three parameters, records processing complexity, point-to-point delay, and energy consumption. A fault detection pattern has been proposed for failure nodes in wireless sensor networks by Bhajantri et al. [10]. The simulation model establishes the performance of the distributed fault detection method for fault detection accuracy. A beacon message is periodically transmitted from each sensor node to a neighboring node to know its status. The sensor node keeps track of the neighbor node's energy level, bandwidth, and link competence statistics. Using fuzzy logic estimation algorithms, each node detects faulty sensors during transmission by analyzing the collected measurements.
The authors of this paper [11] have developed a deterministic cluster deployment model that includes a fuzzy optimization algorithm for identifying faulted nodes. The fuzzy estimator is used to discover intra-cluster and inter-cluster faults for various fault categories. It calculates Fault index measures for each sensor and forwards them to the appropriate cluster head. Cluster heads compare their index value to the defined threshold value. If the Fault index measures are less than this threshold value, the cluster is identified as a standard cluster, otherwise, it is considered a faulty node and circulates this information to the neighbor's node. A Fuzzy knowledge-based fault tolerance mechanism is discussed in Sasmita et al. [12]. The study uses an energy conservation sleep state mechanism to conserve energy and a fuzzy rule to detect the fault in the network. Prasenjit et.al [13]. proposed a fuzzy rule-based fault detection mechanism for a scalable network. Grouping and supervision of faulty nodes are none depending on their fault status. Due to uncertainties in the WSN environment, a fuzzy logic approach is utilized to get better results. It categorizes different nodes according to the set of functions and creates a non-fuzzy control to acquire proper sensed value from various types of nodes [13].
Raghunath and Thirukumaran [14] have implemented instant synchronization by finding faulty nodes. This approach is also using a fuzzy-based estimator to identify faults in the routing process. It avoids collisions and reduces delays in communication. It implements a rapid installation system using a fuzzy support approach [14]. Pakdel et. al. [15] proposed cluster head fault detection using fuzzy methods. In this approach, cluster head fault is detected if no response is received in a particular period. A fuzzy logic system is used to select a new substitute for cluster head by considering residual energy and minimum distance node from faulty sensor node [15]. Saeed et.al. (2012) have proposed a fuzzy inference system based on probabilistic theory. In the suggested algorithm only one fault can be identified which is having a different sensing value than expectation using the variable rating method. If the result has substantial change from the rate variables of neighboring nodes then the node is clear as a faulty node [16]. Raja Al Kiyumi et al. [17] has suggested the fuzzy logic-based routing algorithm for heterogeneous networks. The main approach for the proposed model is to enhance the lifetime of distributed networks by reducing energy consumption based on a fuzzy logic approach [17]. Krishna and Rout [18] 1 3 has suggested a fuzzy-based delay-aware routing protocol. A node with greater residual energy, buffer, and available space with node, quality link and minimum distance acquires a chance to become the next suitable node in a data routing progression [18].
ZiQi et al. [19] has proposed a method to select cluster heads using fuzzy logic and circulate the CH selection decision to the base station. This method describes the centralized fuzzy fusion algorithm to perform three events such as cluster initialization, event detection, and event warning phase based on distance, residual energy [19]. Jadav and Vinoth [20] has explained fault recognition mechanism which identifies hardware faults like a transmitter and receiver circuit fault [20].

Problem Formulation
The problem identified in many literature reviews is, if a node is not functioning properly then the node is considered as a faulty node or dead node and they cannot use a recovery mechanism to use the faulty nodes as much as they can. However, we can design a methodology to use the faulty node as per their status of faulty, instead of declaring it as a fault node. This will improve the performance as well as increase the lifetime of wireless sensor networks. The purpose of the proposed work is to know the status of every node in advance and assign the work accordingly. The fuzzy logic approach is used to detect the faulty status of a node like a normal node, the node having less residual energy, the node having a different measured value than neighbor data, and the node not able to give a response in terms of acknowledgment. In the proposed algorithm node fault is recognized in advance and according to that routing path has been decided. This helps to save energy because if we identify any fault after transmitting data then it may create a delay in the data delivery process. Delay in data transmission cannot be tolerated in wireless sensor networks; otherwise, the desired application will fail to take real-time decisions. The proposed algorithm aims to minimize energy consumption by recognizing the fault in advance and enhancing the performance of the sensor network. Fuzzy logic is the most favorable solution to achieve the objectives. Many researchers prove that it gives a remarkable solution when combined with wireless sensor networks. Fuzzy logic uses linguistic parameters which prominently evaluate the performance of flexible parameters of the sensor network. The significant finding from previous research that motivates this work is the inadequate handling of faults in a routing path. In this work, fuzzy-based intelligent fault detection for inter-cluster and intra-cluster communication with an energy recognition routing mechanism has been proposed to improve the lifespan of the sensor network.
In this section, network models and energy consumption mechanisms have been described.

Network Model
A distributed sensor network in the proposed system consists of graph G (S, E) as shown in Fig. 1

3
The Kautz graph structure used in the proposed algorithm is given below. In Fig. 1, node 1 is a source node and node 10 is a destination node. The Paths available for routing data are 1-4-7-10, 1-2-5-9-10, 1-2-5-8-10, and 1-3-6-7-10. Based on residual energy, distance, hope count and fuzzy fault count the path selected for routing is 1-2-5-9-10. But node 9 is found to be faulty after periodic checking fault count. In such a case node 5 chooses the next successor node as per the evaluation parameter. The path selected for source to destination is 1-2-5-8-10 as shown in Fig. 2. Other characteristics, such a different residual energy (Ei). Fuzzy fault count (ffc) is calculated for each sensor node. Data transmission rate (Dr) is calculated based on fuzzy fault count (ffc). A node (Vi) finding the efficient path by considering fuzzy logic pattern analysis (Pi). The relevant abbreviations used in this paper are elaborated in Table 1.

Energy Consumption Model
The amount of energy consumed by each sensor node during sensing operations, transmitting collected data to sink nodes and for receiving data uses a radio model as explained in Ref. [22]. In the proposed energy consumption model, a free space model of multipath channels models is used. The selection of models is based on linking space between source and destination. The free space propagation model is used If the distance between source and sink node is less than the threshold value (do), otherwise, the multipath propagation model is used. The Transmission energy to transmit m-bit message (m) to distance (d) for the free space model is computed by Eq. (1) and for the multipath model is calculated by Eq. (2) as given below.
ETx_elec is the energy consumption for electronics device transmission. ETx-amp is the energy consumption required to transmit data by the amplifier. Whereas, the computation power for the receiver sensor required by the respective sensor node to receive (m) bit message is calculated by Eq. (3).
The Transmission energy ET(m, d) to transmit m-bit message (m) to distance (d) for the free space model is computed by Eq. (1) and for the multi path model is calculated by Eq. (2) as given below. E Tx_elec is the energy consumption for electronics device transmission and E Tx-amp is the energy consumption required to transmit data by an amplifier.
whereas, the computation power for receiver sensor. required by the respective sensor node to receive (m) bit message. is calculated by Eq. (3).
The energy consumption for sensing message (m) over a distance (d) is represented by Eq. (4). If (l) is the data generated by per event in time (t) sec and (α) is the total number of events that happen in time (t) sec then energy consumption for the sensing procedure is computed by Eq. (5) and transmitting the sensing data is given by Eq. (6).
The remaining energy Ei(res) of sensor node is evaluated by Eq. (7) as given below: where, (E int ) represents energy initialization of sensor nodes. (Ntr) denotes the number of data transmitted rounds, (Etr) represents transmitted energy. Whereas (Nre) indicates the number of rounds the node receives the data, (Ere) is the total energy required for the receiver operation. Similarly (Ni) and (Ns) represent how many times the node is in ideal

Energy Aware Pre-fault Recognition Mechanism Using Fuzzy Logic Approach (EAPFM)
The working model of the proposed fuzzy-based energy-aware pre-fault recognition routing mechanism (EAPFM) has been presented in Algorithm 1. The proposed algorithm calculates the fuzzy output values as a data transmission rate and best node for routing data. For pre-fault detection, fuzzy fault count (ffc) for every node is calculated to decide fault values like low, moderate, or high to select the best routing path from source to destination. The proposed Fuzzy logic approach uses pattern analysis based on the threshold value. The minimum and maximum threshold values for residual energy are considered. The parameters which are considered to update the fuzzy fault count are energy threshold value, sensing data value, and distance. If the energy of a particular sensor is below the threshold value or sensed data is out of range of sensing range value then fault count (ffc) is incremented by one. If the fault count of the sensor node is above the high range then that node is considered as a permanent fault, otherwise, it counts as moderate or low, accordingly, the data transmission rate is calculated to enhance the network lifetime and suitable best path for transmission. Following metric is used to evaluate the performance in the proposed algorithm: a. Residual energy This evaluation metric measures the instantaneous battery capacity of a node. According to battery level, the routing decision has been taken to avoid the permanent failure of a respective sensor node. Routing rules of the proposed mechanism considered this metric to identify a favorable path that has adequate total energy capacity from source to destination [22]. b. Hop count From source to destination reference hop count and distance are calculated using Euclidean distance. While selecting any node for identification of the best suitable path distance and hop count is considered. c. Sensor sensing range Based on the sensing value of node routing decision has been taken. If a particular sensor node is giving value as per expectation i.e. within average range of neighbored node then the node is considered otherwise it comes under faulty and not recommended for routing. d. Fuzzy fault count The fault count of every node is computed based on residual energy, hop count, sensing value of each node. Based on fuzzy fault count fault status, consider and take routing decisions and decide the data transmission rate to avoid permanent failure of nodes and save energy required for re-transmission.

Fuzzy Logic System
Fuzzy logic system (FLS) is a non-linear pattern mapping [16] system. The pattern analysis is done with a fuzzy set that extends the conception of crisp sets. The fuzzy set has a membership function. The fuzzy systems are accompanying with the four components namely fuzzifier-it takes crisp inputs (µ(E), µ(S)) by using the membership functions, the fuzzy rules -which are expressed if-then rule, fuzzy inferences-the fuzzy inference associates the fuzzy rules to obtain an accumulated fuzzy output and finally the defuzzifier maps the fuzzy output back to a crisp data that can be used to take productive decisions [23]. The block diagram is shown in Fig. 3. In this proposed work, the input parameters for the fuzzy logic-based fault detection prediction mechanism are residual energy, data sensing value, and hop count in terms of distance. The fuzzy input/output variables and linguistic factors are presented in Table 2. The fuzzy decision-making rule set is described in Table 3. The linguistic factors low, medium, and high for residual energy and sensed data input variables are used. The fuzzy set defines the distance input in terms of close, adequate, and far. The fuzzy system output variable is to select the best node for routing data in an energy-efficient way. The linguistic variables low, weak, medium, strong and very strong are considered    Fig. 4a-c respectively. The membership function for the output variable is shown in Fig. 5.

Simulation Results
The proposed model comprises a heuristic dispersed heterogeneous network with variable loads. To assess the efficiency of proposed algorithms various simulations have been carried out in NS2. In the network model, heterogeneous sensor nodes are used concerning battery capacity, transmission and reception data capacity and communication capacity is of duplex type. The evaluation parameters are considered for different combinations of fuzzy input i.e. threshold residual energy, sensing data, and maximum hop count distance.
The simulation parameters are shown in Table 4 and experimental results by considering different scenarios have been presented in Tables 5, 6 and 7. The results are compared with   some of the proactive routing protocols. We performed the simulation of the network based on two aspects. One is the energy consumption of every node in the simulation period and the second packet delivery ratio in case of node failure. The performance evaluation matrices for those two aspects are.

Fuzzy fault count
The ratio of fault count of every node based on residual energy as well as a data value in the network. 2. Data delivery rate The ratio of data delivery rate based on the status of fault like low, moderate, or high. 3. Energy consumption of network Energy consumed per event by each node in receiving and sending data packets throughout the simulation period.
In the proposed fault recognition procedure, the routing decision has been taken using a fuzzy logic mechanism to minimize the energy consumption, reduce packet drop ratio and, reduce the delay and enhance the network lifetime. Table 5 describes the comparative performance results with a different number of communications in terms of delay. Figure 6 shows the graphical representation of the average end-to-end delay of the packet. The average delay is shown in Fig. 7. It is observed that using the proposed mechanism the delay in communication is reduced. The primary focus of wireless sensor networks is to deliver data in a stipulated period Quality of Service is very important in WSN. During fault recognition minor delay will occur in transmission but when compared with traditional methods like AOSD [24], REFER [25], DPFDRM [22], and FBFTN [10], the delay in the proposed mechanism [EAPFM] is significantly reduced. It can be observed that the proposed fuzzy logicbased fault tolerance mechanism performs better than the traditional algorithm. Table 6 describes the performance results within a different number of communications in terms of energy consumption. Figure 8 shows the graphical representation of the energy consumption ratio in different numbers of communications. The average energy consumption is shown in Fig. 9. From the simulation results it is observed that, in the proposed approach the energy depletion ratio is less as compared to another algorithm. The throughput and packet drop ratio from sender to receiver is shown in Tables 7 and  8 respectively.
Similar comparison is done for other QoS parameters like throughput and packet delivery ratio. Results of this comparison can be observed from Tables 7 and 8 respectively. Figures 10 and 11 show the graphical comparison of the throughput and packet delivery ratio of the proposed fuzzy-based network mechanism with the traditional methods.
It can be observed that the proposed model outperforms other models for all the QoS parameters. Thereby making the system applicable for real-time use in high performance, low energy, high security, and high transparency wireless applications, which include mobile adhoc networks, vehicular adhoc networks, IoT networks, etc.

Conclusion
Prolonging the network lifetime is the main motivation to design WSN routing protocols. To achieve this objective, the proposed mechanism has a novel approach based on fuzzy logic to reduce delay and an energy-aware pre-fault recognition mechanism to identify the best suitable path for routing. Existing research mainly focuses on the identification of permanent fault detection and consumes more energy in re-transmission. The proposed   mechanism is implemented for a distributed sensor network and recognizes the faulty nodes based on residual energy, hop count distance and if a node sensed value has a significant difference with its neighbor values in a specific period; it would be detected as a faulty node. The proposed mechanism increased the rate of prediction of faulty nodes. The network performance is improved by considering fuzzy decision rules set to restrict the traffic in case of node failure. The extensive simulation result proved that the proposed mechanism reduces delay, packet drop ratio and energy consumption also as compared to AOSD, REFERS, DPFDRM and FBFTN mechanisms. As a future research, we plan to consider mobile sink nodes for fault node data collection to investigate the performance.