Introduction

With the initiation of the smart grid, consumers may actively take part in managing their energy usage, which is only possible with a smart home. One of the most crucial components of a smart home is home energy management, which controls the effective use of energy in a house equipped with modern devices. The application of a competent energy management system yields financial gains, lowers peak load for utility, and regulates the load side for the consumer [1]. The control methodology in this work gives independence to the residential consumer for reducing the energy dependence on the electricity that is provided via the power grid. The control devices for power transmission and the operation of home appliances (EVs and ESS) are configured according to the cost of electricity per hour. The proposed work focuses on smart energy management for residential consumers in the presence of sustainable power sources. The enormous amount of solar energy that strikes the ground surface, which is accessible in most parts of the world and driving down the price of solar collector panels, is emphasizing the value of environmentally friendly energy as a practical approach to satisfying customer demand for electricity. Rooftop photovoltaic (PV) panels effectively meet a portion of the smart home's entire demand with proper utilization of unused rooftop space.

With the incorporation of EV, ESS, and renewable energy sources, along with a utility grid, the goal of this article is to create an effective three-stage optimized energy management system for smart homes. Electric vehicles (EVs) and energy storage systems (ESS) are optimized for operation under peak demand. The smart charging and discharging methodology in the realm of energy storage and electric vehicles added financial benefits to consumers. The control devices discussed in the proposed study, namely Electric Vehicles (EVs), serve to mitigate air pollution and address power shortages during periods of insufficient power supply. Furthermore, the Energy Storage System (ESS) functions as a power backup in the absence of Renewable Energy Sources (RES). This will contribute to the improvement of smart home power utilization, smart grid stability and dependability, and grid efficiency.

Related Work

An innovative technique for saving energy in the house based on demand response (DR) approaches was demonstrated at the consumer end by Arun et al. [1] to save costs by scheduling the operating timing of appliances. The work also schedules energy storage device operation mode and battery power exchange to lower energy costs without affecting customer ease or consumption limit. The article [2] suggests a power planning system to systematize appliance processes to lower energy costs. These homes have rooftop PV panels, smart appliances, EVs, and energy storage systems (ESS). Power transfers are assessed using dynamic costs and net metering rules.

Ali M. Jasim et al. [3], demonstrate residential DSM TOU pricing and time-shifting mechanism for the residential consumer. The author suggests Virulence and earthworm optimization algorithms (VOA, EWOA) to solve forecast problems with and without renewable energy storage. The VOA and EWOA optimization without renewable energy lowered PAR usage by 59 and 54%, while RES reduced PAR by 76.19 and 73.8%. In [4], the authors have examined the literature related to the current state of the energy industry worldwide as well as the incorporation of green energy. Improving the adaptability of any commercial power grid in a community is the primary objective of this energy mix.

Alper and Ali [5] recommended the household energy management system (HEMS) algorithm to prevent domestic energy outages and boost grid resilience. To address the highest power demand of the following day, load curtailment techniques are implemented based on the anticipated power needs of appliances. The method was tested out on a case-specific MATLAB model that used data on load and temperature.

Considerable attention has been paid by the author [6], seeks to examine and synthesize the challenges and developments of optimization strategies as a means of domestic energy control over the past few years. Objectives and limitations for schedule optimization were also classified. Khemakhem S et al. [7] verified a two-tier energy management system for intelligent houses with EVs as well as devices to straighten the load-demand curve. The flexible first tier switches devices between peak and off-peak hours. The second layer plans EV-smart grid power flow for battery charging and discharge. Tracking the power of every plug-in electric car connected to the house sets the baseline and improves power usage. Xia et al. [8] presented a stochastic dynamic programming problem (SDP) that maximizes power distribution between the PEV battery, household load, and utility grid. V2G, V2H, and G2V working modes reduce energy expenditures. The findings reveal that mobility patterns affect energy use.

The research recommended by Datta U et al. [9] focuses on HEMS integration with EVs and the studies emphasize cost-cutting measures, to evaluate the financial benefits of alternative approaches to operation. It explores the methods of charging and discharging EVs in HEMS for single residential consumers over a 24-h. The suggested strategy reduces power demand during peak price hours via vehicle-to-home (V2H) operations, which is financially more advantageous compared to EV to the power grid (V2G) or power grid to electric vehicle (G2V), which are technologically rigid and commercially insistent. In [10] author presented a method for controlling energy for an intelligent residential that includes solar PV and electric cars. The recommended scheme with EV and PV beats a smart house, in terms of reducing power bills, either with EV or with no PV and smoothing the electricity load curve. Misljenovic et al. [11] reviewed the use of intelligent energy control techniques in smart homes. The author discusses input parameter prediction methods, optimization frameworks and methodologies, objective functions, limitations, and the market environment. Scientific publications analyzed each energy management system component's evolution, which authors normally ignore. The review reveals that researchers simplify optimization models by replacing variable connections with constant values.

Minhas et al. [12] suggested a residential area electrical network-linked algorithm predictive adaptive energy management system. The mixed-integer dynamic method based on the receding horizon rule is utilized for time-ahead scheduling. The predictive intelligent energy management systems (iEMS) characteristics of the model suggested were presented through the use of EV usage patterns, battery charging/discharging procedures, and real-world residential annual data sets. Using MATLAB/Simulink, the authors in [13] investigated a load management system to ascertain the way demand response (DR) affects the domestic consumer load demand. In addition, a thorough analysis of home load classification was conducted. Results demonstrate that load management techniques saved 7.39 kWh per day during peak periods while reducing electricity bills by 11.28%.

