Data-driven optimization algorithm for economic operation of microgrid based on dynamic Kriging model and two-stage search strategy

: The economic operation optimization of microgrid is an important research topic in the power system. Therefore, this paper proposes a surrogate model particle swarm optimization algorithm based on the global-local search mechanism. Firstly, aiming at the problem that the statistical information of Kriging model is difficult to guarantee the prediction accuracy, the dynamic transformation is carried out to enhance the robustness of the model; secondly, the global-local search mechanism is introduced to make the algorithm fully explore the fitness landscape near the Kriging model after quickly locating the current optimal particle position, so as to achieve the balance of convergence quality and convergence efficiency. The proposed method has been tested on numerous benchmark test functions from two test suites, and the results show that the proposed algorithm has more advantages than other comparison algorithms in optimization accuracy. Finally, simulations are carried out in two operating modes of microgrid islanding and grid-connected, which has verified the effectiveness of the proposed method. ImKPSO-or, the improved Kriging model of ImKPSO can better fit the objective function. The above analysis shows that the improvement of the correlation function matrix in the proposed algorithm can effectively improve the prediction accuracy of the Kriging model.


Introduction
With the aggravation of energy dilemma and environmental deterioration, renewable energy power generation technology has developed rapidly, and the emergence of microgrids provides an effective technical means for the comprehensive utilization of renewable energy [1]. Microgrid not only facilitates the access of distributed energy system, but also realizes demand-side management and maximization of existing energy utilization [2]. With the large-scale construction and investment of smart grid, the economic optimal operation of microgrid has become an important part of its integrated control and energy management research [3].
Many traditional mathematical methods, such as linear programming method [4], stochastic linear programming method [5] and stochastic dynamic programming method [6], etc., are not suitable for solving the economic operation optimization problem of microgrid with multiple micro-sources and numerous constraints due to the need to establish complex mathematical models. Considering the defects of traditional mathematical methods, scholars at home and abroad began to use swarm intelligence optimization method to solve this kind of problems. For example, Wu et al. proposed a hybrid particle swarm optimization algorithm through the hybrid immune mechanism, sub-gradient method and non-linear condition mechanism, and effectively solved the economic operation problem of microgrid under the condition of configuring the rotating reserve power of controllable micro-source [7]. On the basis of considering fuel cells, Sanjaria et al. established a building microgrid optimization model for cogeneration, and applied the hypersphere search algorithm to solve the economic operation problem of the system [8]. Considering the generation cost of distributed generation, Cheng et al. proposed an extreme dynamic programming algorithm, which realizes the control and economic dispatch of microgrid by introducing the prediction module [9]. Li et al. improved the gravitational search algorithm by introducing reverse learning and elite strategy to solve the multi-objective economic operation problem of microgrid [10]. In these swarm intelligence optimization methods, most of them are based on the improved algorithm itself and then optimize the objective function. Their optimization is not only difficult to realize, but also makes the optimization time too long (from minutes to hours) due to the tens of thousands of times of fitness function evaluation. In recent years, in the field of evolutionary algorithms, when faced with the above problems, surrogate models are usually used to assist evolutionary algorithms, and cheaply calculated surrogate models are used to replace expensive actual fitness evaluation [11]. The surrogate model is used to fit the objective function with low computational cost and high prediction accuracy. However, in the current research on the economic optimization of microgrids, the use of surrogate models to deal with such problems has just begun.
Among many surrogate models, Kriging model not only has good fitting effect, but also gives the mean square error estimation of the estimated value at the same time [12]. Therefore, it is widely used in various practical engineering problems [13][14][15]. In this paper, Kriging model is used as the surrogate model. Based on the improved Kriging model, a particle swarm optimization algorithm (ImKPSO) combining global and local search is proposed. By modifying the correlation matrix of Kriging model, the robustness of the model is enhanced. When the global search quickly locates the current best point, the local search mechanism is activated to speed up the algorithm convergence. In order to verify the performance of the algorithm, we conducted a comprehensive test on the proposed algorithm on CEC2006 and CEC2017, and the comparison shows that the proposed algorithm has good performance in dealing with complex multi-constrained problems. Finally, the proposed algorithm is applied to solve the microgrid optimization model with economic operation as the objective. Two operation modes, island operation and grid-connected operation, are considered. The simulation results verify the effectiveness of the proposed method for solving the economic optimization problem of microgrid.
The rest of this paper is organized as follows. Section 2 briefly introduces the characteristics of each micro-source and analyzes the objective function of the microgrid in two operating modes. The proposed method, ImKPSO, is elaborated in Section 3. Sections 4 present the experimental studies on benchmark test functions. Section 5 applies the proposed algorithm to the economic operation optimization of the microgrid in two operating modes. Finally, Section 6 summarizes the paper.

