*Article* **Algorithm for Smart Home Power Management with Electric Vehicle and Photovoltaic Panels** †

## **Lucian Ioan Dulău \* and Dorin Bică**

Department of Electrical Engineering and Information Technology, Faculty of Engineering and Information Technology, "George Emil Palade" University of Medicine, Pharmacy, Science and Technology of Târgu Mure¸s, 540139 Târgu Mure¸s, Romania; dorin.bica@umfst.ro

**\*** Correspondence: lucian.dulau@umfst.ro; Tel.: +40-265-233-112

† Presented at the 14th International Conference INTER-ENG 2020 Interdisciplinarity in Engineering, Mures, , Romania, 8–9 October 2020.

Published: 25 December 2020

**Abstract:** In this paper is presented an algorithm for the power management of a smart home with electric vehicle and photovoltaic panels. The case study is performed considering the power demand of the household appliances, the charging/discharging of the electric vehicle, and the power supplied by the photovoltaic panels. The photovoltaic panels have a small installed power and benefit from the support scheme from the government for these types of generation sources, so it is a prosumer. The simulation is performed for a day. Additionally, the cost of power supplied to the consumer is also analyzed.

**Keywords:** electric vehicle; smart house; photovoltaic panels; power demand; prosumer

## **1. Introduction**

In this paper will be presented an algorithm for the power management of a smart home with electric vehicle and photovoltaic panels.

The results will provide the management of power, the power cost for the consumer, and the possible profit for the consumer, respectively.

Other research focused on the following. In [1] it was determined an optimal schedule for the charging of EV based on predicted PV output and electricity consumption. In [2], the priority order between a PHEV, battery and imported power from the grid was determined and the overall cost of the imported grid energy and PEV charging cost was minimized. In [3], the optimal power management in a smart home with photovoltaic (PV) panel, battery, PHEV, thermal and electrical loads [3] was determined. In [4], the smart homes power management system that supports the grid and allows the optimal operation of the home (which has smart appliances, PV, storage and electric vehicle), so the total power costs are minimum. In [5] was performed an optimization of a community energy storage with heat and electricity storage.

In [6], a stochastic energy management of a smart home with PHEV energy storage and PV array was determined, resulting a lower electricity cost for the electric vehicles. In [7] was studied the interactions between electric vehicles and PV. In [8] was minimized the sum of energy costs and thermal discomfort costs for a long-term time horizon, for a sustainable smart home with a heating, ventilation, and air conditioning load. In [9], the design and implementation of a wireless PV powered home energy management system for a direct current environment allowed remote monitoring of appliances' energy consumptions and power rate quality. In [10], an algorithm was developed for the peak load management in commercial systems with electric vehicles. In [11], an energy management system for a smart house based on hybrid PV-battery and V2G was studied. In [12] a hybridized

intelligent home renewable energy management system that combines solar energy and energy storage services with smart home was planned considering the demand response and the power price.

Compared with these studies, in this paper, the analysis will be performed for a day, considering the power demand of the consumer, the electric vehicle charging/discharging, the power supplied by the photovoltaic panels and the support scheme from the government, and the power cost, respectively.

## **2. Algorithm Model**

There are three types of electric vehicles: hybrid electric vehicles (HEV), plug-in hybrid electric vehicles (PHEV) and battery-powered electric vehicles (BEV). In this paper, we will consider a plug-in hybrid electric vehicle. When discharged, the batteries are recharged using the power grid, from a power outlet, but can also supply power to the household appliances if needed. The photovoltaic panels generate power and can be used to supply the house and/or to supply power to the grid. The photovoltaic panels have a small installed power and benefit from the support scheme from the government for these types of generation sources, so it is a prosumer.

The algorithm that is the base of the case study simulation is presented further, considering the cases when the PHEV is charging from the grid (case A), and is suppling power to the household appliances (discharging) (case B).

In case A, if the power supplied by the grid, the PV panels is higher than the power required by the load (household appliances), then the excess power of the PV panels is exported (sold) to the grid, resulting in a profit for the consumer.

$$\mathbf{P\_{grid}} + \mathbf{P\_{PV}} \ge \mathbf{P\_L} \tag{1}$$

where:


The cost of the power supplied by the grid to the load is 0.55 lei/kWh.

$$\text{Consumer Profit} = \text{P}\_{\text{PV}} \cdot \text{cost}\_{\text{PV}} \tag{2}$$

where:

• costPV—cost of power supplied by the PV panels to the grid [lei/kWh].

The cost of the power supplied by the PV panels to the grid is 0.22 lei/kWh.

In case B, if the power supplied by the grid, PV panels and electric vehicle is higher than the power required by the load (household appliances), then the excess power of the PV panels is also exported (sold) to the grid, resulting in a profit for the consumer.

$$\rm P\_{grid} + P\_{PV} + P\_{PHEV} \ge P\_L \tag{3}$$

where:

• PPHEV—power supplied by the plug-in hybrid electric vehicle to the household appliances [kW].

#### **3. Case Study**

The smart house is placed in Târgu Mures, , Romania. The installed power of the PV panels, which are connected to the grid, is 15 kW, so it is a prosumer. The plug-in hybrid electric vehicle is a Toyota Prius. The battery capacity of the PHEV is 8.8 kWh, which requires a regular charging or discharging duration at home of 4 hours (it is considered 2.2 kWh for each hour). The PHEV is typically charged or discharged in the afternoon or during the night. The simulation is performed with the Matlab software.

In Figure 1 is presented the power demand of the household appliances, to which is added the power required to charge the PHEV between 17 and 21 (case A). This results in a total power demand of the load.

**Figure 1.** Power demand of the load (household appliances) and PHEV (case A).

The power supplied by the PV panels during a day is presented in Figure 2.

**Figure 2.** Power supplied by the PV panels.

In Figure 3 is presented the power demand of the household appliances, considering that the PHEV supplies power to the household appliances between 17 and 21 (case B). Therefore, the power demand of the load between 17 and 21 is smaller compared with the previous case.

Considering the algorithm presented in Section 2, the power cost for the consumer (Figure 4) and the profit for the consumer (Figure 5) is determined. Additionally, based on the results, the optimal management of power can be interpreted.

The total power cost for the consumer, for case A is 17.1325 lei/kWh, while for case B, it is 9.0145 lei/kWh. The profit for case A is 1.7798 lei, while for case B, it is 2.4046 lei.

Considering the results, it can be concluded that the case when the PHEV is discharging, suppling power to the household appliances is the best case, resulting in a lower power cost and higher profit.

**Figure 3.** Power demand of the load (household appliances) (case B).

**Figure 5.** Consumer profit.

## **4. Conclusions**

In this paper was presented an algorithm for the power management of a smart home with electric vehicle and photovoltaic panels.

Compared to other studies, in this paper, the analysis was performed for a day, considering the power demand of the consumer, the cases of the electric vehicle charging/discharging, the power supplied by the photovoltaic panels and the support scheme from the government for prosumers, and the power cost, respectively.

The total power cost for the consumer was 17.1325 lei/kWh for the case when the PHEV was charging, compared with 9.0145 lei/kWh for the case when the PHEV was discharging. The profit for the first case is 1.7798 lei, compared to 2.4046 lei for the second case.

Considering the results, the case when the PHEV was discharging, results in a lower power cost and higher profit for the consumer.

**Funding:** This research received no external funding.

**Conflicts of Interest:** The authors declare no conflict of interest.

## **References**


**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
