Keywords

1 Introduction

Until the 1970s, power distribution utilities planned their energy delivery capacity according to demand growth, once energy consumption was highly predictable. However, since the 1980s, due to economic, political, social and technological factors, demand has started to become less and less predictable [1]. Currently, the use of renewable sources has increased such volatility.

In this context, Demand-Side Management (DSM) was conceived as the planning, implementation and monitoring of activities that aim to influence the use of electricity in a way that produces desired changes in the load curve of utilities [2]. The DSM covers a set of actions for load management, which include, for example, the adoption of variable tariffs, measures for rational energy use, renewable sources, energy efficiency, and Demand Response (DR). In this way, DSM mitigates the risks that can compromise the efficiency, reliability and stability of the power system, since it allows the relief of the power grid during peak hours.

According to [3], with the advances in data communication technologies and energy metering infrastructure, an adequate scenario is presented for the efficient management of energy resources. Therefore, in [4], the authors demonstrate that recent literature presents several studies that discuss the need of automatic load management and consumer behaviour analysis for DR programs to enable DSM actions. In addition, the authors argue that sustainable management of energy resources can be achieved through cooperation between the utility and its consumers, balancing the benefits between them.

Following this context, this paper addresses the DSM issue as a DR optimization problem, which aims to obtain the residential load scheduling that minimizes the cost of the energy consumed in face of tariff variations, respecting consumer habits as well as the characteristics of their electrical equipment. Another, but no less important goal concerns the reduction of the peak consumption that could be generated by a group of consumers. Thus, the reduction of this peak of consumption maximizes the reliability of the power system.

2 Demand Response and Load Scheduling

Demand Response methods refer to mechanisms that aim to manage the consumption patterns of end consumers in response to generation, supply, environmental, economic, and other conditions [5]. In this way, six load modulation strategies are defined by means of DR programs: peak reduction, valley filling, strategic growth, load shifting, strategic energy conservation, and flexible load curve.

Based on the ability of consumers to respond to an action by the system operator due to the change in energy prices, the potential impact of the DR is estimated to reduce peak demand. There are several ways to implement price-based DR programs, such as the Time-of-Use (TOU) pricing model, where the utility establishes prices that vary according to predefined time periods, which can include hours of the day, days of the week or seasons of the year, for example.

From the advances on Information and Communication Technologies and the consequent introduction of the Smart Grid concept, together with the DSM mechanisms, consumers play an important role in the energy scenario, since they can manage their consumption in an appropriate manner, selecting a preferred supplier and scheduling the operation of each residential load. Obviously, the scheduling of loads is not a trivial task, since it should consider a large set of information, objectives and constraints governed by mutual benefit among all agents of the system. Therefore, the DSM as an optimization problem leads to the development of decision support methods that meet the objectives of the utility and its consumers.

3 Autonomous and Distributed Modelling

From mathematical models that represent the loads and profile of residential consumers, it becomes possible to maximize the advantages of joining DR programs. Therefore, the choice of these models considers different factors related to the energy consumption.

Thus, this paper considers an autonomous and distributed model, published by [6], which was idealized for price-based DR programs. In this model, it is assumed that a group of nearby consumers, connected on the same power grid, has a bidirectional communication with the utility and interact with each other. It is also assumed that each consumer has a device called Energy Consumption Scheduler (ECS), which is responsible to obtain measurements and manage the flow of information between consumers. In addition, all communication between them and the utility is carried out via LAN (Local Area Network).

Considering the minimization of the cost for energy consumption, the Peak-to-Average Ratio (PAR) reduction is also part of the objective function of this model. The PAR corresponds to the ratio between the maximum demand and the average consumption demand, which reflects how much demand is concentrated in the peak period [3], being an important element that contributes to the energy price.

In the autonomous and distributed model, \(\eta \) denotes the group of consumers, where the number of consumers is \(N \doteq |\eta |\). For each consumer \(n \in \eta \), the total energy consumption at the time \(h \in H \doteq \{1,...,H\}\) is denoted by \(l^h_{n}\), where \(H = 24\). Aiming to maintain the generalization of the model, the time discretization considered is one hour. Therefore, the daily consumption profile for the consumer n is denoted by \(l_{n} \doteq \{l^1_{n},...,l^H_{n}\}\). Based on these definitions, the total consumption at each hour of the day (\(h \in H\)) considering all consumers can be calculated as:

$$\begin{aligned} L_{h} \doteq \sum _{n \in \eta } l_{n}^h. \end{aligned}$$
(1)

Peak and average daily consumption can be calculated respectively by:

$$\begin{aligned} L_{peak} = \max _{h \in H} L_{h}, \end{aligned}$$
(2)
$$\begin{aligned} L_{avg} = \frac{1}{H} \sum _{h \in H} L_{h}. \end{aligned}$$
(3)

