Research on optimal scheduling of microgrid based on improved quantum particle swarm optimization algorithm

INTRODUCTION: With the large-scale integration of new energy into the grid, the safety and reliability of the power grid have been severely tested. The optimized configuration of micro power systems is a key element of intelligent power systems, playing a crucial role in reducing energy consumption and environmental pollution. OBJECTIVES: a power grid optimization scheduling model is proposed that comprehensively considers the issues of power grid operating costs and environmental governance costs METHODS: Using quantum particle swarm optimization method to optimize the objective function with the lowest system operating cost and the lowest environmental governance cost. In order to improve the search ability of the algorithm and eliminate the problem of easily getting stuck in local optima, the Levy flight strategy is introduced, and the variable weight method is used to update the particle factor to improve the optimization ability of the algorithm. RESULTS: The simulation results show that the improved quantum particle swarm optimization algorithm has strong optimization ability, and the scheduling model proposed in this paper can achieve good scheduling results in different scheduling tasks. CONCLUSION: （ 1 ） The improved particle swarm algorithm, in comparison to itspredecessor, boasts a greater degree of optimization accuracy, aswifter convergence rate, and the capability to avoid the algorithm'sdescent into the local optimal solution at a later stage of the process. （ 2 ） The proposed model can effectively reduce users ’ electricity costs and environmental pollution, and promote the optimized operation of microgrids.


