1 Introduction

Global warming causes environmental degradation by releasing approximately 40% of global carbon emissions, due to the burning of fossil fuels used in generating electricity by conventional sources. Therefore, the power system engineers are required to optimize the production of environmental degrading components by shifting the power generation from conventional sources to non-conventional sources. Therefore, to mitigate global climate change and balance increased load demand, renewable energy sources (RES) are deployed into the microgrid (MG). MG is an amalgamation of distributed generation (dispatchable and non-dispatchable), storage and distributed loads. However, power generation from RES are sporadic in nature which needs energy management system to balance the generation and demand. Demand response (DR) plays a vital role in energy management and offers higher flexibility and reliability to the power system. Figure 1 shows the advantages of deploying DR into the MG. The primary objective of DR initiatives is to mitigate peak load demand without hindering customer comfort and satisfaction. By motivating consumers to shift their electricity usage away from peak periods when prices are typically higher, DR effectively alleviates stress on the MG and enhances overall MG reliability. Moreover, the environmental and economic benefits yielded by DR programs highlights its significance in advancing sustainability goals. Figure 2 represents the price elastic demand, a small reduction in load demand has resulted in great reduction of price of the MG. Energy management in a MG is classified into three types namely, centralized energy management, decentralized and distributed energy management. In the centralized energy management all the information regarding MG components and loads has to be exchanged with the central controller which hinders the data privacy and issues related to security. The distributed energy management don’t need all the information of the MG components since the problem gets decomposed into sub-problems i.e., primal variable and dual variable. Each MG agent has to solve the local problem with the objective of reducing the self-energy consumption and updates or exchanges the information with the neighbouring agents. There is no need to exchange all the information with the controllers. Therefore, a distributed energy management based on alternating direction method of multipliers (ADMM) was proposed to analyse the impact of DR on TOC, MCP and TCT.

Fig. 1
figure 1

Advantages of employing demand response program

Fig. 2
figure 2

Price elastic demand

Outline of the paper This paper is organized as follows: Sect. 1 outlines the introduction and justifies the necessity for incorporation of DR, Sect. 2 discusses about the literature review, research gaps in the field, contributions of the paper, Sect. 3 introduces a brief discussion on MG components, Sect. 4 states the problem formulation, Sect. 5 introduces the proposed ADMM based energy management, Sect. 6 discusses about the results and Sect. 7 specifies the conclusions of the work done and a future direction.

2 Literature review

Residential load comprising of interruptible loads (IL’s), non-interruptible loads (NIL’s), PV generation and BESS which forms a smart residential MG. Owing to its flexibility smart residential MG ameliorates the load uniformity. In [1], proposed a method to cluster the loads into adjustable, interruptible, and non-interruptible loads with the help of smart meter and smart appliances.

Demand response is one of the available programs which is used to improve the electricity flexibility. DR is defined as changes in the customer use of energy in significance to electricity price without jeopardizing the system reliability and security. Figure 3 shows the classification of DR programs. Price based DR is simple and easy to implement. The accumulation of large loads at low electricity prices creates local peaks, this phenomenon is referred to as rebound effect (RE). The occurrence of RE at low price zone heightens the volatility of market clearing price (MCP) and the operational cost of the microgrid. Inherently, the scheduled inelastic consumers at low price zone suffer from increased MCP and therefore, the total consumer tariff (TCT). The occurrence of RE depends on the load curve, peak to average ratio, electricity price and the percentage of interruptible loads present in the system. A review on various residential demand response programs is given in [2] where, customer satisfaction is the priority. K-means clustering is an unsupervised clustering algorithm which is used to cluster the datasets into a predefined number of clusters. The time required for a hierarchical clustering algorithm is more compared to the K-means algorithm. But, the convergence in K-means is a function of the assumed initial centroid.

Fig. 3
figure 3

DR programs for energy management

The quality of clustering plays a significant role in selecting the type of clustering method employed. Silhouette rule provides information regarding validation or endorsement of clustering methods used. It specifies the closeness of data sets within cluster and neighbouring cluster and it ranges between [− 1,1]. Clustering is a method of grouping the data points to the nearest cluster where the centroid is minimum. The clustered group will have similar characteristics. Electrical apparatus has operating characteristics or signatures such as voltage, current, frequency and harmonic content which varies based on the type of load connected and mode of operation. The presence of aggregators in the MG allows small resources to join in DR thereby increasing the operational flexibility of the resources [3]. Faria et al. [4] presented a K-means algorithm for finding the type of load connected to the building internet of things (BIOT) by considering the harmonics present in the signal. The generation of harmonics is more in case of capacitive load when compared to the inductive load. Figure 4 represents the classification of loads based on the elasticity attached to them. Figure 5 shows the methods to avoid RE. Table 1 shows a detailed review on methods to calculate MCP (i.e., auctions and settlement rules available in the literature), Table 2 on types of DR programs along with objectives considered to optimize and Table 3 on types of energy management programs available in a MG respectively.

Fig. 4
figure 4

Types of loads

Fig. 5
figure 5

Methods to overcome occurrence of rebound effect

Table 1 A review on developments in calculation of market clearing price
Table 2 A review on demand response programs employed in the literature
Table 3 A review on energy management in a microgrid

