1 Introduction

A significant amount of efforts are being made to reduce environmental pollution. One of the major contributor to this pollution, along with energy generation sector, is the transportation sector. Electric vehicles (EVs) have been proposed to solve this issue. Integration of EVs with power system for charging their batteries is increasing. According to a report from Navigant Research, 35 million EVs will be on the road by 2022 across the world [1]. The integration of large number of EVs has the potential to de-stabilize the current power system. Some of the foreseeable threats include abrupt peak load increase, overloading of distribution transformer and lines, increase in line losses, and voltage sags [2,3,4,5]. To overcome these challenges, huge reforms in the conventional power system are required which involves high investment cost and long time. However, a number of solutions have been proposed to maximize the integration of EVs with existing power system. The development of demand response (DR) enabled appliances, smart home energy management (HEM) systems, smart energy meters, and advanced information technologies ensure transparency of EVs in the existing power system up to a remarkable extent [6, 7]. Therefore, electric utilities have more options to occupy residential consumers in DR programs [8,9,10,11,12].

In previous research, investigators have proposed various schemes to control EV charging to make EVs transparent in the power system. An optimal model of EV charging has been developed in [2] to reduce distribution network power losses. To minimize system losses [13], and to increase load factor [2], some approaches have suggested centralized control of EV charging by using different optimization techniques [14, 15]. A few have focused solely on decentralized control of EV charging at consumer premises [16,17,18,19]. The advantages of decentralized control over centralized control have been discussed in [20]. A sparse strategy for load shifting to reduce consumers’ comfort has been developed in [21] using time-based demand response program. End-user customer loads have modeled as lumped load without considering characteristics of individual appliances to accommodate DR implementation [22,23,24,25]. In recent studies, water-filling (WF) algorithm has been used for load balancing in smart grids [26,27,28]. WF algorithm has extensively been used in communication systems for radio resource management (RRM) [29]. The implementation of WF algorithm in power systems is paving the ways for more research.

In this paper, a scheme based on WF algorithm is proposed for decentralized control of DR-enabled/flexible appliances including EVs at a distribution transformer and a home level. In contrast to the previous work, this paper focuses on restraining the instantaneous demand at the distribution transformer by controlling the responsive DR-enable appliances during stress conditions. Transformer management program (TMP) is implemented at the distribution transformer, whereas to control responsive loads, household appliances controller (HAC) is implemented at the home level. When the instantaneous demand at the transformer exceeds its rated capacity, TMP coordinates with the HAC of each home to assign demand curtailment limit (DCL). The convenience factor of each home (\(CF_{home,i}\)) is calculated for the allocation of DCL using WF algorithm. HAC controls the flexible appliances to make instantaneous demand of a home equal to its DCL limit and simultaneously mitigates consumer convenience level violations. The proposed methodology offers some benefits over previous works as it does not require prediction models, and consumers have flexible choice to control their responsive appliances.

The paper is organized as follows: A responsive household appliances management (RHAM) architecture is explained in Sect. 2. The objectives of TMP and HAC, signal coordination and the overall strategy of RHAM are proposed in Sect. 3. A water-filling algorithm, an optimization problem and a power allocation strategy are defined in Sect. 4. The effectiveness of proposed approach is showcased by performing a case study in Sect. 5, and the conclusion is presented in Sect. 6.

2 RHAM architecture

This paper proposes an automated RHAM architecture to control flexible loads. The objective is to curtail the instantaneous demand of each home to a certain assigned limit when the total demand at distribution transformer exceeds its rating. Also, a customer’s convenience is taken into account. The proposed architecture is devised and implemented at two levels:

  1. 1)

    Transformer level by using TMP.

  2. 2)

    Home level by using HAC.

The proposed RHAM architecture is illustrated in Fig. 1. As the HAC receives external signal from TMP, its algorithm guarantees curtailment of total household power consumption to a specified demand limit (kW). High power consumption responsive appliances including cooling/heating system (HVAC), water heater (WH), clothes dryer (CD) and EV are controlled. These loads are specified as flexible loads and are modeled as in [30]. Remaining loads are considered as inflexible/unadaptable loads and must be served all the time.

Fig. 1
figure 1

RHAM architecture

2.1 Modeling of responsive residential loads

In this section, the physical models of flexible loads are developed to represent how they respond to demand curtailment request. For each flexible load, a customer must set the initial priority and convenience level to appropriately control the appliance. Convenience level is the minimum acceptable job completion time value/temperature set point of a flexible appliance for the consumer. For HVAC and WH, the convenience level setting is in the form of temperature set point, whereas for CD and EV, it is illustrated as the job completion time. Customers can change these settings any time according to their own comfort. The effects of human behavior are also considered when modeling the flexible appliances as explained and modeled in [30].

2.1.1 Development of HVAC system

The power demand (\(W_{ac,j}\)) of an HVAC system, during each time slot j, depends on the current room temperature (\(T_{ac,j}\)) and the temperature set point (\(T_{ac,s}\)). \(W_{ac,j}\) is calculated as (1):

$$\begin{aligned} W_{ac,j} = P_{ac} \ s_{ac,j} \ D_{ac,j} \end{aligned}$$
(1)

where \(P_{ac}\) is the rated power (kW) of HVAC unit; \(s_{ac,j}\), and \(D_{ac,j}\) are the state and demand curtailment signal for HVAC in time interval j, respectively (1 = ON and 0 = OFF).

