Intelligent Power Management System Using Hybrid Renewable Energy Resources and Decision Tree Approach †

: Optimal power usage and consumption require continuous monitoring, forecasting electric energy consumption and renewable generation. To facilitate integration of renewable energies and optimize their resources, new communication and data processing technologies are used in new projects. This article shows the works and results obtained in the eoTICC project. The objective is to design and develop an intelligent energy manager using the Archimedes wind turbine and a solar generation system, both integrated in industrial and residential power facilities. Solutions based on Artiﬁcial Intelligence paradigms and Internet of Things protocols allow automatic decision making to optimize energy management. In a facility, the energy demand and weather forecasts can be known by an intelligent energy manager. With these conditions, the energy manager can develop rules based on decision trees to automate control actions aimed at optimizing the use of energy. This article shows the architecture of IoT infrastructure and the ﬁrst rules designed in the project. The result obtained provides improvements in the use of renewable energy in current facilities that do not use this type of intelligent management. The improvements allow to use the energy at the time of generation, avoiding unnecessary storage.


Introduction
The energy sustainability of urban models is currently one of the major challenges. The vast majority of the buildings have been designed under structural, economic criteria or standards of habitability and functionality, leaving aside its ability to produce enough power to meet the demand of users. The current advances in Microgeneration technology and the different techniques for the rationalization of energy consumption, makes it possible to future buildings to reach a proper balance. EoTICC project develops an IoT infrastructure to optimize power management in domestic and industrial facilities that use power supplier, wind and solar generation. Figure 1 shows power consumption and IoT model used in this work.
The Internet Network was originally designed in a client-server model, where the client was always the initiator of the request. Devices initiate the communication whenever they need to push data to the cloud. In IoT applications the server needs to push data to a client without the client first making a request. Software developers have come up with some techniques to overcome this challenge. In this work, adapted protocols are used to optimize communication services [1]. IoT needs protocols adapted to the new requirements. Traditional protocols are extended and new protocols are proposed offering different options on different contexts. IoT has now a wide range of applications. In [2] a review and comparison of different communication protocols in IoT is realised. This comparison aims at presenting guidelines for the researchers to be able to select the right protocol for different applications. Choosing the most appropriate protocol depends on several facts of which most important are: environmental conditions, network characteristics, the amount of data to be transferred, security levels and quality of service requests [3]. MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.
For example, it has been used in sensors communicating to a broker via satellite link, over occasional dial-up connections with healthcare providers, and in a range of home automation and small device scenarios. It is also ideal for mobile applications because of its small size, low power usage, minimised data packets, and efficient distribution of information to one or many receivers [4]. MQTT is a many-to-many communication protocol for exchanging messages between multiple clients, it is a protocol suitable for this project. In different works [5][6][7] Message Queuing Telemetry Transport (MQTT) protocol is proposed as communication paradigm between sensors, actuators, communication nodes, devices and subsystems. Energy usage prediction plays an important role in building energy management and storage. Building energy prediction contributes significantly in global energy saving as it can help us to evaluate the building energy efficiency.
Artificial Intelligence (AI) based methods are popular owing to its ease of use and high level of accuracy. In [8,9] recent developments in the AI-based approaches for build energy used prediction are discussed. This paper conducts an in-depth review of single AI-based methods such as multiple linear regression, artificial neural networks, and support vector regression, and ensemble prediction method that, by combining multiple single AI-based prediction models improves the prediction accuracy. In [10] energy consumption in houses is discussed and an AI solution is proposed to provide robust energy allocation. Robust linear programming is implemented. A scenario-based approach is implemented to face this robust optimization problem.
Pattern recognition paradigm is used in [11] to obtain disaggregated power consumption interpreting human activity. Non-intrusive load monitoring, design based on Wavelet Transform (WT) processing and Field Programmable Gate Arrays hardware (FPGA). Human activity is classified using Hidden Markov models (HMM). In [12] proposed a system that can automatically achieve energy management by controlling electric appliances.
Other work [13] presents a system that has the capability to deduce human activities from appliances being used and the variation of their states using IoT paradigm. Finally in [14] a study of power management techniques for Internet of Things.

Internet of Things and Artificial Intelligence Infrastructure on eoTICC Project
This work proposes an infrastructure based on the Internet of Things communication protocols used for energy management in residential housing with wind, solar and power supplier facilities. The objective is to develop decision tree algorithms capable of managing the energy resource available depending on power consumption curve detected to optimize self consumption and avoid energy storage. This is the first experimental work of eoTICC project. The platform communication follows a pattern based on an IoT model: Device-to-gateway (RFC7452 [15]). Over this pattern, edge layer computing is developed. The platform is based on three elements (shown in Figure 3): • Things. Today there are millions of things (sensors/actuators and devices found in commercial and industrial settings) connected directly through wireless networks and accessing the Internet. Usually, the IoT solutions have things filtered and managed using data locally and/or connected to gateways that provide extended functionality. Basic devices are tagged like things. Each thing has data that can be shared in the Internet. • Local Gateway. Most of existing things were not designed to connect to the Internet and cannot share data with the cloud. To resolve this difficulty gateways act as intermediaries between things and the cloud, providing the needed connectivity, security, and manageability. • Network and Cloud. Cloud infrastructure contains large pools of virtualized servers and storage that are networked together. IoT solutions run applications that analyse and manage data from devices and sensors in order to generate services that produce information used in decision making.
The solution will be analyzed for the energy management of a residential housing with a power consumption of 9 KWh/day. The installation of micro generation includes an Archimedes wind turbine and 3 photovoltaic panels with a 180 W peak power.

