Time based device clustering for domestic power scheduling

Article history: Received 5 September 2016 Received in revised form 14 October 2016 Accepted 18 October 2016 Domestic consumers can reduce their electricity expenditures by shifting their loads to slots of low power usage during demand response (DR) in a smart grid (SG) power system. Efficient shifting of loads can be used to reduce the peak-to-average (PAR) of power network, which is highly desirable for the reliability of SG. Methodologies available in literature only address the problem of power scheduling for a small set of consumers and underperforms for large population. This paper presents clustered community based home energy management system (CCHEMS), which performs better for a huge consumer set. CCHEMS is based on clustering consumer devices according to operating time overlap. Activation time slots (ATS) of clustered devices under user defined constraints are subjected to particle swarm optimization (PSO) to attain optimum power demand. Real time electricity price (RTEP) and modified inclined block rate (IBR) is employed to contain the power demand under appropriate limits. Results confirm that CCHEMS is better than non-clustered optimization, 9% in cost reduction and 24% in PAR trimming for a population of 1000 consumers.


Introduction
*High-tech advances in the field of domestic appliances and industrial automations have caused a continuous swelling in electric power demand. Electric power needs will be more inconsistent in future due to growing domestic and industry electricity requirements. The conversion of many manual and fossil fuel powered appliances/devices into electric powered devices, e.g. Plug-in Electrical Vehicles (PEV) (Deilami et al., 2011), is also causing increase in the power needs. Randomly varying profile of the electricity demand and the absence of compliance at consumer side require continuous modification on the electricity generation side. The efficiency of power plants is adversely affected by peak time power requirements and fluctuations therein. The power grid has to develop into a more smart form called Smart Grid (SG) to incorporate flexibility available in the grid and preserve an appropriate operation of electricity supply in an economic fashion (Ipakchi and Albuyeh, 2009).
Power Scheduling is one of the vital solutions to ensure reliability and stability of SG. Power scheduling system for domestic consumer appliances/devices are usually referred to as home energy management system (HEMS) (Kim et al., 2015). As a significant component of the SG, HEMS has become increasingly imperative, because electricity usage of domestic sector contributes for a substantial amount of total electricity consumption. However, a conservative HEMS has to be modified to play its part on reducing peak-to-average (PAR) of SG. Grid can generate a controlling signal known as demand response (DR) that indicates altered electricity power price (EPP) at the times of peak power usage. HEMS respond to demand response (DR) to reduce the gap between electricity demand and supply by reshaping the power usage pattern (PUP) of domestic user through appliance rescheduling. This process is referred as demand side management (DSM) due to load management being done at consumer end.
Electricity prices are transmitted to domestic users in DR, so that they can schedule their devices to avoid peak rates. The DR process mostly comprises of time of use pricing (TOUP), critical peak pricing (CPP), and real-time electricity pricing (RTEP) used by Zhao et al. (2013). The EPP in first two schemes is usually determined in advance and the process of price evaluation can be carried out as frequent as three times per year. Whereas the EPP in RTEP varies at per hour basis, which can mirror the current PUP or the power generation cost. Though the CPP augments the EPP of TOUP when the PUP has sharp peaks, but being based on hourly basis RTEP is more flexible than others. Abushnaf et al. (2015) reduced electricity cost based on RTEP; however, the intent behind DR is not only cost reduction for consumers at peak power demand periods, but also requires prevention of higher electricity demand even at the periods of low EPP. From this perspective main flaw in RTEP implementation is that it can result in an increased PAR at low price time periods by moving peak PUP to periods with lower EPP. Xiong et al. (2011) proposed a suitable objective of total electricity consumption for all devices is given; however, the scheme used for reduction in power for separate devices is not specified. Mohsenian-Rad and Garcia (2010) reduced electricity cost and peak power demands concurrently, but with unrealistic assumptions. Hardware and software DSM schemes presented by Lien et al. (2007), Sierra et al. (2007) and Chen et al. (2009) allow the consumer to make use of rule based decision making for operating their devices, but the optimization perspective is localized only. Kim and Poor (2007) presented a power and cost reduction methodology for both non-interruptible and interruptible devices; however, sharps peak can still arise at time slots of low electricity rates. Power scheduling algorithms proposed by Abushnaf et al. (2015), Ozturk et al. (2013), and Adika and Wang (2014) are based on load prediction models, whereas, Chavali et al. (2014) relied on penalty terms and pricing schemes for domestic power scheduling. The excessive loads can induce instability in power network, which can result in a complete power failure. Therefore, blend of RTEP with Inclining Block Rates (IBR) is essential (Zhao et al., 2013). IBR model uses a penalty term; electricity rate in RTEP is topped with a factor λ>1 if a PUP of house is gone beyond a predefined threshold (Rastegar et al., 2012). However, this combination only ensures a controlled PUP for a single house. Sharp peaks in PUP of whole system can still arise when cluster of consumers operate their devices around same time slots. This problem gets worse when the consumer population is very large. Algorithms available in literature have not addressed power scheduling task for large sets of consumers.
In this paper we present a power management scheme: clustered community based home energy management system (CCHEMS) that can significantly decrease the domestic consumer electricity expenses and reduce PAR even for a large consumer population. CCHEMS banks on grouping consumers into communities and then assembling their devices into clusters. Particle swarm optimization (PSO) is separately applied to each cluster to find the optimum starting time of all devices in that cluster. Fitness function of PSO is accompanied by a modified IBR, which can prevent sharp peaks in PUP at all times. PAR is significantly improved when the power scheduling of devices with overlapping operating time period is subjected to PSO along with a modified IBR. Threshold for IBR is adjusted to accommodate for the PUP of whole community. PSO is replaced with genetic algorithm (GA) for comparison with Zhao et al. (2013). Simulation results show that the proposed algorithm is very effective in PAR and cost reduction for a consumer set as large as 1000 houses irrespective of PSO or GA being used.
Rest of the paper is presented in following modules. Section 2 shows the framework of clustered community based HEMS (CCHEMS). Section 3 illustrates the proposed approach of CCHEMS in combination with IBR and PSO. Section 4 presents the simulation results and conclusion follows in Section 5.

