An Efficient Power Scheduling Scheme for Residential Load Management in Smart Homes

In this paper, we propose mathematical optimization models of household energy units to optimally control the major residential energy loads while preserving the user preferences. User comfort is modelled in a simple way, which considers appliance class, user preferences and weather conditions. The wind-driven optimization (WDO) algorithm with the objective function of comfort maximization along with minimum electricity cost is defined and implemented. On the other hand, for maximum electricity bill and peak reduction, min-max regret-based knapsack problem (K-WDO) algorithm is used. To validate the effectiveness of the proposed algorithms, extensive simulations are conducted for several scenarios. The simulations show that the proposed algorithms provide with the best optimal results with a fast convergence rate, as compared to the existing techniques. Appl. Sci. 2015, 5 1135


Introduction
Recently, the shortage of natural energy resources and growing energy demand in the world have resulted in dependency on renewable energy resources, such as solar and wind energy.According to [1], the power sector accounts for 38% of the expected energy demand increase by the year 2020.In Europe, the energy demand of the residential and building sector is expected to increase by 16%, the industry by 12% and the power sector by 13%.In order to fulfil extensive energy needs, electricity providers are thinking of re-organizing their energy production, transmission and distribution schedules.One of the current solutions is the transformation of the old grid into a smart grid (SG) with advanced information and communication technologies.As discussed in [2], SG has the ability to incorporate distributed, as well as renewable energy resources, which can mitigate the effects of a large number of electric vehicles, peak power plants, etc.
Demand response (DR) can be defined as the set of rules adopted by utilities to manage the end user energy demand in response to the electricity supply limits [3].Different strategies have been used to motivate the end users to take part in DR programs to efficiently utilize energy consumption.The most widely-used DR programs include: critical peak pricing (CPP), time of use pricing (TOU), day ahead pricing (DAP), real-time pricing (RTP), flat rate pricing (FRP) and inclining block rate (IBR) [4][5][6].The energy management controller (EMC) is used to take DR signals via a smart meter, which can use both price information and user inputs to generate schedules.Then, these schedules are transmitted to the smart appliances via Wi-Fi, ZigBee, infrared, etc. [7,8].
Generally, DR mechanisms work by either shifting the peak load to off-peak hours or reducing the overall energy consumption.The former encourages the users with incentive-based schemes to avoid high peaks to stabilize the grid.The latter adopts efficient energy consumption plans [9].However, load shifting may be used for bill savings and eventually may disturb the end users comfort.Therefore, there is a trade-off between user comfort and bill savings.In order to achieve cost-effective energy usage with minimum user frustration, a mechanism is needed that is able to adopt and incorporate the advantages of centralized, decentralized and distributed energy management schemes.Population-based heuristic techniques for global optimization are widely used due to low complexity, fast convergence and processing time.Usually, users can assign their own energy consumption patterns and preferences, which do not require high computational power and capabilities.Moreover, users do not need to interact with other users of the utility directly, which saves time, communication bandwidth and security.Based on the aforementioned challenges, we use a heuristic-based wind-driven optimization (WDO) technique to select energy-efficient patterns for driving all appliances.The contributions of the paper are as follows.
• We build a model by classifying electrical appliances into three groups based on power usage and user comfort requirements.This model incorporates the three proposed classes of appliances based on hourly electricity prices (TOU) during on-peak and off-peak hours in conjunction with user preferences.
• On the proposed model, we devise a binary version of WDO algorithm for minimum electricity cost and maximum user comfort.Moreover, a knapsack-based WDO (K-WDO) algorithm is also designed for maximum electricity cost saving that can be used as a benchmark for the performance evaluation of energy consumption in home area networks.The min-max regret-based knapsack optimization technique is used to minimize the maximum energy consumption.• The said optimization techniques are mapped for scheduling electrical appliances.Moreover, we incorporate a renewable energy resource during critical hours for grid stability, electricity cost reduction and user comfort (we assume that fixed electric power is stored via a renewable energy resource that can be utilized in peak or crucial hours).• Finally, we validate our proposed schemes and analytic framework via extensive simulations and comparisons of unscheduled and scheduled cases.
The rest of this paper is organized as follows: Sections 2 and 3 discuss the related work and energy management architecture, respectively.Different pricing schemes are discussed in Section 4. We then present the appliance energy consumption patterns, system model and appliance types in Sections 5-7, respectively.Details about the load optimization problem, WDO and PSO algorithms are given in Section 8. Performance evaluation and simulation results are given in Section 9, and Section 10concludes this paper.

