Energy storage power station charging and discharging optimization method based on lattice sampling and Levy flight genetic algorithm
By applying lattice sampling and Levi flight genetic algorithm in the charging and discharging optimization of energy storage power stations, the problems of large population randomness and local optimal solutions in traditional methods are solved, and more efficient charging and discharging optimization of energy storage power stations are achieved.
Patent Information
- Application Number
- CN202411807374.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-11
AI Technical Summary
Traditional non-dominant sorting genetic algorithms have problems in the charging and discharging optimization of energy storage power stations with high randomness in the initial population and are prone to fall into local optimal solutions.
A charging and discharging optimization method for energy storage power stations based on lattice sampling and Levi flight genetic algorithm is proposed. The initial population is generated through lattice sampling, and the offspring population is generated using Levi flight strategy. Combined with the non-dominant layer division of multi-objective functions and the congestion distance calculation, the solution of Pareto frontier solution set is realized.
The problems of uneven population distribution and local optimal solutions in traditional methods are effectively avoided, and a better charging and discharging strategy for energy storage power plants is generated, which improves optimization effect and efficiency.
Smart Images

Figure CN119598879A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of energy storage power station charging and discharging optimization, and specifically relates to an energy storage power station charging and discharging optimization method based on lattice sampling and Levy flight genetic algorithm. Background Art
[0002] The optimization of charging and discharging of energy storage power stations is an important task under the background of the current market-oriented reform of the power industry, the adjustment of energy structure and the demand for sustainable development. With the popularization and application of green and low-carbon power generation technologies such as wind power generation and photovoltaic power generation, a method of using the charging and discharging of energy storage power stations according to market electricity demand to achieve the reasonable scheduling and storage of power resources can not only achieve peak shaving and valley filling, but also maximize the benefits of power resources. Therefore, it is of great significance to study the charging and discharging optimization strategy of energy storage power stations with the lowest cost and the highest benefit. The traditional non-dominated sorting genetic algorithm II is a typical multi-objective optimization method, but in terms of the optimization of charging and discharging of energy storage power stations, it still faces the shortcomings of large randomness of the initial population and easy to fall into the local optimal solution. Summary of the invention
[0003] In order to solve the above problems, the present invention proposes a method for optimizing the charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm. A method for optimizing the charging and discharging of an energy storage power station is proposed, which takes the minimization of the cost and maximization of the benefit of the energy storage power station as the objective function, and the charging and discharging of the energy storage power station and the power generation of conventional units as constraints. The problem of optimizing the charging and discharging of the energy storage power station is converted into the problem of solving the Pareto frontier solution set of charging and discharging under the condition of minimizing the cost and maximizing the benefit of the energy storage power station. A method for generating an initial population based on lattice sampling and a method for generating a sub-generation population based on Levy flight mutation are specifically designed to obtain the Pareto frontier solution set.
[0004] The energy storage power station charging and discharging optimization method based on lattice sampling and Levy flight genetic algorithm of the present invention converts the energy storage power station charging and discharging optimization problem into the problem of solving the charging and discharging Pareto front solution set. The method for solving the charging and discharging Pareto front solution set includes the following steps:
[0005] S1. Construct the cost function, benefit function, charging and discharging constraints of energy storage power stations and power generation constraints of conventional units;
[0006] S2. Under the charging and discharging constraints of the energy storage power station and the power generation constraints of the conventional units, an initial population is generated based on lattice sampling;
[0007] S3. Based on the reconstructed multi-objective function, the initial population is divided into non-dominated layers;
[0008] S4. Calculate the individual crowding distances under different dominance layers;
[0009] S5. Select the parent population;
[0010] S6 uses the Levy flight strategy to generate offspring populations;
[0011] S7. Based on the multi-objective function, the offspring population is divided into non-dominated layers and the crowding distance is calculated;
[0012] S8. Generate a new parent population based on the elite retention and replacement strategy;
[0013] S9. If the specified number of evolutionary generations is not reached, the previous parent population is replaced by the new parent population, and the evolution cycle continues from S5; if the preset number of evolutionary generations is reached, the new parent population in S8 is output, which is the required Pareto front solution set.
[0014] The energy storage power station charging and discharging constraints and conventional unit power generation constraints in S1 are as follows:
[0015]
[0016] Among them, P ch (t) is the charging power of the energy storage station, P dis (t) is the discharge power of the energy storage station, P gen (t) is the power generation capacity of conventional units, is the maximum allowable charging power, is the maximum allowable discharge power, It is the upper limit of power generation capacity of conventional units.
[0017] The lattice sampling method in S2 comprises the following steps:
[0018] S21. Generate initial lattice points using rank 1 lattice method;
[0019] S22. The initial lattice point is converted to mode 1 using the Cranley-Patterson conversion method;
[0020] S23. Calculate the weight of the lattice point after conversion;
[0021] S24. Map the lattice point weights to the population definition domain to obtain the initial population.
[0022] The initial lattice points are represented as
[0023]
[0024] in, represents the i-th initial lattice point, i=0,...,N-1, [g(a)i]modN represents the remainder after g(a)i is divided by N, g(a)=[a 0 ,a 2 ,a3 ,...,a n-1 ] T Represents an n-dimensional space vector, and the parameter a is coprime with the population size N.
[0025] The converted lattice points for
[0026]
[0027] Where Δ is the conversion factor, which is obtained by n The uniform distribution within is generated.
[0028] The weight of the lattice point after the conversion is calculated as follows
[0029]
[0030] Among them, φ -1 Represents the inverse mapping of the one-dimensional cumulative distribution φ.
[0031] The initial population generated by the lattice sampling method in S2 is
[0032] X0={x0,x1,...,x N-1}
[0033] Among them, the population space dimension is n, n = 0 is the initial population X0, the population size is N, and x i , i=0,1,2,...,N-1 is calculated as follows:
[0034]
[0035] Among them, x g =[0,0,0] T Indicates the minimum value of the charging and discharging power of the energy storage power station and the power generation power of the conventional unit, s i represents the lattice point after transformation, It indicates the maximum value of the charging and discharging power of the energy storage power station and the generating power of the conventional units.
[0036] The individual crowding distance in S4 is calculated as follows:
[0037]
[0038] Among them, L{x i} is the objective function f for the i-th individual k The crowding distance, and are the maximum and minimum values of the kth objective function in the non-dominated layer Fl, respectively.
[0039] The calculation method of the offspring individuals in the offspring population generated in S6 is:
[0040]
[0041] in, represents the offspring individual, λ represents the cloning step length, and Levy(S) represents the random trajectory of Levy flight.
[0042] The Levy (S) calculation method is as follows
[0043]
[0044] Among them, N(0,σ 2 ) represents a normal distribution with mean 0 and variance σ, N(0,1) represents a standard normal distribution with mean 0 and variance 1, and β is usually 1.5.
[0045] The beneficial effects of the present invention are:
[0046] (1) The present invention converts the energy storage power station charging and discharging optimization problem into the problem of solving the charging and discharging Pareto frontier solution set under the condition of minimizing the cost of the energy storage power station and maximizing the benefit by constructing the energy storage power station cost function, benefit function, energy storage power station charging and discharging constraints and conventional unit power generation constraints.
[0047] (2) Under the constraints of energy storage power station charging and discharging and conventional unit power generation, the present invention proposes an initialization population generation method based on lattice sampling, which solves the shortcoming of uneven spatial distribution of random population under multi-objective optimization.
[0048] (3) The present invention generates offspring populations based on the Levy flight strategy, which can effectively avoid the disadvantage that traditional mutation methods are prone to falling into local optimal solutions.
[0049] (4) The present invention designs a non-dominated sorting of the population based on minimizing the cost and maximizing the benefit of the energy storage power station, which can ensure that the solution set is the Pareto optimal solution set.
[0050] (5) The present invention designs an elite retention and replacement strategy based on the parent and child generations, which can further narrow the range of the optimal solution set and shorten the optimization time. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a block diagram of the energy storage power station charging and discharging optimization method based on lattice sampling and Levy flight genetic algorithm.
[0052] Figure 2 It is the algorithm flow chart of the present invention. DETAILED DESCRIPTION
[0053] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present invention, but should not be understood as limiting the present invention.
[0054] The energy storage power station charging and discharging optimization method based on lattice sampling and Levy flight genetic algorithm of the present invention converts the energy storage power station charging and discharging optimization problem into the problem of solving the charging and discharging Pareto front solution set. The method for solving the charging and discharging Pareto front solution set includes the following steps:
[0055] S1. Construct the cost function, benefit function, charging and discharging constraints of energy storage power station and power generation constraints of conventional units of energy storage power station; S1 constructs the cost function f of energy storage power station respectively e , and the energy storage power station benefit function f p , the specific process is as follows:
[0056] S11 constructs the energy storage power station cost function f e The form is as follows:
[0057]
[0058] Among them, f s (t) is the life cost of the energy storage power station, f g (t) is the power generation cost of conventional units, f w (t) is the cost of wind power generation, f p (t) is the operation and maintenance cost of photovoltaic cells, f l (t) is the demand side response cost, which is expressed as follows:
[0059] S111. Energy storage power station life cost function f s :
[0060]
[0061] Among them, C e (t) represents the battery power loss cost, Ω represents the set of nodes in the system that are allowed to configure energy storage, and P ch (t) and P dis (t) represent the charging power and discharging power of the energy storage device at node k in the set, respectively.
[0062] S112. Constructing the power generation cost function f of conventional units g :
[0063]
[0064] Among them, Ω g represents the set of nodes connected to conventional units, P gen (t) represents the power generation of conventional units, C k2(t), C k1 (t) and C k0 Represents the power generation cost coefficient of conventional unit k.
[0065] S113. Constructing wind power generation cost function f w :
[0066] f w (t) = K w (t)P w-out (t) (4)
[0067] Among them, K w (t) represents the power generation cost per unit of wind power, P w-out (t) represents the actual output power of wind power generation.
[0068] S114. Construct photovoltaic cell operation and maintenance cost function f p :
[0069] f p (t) = K p (t)P p-out (t) (5)
[0070] Among them, K p (t) is the unit power operation and maintenance cost of photovoltaic cells, P p-out (t) represents the actual output power of the photovoltaic cell.
[0071] S115. Constructing demand-side response cost function f l :
[0072]
[0073] Among them, C l (t) represents the unit power loss cost on the demand side, Ω l Represents the set of interruptible load nodes in the system, and P load (t) represent the peak load power and actual load power at the interruptible load node k respectively.
[0074] S12. Constructing the energy storage power station benefit function f p The form is as follows:
[0075]
[0076] in, is the peak-time electricity price, P ch (t) is the discharge amount, is the off-peak electricity price, P dis (t) is the discharge capacity, N is the number of daily charge and discharge times, D is the average annual consumption days, P bTo subsidize income.
[0077] S13. With the goal of maximizing the negative value of the benefit function and the cost function, the objective function to be optimized for the energy storage power station is constructed. For the convenience of calculation, the objective function to be optimized is rewritten into the following form:
[0078]
[0079] Among them, when f1 takes the maximum value, it means the corresponding cost is the minimum; when f2 takes the maximum value, it means the benefit is the maximum.
[0080] S14. Construct charging and discharging constraints and conventional unit power generation constraints as follows:
[0081]
[0082] Among them, P ch (t) is the charging power of the energy storage station, P dis (t) is the discharge power of the energy storage station, P gen (t) is the power generation capacity of conventional units, is the maximum allowable charging power, is the maximum allowable discharge power, It is the upper limit of power generation capacity of conventional units.
[0083] S2. Under the constraints of energy storage power station charging and discharging and conventional unit power generation, the initial population is generated based on lattice sampling; the initial population generation based on lattice sampling is based on the energy storage power station charging and discharging power P ch (t) and P dis (t), and the power generation capacity of conventional units P gen (t), using the lattice sampling method, generate the initial population X0 = {x0, x1, ..., x N-1}, the population space dimension is n, the population size is N, and the specific process is as follows:
[0084] S21. Generate the initial lattice points using the rank 1 lattice method. The specific calculation is as follows
[0085]
[0086] in, represents the i-th initial lattice point, L represents the flag of the lattice sampling method, i=0,...,N-1, [g(a)i]modN represents the remainder after g(a)i is divided by N, g(a)=[a 0 ,a 2 ,a 3 ,...,a n-1 ] T Represents an n-dimensional space vector, and the parameter a is coprime with the population size N.
[0087] S22. The initial lattice points are converted to modulo 1 using the Cranley-Patterson conversion method to obtain unbiased sampling. The converted initial sampling points It can be expressed as follows:
[0088]
[0089] Where Δ is the conversion factor, which is obtained by n The uniform distribution within is generated.
[0090] S23. For the transformed lattice points The weight of each lattice point can be calculated as follows.
[0091]
[0092] Among them, φ -1 Represents the inverse mapping of the one-dimensional cumulative distribution φ.
[0093] S24. Map the lattice point weights to the population domain to obtain the initial population X0 = {x0, x1, ..., x N-1}, and x i , i=0,1,2,...,N-1 is calculated as follows:
[0094]
[0095] Among them, x g =[0,0,0] T It indicates the minimum value of the charging and discharging power of the energy storage power station and the power generation power of the conventional unit. It indicates the maximum value of the charging and discharging power of the energy storage power station and the generating power of the conventional units.
[0096] S3. Based on the reconstructed multi-objective function, the initial population is divided into non-dominated layers;
[0097] S31. For each individual x in the initial population X0 i , calculate the corresponding objective function value, that is, calculate the objective functions f1 and f2 corresponding to all individuals.
[0098] S32. For any individual x i and x j , if for any objective function of the cost objective function and the benefit objective function, there exists f1(x i )≥f1(x j ) and f2(x i )≥f2(x j ) holds, and f1(x i )>f1(x j) or f2(x i )>f2(x j ) holds true, then x i dominatex j , for all individuals x i , calculate the number of dominated individuals z i and the set b it dominates i .
[0099] S33. Initialize z for each individual i =0 and For each individual x i Traverse all individuals x in the population j , if x i dominatex j , then b i =b i ∪{x j}, otherwise if x j dominatex i , then z i =z i +1, then all z i = 0 is taken as the first non-dominated layer F1. The next non-dominated layer F2 is calculated in sequence. This process continues until all individuals in population X0 are stratified. The lth non-dominated layer is recorded as F1.
[0100] S4. Calculate the individual crowding distances under different dominance layers;
[0101] S41. Assume that the non-dominated layer Fl contains d individuals, for each objective function f k , k = 1 or 2, the individuals in this layer are classified according to the objective function value f k Sort from largest to smallest.
[0102] S42. Let the initial crowding distance of the i-th individual be L{x i}=0, and assume that the crowding distance of individuals at both ends of the sequence is L{x0}=L{x d}=M, where M is an arbitrary number with a large value. For the middle individual, the crowding distance is calculated as follows.
[0103]
[0104] Among them, L{x i} is the i-th individual for f k The crowding distance, and are the maximum and minimum values of the kth objective function value in the Fl layer, respectively. Repeat steps S41 and S42 to calculate the individual crowding distances for the two objective functions of energy storage power station cost and energy storage power station benefit.
[0105] S5. Select the parent population;
[0106] According to the divided non-dominated layers and crowding distance, individuals in the lower dominated layers are given priority. If they are in the same dominated layer, individuals with a larger crowding degree are selected to obtain the parent population P with non-dominated sorting. t .
[0107] S6 uses the Levy flight strategy to generate offspring populations;
[0108] The parent population is cloned through the Levy flight strategy. t Individual x in i , the newly generated offspring individuals are The calculation process is as follows:
[0109]
[0110] λ represents the cloning step length, Levy(S) represents the random trajectory of Levy flight, and the calculation process of Levy(S) is as follows:
[0111]
[0112] Among them, N(0,σ 2 ) represents a normal distribution with mean 0 and variance σ, N(0,1) represents a standard normal distribution with mean 0 and variance 1, and β is usually 1.5.
[0113] S7. Based on the multi-objective function, the offspring population is divided into non-dominated layers and the crowding distance is calculated;
[0114] Repeat steps S3 to S4. According to the divided non-dominated layers and crowding distance, give priority to individuals in the lower dominated layers. If they are in the same dominated layer, select individuals with a larger crowding degree. In this way, the offspring population R with non-dominated sorting is obtained. t .
[0115] The S7 method is similar to the S5 method, except that the S5 method selects the parent population (few individuals, prone to local optimality), while the S7 method is based on the S6 process: it is equivalent to obtaining a new population after mutation based on the S5 parent population, and then obtaining a new offspring population through similar S7 steps. (The method remains the same, but the population individuals in S7 have changed, and new offspring have been obtained.)
[0116] S8. Generate a new parent population based on the elite retention and replacement strategy;
[0117] For the parent population P obtained in S5 t , retain its previous individuals, and use the offspring population R t Before individuals to replace P t After individuals, forming a new parent population P t ′.
[0118] S9. If the specified number of evolutionary generations is not reached, a new parent population P is used. t ′Replace the previous generation parent population P t , and continue to execute in a loop from S5; if the preset evolutionary generation is reached, the new parent population P in S8 is output t ′, which is the desired Pareto front solution set.
[0119] Output population P t Each individual in ′ represents a Pareto optimal solution. In applications, the energy storage power station can weigh the cost and benefit of the energy storage power station according to the electricity demand in different periods, and select an individual from the Pareto frontier solution set as the optimal charge and discharge amount.
[0120] In the present invention, the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0121] Although the above embodiments have been shown and described, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. Changes, modifications, substitutions and variations of the above embodiments by those of ordinary skill in the art are all within the scope of protection of the present invention.
Claims
1. A method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm, characterized in that: The charging and discharging optimization problem of the energy storage power station is converted into a problem of solving the charging and discharging Pareto frontier solution set. The method for solving the charging and discharging Pareto frontier solution set includes the following steps: S1. Construct the cost function, benefit function, charging and discharging constraints of energy storage power stations and power generation constraints of conventional units; S2. Under the charging and discharging constraints of the energy storage power station and the power generation constraints of the conventional units, an initial population is generated based on lattice sampling; S3. Based on the reconstructed multi-objective function, the initial population is divided into non-dominated layers; S4. Calculate the individual crowding distances under different dominance layers; S5. Select the parent population; S6 uses the Levy flight strategy to generate offspring populations; S7. Based on the multi-objective function, the offspring population is divided into non-dominated layers and the crowding distance is calculated; S8. Generate a new parent population based on the elite retention and replacement strategy; S9. If the specified number of evolutionary generations is not reached, the previous parent population is replaced by the new parent population, and the evolution cycle continues from S5; if the preset number of evolutionary generations is reached, the new parent population in S8 is output, which is the required Pareto front solution set.
2. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 1, characterized in that: The energy storage power station charging and discharging constraints and conventional unit power generation constraints in S1 are as follows: Among them, P ch (t) is the charging power of the energy storage station, P dis (t) is the discharge power of the energy storage station, P gen (t) is the power generation capacity of conventional units, is the maximum allowable charging power, is the maximum allowable discharge power, It is the upper limit of power generation capacity of conventional units.
3. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 1, characterized in that: The lattice sampling method in S2 comprises the following steps: S21. Generate initial lattice points using a rank 1 lattice method; S22. The initial lattice point is converted to mode 1 using the Cranley-Patterson conversion method; S23. Calculate the weight of the lattice point after conversion; S24. Map the lattice point weights to the population definition domain to obtain the initial population.
4. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 3 is characterized in that: The initial lattice points are represented as in, represents the i-th initial lattice point, i=0,...,N-1, [g(a)i]modN represents the remainder after g(a)i is divided by N, g(a)=[a 0 ,a 2 ,a 3 ,...,a n-1 ] T Represents an n-dimensional space vector, and the parameter a is coprime with the population size N.
5. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 3, characterized in that: The converted lattice points for Where Δ is the conversion factor, which is obtained by n The uniform distribution within is generated.
6. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 3, characterized in that: The weight of the lattice point after the conversion is calculated as follows Among them, φ -1 Represents the inverse mapping of the one-dimensional cumulative distribution φ.
7. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 1, characterized in that: The initial population generated by the lattice sampling method in S2 is X0={x0,x1,...,x N-1 } Among them, the population space dimension is n, n = 0 is the initial population X0, the population size is N, and x i , i=0,1,2,...,N-1 is calculated as follows: Among them, x g =[0,0,0] T Indicates the minimum value of the charging and discharging power of the energy storage power station and the power generation power of the conventional unit, s i represents the lattice point after transformation, It indicates the maximum value of the charging and discharging power of the energy storage power station and the generating power of the conventional units.
8. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 1, characterized in that: The individual crowding distance in S4 is calculated as follows: Among them, L{x i } is the objective function f for the i-th individual k The crowding distance, and are the maximum and minimum values of the kth objective function in the non-dominated layer Fl, respectively.
9. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 1, characterized in that: The calculation method of the offspring individuals in the offspring population generated in S6 is: in, represents the offspring individual, λ represents the cloning step length, and Levy(S) represents the random trajectory of Levy flight.
10. The method for optimizing charging and discharging of an energy storage power station based on lattice sampling and Levy flight genetic algorithm according to claim 5, characterized in that: The Levy (S) calculation method is as follows Among them, N(0,σ 2 ) represents a normal distribution with mean 0 and variance σ, N(0,1) represents a standard normal distribution with mean 0 and variance 1, and β is usually 1.5.