A new and practical DSM technique was used to calculate the appropriate sustainable energy and battery storage size in a research article [14]. The suggested DSM technique used storage SOC and day-ahead anticipated renewable energy output to transfer and decrease load demand effectively and the best results are compared to those with the recent articles. The research article [15] presents a system for hybrid integrated power plants and outlines the framework for their generation and distribution of electricity. Four modes of operation were devised for the energy storage system that employs batteries (BESS), to regulate it using an incremental electricity price. The simulation findings show that the hybrid integrative energy generation system performs well and is energy efficient. The Author used the Jaya algorithm to control energy flow for solar panels, ESS, and EV [16]. Energy management reduced power costs while satisfying residential and electric vehicle travel distance needs. By scheduling solar generating and energy storage devices, the Jaya algorithm allows the grid to buy and sell excess electricity using H2V and V2H strategies. A new tool for smart home DR management, reinforcement learning-based centralized photovoltaic scheduling was presented in [17]. To save money and keep appliances operating, the suggested solution optimizes the power supply throughout both peak and off-peak hours. Modern data and deep learning algorithms handled solar RES generation, the electricity consumption of appliances, pricing, accessibility of EVs, and SOC fluctuations. The most accurate model was determined by examining each uncertainty parameter.

In [18] author suggested an energy management optimization strategy and device scalability of a single intelligent house with a home battery pack, plug-in electric vehicle (PEV), and solar energy (PV) arrays. Using smart home nanogrid topology and system models, a convex programming (CP) issue optimizes BESS control decisions and parameters quickly and effectively. Recommended CP minimizes operational costs compared to no home BESS.

Abdelrahman et al. [19] reviewed smart grid HEMS from a closed-loop control system perspective. Various demand response approaches are categorized in the study. Several HEMS scheduling strategies were examined, covering mathematical, metaheuristics, and AI optimization methodologies.

The research [20] illustrated a hybrid renewable energy electric car management system that links to the grid and a smart house with variable electric needs. MATLAB toolboxes handle linear programming with uncertain limit management. When alternative energy fails and the battery is low, the grid takes over. A sophisticated algorithm-based multiple-goal scheduler that manages energy in residential small electrical networks with intelligent houses has been reported in [21]. The literature in [22] explores the best HEMS integration options for rooftop solar panels, energy storage, and V2G. The anticipated system shows unexpected load cut-off and real-time pricing. Also, increase V2H and V2G local supply reliability. Experimental results show that the suggested strategy improves household battery management and electric car charging and discharging.

The demand-side management utilizing the Binary Particle Swarm Optimisation Algorithm was proposed by Bhongade et al. [23]. The issue was expressed mathematically as a DSM optimization problem incorporating constraints, peak-to-average ratio as the objective, and cost reduction as the goal. Energy savings of 15% and 20–25% in village electricity costs are achieved by demand-side management. The Jaya algorithm was presented for effective energy management in a smart home paired with solar (PV) as well as ESS and EV [24]. The suggested energy management plan reduces power expenditures while meeting home load and EV trip distance energy needs. The outcomes of the simulation show that solutions for energy management can reduce electricity costs significantly. The Jaya algorithm optimized energy scheduling in a smart home to maximize PV generation, EV, and ESS use. Techno-commercial analysis for a hybrid energy management system under net metering and zero export laws was reported in the research study [25]. Using commercially available components selected for real-world settings yields realistic results. Furthermore, in the proposed study, financial metrics including the ratio of benefits to costs (BCR) and levelized cost of energy (LCOE) were used to evaluate the feasibility of different system designs.

From the extensive literature survey on systems for managing energy for residential consumers, the innovative three-stage residential power management system is presented in the current research paper. The residential structures require a lot of energy. Energy storage systems, electric vehicles, and photovoltaic systems have been integrated into these structures to address this issue. The goal of the suggested framework for energy control in this study is to improve decision-making by permitting consideration of the energy produced, the optimum method to power household appliances, and the regulated load, such as EV and ESS.

The benefaction of this research work culminated as follows:

1. In the present research work, consumer premises equipped with smart home appliances and manageable loads such as rechargeable vehicles and electricity storage systems for overall cost minimization of consumption from the grid of utilities.

2. Energy management scenarios for residential consumers with and without RES and energy storage systems are investigated under different limitations.

3. Intelligent charging and discharging strategies are developed to charge EVs and energy storage systems only during off-peak hours without RES.

4. Smart management of EV and ESS stored energy efficiently controls bilateral electricity supplied by the grid to the smart home or from SH components to home appliances, minimizing 24-h energy costs.

Financial analysis evaluates the suggested work in all three situations.

This paper is organized in the following way:

Section II explains the theoretical framework and planned mathematical models; and Section III defines the proposed EMS, problem formulation, and objective function. The findings and Section IV present the discussion, while Section V presents the findings.

System Description and Mathematical Modeling

The household in Fig. 1 is equipped with electric vehicles, an energy storage system, and energy from renewable sources. (solar PV).

Fig. 1
figure 1

Smart home configuration

Mathematical Modeling of Components of Smart Home

A) Renewable Energy Source (Solar Photovoltaic System):

PV array power output influences solar PV system output. The photovoltaic (PV) system converts sunlight into energy using several solar cells linked in series or simultaneously. The solar PV generator's effectiveness is indicated by Eq. 1 [16], and photovoltaic power output per hour is calculated using Eq. 2 [16].

$$\eta_{RES}^{PV} = \eta_{R} \left[ {1 - 0.9\rho \left( {\frac{{I^{PV} }}{{I_{NT}^{PV} }}} \right)\left( {T_{NT}^{C} - T_{NT}^{A} } \right) - \rho \left( {T^{A} - T^{R} } \right)} \right]$$
(1)

where,