The decisions and the supervision in the centralized energy management system are independent, therefore, the function of CEMS is to balance the generation and demand of the entire system. This type of control scheme is mostly employed for single owner owning the entire entity, it suffers from a single point failure and due to its large control size, it requires high computational effort. Further, the convergence rate is a function of network size. In the decentralized EMS, each MG consists of a local EMS or controller to optimize its cost and therefore forms an isolated entity. Privacy is preserved. A three-stage methodology was employed: stage 1 deals with programming of smart homes with IoT enabled using decentralized space without hindering the consumer level of satisfaction and comforts. Second stage deals with RES’s and the third stage deals with PEV’s. It is shown that the daily TCT was decreased by 30.7% with the proposed methodology [33].

3 Research gap and motivation

From the literature the authors have found following research gaps that hinder the application of DR programs into the existing MG.

  • Impact of load curtailment on the scheduling status of MG resources is not considered i.e., if the amount of load curtailed is less than or equal to or greater than the capacity of peak generator or marginal generator at peak hour.

  • Impact of load re-distribution on the TOC, TCT and MCP. For example, the curtailed load from peak demand should be re-dispatched to another scheduling hour to avoid the consumers dissatisfaction but no research focused on which hour the curtailed load should be re-dispatched without sacrificing both the TCT and TOC.

  • The impact of responsive loads on the occurrence of rebound effect i.e., shifting of peak demand from one scheduling hour to valley hours which creates a local peak and the impact on TCT, TOC not been addressed.

  • Further, the impact of rebound effect i.e., occurrence of local peak on the market clearing price and total consumer tariff at that hour.

  • Moreover, the impact of amount of load curtailed on the TOC, MCP and TCT. How much load should be curtailed (whether to reduce 10% or 25% or 50%) to optimize the TOC, MCP and TCT is not addressed.

  • The curtailment of load demand from the peak hour will obviously reduce the operational cost but what way the curtailment impacts payment of inelastic loads, self, and cross elastic loads. In similar lines load redistribution analysis on the same is not done.

4 Contribution and paper organization

Based on the worth noting points, a sophisticated scheduling method is required for reducing the operational cost that in turn reduce the MCP and emissions of the MG.

  • Unlike existing studies on the dispatch schedule of grid connected MG that return the dispatch schedules of generators and optimal OC, the authors presented a detailed impact of load curtailment on the dispatch schedule, OC, MCP and TCT.

  • A novel load scheduling approach based on ADMM is employed for distributed energy management framework. To reduce the operational cost on the MG, a load clustering methodology is applied for clustering the loads into essential and non-essential loads and then shifting the non-essential loads from peak hours to off- peak hours by considering DR programs.

  • The authors also explored how various load types within the microgrid react to DR events, focusing on how Demand Response (DR) affects self, cross-elastic, and inelastic loads.

  • Although minimizing the microgrid's operating costs is the main goal, DR event deployment also lowers customer tariffs and emission generation, which shows benefits beyond just financial savings. The study extensively investigates at how load rescheduling brought about by DR events affects MCP, TCT, and TOC, offering helpful details about the many benefits of DR integration.

  • A comprehensive investigation has been conducted on the effects of the Rebound effect on MCP and TCT, using an IEEE-33 bus test setup as the foundation for study. Through the examination of the possible rebound effect, which is the phenomenon where energy consumption increases after a time of decreased use, the research provides a sophisticated comprehension of the ways in which DR initiatives impact market dynamics and transaction costs in the microgrid setting.

  • Analyzed the performance of microgrid with and without battery storage, details of dispatch schedule when power exchange from grid is unidirectional and bi-directional, application of demand response and finding the dispatch schedule from each generator, etc.

  • Detailed results of operational cost reduction, customer tariff and emission reduction presented in the results section. Two cases have been considered namely, Case 1: IEEE- 18 bus system is considered to assess the impact of resource scheduling on OC and MCP. Case 2: IEEE-33 bus case study was considered to assess the impact of rebound effect on the MCP and TCT. Residential loads occupy 30% of the load demand and the flexibility in shifting the loads is more as compared to other loads. Therefore, the study focuses on clustering, shifting, and managing the load profiles of residential customers.

5 Microgrid components

MG consists of dispatchable sources, non-dispatchable sources and geographically scattered loads with storage. Dispatchable sources are MT, FC and diesel generator in which power output can be controlled, non-dispatchable sources are WT and PV in which the power output is erratic, variable, and uncontrolled. Storage system can be mechanical, thermal or electrical. The electrical storage provides advantages such as flexibility, black start and ramp-up possibilities compared to the other storage systems. Figure 6 shows a MG which can be operated in grid connected mode and in isolated mode by using the switch, S. In grid connected mode the frequency stability issues occurred in MG mitigated by main grid, whereas in the isolated mode there is a need to provide the BESS. In an isolated MG depending on the state of charge (SoC) of BESS, the RES’s controls their output by pitch control and voltage-controlled mode to maintain the dynamic balance. Static economic load dispatch problems cannot able to handle the uncertainties present in the DER’s which may create imbalance in the generation and load demand. This aggravates the frequency instability, necessitates starting of fast ramp generators and therefore the OC of the MG. The conventional static economic dispatch is therefore hindering the energy management in a volatile MG environment. Therefore, there is a need for provision of DR into the MG.

Fig. 6
figure 6

a Energy management system. b Impact of critical peak pricing, real time pricing and time of use pricing on energy exchange with the grid

