1. Introduction
A microgrid [
1] is a low-generating and low-distributing power system composed of distributed generators, loads, energy storage systems, electric vehicles, protection devices, and control devices. Generally, renewable energy, such as solar and wind energy, is the main generating unit in a microgrid [
2]. However, the output from solar and wind energy sources tends to fluctuate [
3] and is often intermittent [
4]. To make better use of these unstable renewable energy units, the optimal power dispatch of a microgrid is necessary [
5].
The optimal power dispatch of a microgrid involves coordinating the power generation from sources such as wind turbines, PV systems, and micro-turbines, along with the charging/discharging cycles of energy storage systems and electric vehicle batteries, to achieve objectives such as minimizing operational costs [
6] or optimizing economic and environmental impacts [
7]. Through the optimal dispatch to a microgrid, surplus solar and wind energy are stored in the batteries, which may have prospects in smoothing and stabilizing the power output of photovoltaic systems, peak load shifting, operating reserves, and improving power quality [
8]. The energy stored in batteries is released when solar and wind energy is deficient, such as at night, on cloudy days, and in a high-load period. The dispatch of a microgrid contributes to meeting the demand of loads in 24 h and makes better use of renewable energy [
9].
The optimal power dispatch problem of a microgrid is a complicated constrained optimization problem and requires effective solution techniques. Traditional programming techniques such as MILP [
10] and stochastic programming [
11] have been proposed as alternative techniques to solve the optimization problem of the optimal dispatch of a microgrid. However, the optimal power dispatch problems in microgrids are generally non-smooth and non-convex optimization problems that are usually hard to solve through traditional optimization algorithms [
12]. Artificial intelligence optimization algorithms have the ability to solve non-convex and non-smooth problems. Up to now, GA [
13], GPSO-GM [
14], modified PSO [
15], harmony search algorithm [
16], modified krill herd (MKH) algorithm [
17], improved quantum PSO [
18], SFO [
19], DE algorithm [
20], marine predator algorithm [
21], quantum adaptive sparrow search algorithm [
22], etc., have been employed to solve the optimal dispatch problem of microgrids successfully.
Among those artificial intelligence methods, the DE algorithm, consisting of the operations of mutations, crossovers, and selections, requires few control variables, is robust and easy to use, and converges fast [
23] for a non-convex and non-smooth problem. Benefitting from the above advantages, many DE algorithms have been employed to solve different optimal power dispatch problems in microgrids. Research in Ref. [
24] reformulated the nonlinear AC-DC OPF problem as an equivalent traditional AC OPF problem, and then a modified adaptive differential evolution algorithm was proposed to solve the non-convex AC OPF problem. Three soft computing techniques, viz. particle swarm optimization, differential evolution, and differential evolution with local–global neighborhoods, were used to perform a novel dynamic cost analysis of a microgrid and minimize its overall cost in Ref. [
25]. In order to solve the real-time scheduling problem of community MG, a heuristic-based differential evolution (DE) algorithm was introduced in Ref. [
26]. Their case study shows that the DE algorithm can generate feasible solutions with lower computational effort. The dynamic scheduling of a combined heat–power islanded microgrid with RES and energy storage was presented in Ref. [
27], and a fuzzy attainment module was integrated into the modified differential evolution algorithm with dynamic mutation rates to obtain the best solution for the scheduling problem. However, most past works simplified the constraints of power balance and neglected the power loss and voltage constraints. In fact, the operation of a microgrid must be carefully controlled in order to prevent abrupt voltage fluctuations that stem from the sensitivity of voltages to variations in power injections, node over-voltages and under-voltages, and drops in the power factor [
28]. As explained in Refs. [
29,
30], voltage stability plays an important role in power system operations. Therefore, power flow limits are advocated in this context to ensure the stability of voltage. Even though the importance of power flow constraints was emphasized in Refs. [
31,
32], they focused only on a specific time interval and ignored the coordination among different periods. But it is necessary to consider it over multiple periods because the states of charge (SOC) of batteries are relevant to their last SOC, and power flow distributions are period-coupling. Although the power flow constraints and the detailed network structure were considered in Ref. [
6], the population size of the employed evolutionary algorithm is too large to conceal their influences on the increasing computational time.
In fact, solution techniques to optimal power dispatch problems for microgrids have always attracted scholars’ attention, particularly in recent years. On the one hand, the consideration of coordinating the power dispatch among multiple periods, as well as the complication of a transmission network, makes the optimal power dispatch problem more complex. On the other hand, the rolling horizon scheduling proposed by the research in Refs. [
33,
34], which was proposed to handle the uncertain nature of the power sources and load, put forward higher requirements for solving the scheduling model. The effectiveness of small population sizes in decreasing computational time has been verified in Refs. [
35,
36,
37,
38], but it may obtain bad solutions for intricate optimization problems due to its easily damaged population diversity. Hence, reducing the computational time needed to solve such an optimal power dispatch problem is still very challenging. Decreasing the population size and implementing the parallelization of the evolutionary algorithm may be an alternative way to balance this contradiction. In the parallelization of the evolutionary algorithm, the large main population, which is employed to enhance the population diversity, can be divided into several populations, each with a smaller size, and then each smaller population can be used to search for the optimal results independently and concurrently. Both the computational time, which depends on the small population size, and the population diversity, which depends on the total population, will be improved. In these circumstances, the contradiction between computational time and the precision of solutions will be resolved. Of course, it will occupy more memory space and CPU cores. Fortunately, hardware costs have become lower with the development of manufacturing technology for CPUs and ROM/RAM.
It should be noted here that many significant research efforts have been dedicated to exploring parallel implementations of differential algorithms. These efforts encompass three principal methodologies: CPU-driven parallelism [
39], GPU-accelerated parallel implementations [
40], and hybrid parallelization frameworks [
41]. GPU implementations achieve paradigm-shifting speedups in evolutionary computation for data-parallel, large-population scenarios. However, their efficacy is contingent upon co-designing algorithms with hardware constraints, mitigating memory access contention, and PCIe transfer overheads. In contrast, CPU or heterogeneous CPU-GPU frameworks maintain advantages for fine-grained, decision-intensive problems, where branch divergence degrades GPU throughput. In this study, we concentrate on parallel computing approaches utilizing CPU architectures. The main contribution of this work is outlined as follows.
(1) An improved parallel differential evolution (PDE) approach is proposed for optimal power dispatch in microgrids, accounting for power flow limits. The proposed PDE approach is developed based on the message-passing interface (MPI) standard [
42] in order to reduce the computational time and obtain a good solution.
(2) The PDE approach splits the main population into several smaller populations, and each small population performs the mutation operation and crossover operation in different CPU processes independently at the same time. The computational time of the DE algorithm using a small population size is less than that of a large population. As a consequence, the PDE algorithm will spend less computational time compared to a traditional serial DE algorithm.
(3) The gather and scatter operations are also employed to ensure the preferred population diversity. In the gather operation, the small population of each process is gathered to the root process after some given iterations, and these gathered individuals will perform the operations of the mutation, crossover, and selection to enhance the population diversity. Then, the gathered population will be scattered into several small populations again to perform a mutation and crossover in different processes.
(4) Some other improvements on the mutation, adaptive parameters, and the introduction of a migration operation are also implemented in order to find the optimal solution quickly and generate superior vectors in a more effective way. The feasibility and effectiveness of the proposed PDE approach are verified and evaluated through two test microgrid systems.
The remaining part of this paper is structured as follows.
Section 2 introduces the problem formulation for the optimal power dispatch problem in a microgrid.
Section 3 briefly reviews the traditional differential evolution algorithm. The proposed PDE algorithm based on an MPI standard is proposed in
Section 4.
Section 5 introduces the improvements of the PDE algorithm for optimal power dispatch in a microgrid.
Section 6 provides numerical results, and
Section 7 concludes.
3. Brief Overview of Differential Evolution Algorithm
The differential evolution (DE) algorithm, a heuristic approach for minimizing potentially nonlinear and non-differentiable continuous space functions, was proposed by Rainer Storn and Kenneth Price in Ref. [
23]. It comprises the operations of initialization, evaluation, mutation, crossover, and selection, offering advantages such as requiring few control variables and exhibiting robustness. Consider a population size of
N and a variable dimensionality of
D; the
i-th individual at the
t-th generation is denoted by Equation (13). The subsequent section details the steps of the traditional DE algorithm, several of which are incorporated into the PDE algorithm.
Step 1: Initialization: the initial population of the algorithm is randomly generated in the range of
to
and the initial population is expressed as (14). The boundaries of these variables are expressed as Equations (15) and (16).
Step 2: Calculate the fitness function value of each target vector in the current population.
Step 3: Mutation: For each target individual
i = 1, 2, …,
N, three mutually different integers (i.e.,
are first generated randomly. It should be noted here that four numbers (i.e.,
) are different from each other. Then, mutant vector
for the
i-th target is generated according to Equation (17).
where
F is mutagenic factor and it is generated randomly between [0, 2]. If
is not in the limited range, set
, where
rand(0,1) is a random number
.
Step 4: Crossover: Generate trial vectors for all target vectors, and the
j-th dimension value of a trial vector is formed by mutant vector
and target vector
according to Equation (18). Here, an example of the crossover operation for 5-dimensional vectors is given in
Figure 1 to help understand the crossover mechanism.
where
is a random number
,
is a randomly chosen index
, and
is the crossover constant
.
Step 5: Selection: The
i-th vector of next generation is chosen from the trial vector
and the original target vector
using the greedy criterion according to Equation (19). Within the selection operation described by (19), if the fitness value of trial vector
is smaller than that of
,
will be one vector of the next generation. Otherwise,
will still be a member of next generation.
Step 6: End condition: if the given iteration number is reached, the optimal solution is outputted, and the algorithm will end. Otherwise, go to Step 2.