Therefore, the PAR of load demand is given by:

$$\begin{aligned} PAR = \frac{L_{peak}}{L_{avg}} = \frac{H \max _{h \in H} L_{h}}{\sum _{h \in H} L_{h}}. \end{aligned}$$
(4)

For each consumer \(n \in \eta \), \(A_{n}\) denotes the set of electrical devices present in the residence. For each load/appliance \(a \in A_{n}\), it was defined a power consumption planning vector \(x_{n,a} \doteq \{x^1_{n,a},...,x^H_{n,a}\}\), where the scalar \(x^h_{n,a}\) represents the planned energy consumption by the consumer n for the load/appliance a at time h. Thus, the total hourly consumption of each consumer is obtained as follows:

$$\begin{aligned} l^h_{n} \doteq \sum _{a \in A_{n}} x^h_{n,a}. \end{aligned}$$
(5)

In this model, the objective of the ECS of each consumer is to calculate, through the optimization algorithm, the best power consumption planning vector (\(x_{n,a}\)) for each residential load. Thus, it can be defined the daily consumption profile of the consumer. Clearly, the definition of feasible planning should consider the preferences and needs of consumers throughout the day, as well as the operating characteristics of each load. It is important to mention that the objective is not to change the total amount of energy consumed, but rather to manage and allocate the loads efficiently to reduce the total daily energy cost paid by the consumer as well as reduce consumption at times of peak demand.

For this purpose, the consumer should define the beginning \(\alpha _{n,a} \in H\) and end \(\beta _{n,a} \in H\) of time interval in which each load/appliance can be turned on, so that \(\alpha _{n,a} < \beta _{n,a}\). The definition of this operating window imposes time constraints on the planning vector and the total energy consumption previously determined must be carried out within the established range, such that \(\sum ^{\beta _{n,a}}_{h = a_{n,a}} x^h_{n,a} = E_{n,a}\) and \(x^h_{n,a} = 0, \forall h \in H\backslash H_{n,a}\). Thus, \(H_{n,a} \doteq \{\alpha _{n,a},...,\beta _{n,a}\}\) is the operating window of each device defined a priori. For each load/appliance, this time interval must be greater than the interval required to perform its function completely.

Therefore, it can be noticed that the daily energy consumed by all loads/appliances is equal to the sum of the total consumption of each load/appliance of each consumer. In this sense, the energy balance ratio will be maintained:

$$\begin{aligned} \sum _{h \in H} L_{h} \doteq \sum _{n \in \eta } \sum _{a \in A_{n}} E_{n,a}. \end{aligned}$$
(6)

In general, the operation of certain equipment is not as flexible as the changes in the schedule. Therefore, the ECS does not impact on the consumption planning of such equipment. Thus, for each load/appliance \(a \in A_{n}\), the minimum energy consumption in standby mode (\(\gamma ^{min}_{n,a} \)) and the consumption relative to the maximum power (\(\gamma ^{max}_{n,a} \)) are defined, so that \(\gamma ^{min}_{n,a} \le x^h_{n,a} \le \gamma ^{max}_{n,a}, \forall h \in H_{n,a}\).

Thus, given the assumptions established in the autonomous and distributed model, the problem of minimizing the diary energy bill can be expressed as follows:

$$\begin{aligned} \min _{x_{n,a}, \forall n \in \eta , \forall a \in A_{n}} \sum ^{H}_{h = 1} C_h \left( \sum _{n \in \eta } \sum _{a \in A_n} x^h_{n,a}\right) , \end{aligned}$$
(7)

where \(C_h\) is the function that defines the energy cost in the hour h. This model considers a previously known and strictly convex function for the energy cost.

In addition to the cost, the reduction of PAR is also necessary to obtain efficient consumption planning [6]. In this way, it is possible to represent the PAR of the energy consumption planning vectors as:

$$\begin{aligned} \frac{H \max _{h \in H} \left( \sum _{n \in \eta } \sum _{a \in A_{n}} x^h_{n,a}\right) }{\sum _{n \in \eta } \sum _{a \in A_{n}} E_{n,a}}. \end{aligned}$$
(8)

Therefore, having prior knowledge of all consumers’ needs, the solution to the problem results in an efficient planning of energy consumption with respect to PAR:

$$\begin{aligned} \min _{x_{n,a}, \forall n \in \eta , \forall a \in A_{n}} \frac{H \max _{h \in H} \left( \sum _{n \in \eta } \sum _{a \in A_{n}} x^h_{n,a}\right) }{\sum _{n \in \eta } \sum _{a \in A_{n}} E_{n,a}}. \end{aligned}$$
(9)