Microgrid system description
A typical microgrid model is shown in Fig. 1. The microgrid is radial, including photovoltaic arrays, wind turbines, micro gas turbines, diesel generators and energy storage batteries. Among them, micro gas turbines, diesel generators and energy storage batteries are controllable loads that participate in the economic dispatch process. Because the output power of photovoltaic arrays and wind turbines changes with climate change, it is difficult to accurately know their actual power at the current moment. They have obvious randomness and volatility and are uncontrollable loads. The output information needs to be given before dispatch. Therefore, the photovoltaic arrays and wind turbines does not participate in actual scheduling in this article.

Micro gas turbine
As a small distributed power generation device, micro gas turbines have flexible, safe, clean and cheap power generation with cogeneration mode, which meet the diversified development needs of micro grid energy supply. The fuel cost is as follows: where represents the fuel price of the micro gas turbine, which is taken as 0.7￥/m 3 in this paper; η ( ) represents the efficiency of the micro gas turbine power generation system, which is taken as 80% in this paper.

Diesel generator
In a microgrid system, in order to achieve a certain economic effect, diesel generators often exist in the form of multiple relatively small-capacity units. Its operating fuel cost is shown in the following formula: where is the output power value of the diesel generator; the coefficients , , and are the cost parameters, which can be obtained by fitting experimental data or provided by the equipment manufacturer.

Energy storage battery
Energy storage batteries play an important role in maintaining the energy balance of the microgrid, improving power quality, and improving the uninterrupted power supply capability of the microgrid. The degradation cost is shown in the following formula: where , , , are the charging and discharging power of the energy storage battery respectively.

Objective function
The main purpose of microgrid economic optimization problem is to formulate the optimal power supply strategy of microgrid system to achieve the minimum operation cost. This paper also considers the objective function to be optimized under the two operation modes of microgrid.
1) Island operation mode: when the microgrid is in island operation, it is not connected with the main grid, and its objective function is expressed as follows: where is the total power of energy storage battery charging and discharging, ( ) is the actual output value of the uncontrollable microsource, ( ) is the power of the -th controllable microsource, and is the total cost of the microgrid.
2) Grid-connected operation mode: when the microgrid is in grid-connected operation, it relates to the main grid, and its objective function is expressed as follows: where is the exchange power between the microgrid and the main grid.

Constrains
The constraints of the microgrid economic optimization problem include power balance constraint, controllable source power constraint, controllable source ramping constraint, energy storage battery power constraint and exchange power constraint: 1)Power balance constraint: 2)Controllable source power constraint: 3)Controllable source ramping constraint: 4)Energy storage battery power constraint: 5)Exchange power constraint: Among them, ( ) is the load demand of microgrid, is the upper limit of slow down power of the controllable source, and is the upper limit of climbing power of the controllable source.

