Reactive power optimization method of distribution network based on ephemera algorithm

By improving the Mayfly algorithm, combining Levy flight and random inertia weight coefficients, optimizing the global search capability and convergence speed of the Mayfly algorithm, the problem of unstable grid voltage is solved, the optimal optimization of the active power loss of the entire network is achieved, and the power of the grid is improved. quality.

CN114389277BInactive Publication Date: 2024-09-06FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210029993.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2024-09-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

After the power system is connected to distributed power sources, the grid voltage is unstable, resulting in uneven distribution of reactive power and affecting the system voltage level. The existing technology lacks a reasonable basis for finding loss reduction solutions and is difficult to effectively optimize.

Method used

The mayfly algorithm is improved and combined with Levy flight and random inertia weight coefficients to enhance the global search capability and convergence speed. By updating the speed and position of male and female mayflies, the power flow calculation is optimized to find the optimal solution for the active power loss of the entire network.

Benefits of technology

The global search capability and convergence speed of the Mayfly algorithm are significantly improved, and the optimal solution to reduce the active power loss of the entire network can be found faster, which is superior to traditional methods and achieves more efficient reactive power optimization of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114389277B
    Figure CN114389277B
Patent Text Reader

Abstract

The present invention relates to a reactive power optimization method for a distribution network based on an ephemera algorithm, which is used to solve the problem that there is no reasonable basis for finding a loss reduction solution for a power system. By combining the advantages of Levy flight and random inertia weight coefficient, the basic ephemera algorithm is improved, and the global search capability and convergence speed of the ephemera algorithm are enhanced, so as to find the optimal solution for reducing the active power loss of the whole network more quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of reactive power optimization of power systems, and in particular to a reactive power optimization method for a distribution network based on an ephemeral algorithm. Background Art

[0002] When evaluating the reliability and economy of the power system, two indicators are often used for measurement, including the degree of deviation of the voltage level during actual operation and the size of the active power loss of line transmission, that is, network loss. With the continuous complexity of the power grid structure, the number of access to various distributed power sources (such as photovoltaic power generation, wind power generation, etc.) has increased, and the power generation output is unstable, resulting in a more unstable voltage level in the power grid than before. The distribution of the system's reactive power is one of the main factors affecting the system's voltage level. When the system has surplus reactive power, the voltage level of some nodes will be high; when the reactive power in the system cannot meet the load demand, the voltage level of some nodes will be low, thereby reducing the power quality of the system and affecting the power consumption on the user side to a certain extent. When adjusting the voltage, some voltage regulation measures will be adopted, such as changing the transformer tap, investing in electrostatic capacitors, etc. The essence of these voltage regulation measures is to adjust the reactive power distribution of the system so that the voltage of each node meets the operating requirements. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a distribution network reactive power optimization method based on the mayfly algorithm to solve the problem that there is no reasonable basis for the power system to find a loss reduction solution. By combining the advantages of Levy flight and random inertia weight coefficient, the basic mayfly algorithm is improved, and the global search capability and convergence speed of the mayfly algorithm are enhanced, so as to find the optimal solution to reduce the active power loss of the whole network more quickly.

[0004] To achieve the above object, the present invention adopts the following technical solution:

[0005] A reactive power optimization method for a distribution network based on an ephemeral algorithm comprises the following steps:

[0006] Step S1: Obtain the original data of the distribution network system and initialize the basic parameters of the Mayfly algorithm;

[0007] Step S2: randomly generate an initial population according to the range of control variable values, divide the population into two categories: female and male, and calculate the initial power flow and initial network loss to obtain the fitness value of each population;

[0008] Step S3: updating the speed and position of the female mayfly according to the Levy flight and random inertia weight coefficients respectively, substituting the updated position into the power flow calculation program to obtain a new fitness value, and updating the individual optimum if the new fitness value is better than the individual optimum;

[0009] Step S4: updating the speed and position of the male mayfly according to the Levy flight and random inertia weight coefficients respectively, obtaining the new fitness of the male mayfly through the power flow calculation program, and updating the individual optimum if it is better than the individual optimum, and comparing it with the global optimum at the same time, and updating the global optimum if it is better than the global optimum;