Given the planning vectors, the terms H and \(\sum _{n \in \eta } \sum _{a \in A_{n}} E_{n,a}\) are constants. Consequently, they can be removed from Eq. 9, so that the following equivalent problem can be determined:

$$\begin{aligned} \min _{x_{n,a}, \forall n \in \eta , \forall a \in A_{n}} \max _{h \in H} \left( \sum _{n \in \eta } \sum _{a \in A_{n}} x^h_{n,a}\right) \end{aligned}$$
(10)

According to the described mathematical modeling, the problem discussed in this paper can be solved by a variety of optimization approaches, such as meta-heuristics. In this sense, the application of the PSO algorithm is feasible to solve the established price-based Demand Response problem, given its algorithmic simplicity and its ability to solve these category of problems.

4 Particle Swarm Optimization

4.1 Classical and Linear Decreasing Weight PSO

The PSO algorithm was proposed by [7] as an evolutionary computational optimization technique where the solution of a problem, or a particle, is found within a swarm containing a fixed number of particles. With its coordinates, each particle has a record of its best-known fitness, called pBest, and the best overall fitness of the swarm, gBest. Therefore, the swarm always moves towards the best solutions found.

The position of a particle is determined based on its previous position, \(P_i(X_1,...,X_n)\) , and by its velocity, \(V_i(X_1,...,X_n)\), so that \(\{X_1,...,X_n\}\) are the coordinates of the particle. Therefore, according to [7], the movement of the swarm is governed by the equations:

$$\begin{aligned} V^{(t+1)}_{i} = \omega * V^{t}_{i} + \phi _1 r_1 \left( X^t_{pBest_i} - X^{t}_{i}\right) + \phi _2 r_2 \left( X^t_{gBest_i} - X^{t}_{i}\right) , \end{aligned}$$
(11)
$$\begin{aligned} X^{(t+1)}_i = X^t_i + V^{(t+1)}_i, \end{aligned}$$
(12)

where \(V^{(t+1)}_i\) is the velocity coordinate at the next iteration; \(V^t_i\) is the current coordinate of the velocity; \(X^{(t+1)}_i\) is the coordinate of the position at the next iteration; \(X^t_i\) is the current coordinate of the position in the iteration t; \(X^t_{pBest_i}\) and \(X^t_{gBest_i}\) are the best coordinates for a particle and for the swarm, respectively; \(\phi _1\) and \(\phi _2\) are factors for local and global exploration, respectively (namely cognitive and social parameters); and finally \(r_1\) and \(r_2\) are random numbers uniformly distributed between 0 and 1, which insert a stochastic characteristic in the process of exploration of the search space.

It should be noticed that the inertia factor \(\omega \) in Eq. 11 is not part of the original PSO, since it was proposed by [8] in a new approach called Linear Decreasing Weight PSO (LDW-PSO). The authors proved that this factor significantly increases the performance of the algorithm in relation to classical PSO in many cases. In the LDW-PSO, \(\omega \) is the inertia factor, which usually decreases linearly from 0.9 to 0.4. According to the authors, the value of the inertia factor can be obtained through the equation:

$$\begin{aligned} \omega = \omega _{max} - \frac{\omega _{max} - \omega _{min}}{iter_{max}} * iter, \end{aligned}$$
(13)

where, \(\omega _{max}\) represents the maximum value that the inertia factor can obtain, \(\omega _{min}\) is the minimum value, \(iter_{max}\) is the maximum number of iterations that the PSO will execute, and iter refers to the current iteration of the algorithm. According to [8], a large value for the inertia factor guarantees the global exploration of the search space. Otherwise, a small value helps with local explorations.

4.2 Proposed PSO Based on Stochastic Population Mechanism

A potential deficiency of meta-heuristics, including the PSO algorithm, referred to as structural bias, is discussed by [9]. According to the authors, a heuristic algorithm is structurally biased when it is more likely to visit some parts of the search space than the others. This behavior is not justified by the objective function. The authors further suggest that the structural bias has a greater impact on the exploration efficiency of the search space according to the level of difficulty inherent in solving the problem. In addition, the adoption of an effective particle sampling strategy increases the chance of PSO convergence.

Thus, assuming the autonomous and distributed modelling and the exposed objectives, a stochastic mechanism for the generation of particles is proposed (Algorithm 1), which aims to potentiating the application of LDW-PSO to the DR problem. The main idea of this mechanism is to generate individuals in function of the energy tariff in order to stochastically define viable candidate solutions that present better fitness and to explore more efficiently the search space of the problem. Therefore, this paper design a new PSO algorithm, which will be treated in this paper as SPM-PSO (Stochastic Population Mechanism PSO).

5 Results and Discussions

