**Mahmoud Elkazaz 1,2, Mark Sumner 1,\*, Seksak Pholboon 1, Richard Davies <sup>1</sup> and David Thomas <sup>1</sup>**


Received: 1 June 2020; Accepted: 1 July 2020; Published: 3 July 2020

**Abstract:** Home energy management systems (HEMS) are a key technology for managing future electricity distribution systems as they can shift household electricity usage away from peak consumption times and can reduce the amount of local generation penetrating into the wider distribution system. In doing this they can also provide significant cost savings to domestic electricity users. This paper studies a HEMS which minimizes the daily energy costs, reduces energy lost to the utility, and improves photovoltaic (PV) self-consumption by controlling a home battery storage system (HBSS). The study assesses factors such as the overnight charging level, forecasting uncertainty, control sample time and tariff policy. Two management strategies have been used to control the HBSS; (1) a HEMS based on a real-time controller (RTC) and (2) a HEMS based on a model predictive controller (MPC). Several methods have been developed for home demand energy forecasting and PV generation forecasting and their impact on the HEMS is assessed. The influence of changing the battery's capacity and the PV system size on the energy costs and the lost energy are also evaluated. A significant reduction in energy costs and energy lost to the utility can be achieved by combining a suitable overnight charging level, an appropriate sample time, and an accurate forecasting tool. The HEMS has been implemented on an experimental house emulation system to demonstrate it can operate in real-time.

**Keywords:** distribution systems; smart home; battery energy storage; energy forecasting; model predictive control; real-time control