[0010] Step S5: arranging the male and female individuals from best to worst according to their fitness, and mating the male and female individuals of the same level to produce offspring mayflies;

[0011] Step S6: performing mutation operation on the offspring mayfly;

[0012] Step S7: Sort all the mayfly individuals in the space according to their fitness values, and select excellent individuals with the same number as the initial population.

[0013] Step S8: Determine whether the iteration end condition is met. If it is met, exit the loop and output the optimal solution to obtain the optimal optimization solution. Otherwise, return to step 3.

[0014] Furthermore, the original data includes node information and branch information.

[0015] Furthermore, the step S3 is specifically as follows:

[0016] According to formula (1) and formula (3) combining Levy flight and random inertia weight coefficient, the speed and position of the female mayfly are updated respectively; at the same time, the updated position is substituted into the flow calculation program to obtain a new fitness value. If the new fitness value is better than the individual optimal value, the individual optimal value is updated.

[0017]

[0018] in, is the velocity of the i-th female mayfly in the j-th dimension in the n-th iteration; is the position of the i-th female mayfly on the j-th dimension in the n-th iteration; gbest j represents the global optimal position in the jth dimension; a2 is a positive attraction coefficient; r mf represents the Euclidean distance between the female mayfly and the corresponding male mayfly; β is the fixed visibility coefficient of the mayfly, which is used to limit the visibility range of the mayfly; Levy (λ) represents the random search vector whose jump step size follows the Levy distribution; represents vector operation; g is the inertia weight coefficient, satisfying formula (2)

[0019] g=g min +(g max -g min )*rand()+σ*randn() (2)

[0020] Among them, gmin , g max are the minimum and maximum values ​​of the inertia weight coefficient respectively; rand() is a random number uniformly distributed within (0,1); randn() is a random number with a normal distribution; σ is the variance, which indicates the degree of deviation between g and its mathematical expectation;

[0021]

[0022] in, is the position of the i-th female mayfly in the j-th dimension in the n+1-th iteration.

[0023] Furthermore, the step S4 is specifically as follows: updating the speed and position of the male mayfly according to equations (4) and (5) combined with Levy flight and random inertia weight coefficient; obtaining the new fitness of the male mayfly through a tidal current calculation program, and updating the individual optimum if it is better than the individual optimum, and comparing it with the global optimum at the same time, and updating the global optimum if it is better than the global optimum;

[0024]

[0025] in, is the velocity of the ith male mayfly in the jth dimension in the nth iteration, is the position of the ith male mayfly on the jth dimension in the nth iteration, a1 represents the size of the individual cognitive component, a2 represents the size of the social cognitive component, and pbest ij represents the best position that the i-th male mayfly has ever reached in the j-th dimension;

[0026]

[0027] in, is the position of the i-th mayfly in the j-th dimension in the n+1-th iteration.

[0028] Furthermore, the step S5 is specifically as follows: the male and female individuals are arranged from best to worst according to their fitness, and the male and female individuals of the same level are mated according to formula (6) and formula (7).

[0029] Operation to produce offspring ephemera

[0030] offspring1=L*x m +(1-L)x fm (6)

[0031] offspring1=L*x fm +(1-L)x m (7)

[0032] Where L is a random number with a value range of (0, 1); xm 、x fm They are male and female individuals respectively.

[0033] Furthermore, the step S6 specifically includes: performing mutation operation on some of the offspring mayflies according to formula (8).

[0034] offspring n =offspring n +σN(0,1) (8)

[0035] Where σ is the standard deviation of the normal distribution, and N(0,1) is the standard normal distribution with a mean of 0 and a variance of 1.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The present invention aims to solve the problem that there is no reasonable basis for finding loss reduction solutions in power systems. By combining the advantages of Levy flight and random inertia weight coefficient, the basic mayfly algorithm is improved, and the global search capability and convergence speed of the mayfly algorithm are enhanced, so as to find the optimal solution to reduce the active power loss of the entire network more quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a flow chart for implementing the method of the present invention.

[0039] Figure 2 It is a comparison diagram of the convergence of the embodiment of the present invention and other algorithms. DETAILED DESCRIPTION

