Economic Dispatch Methods for Smart Grid Based on Improved SPEA2 and Improved NSGA2

The severity of the ongoing environmental crisis has prompted the development of renewable energy generation and smart grids integration. The access of enewable energy makes the economic dispatching of smart grid complicated. Therefore, the economic dispatching model for smart grid is very necessary. This paper presents an economic dispatching model of smart power grid, which considers both economy and pollution emission. The smart grid model used for the simulation is construced of wind energy, solar energy, fuel cell, and thermal power, and the use of fuel cell enables the smart grid to achieve multi-energy complementar. To overcome the defect of the traditional centralized communication methods, which are prone to communication jams, this paper adopts a multi-agent inform ation exchange method to improve the stability and efficiency. In terms of the solution method for this model, this paper proposes Improved Strength Pareto Evolutionary Algorithm 2(ISPEA2) and Improved Non-dominated Sorting Genetic Algorithm 2(INSGA2) that solves the economic dispatch problem of a smart grid. The strength Pareto evolutionary algorithm 2(SPEA2),non-dominated sorting genetic algorithm 2(NSGA2) and the improved algorithms are simultaneously applied to the proposed smart grid model for economic dispatching simulation. The simulation results show that ISPEA2 and INSGA2 are effective. ISPEA2 and INSGA2 have shown improvements over SPEA2 and NSGA2 in accuracy or running times.


INTRODUCTION
While traditonal fossil fuels has brought tremendous postive impact to the world, its large negative impacts to the environment is hard to ignore and many would argue that it's one of the most important problems faced by humanity right now. The concept of "carbon peak" and "carbon neutral" make people pay more and more attention to the application of renewable energy in power generation. The economic dispatching problem of power grid is very important all the time. The original economic dispatch problem of electric power grid can be traced back to the 1920s. The main types of generators in traditional electric power grids are thermal power generators. At the same time, the total number of power units is small, which makes the economic dispatch problem of the ancient electric power grid relatively simple. The access of renewable energy makes the economic dispatch problem of smart grid complicated and the economic dispatching model of smart grid becomes very important. Many scholars have carried out research in related fields. A new distributed dual-Newton results show that ISPEA2 is more accurate than before. INSGA2 has higher computational accuracy and higher computational speed than before. Finally, a distributed communication method is proposed in this article to obtain information through the neighbor nodes, which is suitable for the plug-and-play mode of smart grids.

PROBLEM DESCRIPTION
In this paper, a mathematical model is established with generators of photovoltaic(PV) wind, thermal, and fuel cells. In this model, multi-energy complementarity is reflected.

Cost Function and Constraints
As mentioned in Zhang and Liang (2021), Hetzer et al. (2008), the cost of the system is the sum of the costs of all generators.
The acronyms are shown as follows C z (t) total cost of grid, C r,i (t) cost of thermal unit, C f,i (t) cost of wind unit, C f,i,f (t) penalty cost of wind, C f,i,r (t) reserve cost of wind, C d,i (t) cost of fuel cell, C d,i,r (t) thermal load cost, C d,i,H (t) hydrogen storing cost, C PV,i (t) Photovoltaic power generation cost, All generators can not exceed their respective generating capacity (Hetzer et al., 2008;El-Sharkh et al., 2006;Yin et al., 2021).
The acronyms are shown as follows P r,i (t) power of thermal unit, P max r,i (t) maximum thermal generator power, P min r,i (t) minimum thermal generator power, P d,i (t) power of fuel cell, P max d,i (t) maximum fuel cell power, P min d,i (t) minimum fuel cell power, P f,i (t) power output of wind unit, P f,i,r wind unit rated power, P PV,i (t) Photovoltaic generator output power, P max PV,i (t) Maximum output power of photovoltaic generator, The total generating power must meet the sum of power demand, P Dem (t) is total power demand.
E r,i t ( ) a i + b i P r,i t ( ) + c i P 2 r,i t ( ) + e i exp κ i P r,i t ( )  (Hetzer et al., 2008). k pi is penalty cost coefficient and P f,i,k is available wind for generator, This article takes k pi 2. If the power of the wind turbine is less than the required value, then power compensation must be obtained from the outside world (Hetzer et al., 2008).
This article takes k ri 4. PEM fuel cell conforms to the following model El-Sharkh et al., 2006).
C n is price of natural gas, P fz(t) is auxiliary devices power, P y(t) is equivalent power for hydrogen production, η i_ is electrical efficiency of fuel cell. This article takes C n 0.4. When the fuel cell is loaded enough, the heat generated can be used to generate electricity. It is worth mentioning that multienergy complementarity is achieved in this case. At this point, the working situation of the fuel cell unit is more complicated. This paper considers the operation of the fuel cell unit in this case. The use of fuel cells can meet not only the electrical load, but also the thermal load. Partial load ratio is represented here by PR. The ratio of heat energy to electric energy is expressed asc R,D 0.6801. When PR < 0.05, η i _ 0.2716. When PR ≥ 0.05, η i _ is expressed in Eq. 13.
The ratio of heat energy to electric energy is expressed as Eq. 14.
The thermal power from the fuel cell can be expressed as The cost generated by heat load is expressed as C F,i,R (t) is the cost generated by heat load, P F,i,R (t) is the thermal power from the fuel cell. Photovoltaic units are conformed to the following model (Niknam et al., 2012). This cost includes two parts: operation cost and penalty cost.
k PV,i is Photovoltaic power generation cost coefficient, P PV,f is Photovoltaic forecast power, ΔP PV is the value of Photovoltaic actual power minus predicted power, G R is actual light intensity, G f is forecast light intensity, C P,PV,i (t) is Photovoltaic power penalty cost, k P,PV,i is PV power penalty cost coefficient.