Kriging model
The Kriging model, also known as the Gaussian process, was initially applied to the estimation of geological reserves. It was a very popular geostatistical difference method, and was further extended to the design and analysis of deterministic computer experiments [16]. The Kriging model can not only give the estimated value of the unknown function, but also the error estimate of the estimated value. This error estimate can be used to guide new sample points to be added to the sample set to further improve the accuracy of the surrogate model [17]. The Kriging model regards the objective function as a specific realization of a Gaussian static random process, which can be expressed as: where is called global trend model, which can be given as follows: where = ( 1 , 2 ,…, ) is the corresponding coefficient vector.
is a random Gaussian process with zero mean. For decision space, there is correlation between sample points, and the covariance is expressed as follows: where σ 2 is the process variance, ( , , ) is the correlation function, and is the parameter. The two most important parameters and 2 of the Kriging model can be derived using the Lagrangian multiplier method: is the × dimension correlation function matrix: From the above derivation process, we can see that for the correlation function matrix , the paired covariance of the joint model of all sample data is stored, that is, it contains the statistical information of the sample set. Normally, the correlation function matrix is a positive definite matrix. However, under certain sample sets (For example: certain two rows or two columns of the matrix are approximately equal), may appear singular, which makes the condition number of the matrix larger, which leads to a significant decrease in the prediction accuracy of the model or even a prediction failure (As shown in Fig. 2, when the two columns and of the correlation function matrix are approximately equal, the prediction accuracy of the abnormal prediction curve shown in the circled area in Fig. 3 is greatly reduced). In order to solve this problem, most scholars adopt the method of static transformation. For example, reference [18] adopts the method of directly assigning 1 to the diagonal of the matrix to overcome the singularity of the correlation function matrix .
However, this method only changes the value of the correlation function matrix and does not improve the prediction accuracy of the model.   As mentioned above, the modeling process of Kriging model depends on the statistical information of sample points, which is largely related to the initial sample points, and the information contained in the current population is ignored and underutilized. In addition, the construction of the correlation function matrix R cannot guarantee that it is a positive definite matrix, which may lead to the poor prediction accuracy. In view of the above two points, starting from the purpose of enhancing the prediction accuracy of the Kriging model, this paper proposes a dynamic transformation method for the correlation function matrix R of the Kriging model. The specific steps are as follows: Step1: Suppose the current population is , and calculate its covariance matrix .
Step2: Normalize the sample points in the covariance matrix . The specific method is as follows, and a new matrix is obtained.
Step3: Calculate 4.44 × 10 −13 • to get matrix (Note: The coefficient must be within a reasonable range. After testing, it is found that too large a coefficient will cause a large error in the linear variance group of the Kriging model, and a too small value will not filter the numerical noise. So, this article takes 4.44× 10 −13 ).
Step4: Calculate = + , and use matrix as the new correlation function matrix.

Particle swarm optimization algorithm
The concept of particle swarm optimization algorithm originated from the study of foraging behavior of birds. In each iteration of the algorithm, the particle updates its position according to two extreme values, which are the global historical optimal gbest and the individual historical optimal pbest [19]. The standard particle swarm optimization algorithm is given by the following update formula: where is the position, is the speed, is the inertia weight, is the learning factor, 1 、 2 are two random numbers between 0 and 1. In this paper, 1 and 2 are taken as 1.49445. The adaptive inertia weight decreases linearly with the number of iterations from 0.9 to 0.4: where max is the preset maximum number of iterations.

Global-local search strategy
For particle swarm optimization (including other heuristic algorithms), the process of searching for solutions is essentially a greedy strategy. Therefore, the better solutions that do not conform to the greedy rules will be ignored by the algorithm and may fall into the local optimum. In order to overcome this shortcoming, researchers often mix other intelligent optimization algorithms or improve the control parameters to change the diversity of the population, so as to avoid the problem that the algorithm is easy to fall into local optimum (As shown in Fig. 4, the current best points and with the local best point are all close to the global best point). However, this kind of "improved algorithm" that makes specific improvements for a certain type of specific problem is often not universal. In response to this problem, combined with the characteristics of the surrogate model, this paper proposes a novel two-stage optimization framework, which can avoid the algorithm falling into the local optimum on the basis of improving the convergence speed.
The global-local search scheme includes two phases: the global search phase and the local search phase.
After the initial surrogate model is established, the next step is to select sample points to add to the sample set by "infill criteria"; update the surrogate model according to the new sample set, to cycle until convergence. For Kriging model, many infill criteria such as MSP criterion [20], EI criterion [21], MSE criterion [22], LCB criterion [23] have been developed internationally. Among them, the MSP criterion is widely used because of its simplicity and practicality. Its principle is to find the minimum value of the objective function directly on the surrogate model. The following will describe the MSP criterion and global-local search strategy adopted by the proposed algorithm.
Global search phase: First, after the improved Kriging model is established, PSO immediately optimizes the global model. Assuming that the current sample set is , the current optimal solution found is , that is: Then, the actual objective function (the total cost of microgrid in this paper) is used to evaluate . Assume that the actual fitness value obtained is , then ( , ) is added as a new sample point to . The updated sample set is +1 , and then the surrogate model is rebuilt in the new sample set to improve its prediction accuracy.
Local search phase: In order to further accelerate the convergence, a local search mechanism is introduced on the basis of global search. As shown in Fig. 5, if the current optimal solution found by global search is , a local improved Kriging model is established based on the points nearest to . in this paper, takes 20% of the current population size. After the local surrogate model is established, the process is the same as the global search process. PSO starts to optimize the local model. After the current optimal solution is evaluated by objective function, new sample points are obtained and added to the sample set. The algorithm takes the global search as the starting point. When the accuracy of the solution obtained by the global search cannot be improved any more, it will be converted into local search; when the accuracy of the solution obtained by the local search cannot be improved any more, it will return to the global search, and the cycle will continue until the preset termination conditions are reached. For convenience, we refer to this process as the sub-optimization process in the following text.