[0040] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0041] Please refer to Figure 1 The present invention provides a method for reactive power optimization of a distribution network based on an ephemera algorithm, comprising the following steps:

[0042] Step S1: Read the original data of the system, including node information and branch information, and initialize basic parameters, including population size, number of iterations, etc.

[0043] Step S2: Randomly generate the initial population according to the range of control variable values, divide the population into female and male categories, and calculate the initial flow and initial network loss to obtain the fitness value of each population, and set the initial speed to 0.

[0044] Step S3: Update the speed and position of the female mayfly according to equation (1) and equation (3) respectively. In equation (1), when the fitness of the female mayfly is better than that of the male mayfly, the female mayfly no longer flies randomly, but updates its speed in the solution space according to the Levy flight rule. Substitute the updated speed into equation (3) to obtain the new position, and substitute it into the power flow calculation program to obtain the new fitness value. If the new fitness value is better than the individual optimal value, the individual optimal value is updated.

[0045]

[0046] in, is the velocity of the i-th female mayfly in the j-th dimension in the n-th iteration; is the position of the ith female mayfly on the jth dimension in the nth iteration; a2 is a positive attraction coefficient; r mf represents the Euclidean distance between the female mayfly and the corresponding male mayfly; β is the fixed visibility coefficient of the mayfly, which is used to limit the visibility range of the mayfly; Levy (λ) represents the random search vector whose jump step size follows the Levy distribution. represents vector operation. g is the velocity inertia weight coefficient, which is no longer set to a constant and satisfies equation (2).

[0047] g=g min +(g max -g min )*rand()+σ*randn() (2)

[0048] Among them, g min , g max are the minimum and maximum values ​​of the inertia weight coefficient respectively; rand()

[0049] is a random number uniformly distributed within (0,1); randn() is a random number with a normal distribution; σ is the variance, which indicates the degree of deviation between g and its mathematical expectation, which is conducive to the evolution of the algorithm in the expected direction.

[0050]

[0051] in, is the position of the i-th female mayfly in the j-th dimension in the n+1-th iteration.

[0052] Step S4: updating the speed and position of the male mayfly according to equation (4) and equation (5);

[0053] (4) When the individual fitness of the male mayfly is better than the global optimum, the speed update rule introduces Levy flight, so that the speed is updated according to the rule and the position is updated according to formula (5). The new fitness of the male mayfly is obtained through the power flow calculation program. If it is better than the individual optimum, the individual optimum is updated and compared with the global optimum. If it is better than the global optimum, the global optimum is updated.

[0054]

[0055] in, is the velocity of the ith male mayfly in the jth dimension in the nth iteration, is the position of the ith male mayfly on the jth dimension in the nth iteration, a1 represents the size of the individual cognitive component, a2 represents the size of the social cognitive component, and pbest ij represents the best position reached by the ith male mayfly in the jth dimension; g is the speed inertia weight coefficient.

[0056]

[0057] in, is the position of the i-th male mayfly in the j-th dimension in the n+1-th iteration.

[0058] Step S5: Arrange the male and female individuals according to their fitness from best to worst, and mate the male and female individuals of the same level according to equations (6) and (7) to produce offspring mayflies.

[0059] offspring1=L*x m +(1-L)x fm (6)

[0060] offspring1=L*x fm +(1-L)x m (7)

[0061] Where L is a random number with a value range of (0, 1); x m 、x fm They are male and female individuals respectively.

[0062] Step S6: Perform mutation operation on some offspring mayflies according to formula (8).

[0063] offspring n =offspring n +σN(0,1)\*MERGEFORMAT (2-8)

[0064] Where σ is the standard deviation of the normal distribution, and N(0,1) is the standard normal distribution with a mean of 0 and a variance of 1.

[0065] Step S7: Sort all the mayfly individuals in the space according to their fitness values, and select excellent individuals with the same number as the initial population.

[0066] Step S8: Determine whether the iteration end condition is met. If so, exit the loop and output the optimal solution. Otherwise, return to step 3.

[0067] Embodiment 1:

[0068] In this embodiment, for IEEE30, the following steps are specifically included:

