FUZZY-BASED SMART SYSTEM FOR CONTROLLING ROAD LIGHTS

Introduction: The energy consumed for street lighting is a major expenditure in urban environments. According to the World Bank, it constitutes up to 65% of cities' electricity costs and 10% of their overall budgets. The demand for lighting is growing significantly due to rapid urbanization, thus eating up even more energy and money unless smarter solutions are deployed to reduce costs. Method: In this paper, a model for street lighting was established, consisting of several lamp posts on both sides of the street. The model was the exact replica of the street lighing system inside the city of Kirkuk, Iraq. The number of objects passing along the street was monitored, both during and out of rush hours.This all was taken into account in the energy consumption calculation. The controller used for this model is Arduino UNO. The Arduino receives signals from 3 IR sensors, processes these signals, and then sends the action to the lamp posts. Fuzzy logic was applied in two cases: the first one is during the daylight, the second one is during the sunrise and the sunset, to control the intensity of the light of the lamp posts. Results: Both cases showed significant results regarding the reliability, efficiency, and countability of the system in decreasing the level of energy consumption. Conclusion: The system can be applicable for smart city projects. It is efficient, cost effective and shows reliable results in saving energy.


Introduction
City authorities see street lights as one of the largest portions of energy costs. Overlit streets waste energy and generate a high level of CO2 emissions and costs. There are some major challenges in street lights that need to be resolved. Sometimes road lamp posts remain ON during the daylight. To manage and reduce that cost, they have to be like hubs of smart technology while helping provide the community with significant energy savings and a safer environment. Some previous studies dealt with smart systems for lights. Several studies regarding smart systems have been implemented. E.M. Diaconu (2021) implemented a basic design for an electronic circuit to a smart system. The system is controlled using an android application and the communication is maintained using the Bluetooth HC-05 module. Kumar et al (2021) came up with an idea to use a PIR sensor to detect motion and an LDR sensor to reduce unnecessary waste of power during the daytime. The idea was good; however, it is only restricted to turning the light ON and OFF. Chenwei et al also designed a system to control lighting using an android application that communicates with the system using the Bluetooth Technique (Feng et al, 1976). The design was easy, efficient and of low cost. Dankan et al used the SLS (Smart Lighting System) based on the IoT technique in order to fully control the system. The main idea of the system is to save more dissipated energy (Gowda et al, 2021). The energy saved reached up to 40 %. A smart system of calibrating energy consumption inside the building was presented by Yerbol et al (Aussat et al, 2022). This system measures illuminance and occupancy from sensors located at each workstation inside the building. The system compares between the illuminance and the dimming level inside the workstation and depending on that the control system will specify the desired illuminance of the bulb. Leo et al used the PIR sensor to detect the occupancy of a room so the system can determine whether the lights are ON or OFF for the purpose of saving energy inside the house or a building (Botler & Sadok, 2016). Arun et al presented a work of full setup for the hardware required for a lighting system inside the room. His idea deals with a system capable of varying light intensities using an Android App which provides better visual comfort for the user (Kumar et al, 2019). Amit et al (Sikder et al, 2018) presented an overview of IoTbased systems for smart lighting for energy-saving enhancement. They review different IoT-enabled communication protocols that can be used in the SLS; the result was the IoT-enabled SLS in both indoor and outdoor settings which can reduce power consumption percent up to 33%. The interesting work of Bozanic et al (2021) in the fuzzy system presents neuro-fuzzy as a method of decision making to support the selection of construction machines. Precup et al (2020) poposed a network control problem solution using fuzzy logic. Some studies regarding the smart lighting system SSL have been established. Francis et al (Montalbo & Enriquez, 2020) used a PIR sensor and NodeMCU V3 with Wi-Fi to detect the occupancy of a classroom, so that the lights will be turned ON and OFF to save more energy. Nursyazwani and his team (Adnan et al, 2019) used IoT technology to control the light in illumination-based human activity. The system measures the intensity of ambient light and controls artificial lights for the comfort of the eye. However, the system controls illumination manually. Another study was conducted by Bevek et al (Subba et al, 2020). The system used Both LDR and PIR sensors to detect the presence of people inside the room and as result, they control the light bulb ON and OFF.
The communication between the sensors and the controllers was achieved using the ZigBee transmitter and the receiver. The system was a traditional one that does not involve fuzzy logic. A description of a smart street lighting system (SSL) as an approach of massive function for smart cities was presented by Vasja Roblek (Subrahmanian & Shastri, 2018). This paper will focus on enhancing the control of a street light system by applying a fuzzy logic algorithm in order to control the ON-OFF status and the intensity level of the light itself in order to save more energy. The idea of using fuzzy logic is based on its easiness in use, program, and uploading to the system with very good results.
The overall view of the system The intelligent street lighting system introduced in this paper consists of a model for a street with lamp posts on each side. The control system ensures efficient control of the light and is energy saving. Figure 1 shows the basic overview of the model.