Related Work
SG introduces a new vision of the upcoming future energy systems with advanced communication, sensing, controlling, transmission and distribution technologies for providing cost-effective and uninterrupted energy supply in a smart manner [10,11].Demand-side management (DSM) and DR are two major components of SG, which provide assistance in the implementation of energy management programs in different areas, like: electric market energy management, the industrial sector and, especially, the residential sector.DSM or energy demand management can be defined as the modification of consumer's energy consumption profile by using various methods, such as incentive-based DR mechanisms and improvement in lifestyle through education.Controlling the energy demand and flow can provide benefits by reducing the peaks to stabilize the grid and increasing the users monetary benefits.
The DSM mechanism plays an important role in the electricity market for energy management [12,13].Different DSM algorithms are used in the literature [14][15][16].Most of these techniques are based on specified systems, and others are not practically implementable due to the large number of independent devices [17].In [18], the authors use a decision support tool (DST) for household appliance scheduling in the TOU pricing environment.A dynamic scheduling system (DSS) is utilized to schedule the appliances and energy consumption based on the historical data of appliances [19], while in [20], the authors used a separate system to handle the load of a large number of customers by formulating the problem as a multi-objective optimization problem.
There is also a large number of centralized optimization techniques and algorithms in the literature.Each technique has been designed for different aims and goals.Heuristic-based particle swarm optimization (PSO) and stochastic-based robust techniques for optimization are used for DSM [21][22][23].In order to maximize the user comfort and cost reduction, the PSO algorithm is used for building energy management [24].Two versions, constant weight PSO and dynamic weight PSO, have been proposed and tested, which effectively save energy by keeping the maximum comfort level.Generally, centralized optimization techniques can give the best global optimum solution.However, sometimes, there might be scalability issues, and great computational power is required while designing for large buildings.
Decentralized techniques map a large number of distributed systems and multiple agents to obtain final solution(s) in a natural way.Here, optimization has been done locally, and information exchange between distributed systems is done via agents.In [25], the authors propose a game-based approach to balance the overall load and peak-to-average ratio (PAR) in a neighbourhood environment.All of the players in the game are involved to find the optimal energy consumption schedules and share the information with other neighbours.A similar Stackelberg game-based approach is used to reduce the generation, as well as the electricity cost.Here, the game is played with different utility companies and end users, where each struggles for maximum profit [26].In [27], a congestion game (non-cooperative game) is utilized to control electricity demand in a dynamic pricing (DP) environment.The coordination signal-based decentralized approach is used to solve the decomposed demand response optimization problem [28].A combined centralize and decentralized three-step technique is used for the scheduling of electric vehicle (EV) charging based on the DR signal [29].
A well-known DR approach that considers user comfort for the minimization of electricity cost is attractive among residential users.In the literature, a load prioritization mechanism has been used, where a high priority load can be served first [30].On the other hand, users can also set appliance priorities and preferences in the form of a matrix to meet their comfort level [31].For the maximum comfort and cost of both the utility and end user, the dual decomposition-based approach is used.User's comfort has been modelled by using a utility function that maps the total energy consumption up to the satisfaction level and decreases the energy variations at a desired point [32].Similarly, in [33], user's comfort has been modelled by using a sigmoid function, where comfort is achieved at the cost of extra energy.Another scheme has been proposed in which users specify their frustration level to change the length of operation and the start time of the appliance without taking into account the effects on the user's lifestyle [34].In [35], thermostatically-controlled appliances are used to enhance the maximum user comfort.Users only specify their preferred upper and lower temperature limits and the deviation point.Possible trade-offs between user's comfort and electricity cost are studied in [36].An optimization problem is proposed that adjusts the knob parameter to achieve minimized appliance waiting time or electricity cost.However, this technique is not precise and does not provide any idea of the obtained trade-offs.Moreover, the waiting time is associated with electricity cost.Here, waiting time cost increases as more energy is consumed in the later time slots.On the other hand, if high energy is consumed in the first hour(s) and very low energy in later hour(s), the waiting time cost would be less as compared to the former case.To sum up, all of the user's comfort-based DSM models discussed above have trade-offs between appliance waiting time and electricity cost.Moreover, these models fail to satisfy the requirements of middle class and low class users.
The proposed DSM technique based on the WDO algorithm is fully decentralized.Based on the energy price signal obtained form the utility, the appliance start time and the length of operation time, EMC performs its own calculations locally and makes energy-efficient schedules.These schedules are not shared with other users in order to reduce the complexity and communication delay between appliances, EMC and the utility.Moreover, in the proposed model, we balance the appliance waiting time and electricity cost to provide benefits to both end users and the utility company rather, than to provide benefits to a single party.For more cost reduction, the min-max regret knapsack problem formulation technique is used and compared to that of simple optimization algorithms.

Home Energy Management Architecture
Figure 1 shows the energy management architecture for a smart home in which EMC directly receives the DR signals from the utility via a smart meter.The main purpose for the deployment of EMC is to reduce the electricity bill and PAR by rescheduling the home appliances to ensure power system security and stability.Generally, the smart home consists of advanced metering infrastructure (AMI), smart meters, EMC, an in-home display (IHD) and renewable energy devices.For communication purposes, wireless technologies, such as Wi-Fi, ZigBee, Bluetooth, infrared, etc., are used.AMI is treated as a central nervous system in the SG infrastructure for two-way communication between the utility company and the smart meter.Moreover, AMI is also responsible for relaying both the energy consumption data from the distributed smart meters to the utility company and DR signals from the power distribution company to customer premises, respectively.Generally, smart meters are installed outside the homes between EMC and AMI.

