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

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.


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.

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. where: • P grid -power supplied by the grid [kW]; • P PV -power supplied by the PV panels [kW]; • P L -power demand of the load (household appliances) [kW] .
The cost of the power supplied by the grid to the load is 0.55 lei/kWh. where: • cost PV -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. where: • P PHEV -power supplied by the plug-in hybrid electric vehicle to the household appliances [kW].

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.
Proceedings 2020, 63, 49 3 of 5 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. The power supplied by the PV panels during a day is presented in Figure 2. 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.  The power supplied by the PV panels during a day is presented in Figure 2. 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. The power supplied by the PV panels during a day is presented in Figure 2. 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.  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.

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

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

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

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.