Algorithm steps
The main ideas of the data-driven optimization algorithm proposed in this paper are as follows: the correlation function matrix of Kriging model is dynamically modified to improve the prediction accuracy of Kriging model; the standard particle swarm optimization algorithm is used in the optimization algorithm; according to the characteristics of the surrogate model, the improved Kriging model is combined with the global-local search mechanism to achieve the balance of convergence quality and efficiency. The algorithm flow chart is as Fig. 6: The detailed steps of the proposed algorithm (ImKPSO) are as follows: Step1: Use Latin hypercube sampling to initialize particles, = 1 ,…, ( = 1). The advantage of choosing Latin hypercube sampling is that it can maximize the information of the initial population with fewer sample points [24].
Step3: An improved surrogate model is established by the population: Step4: The standard particle swarm optimization algorithm is used as the search engine, and the sub-optimization process starts to optimize.
Step5: The current optimal solution is evaluated by the objective function, and the new sample points are added to the original database.
Step6: When the algorithm does not reach the preset termination condition, it returns to Step3 to continue iterating. When the preset termination condition is reached, the algorithm terminates and outputs the optimal solution.

Benchmark test
In order to verify the various components and overall performance of ImKPSO, 13 test functions in CEC2006 and 9 test functions in CEC2017 (including 10 and 30 ) are selected for comprehensive test, and the maximum number of calls ( ) of the objective function is taken as the termination condition. Table 1 and Table 2 list the basic characteristics of these test functions. Among them, n is the number of decision variables, is the estimated ratio of the feasible region to the search space, LI is the number of linear inequality constraints, NI is the number of nonlinear inequality constraints, LE is the number of linear equality constraints, NE is the number of nonlinear equality constraints, and ( ⋇ ) is the currently known optimal solution of each test function.
It is worth noting that the optimal solutions of some test functions in the list are extremely difficult to obtain (for example: g02 is a high-dimensional nonlinear function with multiple local optima). Based on the above considerations, in this section, we set =3000.

Performance analysis of improved correlation function matrix
In order to improve the prediction accuracy of the model, this paper first improves the correlation function matrix of Kriging model. In order to verify its effectiveness, a variant of ImKPSO, ImKPSO-or is used as a comparison algorithm. ImKPSO-or uses Kriging model without any improvement as the surrogate model, and the others remain unchanged. Since the currently known optimal values ( ⋇ ) of these 13 test functions are all ImKPSO-or and ImKPSO. The statistical results of the two algorithms are shown in Table 3.
It can be seen from Table 3 that ImKPSO is superior to ImKPSO-or in 8 test functions of the test set in the table, and on the other 5 test functions, ImKPSO has at least the same performance as ImKPSO-or. In addition, the performance of ImKPSO is significantly better than ImKPSO-or on the functions of g10, g12, g16, g18, and

Performance analysis of global-local search mechanism
The search process of ImKPSO is based on a global-local combination of search. In order to verify its performance, two variants of ImKPSO are used as comparison algorithms, namely ImKPSO-Glo and ImKPSO-Loc. The former retains the global search and eliminates the local search; the latter retains the local search and eliminates the global search. In order to verify the influence of these two parts on the performance of the algorithm, this section selects 13 test functions in CEC2006 for testing. The experimental results are taken in the same way as in section 4.1. Table 4 records the statistical results (mean and standard deviation) of the three algorithms on 13 test functions. Fig. 7 shows the convergence curves of the three algorithms on the functions g04, g08 and g12. It can be seen from Table 4 that whether it is ImKPSO-Glo or ImKPSO-Loc, the overall performance is far inferior to ImKPSO, and the statistical results often differ by several orders of magnitude. In addition, it can be seen from Fig. 7 that the convergence trends of the three algorithms on the three test functions are basically similar. Whether it is ImKPSO-Glo or ImKPSO-Loc, the performance is not as good as ImKPSO.
In the case of no local search, the global search optimization process is slow. This is because the global search searches in the entire feasible region, while the local search is responsible for exploring the fitness landscape near the current optimal particle. The above analysis shows that the introduction of local search can effectively improve the optimization efficiency of the algorithm, especially in the later stage of the algorithm. However, if the global part is removed and only the local search is retained, the algorithm can easily fall into the local optimum.