Price-Based DR
Nowadays, most utility companies still use FRP models for their customers, which charge fixed prices/kWh all of the time.This is because traditional electromechanical meters have not been fully replaced yet.However, replacement of old meters with smart meters is in the process, where electricity consumption readings can be recorded in real time with more accuracy and less effort.Utility companies are also trying different pricing schemes for residential users to facilitate both the end users and the utility.

TOU and DAP
In the TOU pricing model, the whole day is divided into equal time slots, and prices are known in advance, which are mostly month or season based.The high, mid and low peak hours enable the customers to schedule their daily electricity load in order to pay a low electricity bill.For example, from 8 a.m.-10 a.m., the electricity prices are high, and customers can turn on the minimum load during this time interval.In practice, electricity prices vary according to the variable demand and supply, which is the essence of DR programs.Thus, in TOU models, if consumers have the desire to get a lower electricity bill, they must reschedule their load accordingly, because prices are fixed for a month or a season.On the other hand, DAP are fixed only for a single day and, also, known in advance by the customers.For a better implementation of DR programs, DAP schemes are more suitable than TOU pricing [4][5][6].

RTP
The RTP signal is also like TOU, where energy consumption prices vary hourly based on customer energy demand requirements.The utility then generates price signals by aggregating the total load requirements of each household.Therefore, during high energy demand hours, the electricity price will be high and vice versa.Since, electricity prices vary in each hour, which may pose scheduling problems, especially for the energy management system, adaptive and efficient algorithms are needed to cope with variable electricity prices.

CPP
This pricing scheme uses predefined pricing rates.Usually, this scheme can be implemented along with any other pricing schemes, such as RTP or TOU.If customers use more energy beyond some threshold limit imposed by the utility, they are charged according to new rates.The utility informs the users prior to implementation of the critical pricing plan.One important aspect of this scheme is restricting the users to consume less energy during peak intervals to balance the energy demand and supply.A study conducted in California shows that 41% of energy is reduced by imposing a two-hour threshold limit on hot water with end user control [37].On the other hand, approximately 13% of energy is saved for a five-hour threshold limit without providing end user control.

Home Appliance Energy Usage Pattern
Energy consumption optimization and scheduling can be done when EMC receives the DR information and electricity price signal from the utility.Users usually prefer to operate their appliances in a certain time interval when there is a low price signal available.For example, a clothes dryer can start and finish its job at (1 → 6 a.m.), because residents are asleep and the electricity price is low at this time.In this way, both the electricity bill and user comfort are achieved.Similarly, residents want to have breakfast as early as possible after waking.Therefore, we schedule the microwave oven at night, so that it can finish its job on time.It is important for residents to set control parameters, like the start time T s , finish time T f and T lot for all types of appliances during which they can be feasibly scheduled.These parameters are set by EMC, and then, optimal schedules are transmitted to all appliances.

Appliance Waiting Time
Usually, residents have the desire that appliances finish their job as soon as possible within a specified time.However, due to price uncertainty, extra load, communication delay between the utility and EMC, appliance priority, etc., there might be some possibilities that users can bear some delay.However, cost saving is always under consideration for residential users.Therefore, there is a trade-off between cost saving and appliance waiting time, which ultimately affects user lifestyle.To model the appliance waiting time, we introduce a waiting parameter called δt w borne by the smart user for n number of appliances, such that 0 ≤ δt n w ≤ T max .For simplicity, the user can specify the deadline T f that his or her appliance can finish the assigned job.The waiting time of n number of appliances can be calculated as: In Figure 2, the appliance waiting time will be zero if the start and on time are equal (T s = T on ).On the other hand, the user would bear some delay if the start and on time are not equal (T s = T on ).In order to maximize the user comfort, the appliance waiting time should be as little as possible.Therefore, the overall objective function is to minimize the appliance waiting time, which is given below: In Equation ( 2), n denotes the total number of appliances, and [t ∈ tn] denotes the total scheduling time, which is 24 h in our case.Constraint Equation (2a) shows that the maximum waiting time of appliance a must be within the maximum time limit, and constraint Equation (2b) denotes the appliance finishing time bounds, which are within the start and end time intervals.In this work, our focus is towards electricity bill minimization, user comfort and peak reduction.Based on the TOU pricing signal, scheduling algorithms adjust the working cycles of all types of appliances with respect to the given constraints.For example, at time slot t, appliance n has the schedule to be on.However, due to the high electricity price and T lot of all other appliances, the scheduler adjusts this appliance in time slot (t + δt) or (t − δt) for cost reduction.In Figure 2, positive δt w denotes that appliance n has initial starting time T s , and the scheduler adjusts the starting time after its original scheduled time.Similarly, negative T w shows that the appliance's new scheduled time is set before its original time.