[0069] Step S1: Obtain all the original data of the IEEE 30-node standard test system, initialize the male and female mayfly population size, the maximum number of iterations, the upper and lower limits of the speed, and the upper and lower limits of the inertia weight coefficient.

[0070] Step S2: Select the generator terminal voltage, the tap position of the on-load transformer, and the number of parallel capacitor groups as control variables, and the voltage and phase angle of each node as state variables; set the upper and lower limits of each variable, as shown in Table 1, and initialize the male and female mayfly populations according to the upper and lower limits; use the initial control variable values ​​to substitute into the power flow calculation program, use the total active network loss as the fitness value, and initialize the individual optimum and the global optimum.

[0071] Table 1 Constraints of variables (pu)

[0072]

[0073] Step S3: Update the speed and position of the male mayfly according to formula (4) and formula (5) that introduce Levy flight and random inertia weight coefficient, substitute the updated result into the power flow calculation program to obtain the new network loss value, compare the fitness with the historical individual optimum and the global optimum and update it according to the rules; update the speed and position of the female mayfly according to formula (1) and formula (3) combined with Levy flight and random inertia weight coefficient, and substitute the new control variable value into the power flow calculation program to obtain the network loss value.

[0074] Step S4: Sort the male and female individuals according to their fitness values, mate the male and female individuals with the same ranking according to formula (6) and formula (7) to obtain two mayfly offspring, substitute them into the power flow calculation program to obtain the fitness value, and update the global optimum according to the rules; select some offspring according to the set mutation rate, perform mutation operation on the selected offspring according to formula (1-8), evaluate the fitness of the mutated offspring using the power flow calculation program, and update the global optimum according to the rules;

[0075] Step S5: Sort all individuals according to their fitness, take the same number of mayfly individuals as the preset population size as the objects of the next iteration, and divide these individuals into male and female groups; determine whether the maximum number of iterations has been reached. If not, return to step S3, otherwise exit the loop.

[0076] Step S6: Comparison and verification. The standard IEEE 30-node system is selected as the experimental object, and the basic ephemera algorithm and particle swarm method are used to optimize the reactive power of the system, and the reactive power optimization results of the improved ephemera method proposed in the present invention are compared. The values ​​of the control variables after optimization by the three methods are shown in Table 2, and the fitness convergence curves are compared. Figure 2 The loss reduction benefit comparison results are shown in Table 3.

[0077] Table 2 Comparison of reactive power optimization results of IEEE-30 bus system (pu)

[0078]

[0079]

[0080] Table 3 Active network loss after optimization of IEEE 30-bus system

[0081]

[0082] According to the final results of optimizing the system by the three methods, it can be seen from Table 3 that when optimizing the reactive power of the IEEE 30-node system, the improved MA method, the MA method and the PSO method can all reduce the total active network loss of the system, but the improved MA method proposed in the present invention has the best loss reduction effect.

[0083] See Figure 2 As shown in the figure, the number of iterations of the three algorithms is set to 200 times. After 200 iterations, each algorithm can converge to the global optimal solution. In the early stage of iteration, the MA algorithm needs 40 iterations to converge to the global optimum, while the PSO algorithm needs 100 iterations. The MA algorithm converges faster than the PSO algorithm. After many experiments, it was found that both the MA algorithm and the PSO algorithm will converge to the local optimum during the iteration process. After adding Levy flight and random inertia weight coefficients to the MA algorithm, the ProMA algorithm can escape from the local optimal solution and continue to evolve in the direction of the global optimum. The ProMA algorithm introduces a new position update strategy, which enhances the diversity of the population during the optimization process and the ability to escape the local optimum, so that the global search capability of the MA algorithm is improved, and the algorithm performance is better than the other two algorithms.

