# Central Heating Cost Optimization for Smart-Homes with Fuzzy Logic and a Multi-Agent Architecture
###### Abstract  
Recent years have defined the need to reduce gas emissions to fight climate change, and society's move to green energies is important to make responsible use of non-renewable energies. Therefore, it is now important to use technologies to optimize the use of actual energy sources. In this aspect, the Internet of Things (IoT) technology has had a great impact on society. Hence, this research work aims to use IoT technology and multi-agent systems to optimize the use of central heating installation in buildings. It is intended to improve the user's comfort, reduce the consumption of energy and reduce the financial costs. Therefore, a multi-agent system is proposed to collect data from sensors located in a smart-home and obtain the best action to perform in a central heating system. The decisions will be taken by an intelligent agent based on fuzzy logic. This technology will allow for generating the control action with a fuzzy controller. The results obtained show that the proposal improves the actual system in terms of users' comfort and financial and energy savings. cap  
can no longer wait. This is the case with the Spanish government, which recently established a state of climate emergency in order to reduce their gas emissions and obtain a state of zero emissions by 2050 [5]. The location of Spain makes it the ideal country to produce green energy [6]. However, the transition must be progressive, which means that the first steps are to reduce non-green energy and introduce more green energy little by little. However, during the last decade, not only has climate change had an impact on citizens but also the Internet of Things (IoT). This technology has a great impact on cities, homes, and industries by making it possible to monitor the state of these kinds of infrastructures. IoT allows monitoring the state of living beings, like animals, plants and even human beings. IoT technology consists of placing sensors on a real environment in a distributed way. The sensorization of the environment allows the system to obtain data, and, therefore, information from those entities that the developers of the system want [7]. The information can be processed in the sensor itself (edge computing) [8], or it can be processed in a central system (cloud computing) [9]. In both computing models, data travels from the edge to the cloud; the difference falls on the amount of information/data transferred. Edge computing transfers less data, usually the most relevant, while the cloud computing model usually transfers all the information captured by the sensors. This information is the key to the IoT system. Information is not only useful to monitor the state of the system, but it is also important to act in the system, detect anomalies, and predict the future state of the system between other actions. Hence, the possibilities in this kind of system allow developers to create the perfect system to resolve a real-world problem. It is especially interesting for this article that the information acquired by the sensors or sensor network can provide information on the real context and/or environment in which the sensors are installed. This information can be of great interest for the systems because they can interpret the measured values and associate them with more understandable values for the users of the systems. Therefore, IoT, smart-cities, and smart-home technologies can be extremely useful to improve the effectiveness of industrial systems. This effectiveness can also lead to sustainability effectiveness. Hence, the use of this technology can reduce pollution and greenhouse emissions. The monitorization of several features in this kind of system or architecture can help the developers and the Artificial Intelligence (AI) models to improve the effectiveness of the systems and consume less energy. IoT and AI work together; IoT can extract the raw data from a real environment, and AI is responsible for extracting all the knowledge and information from the raw data.