Framework of clustered community based HEMS
Main objective of any DSM scheme is PAR reduction up to a level where both ESC and consumer can gain benefit from it. For this purpose we propose to transmit DR from the Main Grid (MG) to substations and then each substation distributes DR to consumers via community centers according to their quota. Structure of community based scheme for HEMS utilization in SG is shown in Fig. 1.
Electricity power demand of communities is controlled by RTEP. In our scheme DR data would be conveyed to each user and community for electric power scheduling. When electricity management system (EMS) set up at consumer end; they can use this data through electricity management controller (EMC) that incorporates both EPP and consumer device operation priorities to effectively optimize the PUP at the community center. In our research, the term EMC is used for its own and the home gateway (HG) function. EMC can use home area network (HAN) for communication of control signal to automatically operated devices (AODs) at home, and connection with the community EMS (CEMS) at the community center can also be established. Power scheduling at a locally centralized center is the main divergence from the other schemes. Benefits of community based clustered optimization is shown in the simulation results.
Effective use of EMS can only be attained by the wide use of home devices/appliances which are smart. A data processor and a transceiver can be used with the devices which are not smart. The info received by the transceiver is analyzed by the data processor and it allows the device to operate for the period of appropriate PUP. In fact, some of such appliances are already available. Some nifty refrigerators allow consumers to connect itself through a smart phone. However EMC could be used to control the smart devices centrally. EMS at consumer end largely consists of smart meters (SM), advanced metering infrastructure (AMI), EMC, HG, consumer appliances/devices, and dedicated input device (DID). The communication setup of EMS using wireless HAN is demonstrated in Fig. 2.  AMI is one of the vital components of the SG, which facilitates the communication between the SM and the ESC (Aggarwal et al., 2010). Additionally the AMI is liable for gathering and communicating consumption info conveyed from distributed consumer's SM to the ESC and also for the provision of the DR from ESC to consumer SM. SM can be placed both in and outside of the consumer premises serving as bridge between EMC and AMI. Main function of the SM is to evaluate the numerical figures related to the power consumption of the consumer devices and the implementation of scheduling planned by the EMC in the light of received DR. Zhao et al. (2013) divided consumer devices/appliances into two categories; first consist ... MODs DID User of those which are manually operated and second set has devices which can be remotely operated referred here as manually operated devices (MODs) and AODs respectively. MODs are only operated manually whenever the consumer require their operation (e.g., lights, fans, electric irons). Kim and Poor (2007) further divided AODs in to two types; one with operation that can be interrupted (e.g. washing machines); second type with noninterruptible operation (e.g. rice cooker). In this research we only consider the AODs with noninterruptible operation and MODs are not considered due to the manual operation. In our design we further assume that AODs only interact with the EMC and there is no communication between AODs. All the activations of AODs will be scheduled by the EMC at day start. Numerous wireless communication methods for establishing connection between the HG and SM, such as Z-Wave, ZigBee, Wi-Fi, or a wired protocol are available. In this paper, we merge the SM and HG in to the EMC, which is responsible for receiving the RTEP from power utility through CEMC. RTEP taken from Ameren Illinois Power Co (2015) for 11th April, 2015 is shown in Fig. 3. Consumers can transmit their list of AOD parameters such as device operation time start (DOTS), device operation time end (DOTE), device load, and operation time length (OTL) to CEMS through their EMC. Optimal PUP parameters devised by the CEMS can be transmitted back to consumer EMCs hence to respective AODs through the bridge of HAN and HG. The process of optimum power scheduling can be supervised for alteration either by a DID or with the help of remote control such as a computer or smart phone through internet if the user require to operate any device without any delay.