System Model
We consider three types of N appliances, which consume energy in a 24-h time period.Each device is controlled by EMC, which takes energy signals directly from the utility via the smart meter.We divide the total scheduling time period (e.g., day) into 24 equal time slots.EMC calculates the starting T s and finishing T f time intervals, as well as the energy consumption of each appliance in a given time interval without exceeding available energy capacity C t .The energy consumption vector during all time intervals is written as: where E 1 t 1 is the amount of energy consumed by the first appliance in the time interval t 1 , and so on.
Total time interval is given as: In a given time interval T , each appliance can be scheduled by considering the time bounds T s , T f and T lot .Each appliance can have a scheduling time interval between [T 0 , T max ].In addition, we assume that each of the n appliances consumes its minimum E min con and maximum energy consumption values E max con , respectively, in each time interval T .The energy consumption of any appliance can be written as: The scheduling time horizon during which appliances can be scheduled is given as: The TOU pricing scheme is widely used in the energy management systems (discussed in the Introduction), so we use this scheme in our proposed work where the E con price varies in each interval of time (1 < T ≤ T max ) and is known in advance by EMC.The E con price in each time slot t is denoted by x t .The scheduling algorithm determines the feasible time slots for all appliances in order to reduce the electricity cost, which ultimately maximizes the end user benefits.

Types of Appliances
We consider a home in which N number of smart appliances operate with different time requirements.For simplicity, we divide these appliances into three categories based on energy consumption and waiting time requirements (Table 1).Air-conditioner 5.0 7

Class 1
The energy consumption of these appliances is adjustable in each time interval without storage.The performance depends on the current energy consumption level required to satisfy the customer needs.Appliances, such as the air-conditioner and clothes dryer, are included in this class.As we discussed in Section 5, we consider discrete time slots, and n number of home appliances share common energy resources.In each time slot t, each n appliance has energy demand E con (t) (e.g., energy consumption in each time slot if the appliance is on in time slot t).In this way, the energy unit price in each time interval is a function of aggregate energy demand.Therefore, each appliance is associated with a utility function U (E con (t)) in time slot t, which is concave (non-decreasing function of energy demand).The energy consumption requirements for all appliances in this class are given as: where λ t,i is a boolean variable, whose value is one if the appliance is on; otherwise, its values is zero.The energy consumption of Class 1 (must run) appliances in time interval t is denoted by E mr (t,i) .The above equation shows that the energy consumption of this class of appliances must be greater than or equal to threshold value E th .Therefore, we formulate the optimization problem as a 01 multiple knapsack problem in which the total energy consumption of all types of appliances cannot exceed a given capacity.To minimize the electricity bill, the objective function for Class 1 appliances is given as: s.t.: Equation (8) gives the total electricity cost of all must-run appliances, where the energy unit price for all appliances will remain the same in the given time interval.Constraint Equation (8a) gives the starting and maximum time limits.Constraint Equation (8b) describes the scheduling horizon, and constraint Equation (8c) shows that the total energy consumption of all appliances cannot exceed the total capacity C t .Constraint Equation (8d) gives maximum E max mr and minimum E min mr energy consumption bounds.The minimum threshold energy required to complete a task is shown in constraint Equation (8f), where E max denotes the maximum energy consumption of any appliance whose state is on in time slot t.The appliance selection parameter (01-knapsack) is given in constraint Equation (8g).

Class 2
Appliances in this class are scheduled throughout the day to save on the electricity bill.The energy consumption of such types of appliances is adjustable throughout the day, and its performance can be measured by total energy consumption, including renewable energy sources.Appliances, such as the washing machine and tumble dryer, are kept in this category.However, in order to maximize user comfort, appliance waiting time is also considered.The energy consumption of Class 2 appliances is given as: where E ss denotes the energy consumption for all types of appliances using the smart scheduler that are schedulable throughout the day with some renewable energy (RE) integration (e.g., solar in our case).
The objective function for Class 2 appliances is given as: s.t.: δt n wss ≤ δt n wss max (10h) Constraint Equation (10b,c) describes the scheduling horizon of Class 2 appliances, including appliance waiting time.Appliance maximum and minimum energy consumption limits are given in constraint Equation (10e).Each of the appliances requires an energy threshold in order to complete an assigned task as per constraint Equation (10f,g), whereas constraint Equation (10h) indicates that the appliance waiting time should not exceed the maximum time.Otherwise, users can suffer the maximum waiting time.Constraint Equation (10d,i) denotes the total energy consumption of schedulable, and smart interrupted appliances do not exceed the maximum capacity if the appliances are selected for the scheduling task.