Based on the autonomous and distributed model presented, this paper aims to conduct an effective comparison regarding the performance of the PSO algorithms proposed in Sect. 4, highlighting the particularities of these algorithms when applied to solve the autonomous and distributed model of DR problem. Thus, to represent a complete cycle of consumption behavior in a residence, a planning horizon of 24 h was analyzed. The data considered were generated by the Load Profile Generator software. The simulations were performed considering a set three residences, inhabited by 3 persons (2 adults and 1 child). In addition, each residence has 40 electrical load/appliances, which have their own operating configurations.

figure a

Aiming to minimize the cost of energy consumption and the PAR, factors represented by Eqs. 7 and 10, the objective function considered in the implemented algorithms was described as:

$$\begin{aligned} \lambda _{cost} \sum _{h \in H} \left( C_h \sum _{n \in \eta } \sum _{a \in A_n} x^h_{n,a}\right) + \lambda _{PAR} \max _{h \in H} \left( \sum _{n \in \eta } \sum _{a \in A_n} x^h_{n,a}\right) , \end{aligned}$$
(14)

where h, H, n, \(\eta \), a, \(A_n\), \(C_h\), and \(x^h_{n,a}\) have the meanings already expressed above. \(\lambda _{cost}\) and \(\lambda _{PAR}\) are used to weight the impact of the minimization of each factor of Eq. 14, both having value 1 in the realized tests.

Each PSO was tested 10 times, using a swarm of 50 individuals and limited to 1000 iterations. The parameters \(\phi _1\) and \(\phi _2\) were both defined equal to 2.05. For both the LDW-PSO and the SPM-PSO, \(\omega _{max}\) equal to 0.9 and \(\omega _{min}\) equal to 0.4. For function \(C_h\), the TOU tariff was adopted so that the kWh between 6 pm. and 8 pm. is \(R\$ 0.50\). For the remaining hours the cost is \(R\$ 0.35\). The individual was considered as a vector of dimension 2880, which represents 40 loads/appliances for 3 residences in 24 h of the day.

In the subsequent analysis, only the best result of each PSO will be considered among all the tests performed. Table 1 presents the summary of the obtained results.

The Fitness line represents the final value obtained for the objective function, the Cost line is the amount paid for the energy consumption (first term of the objective function), Peak Consumption line is the quantity of load (in kW) scheduled in the peak, i.e., for the second term of the objective function, and finally the line PAR is the ratio between the maximum and average demands.

Table 1. Summary of the performances reached by each PSO algorithm.
Fig. 1.
figure 1

Optimized load profile obtained by the algorithms: (a) classical PSO; (b) LDW-PSO; (c) SPM-PSO.

As can be seen, SPM-PSO presented the highest efficiency in relation to the objective function, resulting in a Fitness of 23.526. In contrast, the classical PSO and LDW-PSO reached 28.675 and 28.901, respectively. Separating the first and second terms of Eq. 14, it is possible to obtain the total Cost and Peak Consumption for a period of 24-hours. In this sense, the SPM-PSO presented light reduction of the cost of energy consumption. However, the energy consumption for peak times was drastically reduced by using the proposed SPM-PSO when compared to the alternative approaches. Thus, it is important to mention that this reduction is expected by utilities in order to relieve the load of the power grid. This behavior is evident in Fig. 1, which shows the optimized load profile of the best solution obtained by the classical PSO, the LDW-PSO and the proposed SPM-PSO, where the red vertical lines delimit the period where the energy presents high costs (peak times).

Fig. 2.
figure 2

Convergence analysis of each PSO (classical PSO, LDW-PSO and SPM-PSO).

Fig. 3.
figure 3

Optimized individual residence consumption planning.

Regarding the convergence of the best solution found by each algorithm (Fig. 2), SPM-PSO presented an advantage over all the others, since the stochastic mechanism acts to distribute the loads for periods in which the energy has the lowest cost, avoiding peak times. It is worth mentioning that the proposed stochastic mechanism is used in the initialization of the swarm. This choice is justified by the need to measure the impact of this mechanism on the convergence process of the algorithm within feasible search space, i.e., the objective is to verify if the proposed mechanism is efficient in the context of the analyzed problem. Thus, this result corroborates with [9], since the classical PSO and LDW-PSO algorithms are susceptible to have structural bias, necessitating strategies to mitigate such undesirable effect, especially in the case of the DR problem, which fitness has strong correlation with an external function (energy tariff \(C_h\)).

Therefore, based on the best solution obtained by SPM-PSO, it is possible to observe the optimized daily load profile for each residence (Fig. 3).

The residences have optimized plans that are different from each other, having as a common characteristic the avoidance of energy consumption at times when the tariff presents the highest cost, respecting the individual preferences of the consumers. Therefore, the precepts discussed in this paper are evidenced in Fig. 3, in which SPM-PSO optimizes load scheduling efficiently in face of energy price variations.