Proposed methodology for CCHEMS
This section presents the basic methodology applied in CCHEMS for power scheduling of consumer AODs at community level. Primary technique for this DSM is load shifting to accommodate for reduction in PAR. Objective of this DSM is to lower the PAR as much as possible, so that power profile has smooth transitions. Lower PAR and smooth power profile aids in reduced consumer expenses as well as the ESC. Effective reduction in PAR and enhanced stability of the whole system can be achieved when subjected to a blend of RTEP and IBR. Usually, the formulations for such optimization scenarios have nonlinear behavior, so they can be solved with algorithms like GA and PSO. Under normal operating conditions there are several power plants in ESC with one main unit running most of the times to serve the needs of base load. Secondary units of ESC are operated only when base unit cannot fulfill the power requirements. Turning additional units on and off frequently is a technical hassle and effects the production costs drastically. This scenario also requires the power profile to be as consistent as possible. Keeping this as a primary objective we present the CCHEMS.
We start elaborating our algorithm with introducing the hour division. In an RTEP setup EPP is charged differently on hourly basis. If the AODs are scheduled on the hourly basis of RTEP the degree of freedom for activation time slot (ATS) slot is reduced, also a device may need to start and finish its job well short of an hour. On the other hand if we take a very short time slot, heuristic optimization techniques like GA and PSO may not converge due to large possibilities of optimization parameters. Therefore, we have divided the whole day in to 144 time slots, i.e. 6 slots per hour, 10 minutes for each slot. If a device needs to run for 90 minutes it will take on 9 slots for its operation. If a device requires operating for 25 minutes, it will be considered to run for 3 time slots for power scheduling purpose, because a device finishing 5 minutes earlier further reduces the actual PUP. As the day is divided into 144 time slots we define the symbol τ: τ ∈ Τ ≜ {1,2,…,144} and Di is used to denote the devices of i th house. Each device dik ∈ Di has the power consumption profile Pdik = [pdik (1) , pdik (2) , …, pdik (144) ], where pdik (τ) is the power rating of device dik in the τ th time slot normalized by a constant 6 to convert the power consumption KWH into KW time slot and k∈{1,2,…,16}. Fig. 4 shows the relationship between the parameters to be set in by the consumer for every AOD.
Here tdik is ATS of k th device of i th house and we need to find its optimum value for every AOD subject to the constraint given in Eq. 1. Kennedy and Eberhart (1995) proposed PSO as an iterative process based on a population of particles. PSO uses particles as contender solutions and allows them to flock around the optimum solution space. Flight curves followed by the particles are affected by the best particle solution (Global best Gb) and also by their own best position (Particle best Pb) they moved through. Contender solutions moving around the search space by updating their velocities according to Eq. 2 and positions according to Eq. 3.

