## 5 Fuzzy Logic-Based WSN Power Management and Optimization  
The third essential and determining factor that affects the network lifetime is the power management and optimization technique used in turning ON/OFF the sensor nodes, thus prolonging their batteries and extending the network lifetime. Figure 8 depicts the different phases that a sensor node goes through. In a normal situation, it should operate in a sleep mode, where it consumes the minimum amount of energy by shutting down its main functioning peripherals, sensors, and communication modules. These nodes will wake up after a specific time that is normally specified by the application. In this phase, the senor node awakes its peripherals and sensors to capture the data of interest, and then either go back to the sleep phase or transmit the captured data by waking up the communication modules. In what follows, a comprehensive literature review for the recent and most prominent works that utilize fuzzy logic in sensor nodes' power management is presented. [PERSON] et al. [50] focused on the IEEE 802.15.4-based industrial WSN protocol and proposed a new mechanism to control the uptime of the nodes using a fuzzy logic algorithm. WSNs in industry communications undertake high reliability and low power consumption. The basic function of industrial WSN is to generate a highly reliable and self-healing industrial system. Therefore, in order to increase the lifetime of the nodes and network, the authors proposed a new energy management mechanism that is capable of prolonging the network lifetime through a sleep/wakeup policy using a fuzzy logic algorithm. The objective of the mechanism was to build a time-driven approach that woke up the nodes only when they were needed by the application under consideration. The goal of the proposed mechanism was to show how to use a fuzzy logic controller in industrial WSN, and how to increase the lifetime of the batteries of the individual nodes by continuously controlling the individual nodes' energy consumption. The proposed mechanism studies the correlation between the sampled data, and if a high correlation is found, the sampling period is decreased, thus increasing the sleeping time and saving energy. The proposed algorithm called dynamic sampling algorithm (DSA) utilizes four input variables coming from the sensors, namely, the deadline miss ratio, deadline miss ratio desired, old sampling time, and remaining battery capacity, which help the network to manage the energy resources of its nodes. The main goal of DSA is to awaken the nodes only when it is needed for the application that manages and controls their operation. DSA is built on the basis of a fuzzy logic controller, it is linked with the sink node, and in case of large WSN, it is linked with router nodes. Figure 9 depicts the fuzzy controller in the DSA approach, which uses the FLS described in Figure 1. Depicted in Figure 9 are the deadline miss ratio (E), deadline miss ratio desired (DE), remaining battery capacity (RBC), and old sampling time (T) variables, which are the inputs to the controller as analog-digital shape. The variables are then converted to a \"linguistic\" shape on the basis of the membership functions that may be enhanced at the design time. The linguistic values are positive big, positive small, zero, negative small, and negative big. Figure 8: Sensor node different energy-saving modes. These linguistic values are processed using an inference mechanism on the basis of a set of inference rules using a series of IF-THEN statements, which determine the output linguistic values on the basis of the input variables. The output linguistic values need to be transferred by a controller to analog values readable by the sensors. This approach allows the controller to use more input information about the network status. This information gives good accuracy, and therefore yields superior performance in terms of energy-saving and WSN life cycle. Another work presented by [PERSON] et al.