Materials and Methods
This work uses an electrical consumption curve in a house with 110 m 2 of useful area, with a distribution of 3 bedrooms, living room, kitchen, gallery, 2 bathrooms and 4 inhabitants. Figure 2 shows power consumption daily in residential house captured by IoT node processing (learning phase). Device architecture model is shown in Figure 3. An embedded device (Raspberrypi) used as an IoT node and Python language to develop control algorithms are deployed in the first prototype. There are three processes implemented on IoT node: • Learning power consumption patterns • Forecast power consumption and forecast power generation.
• Home appliances control using forecast data and decision trees.
Critical applications and basic control processes should be installed in IoT node. Web services, HMI interfaces or analytic applications could be installed on internet/intranet cloud. Other extended services and applications are developed using Internet. Things (sensor meters and actuators) and Cloud services are distributed, communication and IoT node provide the resources to integrate and to make them interoperable. In this work MQTT protocol is proposed as communication paradigm between devices and nodes. Algorithms in python language capture, processes and communique data. Power consumption analysed with power meter connected to IoT node determines three levels of power consumption and different patterns depending on the time of day (Figure 2). Installation of microgeneration is composed of 3 photovoltaics panels model Damia Solar 180 w 24 V monocrystalline. This turbine is designed by Ecopower Solutions company and is characterized by the unique design of its blades rotation based on the spiral of Archimedes. This geometry originates an aesthetic visually pleasant, very different from the conventional turbines.
To understand the relationship between power and wind speed to determine the required control type, optimization, or limitation. Figure 4 contains an ideal wind turbine power curve. The power curve specifies how much power you can extract from the incoming wind. The Archinmedes wind turbine has a diameter of 1.4 m and a maximum of 1.8 kW peak power Figure 5. The power curve is split into three distinct regions [16,17]. Because Region I consists of low wind speeds and is below the rated turbine power, the turbine is run at the maximum efficiency to extract all power. In other words, the turbine controls with optimization in mind. On the other hand, Region III consists of high wind speeds and is at the rated turbine power. The turbine then controls with limitation of the generated power in mind when operating in this region. Finally, Region II is a transition region mainly concerned with keeping rotor torque and noise low.  Kyung Chun Kim et al. [18] highlighted its operation at low speeds, its ability to passively orient themselves using the drag force, and the low level noise generated. The architecture of this wind turbine takes advantage of the drag and lift forces to generate rotation. The most important features of the curve of power provided by the manufacturer are summarized in the Table 1.

Results
Photovoltaic Geographical Information System software (PVGIS) is used to estimate production through solar resource, which calculated the radiation from images by satellite. In our case, the location is just outside of the town of Crevillente, in the province of Alicante (Spain). The optimum angle for our location in the month of May is 13 degrees, however the annual optimum angle is 34 degrees. Therefore, this last value is used by default for the calculation. Monthly radiation with this tilt is 6650 Wh/m 2 /day. The production estimate is 6.43 kWh/day using a operating factor of 0.9.
In the case of wind power, data come from an anemometer station near to the designated location. Data taken at 10 m high with a 2 min interval. Surface breezes have a turbulent nature, low energy density, intermittent and reduced speed. The average speed of the wind during the day May 20th was 4.53 m/s. (Figure 6). The Table 2 shows the estimation of electricity generated hourly depending on the energy resource and the total produced. In this table power consumption is compared with power generation. These data are analysed by IoT node to develop decision trees that optimize power management. The method proposed is: • Iot node connects to open weather services to obtain hourly weather forecast.
• Solar and wind data are analysed.
• Power generation is estimated.
• Power consumption is calculated and an algorithm with decision trees decides control actions. Figure 7 shows graphic generation data on Table 2 and consumption data. There are three characteristic zones analysed. If the consumption is higher than the production the system monitors. If consumption is less than production, generation must be used in selected loads to take advantage of and optimize. If there are two previous conditions in the same processing, the system uses shorter response times to reduce the time.  The IoT node implements different modules (processes based on language Pyhton libraries and Linux OS) that use data (Things) hourly and each minute using communication protocols (MQTT, HTTP) in local and cloud services ( Figure 8): 1. Process 1: Data capture. An algorithm captures system data: rpm wind turbine, wind and solar energy generated, power consumption, ambient data, controllers and other. This algorithm communicates these data to cloud and other control processes. 2. Process 2: Forecast. Hourly algorithm that is connected to open internet weather data. This algorithm calculates the power generation and consumption forecasts. It uses rules based on decision trees. The first decision tree is shown in Figure 9. 3. Process 3. Decision tree and control. This algorithm controls the installation: start/stop, security and others. Decision tree data allows processing different control strategies.

Process Cloud services.
A cloud platform is used to implement dashboard monitoring, storage and control. An OS multi thread like Linux must be used to implement different algorithms on different times of processing. Sensors and actuators are standard devices integrated and inter-operatives. Standard communications protocols ensure capture, processing and data storage. . First decision tree that calculates, hourly, different forecast on the facility. The aim is control power loads and renewable devices to optimize the use of renewable energy. The output of this decision tree are three possible scenarios, which are shown in the previous Figure 7. The result, every hour, is used as input to the energy management system. If generation > consumption, electric devices (loads) must be connected to exploit energy. if consumption > generation, no control actions are taken. If consumption and generation can be different the forecast time, control in real time must be implemented.

Conclusions
In this work a new method to optimize power generation use (wind and solar) on self-consumption infrastructures is proposed. A residential installation is implemented using standard solar panels and Archimedes wind turbine. It is a first experimental work developed on eoTICC project. This experimental work allows to show that using IoT and AI paradigms the power generated can be managed optimizing its use. In future work new decision trees will be designed and implemented. A feedback of this first prototype will be analysed and new design requirements will be identified.