Internet of things and fuzzy logic for smart street lighting prototypes

ABSTRACT


INTRODUCTION
Street lights today consume a lot of energy due to the poor intensity and efficiency controls [1], [2]. The current problem with conventional systems is long operating hours which cause a lot of electricity costs and are a big waste if not taken seriously [3]- [5]. Currently, streetlight technology, especially in public buildings, is still relatively traditional with minimal means of measuring how much light enters the street and the old reliability standards and sometimes does not take advantage of the new technical growth [6], [7]. Efforts have been made to efficiently consume public street lighting energy [8].
Interactions that do not require physical touch and the ability to send or receive data over a network because of its association with the environment can be defined as the Internet of things (IoT) [9]. IoT has automatic remote control capabilities that have a dominant impact on energy efficiency and organized energy management [9]- [12]. Fuzzy logic is currently increasingly used in various studies [13]- [15]. Comprehensive utilization of IoT and fuzzy logic functions can produce smart systems. The demand for smart street lighting for developed roads and highways has increased [16]. In this research, IoT is used to monitor and control lamp conditions in two conditions and to read the value of lamp light intensity so that they can monitor lamp damage conditions. The ability to monitor using IoT is combined with the use of fuzzy logic to adjust the light intensity automatically based on the presence of cars and pedestrians. A prototype was made to test the function of each part. Testing and analysis are performed on the use of the IoT function and fuzzy logic. System reliability testing, integrated system [17], component layout, some modification of algorithm for increase energy saving, and using the international standard [18] and security [19] for street lighting can be carried out at a later stage.

RESEARCH METHOD
This research resulted in a prototype based on a survey of public road lighting conditions that have been carried out. The survey was conducted to take a road sample that will form the prototype of a smart system. Figure 1 shows the stages of research that have been done. The study of AnkalKote and Shere [20] is aimed at reducing energy consumption and hazardous ambient pollution on highway lighting systems with an intensity regulation dependent on vehicle movements and atom-structural conditions. In Caldo et al.'s research, Arduino microcontrollers were also used to introduce a flushing logic controller to dimming the display [13]. Research from Abdullah et al. [21] has concluded that smart street lighting using Arduino, light dependent resistor (LDR), infrared, batteries, and LEDs have reduced electrical energy consumption by up to 40% to 45% per month. The public road lighting survey in this study uses the direct measurement method for public road samples as shown in Table 1. The data in Table 1 is used to design the prototype of smart street lighting. After the prototype of street lighting was completed, the design of the IoT began. The IoT circuit and working principle for street  Figure 2. Based on Figure 2(a) number 1 can be noted that NodeMCU ESP8266 is in the middle as a processor and provider of data from other components for the Cayenne Android application. The components are divided into 2 parts, namely input, and output. The input part consists of a sensor consisting of light intensity BH1750FVI which is given numbers 3-6 to read the intensity of incoming light, Wi-Fi as a network that is used is integrated with NodeMCU ESP8266. The output part consists of relay number 2 and lamp number 7-10. Figure 2(b) shows the working principle, the compilation of ESP8266 gets the source and command, then the processor in ESP8266 begins to prepare the processing. When pressing the button on the cayenne application is pressed (given a high logic) the ESP will send data to the relay. Based on the data received the relay works to receive the lamp. The BH1750FVI sensor will continue to read the light intensity issued by the lamp and will request the cayenne application on an Android smartphone. If pressing the button on a supported application (given high logic) the light contained in the cayenne application does not match or is less than the specified value, the lamp status is not lit and can be considered as proof of damage to the lamp. If the value obtained is equal to or the specified value, then the light status is determined, and by the data read in the cayenne application, the lamp is estimated to work well.
This section works by reading the light intensity by the LDR sensor. Outside light conditions are read by the LDR whether in a state of high light intensity (bright) or low light intensity (dark) if the sensor gives a signal that the conditions are dark outside then the lamp conditions will light with low intensity (dim) followed by an ultrasonic sensor reading to detect the existence of a human or vehicle, if there is a human or vehicle that is read by an ultrasonic sensor then the sensor will send a signal to Arduino to process the light automatically according to the specified level and will dim after the vehicle passes the read sensor capability. the whole process was designed with the fuzzy logic method. The fuzzy set design in Table 2 shows the intervals for each condition for three variables, namely: light intensity, road conditions, and lamps.

RESULTS AND ANALYSIS
The prototype with the size in Table 1 has been completed as shown in Figures 3(a) and (b) which are the smart street lighting prototypes for layout and 3D design, respectively. This prototype consists of public roads, sidewalks, street lighting, NodeMCU ESP8266, BH1750FVI lux sensors, LDR sensors, ultrasonic sensors, and cayenne android application.