Introduction
With the establishment of the strategic goal of carbon neutrality and carbon peak, which will be accompanied by large-scale grid connection of new energy sources, the optimal configuration of micro-power systems is a key element of smart power systems, which plays a crucial role in reducing energy consumption and reducing environmental pollution.The optimal scheduling of microgrid is to properly distribute the output energy of DG and coordinate the transmission energy of microgrid and main network under the premise of complying with all the constraints of the system, so as to achieve multiple goals such as reducing operating costs, reducing pollutants, improving stability and increasing power generation benefits [1].For consumers, optimized scheduling of microgrids can significantly reduce their electricity bills.On the power supply side, through the optimal deployment of micro-grids, we can enhance the balance of the grid, reduce energy consumption and environmental damage in the power manufacturing process.Therefore, it is of great practical value to optimize the deployment of micro-grid.
At present, there are three main aspects of research on new energy: predicting the power generation of new energy and constructing scheduling models to optimize scheduling.
The development of intelligent algorithms has greatly improved progress in these areas [2] [3] [4].But in practice, the prediction accuracy of these methods can not meet the scheduling requirements of the system.Many scholars have conducted specific research on the scheduling model and strategy of distributed energy uncertainty.Dueas P etal.(2018) and Clegg S etal(2019)in references proposes a power system model with interactive optimal scheduling considering virtual power plants.Li Xinjun's (2023) constructed a multiobjective model of a gas-electricity interconnected virtual power plant, taking operating economic benefits and peakshaving and valley-filling effects as optimization objectives.Wang, SQ(2023) et al.established a multi-objective model considering EV charging and discharging strategy, taking the adjustment of operating cost and power fluctuation as the objective function, and verified that the proposed model has good scheduling capability.However, the above models all consider environmental pollution.Liang, HP et al. (2023) in order to achieve efficient consumption of new energy and reduce system carbon emissions, a new dual-layer lowcarbon optimal scheduling model of power system based on carbon emission theory and carbon tax as demand response incentive signal is established.Zou, Y(2019) et al. and Chen, J(2018) et al based on the optimization method of load forecasting and wind power output forecasting, a new gridconnected wind power generation model combining energy storage and daily operation is studied.A mixed integer programming model is set up for the benefit of the combined operation of wind power and pumped storage.The test results show that the cooperation between pumped storage power station and wind farm can greatly reduce the negative impact of wind power output randomness on power grid operation.Chen, X et al(2021) used stochastic programming methods to explore the complementary scheduling strategies of wind power generation and pumped storage in isolated island environments.However, the above article is mainly aimed at improving the complementary scheduling of micro power systems.As for the complementary optimal scheduling of large-scale renewable energy grid connection, there are few studies.Chen, S.; Xiao, JY.; Huang, YC et al. (2020).optimizes the minimum abandonment rate, minimum total operating cost and maximum benefit of pumped storage power stations.The above research work has achieved certain results in the optimization of wind power scheduling models and strategies, but there are few studies on the scheduling problem using BESS.Energy storage has become more and more important in today's society, as a means to smooth the wind gap power fluctuations, it can greatly reduce the harm caused by power fluctuations to the grid.Therefore, it is urgent to consider the research of wind and landscape optimization scheduling of BESS.
The optimization of resource scheduling usually needs to consider multiple objectives.The traditional methods such as linear programming, dynamic programming and large system decomposition and coordination can not meet the actual needs when dealing with the problems of multiobjective complex systems.However, with the progress of intelligent algorithms, intelligent optimization algorithms have gradually turned into a key tool to solve the power optimization scheduling model.Particle swarm optimization (PSO) is widely used among them.Particle swarm optimization algorithm has the advantages of simple structure, easy implementation, fast search speed and so on [12] , and has been applied by many scholars to the study of optimal problems.However, PSO algorithm is easy to fall into local optimal solutions, and in the face of multi-objective problems, the algorithm can not take into account both global and local optimal.For this reason, a large number of scholars have improved the PSO algorithm to meet the optimization needs.Zou, YQ et al. (2020) a nonlinear inertial weight decline strategy is proposed to optimize the PSO algorithm by using the niche idea, which improves the convergence ability of the algorithm.Cai, GA. et al. (2022) proposes an improved dynamic inertial weight particle swarm optimization algorithm, which can increase the diversity of the population in the early stage of iteration and avoid the algorithm falling into local optimality.Although the improved PSO algorithm can improve the defects of the original PSO algorithm to a certain extent, the PSO algorithm is not a convergence algorithm that can solve multi-objective problems and conforms to the global convergence criteria, and its global search ability depends very much on the setting of the upper limit of particle velocity [17] .In recent years, Sun Jun et al. proposed a particle swarm optimization algorithm (QPSO) with quantum behavior [18] .Compared with the traditional particle swarm algorithm, it eliminates the particle velocity attribute, has fewer parameters, and has faster convergence.LAI Choi-Hong et al.( 2019) uses benchmark function to test the performance of QPSO algorithm, so as to verify the superiority of this algorithm.Compared with the basic particle swarm algorithm, the performance has been improved in all aspects.To further improve the performance of the algorithm.Salimi, M et al.(2019) proposes to introduce different chaotic mappings into quantum particle swarm to increase the robustness of the algorithm.Zhang et al. introduced the variation operator of Gaussian distribution in the quantum initialization of position information to increase the diversity of the population.However, the improvement ideas of these methods focus on optimizing the population initialization process and preventing the algorithm from falling into convergence too early.The research on attractor and search range in the algorithm update criteria, which directly affect the position update speed, is not specific enough.
In summary, this article focuses on the operating costs and environmental protection costs of microgrid systems, and constructs an environmental protection and economic dispatch model for microgrids.Using an improved quantum particle swarm optimization algorithm to solve the optimization model.Firstly, Levy flight strategy is introduced to determine the random walk of iterative steps by using Levy distribution, and then the search space is more efficient by using larger jumps of particles.In addition, variable weight method is used to update the particle factor, which can get rid of the local minimum of the algorithm to a certain extent and improve the search ability.The simulation results show that the improved algorithm in this paper performs better than the original algorithm and currently popular optimization algorithms.At the same time, scheduling simulation analysis is conducted under different conditions to obtain different scheduling schemes that can meet the requirements under different regulations.