Comparison with Four Methods in CEC2006
In order to verify the performance of ImKPSO in dealing with complex optimization problems, this section uses the 13 test functions in Table 1 to test ImKPSO, and makes horizontal comparison with DE [25], PSO [26], SWT-PSO [27], iDEaSm [28]. SWT-PSO is a particle swarm optimization algorithm based on random weight times independently. Table 5 shows the mean and variance of each algorithm. In the table, "NF" means that no feasible solution was found in 25 independent runs.
It can be seen from Table 5 that ImKPSO outperforms the other 4 algorithms on 12 of the test functions, and only performs worse than iDEaSm on g24. This is because one of the ImKPSO falls into a local optimum (experimental results are retained). On the 8 test functions of g01, g06, g07, g08, g09, g10, g18 and g19, the average function error of ImKPSO is several orders of magnitude lower than that of the other 4 algorithms. At the same time, comparing the variances, it is found that the variance is also the smallest on the 12 test functions that ImKPSO obtains the optimal average error. The above results show that ImKPSO has a better performance than the comparison algorithm in terms of accuracy and stability. It can also be seen from Table 5 that although iDEaSm is inferior to ImKPSO in most test functions, it has more advantages compared to SWT-PSO. Only in the five test functions of g08, g09, g10, g12 and g18, the performance is weaker than SWT-PSO, which indicates that the surrogate-assisted optimization algorithm has strong competitiveness in solving such constrained optimization problems.
Based on the above comparative analysis results, ImKPSO has significant advantages in optimization accuracy and stability whether it is compared with the same type of surrogate-assisted optimization algorithm iDEaSm in the horizontal direction or compared with the improved evolutionary algorithm SWT-PSO in the vertical direction.

Comparison with Two State-of-the-art Methods in CEC2017
In order to further explore the ability of ImKPSO to explore complex problems, in this section, we test ImKPSO on 9 functions in CEC2017 (including 10D and 30D), and select two state-of-the-art algorithms DE-AOPS [32] and GLoSADE [33] to compare with ImKPSO. The following is the brief information of these two comparison algorithms: DE-AOPS: An improved differential evolution algorithm that can adaptively select the scaling factor GLoSADE: A surrogate-assisted evolutionary algorithm based on surrogate ensembles (GRNN and RBF).
GLoSADE uses the best fitness value and the maximum uncertainty as the infill criteria, and has achieved good convergence accuracy. The test results show that on most of the benchmark functions of the three test suites CEC2006, CEC2010 and CEC2017, the performance of GLoSADE is better than the comparison algorithm used in the original paper (for example: mWiE [34], FROFI [35], etc.).
Two Comparison algorithms use the same parameter settings as their source reports. In addition, this section sets the maximum number of calls to the objective function as the algorithm termination condition, and set max =3000. Each group of experiments was run 25 times independently. The statistical results of the final optimal values (mean and standard deviation) of all algorithms are listed in Table 6. In order to judge whether there is a statistical significance between ImKPSO and other two algorithms, we did the Wilcoxon's rank sum test at a 0.05 significance level for results. In the table, "NF" means that no feasible solution was found in 25 independent runs. It can be seen from Table 6 that ImKPSO shows excellent performance compared with the other two comparison algorithms on 10D and 30D problems. On 10D, ImKPSO is weaker than DE-AOPS only on f13 and f22. Except for f28, ImKPSO has better accuracy than DE-AOPS and GLoSADE in the remaining six functions.
f28 is a rotated function, its search space is relatively large, and it is not easy to find its optimal solution. We can see from the table that when max =3000, none of the three algorithms can find the optimal solution. On 30D, there are two points worth noting: First, the performance of the two surrogate-assisted evolutionary algorithms GLoSADE and ImKPSO are better than DE-AOPS. As the dimensionality increases, the objective function becomes more and more complex, and it is quite difficult for heuristic algorithms to achieve satisfactory optimization results within a limited number of objective function calls. The satisfactory optimization effect of DE-AOPS depends on many objective function calls. In its original paper, when solving the 30D problem, the objective function calls set by DE-AOPS are as high as 600,000. In addition, we found that GLoSADE outperforms ImKPSO only on f01 and f20. GLoSADE selects GRNN and RBF to build surrogate ensembles.
Although GRNN has a smooth fitness landscape, it does not fit the objective function well; while RBF has excellent performance on high-dimensional problems. Its algorithm complexity is relatively high ( ( 3 ) ), therefore, in order to achieve a satisfactory convergence effect, GLoSADE adopts both the best fitness value and the maximum uncertainty as the infill criteria. However, the method of assigning the number of objective function calls to these two criteria is random. When the algorithm searches at the maximum uncertainty, it cannot fully explore the fitness landscape at the best fitness value, which makes the performance of the algorithm still limited when solving complex optimization problems. It can be seen that ImKPSO has a strong advantage when dealing with complex optimization problems.

