1. Introduction
Today, power system operators face issues such as significant load changes, rapid demand growth, and the geographical expansion of customers. On the other hand, due to the reduction of fossil resources, low energy efficiency, and environmental policies, investors are reluctant to build fossil fuel power plants and a new challenge has arisen involving the use of power generation resources to operate the power system. Therefore, these problems have increased the tendency to generate power at the distribution voltage level. Therefore, the appropriate solution is to build small networks independent of the main networks or microgrids [
1,
2].
The optimal operation of power systems requires the use of proper planning, which is mainly conducted in three sections: long-term planning, medium-term planning, and short-term planning. Microgrids also have been planned in these three intervals. In long-term planning, each microgrid must anticipate the purchase and installation of generators by the load growth forecast. Medium-term planning should take into account repair times, the maintenance of generators and storage, and fuel costs. Short-term planning for microgrids is done in one week, one day, and one-hour intervals, and the purpose of doing so is to determine the output power of the units [
3,
4].
In a microgrid, the energy management system is responsible for the optimal operation of the microgrid in the presence of programmable distributed generation (DG) units, probabilistic DG units, interruptible loads, energy storage units, and final consumers as the central core [
5]. In [
6], the operation of microgrids equipped with renewable resources and power storage resources is investigated. In [
7], a smart microgrid is used and it is shown that the use of a smart microgrid not only increases energy efficiency but also enables a complementary and effective network that can improve reliability and power quality. In [
8], it is shown that by installing suitable energy storage, changes, and fluctuations, the active power can be stabilized and the microgrid frequency can be maintained within the specified limit. In [
9], a microgrid equipped with the energy management center system is introduced, whose task is to optimize the operation of the microgrid in both island and grid-connected modes. In [
10], which focuses on an important criterion of meeting the power demand with the minimum operating cost, the use of an optimal combination of the main grid and microgrid with a 24-h planning horizon is introduced. In [
11], economic planning is used for production and load, which requires management of the demand side. In [
12], a market strategy is described, because with the increasing expansion of small sources of energy generation the production planning of small units acting as large generation units necessitates such a market strategy.
In [
13,
14], a Fuzzy-PSO self-adaptation algorithm for power flow in a specific microgrid is presented considering economic and environmental issues. The results indicate that with the high participation of renewable resources, the reduction of pollution and microgrid costs is serious and the energy exchange between the microgrid and the network connected to it has many benefits. In [
15], the authors provide a multi-agent system for smart energy management on the demand side for microgrids, which includes predictive algorithms to improve system management. The simulation results show that the smart demand-side management system has met all the design objectives and has also led to the effective operation of boundary conditions in the microgrid. In [
16], PSO applications for real-time energy management solutions for hybrid systems are presented and the results show that the proposed method can combine a wide range of solutions to integrate many objectives such as reducing costs, increasing wind turbine efficiency, and reducing environmental pollution. The management of microgrid units requires an accurate economic model to describe the operation costs of generating power. This model continues to be discrete and nonlinear; therefore, a strong and effective optimization tool is needed to reduce operating costs to a minimum. Various algorithms have been used to solve such models. For example, in [
17], the problem of optimal microgrid management based on the flexible load shaping DSM strategy as well as the price-based and incentive-based demand response programs is solved through the Black Widow Optimization algorithm. In [
18], the fmincon interior-point algorithm is used for the optimal operation of the microgrid consisting of photovoltaics with a diesel generator under the probabilistic scenario. In [
19], the authors provide a real-time predictive control model to minimize the cost of operation of the microgrid under uncertainty. Further authors discuss the application of algorithms in these references: in [
20], a Quantum Particle Swarm Optimization algorithm is discussed; in [
21], four heuristically guided optimization algorithms; in [
22], a self-crossover genetic algorithm; in [
23], a two-level genetic algorithm to solve microgrid energy management problem has been implemented.
In this paper, by developing common methods in the operation of the power system, and by considering the appropriate constraints, the problem of optimal operation of microgrids along with demand-side management has been formulated. The objective function is to minimize operating costs and demand-side management costs, and the constraints of optimization include constraints on generators and constraints on power balance. Also, the amount of load shifting in terms of hours has been considered a problem variable, and to solve this optimization problem, a combined genetic algorithm and ABC have been used. The following is the division of the article: In the second part, the demand side management is introduced, in the third part, the objective function of the problem and the formulation method is defined, and in the fourth part, the problem-solving method is presented and in the fifth part, the simulation results of the proposed method are shown, Finally, a conclusion is presented in the sixth section.
2. Demand-Side Management
Demand-side management generally refers to programs that affect the electricity consumption pattern of subscribers. In other words, some activities are designed by electricity companies to change the amount of time of electricity consumption in a way that provides the necessary opportunity to benefit consumers and even themselves. In general, demand-side programs consist of two main parts.
Optimal energy efficiency: The goal of these programs is to reduce energy consumption permanently, which is usually provided by changes in technology and equipment of the final consumer [
24,
25].
Demand response: These programs are one of the new developments in the field of demand-side management, which means consumer participation in improving the pattern of energy consumption. This partnership is in response to instantaneous price changes [
26,
27].
Today, these programs are considered a suitable solution to solve some problems of the deregulated power system. By definition, demand response is the empowerment of industrial, commercial, and residential customers to improve the pattern of electricity consumption to achieve reasonable prices and improve network reliability. In other words, demand response can change the form of electrical energy consumption in such a way that the system load peak is reduced and consumption is shifted to non-peak hours [
28]. In general, demand response methods can be divided into two general categories, which are: electricity price-based demand response programs, and incentive-based demand response programs, and
Figure 1 show the classification of demand response programs.
In this paper, among the various demand-side management programs, the load shifting program has been used to reduce peak load and increase network load during low load hours (ie de-peaking and filling the valley). There are also restrictions on the shifting of consumption time for each of the loads. Because consumption time-shifting causes customer dissatisfaction, in this paper, an inconvenience function is used to consider the cost of load shifting.
3. Formulation of the Problem
Optimal unit generation planning is formulated as an optimization problem. In the optimal operation of a microgrid, on the one hand, the lowest cost is considered and on the other hand, operation constraints and demand-side management constraints must be considered. In this issue, the total generation costs and costs of implementing demand-side management are considered in objective functions. Therefore, the objective function of the problem of optimal operation of microgrids can be defined as Equation (1) by considering the demand-side management [
29].
where
F is the total operating costs of the microgrid,
CF is the total operating costs of the power generation units, and
DC is the total cost of implementing the demand-side programs. The coefficients
w1 and
w2 are the weight coefficients of the cost of operating the network and the cost of implementing demand-side management programs, respectively. If these two coefficients are considered as one, the value of operation cost and demand-side management cost are considered the same. But if the goal is to add more value to consumption management programs, the weight factor
w2 can be considered larger [
30].
The execution of the use-time shift program causes dissatisfaction among the subscribers. Therefore, the cost of implementing the load shifting program in this paper is modeled as an inconvenience function as a third-degree function according to Equation (2)
where
l is the numeral of loads that can be shifted and the coefficients
A,
B and
C are related to the cost of shifting for that load.
stl is the number of hours of load
I shifting and
m is the total number of shiftable loads. Operating costs of generation units include generation costs, starting costs, and maintenance costs. Also, because in the microgrid it is possible to buy or sell energy to the network, the cost of buying and selling energy from the network is included in the operation cost function. Equation (3) shows the
CF operation cost function in the optimization problem [
31].
where
C(
i,
t) is the cost of generating power of unit
i at hour t of operation,
MC(
i,
t) is the cost of maintenance and
SC(
i,
t) is the cost of starting unit
i at hour t. Also,
C(
t) is the cost of electricity purchased at hour t is from the grid, and
R(
t) is the revenue from energy sales at that time.
I is the number of power generation units and
T is the study time (
T = 24) in terms of the hour. Here
I can include a variety of generation units such as photovoltaic (PV) cells, wind turbine (
WT), microturbine (
MT), fuel cell (
FC), and battery (
Bat) with a different cost functions. The model used to calculate the wind turbine output power in terms of wind speed according to Equation (4) is:
where,
: rated power of wind turbine,
Vci, and
Vco: minimum and maximum allowable wind speed;
Vr and
V: are the nominal speed and the actual speed of the wind, respectively. The coefficients
a,
b and
c are obtained according to the catalog information of the existing device. The power generated by solar cells depends on the intensity of light and ambient temperature, which is obtained according to Equation (5):
where,
: solar cell output power at ambient radiation intensity;
PSTC: Maximum cell generation power under standard test conditions;
: ambient light intensity;
: Radiation intensity under standard test conditions,
k: Output power temperature coefficient;
Tc: cell temperature,
Tr: reference temperature. Renewable sources of
WT and
PV generate electricity through wind and solar energy instead of fuel. Therefore, the fuel cost for these units will be zero. On the other hand, the investment cost of constructing these units is heavy and should be considered along with the maintenance costs in examining the microgrid status from an economic perspective. Accordingly, the total cost of
WT and
PV units is calculated using Equation (6):
where
: cost of renewable units,
AC: annual cost factor,
IInv: ratio of investment cost to generate power of the unit,
IM: unit maintenance cost.
The output power of the diesel generator (
DE) is controlled by the governor installed on it. The amount of diesel generator fuel consumption (L/h) as a quadratic function of generating power is as Equation (7):
where,
: diesel generator fuel consumption cost L/h,
: diesel generator output power;
α,
β and
γ are constant coefficients. According to Equation (8), fuel cell efficiency is the output power to the input fuel if both are calculated in the same unit.
where
: the cost of fuel consumed by a fuel cell (
$/h);
: the price of natural gas to feed the fuel cell (
$/kWh);
PFC: the output power of the fuel cell;
: the efficiency of the fuel cell. According to Equation (9), the economic model of a microturbine is similar to a fuel cell, except that the efficiency of the microturbine increases with increasing power.
The cost of electricity purchased
C(
t) and sold
R(
t) (Equation (3)) is expressed through Equations (10) and (11).
is the tariff for purchasing electricity from the grid,
is the power purchased from the grid,
is the tariff for selling electricity to the grid and
Psp is the power sold to the grid. The cost of repairing and maintaining units is directly related to their power generation. Therefore, the cost of repair and maintenance of unit
i at hour t is expressed as Equation (12).
where
is the cost of repair and maintenance of unit
i per kW of electrical power and
is the output power of unit
i per hour
t. The starting cost is intended only for fossil fuel generation units. Given that the starting cost is only attributed to each period that the unit is turned on, how to calculate the starting cost of unit
i at hour
t is given in Equation (13).
where
is the starting cost of unit
i and
is a binary variable that indicates the status of unit
i is on or off at hour
t. Equality constraints in the problem are the power balance constraint (power flow equations) shown in Equations (14) and (15).
Inequality constraints include unit output power constraints, control variable constraints, line power constraints, and voltage constraints, which are expressed in Equations (16) to (19), respectively.
The shifting time of each load is also considered in the demand response program as a constraint according to Equation (20).
where
Tl is the permissible time to shift the load
lth.
If the load shift time is known, the optimization problem presented in this section will become an optimal power flow (OPF) problem. By solving the OPF problem, the power generation of each unit and the power received and sent to the global network will be calculated. In this paper, the ABC algorithm is used to solve the OPF problem. Therefore, in the next section, the combination of genetic algorithm and ABC has been used to solve the problem of optimal operation in general.
4. Proposed Hybrid Algorithm
In the proposed algorithm, a combination of the ABC algorithm (to solve OPF) and the genetic algorithm is used to solve the problem of optimal operation of microgrids with demand-side management. As you can see in
Figure 2, the optimization problem space has different dimensions, and due to the dependence of the problem on different parameters, in this article, we have tried to avoid reducing computational accuracy and increasing computational speed instead of using an algorithm to solve the problem (which caused complexity) used a combination of ABC and GA algorithms to solve the problem. So that by solving the OPF problem by the ABC algorithm and transferring the output of the algorithm to the GA algorithm, the problem of optimal operation of the microgrid can be solved with better speed and accuracy.
The ABC algorithm is based on collective intelligence. This algorithm simulates the behavior of a bee collecting food. In the real world, bees live in densely populated colonies, creating a complex social organization. This algorithm uses three types of bees (employed bees (forager bees), onlooker bees (observer bees), and scouts bees) that continuously improve the answer. Initial production of all candidate responses is done by scouts bees (the initial population is randomly generated). After that, food nectar is used through the coordinated behavior of all types of bees. Bees from every generation search the space and find food sources of different qualities. Observer bees take advantage of search space near better food sources. Bees with depleted food sources are randomly produced in the scout’s bees phase. These continuous cycles of exploration and exploitation lead to one of the following two situations: (1) the final answer can no longer be searched; (2) food resources have been depleted.
Table 1 shows the concepts and parameters of the ABC algorithm.
The steps for implementing the ABC algorithm are as follows: The first stage is the production of the initial population. In such a way that for each bee we have like
m and every dimension like
i will have:
In the second stage, the employee bee activity begins. In this case, the entire search space is checked. So for every bee-like m and every random dimension like
i and a random bee-like
k:
According to Equation (22), the employee bees go to their food source and choose a new food source in the neighborhood to the previous food source, and according to Equations (23) and (24), after the new position of the employee bee m feed source is obtained, the value of the fitness function (objective function) is recalculated for it. Now if the value of the fitness function for the new answer is better than the previous answer, the previous answer is discarded and the new answer replaces it. Otherwise, the previous answer is preserved.
Next step observer bees randomly select a food source to search. Here the probability of selection of each food source by the observer bees is calculated by Equation (25). The lower the fitness function for a food source, the more probability it is to be selected.
After each of the observer bees selects their desired food source from the food sources of the employee bees, they fly to it and select a new food source in their neighborhood. Equations (22) to (24) is again used to evaluate the value of the fitness function for the new position of the observer bee food source. If the new response value of the fitness function is better than the previous response, it is replaced, otherwise, the previous response is preserved.
Another phase of the ABC algorithm is the presence of scouts bee, which allows you to search for new positions instead of where they can no longer be searched. That is, for each bee m, if its performance does not improve, use Equation (21) to reconstruct it and repeat the process until it reaches the best position.
In this paper, a combination of GA and ABC algorithms is used to improve the speed and accuracy of problem-solving. Part of the problem space, OPF, is solved by the ABC algorithm, and its optimal response is considered as GA algorithm genes. In this method, the disciplines (chromosomes) of the GA algorithm consist of two parts. The first part includes the amount of shifting of each load in terms of hours and the second part includes the optimal response received from the ABC algorithm.
Figure 3 shows an example of the disciplines of the GA algorithm. The first part of this discipline has m cells, which is the number of manageable loads. In each cell, the numbers are between 0 and 24, which indicates the shifting of the load (st) in terms of hours. The cells of the second part will include the minimum generation cost and generation power of the units.
Figure 4 shows a flowchart of the proposed algorithm. In this algorithm, the initial guesses for the shifting of the load in terms of hours are determined randomly. Then, by receiving the network information, the OPF problem is formed and solved through the ABC algorithm. By solving the OPF problem, the optimal amount of unit production is calculated, and also by knowing the number of hours of shifting each load, the cost of shifting the load is calculated and the disciplines of the genetic algorithm are formed. Once these two costs are known for each GA discipline, the objective function and the amount of the fitness function of that discipline are determined. Next, the disciplines that have a higher value from the point of view of the fitness function are selected and genetic operators, including the crossover and mutation operators, are applied to those disciplines. This process is repeated until the final answer is reached. The condition for stopping the algorithm is not to change the answer for a large number of iterations.