## 5 Conclusions  
In this paper, a MPC home energy management and optimization strategy with demand response was addressed. In this paper, the ON/OFF, proportional-integral-derivative (PID) and Model Predictive Control (MPC) control methods of an air conditioning of a room were compared. The recorded climacteric data for this case study were for the city of Evora, a pilot Portuguese city in an ongoing demand response project. Six different Time-of-Use (ToU) electricity rates were studied and compared during a whole week of summer, with very high temperatures recorded during this period. The overall weekly expense of each studied tariff option was compared for every control method and in the end the optimal solution was reached. Between the compared control methods, the ON/OFF was the costliest option for the consumer while the MPC was the most economic option. When compared to the ON/OFF control option, the consumer saves 9.2% of the energy by choosing the MPC. The MPC also performs better when compared to the PID, since 1.8% can be saved in this case. The results have also shown that tariff Option E was the most economic from the six available. However, results show that the 24 h ToU, Option F, comes in close second and in this case the customer invests 5.2% more when compared with Option E--the optimal solution for the client. By choosing the optimal AC unit control option and optimal ToU rate, the results show that up to 14.2% can be saved. The ToU rate that the consumer should avoid is Option B, which is a two tier ToU rate that is constant throughout the whole summer and is also constant for every day of the week.  
Figure 16: The daily consumed energy by ON/OFF, PID and MPC of the whole studied week.  
Figure 15: The cost of the consumed energy by ON/OFF, PID and MPC of the whole studied week.  
**Acknowledgments:** The current study was funded in part by Fundacao para a Ciencia e Tecnologia (FCT), under project UID/EMS/00151/2013 C-MAST, with reference POCI-01-0145-FEDER-007718. In addition, this work has been supported by the project Centro-01-0145-FEDER-000017--EMaDeS--Energy, Materials and Sustainable Development, co-financed by the Portugal 2020 Program (PT 2020), within the Regional Operational Program of the Center (CENTRO 2020) and the European Union through the European Regional Development Fund (ERDF). [PERSON] acknowledges support by FEDER funds through COMPETE 2020 and by Portuguese funds through FCT, under Projects SAICT-PAC/0004/2015--POCI-01-0145-FEDER-016434, POCI-01-0145-FEDER-006961, UID/EEA/50014/2013, UID/CEC/50021/2013, UID/EMS/00151/2013, and 02/SAICT/2017--029803, as well as funding from the EU 7 th Framework Programme FP7/2007-2013 under GA No. 309048.  
**Author Contributions:** [PERSON] performed the simulations, performed the literature review and handled the writing and editing of the manuscript. [PERSON] contributed with the resistance-capacitance circuit analogy. [PERSON] developed the model. [PERSON] and [PERSON] supervised, revised and corrected the manuscript, coordinating also all the research work of C-MAST/UBI within the scope of the ESGRIDS (PAC Energy) Project SAICT-PAC/0004/2015--POCI-01-0145-FEDER-016434.  
**Conflicts of Interest:** The authors declare no conflict of interest.