A residential MG consists of PV, small WT, electric vehicle, smart meter and smart loads as shown in the Fig. 6a. Interruptible loads can be switched on or off depending on the load demand and electricity price on the system without disturbing the consumers lifestyle. Non-interruptible loads are the essential or priority loads which are to be supplied without fail. Since the considered bus is of alternating current (AC) type all the generation will be converted to AC i.e., the output power from PV is DC, convert and fed to the bus. The power flow from sources is unidirectional whereas, from the BESS it is bi-directional. When the available generation on the MG is more than the load demand, the surplus energy fed to BESS and if the load demand is more than the generation, BESS delivers stored charge to the MG in order to maintain the dynamic balance between the generation and load demand. The function of HEMS is to control the load demand by properly scheduling the resources available in a home in accordance with the pricing information which is received from the local area network (LAN) whereas, the electricity is received from the service mains. The energy management in a grid-connected MG during time of use pricing, critical peak pricing, real-time pricing, and market clearing price is displayed in Fig. 6b. The quantity of power from the grid to the MG decreases during high RTP, but the power from the MG to the grid increases in order to generate greater profits. Similar to this, a proposal for critical peak pricing, which lasts for a few minutes, aims to lessen the stress on the power system. In this scenario, power consumption decreases and the quantity of power transferred from the grid to MG decreases. The three zones in TOU represent the off-peak, mid-peak, and peak durations of the entire scheduling horizon. In this instance, to lower the TCT of each individual customer, the majority of the loads are either disconnected or moved from peak to off-peak instant. The most basic pricing strategy offered by price-based DR programs is the TOU tariff. The intersection of generator and load bids determines the market clearing price, which is solely the price at which energy exchange takes place.

6 Problem statement modelling

This section addresses the problem formulation of optimal dispatch of MG sources in the presence of utility. The problem definition is represented in Eq. 1 which optimizes the operational cost of MG. Although, the motto is to reduce the operational cost but employing DR strategies further reduces the consumer’s tariff and emissions. The dispatchable resources such as DG, MT, FC and BESS are dispatched and non-dispatchable resources like WT and PV are allowed to generate as per their constraints to achieve optimality condition. Further, the problem definition must satisfy constraints such as equality and inequality constraints. Constraints create discontinuities in the search space and therefore, confine the area of search space. Since the power output from the RESs is uncontrollable and stochastic, further, the load demand is more than the amount of power generation through RESs. Therefore, the output of RESs is considered for self-consumption of the locality.

The decision variables are power generations, MCP, on/off status of units, no-load and start-up costs (\({SU}_{i}\)) and shut down costs (\({SD}_{i}\)) of the units. The presence of commitment status of units and start-up costs makes the objective non-convex. MCP is itself must find from the optimization. The Presence of MCP as decision variable complicates the objective function. Since, the power output from a PV and WT cannot be controlled so, they are not considered as decision variables. The net amount of power to be supplied by the dispatchable sources (\({P}_{disp}\)) is the difference of total load demand (\({P}_{load}\)) on the system and the power supplied by the non-dispatchable sources (\({P}_{non-disp}\)). The volatility in resultant waveform is more when compared to the volatility before penetration of RES’s.

$$\text{Min}, TOC= {C}_{DG}+{C}_{BESS}\pm {EXC}_{t}^{utility}$$
(1)
$${C}_{DG}= \sum_{t=1}^{24}\sum_{i=1}^{N}{K}^{i}*{P}_{t}^{i}+{SU}_{i}+{SD}_{i}$$
(2)

\({P}_{t}^{i}\) is the power generation from the ith committed generator, \({C}_{DG}\) is the OC of distributed generator (DG), \({C}_{BESS}\) is the OC of the BESS and \({K}^{i}\) is the IFC of the DG.

$${C}_{DG}={C}_{M}+{C}_{F}+{C}_{P}+{C}_{W}$$
(3)

where, \({C}_{M},{C}_{F}\), \({C}_{P}\) and \({C}_{W}\) are the OC of MT, FC, PV and WT respectively.

Dispatchable sources The amount of power generation through these sources are controllable by adjusting the fuel input. Major dispatchable sources are FC, MT and BESS.

Microturbine The OC characteristics of MT are modelled as piecewise linear model, \({a}^{M}\) represents the no-load cost of the MT. \({P}_{t}^{M}\) is the amount of power generated by the MT at time ‘t’ and \({K}^{M}\) is the IFC of MT.