\({\upeta }_{RES }^{PV}\) PV generator efficiency, \({\upeta }_{R} { }\) PV model efficiency (18%), \({\uprho }\) cell's temperature coefficient (0.004–0.005/0C), \(I^{PV}\) solar radiation (kW/m2), \(I_{NT}^{PV}\) the solar radiation impacting on the array at NT on an average hourly basis (0.8 kW/m2), \(T_{NT}^{C}\) cell temperature at NT (450C), \(T_{NT}^{A}\) ambient temperature at NT (200C), \(T^{A}\) ambient temperature (0C) \({\text{solar radiations }}\left( {{\text{kW}}/{\text{m}}2} \right)\), \(T^{R}\) reference cell temperature (250C).

$$W_{RES}^{PV} \left( t \right) = {\upeta }_{RES}^{PV} *Z_{RES}^{PV} *I^{PV}$$
(2)

where,

\(W_{RES}^{PV}\) solar PV power (kW), \(Z_{RES}^{PV}\) rated capacity of PV array size (kW),

B) Electric Vehicle Modeling:

The residential home under study has an electric vehicle with Lithium-ion batteries (Li-ion), which are becoming more common in electric and hybrid cars (HEV), because of their low discharge rate, high energy density, and high specific energy, protection, flexibility in charging and discharging speed, and long life expectancy. A typical EV considered in the present work travels 40 km in a day, and the optimal power rating for charging the battery is between 1.5 and 3 kW. [22]. The amount of energy required to charge and discharge an electric vehicle's battery will vary depending on the amount of energy left over in the subsequent charge cycle. For the next time interval t, the percentage of battery life left in an electric vehicle is determined by applying Eq. 3 [16].

$$SOC^{EV} \left( t \right) = SOC^{EV} \left( {t - 1} \right) + \frac{1}{{Z^{EV} }}\left[ {{\upeta }_{ch}^{EV} * W_{ch}^{EV} \left( t \right) - \frac{{W_{disch}^{EV} \left( t \right)}}{{{\upeta }_{disch}^{EV} }}} \right]$$
(3)

where,

\(SOC^{EV} \left( t \right)\) EV battery SOC at time t (kWh), \(SOC^{EV} \left( {t - 1} \right)\) previous time slot EV battery SOC (kWh), \(Z^{EV}\) EV battery rating (kWh), \({\upeta }_{ch}^{EV}\) EV battery charging efficiency, \(W_{ch}^{EV} \left( t \right)\) EV battery's capacity to charge at time t (kW), \({\upeta }_{disch}^{EV}\) EV battery discharging efficiency, \(W_{ch}^{EV} \left( t \right)\) discharging power of EV at time t (kW).

As shown in Eq. 4, the EV storage charge must be between the lower and upper threshold limits.

$$SOC_{\min }^{EV} < SOC^{EV} \left( t \right) < SOC_{\max }^{EV}$$
(4)

where,

\(SOC_{max}^{EV}\) has the highest EV battery SOC limit (kWh), \(SOC_{min}^{EV}\) is the EV battery's lowest SOC (kWh).

The electric vehicle shall be charged from the grid during low tariffs and through a renewable energy source during sun hours.

C) Energy Storage System (ESS) Modeling:

Due to the limited capacity of the energy storage systems, its SOC at time t depends on how much power has been retained from the preceding period and how much charging and releasing occurred. For the present period, Eq. 5 [16] evaluated the ESS SOC from the previous period.:

$$SOC^{ESS} \left( t \right) = SOC^{ESS} \left( {t - 1} \right) + \frac{1}{{Z^{ESS} }}\left[ {\eta_{ch}^{ESS} * W_{ch}^{ESS} \left( t \right) - \frac{{W_{disch}^{ESS} \left( t \right)}}{{\eta_{disch}^{ESS} }}} \right]$$
(5)

where,

\(SOC^{ESS} \left( t \right)\) storage system SOC at time t (kWh), \(SOC^{ESS} \left( {t - 1} \right)\) previous time slot storage system SOC (kWh), \(Z^{ESS}\) rated capacity of ESS (kWh), \({\upeta }_{ch}^{ESS}\) ESS charging efficiency, \(W_{ch}^{ESS} \left( t \right)\) charging power of storage system battery (kW), \(W_{disch}^{ESS} \left( t \right)\) discharging power of storage system battery (kW), \({\upeta }_{disch}^{ESS}\) storage system battery discharging efficiency.

Similar to the electric vehicle, the SOC of the ESS is restricted within the least and maximum permitted capacities as per the constraint shown in Eq. 6.

$$SOC_{\min }^{ESS} < SOC^{ESS} \left( t \right) < SOC_{\max }^{ESS}$$
(6)

where,

\(SOC_{max}^{ESS}\) is the upper limit of ESS battery SOC (kWh), \(SOC_{min}^{ESS}\) is the lower limit of ESS battery SOC (kWh).

The electric vehicle shall be charged from the grid during low tariffs and through a renewable energy source during sun hours.

The grid powers the ESS during low demand and solar PV supplies the power to the ESS during sun hours.

D) Power Balance Constraints:

The components of a residence must be enough to support the energy needs of the home appliances over any period t. Equation 7 must be met for grid power exchange and control loads like electric vehicles and energy storage systems to a smart home.

$$W^{G2L} \left( t \right) + W_{RES}^{PV2L} \left( t \right) + W^{EV2L} \left( t \right) + W^{ESS2L} \left( t \right) = W_{LD} \left( t \right)$$
(7)

where,

\(W^{G2L}\) grid to load power flow (kW), \(W_{RES}^{PV2L}\) power transfer from RES to a load demand (kW), \(W^{EV2L}\) load demand supplied by electric vehicle (kW), \(W^{ESS2L}\) load demand supplied by storage system (kW).

E) Household Appliances:

Daily load curves Fig. 5b show how home appliances including refrigerators, air conditioners, televisions, fans, washing machines, and culinary equipment use electricity [2]. The load curve shows the variation of power required for home appliances in smart homes.

Analyzing the Economic Benefits