The unit is OFF when \(T_{ac,j}\) exceeds the set value and is ON when it goes below a certain point. The state of an HVAC system remains the same if \(T_{ac,j}\) is within the acceptable boundaries. This relationship is expressed in (2):

$$\begin{aligned} s_{ac,j} = \left\{ \begin{array}{ll} 0 &\quad{} T_{ac,j}>(T_{ac,s}+T_{ac,con})+\delta T_{ac} \\ 1 &\quad{} T_{ac,j}<(T_{ac,s}+T_{ac,con})-\delta T_{ac} \\ s_{ac,j-1} &\quad{} T_{ac,s}-\delta T_{ac}\le T_{ac,j}-T_{ac,con} \le T_{ac,s}+\delta T_{ac} \end{array} \right. \end{aligned}$$
(2)

where \(\delta T_{ac}\) is the temperature tolerance, and \(T_{ac,con}\) is the shift in temperature set point due to convenience level setting of HVAC system during the critical state of transformer.

The value of \(D_{ac,j}\) is related to the loading of distribution transformer. If the total demand at transformer is less than its rating then the value of \(D_{ac,j}\) is always 1 = ON. Otherwise, it depends on the HVAC priority and the assigned demand limit to the house.

During each time slot j, the room temperature is calculated as in (3):

$$\begin{aligned} T_{ac,j+1} = T_{ac,j}+\delta t\ \frac{H_{G,j}}{\delta e}+\delta t\ \frac{R_{HVAC}}{\delta e} \ s_{ac,j} \ D_{ac,j} \end{aligned}$$
(3)

where \(T_{ac,j}\) is the room temperature in time interval j (\(^\circ {\rm F}\)); \(\delta t\) is the length of time interval j (hour); \(H_{G,j}\) is the heat loss rate of the house (Btu/h); \(R_{HVAC}\) is the rated capacity of the heating unit (Btu/h), and \(\delta e\) is the energy required to change the room air temperature by 1\(^\circ {\rm F}\) (Btu/\(^\circ {\rm F}\)).

2.1.2 Development of water heater (WH) system

The power demand (\(W_{wh,j}\)) of a WH system, during each time slot j, depends on the water temperature (\(T_{wh,j}\)) in the tank and the temperature set point (\(T_{wh,s}\)). \(W_{wh,j}\) is calculated as in (4):

$$\begin{aligned} W_{wh,j} = s_{wh,j} \ P_{wh} \ \eta _{wh} \ D_{wh,j} \end{aligned}$$
(4)

where \(P_{wh}\) is the rated power (kW) of WH unit; \(\eta _{wh}\) is the efficiency of WH; \(s_{wh,j}\), and \(D_{wh,j}\) are the state and demand curtailment signals in time interval j, respectively (1 = ON and 0 = OFF).

The heating coil of a water heater turns ON if the temperature of hot water in the tank (\(T_{wh,j}\)) goes below the certain value, and the coil turns OFF when \(T_{wh,j}\) exceeds the set value. It retains its previous state when \(T_{wh,j}\) lies between the desired boundaries. Mathematically, it is expressed as in (5):

$$\begin{aligned} s_{wh,j} = \left\{ \begin{array}{ll} 0 &\quad{} T_{wh,j}>(T_{wh,s}+T_{wh,con})+\delta T_{wh} \\ 1 &\quad{} T_{wh,j}<(T_{wh,s}+T_{wh,con})-\delta T_{wh} \\ s_{wh,j-1} &\quad{} T_{wh,s}-\delta T_{wh}\le T_{wh,j}-T_{wh,con}\le T_{wh,s}+\delta T_{wh} \end{array} \right. \end{aligned}$$
(5)

where \(\delta T_{wh}\) is the temperature tolerance, and \(T_{wh,con}\) is the shift in temperature set point due to convenience level setting of WH system during the critical state of transformer.

The value of \(D_{wh,j}\) depends on the distribution transformer loading. If the transformer is running below its rated capacity then \(D_{wh,j}\) is always 1 = ON. Otherwise, it is related to the WH priority and assigned demand limit to the house.

The hot water temperature in the tank during each time slot j is calculated as in (6):

$$\begin{aligned} T_{wh,j+1} &={} \frac{T_{wh,j} \ (v_{tank}-fw_{j} \cdot \delta t)}{v_{tank}}+\,\frac{Tinlet_{wh} \cdot fw_{j} \cdot \delta t}{v_{tank}} \\&\quad+\frac{1\text{ gal }}{8.341b} \ \Bigg [s_{wh,j} \ D_{wh,j} \cdot \frac{3412\text{ Btu}}{\text{kWh}} \\&\quad-\,\frac{S_{A,tank} \ (T_{wh,j}-T_{air})}{H_{R,tank}}\Bigg ] \ \frac{\delta t}{60\frac{\mathrm {min}}{\text{h}}} \ \frac{1}{v_{tank}} \end{aligned}$$
(6)

where \(T_{wh,j}\) is the hot water temperature in time interval j (\(^\circ {\rm F}\)); \(v_{tank}\) is the WH tank volume (gallons); \(fw_{j}\) is the flow rate of hot water in time interval j (gpm); \(\delta t\) is the length of time interval j (min); \(Tinlet_{wh}\) is the water temperature at the inlet of WH tank (\(^\circ {\rm F}\)); \(S_{A,tank}\) is the surface area of WH tank (\({\rm ft.}^2\)); \(T_{air}\) is the surrounding air temperature of water heater (\(^\circ {\rm F}\)), and \(H_{R,tank}\) is the heat resistance of WH (\({\rm ft.}^2{}\,^\circ {\rm F}\,{\rm h/Btu}\)).

2.1.3 Development of cloth dryer (CD) model

A cloth dryer mainly consists of two power consuming elements: a motor, and a coil for heating. The power required by the motor is usually several hundred watts, whereas in contrast, the heating coil requires several kilowatts.

The power demand (\(W_{cd,j}\)) of a CD system during each time slot j depends on the aggregated turn ON time (\(GT_{cd,j}\)) and the total time for cloth dryer to complete its job (\(GT_{cd,max}\)) and is calculated as in (7):

$$\begin{aligned} W_{cd,j} = s_{cd,j} \ D_{cd,j} \ P_{cd,coil}+P_{cd,mtr} \end{aligned}$$
(7)

where \(P_{cd,coil}\) is the rated power (kW) of CD heating coil; \(P_{cd,mtr}\) is the rated power (kW) of CD motor; \(s_{cd,j}\) and \(D_{cd,j}\) are the state and demand curtailment signals for cloth dryer in time interval j, respectively (1 = ON and 0 = OFF).

The demand curtailment signal \(D_{cd,j}\) controls only the coil of a CD unit. Therefore, the motor remains in the running state once the cloth dryer is plugged-in and stops after the completion of a job. The heating coil turns ON when \(GT_{cd,j}\) is less than \(GT_{cd,\mathrm {max}}\) and turns OFF when \(GT_{cd,j}\) is greater than or equal to \(GT_{cd,\mathrm {max}}\). Mathematically, it is expressed as in (8):

$$\begin{aligned} s_{cd,j} = \left\{ \begin{array}{ll} 0 &\quad{} GT_{cd,j}\ge GT_{cd,\mathrm {max}} \\ 1 &\quad{} GT_{cd,j}< GT_{cd,\mathrm {max}} \end{array} \right. \end{aligned}$$
(8)

The value of \(D_{cd,j}\) depends on the loading of a distribution transformer. If the total load at the transformer is less than its rated capacity then the value of \(D_{cd,j}\) is always 1 = ON. Otherwise, it depends on the CD priority and the assigned demand limit to the home.

During each time slot j, the value of \(GT_{cd,j}\) is calculated as in (9):

$$\begin{aligned} GT_{cd,j+1} = s_{cd,j} \ D_{cd,j} \cdot \delta t+GT_{cd,j}\Big |_{GT_{cd,0}=0} \end{aligned}$$
(9)

where \(GT_{cd,0}\) is the initial value of CD aggregated time, and \(\delta t\) is the length of time interval j (min).

2.1.4 Development of electric vehicle (EV) model

There are three basic components in an EV charging model: the rated charging demand of the EV, state of charge (SOC) of the battery and plug-in time of the EV. Equation (10) indicates the power demand of an EV (\(W_{EV,j}\)) during each time slot j, which depends on the Current SOC (\(SOC_{EV,j}\)) and the maximum SOC (\(SOC_{EV,\mathrm {max}}\)) of the EV battery.

$$\begin{aligned} W_{EV,j} = P_{EV} \ C_{EV,j} \ s_{EV,j} \ D_{EV,j} \end{aligned}$$
(10)

where \(P_{EV}\) is the rated power (kW) demand of the EV charger; \(C_{EV,j}\) is the connectivity status in time interval j, where 0 = Plug-in and 1 = Unplug; \(s_{EV,j}\), and \(D_{EV,j}\) are the state and demand curtailment signals for the electric vehicle in a time interval j, respectively (1 = ON and 0 = OFF).

An EV remains in the charging state until current SOC of the battery (\(SOC_{EV,j}\)) is less than the maximum SOC (\(SOC_{EV,\mathrm {max}}\)). Mathematically, it is expressed in (11):

$$\begin{aligned} s_{EV,j} = \left\{ \begin{array}{ll} 0 &\quad{} SOC_{EV,j}\ge SOC_{EV,\mathrm {max}} \\ 1 &\quad{} SOC_{EV,j}< SOC_{EV,\mathrm {max}} \end{array} \right. \end{aligned}$$
(11)

The demand curtailment signal (\(D_{EV,j}\)) relies on the state of distribution transformer. If the total load at the transformer is less than its rated capacity then the value of \(D_{EV,j}\) is always 1 = ON. Otherwise, it depends on the EV priority and the assigned demand limit to the house.

The initial SOC (\(SOC_{0}\)) of an EV is calculated in (12):

$$\begin{aligned} SOC_{0} = 1-\frac{C_{tr}}{C_{bat}} \end{aligned}$$
(12)

where \(C_{tr}\) is the battery power consumed during traveling (kWh), and \(C_{bat}\) is the rated battery capacity (kWh).

During each time slot j, the value of \(SOC_{EV,j}\) is found using (13):

$$\begin{aligned} SOC_{EV,j} = SOC_{EV,j-1}+W_{EV,j} \ \frac{\delta t}{C_{bat}} \end{aligned}$$
(13)

where \(W_{EV,j}\) is the EV power demand in each time interval j which is derived in (10), and \(\delta t\) is the length of time interval j (hour).

The arrival time of EVs are found using Gaussian probability distribution as expressed in (14). The mean and the standard deviation of the distribution are 18 hours and 2.8 hours, respectively [31]. Figure 2 represents the home-arrival-time probability of EV [32].

$$\begin{aligned} f(t,\mu ,\sigma )=\frac{1}{\sigma \sqrt{2\pi }} e^{-\frac{(t-\mu )^{2}}{2\sigma ^{2}}} \end{aligned}$$
(14)

where \(f(t,\mu ,\sigma )\) is the home-arrival-time probability density; \(\mu\) is the average value of home arrival time, and \(\sigma\) is the standard deviation.

Fig. 2
figure 2

Probability distribution of EVs arrival time

Also, the driving patterns of EVs are used to determine the initial state of charge. Figure 3 displays the American daily traveling distance in miles [33]. Monte Carlo simulations are used to simulate daily traveling distance for each EV in this study.

Fig. 3
figure 3

American daily traveling distance

3 Strategy design for RHAM

In this paper, a strategy is developed to accommodate the EV loads while avoiding the stress conditions on a distribution transformer. The proposed algorithm is designed at two levels: a transformer via TMP, and a home via HAC.

3.1 Objectives of TMP

The TMP is implemented at a distribution transformer. It acts to obtain its objectives by coordinating with HAC of all the associated homes. The TMP goals are as follows:

  1. 1)

    Maintain the instantaneous demand at a transformer (\(D_{TR}\), kW) below its rated capacity. In this paper, two operating states of transformer are considered, normal and critical, based on the constraint given in (15):

    $$\begin{aligned} D_{TR} = \sum _{i=1}^I{D_{home,i}}\le R_{CAP_{TR}} \end{aligned}$$
    (15)

    where \(D_{home,i}\) is the instantaneous demand of each home \(i\in I\); I is the number of homes connected to the transformer; and \(R_{CAP_{TR}}\) is the rated capacity of transformer. The transformer will be in normal operating state if the above constraint is not violated. Otherwise, it will be in critical state.

  2. 2)

    Assign demand curtailment limit to each responded home using water-filling algorithm. For this purpose, TMP considers convenience factor and the next loads waiting to operate of each home in order to make an effort to minimally affect each home during transformer’s critical operating state.

3.2 Objectives of HAC

The HAC is implemented at a home level. It works to obtain homeowner’s objectives. If a homeowner responds to the participation request from TMP, the HAC will coordinate with the TMP to accomplish its goals. HAC goals are as follows:

  1. 1)

    To ensure that inflexible loads (cooking, lighting, plug loads etc.) must be served all the time.

  2. 2)

    Instantaneous demand of a home (\(D_{home,i}\)) must be equal or less than the demand curtailment limit (\(DCL_{home,i}\)) sent by the TMP as in (16):

    $$\begin{aligned} {D_{home,i} \le DCL_{home,i}} \end{aligned}$$
    (16)
  3. 3)

    Change the initial load priority order if the convenience level parameters are being violated.

  4. 4)

    After changing the priority setting, turn-off least order loads to make \(D_{home,i} \le DCL_{home,i}\) in accordance with (17):

    $$\begin{aligned} D_{home,i} = {\left\{ \begin{array}{ll} L_{A}-\sum _{m=N}^c{L_{m}} &\quad{} L_{A}> DCL_{home,i}\\ L_{A}&\quad{} \text {otherwise}\\ m=N,N-1,\dots ,1 \end{array}\right. } \end{aligned}$$
    (17)

    where \({L_{A}}\) is the accumulated instantaneous demand (kW) of all the appliances in the home; c is the number of appliance required to turn-off to make \(L_A \le DCL_{home,i};\) and \({L_{m}}\) is the demand (kW) of m th priority appliance.

    In HAC, customers set two types of parameters for each flexible appliance: appliance priority and convenience level setting. The convenience level setting is the function of set point of each flexible load. For example, for HVAC and WH, it is the function of temperature set point, whereas for CD and EV, it is the function of job completion time.

    During critical state of the transformer, when the demand of a home is greater than \(D_{L_{pro}}\), HAC shifts the HVAC and WH temperature set points to their convenience level settings and check the current parameters for each flexible appliance. In case, the parameters are violating the convenience level settings, HAC will change the priority order by raising the priority of the appliance whose parameters are violating the most.

3.3 Signal coordination between TMP and HAC

The overall algorithm for a TMP and an HAC is depicted in Fig. 4. These work simultaneously as follows:

  • Step 1: TMP assesses the state of a distribution transformer by checking the instantaneous load demand.

  • Step 2: If the transformer state is normal, TMP sends HAC “demand restrain inactive signal”, and HAC controls all flexible appliances with \({D_{ap,j}} = 1\), where \({D_{ap,j}}\) is the demand curtailment signal of a flexible appliances, and ap is the set of flexible home appliances. Otherwise, TMP sends participation request to the HAC of each home.

  • Step 3: The HAC responds to the participation request and based on the number of responded homes, TMP sends proposed demand limit (\(D_{L_{pro}}\)) to the HAC of each each home by fair distribution as provided in (18):

    $$\begin{aligned} D_{L_{pro}} = \frac{RM_{CAP_{TR}}}{N} \end{aligned}$$
    (18)

    where \(RM_{CAP_{TR}}\) is the capacity of the transformer after deducting the instantaneous demand of un-responded home(s) from the rated capacity of the transformer, and N is the number of responded homes to the participation request.

Fig. 4
figure 4

Algorithm of a TMP implemented at a transformer and an HAC implemented in a home

The participated homes will get incentives in the form of a low price during normal operating state of the transformer, whereas un-responded homes have to pay penalty for each unit consumed during critical state of the transformer in the form a high price.

  • Step 4: HAC fetches data from the household appliances and calculates the demand (kW).

  • Step 5: If the power consumption is greater than \(D_{L_{pro}}\), HAC shifts the temperature set points of HVAC and WH to their convenience level settings, and checks the load priority and convenience level parameter of each flexible appliance and changes the load order if convenience level setting of any appliance is violating.

  • Step 6: HAC estimates the instantaneous demand by deploying \(D_{L_{pro}}\), and sends information of the appliances to the TMP.

  • Step 7: TMP allocates demand curtailment limit \(DCL_{home,i}\) to the HAC of each associated home by using water-filling algorithm which requires information about convenience factor and next loads waiting to operate of each home.

  • Step 8: Finally, the HAC controls the flexible loads by considering \(DCL_{home,i}\) and by turning off least order loads to ensure that \(D_{home,i}\) is less than or equal to \(DCL_{home,i}\).

In the next section, a water-filling algorithm is explained.

4 Water-filling algorithm

Water-filling (WF) algorithm is often used in communication systems to utilize maximum channel capacity when there is a constraint on the available power. In this paper, WF algorithm is applied during critical state of a distribution transformer to assign demand limit (kW) to the homes associated with it, in order to minimally affect the consumers.

During critical state of the transformer, the HAC sends information about the household appliances to the TMP while deploying \(D_{L_{pro}}\). Based on the provided information, the TMP distributes remaining transformer capacity between homes using WF algorithm.This concept has been illustrated in Fig. 5.

Fig. 5
figure 5

Water-filling algorithm concept

In Fig. 5, the shadowed area during each time slot represents the projection of total instantaneous load of all the consumers after deploying \(D_{L_{pro}}\). \(RA_{CAP_{TR}}\) is the available/idle capacity of a transformer which has to be distributed by WF algorithm. An optimization problem is formulated to minimize the difference between total instantaneous load at transformer (\(D_{TR}\)) and the rated transformer capacity (\(R_{CAP_{TR}}\)) during the critical state as in (19):

$$\begin{aligned} {\left\{ \begin{array}{ll} \min \nolimits _{\{\varvec {E}\}} \quad \bigg [\sum \nolimits _{i=1}^{I}\bigg (F_{i}+\sum \nolimits _{k=1}^{K}E_{i,k}\bigg ) -R_{CAP_{TR}}\bigg ]^2\\ \text {s.t.}\\ \quad 0\le E_{i,k}\le P_{i,k} \quad{} k=1,2,\ldots ,K,\forall i\\ \quad \sum \nolimits _{i=1}^{I}\sum \nolimits _{k=1}^{K}E_{i,k}\le RA_{CAP_{TR}}\\ \quad \sum \nolimits _{k=1}^{K}E_{i,k}\le D(N)_{i},\forall i\\ \quad E_{i,k}\in \varvec{[DM]}_{i\times f} \end{array}\right. } \end{aligned}$$
(19)

where index i (\(i = 1,2,...,I\)) is the number of homes connected to the transformer; k (\(k = 1,2,...,K\)) is the number of flexible load(s) waiting to operate; \(F_{i}\) is the instantaneous demand of i th consumer after deploying \(D_{L_{pro}}; E_{i,k}\) is the power assigned to k th flexible load waiting to operate for i th customer; \(P_{i,k}\) is the rated power of k th flexible load waiting to operate for i th consumer; N is the number of flexible appliances (waiting to operate) that are allowed to turn-on; \(D(N)_{i}\) is the power required to turn-on N appliances of the i th home; f is the number of flexible appliances of all the homes connected to the transformer, and \([DM]_{i\times f}\) is the demand matrix of flexible appliances of all the homes served by the transformer as in (20):

$$\begin{aligned} \varvec{[DM]}_{i\times f}= \varvec{[APP}_S]_{i\times f} \ \varvec{[Rated}_P]_{i\times f} \end{aligned}$$
(20)

\(\varvec{[APP}_S]_{i\times f}\) is a matrix of usage status of all flexible appliances of all the associated homes in prioritized order and is given in (21):

$$\begin{aligned} \varvec{[APP}_S]_{i\times f}&=\left[ \begin{array}{cccc} r_{app,1,1} &{}\quad r_{app,1,2} &{}\quad \cdots &{}\quad r_{app,1,c} \\ r_{app,2,1} &{}\quad r_{app,2,2} &{}\quad \cdots &{}\quad r_{app,2,c} \\ \vdots &{}\quad \vdots &{}\quad \ddots &{}\quad \vdots \\ r_{app,k,1} &{}\quad r_{app,k,2} &{}\quad \cdots &{}\quad r_{app,k,c} \end{array} \right] \quad ~~ \end{aligned}$$
(21)

where \(r_{\mathrm{app}, k\in i, c\in f}\) is the status of an appliance of a home which could either be 0 or 1.

\(\varvec{[Rated}_P]_{i\times f}\) is a matrix of power demands (kW) of flexible appliances and is given in (22):

$$\begin{aligned} \varvec{[Rated}_P]_{i\times f}&=\left[ \begin{array}{cccc} R_{\mathrm{P},1,1} &{}\quad R_{P,1,2} &{}\quad \cdots &{}\quad R_{P,1,c} \\ R_{P,2,1} &{}\quad R_{P,2,2} &{}\quad \cdots &{}\quad R_{P,2,c} \\ \vdots &{}\quad \vdots &{}\quad \ddots &{}\quad \vdots \\ R_{P,k,1} &{}\quad R_{P,k,2} &{}\quad \cdots &{}\quad R_{P,k,c} \end{array} \right] \quad ~~ \end{aligned}$$
(22)

where \(R_{P, k\in i, c\in f}\) is the rated power of a flexible appliance of a home.

As from (19), \(E_{i,k} \in [\varvec{DM}]_{i\times f}\). It means that \(E_{3,2}\) is the power assigned to a flexible load, which is second to the next appliance waiting to operate, for 3rd consumer. The value of \(RA_{CAP_{TR}}\) can be obtained from the information provided by an HAC after deploying \(D_{L_{pro}}\).

In addition, (19) is a minimization problem for reducing the sum of squared errors for all consumers in a time interval. This error is the difference between the total instantaneous demand and the rated transformer capacity during a time slot.

4.1 Power allocation strategy

The available power is allocated to the associated consumers to minimize their convenience level setting violations. Assume that there are I consumers. The sequence of consumers has to be arranged in monotonically increasing order, based on their convenience factor (\({CF_{home,i}}\)) \(\{{CF_{home,i},} 1\le i \le I \}\), where the indices are renumbered arbitrarily to satisfy the condition. This situation is illustrated in Fig. 6 by stairs in a water tank.

The convenience factor of a home i (\({CF_{home,i}}\)) is calculated from the convenience factors of flexible appliances in the home during each time slot j. Convenience factor of an appliance (\(CF(i)_{Appliance,j}\)) is based on the deviation from its convenience level setting.

The convenience factors of flexible appliances are illustrated as follows: Convenience factor for HVACs: For HVACs, the convenience factor (\(CF(i)_{HVAC,j}\)) during time slot j of a home i is obtained by dividing the difference of its actual room temperature (\(T_{ac,j}\)) and room temperature convenience setting (\(T_{ac,cs}\)) with \(T_{ac,cs}\), as expressed in (23):

$$\begin{aligned} CF(i)_{HVAC,j} = \frac{T_{ac,j}-T_{ac,cs}}{T_{ac,cs}} \end{aligned}$$
(23)

Convenience factor for water heaters (WHs): For WHs, the convenience factor (\(CF(i)_{WH,j}\)) during time slot j of the i th home is derived by dividing the difference of its actual hot water temperature (\(T_{wh,j}\)) and hot water temperature convenience setting (\(T_{wh,cs}\)) with \(T_{wh,cs}\). It is provided in (24):

$$\begin{aligned} CF(i)_{WH,j} = \frac{T_{wh,j}-T_{wh,cs}}{T_{wh,cs}} \end{aligned}$$
(24)

Convenience factor for cloth dryers (CDs): For CDs, the convenience factor (\(CF(i)_{CD,j}\)) during time slot j of a home i is calculated in (25), by dividing the difference of time remaining to complete its job (\(GT_{cd,j}\)) and convenience setting remaining time (\(GT_{cd,cs}\)) with actual convenience level setting \(GT_{cd,\mathrm {max}}\).

$$\begin{aligned} CF(i)_{CD,j} = \frac{GT_{cd,j}-GT_{cd,cs}}{GT_{cd,\mathrm {max}}} \end{aligned}$$
(25)

Convenience factor for electric vehicles (EVs): For EVs, the convenience factor (\(CF(i)_{EV,j}\)) during time slot j of i th home is expressed in (26), by dividing the difference of time remaining to complete its job (\(RCT_{ev,j}\)) and convenience setting remaining time (\(RCT_{ev,cs}\)) with actual convenience level setting \(RCT_{ev,\mathrm {max}}\).

$$\begin{aligned} CF(i)_{EV,j} = \frac{RCT_{ev,j}-RCT_{ev,cs}}{RCT_{cd,\mathrm {max}}} \end{aligned}$$
(26)

Now, the convenience factor of a home i (\(CF_{home,i}\)) during time slot j is calculated as in (27):

$$\begin{aligned} CF_{home,i} =\frac{1}{M} \ \Big [CF(i)_{HVAC,j}+CF(i)_{WH,j}+\cdots + CF(i)_{CD,j}+CF(i)_{EV,j}\Big ] \end{aligned}$$
(27)

where M is the number of plug-in flexible appliances. If an appliance is unplug, its \(CF(i)_{Appliance,j}\) value will be zero for that time interval.

Fig. 6
figure 6

Power allocation concept

The power is allocated to the consumers by projecting the overall instantaneous load for all the users. Let \({LD_{i}}\) represents the instantaneous load demand of a consumer, which is the sum of power demand of inflexible loads and flexible appliance which could turn-on after allocation of \({D_{L_{pro}}}\), and \({PD_{i}}\) represents the allocated power demand of waited flexible appliances of a consumer during time slot j as shown in Fig. 6b . They can be obtained from the vector \(\varvec{F}\) and matrix \(\varvec{E}\) as illustrated in (28):

$$\begin{aligned} {\left\{ \begin{array}{ll} \sum \nolimits _{k=1}^{K}E_{i,k}=PD_{i}\\ F_{i}=LD_{i} \end{array}\right. } \end{aligned}$$
(28)

To find the allocated power \(PD_{i}\), the objective function in (19) is simplified to (29).

$$\begin{aligned} {\left\{ \begin{array}{l} \min \nolimits _{\{PD_{i}\}}\quad \bigg [\sum \nolimits _{i=1}^{I}(PD_{i}+LD_{i})-R_{CAP_{TR}}\bigg ]^{2}\\ \text {s.t.} \\ \quad {PD_{i}} ={\left\{ \begin{array}{ll} 0 &\quad {} W_{i} < D(N)_{i} \\ D(N)_{i} &\quad {} \text {otherwise} \end{array}\right. }\\ \quad \forall i, N=1,2,\ldots ,N\\ \quad \sum \nolimits _{i=1}^{I}PD_{i}\le RA_{CAP_{TR}} \end{array}\right. } \end{aligned}$$
(29)

where \(D(N)_i\) is calculated from the demand matrix \({[\varvec{DM}]_{i\times f}}\) which has the information about the state and power demand of flexible appliances of all the homes after deploying \({D_{L_{pro}}}\), and \(W_{i}\) is illustrated by the water level (available power) above the i th home as shown by the shadowed area in Fig. 6a and is defined in (30).

\(\varvec{LD}\) and \(RA_{CAP_{TR}}\) are computed from the power demand of inflexible loads and by using demand matrix (\([\varvec{DM}]_{i\times f}\)), where \([\varvec{DM}]_{i\times f}\) represents the status and power demand of all flexible appliances of the associated homes. \({\varvec{LD}}\) is a vector consists of power demands of all associated homes after deploying \(D_{L_{pro}}\). Therefore, \(RA_{CAP_{TR}}\) is calculated by subtracting the sum of \({\varvec{LD}}\) from transformer capacity \(R_{CAP_{TR}}\).

On the basis of Convenience factor, consumers are sorted in a monotonically increasing order as shown in Fig. 6a. A consumer with lowest convenience factor is the one who is affected the most and vice versa.

$$W_{i} = \left\{ {\begin{array}{*{20}l} {0,} \hfill & {k = 0} \hfill \\ {} \hfill & {} \hfill \\ {\{ RA_{{CAP_{{TR}} }} } \hfill & {} \hfill \\ { - [\sum_{{l = 1}}^{{i - 1}} P D_{l} + \sum_{{k = 1}}^{N} {E_{{i,k}} } ]\} ^{ + } } \hfill & {{\text{otherwise}},\forall i} \hfill \\ \end{array} } \right.$$
(30)

where “\(k=0\)” means that there is no appliance in waiting state; \(\{-\}^{+}\) represents zero if the value inside curly brackets is negative. “\(PD_{i}\)” is illustrated by the shadowed area in Fig. 6b. It is the power that is allocated to the i th home and is defined as below:

$$\begin{aligned} PD_{i} = \left\{ \begin{array}{ll} 0 &\quad {} W_{i}=0 \\ RA_{CAP_{TR}}-\Bigg [\sum _{l=1}^{i-1}PD_{l}+W_{i}\Bigg ] &\quad {\text{otherwise}},\forall i \end{array} \right. \end{aligned}$$
(31)

The number of homes to which power is allocated can be find as:

$$\begin{aligned} i^{*}=count\{i\vert W_{i} >0\quad 1\le i\le I\} \end{aligned}$$
(32)

The demand curtailment limit of a home i (\(DCL_{home,i}\)) during a time slot can be calculated as follows:

$$\begin{aligned} DCL_{home,i} = LD_{i} + PD_{i} \end{aligned}$$
(33)

where \(PD_{i}\) is optimized by solving the problem in (29), and \(LD_{i}\) is calculated from demand matrix in (20) such that:

$$\begin{aligned} \sum _{i=1}^I{DCL_{home,i}}\le R_{CAP_{TR}} \end{aligned}$$
(34)

In the next section, a case study is performed by considering five homes served by a distribution transformer.

5 Case study

In this case study, a 37.5 kVA single-phase transformer of ABB serving five homes has been simulated. The parameters and other important attributes of the homes have been summarized in Table 1, and RELOAD database [34] has been used for the rated power demand of the appliances.

Table 1 Parameters of the homes

The average temperature of Seoul for the month of January has been considered for this study. The simulation has been performed from 17:00 to 08:00 as majority of the EVs arrive after 17:00 and leave home before 08:00. The time step considered in this study is 15 minutes. Important parameters such as plug-in time for CD, initial temperature of the home, initial temperature of the water in WH tank, convenience level settings of flexible appliances etc. have been generated by performing Monte-Carlo simulations, whereas Gaussian random distribution has been used for generating the arrival time of electric vehicles.

Nissan Leaf [35] and Chevrolet [36] electric vehicles have been modeled in this study with the specifications given in Table 2, whereas priority of the appliances and consumers’ convenience level settings are given in Table 3.

Table 2 Specifications of EVs
Table 3 Appliance priority and convenience setting

5.1 Simulation results

In this section, the effectiveness of WF algorithm has been evaluated by comparing the results of water-filling algorithm with that of simple fair distribution.

Figure 7 shows the transformer loading with and without EVs. The EVs start arriving homes after 17:00 that results rise in peak demand as shown in Fig. 7 during 17:00 to 21:00.

Fig. 7
figure 7

Transformer loading with and without EVs

Figure 8 shows the transformer loading by restraining the peak demand using fair allocation of demand curtailment limit to all homes when the transformer is in critical state. In fair distribution, the demand limit (\(D_{L_{fair}}\)) is allocated by dividing the transformer rated capacity with total number of associated homes. The instantaneous demand of each house with execution of \(D_{L_{fair}}\) has been shown in Fig. 9. \(D_{L_{fair}}\) and DH1-5 are the allocated demand curtailment limit and the instantaneous demand of homes 1–5, respectively. According to Figs. 8 and 9, the load profile of transformer has been kept below the transformer rating and the instantaneous load demand of all the homes has been controlled below the allocated demand limit. Table 4 summarizes the deviation of actual results from consumers’ convenience level setting for each flexible appliance.

Fig. 8
figure 8

Transformer loading with fair distribution of demand limit

Fig. 9
figure 9

Instantaneous demand of associated homes with fair distribution of demand allocation

Table 4 Results obtained using fair distribution of demand limit

The simulation results of WF algorithm have been demonstrated in Fig. 10 for the transformer, and in Fig. 11 for the homes. The value of N for this study has been set to 1.

Fig. 10
figure 10

Transformer loading with WF algorithm

Fig. 11
figure 11

Instantaneous demand of associated homes with WF algorithm

The instantaneous power at transformer has been retained below its rated capacity, and the instantaneous demand of each home is equal to the demand curtailment limit when the transformer is in critical state. Table 5 summarizes the deviation of actual results from consumers’ convenience level setting for each flexible appliance.

Table 5 Results obtained using WF algorithm

5.2 Discussion

In this section, the concept of WF algorithm has been explained by comparing the results of WF algorithm with the results of simple fair distribution of demand limit.

The deviation of set point value from the convenience setting for each flexible appliance using fair distribution of demand limit has been illustrated in Table 4. The “conv. setting” column shows convenience level setting for each flexible appliance. The actual results column for HVAC and WH represents the minimum temperature that has been observed during the entire simulation period, whereas for CD and EV, it represents the completion time of the job. The large deviation has been observed for EVs because they are the lowest priority load. Customers with Chevrolet EVs have been affected more due to large battery size and higher charging rate of EV. The results illustrated in Table 5 show considerable improvement using proposed WF based approach in comparison to simple approach. All the EVs have been charged completely while having minimum negative impact on the consumer’s comfort. The proposed strategy also improves the load factor of the system as shown in Table 6.

Table 6 Comparison of load factor

The load demand of each home with fair distribution at 21:00 has been shown in Table 7. \(D_{home,i}\) is the demand of home, and \(CF_{home,i}\) is the convenience factor of each home. The \(D_{home,i}\) is less than \(D_{L_{fair}}\) because \(D_{L_{fair}}\)\(D_{home,i}\) is not enough to turn on the next load or there is no appliance in waiting state.

Table 7 Load demand by fair distribution at 21:00

From Table 7, it can be observed that the instantaneous load at the transformer with fair distribution is about 27.37 kW. A capacity of 10 kW is available at transformer level that can be further distributed within the consumers. WF algorithm has been used for power distribution. To allocate power, convenience factor of each home has been calculated. A customer with lowest value of the convenience factor is the most suitable candidate for the power allocation. The value of “N” for this study has been set to 1, which is the maximum number of devices that can be turned on, while allocating additional power to a consumer. The instantaneous demand at transformer after using WF algorithm is 35.77 kW, and the results have been shown in Fig. 12.

By comparing the results in Tables 4 and 5, it can be concluded that the deviation of actual results from convenience level setting has been minimized with WF algorithm. The results obtained suggest that the proposed strategy may encourage more consumers to participate and may give electric utilities a better estimation of the consumer acceptance of a DR program. In addition, the proposed approach can be used to handle numerous consumers in a distribution network.

Fig. 12
figure 12

Instantaneous demand of associated homes by WF algorithm

6 Conclusion

This paper presented an approach for RHAM using autonomous decision making entities. A WF algorithm based strategy was developed to control flexible loads while minimally affecting the consumer’s lifestyle. The case study represented that the TMP and HAC achieved their goals. At the transformer level, the instantaneous demand was kept below its rated capacity; at the consumer level, all inflexible loads were served, and the total demand of the home was equal to demand curtailment limit (DCL). The simulation results showed that the proposed WF algorithm based approach surpasses the simple fair demand distribution strategy in terms of consumer convenience and load allocations. The proposed methodology can be used to avoid the up-gradation of distribution networks while maximizing the number of EVs for charging.

In future work, the proposed approach can be extended for a distribution network with more transformers to involve a number of consumers and controllable appliances. It should be noticed that the higher EV penetration levels will negatively influence the consumers’ convenience. At that point, utilities cannot solely rely on DR techniques to address higher penetrations of EVs. To encounter higher demands , other means such as equipment up-gradation and distributed energy resources may be explored.