1. Introduction
With the rapid development of the national economy, demand for fossil fuels is increasing. However, the output of traditional energy is limited, and the utilization of renewable energy has become the general trend. As new energy sources, wind and light are widely distributed and can be permanently used. They are characterized by low cost and strong environmental protection. Nevertheless, there are considerable random fluctuations of output power due to natural conditions, which affect the security and stability of the power system after grid connection [
1,
2,
3]. Therefore, designing a stable and low-cost scheduling strategy based on the structure of the wind–photovoltaic-storage electric vehicle complementary power generation system has become a key issue. By coordinating wind–photovoltaic and flexible devices, we can ensure the reliability of the system, improve the economy, and increase environmental friendliness [
4,
5].
In the process of modeling, parameter uncertainty becomes a significant problem that threatens system security with the increasing scale of the microgrid. In order to solve this problem, robustness becomes one of the parameters worthy of study [
6,
7]. The improvement of robustness can make the system maintain its balance when it is disturbed, thereby reducing the loss caused by disturbances [
8]. Meanwhile, some other power consumption units are introduced, such as electric vehicles (EVs) and fuel cells, on the basis of wind–photovoltaic-storage microgrid architecture, which can ensure the system maintains a stable operation by interacting power with other components when it is impacted [
9,
10]. In terms of the objective function, some microgrid systems, including fossil fuels, need to be considered regarding carbon emissions to reduce the environmental pollution caused by them [
11]. Therefore, multi-objective functions combined with economic objectives and carbon emissions are established in recent studies. Furthermore, in order to ensure the normal operation of the microgrid system, it is necessary to ensure power conservation is met, and power flow constraints, including power flow calculation, should be added to the scheduling study [
12,
13]. Additionally, equipment parameters are important constraints to enable the system to operate under the superior performance of the equipment, thereby ensuring equipment safety and power quality.
In order to realize the scheduling strategy and accurately find the optimal value of the objective function, a variety of high-performance intelligent algorithm schemes based on biological habits are proposed, and verified in specific cases [
14,
15,
16]. Bionics algorithms, such as the flying sparrow search algorithm, flower pollination algorithm, and other heuristic algorithms, are proposed and applied to practical problems [
17,
18,
19]. Among them, as a new bionics algorithm, the mayfly algorithm (MA) has better optimization performance than the traditional intelligent algorithms. The integration of the advantages of various algorithms has significantly improved the optimization process in terms of speed and accuracy [
20]. However, when it comes to high-dimensional complex problems, it is still difficult to jump out of local optimal regions simply by relying on its own mechanism, and the convergence accuracy of the algorithm is not high enough because the step size of the mayfly is too short when it moves. Based on the above shortcomings, logistic mapping is used to improve the optimization ability of mayfly individuals [
21,
22], or the learning factor is changed to improve the degree of self-adaptation [
23].
In order to describe the research status of microgrid scheduling and its characteristics more clearly, the studies conducted for our paper, and other related studies, are summarized in
Table 1, which is represented as follows:
Through the above table, it can be seen that the robustness and stability of the system are studied by some scholars. In these studies, robust model predictive control (RMPC) and other methods are used to deal with the uncertainties of renewable energy. In the microgrid system containing fossil energy, reducing carbon emissions is also an important issue that needs to be solved to improve the environmental protections of the system. More studies focus on the microgrid system containing EVs, namely the EVs charging and discharging states, as well as the stability of the EVs themselves.However, it is also worth studying how to interact with the microgrid while ensuring its stable operation. Meanwhile, some studies are aimed at improved algorithms, which have been greatly modified in optimization rate, convergence, and escape from local deadlock; however, there is still room for further improvement. Therefore, the problems that are concentrated on in this paper are represented as follow:
(1) The EV is taken as one of the dispatching objects, and its interaction state with the microgrid is judged according to its SOC. The microgrid system is able to make full use of power in this measure.
(2) The QMA algorithm raised in this paper is compared with the moth–flame optimization (MFO), grey wolf optimize (GWO), particle swarm optimization (PSO), whale optimization algorithm (WOA), sine cosine algorithm (SCA), and MA to verify its advantages, and is applied to the solution of the objective function.
The rest of the paper is organized as follows: The structure model of the microgrid is established in
Section 2. Meanwhile, the scheduling strategy of each unit, as well as the objective functions with constraint conditions of economic dispatching regarding the microgrid, are established. In
Section 3, the operation rules of the QMA are analyzed, and the comparison between various intelligent algorithms is realized. The algorithms are combined with the objective function in
Section 4, and the economic scheduling of the microgrid in a specific area is carried out according to the actual situation.
Section 5 summarizes the content and contributions of this paper, and puts forward prospects for future studies.
3. Improved Mayfly Algorithm
3.1. Traditional Mayfly Algorithm
The MA is a bionics algorithm derived from the social behavior of the mayfly. Inspired by the movement mode and reproduction process of female and male populations, the optimal and suboptimal individuals in each population are selected. Meanwhile, the optimal offspring generation is obtained through mating between the optimal male and female individuals, and the suboptimal offspring generation is obtained in the same way. The direction of movement of each mayfly is influenced by the dynamics of individual and collective optimal positions, and female mayflies target male mayflies towards their positions.
a. The movement of male mayfly
The flight mode of male mayflies is similar to the movement mode of birds in a particle swarm algorithm, and the direction and distance of male mayflies are adjusted according to their own flight experiences and that of individuals around them. The specific method is shown as follows:
where
and
are the current position and speed, respectively, of the male mayfly
i on the
nth search. The values are calculated as follows:
Because male mayflies perform a dance on the surface of water to attract females, the position of the male mayflies is constantly changing, meaning they do not build a high speed.
is the speed of the
nth search of the mayfly
i at
j dimension, and
is the position at that time.
and
are estimated from the positive attraction coefficients of social interaction, and
is the visibility coefficient of the mayfly. Meanwhile, the optimal locations of the individual and collective mayflies are expressed as
and
, respectively. Additionally, the distances from current position to
and
are defined as
and
, respectively, and are calculated as follows:
For the best mayfly in the population, a fixed dance pattern is needed to be maintained. Meanwhile, a random element is introduced to ensure that the speed is constantly changing. The calculation is described in this case as follows:
where the dance coefficient is simplified as
d, and
r is the random natural number within [−1, 1].
b. The movement of female mayfly
The movement of the female mayfly depends on the attraction of the male mayfly, and their position renewal depends on the increase of speed, which can be expressed as follows:
The speed update is a certain process, which means that in order to ensure the quality of offspring, the best female needs to be attracted by the best male, the second-best female by the second-best male, and so on. The speed update expression is given as follows:
where the position of the female mayfly is expressed as
, the random walk coefficient of the female mayfly is represented as
g, and
is determined by the distance between the male and female mayflies.
c. The mating of male and female mayflies
In the process of parent mating, the optimal and suboptimal individuals in the male and female populations should be selected for mating and reproduction based on their fitness functions. The results of interbreeding, which produces the optimal and suboptimal offspring, are calculated as follows:
where the male and female in the parent generation are represented as
m and
, respectively, and
L is a random natural number within a specific range.
3.2. Ma with Quantum Idea
The traditional MA can find the optimal value in a single-peak function accurately by taking advantage of the characteristics in mayfly reproduction. However, with regard to the large population and complicated process, the search speed is slow and the convergence is not fine. Meanwhile, it is easy to fall into local deadlock when dealing with multi-peak functions. Therefore, the quantum idea is introduced on the basis of a traditional MA, thereby forming the QMA. Because the position and velocity of the mayfly cannot be determined simultaneously in quantum space, the wave function is used to represent the position of the mayfly, and the Monte Carlo method is used to solve the problem. The particle update expression is shown as follows:
where the numbers of individuals and iterations are represented as
N and
n, respectively.
is the average historical optimal position of the male mayfly, and
is obtained from the updated position of the
ith male mayfly in the
nth iteration.
r and
a are uniformly distributed values within (0,1), and
c is the final random motion parameter.
The execution steps of the QMA are given as follows:
Step 1: Initialize the positions of the female and male mayflies in the space.
Step 2: Calculate the average optimal location
of the male mayflies according to the first equation of (
21).
Step 3: Calculate the fitness value and sorting according to Formula (3), and compare with the previous iterative value. If the current function value is less than the previous iteration, the current mayfly position is updated for the individual optimal position, otherwise it keeps the previous iteration. Hence, the optimal male individual and collective locations are obtained.
Step 4: Calculate the new positions of the female and male mayflies according to Formula (
18) and the second equation of (
21), respectively, and mate in sequence.
Step 5: Calculate the fitness function and update and .
Step 6: Repeat Step 2 to 5 until the stop condition is met.
The QMA flow chart is shown in
Figure 4.
3.3. Performance Analysis of Qma
In order to verify the superiority of the QMA, the single-peak and multi-peak functions are tested by MFO, GWO, PSO, WOA, SCA, MA, and QMA in this section. We combine the biological habits and existing literature on each algorithm, and the initialization parameters and test functions are shown in
Table 2 and
Table 3, respectively. Meanwhile, to ensure the effectiveness of the comparison results, the number of biological populations in all bionics algorithms is set as 10. The function expression is represented by
Fun, and the expression dimension is expressed as
Dim.
and
are the upper and lower boundaries of the variables, respectively.
Sphere function is represented as F1, which is a typical single-peak function. The optimization time and local search ability of the algorithm can be effectively verified in this type of function. The Rastrigrin function is simplified as F2, and the validity of breaking away from local deadlock in the algorithm can be proved in this multi-peak function. The performances of different optimization algorithms in solving these two functions are expressed in
Table 4. The iteration curves of these functions run once are shown in
Figure 5 and
Figure 6.
As can be seen from the Figures and Table, the average value, variance, and standard deviation of the different algorithms after 30 iterations in solving functions are different. The optimal value can be found quickly in the WOA, MFO, and GWO algorithms once they get rid of local deadlock when solving multi-variable functions. However, it is easy for them to fall into a local optimum, which is greatly affected by the number of iterations and randomness. Hence, it is not suitable for these algorithms to solve such functions. Compared with the SCA, PSO, and MA algorithms, although the convergence speed is not fast as the above algorithms, the rate is stable, and it is not easy to get into local deadlock. They have good performance in solving multi-variable lower-power functions, and MA has the most stable optimization rate among them. On the basis of MA, the stability of optimization is improved further in the QMA, and the optimal solution of the objective function can be found better in it. In the function where the optimal value is zero, the optimal value found by the QMA in the optimization process is lower than other algorithms, and the performance is more stable with little variance. In the scheduling problem of the microgrid, many variables are obtained in an economic objective function, and the stability of optimization is needed to ensure this. Hence, it is suitable for the QMA to find the optimal value of the economic scheduling function based on the microgrid established in this paper.
4. Simulation Analysis of Microgrid
Entering into cooperation with an enterprise, a typical winter day in the region where the enterprise is located is taken as an example to make economic scheduling. The actual data, such as wind–photovoltaic power and residential electricity consumption obtained from enterprise, are input as empirical values. Based on the economic scheduling objective function of the wind–photovoltaic-storage electric vehicle microgrid established in
Section 2, the QMA and MA algorithms are used to solve it. The algorithms are invoked, combining with the microgrid economic objective function, and the number of the population in the algorithms is set as 100 after several simulations. In this condition, the objective function the algoriths can commendably solve the problems regarding optimization speed and convergence. Hence, the output power of each unit within 24 h is obtained. The output empirical values of wind and photovoltaic generation collected from enterprise are expressed in
Figure 7, and the empirical values of residential electricity consumption are shown in
Figure 8.
Under the load conditions, the optimization algorithms are used in this paper to find the minimum output cost under the condition of maintaining the security and stability of the system. Combined with empirical data obtained from the enterprise, the status of various components in the microgrid and the equivalence coefficient are shown in
Table 5 and
Table 6. The related parameters of the time-of-use price are shown in
Table 7.
When MA and QMA are used to solve the objective function, the SOC of the battery and EV are shown in
Figure 9 and
Figure 10, respectively. The recharging of the battery is represented as an increase in SOC; otherwise, the battery delivers power to the grid. When the SOC of the battery is between 0.3 and 0.7, it can maintain its operation in the best condition. Taking
Figure 10 as an example, when QMA is used to solve the system objective function, the battery is charged in three time periods: 1:00–2:00, 15:00–16:00, and 23:00–24:00. Meanwhile, discharge is performed in four time periods: 10:00–12:00, 14:00–15:00, 18:00–19:00, and 20:00–21:00. The rest of time, the battery remains neither charged nor discharged. Furthermore, if there is more than one EV in the area, their SOC is not continuous with great fluctuations, and they can operate normally when the SOC is within the range of 0.3 to 0.7.
The output of each unit when MA and QMA solve the objective function is represented in
Figure 11 and
Figure 12, respectively. The load power curve is the absolute value of consumed power.
Abundant power is generated by wind turbines within 0:00 to 4:00, and the microgrid consumes redundant power by interacting with the main grid. From 4:00 to 11:00, the output power of wind–photovoltaic generation and EVs supplies power to load; meanwhile, the redundant power is consumed by the main grid. From 11:00 to 16:00 is the peak period of electricity consumption. During this time, almost all power generation is used to maintain the power required by load. The load demand gradually decreases from 16:00 to 18:00 and reaches the peak again from 18:00 to 21:00. In this period, wind generation and EVs are in a power output state, while photovoltaic generation occasionally outputs power, and the interaction with the main grid absorbs or transfers power to the main grid as the load requires. Finally, load demand drops from 21:00 to 24:00, and wind generation and EVs mainly send out power and feedback to the main grid.
When the output power is at 10% of its maximum capacity it is stored by the battery, and the wind–photovoltaic generation produces power according to the empirical value. The operation cost of the microgrid is shown in
Figure 13; furthermore, the operation cost of the microgrid obtained by solving the objective function using the scheduling strategy in
Section 2 is shown in
Figure 14.
The results of the value and standard deviation of MA and QMA after 100 and 500 iterations are shown in
Table 8. In terms of these results, the operating costs under the empirical value are higher than the costs after participating in scheduling according to the strategy. Moreover, the optimization rate of QMA is higher than that of MA, and the optimal solution found by the improved algorithm after 500 iterations is obviously better than the solution obtained before the improvement.
In summary, the scheduling strategy provided in this paper can effectively improve the economy of the microgrid system, and the improved QMA has a high level of superiority when solving the objective function.
5. Conclusions
According to the operation state of a wind–photovoltaic-storage electric vehicle microgrid connected to the grid in a certain area, a time-sharing scheduling strategy is designed in this paper; furthermore we established the minimum cost objective function according to economic requirements and constraints, such as wind and light abandonment. Meanwhile, a QMA algorithm is innovatively proposed and applied to the solution of the objective function. In summary, the main conclusions of this paper are expressed as follows:
- (1)
The SOC of the EV and battery is taken as a scheduling object, and it is scheduled in combination with the current period, thereby obtaining the interaction power between the flexible equipment and microgrid. Furthermore, the output power of wind and photovoltaic generation is limited within the empirical value and, accordingly, the energy waste caused by wind and light abandonment is reduced. This scheduling method not only reduces energy waste but also decreases the system cost by about 60%;
- (2)
On the basis of the MA, the quantum idea is introduced, and the QMA is proposed. Comparing the performance of the QMA with six other intelligent algorithms in typical functions optimization, the superiority of the QMA is clearly seen. Meanwhile, the QMA is applied to the objective function established in this paper. The cost of the system can be reduced by about 2%, which is considerable for the microgrid system.
In future research, new energy devices need to be taken into account, and the robustness of the system should also be paid attention to because of the increasing complexity of the system. Meanwhile, in order to make managers more intuitive, namely to understand the operation state of the system, the connection between information management and the physical layer should be strengthened. It is necessary to study the use of hierarchical scheduling, source and charge interactions, and other methods to meet the needs of different managers.