The present energy management system is validated through the financial benefits earned by the consumer for different proposed scenarios with and without RES in an intelligent house. The principal aim of the current investigation is to minimize the overall expense of electricity consumption for residential consumers.

Objective Function

Equation 8 is the formulation of the desired function to reduce the price of power for the entire day for a smart home, with the constraint of maximizing the total cost of power saving for all three scenarios in this article. the objective function as formulated in Eq. 8

$$\min {\text{Cos}} t_{P}^{SH} = {\text{Cos}} t_{P}^{purchase} + {\text{Cos}} t_{capital}^{EV,ESS,PV} - C_{P}^{saving}$$
(8)

where,

\(Cost_{P}^{SH}\) total cost of energy consumption ($/kWh), \(Cost_{P}^{purchase}\) total cost of power purchase from the utility grid ($/kW), \(Cost_{capital}^{EV,ESS,PV}\) capital cost of EV, ESS and solar PV ($/kW), \(C_{P}^{saving}\) total cost of power saving ($/kW).

The capital cost of electric vehicles (\(Cost_{capital}^{PV} )\), and ESS \((Cost_{capital}^{ESS} )\) are expressed as defined by Eqs. 9, 10, 11 respectively, and EV battery degradation (\(Cost_{degradation}^{EV battery} )\) cost is formulated as in Eq. 12 [24]. The present research incorporates these fixed costs into account to assess the financial benefits associated with the suggested method for decreasing the consumer's daily energy consumption.

$${\text{Cos}} t_{capital}^{EV,ESS,PV} = {\text{Cos}} t_{capital}^{PV} + {\text{Cos}} t_{capital}^{ESS} + {\text{Cos}} t_{defradation}^{EV battery}$$
(9)
$${\text{Cos}} t_{capital}^{PV} = {\text{Cos}} t_{installation}^{PV} \left[ {\frac{{i\left( {1 + i} \right)^{N} }}{{\left( {1 + i} \right)^{N} - 1}}} \right]\left( {\frac{{Z^{PV} }}{{N^{days} }}} \right)$$
(10)
$${\text{Cos}} t_{capital}^{ESS} = {\text{Cos}} t_{battery}^{ESS} \left[ {\frac{{i\left( {1 + i} \right)^{N} }}{{\left( {1 + i} \right)^{N} - 1}}} \right]\left( {\frac{{Z^{ESS} }}{{N^{days} }}} \right)$$
(11)
$${\text{Cos}} t_{\deg radation}^{EV battery} = \left( {\frac{{{\text{Cos}} t_{battery}^{EV} }}{{C^{f} DOD}}} \right) \left( {Z^{EV} DOD - E_{R}^{EV} } \right) \eta_{d}^{EV}$$
(12)

where,

\(i\) rate of interest (%), \(Z^{PV}\) PV array rated capacity (kW), \(N\) lifetime of solar PV (years), \(N^{days }\) annual calendar day count, \(Z^{ESS}\) maximum capacity of ESS (kWh), \(C^{f}\) complete battery cycles, \(Z^{EV}\) maximum capacity of electric vehicle battery (kWh), \({\upeta }_{d}^{EV}\) discharge efficiency of EV battery.

Scenario I is presented to the residential consumer, considering the home equipped with EV and ESS in the absence of renewable energy generation. Grid power procurement for residential load demand (\(W_{LD}^{new} )\) and smart home control devices (\(W^{G2EV}\), \(W^{G2ESS} )\) is the cost component \(\left( {Cost_{P}^{purchase} } \right)\) as approximations derived from Eq. 13 in scenarios I and II.

$${\text{Cos}} t_{P}^{purchase} = \mathop \sum \limits_{t = 1}^{24} W_{LD}^{new} \left( t \right)C\left( t \right) + W^{G2EV} \left( t \right)C\left( t \right) + W^{G2ESS}$$
(13)

The surplus power available in EV and ESS is swapped with the household appliances' load demand during the peak hours or peak price period. The price of power supplied to home appliances from surplus power of EV (\(W^{EV2L} )\) and ESS (\(W^{ESS2L} )\) in scenario I is calculated from Eq. 14.

$$C_{P}^{saving} = \mathop \sum \limits_{t = 1}^{24} (W^{EV2L} \left( t \right)C\left( t \right) + W^{ESS2L} C\left( t \right))$$
(14)

The solar power generation (\(W_{RES}^{PV2L} )\) in addition to the EV (\(W^{EV2L} )\) and ESS \(\left( {W^{ESS2L} } \right)\) in the smart home results in the power exchange being further prolonged, as demonstrated by Eq. 15. The presence of RES generation during the solar hours, indicated by a set of Eqs. 25 to 48 in scenarios IIA and IIB, is confirmed by the diverse operational modes 6 to 14. This results in extra savings (\(C_{P}^{Saving} )\) in the cost of energy consumed by residential dwellings. As demonstrated in Eq. 16, the cost of saving is adjusted.

$$P_{supplied}^{RES, EV, ESS} \left( t \right) = W_{RES}^{PV2L} \left( t \right) + W^{EV2L} \left( t \right) + W^{ESS2L} \left( t \right)$$
(15)
$$C_{P}^{Saving} = \mathop \sum \limits_{t = 1}^{24} P_{supplied}^{RES,EV,ESS} \left( t \right) C\left( t \right)$$
(16)

Design of Energy Management Strategy

This study presents the smart energy management (SEMS) system for modern households installed with solar PV (RES), electric vehicles (EV), and storage systems (ESS). Regulation of grid-to-home and home-to-grid power transfers is the goal of the suggested approach.

To accomplish the objectives of the current work, the suggested strategy is evaluated by considering the following three scenarios;

Scenario I: Smart house with EV and ESS in the absence of RES.

Scenario IIA: A smart house with EV, ESS, and RES from solar PV, has a higher load demand than the typical home.