Class 3
Appliances in this class have fixed energy consumption once they are on.They can be scheduled in any time slot.However, these appliances have some restrictions for starting at user-specified time slots for fixed intervals.The remaining operation time will be adjusted by EMC accordingly.Appliances like the stove, oven, etc., are placed in this class.In order to finish a job, energy consumption should be greater or equal to the threshold.
where E ssd denotes the appliances that are schedulable with some starting time delay.Moreover, these appliances also use an RE source whenever grid energy is limited.The objective function for Class 3 appliances is written as: s.t.: Constraint Equation (12a) shows the appliance scheduling horizon with the waiting time bound.Initially, appliances can be bounded to complete (1 → 3) working cycles consecutively to provide maximum user comfort.After this, the scheduler adjusts the remaining working cycles in low price hours to save on the electricity bill.It is clear from constraint Equation (12b) that the total energy consumption of Class 3 appliances cannot exceed the total capacity C t limit, which is calculated in each time slot.Similarly, the appliance minimum energy consumption requirements and maximum energy consumption are given in constraint Equation (12c-e), while the appliance on/off status is shown in constraint Equation (12f).

Load Optimization and Scheduling
In this section, we discuss the TOU pricing model in which EMC receives the price signal from the electricity provider (utility).The main objective is to design and simulate an optimization model to reduce the electricity bill of residential users.To model user comfort, we have considered three types of appliances, including must run, schedulable having RE storage and schedulable with appliance waiting time limits.Users can select any appliance type according to comfort and energy requirements.However, during low price time intervals, users cannot use more electricity than the given threshold.Therefore, total energy consumption and maximum waiting time for all types of appliances are given as: The daily electricity cost for all types of appliances can be written as: where C denotes the daily electricity cost of all types of appliances and C class 1 , C class 2 and C class 3 show the electricity cost of each class, respectively.Electricity cost with a renewable energy source is denoted by C RE .In our proposed scheme, solar plates are used as a renewable energy source, whose capacity is assumed to be 30 kW.It is clear from Equation 14that the master problem is decomposed into sub-problems.It is also noted that all of the sub-problems discussed in Section 4 are convex in nature, and we can solve these by using any standard optimization technique (heuristic, non-linear, mixed integer non-linear).In order to reduce the electrically bill, energy consumption should also be minimized by considering and satisfying all of the constraints.These types of problems have been a focus of research during the last decade [38,39].Generally, based on the above model, the cost saving of any number of appliances can be unknown and can take any value within the range [cost min sav , cost max sav ].Here, we assume that the prudent consumer could desire minimizing the regret of the selected appliances based on the given cost saving scenario.This problem can be formulated by using the robust generalization of the knapsack problem [38].It is assumed that cost sav can take any value within the specified limits of each appliance.Let s be the set of all electricity cost savings cost s savn that satisfy the given conditions.
Let S be the set of all possible solutions, i.e., S = S = (s 1 , s 2 , s 3 , ...s n ) : We denote z s (i n ) the solution given for scenario s from solution space s ∈ S.
where E s (t,i) denotes the energy consumption solution set s of i appliances, such that [s ∈ S]; similarly, the energy consumption of all possible solution sets s, where [s ∈ S] can be obtained.Let z * s (i n ) be the optimal solution of the given set of appliances.The regret r s associated with a solution z s (i n ) by comparing the optimal solution with the given solution is given as: Let S 0 be the set of all possible sets of solutions, and the maximum regret r max is equal to the sum over all possible scenarios.Therefore, to provide the user with the maximum possible benefits, maximum regret must be minimized.The interval min-max regret knapsack problem (K-WDO) is used to find and minimize the maximum associated regret, given as: s.t.:

Scheduling Algorithm
For researchers, nature is a wonderful source of imagination and inspiration for solving complex scientific problems in every domain.There have been different nature-inspired heuristic optimization algorithms proposed, such as genetic algorithm (GA) [40], differential evolution (DE) [41], particle swarm optimization (PSO) [42], ant colony algorithm (ACO) [43], cuckoo search (CS) [44], etc.These algorithms are successfully implemented, and satisfactory results are obtained.However, every algorithm has some pros and cons, and it is impossible that each algorithm from the nature-inspired family best solves all types of problems [45].
The WDO is a novel and nature-inspired global optimization algorithm based on the atmospheric motion of wind particles.Moreover, it is a population-based iterative and heuristic optimization technique, in which constraints can be implemented in search domains, as compared to other heuristic algorithms (GA, PSO, etc.).Infinitely small air particles move in an n-dimensional domain using Newton's second law of motion, which can also be used to analyse the motion of air particles in the Earth's atmosphere.Another major difference between WDO and other heuristic algorithms is additional velocity update parameters (gravitation and Coriolis forces), which lead to fast convergence [46,47].Due to the three-dimensional coordinate system of our atmosphere, gravitational force F g is a vertical force acting on the air particles to confine them to the centre.
The Coriolis force is included in the WDO algorithm due to the fact that the movement of air particles in the x-direction has a direct effect on the y-direction.Therefore, in the n-dimensional search space, this phenomenon is randomized.Mathematically, Coriolis force F C can be defined as: where Ω and v denote the Earth rotation and velocity vector of the air particles, respectively.Now, it is clear that during the movement of air particles, the current position and v are updated using Newton's second law of motion.In WDO, the position and v of all air particles are updated with every movement of time.The velocity update equation can be written as: where the details of Equation ( 27) are given as follows: 1.The first term shows that the air particles continue their movements to the previous path with some opposition of frictional force.2. The second term is gravitational force, which attracts the air particles to the centre (in the coordinate system).3. The third term describes the force exerted on air particles to move them towards the highest pressure location, which is the global best position in the WDO optimization problem.
4. The fourth term shows the Coriolis force, which is a deflecting force, because the movement of air particles in one direction is affected by the movement in the second direction.Similarly, in PSO, weights w 1 and w 2 are used to control the movement of air particles in order to find the global best position.
The variables used in the velocity update equation and WDO algorithm are given in Table 2.The pressure term used in the WDO algorithm is similar to the fitness term used in GA or PSO.However, the WDO algorithm consists of infinitely small air particles moving towards the highest pressure point in the n-dimensional search space.The new position of the air particles can be obtained after the velocity update (Equation ( 27)).