Basic particle swarm optimization
In a particle swarm optimization algorithm, with each potential answer to an optimization issue being a point in a D-dimensional search space, known as a particle, is the fundamental element of the algorithm.The particle traverses the search space at a specific velocity.A group of randomly generated particles, constantly adjusting its position and speed in response to individual and group flight experience, is the basis of the particle swarm optimization algorithm's search process.After multiple iterations, the optimal position is achieved.The standard PSO updates the particle's velocity and position in the search space in the following manner.
The running algebra, denoted by  , has a particle number, i = 1,2, n; n is the population size of particle swarm; and the dimension of the search space, D. The velocity of particle i in generation t is denoted by    = ( 1  ,  2  , … ,    ); the position of particle i in generation t is denoted by   = ( 1  ,  2  , … ,    ); and the Personal best position of a given particle,  best is the best position of the particle found thus far.The position of the most advantageous particle in the swarm,  best is determined by the inertia weight , which will have an effect on the local exploration and global development capabilities of the particles.Additionally, acceleration constants, c1 and c2, and random numbers, 1 and  2 , between 0 and 1 to maintain the diversity of the population, are also taken into account.The particle's flight experience is determined by its current position and the individual optimal position best , while the collective optimal position gbest is the result of the collective flight experience.

Particle swarm algorithm with quantum behavior
The standard particle swarm optimization algorithm can solve multi-peak and high-dimensional control optimization problems, but when dealing with multi-objective optimization problems,  best  is no longer unique, and the optimization result is not an optimal solution, but a Pareto optimal solution set.The computation amount is greatly increased and the stability is reduced, and it is easy to fall into local optimal.Therefore, PSO can not be directly applied to multi-objective optimization problems, and it needs to be improved.When the number of variables increases and the dimension increases, theoretically it cannot be called a global algorithm.Therefore, Sun Jun et al. introduced quantum behavior into particle swarm optimization (PSO) and proposed a new quantum particle swarm optimization (QPSO).In the optimization iteration, the algorithm abandons the velocity update as shown in equation (12) and only updates the position information of the particles.To ensure the convergence of the quantum particle swarm algorithm, each particle must be drawn to its own local attractor (also known as the center of the potential well), the definition of the attractor is as follows: Where  , represents the JTH dimension of the individual optimal position of the ith particle in the next iteration, which affects the evolution convergence trend of the particle in each iteration;  , represents the JTH dimension of the optimal position of the whole particle population;  ∈ [0,1].
QPSO algorithm introduces the particle behavior of quantum state, using a wave function Ψ(, ) to describe the particle's position state, and then solving the Schrodinger equation to obtain the particle's probability density function Q and probability distribution function D, and determine the probability of the particle appearing somewhere in the workspace: Where  , () represents the feature length between particles, which is used to determine the search range of particles, and calculated by equation ( 4) : Where   () = 1  ∑ =1   , () is a new parameter defined in the QPSO algorithm, representing the average optimal position of all particles at the  iteration. represents the contraction and expansion factor.So far, the specific position of the particle in space can be obtained by Monte Carlo inverse transformation method [19], and the position update equation is shown in equation ( 5): U represents random numbers evenly distributed from 0 to 1, and the equation is' + 'when u>0.5;When u<0.5 the equation is "-".
As can be seen from equation ( 4), factor a becomes the only parameter that needs to be controlled and adjusted in the algorithm process, and the previous particle movement no longer affects the particle's next position update, which makes it more random and improves the degree of swarm intelligence.Theoretically, the optimal solution can be found in the search space.Therefore, based on these characteristics, this paper improves and optimizes the particle search range of the QPSO algorithm to better coordinate the global and local search capabilities of the algorithm and ensure the algorithm has better convergence speed and solving accuracy.

F. Liu and P. Duan
Then, the improved QPSO algorithm is used to solve the inverse kinematics of the robot.

Improved quantum particle swarm optimization algorithm
As can be seen from equation ( 5), particle local attractor  , () and feature length  , () two key factors in the position updating process of QPSO algorithm, play a great influence, and  , () determines the direction of population evolution. , ()is used to determine the search range of the particle, and is determined by two factors: the contraction expansion factor and the optimal average position.Based on the above characteristics, this paper improves the QPSO algorithm in two aspects, so that the algorithm can continuously optimize and adjust the search amplitude and scope according to the actual situation during the operation of each particle, improve the accuracy and robustness of the QPSO algorithm, accelerate the overall convergence, and prevent the algorithm from falling into the local optimal solution.