Particle swarm optimization
, +1 = , + , +1 Here Pr(p1,r, p2,r, …, pn,k) and Vr(v1,r, v2,r, …,vn,r) are the position and velocity of the r th particle. The coefficients ω, c1, and c2 are the particle weight, momentum of Pb and pull towards Gb respectively, and rand() is a random number generated uniformly in the interval [0,1]. Initialization of velocities and particle position is done randomly subject to the constraint given in Eq. 1. Subsequently, the same population that has been initially generated is expected to become better & better after each cycle stirring around the population intelligence. Each particle can improve its own version, if the newer one is better than the Pb, new version replaces Pb. If the Pb is better than Gb, it also replaces Gb. When the process is finished by any of the termination criteria Gb is returned as the final solution.

Genetic algorithm
GA is also an iterative meta-heuristic algorithm for optimization based on inheritance. Algorithm starts with a randomly initialized population set of chromosomes consisting of genes. Each chromosome acts as a candidate solution. Every chromosome has a cost evaluated on the basis on a fitness function. Fitness function and chromosomes may include any constraint of underlying problem. Crossovers and mutations are performed in each iteration for all chromosomes followed by fitness evaluation. The process is continued until a termination criterion is met, and the best chromosome is returned as the final solution.

Modified inclined block rate
When the IBR pricing is applied the electricity rate in RTEP is topped with a factor λ>1 if a PUP of house is gone beyond a predefined threshold at any time slot; if not RTEP rates are unaffected. IBR operates as a monitoring term to keep scheduling algorithm from inducing sharp peaks in PUP. When several devices of a house operating with overlapping ρdik and σdik are subjected to scheduling algorithm; it may schedule them to identical time slots where RTEP is offering low electricity charge, hence creating undesired power peaks. IBR controls such a situation with its penalty term and forbids scheduling algorithm from creating power peak patterns. In this research we have modified the IBR to reflect the penalty term only being applied when the PUP crosses the β scaled threshold, here β is the number of houses lying under current community. Modified IBR control is incorporated in to the RTEP formulated as: Here rtep(τ) is the real time electricity price received from ESC for time slot τ, rtepPc(τ) is the EPP based on the power consumption Pc of the community being optimized, th is the threshold set to 2kW h, and βc is the quantity of houses under current community. (Borenstein, 2008) have been using IBR pricing scheme from a long time. The application of IBR has the effect of reducing PAR ratio. IBR can control the power demand of one house by implying its penalty factor but if the same time slot is occupied for most devices by neighboring devices than the PUP of the whole community and ultimately of the whole power grid will rise beyond desired limits. This scenario can be explained with the help of Fig. 5.