Population Evaluation Functions
To evaluate the performance of the WDO algorithm, different population evaluation functions (e.g., sphere, Ackley, Rastrigin, rotated hyper ellipsoid, step function) can be used and are defined in [47,48].Each function has different properties and parameter ranges based on which performance is measured.In our proposed scheme, we use a modified sphere function as defined in [47] for the evaluation of initial random population generation.Moreover, the convergence time of the WDO algorithm using sphere and step functions is evaluated and compared to the PSO algorithm (Table 3).The sphere function given in [47] is: The function used in our algorithm can be written as: The step function can be defined as: where F sphere and x i denote the global optimal value and position of the air particle, respectively.These two functions are evaluated under the parameter values given in Tables 4 and 5.Alternatively, PSO is also a widely-used heuristic algorithm, because of its low complexity and ease of implementation, as compared to WDO.One of the major reasons for the low complexity is due to the lesser number of variables involved, as shown in Table 5.In PSO, population is initialized randomly, which moves in the n-dimensional search space X (i,t) = [x (i 1 ,t 1 ) , x (i 2 ,t 2 ) , x (i 3 ,t 3 ) .....x (in,tn) ] with velocity After initialization, particles move with some randomness in order to avoid premature convergence, as shown in Equation (32).The velocity v (i,n) of each particle is updated using the following equation [47].
where c 1 and c 2 are weights for local p lb (i,n) and global best p gb (i,n) positions, rand(1) is a random variable whose range is [0, 1] and the ω is the inertia factor.The value of the ω is calculated as: The position x i,n of the particles is updated using the following equation.
In our case, we are using the binary version of WDO and PSO; we first convert the V into binary form using a sigmoid function.
where v (i,n) is the velocity of the i-th particle in n-dimensions.The final binary value of zero or one is generated after comparing the values obtained from the sigmoid function and a random variable, as given below.
It is clear from the above expression that binary conversion is probabilistic, because every v (i,n) value is compared to a random number, which can create disturbance in the optimal value or convergence as shown in Table 3.On the other hand, in Equation 27, random term involvement is completely neglected, which provides more accurate results.The control variables involved in the PSO algorithm are given in Table 5. Figure 3 shows the convergence comparison of the WDO algorithm with sphere and step functions.It is clear from Figure 3 that the WDO algorithm converges after 204 iterations, resulting in zero pressure; while the WDO algorithm diverges even after 500 iterations, which shows the effectiveness of WDO algorithms using the sphere function.In Figure 4, the PSO algorithm converges after 370 iterations when using the sphere function.On the other hand, the PSO algorithm is unable to achieve convergence, even after 500 iterations.Thus, due to the fast convergence, we use the WDO algorithm with the sphere function for initial population evaluation in our proposed technique.

Number of Iterations
The WDO creates random solutions of n number of populations (air parcels).Each population consists of a set of different numbers of variables.After evaluating the fitness function, constraint validations and the velocity update, we can obtain the new population that includes both the new and old air parcels.In the next phase, the fitness of the new population will be evaluated and compared to the previous one.Finally, we obtain the final optimal appliance scheduling pattern.Then, in the next step, after obtaining the energy consumption requirements of each appliance, the WDO algorithm first checks the appliance class.If the first appliance class is selected, the scheduling algorithm performs the appliance scheduling without considering appliance waiting time and renewable energy.In this way, the electricity bill is minimized with less user comfort.Alternatively, if appliance Class 2 is selected, the WDO algorithm performs the scheduling by incorporating renewable energy.Lastly, if appliance Class 3 is selected, scheduling is performed to increase the user comfort along with electricity bill cost reduction.After this step, the algorithm checks the current time slot, so that scheduling can be performed for the next time slot.Otherwise, the next cycle for all types of appliances will start.In the proceeding step, if the energy consumption is within the threshold limits, the results are stored for graphical representation.Otherwise, the whole process will be repeated to achieve the cost-effective results.In order to best describe the working of the proposed algorithm, optimization and scheduling steps are given in Figure 5.