Scenario IIB: A smart house with EV, ESS, and RES from solar PV has less load demand than usual.

The work suggested in the present paper, provides an approach to managing power for an intelligent house configured with electric vehicles, energy storage, and roof-top photovoltaic panels to lower the energy usage and keep the hourly load curve around the consumer average load demand. Integrating ESS while offering several modes of operation to suit user comfort and financial advantages extends power exchange hours to residential load demand.

Scenario I: Smart house with EV and ESS in the absence of RES.

Modes of Operation Under Scenario I (Mode 1 to 5)

At the consumer end, the innovative three-stage energy management system has been developed to guarantee a steady and reliable energy source. In the event of an interruption, the incorporation of ESS into smart homes reduces grid reliance. The ultimate objective of the current study is to create an autonomous system with decreased daily energy costs.

In this section, the present study is investigated under the first scenario i.e., a smart house that has an EV and energy storage system, with no renewable source of energy source available. For the energy administration of the home in the present scenario, the smart charging and discharging schemes are developed by the limitations of hourly electricity pricing. The components of smart homes that are addressed under this scenario are energy storage devices and electric cars. The proposed scheme of powering the EV is being developed with the constraint of the availability of EV at home during the day and the hourly price of electricity. In the absence of a sustainable energy source in the present scenario; the utility supply is used in a smart way for energizing EVs, ESS, and home appliances. The scheme is designed based on a low-price signal for charging of EV and ESS while during peak load prices, it is preferred to release the stored energy for home appliances.

The bilateral power flow is formulated from grid to smart home (G2EV, G2ESS, G2L) or from component of the smart home to the home appliances (EV2L, ESS2L) is formulated to efficiently control the smart management of stored energy in EV and ESS, which reduces the energy bill over 24 h.

The method suggested using the TOU price signal, hourly load profile, average cost signal, time frames for the electrically powered vehicle arrival and departure, and the initial, highest, and lowest SOC limits for the electric vehicle battery and ESS storage.

Scenario I is developed on the constrained concerning load demand, availability of EVs at home, EV and ESS battery charging status, and price signal at present. The flowchart of the proposed intelligent SOC management system of EV and ESS batteries for smart energy management is shown in Fig. 2.

Fig. 2
figure 2

Flowchart scenario I: smart house with EV and ESS in the absence of RES

The logical justification of different operating modes in scenario I is demonstrated by a set of Eqs. 17 to 25 as follows and the corresponding power flow is represented in Tables 1, 2, 3 and 4;

Table 1 Power supplied by control devices (EV & ESS) in smart home
Table 2 Power supplied by utility grid to control (EV & ESS) devices in smart home
Table 3 Power supplied by RES (Solar PV) to control devices (EV & ESS) and home appliances
Table 4 Power supplied by grid to home appliances

Mode 1

$$W^{EV2L} \left( t \right) = W_{LD} \left( t \right) - W_{avgLD}$$
(17)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - W^{EV2L} \left( t \right)$$
(18)

Mode 2

$$W^{ESS2L} \left( t \right) = (W_{LD} \left( t \right) - W_{avgLD} ) \left( {18} \right)$$
(19)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - W^{ESS2L} \left( t \right) \left( {19} \right)$$
(20)

Mode 3

$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right)$$
(21)

Mode 4

$$W^{G2ESS} \left( t \right) = W_{avgLD} - W_{LD} \left( t \right)$$
(22)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) + W^{G2ESS} \left( t \right)$$
(23)

Mode 5

$$W^{G2EV} \left( t \right) = W_{LD} \left( t \right) - W_{avgLD}$$
(24)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) + W^{G2EV} \left( t \right)$$
(25)

Scenario II

  1. A)

    Scenario II A: A smart house with EV, ESS, and RES from solar PV, has a higher load demand than the typical home.

  2. B)

    Scenario II B: Smart house with EV, ESS, and RES from solar PV and load demand is lower than the typical demand of the home.

The flowchart for scenario II for stage A and stage B is represented in Figs. 3a and 3b.

Fig. 3
figure 3

a Flowchart scenario II A. b Flowchart scenario II B

The methodology proposed is extended for scenario II, where the smart home is integrated with a renewable source of energy i.e., solar PV system in addition to the EV and ESS. This is demonstrated here to study the solar PV energy source effects on intelligent residences' energy management and the financial benefits received from the new control strategy.

To evaluate the impact of solar PV systems, under scenario II, the operation of households under consideration is evaluated in two stages. The first stage is the same as explained in scenario I i.e., without a photovoltaic system, the second stage is further classified as scenario IIA is a smart home with EV, ESS integrated with solar PV with load demand greater than average load of consumer and scenario IIB with load demand less than average load in the household. Thus, the detailed discussion of scenario II will be explained with the operating modes from mode 6 to mode 14. The power flow concerning the constraints during each of the modes along with new load demand is calculated from Eqs. 26 to 49. The detailed discussion of these modes is as follows.

The logical justification of different operating modes in scenario II is demonstrated by a set of Eqs. 26 to 49 as follows and the corresponding power flow is represented in Tables 1, 2, 3 and 4;

Modes of Operation Under Scenario II A: (Mode 6 to 10)

Mode: 6

$$W_{RES}^{PV2L} \left( t \right) = W_{RES}^{PV} \left( t \right)$$
(26)
$$W^{EV2L} \left( t \right) = \left( {W_{LD} \left( t \right) - W_{avgLD} } \right) - W_{RES}^{PV2L} \left( t \right)$$
(27)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - \left( {W_{RES}^{PV2L} \left( t \right) + W^{EV2L} \left( t \right)} \right)$$
(28)

Mode: 7