Fig. 5: Cluster making power peaks
For simplicity here we have only consider operation of one device per house for a community of 'm' houses; devices considered are assumed to have their ρdik around a time slot which has lowest EPP than its successor slots. In such a condition all scheduling algorithms applied in conjunction with IBR will tend to settle down tdik of all houses towards the slot of lowest EPP. Even if the IBR succeeds to keep the PUP of every house under designed threshold; but the constellation of device tdik's scheduled around lowest EPP will produce a peak in PUP of whole community, eventually it happens for whole power grid. If we consider the RTEP in Fig. 3, EPP is lowest around hour 4 of the day, and the devices of Fig. 5 will tend to be scheduled around hour 4 resulting in a higher peak there. This situation demands for a power scheduling methodology that can look around in the neighborhood while optimizing a device ATS, therefore, we propose our algorithm in the following fashion.
As the first step we divide the DR related tasks from the main grid or the ESC to substations, and then each substation is communicating with 'M' communities. Each community may have a large number of houses under it and required to maintain its PUP with a suitable PAR ratio. Population is divided into communities with several clusters of community devices using different sizes of clusters. We have used three clustering parameters, which are defined in Table 1 along with possible set of values. Once optimum values for clustering parameters are found they are used to generate the clusters and then the power scheduling is done on clusters basis. Initially population is divided in to communities of size C1, all devices in the community are sorted according to C2, and then grouped into C3 Clusters. Optimization process depending on CCHEMS will consist of following steps: Step 1: Divide the population into communities of size C1.
Step 2: Sort devices of each community according to C2.
Step 3: Divide each community into C3 clusters.
Step 4: Repeat step 5 to 8 till all communities are scheduled.
Step 5: Initialize the parameters tdi ∈ current cluster within the range [ρdi,σdi-ldi] and repeat step 6 to end till all clusters are done. Use sets of tdis as particles.
Step 6: Calculate fitness by evaluating Pcj and Electricity Cost according to Eq. 5 for each particle.
Step 7: If fitness of particle better than previous Pb than update Pb. Also update Gb with Pb if later is better.
Step 7: Update particle velocities and positions according to Eqs. 2 and 3.
Step 8: Terminate if criterion reached otherwise go to Step 6.
Step 9: Terminate if whole population scheduled.
Overall objective of power scheduling process can be summarized as: where EC(P cj ) = ∑ ∑ ∑ rtep p c 144 τ=1 ∀k∈Cj ∀i∈C X (τ). p dik (τ) Here EC(Pcj) is the total electricity cost based on PUP Pcj for cluster of the community being scheduled, rtepPc(τ) is the rate of electricity in the τ th time slot according to Eq. 4, pdik(τ) is the power rating of AOD, Cx represents the set of houses in current community, and Cj refers to current cluster. As we have divided the population in to communities, so the IBR penalty term will be applied to whole community to keep the PAR under control.