Introducing Levy Flight Strategy
From equation ( 2), it can be seen that the center of the potential well of a particle is determined by the individual optimal of the current particle and the historical optimal of the current population.However, when the historical optimal value   falls into local optimal in the iterative process, due to the linear combination relationship between   and  , in the calculation formula,  , will also fall into local optimal, resulting in premature convergence of the algorithm.In order to solve such problems, this paper decides to introduce Levy flight strategy to improve.According to the relevant literature [20] [21], in the current researches on many intelligent optimization algorithms, such as particle swarm optimization algorithm and ant colony algorithm, the Levy distribution is used to determine the random walk of iterative step length, and then the search space is more efficient through larger particle jumps, so as to get rid of the local minimum of the algorithm to a certain extent.Improve search capabilities.Therefore, this paper decides to introduce the Levy flight strategy into the calculation of the center of the potential well, and redistribute the particle positions when the population evolution direction falls into the local optimal, so as to improve the early convergence of the QPSO algorithm.
Levy flight is a class of non-Gaussian random processes whose random walks obey the Levy stable distribution.First define a step factor s that fits the Levy distribution： In the definition of ,   2 = 1。Γ is the value of the  -dimension standard gamma function obtained according to formula (18), and  is a random number between [1,3] ; Both  and  conform to the standard normal distribution,  ∼ �0,   2 �， ∼ (0,   2 ) .Then put the defined step factor  into the calculation formula of the center of the potential well, as shown in equation ( 7) : , ( + 1) =  � , − � , () + (1 − ) , ()�� Thus, equation ( 2) and equation ( 7), as two renewal modes of particle local attractors, can be selected according to different situations.In the algorithm initialization process, each particle is given a bound value lim and the trace value trial is initialized to 0. If the fitness value of the new particle generated in each iteration is not improved, the tracking value is increased once.If the fitness value corresponding to the iterated new particle is improved compared with the previous one, set trial =0.When trial >lim occurs, it means that the algorithm has fallen into a local optimal situation, and the fitness value converges prematurely.At this time, Levy flight method is adopted, and the local attractor position is recalculated according to equation ( 7) for subsequent iterations.

The variable weight method updates the optimal position of particles
The average optimal position   ()introduced in the QPSO algorithm is only calculated by adding the individual historical optimal values of all particles in the population.Such a calculation automatically assumes that the individual optimality of each particle plays a consistent role in the final average optimal value, as shown in equation (8).However, the fitness value of each particle is not the same in the actual calculation, and the larger the fitness value is, the more important the particle is in the population.Therefore, it is not accurate enough to calculate the individual optimal value of these particles uniformly to obtain the average optimal value.Therefore, in this paper, the particles are arranged in descending order according to the size of the fitness value, and Then use the same method as Hozouri, M.A. et al. (2019) [23] to assign weight coefficients of different sizes to the sorted particles..The larger the overall compliance fitness value is, the greater the role it plays in the process of global convergence approaching the optimal solution, and the larger its weight coefficient should be.The adjusted average optimal position is calculated as shown in Equation ( 9) : Where  , represents the weight coefficient, which in this paper varies linearly from 1.5 to 0.5 according to the fitness of different particles.
When solving the potential well center , of quantum particle swarm, it may fall into the local optimal problem, and Levy flight strategy is used to make it jump out of the local minimum value to avoid early settlement of the algorithm.In order to solve the problem that the original feature length  , does not fully consider the coordination between global search and local search, an improved method such as nonlinear dynamic adjustment of contract-expansion factor and variable weight method to calculate the average optimal position is developed to improve the accuracy and robustness of QPSO algorithm.

Algorithm Flow
The specific steps are as follows: (1) Initialize population parameters such as population size, dimension and maximum number of iterations, set the starting position of particle iteration, limit value lim and tracking value trial.
(2) The fitness value of the current process is obtained according to the objective function shown in formula (11), so as to determine the individual optimal p_(i,j) and the global optimal . .
(3) Enter the cycle and calculate the local attractors of each particle.(4) Calculate the average optimal position   by using the variable weight method described above; According to the distance difference between the current point and the historical best point, the shrinking-expansion factor is dynamically adjusted, and the feature length  , is calculated.(5) The latest position of the particle is obtained according to the iterative equation of the IQPSO algorithm, and its fitness value is calculated to determine whether it is optimized.(6) If there is optimization, it indicates that the particle is in a normal search state, set the tracking value trial to 0, and jump to step (8); If there is no optimization, it indicates that the particle may fall into a locally optimal region, and the tracking value increases by 1 and turns to determine whether the limit lim is exceeded.(7) If trial < lim is established, jump to step (8); When the comparison expression is not valid, the local attractor update method with Levy flight strategy is adopted and step (4) is reentered.(8) Individual optimal  , and global optimal  best. are determined by analyzing the fitness value of the new particle.(9) Determine whether the termination conditions are met.If the final   output is met, if not, return to step (3) to enter the next iteration.