[0084] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A reactive power optimization method for distribution network based on the mayfly algorithm, characterized in that: The following steps are involved: Step S1: Obtain the original data of the distribution network system and initialize the basic parameters of the Mayfly algorithm; Step S2: randomly generate an initial population according to the range of control variable values, divide the population into two categories: female and male, and calculate the initial power flow and initial network loss to obtain the fitness value of each population; Step S3: updating the speed and position of the female mayfly according to the Levy flight and random inertia weight coefficients respectively, substituting the updated position into the power flow calculation program to obtain a new fitness value, and updating the individual optimum if the new fitness value is better than the individual optimum; Step S4: updating the speed and position of the male mayfly according to the Levy flight and random inertia weight coefficients respectively, obtaining the new fitness of the male mayfly through the power flow calculation program, and updating the individual optimum if it is better than the individual optimum, and comparing it with the global optimum at the same time, and updating the global optimum if it is better than the global optimum; Step S5: arranging the male and female individuals from best to worst according to their fitness, and mating the male and female individuals of the same level to produce offspring mayflies; Step S6: performing mutation operation on the offspring mayfly; Step S7: sort all the mayfly individuals in the space according to their fitness values, and select excellent individuals with the same number as the initial population; Step S8: Determine whether the iteration end condition is met. If it is met, exit the loop and output the optimal solution to obtain the optimal optimization solution. Otherwise, return to step 3.

2. The method for reactive power optimization of distribution network based on the mayfly algorithm according to claim 1, characterized in that: The original data includes node information and branch information.

3. The method for reactive power optimization of distribution network based on the mayfly algorithm according to claim 1, characterized in that: The step S3 is specifically as follows: According to formula (1) and formula (3) combining Levy flight and random inertia weight coefficient, the speed and position of the female mayfly are updated respectively; at the same time, the updated position is substituted into the flow calculation program to obtain a new fitness value. If the new fitness value is better than the individual optimal value, the individual optimal value is updated. in, is the velocity of the i-th female mayfly in the j-th dimension in the n-th iteration; is the position of the i-th female mayfly on the j-th dimension in the n-th iteration; gbest j represents the global optimal position in the jth dimension; a2 is a positive attraction coefficient; r mf represents the Euclidean distance between the female mayfly and the corresponding male mayfly; β is the fixed visibility coefficient of the mayfly, which is used to limit the visibility range of the mayfly; Levy (λ) represents the random search vector whose jump step size follows the Levy distribution; represents vector operation; g is the inertia weight coefficient, satisfying formula (2) g=g min +(g max -g min )*rand()+σ*randn() (2) Among them, g min , g max are the minimum and maximum values ​​of the inertia weight coefficient respectively; rand() is a random number uniformly distributed within (0,1); randn() is a random number with a normal distribution; σ is the variance, which indicates the degree of deviation between g and its mathematical expectation; in, is the position of the i-th female mayfly in the j-th dimension in the n+1-th iteration.

4. The method for reactive power optimization of distribution network based on the mayfly algorithm according to claim 1, characterized in that: The step S4 specifically includes: updating the speed and position of the male mayfly according to equations (4) and (5) combined with Levy flight and random inertia weight coefficient; obtaining the new fitness of the male mayfly through a tidal current calculation program, and updating the individual optimum if it is better than the individual optimum, and comparing it with the global optimum at the same time, and updating the global optimum if it is better than the global optimum; in, is the velocity of the ith male mayfly in the jth dimension in the nth iteration, is the position of the ith male mayfly on the jth dimension in the nth iteration, a1 represents the size of the individual cognitive component, a2' represents the size of the social cognitive component, and pbest ij represents the best position that the i-th male mayfly has ever reached in the j-th dimension; in, is the position of the i-th male mayfly in the j-th dimension in the n+1-th iteration.

5. The method for reactive power optimization of distribution network based on the mayfly algorithm according to claim 1, characterized in that: The step S5 is specifically as follows: the male and female individuals are arranged in descending order according to their fitness, and the male and female individuals of the same level are mated according to formula (6) and formula (7) to produce offspring mayflies. offspring1=L*x m +(1-L)x fm (6) offspring1=L*x fm +(1-L)x m (7) Where L is a random number with a value range of (0, 1); x m 、x fm They are male and female individuals respectively.

6. The method for reactive power optimization of distribution network based on the mayfly algorithm according to claim 1, characterized in that: The step S6 specifically includes: performing mutation operation on some offspring mayflies according to formula (8); offspring n =offspring n +σN(0,1) (8) Where σ is the standard deviation of the normal distribution, and N(0,1) is the standard normal distribution with a mean of 0 and a variance of 1.