Testing for IoT
This test is carried out to determine the efficiency of the remote device and the average result of data transmission in applications covering all aspects, namely, the response of the lights on (L), the status of the lamp (SL), and the reading of lux (Lx) on each lamp, only with different locations, namely location 1 at the Kembang Kuning village office (1.1 km), location 2 at the Selaeurih gas station (1.3 km), location 3 at the Parcom gas station (2.1 km), location 4 at SMPN 4 Purwakarta (2.7 km), location 5 in Taman Pembaharuan (3.6 km) and location 6 in STS Sadang (6.9 km) with Internet connection outside of different networks installed on ESP8266. Table 3 shows the test results. The average primary reaction time (L1, L2, L3) of adjustment to lamps 1, 2, and 3 is 2, 2.1, and 4 seconds (s) in the test results presented in Table 3 Figure 4 shows the appearance of the Cayenne application during testing.
This test aims to determine whether SL and Lx in the application are functioning properly as an indication of damage to the lamp. From the results of this test, the results obtained in Table 4. Where in this test it can be concluded at number 1 there are no indications of damage to lamps 1, 2, and 3 while at number 2 there is an indication of damage to lamp 1 because at Lx1 there is a value of 0 lux and lamp status is OFF (does not change color) because the lamp does not light up so the lx does not read and the status lights do not work. Figures 4(a) and (b) show the appearance of the android application for the condition of all lights are on and one 1 light is off, respectively.

Fuzzy logic testing
Control system testing with fuzzy logic consists of testing BH1750 lux sensor functions and ultrasonic sensor testing. BH1750 lux sensor testing is performed to read the light intensity conditions on public roads by detecting the light intensity. Ultrasonic sensor testing is carried out to control lighting on public roads by detecting the presence of pedestrians or vehicles. Both test results are shown in Table 5. The test results of applying the planned fuzzy rules will be seen in table 5, especially: 1) if (lux sensor is high) and (ultrasonic sensor is quiet) then (light is off), 2) if (sensor lux is high) and (lux sensor is pedestrian) then (light is off), 3) if (sensor lux is high) and (sensor lux is no vehicle) then (light is off), 4) if (sensor lux is dark) and (lux sensor is quiet) then (light is dim), 5) if (lux sensor is dark) and (lux sensor is Int J Artif Intell ISSN: 2252-8938  Internet of things and fuzzy logic for smart street lighting prototypes (Mindit Eriyadi) 533 pedestrian) then (light is bright), 6) if (lux sensor is dark) ) and (sensor lux is no vehicle) then (light is bright).

Smart street lighting system functional test results and discussion
The smart street lighting system functional test results as shown in Figure 5 show all monitoring and control functions with IoT and fuzzy logic operate as intended as shown in Figure 5(a) test results when the condition is there a vehicle and Figure 5(b) read the status of the lights through a smartphone. Previous studies have completed a prototype for regulating light intensity using passive infrared (PIR), ultrasonic, LDR, and ZigBee modules [22]- [25]. Several other studies have solved the problem of monitoring using IoT. The results of this research combine fuzzy light control with monitoring using IoT. The monitoring system monitors the light state, the strength of light, and also predicts light harm. Control can be done remotely via the Internet. Fuzzy control of the light's intensity has shown results following the design. Table 6 shows the results of the comparison of monthly energy consumption between the fuzzy system and the proposed fuzzy system.

Energy-saving analysis
In this prototype the electric current in the lamp when it is bright is 200 mA with a voltage of 3.73 V, the duration of the lamp turns on at night for 12 hours, and the number of days in a month is 30 days. The power consumed is 746 mW. The electrical energy consumed each month on this prototype is 0.746 x 12 hours x 30 days, which is 268.56 Watt-hours (Wh). As in previous studies, energy conservation is part of this study's intent [26].
Three lighting requirements arise with the use of fuzzy logic in the prototype. The lamp is in dim condition with a voltage of 0.17 V and a current of 40 mA, a light condition with a voltage of 3.73 V and a current of 200 mA, and a dead condition at a voltage and current 0. The length of the lamp is 12 hours at night, and the number of days every month is 30 days. The power consumed during the dim is 6.8 mW and the light is 746 mW. The electrical energy consumed each month on this prototype when dim is 6.8 mW x 6 hours x 30 days, which is 1.22 Wh. Power is consumed in the light of 746 mW. The electricity consumed every month on this prototype is 746 mW x 6 hours x 30 days, which is 134.28 Wh. The total consumption of electrical energy using fuzzy logic is 135.5 Wh. The percentage of savings is 49.55. Comparison of monthly electrical energy consumption on prototypes shown in Table 6.

CONCLUSION
The prototype of smart street lighting has been created and the performance has been evaluated. IoT has been used for functions that consist of reading the value of the light intensity, lamp status, and instructions for turning on or turning off the lights can be done through the cayenne app on the android smartphone. The light intensity has also been controlled fuzzy based on the presence of vehicles and pedestrians. Compared to use without fuzzy logic, an energy-saving study of the prototype suggests that 49.55 percent of electricity consumption can be avoided.