$$W_{RES}^{PV2L} \left( t \right) = W_{RES}^{PV} \left( t \right)$$
(29)
$$W^{ESS2L} \left( t \right) = \left( {W_{LD} \left( t \right) - W_{avgLD} } \right) - W_{RES}^{PV2L}$$
(30)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - \left( {W_{RES}^{PV2L} \left( t \right) + W^{ESS2L} \left( t \right)} \right)$$
(31)

Mode: 8

$$W_{RES}^{PV2L} \left( t \right) = W_{RES}^{PV} \left( t \right)$$
(32)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - W_{RES}^{PV2L} \left( t \right)$$
(33)

Mode: 9

$$W_{RES}^{PV2L} \left( t \right) = W_{LD} \left( t \right) - W_{avgLD}$$
(34)
$$W_{RES}^{PV2ESS} \left( t \right) = W_{RES}^{PV} \left( t \right) - W_{RES}^{PV2L} \left( t \right)$$
(35)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - W_{RES}^{PV2L} \left( t \right)$$
(36)

Mode: 10

$$W_{RES}^{PV2L} \left( t \right) = W_{LD} \left( t \right) - W_{avgLD}$$
(37)
$$W_{RES}^{EV2L} \left( t \right) = W_{RES}^{PV} \left( t \right) - W_{RES}^{PV2L} \left( t \right)$$
(38)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - W_{RES}^{PV2EV} \left( t \right)$$
(39)

Modes of Operation Under Scenario II B: (Mode 11 to 14)

In scenario II B (Modes 11–14), the solar PV system powers all smart house components. Thus, PV2EV, PV2ESS, and PV2H exchange power. This reduced grid demand and energy costs during operation. The detailed discussion of these modes is as follows;

The logical justification of different operating modes in scenario I is demonstrated by a set of Eqs. 40 to 49 as follows and the corresponding power flow is represented in Tables 1, 2, 3 and 4

Modes of operation under scenario II stage B are:

Mode: 11

$$W_{RES}^{PV2ESS} \left( t \right) = W_{RES}^{PV} \left( t \right)$$
(40)
$$W^{G2ESS} \left( t \right) = \left( {W_{avgLD} - W_{LD} \left( t \right)} \right) - W_{RES}^{PV2ESS} \left( t \right)$$
(41)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) - W^{G2ESS} \left( t \right)$$
(42)

Mode:12

$$W_{RES}^{PV2EV} \left( t \right) = W_{RES}^{PV} \left( t \right)$$
(43)
$$W^{G2EV} \left( t \right) = \left( {W_{avgLD} - W_{LD} \left( t \right)} \right) - W_{RES}^{PV2EV} \left( t \right)$$
(44)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right) + W^{G2EV} \left( t \right)$$
(45)

Mode: 13

$$W_{RES}^{PV2ESS} \left( t \right) = W_{RES}^{PV} \left( t \right)$$
(46)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right)$$
(47)

Mode: 14

$$W_{RES}^{PV2EV} \left( t \right) = W_{RES}^{PV} \left( t \right)$$
(48)
$$W_{LD}^{new} \left( t \right) = W_{LD} \left( t \right)$$
(49)

The energy flow in smart homes for the methodology for managing energy use is summarized in Tables 1, 2, 3 and 4. The Tables 1, 2, 3 and 4 is demonstrating the energy flow resulted from the suggested strategy in the present work using the Eqs. 17 to 49 for scenarios I and II. The power supplied by control devices in smart home with reference to the constraints are presented in Table 1.

The power supplied by utility grid for smart charging of EVs and energy storage system under various modes of operation are tabulated in Table 2.

The impact of RES solar power for the smart home energy balance is shown in Table 3.

As per the strategy of the presented work the electric vehicle and energy storage system is using the grid power only during the off-peak period of low cost of electricity in various operational mode throughout the day and are represented in Table 4

Result and Discussion

This article delves into the topic of demand-driven energy management for the home consumer using smart appliances and an intelligent power management system. Two examples, one with an EV and an ESS and another with an EV, an ESS, and solar photovoltaics, are employed to assess the suggested strategy's efficacy.

The smart home's components and system parameters ESS and EV are shown in Table 5 while for solar PV system is in Table 6.

Table 5 System parameters (EV, ESS, and PV) [2]
Table 6 System settings (Solar PV System) [2]

The pricing schedule for time of use (TOU) and photovoltaic power [2] used in the present work are shown in Figs. 4, 5. Every interval lasts for 15 min (0.25 h), for a total of 96 intervals. A basic home with an ESS and rooftop PV installation is used to demonstrate the suggested method. Initially, the process of cost optimization was carried out with these two resources. The MATLAB simulation has been accomplished for a full day from 7 am until 7 am the following day.

Fig. 4
figure 4

TOU price signal [2]

Fig. 5
figure 5

a Solar PV power curve [2].b Daily load curve of smart home [2]

The prices indicate the values during the 24 h under the present study, as depicted in Fig. 4 used in the present work. The purchasing and selling prices of energy differ, with the latter being slightly lower. The variation of the TOU price signal is used in the proposed work as a control signal for power exchange, batteries from EVs and ESS can be charged. and released to deliver load during the time of peak load demand. The off-peak hours are utilized for powering control devices (EV, ESS), while peak price slots are used to satisfy load demand from stored energy in EVs and ESS. Time of use pricing signal during peak period i.e., from 07:00 am to 12:25 pm the price signal varies in the range of 1.8–3.2 $/kWh. This span of price signal is recommended for using the utility grid to purchase energy in this research article. The peak price period is from 12:30 pm to 03:45 pm and the price reached to high of 6.1 $/kWh, during this slot, the control devices in the smart home and RES solar PV will satisfy the load demand. Further, during the evening slot, the prices are slightly higher than the average cost of power. Late at night, the cost of electricity comes down to the lower limit of 1 $/kWh.