Test functions
In order to confirm the effect of the optimized particle swarm optimization algorithm, we select ZDT1, ZDT2 adnZDT4 as three reference functions to evaluate the effect of the algorithm.For the detailed meaning of the function, please refer to Table 1.Meanwhile, we also compare with NSGA II, PSO, NSPSO and MOPSO, four common multi-objective optimization methods.Consider 2 evaluation indicators as follows: 1) Close to the best frontier of pareto, namely convergence; Assuming that the Pareto optimal solution set of the multi-objective optimization problem is certain, we choose some points equally from the optimal state of Pareto, and then find the shortest distance between the results generated by the algorithm and these points, and take the square root of all the shortest distances as the evaluation index γ of convergence.
Where, is the minimum Euclidean distance between the I-th non-inferior solution and all Pareto optimal solutions on the Pareto optimal front end.
2) Solutions are uniformly distributed on pareto frontier, that is, diversity.
According to the specific objective function value, all the good solutions generated by the algorithm are arranged in the objective space in an orderly manner, then the diversity index Δ : Where, is the Euclidean distance between the boundary solution obtained by the algorithm on the m-th objective and the extreme solution on the m-th objective on the Pareto optimal front end; Is the average value of .

Algorithm Parameter Settings
The function evaluation times of all algorithms are 15000 times, the size of the output external file is 100, the population size of MOPSO and SMOPSO is 50, and the iteration times are 500.The population size of NSPSO and NSGA II was 100 and there were 250 iterations. .The IQPSO algorithm in this paper has a population size of 100 and a maximum number of iterations of 250. max is 100,  max and  min are 70 and 50 respectively,  decreases linearly from 0.95 to 0.35,  1 =  2 = 2, ℎ = 30,  = 4,  max = 2.

Simulation results and analysis
In order to accurately reflect the performance of IQPSO algorithm, 30 independent experiments were conducted for each test function, and the mean and variance of evaluation indexesγ andΔ were calculated.Table 2and Table 3show the mean M and variance V of convergence index γand diversity index Δ when the proposed algorithm runs the 3 test functions 30 times respectively.Table 4 shows the average value ofγ under different evolutionary algebras of the algorithm, and the algebras required for each comparison algorithm to run when γ=0.01 is reached.It is not difficult to see from the data table that in addition to the algorithm in this paper, the best performance is NSGA2 algorithm.In order to comprehensively compare the output solutions of NSGAII algorithm and the algorithm in this paper, the optimal solutions obtained from 30 independent experiments are      From FIG. 1 to FIG. 3, it can be seen that the output results of the algorithm on the three ZDT test functions not only converge precisely to the pareto optimal frontier, but also the 30 experimental results are highly overlapping, which further indicates that the algorithm has good stability.

System operating costs
The cost of power generation refers to the cost required for the active power generated by the distribution system within the time range t.The microgrid system model considered in this article is shown in Figure 5, which includes various distributed power sources, including PV, WT, DE, MT, and energy storage.When calculating the operating cost of the system, in addition to considering the cost of power generation, the uncontrollability of wind and solar power is also taken into account.With the large-scale integration of this energy into the grid, it will increase the risk of microgrid system operation, causing incalculable losses.Therefore, the introduction of wind and solar power curtailment is expected to serve as a risk cost, in order to better optimize distribution scheduling.
The objective function is to minimize the operating cost of the system, and the specific objective function is as follows: Among them,   is the cost of the dispatching system;  , and  ,  are the fuel costs and start-stop costs of thermal power generation.   is the cost of connecting the BESS to the grid. , and  , represents the risk cost of wind power systems and the risk cost of photovoltaic systems, respectively. and  ,  represents the increase and decrease of risk reserve for the unit.