System Structure
As shown in Figure 1, each generator is connected to an agent. Each agent exchanges information with the agents of its neighboring units (Li et al., 2018). Before the entire system starts to work, the operating parameters of each unit are first uploaded to their respective agents. After several information exchanges, the operating parameters and weather conditions of all units are uploaded to each agent. Then the system starts to work. Finally, the instructions are sent to each unit through distributed information transmission to achieve harmony and unity of the entire system. In this system, thermal power units and wind turbines generate alternating current, while fuel cells and photovoltaic units generate direct current. All the electricity is modulated by the inverter and sent to the loads. Due to limited space, this article uses four agents to describe the communication process briefly. The process is shown in Figure 2.
Before the information exchange begins, each agent has their own information. After information exchange, the information of each agent is described as follows.
For example, Agent 1 communicates with Agent 2 and Agent 4. At this point, Agent 1 gets the informations from Agent 2 and Agent 4. Other agents get the informations in exactly the same way. At this time, each agent not only has its own information, but also obtains the information of neighboring nodes. After a step of information exchange again, each agent has more abundant information. The details are as follows.
(2020) applies SPEA2 to solve multiobjective optimization of a continuous kraft pulp digester. Literature Yeh (2019) applies NSGA2 to solve a bi-objective optimization problem of multi-state electronic transaction network. This paper is to solve a multi-objective optimization problem. So these two algorithms can be used. However, these two algorithms have limitations. In order to get the optimal solution faster and more accurately, the two algorithms are improved in this paper. Experimental results show that the improved algorithms are effective.

SPEA2
SPEA2 is a broadly used multi-objective optimization algorithm. It can be known the procedure from Figure 3.

Start
Generating initial solutions whose number is N. At the same time, an empty achieve is needed. The initial solutions are stored inp 0_ , and the empty achieve is called A 0_ .

Fitness Assignment
Each solution is given an strength value S(i) whether in P 0_ or A 0_ .
Each individual is assigned a fitness value called R(i).
Next, the density information should be known. The values are calculated from the kth neighbor.
the σ k i means the distance from i to the kth nearest neighbor, and the 2 makes D(i) is a value between 0 and 0.5. In this way, multiple individuals having the same S(i) value is avoided. So, the fitness F(i) is the sum of R(i) and D(i).

Selection From Environment
The non-dominated solutions are transferred to the next generation.
If the solutions can fit the archive size, then A t+1_ N. Otherwise, some other methods are taken to make the number of current solutions is equal to N.

Termination
When the condition is met, the loop ends.

Mating Selection
The mating pool is filled by binary tournament selection from |A t+1_ |.

Variation
Perform mutation and reorganization operations.

NSGA2
Non-dominated sorting genetic algorithm (NSGA2) is another multi-objective optimization algorithm. The workflow NSGA2 is shown in Figure 4.

Start
Parent solutions P 0_ is gererated randomly. Next, each solution is assigned a fitness from its dominance rank.

Variation
Then the next generation individuals Q 0_ whose size is N. The whole solutions are P 0_ ∪ Q 0_ .

Sorting According to Ranks
The solutions should be sorted according to ranks.

Sorting According to Crowding Distance
Then selecting the individual F1 of the best rank, that is, all nondominated solutions appear. If the number of F1 is not enough, sub-optimal solutions called F2 will also be selected. Repeat this process until N individuals are met. Obviously, N is sure, so the selected individuals in the lowest rank need to be eliminated. In other words, only the best part of the lowest-rank individuals selected can be transferred to the next step. It can be called the lowest rank F3. The selection of the optimal solution in F3 has its own rules. The rules are called crowded distance sort.

Termination
When the condition is met, the loop ends.

