# Central Heating Cost Optimization for Smart-Homes with Fuzzy Logic and a Multi-Agent Architecture
## 2 Background
### Control and Automation Systems  
Control and Automation Systems (CAS) have been present for more than a century [35]. They are present in our more common automated tasks. CASs can provide a response based on the inputs of the system. Therefore, they are commonly used in big industry systems and automated systems in several kinds of installations, like a heater or freezing system in buildings and homes. There are several types of CASs: proportional controllers, Proportional-Integral controllers (PI), Proportional-Integral-Derivative (PID) controllers and fuzzy controllers. PIDs are very common in industries solutions; however, fuzzy controllers also offer good performance and allow them to control several variables at the time that they produce a unified response.  
Fuzzy systems are based on fuzzy logic. This was first proposed by [PERSON] [36] in 1965. In this research, [PERSON] proposed the basic principles of fuzzy logic, representation and inference, basic rules of inference and the linguistic variables and its applications to fuzzy control. Several works have used fuzzy control systems. Next, some of them are described briefly.  
[PERSON] et al. [37] designed a fuzzy adapted method to improve the response of a scalar fuzzy control system for the speed of an induction motor. They demonstrated that the use of an adaptive fuzzy controller shows improvement against the non-adaptive fuzzy controller. However, the fuzzy control systems are not only applied to classic control problems. They are also applied to the smart-environments that surged after IoT technology appeared. [PERSON] and [PERSON] [38] designed a traffic light control system using a Wireless Sensor Network (WSN) and fuzzy control. For this specific case, the authors designed four fuzzy controls that work in parallel to obtain a better performance, fault-tolerance and support. Their results support the system that allows the vehicle's waiting times to be reduced. Another example of fuzzy logic applied to a smart-environment, in this case to Industry 4.0, is the study developed by the Chinese and Norwegians researchers [PERSON] et al. [39]. The study shows a fuzzy control system analyzing the real-time data information of an assembly line. The fuzzy system has two different fuzzy systems: the first one controls the re-balancing of the assembly line, and the second one adjusts the production rate of each workstation. [PERSON] et al. [40] also developed a smart-home fuzzy control system, in this case, for a greenhouse. They tried to promote a comfortable micro-climate for plants while saving energy and water. For this reason, they developed a smart fuzzy logic control system that uses wireless data monitoring to obtain the output of the system.  
Several works have used fuzzy logic to control heating systems [41; 42; 43]. The studies [41; 42] show a fuzzy controller implemented in an 8-bit microcontroller. The fuzzy logic control is based on the definition of an engineering heuristic to determine the boiler temperature. So, the output of the system is based on a heuristic, not real data. The study [43] defines a fuzzy controller in which only the difference between the current temperature and desired temperature is taken into account. This study collects the data from the current temperature inside a building or house; however, this value is usually integrated into the heating systems. However, these works do not make use of all the potential and options offered by the sensor networks, which could obtain data in real-time and apply it to the fuzzy control system. One of the major advantages of sensor networks is to obtain data intelligently from heterogeneous data sources that can extend the capabilities of the system and improve its performance. In this sense, the work presented must obtain information of the context where the system is located using different types of sensors and make it available to the fuzzy control system. Moreover, with these technologies, it is possible to establish a balance between user comfort and energy saving.