Simulation results
This section presents the simulation results of our algorithm, results prove that the proposed algorithm reduces and smooth out peaks in load profile hence a better PAR is attained along with cost reduction. Simulation is done in two phases; in first phase clustering parameters are tuned over a fixed load profile of one day; and in the second phase tuned parameters are tested on a randomly generated population load profile for 90 days using PSO. Same procedure is repeated for simulation using GA for 45 days to show that the CCHEMS is independent of optimization technique and both cost and PAR reduction is the result of device clustering.
We have used three performance metrics for comparison, namely, Percentage Cost Reduction (PCR), PAR Reduction (PARR) and PUP Variance to Mean Ratio (PVMR). These metrics are calculated as Here EC is electricity cost without power scheduling, PSEC is electricity cost after power scheduling, PAR is peak to average ratio without power scheduling, PSPAR is PAR after power scheduling, µPUP is mean PUP.
Population load profile is generated with each house having a Maximum of 16 devices and a minimum of 8 for simulation purpose. Some devices are allowed to operate more than once a day. Model used for power consumption of AOD is illustrated in Table 2. All simulations are carried out in MATLAB for this study. Optimization parameters for PSO are: swarm size 100, neighbor minimum fraction 0.25, quantity of variables 16, relative change tolerance value 10 -6 and iteration based termination at 3200. Randomly generated one day load profile is subjected to PSO to find the best clustering set among all possible clustering combinations of C1, C2, and C3 given in Table 1. C3 is varied from 2 to 7 clusters per community with both uniform and unequal cluster sizes. Based on PARR best combination of clustering is employed on randomly generated population load profile for 90 days. Results presented hereafter are simulated with 50 houses per community, devices sorting based on DOTE, and 5 clusters per community. Set of cluster sizes preferred is 10-10-40-10-30, i.e. 1 st cluster contains 10% of the community devices sorted according to DOTE and so on. Electricity pricing data used is taken from Ameren Illinois Power Company (2015) over a span from 11 th April, 2015 to 9 th July, 2015. Three types of profiles are generated; first w/o any optimization, second scheduled with PSO and IBR only, last with PSO, IBR and device clustering per community. Optimization for 45 th day PUP is shown in Fig. 6.  Fig. 6 reveals that PSO & IBR only reduced PAR minimally, whereas proposed algorithm reduced PAR significantly. Sharp power consumption peaks are only shifted with no power consumption desert filling in the case of no clustering. When the clustering is applied, power profile tends to vary smoothly and deserts of power consumption are also reduced.
Effect on Electricity price reduction is shown in Fig. 7. Clustering based technique performs much better than non-clustered power scheduling. Mean electricity cost reduction without clustering is 45.53%, and 54.86% with clustering. Without clustering PAR is reduced by 0.51% only, on the other hand power scheduling with clustering reduced PAR by 24.84%. Proposed algorithm performs much better than non-clustering optimization, improvement in cost reduction is 9.33% and 24.33% in PAR reduction. When PAR is reduced by a magnitude of 24.84%, ESC can further offer consumers more incentives for playing their part in DR events. For comparison purpose PSO is replaced with Genetic Algorithm (GA) which was used by Zhao et al. (2013). GA simulation for 45 days is also done in MATLAB with population size of 200, crossover fraction 0.75, 1600 generations, and relative change tolerance value 10 -6 . Effect on Electricity price reduction based on GA optimization is shown in Fig.  9. Again the same pattern is repeated as mean electricity cost reduction without clustering is 43.6%, and 53.6% with clustering. Identical results with application of PSO and GA prove that the efficient reduction of PAR is result of clustering consumer devices based on operating time overlap. Fig. 9: Electricity cost for 45 days using GA Effect on PAR reduction based on GA optimization is shown in Fig. 10. Without clustering PAR is reduced by 0.77%, on the other hand power scheduling with clustering reduced PAR by 24.22%. In this case also, proposed algorithm performs way ahead than non-clustering optimization; improvement in cost reduction is 10% and 23.45% in PAR reduction. Proposed algorithm reduces PAR and smooth out PUP as shown in Fig. 6, hence ensures that the power system is reliable and stable.  Fig. 11. A flat PUP is ideal with zero VMR and CCHEMS was able to bring a VMR of 1 to 0.3, whereas non-clustered optimization yielded a reduction only up to 0.85 on the average. A smooth PUP and reduced PAR ensures the stability of the entire system. Furthermore a simulation is also performed to establish the effect of increase in consumer count. PUP of 2 consumers shown in Fig. 12 demonstrates that the peaks of non-clustered optimization are lower than those of clustered algorithm; hence nonclustered algorithm is better when population size is very small.
Population size is increased to 10 consumers in Fig. 13, and it is very clear that CCHEMS performs better than non-clustered optimization even for a small increase in consumer count.
Superiority of CCHEMS in PAR reduction for increasing population is depicted in Fig. 14. PAR of non-clustered optimization is better than CCHEMS till the consumers are fewer than 10 and afterwards PAR reduction is minimal. In contrast PAR reduction by CCHEMS is improved continuously with the increase in consumers.   Table 3. CCHEMS is approximately 9% better than nonclustering optimization in terms of cost reduction capability. When the PAR reduction is considered results are more encouraging; CCHEMS is 24% better than non-clustering optimization. Last parameter PVMR reveals that CCHEMS is 55% superior to non-clustering optimization in smoothness of PUP. Nearly equivalent results for both PSO and GA suggest that the reduction in PAR and electricity cost is only due to segregation of consumers into communities and clustering their devices based on operating time overlap.

Conclusions
This paper exploited the available flexibility of power grid using PSO, modified IBR and a clustered arrangement of consumer devices, called CCHEMS. Application of CCHEMS ensures consumer benefit in terms of cost reduction and advantage to ESC via exceptional trimming in PAR. Results confirm that the proposed algorithm is very efficient in PAR reduction for large population, whereas nonclustered algorithm of Zhao et al. (2013) failed to make any impact. Reduction in PVMR suggests enhanced stability of the whole power generation and distribution network. Additionally the structure of community based DSM proposed is also appropriate for consumers to share their alternate renewable energy sources within the community to reduce transmission line losses. Such sharing can be used to accommodate for power peaks left after initial power scheduling.