http://www.press.ierek.com ISSN (Print: 2537-0154, online: 2537-0162) International Journal on: The Academic Research Community Publication DOI: 10.21625/archive.v2i4.387 Energy Efficient Smart Wireless Sensor Network for Border Monitoring Islam W. Mahdy1, Mohamed M. Elkhatib2, Mohamed A. Refky3 1Cairo University 2Military Technical College 3Cairo university, Egypt. Abstract The main concern of wireless sensor network is the flexibility and the power to execute different control tasks. This paper presents low power flexible controller for an intrusion detection using power gating technique to reduce the static power loss and fuzzy logic controller, the input signals are proceeded from a PIR, an acoustic and magnetic sensors, the output is presented as an alarm to define the kind of the intrusion. The system behavior is simulated using MATALB-SIMULINK. © 2019 The Authors. Published by IEREK press. This is an open access article under the CC BY license (https://creativecommons.org/licenses/by/4.0/). Keywords Wireless sensor network; intrusion detection; fuzzy logic. 1. Introduction Wireless sensor network (WSN) is a powerful tool to fill the gap between the physical (pressure, temperature, humidity) and digital worlds[1], as it can gathers information from physical environment such as temperature, pressure, noise even image and communicate these information to logical devices. WSN is considered very essential in several aspects such as medical and military applications especially in border monitoring. In border monitoring[2], the role of WSN focuses on gathering information from several types of sensors such as seismic, camera, PIR, magnetic, and motion detectors and then processing these data through programs to give the suitable alarm for each case. WSN has the advantage of low cost and low power, WSN consists of hundreds or may be thousands of wireless sensor nodes, which are distributed in an extended geographical area, so it is hard or impossible to replace or refill the battery of the node, so the effective solution is to equip each node with at least one energy harvesting system and let these nodes to be totally powered from this energy harvesting system, and we have to reduce the power consumption of the node through low power sensor based architecture and reducing the monitoring requirements or monitoring cycle. In this chapter three sensors PIR, acoustic, and magnetic sensors are implemented in one node, the consumed power can be reduced by controlling the monitoring cycle that does not make sensors ON all the time, and by pg. 387 https://creativecommons.org/licenses/by/4.0/ Mahdy / The Academic Research Community Publication using the power gating technique, the data of the three sensors are then processed to the fuzzy logic system to give the suitable warning alarm and decision. 2. The main idea of the proposed system The main idea of the proposed system as shown in Figure (1) is based on controlling three different kinds of sensors, PIR sensor which is the primary sensor of the system, acoustic sensor, and magnetic sensors using two techniques the monitoring cycle, and the power gating technique Every fifty seconds the system deactivates the power gating of the PIR sensor and connects it to the energy harvest- ing source, the PIR sensor is ON for ten seconds, if the output of the PIR sensor is less than Vth then PIR sensor goes OFF again for a new monitoring cycle, and if the output of the PIR sensor is greater than Vth the sensor remains ON and the system deactivates the power gating of the other two sensors (acoustic and magnetic) and the output of the three sensors are then connected to the fuzzy system controller, which gives the suitable action for the corresponding output, the system then is being reset by the operator and the cycle is repeated. The main idea of the power gating technique[3] is to prevent the leakage current of the inactive blocks, which is achieved either by cutting the ground connection by NMOS transistor or cutting the supply connection by PMOS transistor. In this module we are using PMOS transistor to isolate inactive parts of the module and ensure that no leakage current from these parts. Figure 1. The algorithm of the system. pg. 388 Mahdy / The Academic Research Community Publication The proposed system simulation using MATLAB/Simulink The MATLAB/Simulink of the proposed system is shown in Figure (2) Figure 2. The proposed system simulation in MATLAB Simulink. Every fifty seconds the PIR sensor is on by deactivating the PWR 1, and in case of the output of the PIR sensor is less than the Vth the PIR sensor is ON for 10 seconds. The Acoustic and the magnetic sensors are remaining OFF; in this case the total power saved are about 83% compared to the case of remaining the PIR sensor ON all the time. Figure (3) represents the output of scope 1 which represents the duty cycle and the outputs of PIR, acoustic, and magnetic sensors respectively in case of the output of PIR sensor is less than Vth. Figure 3. Scope1 (duty cycle and the output of PIR,acoustic, and magnetic sensors). In case of the output of the PIR sensor is greater than the Vth, the PIR sensor remains ON by the switch shown in Figure(2), the switches PWR2 and PWR3 of the acoustic and magnetic sensors are then deactivated. Figure (4) represents the output of scope 1 which represents the duty cycle and the output of PIR, acoustic, and magnetic sensors respectively in case of the output of PIR sensor is greater than Vth. pg. 389 Mahdy / The Academic Research Community Publication Figure 4. Scope1 (duty cycle and the output of PIR,acoustic, and magnetic sensors). In this case the PIR sensor is ON all the time and the outputs of the 3 sensors are then passed to the fuzzy logic controller system. 3. The fuzzy system controller Fuzzy logic is usually useful in linearity and time invariance[4], the control of fuzzy system is basically depends on the human knowledge and experience about the system. Fuzzy logic system consists of 3 main parts:- Fuzzification[5]: converts crisp inputs to corresponding linguistic values. Rule base[6]: consists of a group of IF – THEN rules which are based on the knowledge. The IF part is called conditions, and the THEN part is called conclusion. Defuzzication[7]: when all conditions of the rule base are activated and evaluated, then they are combined into one output signal. In the proposed system the Mamdani[8] type fuzzy system with three inputs and four outputs are used. The three inputs are representing the outputs of the three sensors, and combined together with AND method. The outputs are calculated with centroid method, as shown in Figure (5) Figure 5. Three inputs and four outputs the fuzzy system controller. pg. 390 Mahdy / The Academic Research Community Publication Every sensor has three symmetric membership functions, Figures (6), (7), and (8) represents the value of the output voltage of each sensor in the X axis, and the Y axis which represents the membership function degree of each input which varies from (0 to 1). The first and last membership function is trapezoidal and the middle one is triangle, the choice of the membership function depends on application or controlling system, trapezoidal and triangle membership functions are simple and more flexible, and need a small amount of data to define the membership functions. Figure 6. PIR membership function pg. 391 Mahdy / The Academic Research Community Publication Figure 7. Acoustic membership function Figure 8. Magnetic membership function pg. 392 Mahdy / The Academic Research Community Publication The following table represents the description of the membership functions of each input. Table 1. Descriptionof the membership functions of each input. Input Name Values Left Center Right PIR sensor Low 0(trap) 1.25 2.5 Medium 1.25 2.5 3.75 High 2.5 3.75 5.5(trap) Acoustic sensor Low 0(trap) 1.25 2.5 Medium 1.25 2.5 3.75 High 2.5 3.75 5.5(trap) Magnetic sensor Low 0(trap) 1.25 2.5 Medium 1.25 2.5 3.75 High 2.5 3.75 5.5(trap) The output of the fuzzy system consists of four alarms (no danger, animal, human, and vehicle). Each output consists of three symmetric membership functions (low, medium, high) as shown in figure (5), The defuzzication method is centroid method because it gives an accurate result based on the weighted values of several membership functions[9]. The following table represents the description of the membership functions of each output. Table 2. Description of the membership functions of each output. output Name Values Left Center Right No danger Low 0(trap) 25 50 Medium 25 50 75 High 50 75 100(trap) Animal Low 0(trap) 25 50 Medium 25 50 75 High 50 75 100(trap) Human Low 0(trap) 25 50 Medium 25 50 75 High 50 75 100(trap) Vehicle Low 0(trap) 25 50 Medium 25 50 75 High 50 75 100(trap) The rule base of the system which depends on the human experience and knowledge consists of 27 IF-THEN rules, which represent all possible inputs of the three sensors and combined together with AND method, as shown in figure(9). Figure(10) represents the rule View of Input and the calculated outputs according to the inputs, for example when the inputs of the three sensors are 2.5V for PIR sensor, 1.5V for acoustic sensor, and 1.5V for magnetic sensors the outputs will be 11.5 for no danger, 48.5 for animals, 30 for human, and 30 for vehicle. pg. 393 Mahdy / The Academic Research Community Publication Figure 9. Rule editor of input/ output membership functions. Figure 10. Theinputs and the corresponding outputs pg. 394 Mahdy / The Academic Research Community Publication In the MATLAB/Simulink of the proposed system as shown in Figure (2), scope (2) represents the values of the outputs after proposed in fuzzy logic system. For the input value of PIR sensor equal to 5 volt the sensor remains ON and activates acoustic and Mag. Sensors, for the outputs of the sensors equal to (5,5,5) volt respectively the output as shown in figure (11) will be 19.2% for no danger, 50%for animal, 80.8% for human, and 80.8% for vehicle, therefor the final result in this case will be for vehicle intrusion. Figure 11. The corresponding outputs of the three inputs(5, 5, and 5) And for the input value of PIR sensor equal to 3.5 volt the sensor remains ON and activates acoustic and Mag. Sensors, for the outputs of the sensors equal to (3.5, 2.5 and 1.5) volt respectively the output as shown in figure (12) will be 20.2% for no danger, 56.9% for animal, 74.5% for human, and 43.1%for vehicle, therefor the final result in this case will be for human intrusion. Figure 12. The corresponding outputs of the three inputs(3.5, 2.5 and 1.5) And for the input value of PIR sensor equal to 2 volt the sensor will be ON for 10 seconds and then goes OFF, the acoustic and Mag. sensors will remain off and the output as shown in figure (13) will be 62.9% for no danger, pg. 395 Mahdy / The Academic Research Community Publication 55.4% for animal, 37.1% for human, and 21.2% for vehicle, therefor the final result in this case will be for no danger or for animal intrusion. Figure 13. The corresponding outputs of the three inputs (2, 0, and 0) 4. Conclusion Saving power is an important goal for wireless sensor network which can be achieved by reducing the monitoring cycle of the system; power gating is one of the most efficient methods to reduce the static and dynamic energy loss. Fuzzy logic control is a good solution for non-linear and complicated design that provides robust and reliable control. Fuzzy logic control resembles human decisions and has the ability to generate precise solutions from the gathered information. This system can save power by 83% compared to the systems that make sensors on all the time. 5. References 1. Molina-Pico, Cuesta-Frau, D. Araujo, and A. Alejandre, ” Forest Monitoring and Wildland Early Fire De- tection by a Hierarchical Wireless Sensor Network,” J. Sens. 2016, 2016. 2. M. Hammoudeh, F. Al-Fayez, H. Lloyd, R. Newman, and A. Bounceur, ”A Wireless Sensor Network Bor- der Monitoring System: Deployment Issues and Routing Protocols,” IEEE SENSORS, vol. 14, NO. 8, OCTOBER 2016. 3. V. C. Kalal, R. K, and V. Pawar, ”Novel Low Power Logic Gates using Sleepy Techniques” International Journal of Advanced Research in Electrical,” Electronics and Instrumentation Engineering, vol. Vol. 4, Issue 1, January 2015. 4. N. Sadati and R. Ghadami, ”Adaptive fuzzy sliding mode control using multiple models approach,” IEEE International Conference on Engineering of Intelligent Systems, Islamabad,2006 pg. 396 Mahdy / The Academic Research Community Publication 5. T. Ross, ”Fuzzy Logic with Engineering Applications,” McGraw-Hill, U.S.A., 1995. 6. R.R YAGER and D. P.FILEV, ”Essentials of fuzzy modeling and control,” John Wiley & Sons, 1994. 7. M.Sugeno and G.T.Kang, ”structure identification of fuzzy model,” fuzzy sets and systems, vol. 28, pp. 15-33, 1988. 8. E. H. Mamdani and S.Assilian, ”application of fuzzy algorithms for control of simple dynamic planet,” proceeding of.IEEE, vol. 12, pp. 1585-1588, 1974. 9. W. Pedrycz, ”Fuzzy Control and Fuzzy Systems, second edition,” John Wiley and Sons, New York,, 1993 pg. 397 Introduction The main idea of the proposed system The fuzzy system controller Conclusion References