To demonstrate the suggested method of control for the smart house under the present study consisting of rooftop PV installation of 3 kW, Fig. 5 shows the PV power curve over a day for 24 h. A reasonable amount of power is supplied by rooftop PV installation ranging from 1.2 kW to 2.8 kW. Figure 5b displays the fluctuation in the smart home's daily load demand with a peak demand of 4.7 kW. The proposed control strategy in scenario II is using the RES power as a control signal for powering the EV battery and ESS during the sun hours. The excess energy produced by solar PV is exchanged with the control devices i.e., EV and ESS and home appliances. This stored energy is utilized for supplying load demand during peak price hours.

Scenario I: Smart house with EV and ESS in absence of RES:

The MATLAB simulation is carried out for proposed scenario I, without the presence of RES (Solar PV). The energy management system for smart homes is designed for residential consumers equipped with smart appliances, EVs, and electrical storage systems (ESS).

Additionally, the implementation of smart charging methodology for ESS and EV results in maintaining optimal power in these control devices. The suggested energy management system is explained with the operational Mode 1 to Mode 5 in scenario I, with Eqs. 17 to 25. Figure 6a represents the SOC curve resulting from smart charging methodology i.e., Grid power is used to charge EVs and ESS, only during the off-peak prices, while supplying power to home appliances if it has surplus power storage.

Fig. 6
figure 6

a SOC curve of EV b SOC curve of ESS

Comparing the earlier work in literature i.e., SH equipped with EV and solar PV, the proposed system overcomes the dependency of utility grid supply in off sun hours by replacing it with the energy storage system (ESS) in addition to EV. The SOC of EV is limited at the value of SOC required for completing its next-day trip i.e., \(SOC_{trip}\) which is maintained at 50%.

Figure 6b shows the resultant SOC curve for the energy storage system. The ESS in smart homes adopted smart charging during low electricity prices and delivered the excess power to the home appliances during the peak load period. The addition of ESS in smart homes with EVs overcomes the dependency on the availability of EVs at home. In the absence of an EV at home, the consumer has the reserve source of energy (ESS) in addition to the utility grid.

Figure 7a illustrates how the smart home's occupants exchange power with the grid. It is observed that the price of electricity is comparatively less from 7:00 am to 12:00 noon. Under this period the ESS and home appliances are powered from the grid. In the afternoon, from noon to 4:45, when electricity costs more than usual, the energy saved in ESS is used to power the home load.

Fig. 7
figure 7

a Energy flow from grid, EV, ESS, and new load versus price. b Different modes of operation versus time. c Smart home daily load curve excluding RES through EV, ESS, and EMS

The different modes of operation of smart home in scenario I are illustrated in Fig. 7b. As the price of electricity is below the average price in the morning session from 7:00 am to 11:30 am, 12:45 pm to to2:45 pm, and 4:45 pm to 6:00 pm, the operational mode 4 is active i.e., residential load and ESS has given priority to get powered from grid. Also, during this interval mode 1 is also active and EV is contributing a small amount of power to home appliances. Mode 3 is active from 6:30 pm to 10:15 pm, 10:30 pm to 11:45 pm and when prices are slightly more than the average price, the load demand remains unchanged. In mode 2, the stored energy in ESS supplies the power to the home appliances at high prices.

Figure 7c depicts the daily load curve in smart residences without RES for scenario I through EV, ESS, and EMS using the implemented energy management system. In the absence of an energy management system, the power consumption is uncontrolled over a day and the average load demand is raised to 4.7 kW. The application of an energy management system for the smart home equipped with EV, ESS, the daily load curve indicates that load demand is drastically reduced. The daily load curve also demonstrated the power exchange between ESS2L, grid, and home appliances as shown in Table 8, for the period when prices are fluctuating on the higher side. This results in a reduction of load demand for utility as well as saving of electricity by the consumer over a day. The financial benefits of scenario I are illustrated in Table 3.

Validation of Results for Scenario I:

The recommendations obtained from scenario I, are validated with the earlier work [10] on the energy management system for smart homes powered with EV only.

The results obtained for scenario I are summarized in Tables 7, 8. Table 7 is the financial analysis which is carried out by applying Eqs. 8 to 16, while Table 8 is the results of the power exchange that takes place in scenario I under various modes of operation from 1 to 5 as presented by Eqs. 17 to 25.

Table 7 Financial analysis
Table 8 Power flow analysis

To validate the findings from the planned initiative, it is compared with the previous work [10] from the literature. The comparison of the results is based on capital cost, cost of power buys from the grid, and the total cost of saving electricity. The power expenses of smart homes with only EV are 666 $/kWh over a day which is the same for present work i.e., SH with EV and ESS. On the other hand, the total cost of power buying for the above two cases is 549 $/kWh and 484 $/kWh. The revenue generated by saving power is 34 $/kWh for SH with EV only and 120 $/kW for proposed work over one complete day.

Table 8 presents the power exchange among the control devices (EV & ESS), smart home appliances, and the grid. The new load demand for the suggested scenario I in the present work is reduced to 138 kW compared to 143 kW for the smart home with EV only. The numerical results are on the average side but the dependency of consumers on the availability of EVs at home and on the utility grid for powering the home appliances is more compared to the presented methodology in scenario I. This drawback is overcome in the present research work with the addition of ESS in smart homes. This will also serve as a backup source in case of grid failure.

Scenario II:

  1. A)

    Scenario II A: A smart house with EV, ESS, and RES from solar PV, has a higher load demand than the typical home.

  2. B)

    Scenario II B: Smart house with EV, ESS, and RES from solar PV and load demand is lower than the typical demand of the home.

The MATLAB simulation is carried out for proposed scenario II for smart homes in the presence of RES (Solar PV). The energy management system for smart homes is designed for residential consumers equipped with smart appliances, EV, ESS, and solar PV as illustrated in the flowchart in Figs. 3a and 3b.