System carbon emissions
With the extraction and utilization of fossil fuels, the global greenhouse effect is becoming increasingly severe.Green energy has the characteristics of clean and sustainable development, and has become the trend of future energy development.Compared with traditional coal power generation, wind and solar power generation does not produce polluting gases, thus avoiding greenhouse effect, acid rain formation, and ozone layer damage.Currently, with a series of environmental policies in China, pollutants generated by traditional coal-fired power must be treated before they can be discharged, which has also increased the cost of thermal power generation.In order to reflect the environmental benefits of wind and solar power scheduling, this article takes minimizing the cost of pollutant control as the objective function, and the specific relationship is as follows: Where   is the environmental cost of the system;  SO 2  (   ) ,  CO 2  (   ) ,  NO   (   ) represent the corresponding amount of SO2, CO 2 , and   generated by the generator set when generating active power. SO 2 ， CO 2 ，   represents the corresponding treatment costs for the three pollutants.

Constraints
The constraints of the model proposed in this article are as follows: (1) Distributed power output Where,  max_wt and  min_wt are the upper and lower limits of the output of the wind turbine unit;  min _pv and  max_pv are the upper and lower limits of the output of the photovoltaic unit;  minG and  maxG are the upper and lower limits of the output of the generator . (

16
() is the charge and discharge power of the energy storage system at time t,   is the upper limit of charge and discharge power,   is the lower limit of charge and discharge power,   is the charge and discharge efficiency; () is the capacity value of the energy storage equipment at the end of time t;  max ， min is Capacity upper and lower limits.
(3) Micro grid system power constraint The total power of the system should satisfy the following formula：  G () =  L () −  wtf () −  pvf () +  ES () 17 Where  G () is the output power.

Calculation parameters
The microgrid system in this article is as shown below, including various distributed power sources, including PV, WT, DE, MT and energy storage.Table 5 displays the operating parameters and costs of each DG in the microgrid, Table 6 displays the operating parameters and costs of each DG，Table 7 dispaly the energy storage parameters.Realtime electricity price reference [19] .According to the data in Figure 6 and Table 8, we can infer that in the process of executing economic dispatch, due to the increased investment cost of highly polluting diesel generators, the power generation cost of the microgrid also increases, thus causing an increase in environmental costs. .Similarly, in the process of implementing environmental dispatch, the cost of pollutant treatment and punishment also increases the environmental cost, thus causing the operating cost of the unit to increase accordingly.When performing comprehensive dispatching of these two methods, environmental costs and operating costs are within a specific value range.Therefore, during the dispatching process, we need to comprehensively consider the distribution of wind and solar resources.Scheduling should be planned appropriately based on a variety of factors, including fuel costs and waste disposal costs.

Comparative analysis of objective functions
This article considers the minimum operating cost and the minimum pollution control cost in microgrid system power scheduling, establishes a model, and uses these two as optimization objectives to conduct optimization scheduling simulation.Table 8 shows the scheduling range values considering different scale objectives, because this problem is a multi-objective problem, and the Pareto optimal solution cannot simultaneously satisfy the two end optima, Therefore, the following analysis aims to obtain the optimal scheduling results within their respective scope requirements.The diagram of the dispatch result, with the operating cost of microgrid economic dispatch at 317.98 yuan, is depicted above.Evidently, fuel cells have the least expensive power generation, thus power generation is always given priority.Should the load surpass the fuel cell's peak output power, if the micro gas turbine's power production cost is less than the electricity cost from the distribution network at that juncture, the micro gas turbine will generate electricity; otherwise, the electricity is bought from the distribution network.Should the load surpass the peak power produced by the fuel cell and micro gas turbine, if the diesel generator's power production cost is less than the electricity cost of the distribution network then, the diesel generator will generate electricity; otherwise, the electricity is bought from the distribution network.

Under the lowest cost
The diagram of the dispatch result, with the operating cost of microgrid economic dispatch at 317.98 yuan, is depicted above.Evidently, fuel cells have the least expensive power generation, thus power generation is always given priority.Should the load surpass the fuel cell's peak output power, if the micro gas turbine's power production cost is less than the electricity cost from the distribution network at that juncture, the micro gas turbine will generate electricity; otherwise, the electricity is bought from the distribution network.Should the load surpass the peak power produced by the fuel cell and micro gas turbine, if the diesel generator's power production cost is less than the electricity cost of the distribution network then, the diesel generator will generate electricity; otherwise, the electricity is bought from the distribution network.The figure above shows the output of the distributed power supply, the battery supercapacitor hybrid energy storage system and the transmission power of the microgrid and distribution network in a dispatching cycle corresponding to the extreme solution with the optimal environmental cost of the microgrid system.It can be seen from the figure that due to the high pollutant emission coefficient of the distribution network, when considering the minimum environmental cost, it almost does not participate in the system operation.Among distributed power sources, micro gas turbines have the lowest pollutant emission coefficient, so their advantage of giving priority to output is fully reflected.When the load exceeds the maximum output power of the micro gas turbine, the fuel cell generates electricity.When the load exceeds the maximum power generated by the fuel cell and micro gas turbine, it is the diesel generator's turn to generate electricity.

Conclusions
This paper takes the operating cost of the microgrid system and the environmental protection cost as the objectives to construct a multi-objective optimal dispatch model of the microgrid in the grid-connected mode, and uses the improved IQPSO algorithm to solve the proposed model.Through simulation, the following conclusions are drawn: (1) The improved particle swarm algorithm, in comparison to itspredecessor, boasts a greater degree of optimization accuracy, aswifter convergence rate, and the capability to avoid the algorithm'sdescent into the local optimal solution at a later stage of the process.
(2) The proposed model can effectively reduce users' electricity costs and environmental pollution, and promote the optimized operation of microgrids.
(3) The output structure can reduce the overall power generation cost of the system, and can also reasonably allocate network resources for power dispatching while considering environmental pollution.
superimposed and displayed together to evaluate the convergence, diversity and stability of the algorithm.As shown in the picture: terms of the diversity of the bundle solutions, the optimal solutions of the proposed algorithm have a good diversity because of the adaptive weight strategy.Compared with the other 3 algorithms, the three test functions have significant advantages.Therefore, the algorithm has good diversity As for the convergence speed of the algorithm, it can be seen from 4 that for each ZDT standard test function, the  value of the algorithm reaches 0.01 earlier.Compared with other multi-objective optimization algorithms, the proposed algorithm reaches the  value of other algorithms early in the 3 test functions.This algorithm can converge to pareto frontier quickly.

Figure 7 .
Figure 7.The optimal extreme solution results considering the lowest operating cost

Figure 8 .
Figure 8.The optimal extreme solution result considering the lowest environmental cost

Table 2 .
Comparison of convergent gamma In order to test the convergence of the algorithm, the 4 algorithms proposed in this article were applied to test 3 ZDT functions, and 30 experiments were conducted respectively.The experimental results are shown in Table3.The mean and variance of the convergence index γare used as evaluation indicators.From the table It can be seen that the algorithm proposed in this article is significantly lower than other algorithms in two indicators, which verifies the excellent convergence of this algorithm.

Table 4 .
Average values of γ obtained by MOPSO-GL under different evolutionary algebras   ,   ,   are the fuel cost coefficients of generators;   cold is the cost coefficient incurred by the generator set from stopping to starting; hot is the startup cost of generator i;   min is the minimum allowable downtime of generator i;   off is the continuous downtime time of generator i;   cold is Generator cold start time;   off is the shutdown time and cold start time of generator i.   and   is the penalty coefficient for wind abandonment and the penalty coefficient for light abandonment, respectively;  loss,WT  and  loss ,PV  respectively represent the curtailment power;    and    are the cost coefficients for increasing and decreasing unit power, respectively;  ,

Table 5 .
Unit parameters

Table 6 .
Pollutant emission coefficient and cost

Table 7 .
Energy storage parameters Figure 6.pareto front and coordinated solution

Table 8 .
Scheduling results of microgrid under different objectives