System structure
The system was constructed using several parts shown in Table 1 below. Fuzzy logic and its application to the problem of saving electricity Using fuzzy logic inside the control system enables controling the intensity of road lights with respect to the intensity of daylight in the sunrise and sunset periods of the day. Fuzzy logic is one of the strongest tools in complex problem solving since this approach to computing is based on "Degrees of Truth" rather than on the usual "true or false" Boolean logic on which modern computers are based. Figure 2 shows the basic difference between Boolean and fuzzy logics (Ghosh & Haldar, 2014;Yusuf et al, 2020;Htwe et al, 2020). Power Saving System Using LDR And PIR Sensor. . Zadeh was working on the problem of computer understanding of natural language. Natural language --like most other activities in life and indeed the universe --is not easily translated into the absolute terms of 0 and 1. Whether everything is ultimately describable in binary terms is a philosophical question worth pursuing, but in practice, much data is required to feed a computer is in some state in between and so, frequently, are the results of computing. It may help to see fuzzy logic as the way reasoning really works and binary, or Boolean, logic is simply a special The architecture of fuzzy logic is shown in Figure 3 below.

Figure 3 -Fuzzy logic Рис. 3 -Нечеткая логика Слика 3 -Фази логика
From Figure 3, there are four main parts of fuzzy logic which will be explained in this section.

Fuzzification
It is the method of transforming a crisp quantity into a fuzzy quantity. This can be achieved by identifying various known crisp and deterministic quantities as completely nondeterministic and quite uncertain in nature. This uncertainty may have emerged because of vagueness and imprecision which then lead the variables to be represented by a membership function as they can be fuzzy in nature (Sofian & Rambely, 2020;Lah & Arbaiy, 2020;Abdul-Adheem, 2020).
For example, if the temperature to be said is 45° Celsius, the viewer converts the crisp input value into a linguistic variable like favorable temperature for the human body, hot or cold.

Rule base
It contains all the rules and the IF-THEN conditions offered by experts to control the decision-making system. The recent updates in the fuzzy theory provide various methods for the design and tuning of fuzzy controllers. These updates significantly reduce the number of the fuzzy sets of rules. Inference engine It helps to determine the degree of match between a fuzzy input and the rules. Based on the % match, it determines which rules need implementing in accordance with the given input field. After this, the applied rules are combined to develop the control actions.

Defuzzification
It is the inversion of fuzzification where mapping is done to convert crisp results into fuzzy results while in defuzzification mapping is done to convert fuzzy results into crisp results.
This process can generate a nonfuzzy control action which illustrates the possibility distribution of an inferred fuzzy control action.
The defuzzification process can also be treated as the rounding off process, where a fuzzy set having a group of membership values on the unit interval is reduced to a single scalar quantity.

Applying fuzzy to the system
The system model shown in Figure 4 is the actual system experimented with within this work. It consists of several lampposts on both sides of the road; IR sensors are mounted between them to detect the motion of objects. Besides, the road lights are switched on and off. In addition, light intensity changes during the sunrise and the sunset. The intensity of daylight changes due to the sun's movement; in these periods, the road light's intensity does not have to be on to the fullest. This is useful for saving energy. In order to achieve that, fuzzy logic is applied since fuzzy logic is based on the "degree of truth" as mentioned before. The sunlight intensity is counted as levels of lighting. These levels are explained in Tables 2 and 3.  Table 2 represents the inputs (Sun Light SL and Cars or Object C) and the output ( LEDs light) linguistic variables for the system. The output indicated in the table above as High, Medium, and Low means the percent of light intensity. The Low output value is 25 %, the Medium value is 50% and the High value is a full 100%. Table 3 represents the fuzzy rule base. The inputs for the system are shown in Figure 5.

Research results and discussion
The results of the system are shown in Figures 6, 7 and 8. Figures 6  and 7 show the output of the fuzzy system, while Figure 8 shows the comparison of the energy consumption between the system with and without using fuzzy logic.

Figure 8 -Difference of SSL energy consumption with and without applying fuzzy logic Рис. 8 -Разница в энергопотреблении умной системы уличного освещения с применением нечеткой логики и без нее Слика 8 -Разлика у потрошњи енергије паметног система уличног осветљења са применом фази логике и без њене примене
As it can be seen in the figure above, the system shows good results in energy consumption since the system takes into account the two important factors, the object (Pass or not Pass) and the intensity level of sunlight. With comparison to the result established by (Gagliardi et al, 2020), the work calculates the daily consumption of energy. The saved energy percent for 10 lamps was about 42 %. The model used in this paper was the exact replica of an actual street with the same number of lamps and the average number of cars that passed in the street during three days of observation. The energy percent saved in this work was 44% for 6 lamps.

Conclusion
The objective of this work has been accomplished. Depending on both types of IR sensors and the application of fuzzy logic which is less used in the research of smart lighting, the problem of energy consumption was solved. The saved energy can be used for lighting other streets or for any other application requiring power supply. From the economic angle, dissipated energy costs a lot -more energy requires more oil for power plants which then leads to more money paid by citizens. The most GLASNIK / MILITARY TECHNICAL COURIER, 2022, Vol. 70, Issue 2 important advantage of this idea is that lights can be controlled at two levels: level one is the ON-OFF control based on passing objects and level two is the control during the sunrise and sunset hours when there is no need for the full intensity of light bulbs. In third world countries, electric power is consumed randomly due to a lack of understanding of power distribution from the station as well as lack of awareness among people to save energy. That is why a smart system is the most valuable option. In the future, the system can be updated by adding more sensors such as cameras and by using image processing in order to monitor the flow of objects inside the street.