The proposed research work extended scenario I with an energy-efficient smart house powered by green energy (PV) in addition to EV and ESS. The design of the proposed methodology is explained with Eqs. 26 to 49 for sicario IIA and IIB. The aim of scenario II is to design an autonomous energy management system for residential consumers with less dependency on the utility grid.

The resultant simulations are described for SOC curves of EV and ESS along with the financial benefits and extended energy exchanged for residential consumers achieved in scenario II.

The SOC curves of EV and ESS are shown in Figs. 8a, b. From Fig. 8a, the EV is available at home during the morning session and gets powered by the RES to maintain the SOC required for completing the trip.

Fig. 8
figure 8

a SOC curve of EV. b SOC curve of ESS

Figure 8b represents the SOC curve for ESS. Compared to scenario I the powering mode of ESS is extended due to the presence of solar PV. This is increasing the scope of availability of power from ESS during the peak load time when prices are high. The financial impact and power exchange between the control devices i.e., EV and ESS under scenario II is shown in Tables 9, 10

Table 9 Financial analysis
Table 10 Power flow analysis

The energy flow from EV to load is represented in Figs. 9a and 9b. Due to the non-availability of EVs from 8:00 am to 12 noon and again from 02:00 pm to 05:00 pm, the EV is contributing very little power to home appliances. Meanwhile, EVs only use electricity from the utility during non-peak hours, which lowers the cost of the energy required to charge them.

Fig. 9
figure 9

a Energy flow from grid to EV, ESS, load, and PV to load versus price. b Energy flow from grid, EV, ESS to load versus price

The proposed methodology extended the mode of power exchange with the help of ESS and RES. The energy storage system gets sufficient power during the sun hours and gets charged to an adequate level to feed power to home appliances during peak load time as illustrated in Figs. 9a, b.

The different operating modes as a result of the suggested methodology which are executed with Eqs. 26 to 49 for the smart home are shown in Fig. 10a. The energy exchange from the power network (utility grid) to home (G2H), grid to a vehicle (G2EV), and grid to ESS (G2ESS) over a day. The average load demand of the home is fulfilled by supplying control loads like EV and ESS, as well as drawing surplus power from them. This will encourage consumers to use energy from the grid only during off-peak periods and utilize the stored energy in EV and ESS batteries during peak load time or peak time prices, which causes a reduction in the cost of electricity over a day.

Fig. 10
figure 10

a Modes of operation of smart home. b Daily load curves of smart home with ESS, EV, RES, and EMS

The diverse modes of operation in Fig. 10a confirm the impact of renewable energy sources on residential home energy consumption. The energy transmission from the grid to home, grids to electric vehicles, electrical grid to ESS, solar PV system to EV, and ESS are reflected in different operation modes of scenario II.

Figure 10b shows how the present control technique affects the daily load curve compared to prior work [10] for smart homes with EV alone. EV and ESS integration with smart houses flattens the daily load curve with the proposed energy management system compared to residential homes with simple EVs.

Validation of Results for Scenario IIA & IIB

This article delves into the topic of demand-driven energy management for the home consumer using smart appliances and an intelligent power management system. Two examples, one with an EV and an ESS and another with an EV, an ESS, and solar photovoltaics, are used to assess the effectiveness of the suggested approach. Tables 7 and 9 display the results of a profitable analysis performed taking into account the various scenarios considered in the current study.

By comparing the financial analysis of scenario, I i.e., Table 7 and 9 with scenario II (A and B), the cost of power purchase is reduced from 549 $/kW for earlier work [10] to 148 $/kW in present work with an intelligent residence installed with EV and ESS. The cost of power saving of 34 $/kW is boosted to 390 $/kW, and the total cost of energy 666 $/kWh is reduced to 259 $/kWh over a day. The cost of investment in scenario II is higher compared to scenario I due to the capital cost of RES, which befits the consumer by avoiding dependency on the utility grid and the availability of EVs at home. Thus, the proposed control techniques in the presence of RES for smart homes result in an autonomous system of power supply with negligible dependence on the utility grid.

Tables 8 and 10 represent the power flow analysis of the amount of power exchange among the utility grid, RES, smart appliances, and control devices i.e., EV and ESS. For scenario I of the proposed work the new load demand decreases to 143 kW from 138 kW as compared to earlier work in the literature [10]. Due to the presence of ESS in smart homes the dependency of load demand on the utility grid and EV is overcome in scenario I. The appreciable amount of power is supplied by ESS to load i.e., 28 kW. In the case of scenario II (A and B) of the proposed methodology, the new load demand is further decreased to 48 kW compared to 138 kW of scenario I. The presence of RES in scenario II further improves the power flow among the components of the smart home. The surplus power from RES is supplied to smart home components during sun hours. The power flow from PV to EV is 14 kW and to ESS is 32 kW, which is utilized to supply the load demand during the peak price period of the day. Thus, the availability of EVs at home and the continuity of power supply from the utility grid is overcome with the control techniques in the present work.

Conclusion

The impact of renewable energy source integration on residential houses with EV and ESS using demand-side management to control the load is presented in the present research work.

The presented energy management technique manages household energy usage around the average load demand as visible in the result section. The suggested technique also compensates for the greater energy storage system investment cost by delivering a reliable, economical, and uninterrupted power supply throughout the day, even during a grid outage.

The EV and ESS control loads are used to examine the influence of renewable energy source integration with residential houses. Future applications of the proposed energy management system architecture include supplying load demand with a mix of renewable energy sources generated on-site rather than imported from a central power grid. The primary benefit of the suggested methodologies is that they provide financial advantages to consumers and a reduction in peak load demand to the utility grid.

The present work can be extended for the residential building using modern optimization techniques. The present research work can also be extended for the on-grid power exchange between the control devices and the utility grid.