A double-layer optimization algorithm applied to high-proportion new energy access distribution network
Patent Information
- Application Number
- CN202611011048.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-09-22
AI Technical Summary
[0005]本发明的目的在于提供一种应用于高比例新能源接入配电网的双层优化算法,有效求解高比例新能源接入配电网的优化配置问题,提供更加合理的配电网规划和能量调度方案,以解决传统智能优化算法存在易受初始种群分布和寻优策略的影响,导致收敛速度慢精度低,易收敛到局部最优解的问题
[0077]1.本发明采用改进的双层嵌套优化算法对模型进行求解,算例分析结果表示该嵌套优化算法能够有效求解高比例新能源接入配电网的优化配置问题,该双层优化模型既具备长期规划的合理性,又有应对日内功率波动的灵活性,得出合理的配电网规划和能量调度方案,提高了配电网的稳定性和经济性。
Smart Images

Figure CN122801446A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grids, and in particular to a two-layer optimization algorithm for distribution networks with a high proportion of renewable energy sources. Background Technology
[0002] In recent years, to achieve the dual carbon goals of carbon peaking and carbon neutrality, renewable energy power generation has become an important direction for the future development of my country's power system. The connection of a large number of new energy power generation systems to smart distribution networks has effectively alleviated the power supply pressure of the power system. However, photovoltaic power generation facilities are greatly affected by weather and have a certain degree of volatility and randomness, which will impact the power grid, causing problems such as voltage fluctuations and line losses. Adding energy storage systems can effectively alleviate these problems. Therefore, reasonable distribution network planning and energy dispatch are an important way to effectively reduce the dependence of energy users on the large power grid and improve the overall power grid security and economy.
[0003] To effectively plan distribution networks, numerous optimization algorithms have been applied to solve multi-objective programming models. However, many intelligent algorithms suffer from the tendency to get trapped in local optima and slow convergence. Some scholars have proposed an improved Osprey optimization algorithm and a nested algorithm of the third-generation Nondominated Sorting Genetic Algorithms III (NSGAIII) to solve these models. For example, the published paper "A Centralized Hybrid Energy Storage Site Selection and Capacity Optimization Method for Smart Distribution Networks with Distributed Photovoltaic Access" (Power Grid Technology, ISSN 1000-3673, Dec 3, 2024) introduces a set of optimal points, Lévy perturbations, and adaptive differential evolution. Other scholars have used a Multi-Objective Grey Wolf Optimization (MOGWO) algorithm combined with a General Algebraic Modeling System (GAMS) to obtain non-dominated Pareto optimal solutions, as seen in the published paper "Optimizing Hydrogen Systems and Demand Response for Enhanced Integration of RES and EVsin". The paper, published in IEEE Transactions on Smart Grid, vol 16, March 2025, explores ways to improve population diversity and optimization capabilities.
[0004] The algorithms proposed in the above literature are suitable for high-dimensional multi-objective optimization calculations, but they still have problems such as slow convergence speed and easy getting trapped in local optima. Summary of the Invention
[0005] The purpose of this invention is to provide a two-layer optimization algorithm for distribution networks with a high proportion of renewable energy access, which can effectively solve the optimization configuration problem of distribution networks with a high proportion of renewable energy access, and provide a more reasonable distribution network planning and energy dispatch scheme. This solves the problem that traditional intelligent optimization algorithms are easily affected by the initial population distribution and optimization strategy, resulting in slow convergence speed, low accuracy, and easy convergence to local optima.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A two-layer optimization algorithm for high-proportion renewable energy access in distribution networks includes a two-layer multi-objective optimization model and a nested optimization method. The upper-layer optimization objective of the two-layer multi-objective optimization model includes the annual investment cost of the distribution network and the annual degradation cost of the energy storage system. The lower-layer optimization objective includes the voltage deviation of distribution network nodes on a typical day and the daily operation and maintenance cost of the distribution network. The nested optimization method includes the lower-layer optimization model using a particle swarm optimization algorithm to optimize and calculate the energy dispatch method of the distribution network in combination with the grid operating conditions, and then returning it to the upper-layer optimization model. The upper-layer optimization model uses an improved Hippo algorithm to solve the location and capacity configuration method of the photovoltaic and energy storage system, and then passes it to the lower-layer optimization model, thus performing cyclical nested optimization.
[0008] Furthermore, the specific expression of the upper-level optimization objective function is as follows:
[0009] (1)
[0010] Among them, C in C represents the annual investment cost of the distribution network. de C represents the annual degradation cost of an energy storage system. in The expression is as follows:
[0011] (2)
[0012] Where r is the discount rate, with a value of 0.08; year represents the lifespan of the photovoltaic energy storage system equipment, generally set to 10 years; y is the current year; cPV is the investment cost per unit of photovoltaic capacity; S pv Where is the photovoltaic capacity; cess is the investment cost per unit capacity of the energy storage system; S ess This refers to the capacity of the energy storage system.
[0013] Rainflow counting is used to estimate the cycle life of an energy storage system under arbitrary state of charge conditions, thereby calculating the annual degradation cost C of the energy storage system. de :
[0014] (3)
[0015] (4)
[0016] in, The degradation cost of an energy storage system within a single charge-discharge cycle; N represents the output power of the energy storage system during this time period. t This indicates that the cycle state of a single charge-discharge cycle of an energy storage system is analyzed using the rainflow counting method, with 1 for the full cycle state and 0.5 for the half cycle state.
[0017] In equation (3), the degradation cost of a single charge-discharge cycle of the energy storage system can be expressed as a function of SOC:
[0018] (5)
[0019] (6)
[0020] Among them, T cy The cycle life of the energy storage system is represented by DOD; DOD represents the depth of discharge, defined as DOD =
[0021] 1-SOC;
[0022] Furthermore, the specific expression for the lower-level optimization objective is as follows:
[0023] (7)
[0024] (8)
[0025] Where f2 is the node voltage deviation of the distribution network system on a typical day; N d The number of nodes in the distribution network system; T represents the hourly time in a typical 24-hour period. and f3 represents the actual and rated voltage values of node n at the hour t, respectively; f3 is the daily operating cost of the distribution network system; C w C represents the daily operation and maintenance cost of the distribution network. g Main grid daily electricity purchase cost; C l Daily network loss cost; C q Let $ be the cost of curtailed solar power; its expressions are as follows:
[0026] (9)
[0027] In the formula, cpvy represents the operating cost per unit of photovoltaic capacity; PV s 1 represents the hourly power generation of the photovoltaic system; cessy represents the operating cost per unit of energy storage capacity; cn represents the hourly charge and discharge capacity of the energy storage system.
[0028] (10)
[0029] In the formula, cbuy is the electricity purchase price at time t; The power exchanged between the distribution network and the main grid during time period t.
[0030] (11)
[0031] In the formula, cploss is the electricity price for network loss during period t; R l I is the system branch resistance; l,t Let be the current in the l-th branch during time period t.
[0032] (12)
[0033] In the formula, cqpv is the cost of the light-wasting penalty, and pv is the cost of the light-wa cur This refers to the amount of light discarded.
[0034] Furthermore, the nested optimization method performs optimization calculations according to the following steps:
[0035] Step 1: Initialize the distribution network parameters by inputting the distribution network node topology and setting the line parameters; based on the 24-hour load output data, set the active and reactive power injected into each node, and set the constraints and maximum number of iterations. ;
[0036] Step 2: Initialize the two-layer optimization model and optimization algorithm parameters. The upper-layer optimization model sets constraints based on the instantaneous power balance relationship of the distribution network and the installation capacity limitations of photovoltaic and energy storage systems at accessible nodes. An improved Hippo algorithm is used for optimization calculations. Initialize and generate a Hippo population, numbering each Hippo from 1:p. Each Hippo represents a photovoltaic-energy storage system site selection and capacity configuration scheme in the upper layer. The position of each Hippo in the search space represents the decision variable H1 of that capacity configuration scheme. Initialize the positions of the Hippos.
[0037] (13)
[0038] In the formula P n E represents the photovoltaic capacity that can be installed at node n; n This represents the energy storage capacity that can be installed at node n.
[0039] The lower-level optimization model sets constraints based on power and voltage fluctuations at each node of the distribution network, branch current fluctuations, and the SOC limit of the energy storage system, and uses a particle swarm optimization algorithm for optimization calculations. A particle swarm is initialized, with each particle representing a typical day's operation and scheduling scheme. The position and velocity variables of the swarm are initialized in the particle swarm algorithm, with the position representing the lower-level decision variable H2.
[0040] (14)
[0041] In the formula This represents the active power generated by the photovoltaic system during time period T. Indicates the energy storage charging / discharging power during time period T; This indicates the reactive power generated by the photovoltaic system during time period T, which participates in voltage regulation.
[0042] Step 3: The lower-level optimization model uses power flow calculation to determine the 24-hour node voltage deviation and network loss of each node in the distribution network, calculates the fitness value of the multi-objective function of the particle swarm optimization algorithm, compares the fitness value of each particle with the current fitness value, and updates the optimal fitness value of the current particle.
[0043] Step 4: Use the TOPSIS method based on information entropy to store particle information in the form of a STEM in the external archive. Sort the particles according to their crowding distance from largest to smallest, select the globally optimal particle, and update the velocity and position of the next generation of particles using inertia weights and the globally optimal particle. The globally optimal particle represents the optimal scheduling scheme for a typical day, and its optimal position in the search space represents the optimal decision variable H2 of the lower layer. * That is, the output value of the photovoltaic-storage system at each moment in the optimal scheduling scheme, H2 * Return it to the upper-level optimization model as an input variable;
[0044] Step 5: Based on the power distribution network energy dispatch optimization scheme returned by the lower-level optimization model, guide the hippo position H in the current iteration number. i,j and fitness value F i The algorithm updates the upper-level decision variables and objective function values. The hippopotamus population first enters an exploration phase, which includes predator-free and predator-defense modes. The first half of the hippos simulates the predator-free mode in the exploration environment, while the second half simulates the predator-defense mode, thus expanding the search range. The population then enters a development phase, simulating hippos escaping predators. The fitness value of each hippo is compared with the current fitness value of this phase, updating to obtain the optimal fitness value and optimal position for that phase. To prevent getting trapped in local optima and improve the accuracy of the algorithm, an adaptive inertia weight strategy w(it) and an improved Lévy distribution strategy are introduced in the exploration phase.
[0045] Step Six: The optimal position of the hippopotamus is obtained through iterative updates, representing the optimal decision variable H1 of the upper layer. * That is, the optimal installation capacity and location of the photovoltaic storage system, H1 * Passed to the lower layer as an input variable;
[0046] Step 7: Determine whether the maximum number of iterations has been reached, or whether the iteration fitness value has entered the convergence interval. If the conditions are met, stop the optimization solution and output the optimal solution to obtain the distribution network planning and energy dispatch scheme. Otherwise, return to step 3 to rework and perform nested optimization.
[0047] Furthermore, in step five, when the hippo optimization algorithm enters the predator-free state, since male hippos are driven away by the population after maturing, resulting in position updates, an adaptive inertia weight strategy w(it) is introduced to improve this stage:
[0048] (15)
[0049] In the formula Location of the male hippopotamus; H i,j Let i be the position of the hippopotamus in the i-th candidate solution; Let be the historical best population position for the current iteration number in this stage; introduce a learning factor c1 of 2, r1 a random number between [0,1]; w(it) is the introduced adaptive inertia weight; I1 a random number in the interval [1,2]; p is the population size, m is the number of decision variables, where the adaptive inertia weight strategy w(it) is:
[0050] (16)
[0051] In the formula, it represents the current iteration number. This represents the maximum number of iterations. In the early stages of the search, high weights are maintained to accelerate the global search; in the later stages, low weights are used for in-depth development, focusing on local searches, thereby improving the algorithm's convergence speed and preventing it from getting trapped in local optima.
[0052] The expression for updating the hippopotamus population location and fitness value at this stage is:
[0053] (17)
[0054] In the formula F i This represents the current fitness value for this stage; This represents the fitness value corresponding to the male hippopotamus's final position at this stage; when Less than F i At that time, the hippopotamus's location was updated.
[0055] Furthermore, in step five, when the hippo optimization algorithm simulates a predator defense pattern, the hippo adopts a defensive strategy to update its position in order to prevent the predator from approaching. This stage introduces an improved Lévy distribution strategy:
[0056] (18)
[0057] In the formula This represents the hippopotamus's position when facing a predator. Let be a random vector with a Lévy distribution, used to represent the location of predator mutations. This represents the predator's position in the search space; c, a, and b are random numbers generated from a continuous uniform distribution between [2,4], [1,1.5], and [2,3], respectively; g is a random number between [-1,1]. It is a random vector of dimension 1×m; s represents the added perturbation factor; This represents the historical best population position for the current iteration number at this stage. The fitness value corresponding to the hippo's defense phase is less than the current fitness value F for that phase. i This indicates that a predator is close to the hippopotamus, and the hippopotamus will quickly drive the predator away.
[0058] (19)
[0059] In the formula This represents the distance between the i-th hippopotamus and the predator.
[0060] The expression for the added perturbation factor s is:
[0061] (20)
[0062] In the early stages of the algorithm's iteration, the perturbation is relatively large. After adding the perturbation factor s, the effect of the perturbation gradually weakens as the number of iterations increases, thereby enhancing the algorithm's ability to escape local optima.
[0063] Mathematical model of Lévy motion:
[0064] (twenty one)
[0065] (twenty two)
[0066] In the formula, w and v are random numbers between [0,1], and R is 1.5. The gamma function is used in this mathematical model to help the population perform local searches and improve convergence accuracy.
[0067] The expression for updating the hippopotamus population location and fitness value at this stage is:
[0068] (twenty three)
[0069] In the formula This represents the fitness value corresponding to the hippo's final position at this stage. If it is less than the current fitness value F at this stage... i If the signal is 0, it means the predator has fled and the hippopotamus's location has been updated.
[0070] Furthermore, in step five, when the hippo optimization algorithm enters the development phase to simulate escaping a predator, the hippo's position and fitness value are updated as follows:
[0071] (twenty four)
[0072] In the formula This indicates the hippo's current position during the development phase, and r3 represents a random number within the interval [0,1]. The upper and lower bounds of the safe, movable positions for each hippo during the current iteration are […]. , Y represents a random number that follows a normal distribution;
[0073] During the development phase, local optimization and more refined searches were performed to determine the optimal position H1 of the upper-level hippopotamus. * The expression for updating the hippopotamus population location and fitness value during this stage is:
[0074] (25)
[0075] In the formula Let F be the fitness value corresponding to the hippo's final position at this stage. If it is less than the current fitness value F at this stage... i At that time, a completely new solution space region was explored and obtained Position update, corresponding to the optimal hippo position H1 * , H1 * Passed to the lower layer as an input variable, if it is greater than F i This indicates that no better region has been explored, thus obtaining the original hippo's location and fitness value preserved by the algorithm.
[0076] Compared with the prior art, the beneficial effects of the present invention are:
[0077] 1. This invention employs an improved double-layer nested optimization algorithm to solve the model. The results of the case analysis show that the nested optimization algorithm can effectively solve the optimization configuration problem of high proportion of new energy access to the distribution network. The double-layer optimization model has both the rationality of long-term planning and the flexibility to cope with intraday power fluctuations, resulting in a reasonable distribution network planning and energy dispatch scheme, which improves the stability and economy of the distribution network.
[0078] 2. The double-layer nested optimization algorithm of this invention integrates the advantages of the Hippo algorithm for quickly identifying the global optimum and the multi-objective weight optimization of the Particle Swarm Optimization algorithm. The improved Hippo algorithm in the upper layer can adaptively adjust the population search speed in the search space, maintaining high weights in the early stage of the search and lower weights in the later stage to conduct in-depth development, focus on local search, avoid the population getting trapped in local optima, and improve the speed and accuracy of iterative optimization. The improved Particle Swarm Optimization algorithm in the lower layer solves the multi-objective weight allocation problem and improves the objectivity of decision-making.
[0079] 3. A two-layer multi-objective optimization model for the photovoltaic-storage system of this invention is established. The decision variables of the upper-layer model are the optimal installation capacity and location of the photovoltaic-storage system, with the annual investment cost of the system and the annual degradation cost of the energy storage system as objectives. The lower-layer model aims to minimize the daily operating cost of the distribution network and the node voltage deviation, thereby effectively solving the multi-objective optimization problem at different time scales. Attached Figure Description
[0080] Figure 1 This is a flowchart of the algorithm of the present invention;
[0081] Figure 2 This is a typical photovoltaic power generation curve of the present invention;
[0082] Figure 3 This is a comparison chart of the convergence curves of the test function of the present invention;
[0083] Figure 4 This is a voltage amplitude fluctuation diagram of the present invention;
[0084] Figure 5 This is a comparison diagram of branch losses in this invention;
[0085] Figure 6 This is the energy dispatch diagram of the power distribution network source-grid-load-storage according to the present invention. Detailed Implementation
[0086] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0087] Example 1
[0088] This example provides a two-layer optimization algorithm for distribution networks with a high proportion of new energy sources, which includes a two-layer multi-objective optimization model and a nested optimization scheme.
[0089] The upper-level optimization objective in the two-level multi-objective optimization model includes the annual investment cost C of the distribution network. inAnnual degradation cost C of energy storage system de The lower-level optimization objectives include the distribution network node voltage deviation on a typical day and the daily operation and maintenance cost of the distribution network. The specific expression of the upper-level optimization objective function is as follows:
[0090] (26)
[0091] Among them, C in C represents the annual investment cost of the distribution network. de C represents the annual degradation cost of an energy storage system. in The expression is as follows:
[0092] (27)
[0093] Where r is the discount rate, with a value of 0.08; year represents the lifespan of the photovoltaic energy storage system equipment, generally set to 10 years; y is the current year; cPV is the investment cost per unit of photovoltaic capacity; S pv Where S is the photovoltaic capacity, cess is the investment cost per unit capacity of the energy storage system, and S is the energy storage capacity. ess This refers to the capacity of the energy storage system.
[0094] Rainflow counting is used to estimate the cycle life of an energy storage system under arbitrary state of charge conditions, thereby calculating the annual degradation cost C of the energy storage system. de :
[0095] (28)
[0096] (29)
[0097] in, The degradation cost of an energy storage system within a single charge-discharge cycle. N represents the output power of the energy storage system during this time period. t This indicates that the cycle state of a single charge-discharge cycle of an energy storage system is analyzed using the rainflow counting method, with 1 for the full cycle state and 0.5 for the half cycle state.
[0098] In equation (28), the degradation cost of a single charge-discharge cycle of the energy storage system can be expressed as a function of SOC:
[0099] (30)
[0100] (31)
[0101] Among them, T cy The cycle life of an energy storage system is represented by DOD, which represents the depth of discharge and is defined as DOD =
[0102] 1-SOC.
[0103] The specific expression for the lower-level optimization objective is as follows:
[0104] (32)
[0105] (33)
[0106] Where f2 is the node voltage deviation of the distribution network system on a typical day, N d Where T represents the number of nodes in the distribution network system, and T represents the hourly time in a typical 24-hour period. and Let f1 and f2 represent the actual and rated voltage values of node n at the hour t, respectively. f3 represents the daily operating cost of the distribution network system, and C represents the value of the voltage at the hour t. w For the daily operation and maintenance cost of the distribution network, C g Main grid daily electricity purchase cost, C l For daily network loss costs, C q The cost of curtailed solar power is expressed as follows:
[0107] (34)
[0108] In the formula, cpvy represents the operating cost per unit of photovoltaic capacity, and PV... s denoted as PV power generation per hour, cessy as the operating cost per unit of energy storage capacity, and cn as the charge and discharge capacity of the energy storage system per hour.
[0109] (35)
[0110] In the formula, cbuy is the electricity purchase price at time t. The power exchanged between the distribution network and the main grid during time period t.
[0111] (36)
[0112] In the formula, cploss is the electricity price for network loss during period t, and R l I is the system branch resistance. l,t Let be the current in the l-th branch during time period t.
[0113] (37)
[0114] In the formula, cqpv is the cost of the light-wasting penalty, and pv is the cost of the light-wa cur This refers to the amount of light discarded.
[0115] This example provides a two-layer optimization configuration algorithm for distribution networks with a high proportion of renewable energy access. Its nested optimization method performs optimization calculations according to the following steps:
[0116] Step 1: Initialize the distribution network parameters by inputting the distribution network node topology and setting the line parameters; based on the 24-hour load output data, set the active and reactive power injected into each node, and set the constraints and maximum number of iterations. ;
[0117] Step 2: Initialize the two-layer optimization model and optimization algorithm parameters. The upper-layer optimization model sets constraints based on the instantaneous power balance relationship of the distribution network and the installation capacity limitations of photovoltaic and energy storage systems at accessible nodes, and uses an improved Hippo algorithm for optimization calculation. Initialize and generate a Hippo population, numbering each Hippo from 1:p, where each Hippo represents a photovoltaic-energy storage system site selection and capacity configuration scheme in the upper layer, and the position of each Hippo in the search space represents the decision variable H1 of that capacity configuration scheme. Initialize the positions of the Hippos;
[0118] (38)
[0119] In the formula P n E represents the photovoltaic capacity that can be installed at node n. n This represents the energy storage capacity that can be installed at node n.
[0120] Power balance:
[0121] (39)
[0122] In the formula Let be the active power generated by the photovoltaic system connected to node n during time period t. Let be the active power emitted by the energy storage system connected to node n at time t. Nd represents the active power supplied by the main grid to the distribution network during time period t, Nd represents the number of system nodes, and Nl represents the number of branches in the distribution network.
[0123] Capacity constraints for the installation of photovoltaic and energy storage systems at accessible nodes:
[0124] (40)
[0125] In the formula and Let n represent the active power generated by the photovoltaic system at node n during time period t and the maximum active power generated by the photovoltaic system, respectively. and These represent the amount of electricity generated by the energy storage system at node n during time period t and the maximum installed capacity of the energy storage system, respectively.
[0126] The lower-level optimization model sets constraints based on power and voltage fluctuations at each node of the distribution network, branch current fluctuations, and the SOC limit of the energy storage system, and uses a particle swarm optimization algorithm for optimization calculations. A particle swarm is initialized, with each particle representing a typical day's operation and scheduling scheme. The position and velocity variables of the swarm are initialized in the particle swarm algorithm, with the position representing the lower-level decision variable H2.
[0127] (41)
[0128] In the formula This represents the active power generated by the photovoltaic system during time period T. Indicates the energy storage charging / discharging power during time period T. This indicates the reactive power generated by the photovoltaic system during time period T, which participates in voltage regulation.
[0129] The lower-level optimization model sets constraints based on the power and branch current fluctuations, voltage fluctuations, and the SOC limit of the energy storage system at each node of the distribution network:
[0130] Power flow constraints in distribution networks:
[0131] (42)
[0132] In the formula P n and Q n Let U be the active and reactive power of node n. k Let G be the voltage value at node k. nk and B nk The conductance and susceptance between nodes n and k are given. This represents the voltage phase angle difference between nodes n and k.
[0133] Branch current constraints:
[0134] (43)
[0135] In the formula I n,t Let be the current value of node n during time period t. This represents the maximum current value of the branch.
[0136] Node voltage constraints:
[0137] (44)
[0138] In the formula and Let be the minimum and maximum voltage values of node n during time period t.
[0139] Energy storage battery constraints:
[0140] (45)
[0141] In the formula η C and η D These represent the charging efficiency and discharging efficiency of the energy storage system, respectively, and the State of Charge (SOC). min and SOC max This represents the minimum and maximum states of charge. Let t be the energy stored by node n during time period t, where t0 is the last operating moment of one cycle. and These are the upper and lower limits of energy storage charging and discharging power. and This is a 0-1 variable representing whether the energy storage system is charging or discharging.
[0142] Step 3: The lower-level optimization model uses power flow calculation to determine the 24-hour node voltage deviation and network loss of each node in the distribution network, calculates the fitness value of the multi-objective function of the particle swarm optimization algorithm, compares the fitness value of each particle with the current fitness value, and updates the optimal fitness value of the current particle.
[0143] Step 4: Use the TOPSIS method based on information entropy to store particle information in the form of a STEM in the external archive. Sort the particles according to their crowding distance from largest to smallest, select the globally optimal particle, and update the velocity and position of the next generation of particles using inertia weights and the globally optimal particle. The globally optimal particle represents the optimal scheduling scheme for a typical day, and its optimal position in the search space represents the optimal decision variable H2 of the lower layer. * That is, the output value of the photovoltaic-storage system at each moment in the optimal scheduling scheme, H2 * Return it to the upper-level optimization model as an input variable;
[0144] Normalize the objective function:
[0145] (46)
[0146] In the formula a uy and A uy Let be the objective function values of particle u before and after normalization for the y-th actual objective function value. and Let represent the absolute positive and negative ideal values of the y-th objective function, respectively, and z be the size of the Pareto solution set.
[0147] Calculate the weights of each objective function:
[0148] (47)
[0149] (48)
[0150] (49)
[0151] In the formula s y q represents information entropy. y Let represent the weight of the y-th objective function, and M represent the number of objective functions.
[0152] Furthermore, the distance scale G and the particle fit T are calculated. u :
[0153] (50)
[0154] (51)
[0155] (52)
[0156] In the formula T u A larger value indicates a better state. and These are the positive and negative ideal distances of particle u, respectively, A y+ A y- Let y be the maximum and minimum values of the y-th objective function after standardization.
[0157] Step 5: Based on the power distribution network energy dispatch optimization scheme returned by the lower-level optimization model, guide the hippo position H in the current iteration number. i,j and fitness value F i The algorithm updates the upper-level decision variables and objective function values. The hippo population first enters an exploration phase, which includes predator-free and predator-defense modes. The first half of the hippos are selected to simulate the predator-free mode in the exploration environment, while the second half simulate the predator-defense mode, thus expanding the search range. The hippo population then enters an development phase, simulating hippos escaping predators. The fitness value of each hippo is compared with the current fitness value of that phase, updating to obtain the optimal fitness value and optimal position for that phase. To prevent it from getting trapped in local optima and to improve the accuracy of the algorithm, an adaptive inertia weight strategy w(it) and an improved Lévy distribution strategy are introduced in the exploration phase.
[0158] Since male hippos are driven away by the herd after reaching maturity, resulting in position updates and entering a predator-free state, an adaptive inertia weighting strategy w(it) is introduced to improve this process:
[0159] (53)
[0160] In the formula Location of the male hippopotamus, H i,j Let i be the position of the i-th candidate solution. The position of the hippo in the current iteration is represented by the learning factor c1, which is 2, and r1, which is a random number between [0,1]. w(it) is the introduced adaptive inertia weight; I1 is a random number within the interval [1,2]; p is the population size, and m is the number of decision variables. The adaptive inertia weight strategy w(it) is as follows:
[0161] (54)
[0162] In the formula, it represents the current iteration number. This represents the maximum number of iterations. In the early stages of the search, high weights are maintained to accelerate the global search; in the later stages, low weights are used for in-depth development, focusing on local searches, thereby improving the algorithm's convergence speed and preventing it from getting trapped in local optima.
[0163] The expression for updating the hippopotamus population location and fitness value at this stage is:
[0164] (55)
[0165] In the formula F i This represents the current fitness value for this stage; This represents the fitness value corresponding to the male hippopotamus's final position at this stage; when Less than F i At that time, the hippopotamus's location was updated.
[0166] In simulating a predator defense strategy, hippos employ defensive tactics to update their position in order to prevent predators from approaching. This phase introduces an improved Lévy distribution strategy:
[0167] (56)
[0168] In the formula This represents the hippopotamus's position when facing a predator. Let be a random vector with a Lévy distribution, used to represent the location of predator mutations; Let c represent the predator's position in the search space, where c, a, and b are random numbers generated from a continuous uniform distribution between [2,4], [1,1.5], and [2,3], respectively; and g is a random number between [-1,1]. It is a random vector of dimension 1×m, where s represents the added perturbation factor. This represents the historical best population position for the current iteration number at this stage. The fitness value corresponding to the hippo's defense phase is less than the current fitness value F for that phase. i This indicates that a predator is close to the hippopotamus, and the hippopotamus will quickly drive the predator away.
[0169] (57)
[0170] In the formula This represents the distance between the i-th hippopotamus and the predator.
[0171] The expression for the added perturbation factor s is:
[0172] (58)
[0173] In the early stages of the algorithm's iteration, the perturbation is relatively large. After adding the perturbation factor s, the effect of the perturbation gradually weakens as the number of iterations increases, thereby enhancing the algorithm's ability to escape local optima.
[0174] Mathematical model of Lévy motion:
[0175] (59)
[0176] (60)
[0177] In the formula, w and v are random numbers between [0,1]; R is 1.5; The gamma function is used in this mathematical model to help the population perform local searches and improve convergence accuracy.
[0178] The expression for updating the hippopotamus population location and fitness value at this stage is:
[0179] (61)
[0180] In the formula This represents the fitness value corresponding to the hippo's final position at this stage. If it is less than the current fitness value F at this stage... i If the signal is 0, it means the predator has fled and the hippopotamus's location has been updated.
[0181] Next, each hippopotamus was placed into the development phase according to its number, simulating the escape from predators, to conduct local optimization and a more refined search:
[0182] (62)
[0183] In the formula This indicates the hippo's current position during the development phase, and r3 represents a random number within the interval [0,1]. The upper and lower bounds of the safe, movable positions for each hippo during the current iteration are […]. , Y represents a random number that follows a normal distribution.
[0184] The expression for updating the hippopotamus population location and fitness value at this stage is:
[0185] (63)
[0186] In the formula Let F be the fitness value corresponding to the hippo's final position at this stage. If it is less than the current fitness value F at this stage... i This leads to the discovery of entirely new solution space regions. Position update, corresponding to the optimal hippo position H1 * , H1 * Passed to the lower level as an input variable, if it is greater than F i This indicates that no better region has been explored, thus obtaining the original hippo's location and fitness value preserved by the algorithm.
[0187] Step Six: The optimal position of the hippopotamus is obtained through iterative updates, representing the optimal decision variable H1 of the upper layer. * That is, the optimal installation capacity and location of the photovoltaic storage system, H1 * Passed to the lower layer as an input variable;
[0188] Step 7: Determine whether the maximum number of iterations has been reached, or whether the iteration fitness value has entered the convergence interval, and then stop the optimization solution. Output the optimal solution to obtain the distribution network planning and energy dispatch scheme. Otherwise, return to step 3 to rework and perform nested optimization.
[0189] Example 2
[0190] See Figure 1 This embodiment provides a two-layer distribution network photovoltaic-storage system model. There is a mutual transmission relationship between the upper and lower optimization models. The upper layer provides the optimal decision scheme and passes it to the lower layer. The lower layer calculates the optimal operation strategy based on the decision scheme of the upper layer and then passes the optimal daily operation strategy to the upper layer. The upper layer generates a new decision scheme based on the result passed from the lower layer. Through the mutual influence between the upper and lower layers, the optimal planning and energy dispatch scheme of the distribution network is finally obtained.
[0191] Figure 2 To generate photovoltaic power output curves for four typical days, we collected photovoltaic power output data throughout the year and performed cluster analysis. After initializing the cluster centers, we calculated the distance from each data point to each cluster center, continuously updated the cluster centers, calculated the probability of different scenarios, and obtained the photovoltaic power output curves for four typical days in spring, summer, autumn and winter.
[0192] See Figure 3 To verify the effectiveness of the improved hippo optimization algorithm proposed in this example, four classic test functions were selected from the CEC23 test library to verify the algorithm: F1 is the multimodal optimization test function, F2 is the maximum norm test function, F3 is the weighted fourth power sum test function, and F4 is the multimodal complexity test function. The expression is as follows:
[0193] (64)
[0194] In the formula, n is the vector dimension, x is the input vector, and u is a random variable uniformly distributed in [0,1). The results of different algorithms optimizing the minimum value under different test functions are shown in Table 1 below.
[0195] Table 1 Comparison of Minimum Value Results for Test Function Optimization
[0196] PSO -8904.9211 5.631793987 0.0212087 0.258504493 HO -12569.2366 2.44e-178 0.0004639 0.002262068 GWO -7503.2402 2.16775e-5 0.0022692 0.035267979 SSA -7167.0981 42.49842974 0.1628258 0.525005454 DBO -6434.0680 1.13035e-65 0.0020298 0.654785751 IHO* -15385.2691 8.1718e-249 4.08237e-5 7.1762e-10
[0197] Comparative analysis shows that the improved Hippo optimization algorithm has the smallest minimum value of the test function among different optimization algorithms. The graph also shows that the algorithm has the fastest iteration speed and the highest convergence accuracy in the solution process.
[0198] Figure 4 Different nested algorithms were used to solve the two-layer model, and the fluctuation of node voltage amplitude in the distribution network over 24 hours was compared and analyzed. The algorithms were used without optimization, with the GWO-PSO algorithm for both layers, with the HO-PSO algorithm for both layers, and with the proposed improved HO-PSO algorithm for both layers. The lowest per-unit voltage value of all nodes over 24 hours was selected for comparison. Compared with the voltage amplitude of nodes in the unplanned distribution network, the per-unit voltage values of the other algorithms increased by 0.33%, 0.83%, and 1.07%, respectively. This demonstrates the superiority of the proposed improved nested algorithm, leading to a reasonable distribution network planning and energy dispatch scheme. Adding a photovoltaic-storage system to the distribution network can improve its safety and stability.
[0199] Figure 5 The four algorithms mentioned above were used to solve the two-layer model, and the branch losses of the distribution network were compared and analyzed. The total branch losses were 120.02 kW, 118.30 kW, 115.86 kW and 105.48 kW, respectively. Among them, the improved HO-PSO algorithm had the lowest total network loss, which was reduced by 13.79% compared with no algorithm optimization. The reduction in network loss is beneficial to improving the economy of the distribution network.
[0200] Figure 6 This is a power grid source-grid-load-storage energy dispatch diagram. Periods 2-4 are off-peak periods with lower electricity prices and user demand, primarily for energy storage charging. During period 5, the energy storage system discharges for a short time, and during period 6, it charges for a short time. During period 7, the photovoltaic system gradually begins to generate electricity. From period 7-18, the load is mainly supplied by a combination of photovoltaic and energy storage systems. Even when the load increases, the dependence on the main grid is reduced, and the amount of electricity purchased by the main grid is decreased. In addition, the energy storage system effectively absorbs excess energy generated during peak photovoltaic power generation during period 9 through continuous charging and discharging. During periods 19-21, the energy storage system charges, discharges, and charges again during period 22 and 23, and discharges again during period 24-1, achieving peak shaving and valley filling efficiency. Reasonable energy dispatch improves the safety and economy of the power grid.
[0201] In summary, this invention first sets the distribution network parameters and constraints, initializes the two-layer optimization model and optimization algorithm parameters, and then uses the TOPSIS method based on information entropy to sort the particle information in the lower-layer particle swarm optimization to obtain the global optimal solution of the lower-layer optimization model, and sets its corresponding decision variable H2. * The data is then fed back to the upper layer, which introduces adaptive inertia weights and an improved Lévy distribution strategy into the hippo algorithm. Through the exploration and development phases, the hippo's position is updated to obtain the optimal objective function value and the decision variable H1 corresponding to the optimal hippo position. * As the input condition for the lower layer, the optimization solution is stopped after the maximum number of iterations is reached or the fitness value of the iteration enters the convergence interval. The optimal solution is then output to obtain the power distribution network planning and energy dispatch scheme.
[0202] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A two-layer optimization algorithm applied to distribution networks with a high proportion of new energy sources, characterized in that, It includes a two-layer multi-objective optimization model and a nested optimization method. The upper-layer optimization objective of the two-layer multi-objective optimization model includes the annual investment cost of the distribution network and the annual degradation cost of the energy storage system. The lower-layer optimization objective includes the voltage deviation of distribution network nodes on a typical day and the daily operation and maintenance cost of the distribution network. The nested optimization method includes the lower-layer optimization model using a particle swarm optimization algorithm to optimize and calculate the energy dispatch method of the distribution network in combination with the grid operating conditions, and then returning it to the upper-layer optimization model. The upper-layer optimization model uses an improved Hippo algorithm to solve the location and capacity configuration method of the photovoltaic and energy storage system, and then passes it to the lower-layer optimization model, and so on, in a cyclical nested optimization.
2. The two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 1, characterized in that, The specific expression for the upper-level optimization objective is as follows: (1) Among them, C in C represents the annual investment cost of the distribution network. de C represents the annual degradation cost of an energy storage system. in The expression is as follows: (2) Where r is the discount rate, with a value of 0.08, year represents the lifespan of the photovoltaic energy storage system equipment, y is the current year, cPV is the investment cost per unit of photovoltaic capacity, and S pv Where S is the photovoltaic capacity, cess is the investment cost per unit capacity of the energy storage system, and S is the energy storage capacity. ess This refers to the capacity of the energy storage system.
3. The two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 2, characterized in that, The rainflow counting method is used to estimate the cycle life of the energy storage system under arbitrary state of charge conditions, and the annual degradation cost C of the energy storage system is calculated. de The details are as follows: (3) (4) in, The degradation cost of an energy storage system within a single charge-discharge cycle. N represents the output power of the energy storage system during this time period. t This indicates that the cyclic state of a single charge-discharge cycle of an energy storage system is analyzed using the rainflow counting method. In equation (3), the degradation cost of a single charge-discharge cycle of the energy storage system can be expressed as a function of SOC: (5) (6) Among them, T cy The cycle life of the energy storage system is represented by DOD; DOD represents the depth of discharge, defined as DOD = 1-SOC.
4. The two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 1, characterized in that, The specific expression for the lower-level optimization objective is as follows: (7) (8) Where f2 is the node voltage deviation of the distribution network system on a typical day, N d Where is the number of nodes in the distribution network system, and T is the hourly time in a typical 24-hour period. and Let f3 represent the actual and rated voltage values of node n at the hour t, respectively, and let C represent the daily operating cost of the distribution network system. w C represents the daily operation and maintenance cost of the distribution network. g Main grid daily electricity purchase cost, C l For daily network loss costs, C q Costs associated with the curtailment of solar power.
5. The two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 4, characterized in that, Daily operation and maintenance cost of distribution network C w The expression is as follows: (9) In the formula, cpvy represents the operating cost per unit of photovoltaic capacity, and PV... s Here, denoted as PV power generation per hour, cessy is the operating cost per unit of energy storage capacity, and cn is the charge / discharge capacity of the energy storage system per hour. Main grid daily electricity purchase cost C g The expression is as follows: (10) In the formula, cbuy is the electricity purchase price at time t; The power exchanged between the distribution network and the main grid during time period t; Daily network loss cost C l The expression is as follows: (11) In the formula, cploss is the electricity price for network loss during period t; R l I is the system branch resistance; l,t Let be the current in the l-th branch during time period t; Cost of curtailed solar power C q The expression is as follows: (12) In the formula, cqpv is the cost of the light-wasting penalty, and pv is the cost of the light-wa cur This refers to the amount of light discarded.
6. The two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 4, characterized in that, The nested optimization method performs optimization calculations according to the following steps: Step 1: Initialize the distribution network parameters. Input the distribution network node topology, set the line parameters, set the active and reactive power injected into each node based on 24-hour load output data, and set constraints and the maximum number of iterations. ; Step 2: Initialize the two-layer optimization model and optimization algorithm parameters. The upper-layer optimization model sets constraints based on the instantaneous power balance relationship of the distribution network and the installation capacity limitations of photovoltaic and energy storage systems in the accessible nodes. The improved Hippo algorithm is used for optimization calculation. Initialize and generate the Hippo population. Number each Hippo from 1:p. Each Hippo represents a photovoltaic and energy storage system site selection and capacity configuration scheme in the upper layer. The position of each Hippo in the search space represents the decision variable H1 of the capacity configuration scheme. Initialize the position of the Hippo. (13) In the formula P n E represents the photovoltaic capacity that can be installed at node n; n This represents the energy storage capacity that can be installed at node n; The lower-level optimization model sets constraints based on the power and voltage fluctuations of each node in the distribution network, the branch current fluctuations, and the SOC limit of the energy storage system. It then uses a particle swarm optimization algorithm for optimization calculations. A particle swarm is initialized, with each particle representing a typical day's operation and scheduling scheme. The position and velocity variables of the swarm are initialized, with the position representing the lower-level decision variable H2. (14) In the formula This represents the active power generated by the photovoltaic system during time period T. Indicates the energy storage charging / discharging power during time period T. This indicates the reactive power generated by the photovoltaic system during time period T, which participates in voltage regulation. Step 3: The lower-level optimization model uses power flow calculation to determine the 24-hour node voltage deviation and network loss of each node in the distribution network, calculates the fitness value of the multi-objective function of the particle swarm optimization algorithm, compares the fitness value of each particle with the current fitness value, and updates the optimal fitness value of the current particle. Step 4: Use the TOPSIS method based on information entropy to store particle information in the form of a STEM in the external archive. Sort the particles according to their crowding distance from largest to smallest, select the globally optimal particle, and update the velocity and position of the next generation of particles using inertia weights and the globally optimal particle. The globally optimal particle represents the optimal scheduling scheme for a typical day, and the optimal position of the globally optimal particle in the search space represents the optimal decision variable H2 of the lower layer. * That is, the output value of the photovoltaic-storage system at each moment in the optimal scheduling scheme, H2 * Return it to the upper-level optimization model as an input variable; Step 5: Based on the power distribution network energy dispatch optimization scheme returned by the lower-level optimization model, guide the hippo position H in the current iteration number. i,j and fitness value F i The upper-level decision variables and objective function values are updated. The hippo population first enters the exploration phase, which includes a predator-free mode and a predator-defending mode. The first half of the hippos are selected to simulate the predator-free mode in the exploration environment, and the second half of the hippos are selected to simulate the predator-defending mode in the exploration environment, thus expanding the search range. The hippo population then enters the development phase, simulating hippos escaping predators. The fitness value of each hippo is compared with the current fitness value of the phase, and the optimal fitness value and optimal position of the hippo in the phase are updated. An adaptive inertial weight strategy w(it) and an improved Lévy distribution strategy are introduced in the exploration phase. Step Six: The optimal position of the hippopotamus is obtained through iterative updates, representing the optimal decision variable H1 of the upper layer. * That is, the optimal installation capacity and location of the photovoltaic storage system, H1 * Passed to the lower layer as an input variable; Step 7: Determine whether the maximum number of iterations has been reached, or whether the iteration fitness value has entered the convergence interval. If the conditions are met, stop the optimization solution and output the optimal solution to obtain the distribution network planning and energy dispatch scheme. Otherwise, return to step 3 for nested optimization.
7. The two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 6, characterized in that, In step five, when the hippo optimization algorithm enters the predator-free state, an adaptive inertia weight strategy w(it) is introduced for improvement: (15) In the formula Location of the male hippopotamus, H i,j Let be the position of the hippopotamus in the i-th candidate solution. To determine the historical best population position for the current iteration, a learning factor c1 of 2 is introduced, r1 is a random number between [0,1], w(it) is the introduced adaptive inertia weight, I1 is a random number within the interval [1,2], p is the population size, and m is the number of decision variables. The adaptive inertia weight strategy w(it) is as follows: (16) In the formula, it represents the current iteration number. This represents the maximum number of iterations. The expression for updating the hippopotamus population location and fitness value at this stage is: (17) In the formula F i This represents the current fitness value for this stage. This represents the fitness value corresponding to the male hippopotamus's final position at this stage. Less than F i At that time, the hippopotamus's location was updated.
8. The two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 6, characterized in that, In step five, when the hippo optimization algorithm simulates the predator defense pattern, an improved Lévy distribution strategy is introduced: (18) In the formula This represents the hippopotamus's position when facing a predator. Let be a random vector with a Lévy distribution, used to represent the location of predator mutations. This represents the predator's position in the search space; c, a, and b are random numbers generated from a continuous uniform distribution between [2,4], [1,1.5], and [2,3], respectively; g is a random number between [-1,1]. It is a random vector of dimension 1×m; s represents the added perturbation factor; This represents the historical best population position for the current iteration number at this stage. The fitness value corresponding to the hippo's defense phase is less than the current fitness value F for that phase. i This indicates that a predator is close to the hippo, and the hippo will quickly drive the predator away. (19) In the formula This represents the distance between the i-th hippopotamus and the predator; The expression for the added perturbation factor s is: (20) Mathematical model of Lévy motion: (21) (22) In the formula, w and v are random numbers between [0,1], and R is 1.
5. It is a gamma function; The expression for updating the hippopotamus population location and fitness value at this stage is: (23) In the formula This represents the fitness value corresponding to the hippo's final position at this stage. If it is less than the current fitness value F at this stage... i If the signal is 0, it means the predator has fled and the hippopotamus's location has been updated.
9. A two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 6, characterized in that, In step five, when the hippo optimization algorithm enters the development phase and simulates escaping from a predator, the hippo's position and fitness value are updated as follows: (24) In the formula This indicates the hippo's current position during the development phase, and r3 represents a random number within the interval [0,1]. The upper and lower bounds of the safe, movable positions for each hippo during the current iteration are […]. , Y represents a random number that follows a normal distribution.
10. A two-layer optimization algorithm for high-proportion renewable energy access to distribution networks according to claim 9, characterized in that, During the development phase, local optimization and refined search were performed to determine the optimal position H1 of the upper-level hippopotamus. * The expression for updating the hippopotamus population location and fitness value during this stage is: (25) In the formula Let F be the fitness value corresponding to the hippo's final position at this stage. If it is less than the current fitness value F at this stage... i At that time, a completely new solution space region was explored and obtained Position update, corresponding to the optimal hippo position H1 * , H1 * Passed to the lower layer as an input variable, if it is greater than F i This indicates that no better region has been explored, and the algorithm retains the original hippo's location and fitness value.