Peak-to-Average Ratio
The energy consumption of a single smart appliance at different time intervals can be written as follows: The daily energy consumption for 24 time slots is given as: Now, for a single user, PAR can be calculated by dividing the maximum energy consumption by the average energy consumption in a specific time slot as: For n number of users, the overall objective function is to minimize the PAR:

Simulation Results and Discussion
In this section, we describe the simulation results and the discussion for the validation of our proposed energy management algorithms in the TOU pricing environment.We consider a single household with various types of appliances having variable energy consumption requirements.EMC is installed inside the home, which directly takes energy price signals from the utility company via the smart meter.Based on appliance energy consumption and user comfort requirements, EMC transmits the energy-efficient schedules to all types of appliances via the two-way communication module.Widely-used communication protocols, such as ZigBee, Wi-Fi, Bluetooth, etc., are used for this purpose.For the sake of simplicity, we assume six appliances that are mainly used in a normal household.All appliances are controlled and operated automatically.Each appliance has different lengths of operation time and starting time bounds.We consider scheduling time horizon T = 24 h, so that the user can solve the optimization problem to calculate the overall electricity bill.We simulate different scenarios for electricity cost saving and user comfort perspectives.For the WDO algorithm, the initial population size, the number of bits, etc., are shown in Table 4. Simulations are conducted in MATLAB.Some appliances can be used more than once by the residential users during 24 h.However, these appliances are shiftable throughout the time slots of a day.Table 1 shows the total appliances, energy consumption and operation intervals.Initially, we simulate WDO for all types of appliances without taking into account the capacity constraints and then simulate K-WDO.As discussed earlier, the TOU pricing signal is used, which is shown in Figure 6, and obtained from the New York ISOwebsite.Appliance energy consumption data are obtained from [49].

Electricity Cost vs. Appliance Waiting Time
To achieve a lower electricity bill, smart users must operate all appliances according to the optimal schedules given by EMC.During the scheduling horizon, the start time of any appliance cannot be fixed due to the price variation in each hour.Therefore, the scheduling algorithm adjusts the starting time of those appliances that are categorized from the maximum cost saving perspective.However, this mechanism can save electricity cost, but can eventually disturb the end user lifestyle.Alternatively, the appliance scheduling algorithm can be designed to maximize the user comfort, but at maximum electricity cost.Therefore, these two objectives are contradictory and difficult to achieve simultaneously.The WDO algorithm is designed for those customers who are more conscious about electricity bill saving and can compromise on comfort.In Figure 7c,f, the clothes dryer and air-conditioner are scheduled for maximum electricity cost saving.In Figure 7c, the working of almost every appliance is rescheduled to the time slots having low electricity price.Bars with a greater width denote the user-specified time slots, while, bars with a smaller width show the rescheduled time slots and total number of operating hours.It is clear from Figure 7b that the air-conditioner does not start working immediately due to the high electricity price, and its working is rescheduled by EMC.Alternatively, starting the air-conditioner immediately can add high electricity cost.Therefore, we cannot start the working of all of the appliances immediately due to the capacity constraint to avoid high peaks on the grid side.In Figure 7b,d, appliances are scheduled along with starting time bounds and the RE source to increase the user comfort.Appliances turn on immediately after the scheduling process starts and after one hour of working, EMC reschedules the remaining working hours when the electricity prices are low.It is clear that the average appliance waiting time of the tumble dryer is low compared to the clothes dryer and air-conditioner.
Figure 7a,e has starting time limits and shows scheduling without an RE source.The working of the microwave oven is rescheduled after completing the first three hours consecutively in order to provide user comfort, while the electric stove completes only the first hour, with the remaining hours rescheduled by EMC.Equation (1) gives the average waiting time of an appliance where the waiting time is inversely proportional to the electricity cost.If the price increases, the waiting time decreases, and vice versa.Therefore, we design the scheduling algorithms having minimum electricity cost and appliance waiting time.

Electricity Cost vs. Electricity Price
Figure 8 shows the electricity cost comparison of the WDO and PSO algorithms in the scheduled and unscheduled cases, respectively.It is clear form Figure 8 that EMC optimizes the energy consumption of home appliances by scheduling in low pricing time slots.During hours (0 → 6), the scheduled electricity costs of both the PSO and WDO algorithms are comparatively the same, because EMC schedules the appliances according to the low pricing slots without taking into consideration the maximum capacity limit.During high price hours (6 → 10), the electricity cost of the PSO algorithm is high, as compared to the WDO algorithm, because EMC schedules a greater number of appliances during these time slots.During mid-peak hours (11 → 15), a greater number of appliances are turned on by the PSO algorithm as compared to WDO, so the electricity bill is higher.The remaining working cycles of all of the appliances are completed during low price hours (15 → 25).It is clear that almost the electricity bill is the same during these hours.In Figure 9, the K-PSO algorithm schedules all appliances from hours (0 → 24).During high peak hours (7 → 10), a greater number of appliances are turned on as compared to the WDO algorithm, which does not turn on any appliances in these hours in order to save on the electricity bill.The remaining working cycles of appliances in the K-WDO case are completed during (15 → 24) h.This is because during hours (6 → 10), electricity prices are high, and the scheduler adjusts the working of all appliances to other time slots to save electricity cost.To sum up, we conclude that by using the K-WDO algorithm, electricity cost and high peaks are effectively reduced, which are useful in stabilizing the electric grid with user benefits.

