1. Introduction
The climatic condition and the advancement of technology are the motivating factors behind energy management in residential buildings. In developing countries like India, electricity consumption is increasing in tandem with the country’s economic development. It is expected to rise by 140% by 2021–2022, with Tamil Nadu, Telangana, and Karnataka accounting for nearly 80% of the increase [
1]. As a result, making optimal use of power by consumers is a key step in reducing energy demand growth. An energy management control unit (EMU) is used in residential buildings to make sure that energy is used efficiently. This is done by properly monitoring, regulating, and optimizing energy usage.
Nowadays, the conventional electrical grid has been transformed into a smart grid (SG). The European Union Commission Task Force for Smart Grids has provided the smart grid definition as follows: “SG is an electricity network that can cost efficiently integrate the behavior and actions of all users connected to it—generators, consumers and those that do both—in order to ensure economically efficient, sustainable power system with low losses and high levels of quality, security, of supply and safety." Thus, the SG reduces energy waste and consumption costs and increases reliability, efficiency, and transparency of the energy supply. In the development of SG, demand-side management (DSM) is considered as an important feature in providing economic benefits to the consumer through controlling, monitoring, protecting, and optimizing the home appliance operation. DSM is also aimed at benefiting the utility control center by reducing the stress during peak hours. The utility control center implements the demand response (DR) program by bringing consumers into the picture in the process of energy management program. The DR can be divided into three categories: price-based or rate-based DR programs, incentive- or event-based DR programs, and demand-reduction-bid-based DR programs. This proposed work follows price-based DR programs that include real-time pricing (RTP), day-ahead pricing (DAP), time-of-use (TOU) pricing, and critical peak pricing (CPP) programs. These pricing schemes have played a vital role in attaining the monetary benefit for the smart home consumers [
2,
3,
4,
5].
Typically, a smart home is a part of smart grid (SG) and is defined as “A smart home is a residence incorporating a communications network between electric household appliances and services” [
6]. A smart home consists of a real-time monitoring system that communicates with each device to optimize energy use. Optimization of energy consumption cost can be accomplished via stochastic optimization approaches with accurate probabilistic parameter estimation. Thus, real-time home energy optimization is the ideal solution, even when energy demand and consumption costs fluctuate.
Most of the research was carried out on optimization techniques to address the energy management problems for residential users: linear programming (LP), integer linear programming (ILP), mixed-integer programming (MIP), non-convex programming, mixed-integer linear programming (MILP), and non-deterministic polynomial-time hardness (NP-hardness) techniques. However, the computational time for these optimization algorithms is prohibitively long. On the other hand, evolutionary algorithms provide a fast and near-optimal solution to these problems [
7,
8,
9].
In smart homes, the utility control center manually performs load shifting or sheds a particular load for a certain period of time through the existing electricity system to minimize peak formation during peak hours [
10,
11]. As a result, only the consumers benefit from such actions, not the utility control center. Furthermore, moving the load from peak to off-peak periods lowers peak demand and energy consumption costs, but it still outrages the user’s satisfaction level. It should be mentioned here that there is always a trade-off between the user satisfaction level and energy consumption cost, and achieving both concurrently is the most difficult task [
12]. Thus, to achieve them together, some of the major constraints like daily energy consumption (kW), peak-average ratio (PAR), energy price signals, and user satisfaction have to be considered. As a consequence of these challenges, effective energy management algorithms that can handle all sorts of loads and adapt to the uncertainties of energy prices are required [
13].
In this regard, the authors of [
14,
15] have developed scheduling algorithms based on consumption cost reduction and consumer preference to manage residential appliances, which achieve the desired trade-off between economic benefits and consumer preference. Similarly, machine learning techniques, linear and dynamic programming, particle swarm optimization (PSO), fuzzy methods, and game theory are among the optimization techniques used in home energy management systems to schedule and control home appliances to provide economic benefits to consumers [
16,
17,
18,
19,
20,
21]. However, consumers are still not able to attain both user satisfaction and cost savings together, which are the drawbacks of the existing DR programs for DSM.
Recent literature suggests that home appliances can be categorized based on their operational behavior and energy consumption pattern as non-schedulable, schedulable, and controllable appliances to maximize the consumer satisfaction level and to attain the flexibility of scheduling [
22,
23,
24,
25]. The authors of [
26] have presented the definition of energy management as a set of strategies and functions that can optimize energy use. These sets of strategies effectively balance the demand and supply. Energy management is the process of monitoring, controlling, and optimizing the energy usage in residential buildings. It efficiently optimizes energy consumption costs and minimizes the peak-average ratio.
The authors of [
27,
28] have suggested that the Harris Hawks Optimization (HHO) algorithm and the Water Cycle Algorithm (WCA) effectively minimize the overall power losses and maximize the load balance at the distribution network level. The authors of the Harris Hawks Optimization algorithm and the Water Cycle Algorithm have compared them with particle search optimization (PSO), the harmony search algorithm (HSA), the fireworks algorithm (FWA), the Cuckoo search algorithm (CSA), and the uniform-voltage-distribution-based constructive algorithm (UVDA). The authors claim that their algorithms are the best at improving the efficiency and sustainability of the distribution grid.
In [
29], a hybrid optimization algorithm predicts the PV power generation by combining a convolutional neural network (CNN) and the salp swarm algorithm (SSA). This forecast is based on the weather (rainy, heavy cloudy, moderately cloudy, lightly cloud, and sunny). The CNN is applied to predict the next day’s weather type, and the SSA technique is used to optimize each model. Thus, to enhance the SSA technique’s exploring and exploiting capabilities, a simulated annealing mechanism is employed, which is based on symmetric perturbation for automated compliance checking in residential microgrids [
30]. Therefore, residential microgrids and smart homes require an effective energy management unit that is capable enough to forecast and solve the microgrids’ problems in advance and provide the ideal solution to balance the demand and supply. In [
31], the authors have proposed a rainfall algorithm with TOU pricing to schedule the home appliances’ operation through which the energy demand issues in residential buildings are predicted and optimized. As a part of the smart home/smart grid, electric vehicles (EV) can be used to balance the demand and supply. Mohammad et al. [
32] have proposed an energy management unit for residential buildings with local PV power generation to maximize the user comfort, including the availability of EVs, PAR reduction, and minimize the energy consumption costs.
The authors of [
33] present a distributionally robust optimization algorithm to optimally schedule the energy storage system that is integrated with a PV source. This problem has been presented as a two-stage programming model. The first stage reduces the energy consumption costs, and the second stage includes a real-time dispatch with a forecasted PV power output. With system uncertainties such as DC voltage fluctuation, disturbance from the utility grid system, and variation of the circuit parameters, traditional linear control methods cannot ensure the quality issues of the grid-connected inverter system. The authors of [
34] propose a robust model predictive control (RMPC) technique that effectively schedules the battery energy storage system to minimize the total economic cost of multicarrier microgrids.
Thus, for effective energy management, this paper proposes a novel optimization algorithm with the Indian electricity pricing scheme to schedule consumers’ demands. For the first time, the Indian DAP scheme was implemented along with the SSA, SSO and proposed RMSSO algorithms to reduce energy consumption cost and PAR. Timing and energy constraints were defined. Additionally, a variable was defined to ensure the user satisfaction level. The system was supported only by grid supply. The best sperm position was determined with the help of a remodeled inertia weight/constriction function. This paper employed qualitative and quantitative metrics to check and validate the correctness and accuracy of the proposed optimization algorithm. The proposed system used an effective communication technology to schedule energy demand in the most economical way.
Highlights and Organization of the Paper
The following features make this approach more distinct from existing DR algorithms.
- (i).
A remodeled sperm swarm optimization (RMSSO) algorithm was proposed for the HEM system.
- (ii).
The optimization process was carried out with varied computational parameters to demonstrate that the optimization algorithms could handle five distinct Indian climatic conditions.
- (iii).
A day-ahead pricing (DAP-(₹//kWh)) scheme was used as a part of the DR program.
- (iv).
This paper provides a unique comparison of SSO, modified SSO (MSSO), and the proposed RMSSO algorithms.
- (v).
Reduction in energy consumption costs, peak-average ratio (PAR), and increase in the level of user comfort were the objectives of this paper.
The remaining part of the paper is structured as follows: The proposed system architecture is explained in
Section 2, and the mathematical formulation is described in
Section 3.
Section 4 discusses the proposed RMSSO algorithm. The simulation results, evaluation, and description of the experimental setup are presented in
Section 5. Finally, this paper is concluded in
Section 6.
2. System Architecture
The proposed system aimed to reduce energy consumption costs by collecting and evaluating all electricity-related data to provide an optimal solution. This system gives a simulation/hardware-based solution for controlling and monitoring the energy in a lab environment. All five scenarios (climates) were developed with a controller device for smooth integration and operation of home appliances. The proposed system comprised 16 appliances with different power ratings, each controlled by an individual relay switch actuated by the controller for every time slot. These appliances were divided into two groups (schedulable and non-schedulable) to simplify operation and improve consumer satisfaction. The setup includes incandescent lamps, a mixer, and a kettle.
Table 1 shows the type of loads which are connected across each phase.
The HEMs laboratory setup consisted of a controller (Raspberry Pi 3B+), a smart meter (Schneider Conzerv EM6400NG-model-NHA2768503-0104/2018), RS485 communication modules that employ the MODBUS protocol and loads. The algorithm was developed on the Raspberry Pi, and its input/output options were enabled to connect to the internet through Wi-Fi communication to manage and monitor the appliances. The smart meter (gateway) was connected to the controller via an RS485 module. The IP modem (Four-Faith) and the control unit were Wi-Fi-enabled for remote access. A dynamic domain name system (DDNS) was used when the server IP was dynamic. The modem communicated with the smart meter using the same settings. A Python script read data from smart meter data registers using the pymodbus package [
35] and stored it in a local database which was available in the Raspberry Pi.
The timestamp, active power, reactive power, apparent power, frequency, power factor, current, and voltage were recorded. The database got updated every second. Every minute, the controller calculated and recorded the average of all collected fields. If the smart meter failed to read or send the readings to the controller for more than 60 s, the controller sent an alert notification message. Several privacy and security standards are described in [
36], and the proposed prototype system uses HTTPS for secure data transmission between local databases and cloud storage. The controller uploaded all collected data as a CSV file to the cloud storage (Thingspeak).
5. Results and Discussion
An efficient swarm-based optimization technique balances both local and global search [
49]. A suitable balance between these two processes can approximate an optimized home energy management system. If algorithms pay more attention to local search, a solution will quickly converge to an optimum point and get trapped at a local optimum.
A larger search coefficient (constriction coefficient) on the global search helps to avoid the local optimum solutions, but it takes more computation time to achieve the global optimum solution. The SSA technique uses the first salp (leader) in the swarm chain to balance the local and global search; the global search coefficient (constriction coefficient) decreases with an increase in the number of iterations. Hence, the SSA faces difficulty in achieving a proper balance between local search and global search [
30]. In the SSO algorithm, each sperm optimizes its position by considering its location, velocity, the local best solution, and global best solution. However, this algorithm cannot converge at a global minimum and is trapped in local optima and faces premature convergence in complex problems [
41]. Thus, in terms of exploration and exploitation, both SSA and SSO algorithms have enough exploration ability, but their exploitation ability is comparatively low.
Therefore, in this paper, a remodeled SSO (RMSSO) algorithm is proposed with an effective modification (Equation (32)) that improves the diversity of solutions by each sperm and keeps the proper balance between local search and global search during optimization. Thus, the searching ability of RMSSO was better than that of SSO and SSA for all five climates. This is the reason why the proposed RMSSO outperformed SSA and SSO consistently in all conditions.
5.1. Simulation Results
The simulation results achieved using SSA, SSO, and the proposed RMSSO algorithms under the day-ahead pricing scheme are compared in this section. A simulation was carried out for sixteen different appliances with a total demand of 10 kW under five climatic conditions and constraints using the Python/GUROBI tool. The specifications of the system used were as follows: processor Intel (R) Core (TM) i3-7020 U CPU @ 2.30 GHz; 12.0 GB RAM; 64-bit operating system type; x64-based processor. All algorithms scheduled the load demand as shown in
Figure 5a–e, which are discussed in the upcoming sections.
Table 3 illustrates the simulation parameters.
DAP hourly price for five climatic conditions was taken from the Indian Energy Exchange, and the same is represented in
Table 4 [
37]. Recent research [
50,
51,
52,
53,
54] has proved that both TOU and DAP pricing schemes reduce the energy consumption cost and the peak-average ratio. Hence, this paper considered the DAP scheme as the preferred option to use. The highlighted price in
Table 4 represents the peak price of the day.
In the monsoon, spring, and summer seasons, one non-schedulable appliance is taken into account, and in the autumn and winter seasons, two non-schedulable appliances were considered for 24 h operation.
Table 5 represents the number of times that an appliance is to be operated to ensure that a specific appliance task is completed, and the same is achieved 100% by satisfying the constraints provided in Equations (12)–(19). The highlighted numbers in
Table 5 represent the number of times the appliance (non-schedulable) must be operated.
5.1.1. Demand Comparison
Figure 5a–e shows the comparison of load scheduling using the SSO, SSA, and proposed RMSSO techniques for individual time slots. The total load request by the consumer during the day was limited to the threshold of 10 kW to avoid peak demand issues. In
Figure 5a, (monsoon) the
and
time slots with high electricity prices shows that both SSO and SSA algorithms had scheduled the load of 0.4 to 0.6 kW, whereas RMSSO scheduled 0.2 to 0.3 kW, which is less than the load scheduled by SSO and SSA. Similarly, during the
slot, SSO and SSA scheduled 0.3 kW of demand. However, RMSSO scheduled the appliances that had a total load of 0.2 kW. Note that the proposed RMSSO distributed the appliance across all time intervals, resulting in a reduced energy consumption cost without exceeding the threshold limit of 1.2 kW.
Likewise, in the remaining climatic conditions (autumn, spring, summer, and winter), the proposed RMSSO effectively scheduled load in all time slots in comparison to other techniques, as illustrated in
Figure 5b–e. Consequently, this comparison reveals that the proposed RMSSO algorithm scheduled the appliance with a reduced cost of energy consumption and regulated peak demand, which is a benefit for both the utility and the consumer.
5.1.2. Total Load Comparison
Figure 6 presents the total load comparison results of all three algorithms. The proposed RMSSO scheduled its load at 10 kW in all five climatic conditions. Considering the autumn season, both SSO and RMSSO scheduled the loads with 9.43 and 10 kW respectively, whereas SSA scheduled the load with 14.5 kW. In the summer season, both SSA and SSO scheduled the load of 16.43 kW each, which was greater than the total load requirement (10 kW) for the day. This excess load scheduling causes concerns such as power loss, increased peak demand, and the high cost of energy consumption. The RMSSO algorithm covered the total demand of 10 kW, which indicated that 100% of the consumer’s maximum demand was satisfied.
5.1.3. Cost Comparison
Figure 7a–e shows the cost comparison of RMSSO with those of SSA and SSO techniques for each time slot. Considering
Figure 7a with day-ahead pricing (monsoon), the RMSSO algorithm achieved energy consumption costs lower than those of SSO and SSA between 0.90₹ and 1.15₹ during the high-cost time (
and
) slots. At the same time, the SSA and SSO techniques scheduled the load between 1₹ and 2.25₹. In comparison, the RMSSO energy consumption costs were lesser than those of the SSA and SSO algorithms in all the time slots.
Figure 7b shows the individual time slot cost comparison in the autumn season. Notably, in the peak period (
to
), the SSA showed maximum energy consumption cost, and SSO and RMSSO showed around 0.5₹ to 1₹. RMSSO scheduled with the energy consumption cost of 2.5₹ in the
time slot, which was higher than the load scheduled by the SSA technique, indicating that RMSSO scheduled higher demand than the other techniques did in these slots. Nonetheless, even in the other climates (
Figure 7c–e), the proposed RMSSO algorithm outperformed the other two algorithms in saving the energy consumption cost.
5.1.4. Total Cost Comparison
The total cost comparison of the proposed RMSSO with those of SSA and SSO is given in
Figure 8. Considering the monsoon season, the RMSSO energy consumption cost was 24.11₹ which was less than those of the SSA and SSO techniques, i.e., 30.88₹ and 31.91₹, respectively. Similarly, during the autumn season, SSO and RMSSO attained the lowest costs of 24.30₹ and 24.15₹, respectively, compared to that of the SSA technique. Accordingly, the proposed RMSSO stood ahead of SSO and SSA techniques.
Table 6 provides a detailed comparison of the total energy consumption cost and load scheduled by each technique.
5.1.5. Task Completion Analysis
From
Table 7, it is found that in the monsoon season, the proposed RMSSO algorithm completed 100% of the task (10 kW), while the SSO and SSA techniques completed 129.5% and 126.5%, respectively. In the same scenario, the percentage cost difference of SSO and SSA from RMSSO was 24.44% and 21.92%, respectively. The proposed RMSSO completely satisfied the demand (100%) for the autumn season, and only 94.3% of the demand was satisfied by the SSO algorithm. This shows that SSO could not meet the total demand requirement. In the same scenario, the SSA technique finished 145.2% of the task. The percentage of cost difference between SSO and SSA from RMSSO for the same autumn season was 0.617% and 37.30%, respectively. Further, while considering the spring season, RMSSO satisfied 100% of the demand required. However, the SSO and SSA techniques were completed at 102.9% and 106.9%, respectively. Additionally, the percentage of cost difference between SSO and SSA from RMSSO in the same season was 3.908% and 10.188%, respectively.
During the summer season, RMSSO met 100% of the required demand, whereas the SSO and SSA approaches met 164.4% and 164.3% of the requirement, respectively. The percentage cost difference of SSO and SSA from that of RMSSO in the summer season was 40.75% and 40.74% respectively. Similarly, RMSSO completed the required demand of 100% in the winter season, while the SSO and SSA techniques accomplished demand of about 150.8% and 144.9% respectively. While considering the percentage cost difference of SSO and SSA techniques from the proposed RMSSO algorithm, both SSO and SSA techniques scheduled their demand with high cost with a difference of 36.48% and 33.53% respectively. It was because the SSO and SSA techniques were trapped in local optima solutions, whereas RMSSO attained the global optimal solution. Similarly, the comparison of remaining climatic conditions also proved that 100% of the tasks were completed at the lowest response time with maximum consumer satisfaction by the proposed RMSSO algorithm. Meanwhile, both SSO and SSA techniques scheduled the loads at higher energy consumption costs. Load scheduling by SSO and SSA techniques led to power loss, increased peak demand, and a high cost of energy consumption.
5.1.6. Robustness
An effective optimization algorithm should converge to the same global solution over iterations. The convergence curve of the proposed RMSSO algorithm was compared with those of the SSO and SSA techniques (
Figure 9a–e). These convergence curves were plotted against the number of iterations (50 counts). From the figure, it is proven that the RMSSO algorithm attained energy consumption costs lower than those with the other algorithms in all five climate conditions, which was because of the effective modification of Equation (32). Further, the curves prove that RMSSO was capable of exhaustively exploring and exploiting the search space in order to determine the best optimal cost with the lowest response time.
This paper adopted and used existing methodologies to check and validate the correctness and accuracy of the proposed optimization algorithm. Firstly, the quantitative results were used to measure how much better RMSSO was compared to SSA and SSO algorithms. Exploration occurs before exploitation, which supports RMSSO to improve the accuracy towards global optimum. To provide a fair comparison, the controlling parameters for all the algorithms, like number of search agents and maximum iteration, were kept same (i.e., 50). The dimension considered was also common to all algorithms (i.e., 24) along with the boundary limit of (Emin, Emax), as given in Equation (17). For other controlling parameters, the respective mathematical model of algorithms was used, and its best performance was obtained.
Table 8 illustrates the best, average, and worst outcomes obtained from the proposed RMSSO, SSO, and SSA techniques (which were tuned for 20 trail runs) in the scheduling process. These computational results were obtained from the common home environment, constraints, number of search agents, and number of iterations. This quantitative analysis was done to benchmark the performance of the proposed RMSSO algorithm, which can solve challenging problems even with a large number of variables. Furthermore, from this table, the performance difference between the RMSSO, SSO, and SSA techniques has become more pronounced. While RMSSO attained optimal cost in all five climates, the SSO and SSA techniques showed poor performance by attaining high energy consumption costs in all climates. Thus, the results have proved that the proposed RMSSO algorithm outperformed the SSA and SSO algorithms.
5.1.7. Computational Complexity Analysis
In comparison with that of the SSO algorithm, the time complexity (quantitative analysis) of the proposed RMSSO algorithm mainly depends on two aspects: (1) random initialization and (2) sperm velocity and location/position updates. These two aspects qualitatively describe the algorithm’s time complexity and are expressed as O (N × D) by the
Big O notation, where N is the population size and D is the search space dimension. The authors of this paper did not modify the algorithm’s initialization process and the loop body of the algorithm. Therefore, the time complexity was compared in terms of sperm velocity and position updates.
Table 9 shows that the proposed RMSSO algorithm had less computational complexity/cost than the traditional sperm swarm optimization (SSO) algorithm and SSA technique did. It was because the proposed RMSSO did not follow the inertia weight updates and the calculation procedure of the SSO algorithm. Despite this, the proposed RMSSO algorithm’s time complexity remained O (N × D), since the algorithm’s loop body was not altered.
5.2. Hardware Implementation
A complete experimental model of a home energy management system was designed based on the specification given in
Table 1 and
Table 3, presented in
Figure 10a. The power circuit of HEMs is shown in
Figure 10b.
Comparison of Peak-Average Ratio (PAR)
In this section, a comparison of the peak-average ratio (PAR) is discussed. From
Figure 11, it is observed that a remarkable difference in PAR value was achieved by RMSSO in all five climatic conditions compared to that of SSO and SSA techniques.