ISPEA2
The defects of SPEA2 cannot be ignored. From the variation point of view, the values of crossover and mutation are invariable. Therefore, the flexibility of SPEA2 is reduced severely. This paper adopts a method to make the probabilities of crossover and variation vary with the current solution. The workflow of ISPEA2 is shown in Figure 5.
In this paper, a few concepts Chengwang and Lixin, 2010) need to be understood. The population diversity index is used to evaluate the quality of population diversity. The population diversity index is defined as H.
The m represents groups quantity, p i represents the proportion of the ith species to the whole groups. Suppose the distance of several individuals is less than D. In that case, they are very resemblance. These individuals are defined as one group. H ∈ [0, 1], The more even the distribution of the population, the greater the value of H, so it is more likely to find the suspected optimal solutions. According to the population diversity parameter H, the crossover and mutation probability values will be dynamically changed in the next step. P c P cMin + P cMax − P cMin ( ) p sin H p π 2 (26) P m P mMin + P mMax − P mMin ( ) p cos H p π 2 (27) P cMin , P cMax , P mMin and P mMax are the preset range of crossover and mutation probability values respectively. It should be noted in particular that the variation range of genetic parameters can be determined by experimenter according to the actual situation. The numerical range adopted in this paper are: P cMin 0.001, P mMax 0.1, P cMin 0.9, P cMax 0.97. It is worth mentioning that this range can be changed according to the actual needs of the researchers. In this way, the probabilities of crossover and mutation from SPEA2 are adaptive. So the algorithm performance is improved.

INSGA2
The genetic parameters of traditional NSGA2 are fixed. In this paper, dynamic genetic parameters are adopted to enhance the adaptability of the algorithm. As the number of iterations changes, the crossing probability of INSGA2 is updated according to Eq. 28. The workflow of INSGA2 is shown in Figure 6.
As the number of iterations changes, the mutation probability of INSGA2 is updated according to Eq. 29.
i is the current iteration, M is the total number of iterations. p c1max , p c1min are the maximum and minimum crossover probability, and p m1max , p m1min are the maximum and minimum mutation probability. Their range of variation can be determined by the researchers according to the actual situation. The values adopted in this paper are as follows: p c1max 0.95, p c1min 0.4, p m1max 0.1, p m1min 0.01. Researchers can change this range to suit their different needs.

SIMULATION RESULTS
Before the simulation starts, the configuration number of each kind of generator needs to be determined. The system consists of five thermal power generators, three fuel cells, two wind power generators, and two photovoltaic generators. In this paper, it is considered that the computational performance of the algorithms mentioned above for smart grid economic dispatch with fewer iterations. Before the algorithms running, the initialization individuals of the four algorithms are the same. Running the algorithms 20 times and the average valus are taked as the final results. In this paper, the output of the generators is expressed by the sum of normalized values.
As shown in Figure 7 and Tables 1-3, the number of iterations is 100. The performance of SPEA2 is better than that of NSGA2 from the point of view of the solutions. Compared with the improved algorithm, the accuracy and diversity of ISPEA2 solutions are better than that of SPEA2. INSGA2 solutions are not significantly better than NSGA2 solutions. In terms of running time, NSGA2 runs much faster than SPEA2, and INSGA2 runs faster than NSGA2.
As shown in Figure 8 and Tables 4-6, the number of iterations is 200. SPEA2 is better than NSGA2 overall. From the perspective of solutions, ISPEA2 is superior to SPEA2, while INSGA2 is not superior to NSGA2. ISPEA2 runs longer than SPEA2. In terms of running time, ISPEA2 runs slower than SPEA2, and INSGA2 runs faster than NSGA2.
As shown in Figure 9 and Tables 7-9, in this case, the solutions from INSGA2 are better than these of NSGA2. The running time of INSGA2 is less than that of NSGA2. On the other hand, the solutions produced by ISPEA2 are not obviously Frontiers in Energy Research | www.frontiersin.org December 2021 | Volume 9 | Article 767721 different from solutions of SPEA2 on the whole, and ISPEA2 has a slight advantage in obtaining lower-cost solutions. The running time of ISPEA2 is slightly longer than SPEA2. As shown in Figure 10 and Tables 10-12, the iteration number is 400. The solutions from ISPEA2 are better than those from SPEA2, and the solutions from INSGA2 are better than those from NSGA2. From the running time perspective, as before, ISPEA2 is faster than SPEA2. INSGA2 is still faster than NSGA2.
As shown in Figure 11 and Tables 13-15, the iteration number is 500. At this point, the computing power of ISPEA2     and SPEA2 tends to be the same. The solutions of INSGA2 are better than these of NSGA2. The running time of NSGA2 is significantly shorter than that of SPEA2. The running time of INSGA2 is shorter than that of NSGA2. It is important to note that the pollution emission provided by the solutions will not be zero. The main reason is that the operation cost of thermal power unit is less, and its operation stability is stronger. In actual operation, the waste caused by shutting down the thermal power unit completely and restarting it is very serious. Therefore, the minimum value of pollution emission in this paper is not zero.

CONCLUSION
This paper presents a multi-energy complementary model for smart grid economic dispatching and provides the solution to       . From the perspective of running time, ISPEA2 is slightly slower than SPEA2, and INSGA2 is slightly faster than NSGA2. In the next phase, the smart grid economic dispatching model needs to be further improved. The calculated speed of ISPEA2 still needs to be accelerated, and the accuracy of INSGA2 also needs to be improved. In summary, ISPEA2 has the best FIGURE 10 | 400 iterations.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.