Energy Consumption
In Figure 10, the energy consumption of appliances in the WDO algorithm is low during (0 → 3) h, while, appliances consume more energy with the PSO algorithms.During high peak hours (7 → 10), appliance energy consumption in the PSO case is comparatively low with respect to the WDO algorithm.During hours (10 → 24), the average energy consumption of both the scheduled and unscheduled cases is the same.While, Figure 11 shows some variations in energy consumption during high and low peak hours, during low peak hours (0 → 7) and (11 → 25), the K-WDO algorithm schedules most of its appliances for a low electricity bill; while electricity prices during (6 → 10) h are high and the K-PSO algorithm schedules a greater number of appliances in these time slots.On the other hand, the K-WDO algorithm does not turn on any appliance during high peak hours and utilizes the low peak time slots to complete working cycles.In conclusion, we observed that the K-WDO algorithm more effectively reduces the energy consumption by optimally scheduling the appliances in low and mid-peak hours.

PAR Reduction
We start by discussing the resulting PAR reduction in the total residential load when we use our proposed energy management algorithm.Generally, residents want to reduce their total electricity bill, while the utility is interested in providing balanced energy supply.Figure 12 clearly shows that our proposed algorithm is helpful in reducing total PAR and balancing the energy consumption by considering capacity constraint C t .It is also clear from Figure 12 that the K-WDO algorithm reduces the PAR by8.3% due to the optimal scheduling of home appliances in low price hours without creating congestion, while the K-PSO algorithm reduces the PAR by 6.97%.

Electricity Cost with Renewable Sources
Figure 13 shows the electricity cost comparison of both the WDO and PSO algorithms and their variants with the RE source.In our proposed work, we assume that we have RE storage, and EMC can use either RE or grid energy.During each time interval, if the RE is greater than the aggregated energy required to complete a task, the scheduler utilizes RE energy only.Otherwise, if the required energy is greater than the available RE capacity, EMC will use both the RE, as well as the grid's energy.Therefore, the electricity cost using the RE source is comparatively less.

Conclusions
In this paper, we have proposed an energy demand management model based on the WDO and PSO algorithms to reduce the electricity bill and high peaks by preserving the user comfort within acceptable limits.As compared to other DSM algorithms, the WDO-based algorithms have a modified appliance scheduling mechanism, which considers electricity cost, high peaks and user comfort requirements.Moreover, different classes of appliances are taken into account having different comfort constraints.Based on extensive simulations, it is clear that the WDO algorithm is efficient in terms of appliance waiting time and electricity bill reduction as compared to the PSO algorithm, which has high convergence time.On the other hand, the K-WDO algorithm is useful in reducing the electricity bill by optimal scheduling of the home appliances.We have analysed the performance of the proposed algorithms in different scenarios where appliance types T s , T f and T lot are changed.Finally, the results of WDO algorithms are compared to PSO, and the achievements for electricity costs are given in Table 6.
In the future, we plan to apply and compare the performance of these algorithms by considering user activities and solar energy forecasting in a particular region.Different user activity models using raw sensor data will be constructed, based on which working cycles of different appliances will be scheduled.

Figure 1 .
Figure 1.Energy management architecture in the home.

Figure 3 .
Figure 3. Convergence comparison of the WDO algorithm using sphere and step functions.

Figure 4 .
Figure 4.Convergence comparison of the PSO algorithm using the sphere and step functions.

Figure 7 .
Figure 7. (a) Appliance I starting time; (b) Appliance II starting time; (c) Appliance III starting time; (d) Appliance IV starting time; (e) Appliance V starting time; (f) Appliance Istarting time; appliance staring time of the unscheduled and scheduled cases.

Figure 8 .
Figure 8. Electricity cost comparison of using the WDO and PSO algorithms.

Figure 9 .
Figure 9. Electricity cost comparison of using the knapsack WDO (K-WDO) and K-PSO algorithms.

Figure 10 .Figure 11 .
Figure 10.Energy consumption comparison of the PSO and WDO algorithms.

Figure 12 .
Figure 12.Total peak-to-average ratio (PAR) reduction comparison of the WDO and PSO algorithms for a simple household based on the TOU price signals adopted from NYISO.

Figure 13 .
Figure 13.Electricity cost comparison of the WDO and PSO algorithms.

Table 2 .
Symbols used in the wind-driven optimization (WDO) and PSO algorithms.

Table 3 .
Convergence comparison of the WDO and PSO algorithms.

Table 4 .
Control parameters for the WDO algorithm.

Table 5 .
Control parameters for the PSO algorithm.