$${{C}_{M}=P}_{t}^{M}*{K}^{M}+{a}^{M}$$
(4)
$$\left\{\begin{array}{c}{P}_{t}^{M, min}\le {P}_{t}^{M}\le {P}_{t}^{M, max}\\ {{R}^{down}\le P}_{t}^{M}-{P}_{t-1}^{M}\le {R}^{up}\end{array}\right.$$
(5)

Fuel cell \({P}_{t}^{F}\) is the amount of power generated by the FC at time ‘t’ and \({K}^{F}\) is the IFC of FC.

$${{C}_{F}=P}_{t}^{F}*{K}^{F}+{a}^{F}$$
(6)
$$\left\{\begin{array}{c}{P}_{t}^{F, min}\le {P}_{t}^{F}\le {P}_{t}^{F, max}\\ {{R}^{down}\le P}_{t}^{F}-{P}_{t-1}^{F}\le {R}^{up}\end{array}\right.$$
(7)

Utility The cost for energy exchange (\({EXC}_{t}^{utility}\)) between the grid and MG can be formulated as follows:

$${EXC}_{t}^{utility}={P}_{t}^{Utility}*{EP}_{t}^{Utility}$$
(8)

where, \({EP}_{t}^{Utility}\) is the electricity price of grid at time ‘t’.

Utility constraint:

$$\left\{\begin{array}{c}{P}_{t}^{Utility, absorb}\le {P}_{t}^{Utility}\le {P}_{t}^{Utility, supply}\\ {P}_{t}^{Utility, absorb}*{P}_{t}^{Utility, supply}=0\\ {EXC}_{t}^{utility}>0, energy\, sold\, to\, grid \\ {EXC}_{t}^{utility}<0, energy\, bought\, from\, grid\end{array}\right.$$
(9)

\({P}_{t}^{Utility}\) is the amount of power drawn from/supplied to the utility at time ‘t’. The maximum power absorbed by the utility during peak load instant is \({P}_{t}^{Utility, absorb}= -30\) and the maximum power supplied by the utility to the MG at time ‘t’ can be considered as \({P}_{t}^{Utility, supply}=30\) [34]. Constraint limits the amount of power exchange between the grid and the MG. If the electricity price for power drawn from the grid is greater than the electricity price of power produced in the MG, then allow the DERs to generate maximum and feedback the excess power to the grid on spot market.

Equations below show the OC calculation and inequality constraints on non-dispatchable sources, whose minimum generation is zero since they depend on the climatic conditions and maximum generation is limited by the rating of the equipment.

Photovoltaic source Eq. (10) indicates the operational cost modelling of PV and Eq. (11) shows the capacity limits on PV.

$${{C}_{P}=P}_{t}^{P}*{K}^{P}$$
(10)
$$\left\{\begin{array}{c}0\le {P}_{t}^{P}\le {P}_{t}^{P, max}\\ {{R}^{down}\le P}_{t}^{P}-{P}_{t-1}^{P}\le {R}^{up}\end{array}\right.$$
(11)

Wind turbine Eq. (12) indicates the operational cost modelling of WT, whereas Eq. (13) represents the constraints on power generation.

$${{C}_{W}=P}_{t}^{W}*{K}^{W}$$
(12)
$$\left\{\begin{array}{c}0\le {P}_{t}^{W}\le {P}_{t}^{W, max}\\ {{R}^{down}\le P}_{t}^{W}-{P}_{t-1}^{W}\le {R}^{up}\end{array}\right.$$
(13)

Equality constraint A simple generation and load demand balance condition. As shown in equation the sources are segregated as dispatchable and non-dispatchable sources.

$$\left\{\begin{array}{c}{P}_{load }- \sum_{i=1}^{N}{P}_{non-disp}-\sum_{j=1}^{M}{P}_{disp}=0\\ {P}_{disp}{=P}_{load }- \sum_{i=1}^{N}{P}_{non-disp}\\ {P}_{disp}={P}_{t}^{M}+{P}_{t}^{F}+{P}_{t}^{U}+{P}_{t}^{B}\\ {P}_{non-disp}={P}_{t}^{W}+{P}_{t}^{P}\end{array}\right.$$
(14)

\({P}_{t}^{L}\) is the load demand in kW. Equation (13) indicates the inequality constraint i.e., local constraint and Eq. (14) indicates the power balance constraint i.e., coupling constraint.

BESS constraint:

$$\left\{\begin{array}{c}\sum_{i=1}^{N}{P}_{discharging}-{P}_{charging}=0\\ {I}_{charging}*{I}_{discharging}=0\\ {P}_{t}^{BESS, charge}\le {P}_{t}^{BESS}\le {P}_{t}^{BESS, discharge}\\ {SOC}^{max}=80\%\left({P}_{BESS}\right)\\ {SOC}^{min}=20\%\left({P}_{BESS}\right)\end{array}\right.$$
(15)

\({P}_{BESS}\) is the size of the BESS, minimum and maximum limits on SoC are considered as 20% and 80% respectively. \({P}_{discharging}\) is the energy supplied by the BESS to the loads and during charging \(({P}_{charging})\), acts as the load demand on the MG. The Eq. 15 shows the basic charge balance equation and operational limits on a storage system. Further, the equation limits the occurrence of charge and discharge operation simultaneously which is specified as status of charging and discharging as zero.

$$TCT= \sum_{t=1}^{24}\sum_{i=1}^{N}{MCP}_{t}{P}_{t}^{L}$$
(16)

where, \({MCP}_{t}\) in Eq. (16) is the market clearing price at time ‘t’, \({P}_{t}^{L}\) is the load demand from the Lth load.

$${MCP}_{t}= \left\{\begin{array}{c}K\, at\, off-peak\, hour\\ M\, at\, peak\, hour\end{array}\right.$$
(17)
$$M=K+\frac{x}{y}$$
(18)

Equations (16, 17 and 18) represents the way of calculating the total consumer tariff. It is specified that the TCT is the product of MCP and load demand in Eq. (16) and MCP in Eq. (17) is modelled based on whether the scheduling hour is peak load or off-peak load. To recover the capital cost of MG, in Eq. (18) the start-up and no-load cost is amortized on the incremental fuel cost [35]. This expression is same as amortizing the no-load and start-up cost of committed generator in the respective scheduling hour. ‘\(x\)’ is the no-load and start-up cost of unit ‘i’, ‘\(K\)’ is the incremental fuel cost, ‘\(y\)’ is the power generated by marginal unit ‘i’ at peak load which is shown in Eq. (18). The loads are clustered into interruptible and non-interruptible loads by using a clustering technique. Priority is attached to the interruptible loads without violating the customers lifestyle and satisfaction.

Given \({\prime}M{\prime}\) number of clusters as represented in Eq. (19, 20).

$$L= {L}_{1},{L}_{2},\dots \dots ., {L}_{m},\forall m\in M$$
(19)
$${L}_{1}=\{{L}_{i1},{L}_{i2},\dots \dots .,{L}_{in}\}$$
(20)
$${P}_{t}^{L}={P}_{t}^{actual}-{P}_{t}^{curtailed}+{P}_{t}^{re-distributed},\forall t\in T$$
(21)
$$0\le {P}_{t}^{curtailed}\le {P}_{t}^{\text{max}curtailed},\forall t\in T$$
(22)
$${0\le P}_{t}^{re-distributed}\le {P}_{t}^{\text{max}re-distributed},\forall t\in T$$
(23)

\({P}_{t}^{L}\) is the overall load demand at time ‘t’, \({P}_{t}^{actual}\) is the actual load demand before applying DR programs, \({P}_{t}^{curtailed}\) is the amount of load curtailed from the actual load at time ‘t’ and \({P}_{t}^{re-distributed}\) is the amount of load re-distributed to scheduling horizon ‘t’ as represented in Eqs. (2123). Amount of load shift should be limited in order to avoid the occurrence of RE effect.

Static pricing can be defined as,

$${MCP}_{t}=Constant, \forall t\in T$$
(24)

Time of use pricing,

$$\text{TOU}=\left\{\begin{array}{c}\begin{array}{c}{Constant}_{1}, \forall t valley hour\\ {Constant}_{2}, \forall t\in off-peak hour \end{array}\\ {Constant}_{3}, \forall t\in peak hour\end{array}\right.$$
(25)

Demand elasticity is defined as the change in demand with a change in the electricity price signal. Equation (26) sets a limit on the amount of DR participation [36]. A hybrid meta heuristic algorithm was developed in [37], by amalgamating the crow search algorithm with arithmetic optimization algorithm to achieve a cleaner economic emission and TOU based DR is employed to minimize the operational cost of the MG.

$${DR}_{t}\le {DR}^{Max}$$
(26)

7 Methodology

A novel load scheduling approach along with ADMM approach is applied to optimize the total operational cost of the MG as shown in Fig. 7. Therefore, the MG should consist of BESS and small combustion engines along with the renewable sources such as PV and WT to meet the load demand of the distributed loads. In this section, the authors have presented the detailed description of scheduling methodology in a MG based on ADMM. ADMM is analogous to the distributed control framework since it divides the optimization problem into smaller sub-problems that can be solved by different agents in a distributed manner. ADMM is viewed as a combination of dual decomposition and augmented Lagrangian optimization and it is used to cope with the scattered nature of MG without the need for a central controller. The decomposition involves introducing the auxiliary variables and Lagrange multiplier to show the coupling between the sub-problems. Each agent solves the local optimization problem subject to its own set of constraints. The agents then communicate with each other to update their local variables based on consensus constraints which ensures that the local solution converges toward the global solution. Where X is the local variable that defines the power generation from individual MG sources and Z is the dual variable that indicates the power balance of the MG and Lagrangian multiplier captures the coupling between the decision variables and constraints.

Fig. 7
figure 7

Solution methodology

Sub-problem 1 Each agent solves the local problem by considering its local constraints that optimizes its own operational cost and updates the local variable X. Sub-problem 2 Each agent exchanges the information with the neighboring agents and checks for global load balance if there is any power deficit it exchanges the power from the grid. Each agent updates its own variables based on weighted average of its local and received variables. The objective of sub-problem 2 is to reduce the overall operational cost of the MG. It continuously compares the electricity price of grid and the operational cost of the MG. The augmented Lagrangian function is used in ADMM to convert the constrained optimization problems into a series of unconstrained optimization problems. Besides ADMM alternates between updating the variables linked variables related to sub-problems. The objective function for ADMM based consensus algorithm can be formulated as follows:

$$\underset{x,z}{\text{min}}(f\left(x\right)+g\left(z\right))$$
(27)

Subject to the following equality constraint of separable form.

$$Ax+Bz=c$$
(28)

Two sets of variables i.e., ‘x’ the primal variable and ‘z’ the dual variable with separable objective.

$${L}_{\rho }\left(x,z,y\right)=f\left(x\right)+g\left(z\right)+{y}^{T}\left(Ax+Bz-c\right)+\frac{\rho }{2}||\left(Ax+Bz-c\right){||}_{2}^{2}$$
(29)
$${x}^{k+1}={argmin}_{x} {L}_{\rho }\left(x,{z}^{k},{y}^{k}\right)$$
(30)
$${z}^{k+1}={argmin}_{z} {L}_{\rho }\left({x}^{k+1},z,{y}^{k}\right)$$
(31)
$${y}^{k+1}={y}^{k}+\rho \left(A{x}^{k+1}+B{z}^{k+1}-c\right)$$
(32)

where, \({y}^{T}\) is the Lagrangian multiplier and \(\rho\) is the penalty factor. Update the iteration count of primal variable, dual variable and Lagrangian coefficient based on Eqs. (30, 31) and (32) respectively.

Eqs. (33) and (34) show the amount of power exchange between the grid and the MG and Eq. (37) indicates the associated cost for power exchange.

$${P}_{Imp}^{Grid}>0$$
(33)
$${P}_{Exp}^{Grid}<0$$
(34)
$${C}_{Imp}^{Grid}={P}_{Imp}^{Grid}$$
(35)
$${P}_{Exc}^{Grid}={P}_{Imp}^{Grid}-{P}_{Exp}^{Grid}$$
(36)
$${C}_{Exc}^{Grid}={C}_{Imp}^{Grid}-{C}_{Exp}^{Grid}$$
(37)

ADMM uses consensus algorithm to achieve convergence and coordination.

  • Each agent initializes self-demand, minimum and maximum limits, offer cost details. Define number of agents and size of the local variables. Local variables are nothing but decision variables i.e., power generations, SOC, on/off schedules etc.

  • Formulate the constraints which includes energy balance constraints, power flow limits, battery storage constraints.

  • Check for isolated operation, if the MG is isolated from the main grid, MG resources i.e., PV and WT will operate on MPPT or off-MPPT based on the SOC of BESS. If SOC of the BESS is within the upper and lower limit then the PV and WT will operate in MPPT. If the SOC is out of limit then PV will operate in voltage-controlled mode and WT will operate in pitch-controlled mode which derates their output power. In grid connection mode always, PV and WT will operate in MPPT irrespective of SOC of BESS.

  • Consider no penetration of non-essential loads, this enables all the loads as essential loads therefore, there will be no shift in the load demand from peak duration to off peak duration. Generate initial population and check for constraint violation. Check for imbalance power between generation and demand.

  • Update the decision variables of each and every agent by resolving its local subproblem while considering the current values of Lagrange multipliers.

  • Update the Lagrange multipliers depending on the difference between the current and updated decision variables.

  • The updated decision variables and Lagrange multipliers should be communicated between agents to ensure consensus and coordination. Increment the percentage of non-essential loads in steps of 2% of total load demand. Shift the load from high electricity price period to low price period. Check whether the shifted load is within the maximum limit of shift. If yes, repeat this step and if it is a no, then stop further shifting of the load.

  • Now consider this new load profile for dispatching. The generation from RES are not dispatchable since they are volatile, stochastic, and uncontrollable due to the dependency on atmospheric conditions; therefore, allow those generators to generate up to their capability. The remaining power should be dispatched on the dispatchable type sources.

  • The generators with least amount of fuel cost and emission generation will be loaded more compared to other sources. Calculate the operational cost, load factor, MCP and emission cost. Update the primal variable, dual variable and Lagrange multiplier. Check for convergence i.e., whether the primal and dual residues are within the specified tolerance and stop. Each agent sends/receives local variables to/from neighbor agents. After receiving information each agent updates its own variables based on the weighted average computed before. Aforementioned that the ADMM procedure is decoupled into so many sub-problems which can be solved in parallel to reduce the objective evaluation time. Calculate the TOC, MCP and TCT of the MG.

8 Results and discussion

8.1 Description of cases and respective scenarios

Case 1: IEEE-18 bus system is considered in order to study the impact of demand response on TOC of the MG [38]. Case 2: IEEE-33 bus system is considered in order to study the impact of occurrence of RE due to the application of demand response programs on MCP and TCT of the MG. Here, two different test systems are considered because the RE depends on shape of load profile and on MCP. The load curve of IEEE-33 bus system is very helpful in studying the impact of RE on MG.

In case 1 again four scenarios are considered where, scenario 1 represents dispatching the MG sources and utility without BESS, scenario 2 represents dispatching the MG sources, utility and BESS and assumed that the energy exchange from utility is unidirectional (i.e., supplies energy), scenario 3 represents dispatching the MG sources, utility, BESS and assumed that the energy exchange from utility is bi-directional (i.e., supplies/absorbs energy depending on the grid electricity price), scenario 4 represents dispatching the MG sources, utility, BESS and assumed that the energy exchange from utility is bi-directional, to meet the load demand optimally PBDR programs have been deployed. Figure 8a depicts the forecasted energy from the PV and WT for all the scheduling hours and energy from these sources are considered deterministic instead of stochasticity to avoid the brevity. Figure 8b shows the forecasted load demand and forecasted grid electricity price.

Fig. 8
figure 8

a, b Forecasted power from PV and WT and load demand and grid electricity price respectively

8.2 Description of test system for case 1

Scenario 1 Represents the dispatching of MG sources and utility without BESS. In this scenario, the dispatchable sources i.e., MT and FC control their output and non-dispatchable sources generates based on the availability of wind speed and irradiance. Figure 9a, b represents the offer cost details and Table 4 represents the upper and lower limits on each source. The imbalance power in the MG will be meet by the utility on satisfying the optimality condition.

Fig. 9
figure 9

a, b Bid cost details and emission coefficients, start-up and shut down cost respectively [38]

Table 4 Generator details [38]

The OC of FC is lesser than the OC of MT, the MT will be scheduled when the grid electricity price is more than the OC of MT. The power generation from MT will be limited when the grid electricity price is lower. Therefore, there is no economic operation since the highest operational cost generator produces the maximum power when the electricity price of the grid is maximum. Hence, the TOC is more compared to the other scenarios for supplying the load demand on the system. The amount of emission generation is more from the MT when compared to all the sources present in the test system. TCT paid by the consumers in this scenario is 3058 euros. The penetration of RES’s into the MG makes the system load demand more volatile and is depicted in Fig. 10a. Figure 10b shows the dispatch schedule of MG in scenario 1. Further, from the results the load factor i.e., 0.79 of the system is low since huge difference between the peak and non-peak demand.

Fig. 10
figure 10

a, b Volatile load demand due to penetration of DER’s and Dispacth schedule for scenario 1 respectively

Scenario 2 In this scenario, scheduling of MG sources and utility by considering the impact of BESS and assumed that the energy exchange from the utility is unidirectional (i.e., supplies energy). In this case, the DGs (i.e., MT, FC, BESS) and utility are allowed to generate optimally to meet the demand that optimizes the TOC of the MG and the constraints related to emission emanates. BESS charges when the GEP is lesser than the incremental bid of marginal generator and dispatches when the GEP is higher than the incremental bid of marginal generator. The incremental bid of dispatchable sources is highest for MT when compared to the other, therefore, the MT is considered as marginal generator in all the scenarios.

However, the incremental bid of non-dispatchable sources is the highest, since these sources don’t produce any emissions; they are allowed to produce without constraints in OC. This scenario yields better results compared to the scenario 1 but, the utility is considered as unidirectional therefore, this case yields meagre results compared to scenario 3. Figure 11a shows the economic dispatch schedule of scenario 2. The TCT is reduced from 3058 to 2656 euros from scenario 1 to scenario 2. Moreover, from the results it depicts that the load factor of the system is unchanged when compared with scenario 1 since the impact of DR is not considered and the value of load factor is 0.79.

Fig. 11
figure 11

a, b Dispatch schedule for scenario 2 and 3 respectively

Scenario 3 Dispatching the agents (i.e., MT, FC, BESS), utility and considered that the energy exchange from utility is bi-directional (i.e., supplies/absorbs energy depending on the marginal price) as shown in Fig. 11b. If the electricity price of grid is less than the incremental bid of MT, then the utility supplies maximum amount of load demand and in this context, BESS charges and discharges when the GEP is higher than the incremental bid of marginal generator. Moreover, from the results it depicts that the load factor of the system is unchanged when compared with case 1 and 2. Figure 12a depicts the dispatch schedule of FC for scenarios 1 and 2. Figure 12b represents the dispatching status of utility from scenario 2 to 3 and the utility is supplying maximum power when the GEP is less and absorbs when the GEP is more. The TOC for the 24-h scheduling period for scenario 1, 2 and 3 is shown in Fig. 13a. In the scenario 3, the dispatch is in such a way that the TOC is negative. The amount of emission generated in kgs is represented in Table 5.

Fig. 12
figure 12

a, b Effect of BESS on dispatch schedule of FC, power exchange between MG and utility in scenario 2, 3 respectively

Fig. 13
figure 13

a, b represents operational costs for three scenarios and modified load demand in kW respectively

Table 5 Comparison of load factors in scenario 4

Scenario 4 In this scenario, the dispatching of MG agents, utility, BESS and employed DR to meet the load demand optimally. The constraints related to the limit on amount of load shifting, amount of curtailment, emission and minimization of fuel cost emanates. Economically modified demand is a part of load shifting based demand response in which the user has to control the amount of load shift in order to reduce the rebound effect. Whereas, reliability-based demand is a part of load curtailing-based demand response in which the user has to control the amount of load curtailed in order to reduce the peak stress on the system as shown in Fig. 13b. The amount of load shift constraint governs the economically modified load demand whereas, the load factor constraint governs the amount of load curtailment. Figure 14a. represents the dispatch schedule in scenario 4 and Fig. 14b. represents the total operational cost of the MG in scenario 4.

Fig. 14
figure 14

a, b represents the dispatch schedule and OC of the MG for scenario 4 respectively

If the demand on the system alters and the loads somehow get shifted to peak renewable generation time horizon then the emissions also get reduced. MT is off for 6 scheduling hours namely hour 5, 18, 19, 20, 23 and 24 which reduces the emission from the respective generator. Moreover, from the results the consumer tariff gets reduced due to the deployment of DR programs. Table 6 shows the emission comparison of all the cases. The inelastic loads at hours 0–6 suffers from the high market clearing price as shown in the Fig. 15a. Figure 15b shows the reduction of consumer tariff for all the 4 scenarios considered. The tariff paid at the load growth instant by the inelastic consumers is high and the tariff paid at the load curtailment instant is low as depicted in the Fig. 15b. The TCT in scenario 4 is 2254 euros whereas in scenario 1, 2 and 3 it is 3058, 2656 and 2656 euros respectively.

Table 6 Emissions generation comparison for all the scenarios
Fig. 15
figure 15

a, b Market clearing price and total consumer tariff respectively

9 A case study to assess the impact of demand response on market clearing price and total consumer tariff

To reduce the burden on the power system, a part of peak load is curtailed and shifted to other scheduling hours. This will improve the reliability of the power system. Further, the TOC decreases due to load curtailment since, the inefficient, high operating cost and inflexible generator must be committed to meet the increased load demand. The current work focuses on how this shift in load demand impacts various consumers and how it impacts the TOC minimization, MCP and TCT minimization. IEEE 33- bus test system was considered for analyzing the impact of RE on TOC, MCP and TCT. Load duration is considered for 24 h as shown in Fig. 16a, the impact of load re-distribution on the TOC, MCP and TCT was also shown in the present work.

Fig. 16
figure 16

a, b Load demand considered for energy management and impact of rebound effect on operational cost respectively

9.1 Solution steps

  • Read the load demand, generator offers, curtailable and re-distribution information of the loads as per user satisfaction.

  • Generate random population and check for constraints. Curtail the 30 percent of peak load to reduce the system burden.

  • Re-distributing the curtailed load demand randomly to other scheduling hours might increase the MCP, TOC and TCT. Re-distribute the load based on MCP, number of valley hours, available reserve at valley points.

  • Calculate the MCP, TOC and TCT by using equations given above.

Sub case 1: Original load demand curve and economic dispatch, sub case 2: modified load demand curve and payment cost minimization, sub case 3: modified load demand curve and conventional unit commitment. In the Fig. 16a, it is depicted that the peak hour gets shifted from 19 to 14. Even though the peak demand for sub case 2 and sub case 3 is same i.e., 685.9 kW, the operational cost, MCP and TCT is different. How a change in the generation schedule impacts the costs namely, TOC (shown in Fig. 16b), MCP and TCT is indicated in Table 7. Further, Table 8 indicates the cost comparison with other algorithms specified in the literature.

Table 7 Difference in costs
Table 8 Comparison of the proposed methodology with the existing methodologies (for case study only)

The power generated by the marginal generator at peak hour in sub case 2 is 166.26 kW and in sub case 3 is 72.5114 kW. The MCP corresponding to sub case 2 and sub case 3 can be calculated as follows: For a peak load scheduling hour, the MCP = A + Q/P. Where, A is incremental fuel cost for unit ‘i’ and Q represents no-load and start-up cost, P indicates the power generated by the marginal generator at peak hour ‘t’. For case 2: MCP = 14 + 350/166.26 = 16.105 rupees. For case 3: MCP = 14 + 350/72.5114 = 18.826 rupees. Figure 17a and b depicts the impact of RE on MCP and TCT respectively. As in the Fig. 17a it is clear that the MCP for sub case 2 is higher at the scheduling hours 3, 4 and 5, since the load re-distributed at this hour is high as compared to sub case 3. The TCT at hours 2 and 6 is the highest in the case of sub case 3 as compared to sub case 2. At hour 3, 4 and 5 in sub case 1 the MCP is 8 Rs/hour and the inelastic loads has to pay this amount to avail the power. Due to the load shift the inelastic loads at the valley point of load demand curve has to pay for increased MCP i.e., at 14 Rs/h and the TCT will increase from (8*144.4 kW) to (14*144.4 kW) i.e., Rs. 1155.2 to Rs. 2021.6.

Fig. 17
figure 17

a, b Impact of rebound effect on market clearing price and on consumer tariff respectively

10 Conclusion

Peak demand on the system can lead to inefficiency and environmental issues. To reduce emissions, demand response is crucial. Shifting loads from high price zones to low-price zones can help mitigate these effects. Therefore, an IEEE 18-bus case study was considered to study the impact of DR on TOC, TCT and MCP in which load shifting is done which makes the load profile more uniform i.e., the ratio between average and maximum load which improves the load factor of the system. Load factor is increased from 0.79 to 0.83 from scenario 1 to scenario 4. Peak load demand on the MG is reduced from 82 to 78 kW by employing DR without hampering the consumer level of comfort and satisfaction. The TCT was reduced from 3058 to 2254 euros from scenario 1 to scenario 4. Average demand on the system was reduced from 65.54 kW to 64.8 kW. Incorporation of DR leads to the efficient energy management and further, reduces the peak load stress on the MG. Further, the emission has been reduced as the generation is from the already committed base load generators which avoid the need for peaking generators. Due to load re-distribution the MCP, TOC and TCT reduce and with load curtailment, TOC reduces MCP and TCT depending on the commitment status of the marginal generator. Due to DR peaks getting shifted from one scheduling horizon to another scheduling horizon which is termed as rebound effect. Due to the rebound effect, the inelastic loads suffer from increase in MCP. Results depict that, if the curtailed load is rescheduled to a greater number of scheduling hours, then the chances of the RE occurring can be eliminated. Further, the power supplied by marginal generator in sub case 2 is 166.26 kW and in sub case 3 is 72.51 kW. The increase in TCT from sub case 2 to sun case 3 is 11,046.41 rupees to 12,912.75 rupees due to decrease in power dispatch from marginal generator whereas, there is a decrease in TOC from sub case 2 to 3 from 6495.45 rupees to 6150.75 rupees. As a future direction, the readers are motivated towards the development of new demand response programs which considers both economical aspect and environmental aspect for curtailing the load demand and deploy an objective function for maximization of renewable energy usage. Dynamic sustainability pricing is a novel DR program in which the price is adjusted in accordance with the environmental and economical consideration, helps in maximization of renewable energy penetration. The goal is to incentivize customers to vary their electricity usage behaviour in a way that supports sustainability goals while enabling the reliability and stability of the power system.