Instance simulation
This section uses the typical microgrid example system shown in Fig. 1. In the microgrid, the micro power supply is composed of photovoltaic arrays, micro gas turbines, diesel generators and wind turbines, and the energy storage unit is composed of energy storage batteries. The power load demand and power market price in the microgrid system are shown in Fig. 8-9. The predicted power curves of the two uncontrollable micro-source photovoltaic arrays and wind turbines are shown in Fig. 10-11. The main parameters of each micro-source are shown in Table 7. The parameters a, b, and c in Table 7 are the quadratic, primary and constant coefficients between the operating fuel cost and output power of diesel generators.  Set maxFEs=3000 in this section. Table 8 lists the optimal average values of each algorithm. It can be seen from Table 8 that, compared with the other four comparison algorithms, ImKPSO obtains the lowest average operating cost in island operation mode. Fig. 12 shows the comparison of the convergence curves of various algorithms in island operation mode. It can be seen from Fig. 12 that, comparing the other four algorithms, ImKPSO not only has the best convergence accuracy, but also has the fastest convergence speed. Although SWT-PSO uses a random weight balance mechanism to balance the global search and local exploration capabilities of particles, it can be seen from the figure that both the convergence accuracy and the convergence speed are not as good as the two surrogate-assisted optimization algorithms iDEaSm and ImKPSO. Compared with iDEaSm, which also uses the Kriging model, ImKPSO's improvements to the correlation function matrix of the Kriging model make ImKPSO's overall performance even better. turbines increases, which exceeds the load demand. Therefore, the energy storage battery is charged to store the excess energy. At 9-19, when the load demand is greater than the total power of distributed generation, the energy storage battery starts to release electrical energy.

Economic operation optimization under the grid-connected operation mode of microgrid
This section considers that the microgrid works in grid-connected operation mode. In the grid-connected operation mode, the microgrid adopts the time-of-use price strategy. Compare the proposed algorithm with DE, PSO, SWT-PSO and iDEaSm in grid-connected operation mode. The setting is the same as the island operation mode. All algorithms are independently run 25 times under the same experimental conditions, and the experimental results are averaged. Each algorithm regards the maximum number of calling the objective function (max ) as the termination condition, and set max =3000. Table 9 lists the optimal average values of the five algorithms in the grid-connected operation mode. From Table 9, it can be seen that ImKPSO still achieves the lowest average operating cost compared to the other four comparison algorithms.   Due to the connection with the main grid, the power relationship in the microgrid system tends to be relatively balanced. From 1 to 9 o'clock and 19 to 24 o'clock, the generation power of renewable energy sources such as photovoltaic arrays and wind turbines increases, which exceeds the load demand. Therefore, the microgrid transmits excess power to the main grid. From 9 to 19 hours, the load demand is greater than the total generation power of distributed generation, and the microgrid absorbs electrical energy from the main grid.
The above results show that the proposed algorithm has excellent performance in solving the economic optimization operation of microgrid.

Conclusion
In this paper, a data-driven optimization algorithm is proposed and applied to the economic optimal operation of microgrid. The algorithm first improves the Kriging model, and introduces a global-local search mechanism on this basis; by combining the inexpensive surrogate model with the particle swarm optimization algorithm, it not only guarantees the quality of the solution, but also improves the convergence speed. In order to verify the effectiveness of the proposed algorithm, 13 test functions in CEC2006 and 9 test functions in CEC2017 were tested, At the same time, the economic optimization operation of microgrid is simulated and verified, the results showed that the proposed algorithm has strong advantages when solving such computationally complex optimization problems.