Distributed energy storage double-layer optimization configuration method considering wind and light uncertainty and carbon transaction
By combining Wasserstein generative adversarial networks and the Arctic Puffin optimization algorithm with the CPLEX solver, the problem of insufficient generation accuracy in the uncertain scenario of wind and solar power output in distributed energy storage configuration is solved, realizing the accuracy of energy storage configuration scheme and low-carbon economic operation of distribution network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID GANSU ELECTRIC POWER RESEARCH INSTITUTE
- Filing Date
- 2025-12-03
- Publication Date
- 2026-04-21
AI Technical Summary
In existing technologies, the accuracy of generating uncertain scenarios of wind and solar power output is insufficient during the dual-layer optimization configuration of distributed energy storage, resulting in a large deviation between the energy storage configuration scheme and the actual operation requirements, which affects the economic operation and safety and stability of the distribution network.
A Wasserstein generative adversarial network model combined with gradient penalty and temporal attention mechanisms is used to generate wind and solar power output scenarios. The scenarios are reduced by K-means clustering algorithm, a tiered carbon trading cost model is established and transformed into linear constraints, and the Arctic Puffin optimization algorithm and CPLEX solver are used for joint optimization to form a single-layer mixed integer nonlinear programming model to optimize energy storage site selection and capacity determination.
The generated wind and solar power output scenarios accurately reflect actual characteristics, ensuring that energy storage configuration schemes adapt to fluctuations in wind and solar power output, achieving low-carbon and economical operation of the power distribution network, and improving the accuracy and computational efficiency of energy storage configuration.
Smart Images

Figure CN121906552A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of energy storage system technology, and more specifically, it relates to a two-layer optimization configuration method for distributed energy storage that takes into account the uncertainties of wind and solar power and carbon trading. Background Technology
[0002] In the field of distributed energy storage optimization in power distribution networks, traditional methods typically employ scenario generation techniques to characterize the uncertainties in wind and solar power output, and then combine this with a two-level optimization model to determine energy storage location and capacity allocation schemes. Common scenario generation methods include random sampling techniques such as Monte Carlo simulation and Latin hypercube sampling. These methods generate a large number of wind and solar power output scenarios based on pre-defined probability distribution models for optimization decisions and are widely used in power system planning and operation analysis. However, traditional scenario generation methods rely on idealized probability distribution assumptions such as normal distribution and Weibull distribution, making it difficult to accurately capture the temporal correlation and complex stochastic characteristics of wind and solar power output. In particular, the fluctuation patterns of wind and solar power output under extreme weather conditions differ significantly from the pre-defined distributions, resulting in large deviations between the generated scenarios and actual operating characteristics. This inaccurate scenario input is passed to the subsequent two-level optimization model, making the energy storage configuration scheme optimized based on these scenarios unable to effectively cope with real wind and solar power output fluctuations during actual operation. This leads to problems such as insufficient or excessive energy storage capacity, and unreasonable energy storage location, affecting the economic operation and safe and stable operation of the power distribution network. In other words, existing technologies suffer from a technical problem where insufficient accuracy in generating scenarios of uncertain wind and solar power output during the dual-layer optimization configuration of distributed energy storage leads to significant deviations between the energy storage configuration scheme and actual operational needs. Summary of the Invention
[0003] In view of this, the present invention provides a distributed energy storage two-layer optimization configuration method that considers the uncertainty of wind and solar power output and carbon trading. This method can solve the technical problem in the prior art where the generation accuracy of the uncertainty scenario of wind and solar power output is insufficient, resulting in a large deviation between the energy storage configuration scheme and the actual operation requirements.
[0004] This invention is implemented as follows: It provides a two-layer optimization configuration method for distributed energy storage considering wind and solar uncertainties and carbon trading. This method collects historical wind and solar power output data for the target distribution network area and constructs a historical output dataset. It then constructs a Wasserstein generative adversarial network model and generates a set of simulated wind and solar power output scenarios through adversarial training. A K-means clustering algorithm is used to reduce the number of scenarios to obtain typical wind and solar power output scenarios. A tiered carbon trading cost model is established and transformed into a set of linear constraints for carbon trading through piecewise linearization. An energy storage site selection and capacity optimization model and a distribution network operation optimization model are established. The distribution network operation optimization model is transformed into a set of equivalent KKT constraints using KKT optimality conditions and introduced into the energy storage site selection and capacity optimization model to form a single-layer mixed-integer nonlinear programming model. Finally, the Arctic Puffin optimization algorithm combined with the CPLEX solver is used for joint optimization, outputting the globally optimal energy storage configuration scheme and the corresponding distribution network operation scheduling strategy.
[0005] This invention constructs a Wasserstein generative adversarial network model and introduces a gradient penalty mechanism and a temporal attention mechanism. This allows the model to autonomously learn the probability distribution characteristics and temporal dependencies of wind and solar power output from historical power output data without pre-setting probability distribution assumptions. The generator network continuously optimizes its generation strategy through adversarial training, while the discriminator network evaluates the distribution differences between the generated and real data. The gradient penalty mechanism ensures the stability of the training process, and the temporal attention mechanism captures the long-term dependencies of wind and solar power output by calculating the correlation weight matrix between features at different times. This ensures that the generated wind and solar power output scenarios accurately reflect the statistical regularities and temporal evolution characteristics inherent in historical data. Based on this, a K-means clustering algorithm is used to extract volatility and peak-valley difference features for scenario reduction. The resulting typical wind and solar power output scenarios retain the key features of the original data and are highly representative, providing accurate uncertainty input for subsequent energy storage optimization. This ensures that the energy storage configuration scheme can adapt to the fluctuations in wind and solar power output during actual operation, avoiding the energy storage configuration deviation problem caused by insufficient scenario generation accuracy in traditional methods. In summary, this invention solves the technical problem that insufficient accuracy in generating scenarios with uncertain wind and solar power output during the dual-layer optimization configuration of distributed energy storage leads to a large deviation between the energy storage configuration scheme and actual operational requirements. Attached Figure Description
[0006] Figure 1 This is a simplified flowchart of the method in the embodiment.
[0007] Figure 2 This is a typical wind power output scenario obtained through scenario generation and reduction.
[0008] Figure 3 This is a typical photovoltaic power output scenario obtained through scenario generation and reduction.
[0009] Figure 4 To improve the IEEE-33 node diagram of the distribution network.
[0010] Figure 5 This is a schematic diagram of the structure of a dual-layer energy storage optimization system.
[0011] Figure 6 The flowchart shows the solution process for the Arctic Puffin intelligent optimization algorithm combined with the YALMIP+CPLEX joint method.
[0012] Figure 7 This is a diagram showing the operational status of distributed energy storage with 14 nodes.
[0013] Figure 8 This is a diagram showing the operational status of distributed energy storage across 33 nodes.
[0014] Figure 9 This is a comparison chart of daily load before and after optimizing the configuration using distributed energy storage. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0016] This invention provides a two-tier optimized configuration method for distributed energy storage that considers the uncertainties of wind and solar power and carbon trading, comprising the following steps: S01. Collect historical wind power output data and historical photovoltaic power output data of the target distribution network area, and construct a historical power output dataset after standardizing and preprocessing the historical wind power output data and the historical photovoltaic power output data. S02. Construct a Wasserstein generative adversarial network model, input the historical power output dataset into the Wasserstein generative adversarial network model for adversarial training, generate a set of simulated wind and solar power output scenarios, extract the volatility feature vector and peak-valley difference feature vector of each scenario in the set of simulated wind and solar power output scenarios, and use the K-means clustering algorithm to reduce the scenarios of the volatility feature vector and the peak-valley difference feature vector to obtain typical wind and solar power output scenarios. S03. Establish a tiered carbon trading cost model, divide the carbon emission trading amount in the tiered carbon trading cost model into segments according to the interval length, set differentiated carbon trading base prices and carbon trading price growth rates for different carbon emission intervals, and transform the tiered carbon trading cost model into a set of carbon trading linear constraints through piecewise linearization technology and mixed integer programming method. S04. Taking the minimum sum of energy storage configuration cost, main grid electricity purchase cost and carbon trading cost as the upper-level optimization objective function, establish an energy storage location and capacity optimization model. The constraints of the energy storage location and capacity optimization model include upper and lower limits of energy storage capacity, upper and lower limits of energy storage output, and constraints on the number of energy storage installation nodes. S05. Using the weighted sum of the distribution network active power loss and distribution network vulnerability index as the lower-level optimization objective function, a distribution network operation optimization model is established. The constraints of the distribution network operation optimization model include active power balance constraints, power flow balance constraints, node voltage constraints, and energy storage state of charge constraints. The distribution network operation optimization model is transformed into a KKT equivalent constraint set using KKT optimality conditions. The KKT equivalent constraint set is then introduced as an upper-level constraint into the energy storage site selection and capacity optimization model to form a single-layer mixed integer nonlinear programming model. S06. Initialize the Arctic Puffin optimization algorithm population, set the population size parameter and the maximum number of iterations parameter, calculate the behavior transition coefficient, select a global search strategy or a local development strategy to update the energy storage site selection decision variables and energy storage capacity determination decision variables according to the relationship between the behavior transition coefficient and the threshold 0.5, call the CPLEX solver to solve the single-layer mixed integer nonlinear programming model for each group of energy storage configuration candidate schemes, obtain the energy storage output optimization results and distribution network operation status parameters, and calculate the fitness value of the upper-layer optimization objective function; S07. Sort the energy storage configuration candidate schemes in ascending order according to the fitness value, retain the top N energy storage configuration candidate schemes with the smallest fitness value to form a new population, update the global optimal energy storage configuration scheme, and determine whether the current iteration number has reached the maximum iteration number parameter. If it has not reached, return to step S06 to continue iterating and optimizing. If it has reached, output the global optimal energy storage configuration scheme and the corresponding distribution network operation and scheduling strategy.
[0017] The Wasserstein generative adversarial network (GAN) model comprises a generator network and a discriminator network. The generator network receives a random noise vector as input and generates a simulated wind and solar power output time series. The discriminator network distinguishes between real historical power output data and the generated simulated wind and solar power output time series. The Wasserstein GAN model enhances Lipschitz continuity by introducing a gradient penalty mechanism. This mechanism calculates the discriminator gradient norm at the interpolation points between real and generated samples and applies a secondary penalty to the degree to which the gradient norm deviates from 1.
[0018] The formula for calculating the interpolated sample in the gradient penalty mechanism is as follows: the interpolated sample equals the difference between the interpolation coefficient multiplied by the real sample plus 1 minus the interpolation coefficient, multiplied by the generated sample. The interpolation coefficient follows a uniform distribution between 0 and 1. The formula for calculating the gradient penalty term is as follows: the gradient penalty term equals the penalty weight coefficient multiplied by the expected value of the square of the 2-norm of the discriminator gradient at the interpolated sample minus 1. The penalty weight coefficient is typically set to 10.
[0019] The Wasserstein generative adversarial network model introduces a temporal attention mechanism into the generator network. This mechanism captures the long-term dependencies in the time series of wind and solar power output by calculating the correlation weight matrix between features at different times. The correlation weight matrix is obtained by scaling the query vector, key vector, and value vector through a dot product operation, with the scaling factor being the reciprocal of the square root of the key vector dimension.
[0020] The volatility feature vector is calculated as follows: The standard deviation of the output difference between adjacent time points is calculated from the time series data of the wind and solar power output simulation scenario; the standard deviation is then divided by the average output of the wind and solar power output simulation scenario for normalization. The peak-valley difference feature vector is calculated as follows: The maximum and minimum output values in the wind and solar power output simulation scenario are extracted; the difference between the maximum and minimum output values is calculated and then divided by the rated output capacity for normalization.
[0021] The K-means clustering algorithm reduces the cluster size by iteratively optimizing the sum of squared Euclidean distances from sample points to cluster centers, where the cluster center is the mean of the feature vectors of all samples within its cluster. The number of clusters is determined using the silhouette coefficient method, which comprehensively considers intra-cluster compactness and inter-cluster separation. The silhouette coefficient ranges from -1 to +1, with a value closer to +1 indicating better clustering performance.
[0022] The tiered carbon trading cost model divides the carbon emission trading amount into five carbon emission intervals. The carbon trading price in the first interval is the base price. The carbon trading prices in the second through fifth intervals are successively increased by multiplying the base price by a multiple of the carbon trading price growth rate. The carbon emission trading amount is the difference between the actual carbon emissions of the distribution network and the carbon emission allowance allocated to the distribution network. The actual carbon emissions of the distribution network are calculated by multiplying the electricity purchased from the main grid by the carbon emission intensity per unit of electricity. The carbon emission allowance allocated to the distribution network is calculated by multiplying the electricity purchased from the main grid by the free allowance coefficient per unit of electricity.
[0023] The piecewise linearization technique transforms the nonlinear piecewise carbon trading cost function into a linear constraint set by introducing auxiliary continuous variables and binary variables for carbon emission intervals. For each carbon emission interval in the tiered carbon trading cost model, a binary variable representing whether the carbon emission trading amount falls within that interval is assigned, and an auxiliary continuous variable representing the amount of carbon emissions falling within that interval is assigned. The Big M method is used to construct logical constraints that ensure exactly one carbon emission interval is activated. In the Big M method, M is a sufficiently large positive number, typically chosen as the upper bound of the possible range of values for the carbon emission trading amount.
[0024] The energy storage configuration cost includes the investment cost of the energy storage equipment and the operation and maintenance cost of the energy storage equipment. The investment cost of the energy storage equipment is converted into a daily investment cost by multiplying the installed energy storage capacity by the unit capacity cost and the installed energy storage power by the unit power cost, using an annual value conversion factor. The operation and maintenance cost of the energy storage equipment is calculated by multiplying the sum of the absolute values of the daily charging and discharging power of the energy storage by the unit power operation and maintenance cost. The annual value conversion factor is calculated using the discount rate and the lifespan of the energy storage equipment through the time value of money formula, distributing the one-time investment over each year of the entire lifespan of the energy storage equipment.
[0025] The main grid power purchase cost is obtained by multiplying the active power purchased by the distribution network from the upper-level grid by the time-of-use price for the corresponding time period, then multiplying by the time step, and summing the results over the entire 24-hour period. The time-of-use price is divided into peak price, normal price, and valley price, with the peak price being higher than the normal price, and the normal price being higher than the valley price.
[0026] The formula for calculating the active power loss of the distribution network is as follows: Traverse all node pairs in the distribution network, calculate the line conductance of the line between the node pairs for each node pair by multiplying the sum of the squares of the voltages of the two nodes by subtracting twice the product of the voltages of the two nodes and the cosine of the phase angle difference between the nodes, and sum over all node pairs and all times.
[0027] The distribution network vulnerability index is represented by half the sum of the reciprocal of the average vulnerability and the reciprocal of the vulnerability balance, summed over a 24-hour period. The average vulnerability is the arithmetic mean of the normalized vulnerabilities of all nodes. Node vulnerability is calculated by dividing the absolute value of the difference between the actual voltage and the rated voltage of a node by the rated voltage and then by the maximum voltage deviation. The normalized vulnerability is obtained by subtracting the minimum node vulnerability from the node vulnerability and then dividing by the node vulnerability range. The maximum voltage deviation is set to 0.07.
[0028] The distribution network vulnerability balance degree is calculated based on information entropy theory, reflecting the uniformity of node vulnerability distribution among nodes. The formula for calculating the distribution network vulnerability balance degree is as follows: First, calculate the proportion of each node's normalized vulnerability to the total node vulnerability. Then, calculate the sum of the negative values of the logarithms of these proportions, divided by the logarithm of the total number of nodes. Finally, subtract the square of the quotient from 1, multiplied by pi. The distribution network vulnerability balance degree ranges from 0 to 1, where 0 indicates an absolutely uniform distribution of node vulnerability among nodes, and 1 indicates that node vulnerability is completely concentrated at a single node.
[0029] The KKT optimality conditions include the original feasibility condition, the dual feasibility condition, the complementary relaxation condition, and the condition that the gradient of the Lagrange function is zero. A Lagrange function is constructed for the distribution network operation optimization model, and Lagrange multipliers are introduced to correspond to each constraint condition. Partial derivatives are calculated with respect to the decision variables and the Lagrange multipliers, and then set to zero to obtain the KKT condition equation set as the KKT equivalent constraint set.
[0030] Since the distribution network operation optimization model is a linear programming problem, it satisfies the characteristics of convex optimization problems and the Slater constraint specification. According to the strong duality theorem, the optimal value of the original problem of the distribution network operation optimization model is equal to the optimal value of the dual problem. Furthermore, the KKT optimality condition is a necessary and sufficient condition for optimality. Therefore, the KKT equivalent constraint set is equivalent to the distribution network operation optimization model.
[0031] The single-level mixed-integer nonlinear programming model includes continuous decision variables and binary decision variables. The continuous decision variables include energy storage installed capacity, energy storage installed power, energy storage charging and discharging power, and distribution network operating status parameters. The binary decision variables include energy storage site selection decision variables and carbon emission range binary variables. The objective function of the single-level mixed-integer nonlinear programming model is the upper-level optimization objective function. The constraints of the single-level mixed-integer nonlinear programming model include the constraints of the energy storage site selection and capacity optimization model, the KKT equivalent constraint set, and the carbon trading linear constraint set.
[0032] The proposed Arctic puffin optimization algorithm simulates the foraging behavior of Arctic puffins in the air and underwater, achieving a dynamic balance between global exploration and local development through a behavioral transition coefficient. Population initialization involves generating uniformly distributed random numbers between the upper and lower bounds of the energy storage site selection decision variable and the energy storage capacity determination decision variable, forming an initial set of candidate energy storage configuration schemes. The behavioral transition coefficient is calculated as follows: the behavioral transition coefficient equals 2 multiplied by the logarithm of the reciprocal of a random number between 0 and 1, multiplied by 1, minus the ratio of the current iteration number to the maximum iteration number parameter.
[0033] When the behavior transition coefficient exceeds a threshold of 0.5, a global search strategy is adopted, which includes an aerial search mode and a dive-and-prey mode. The position update formula for the aerial search mode is as follows: the new position equals the current position plus the difference between the current position and the randomly selected position multiplied by the Levy flight random number plus a perturbation term. The perturbation term is 0.5 multiplied by the rounded value of the sum of 0.05 and random numbers between 0 and 1 multiplied by a standard normally distributed random number. The Levy flight random number follows a heavy-tailed distribution, which can achieve a balance between detailed local search and large-scale global jumps.
[0034] The position update formula for the dive-and-prey mode is as follows: the position after the dive is the new position of the aerial search mode multiplied by the tangent perturbation coefficient. The tangent perturbation coefficient is equal to a random number between 0 and 1 minus 0.5 multiplied by the tangent function value of pi. The range of the tangent perturbation coefficient is from negative infinity to positive infinity, which enhances the ability of the Arctic Puffin optimization algorithm to escape local optima.
[0035] The new location and the post-dive location in the aerial search mode are merged into a candidate location set. The candidate locations are sorted in ascending order according to their fitness values. The top N candidate locations with the smallest fitness values are selected to form a new population, where N is the population size parameter.
[0036] When the behavioral transition coefficient is less than or equal to a threshold of 0.5, a local development strategy is adopted, which includes a clustering foraging mode, an enhanced search mode, and a predator avoidance mode. The clustering foraging mode simulates the cooperative foraging behavior of multiple Arctic puffins, using differential mutation at three randomly selected locations. The location update formula for the clustering foraging mode is as follows: when the random number between 0 and 1 is greater than or equal to 0.5, the clustering foraging location is equal to the first randomly selected location plus the product of the cooperation factor and the difference between the Levy flight random number and the second and third randomly selected locations; when the random number between 0 and 1 is less than 0.5, the clustering foraging location is equal to the first randomly selected location plus the product of the cooperation factor and the difference between the second and third randomly selected locations. The cooperation factor is used to adjust the scaling of the differential vector, and its value ranges from 0 to 2, decreasing linearly with iteration.
[0037] The location update formula for the enhanced search mode is as follows: the enhanced search location is the foraging location multiplied by 1 plus a time-varying amplification factor. The time-varying amplification factor is equal to 0.1 multiplied by a random number between 0 and 1 minus 1, then multiplied by the ratio of the difference between the maximum iteration number parameter and the current iteration number to the maximum iteration number parameter. The time-varying amplification factor gradually approaches 0 as the iteration progresses, achieving a smooth transition from global exploration to local development.
[0038] The predator avoidance mode incorporates the current individual's position information to prevent the Arctic puffin optimization algorithm from getting trapped in local optima. The position update formula for the predator avoidance mode is as follows: When the random number between 0 and 1 is greater than or equal to 0.5, the predator avoidance position is equal to the current position plus the product of the cooperation factor and the Levy flight random number and the difference between the two randomly selected positions; when the random number between 0 and 1 is less than 0.5, the predator avoidance position is equal to the current position plus the product of the uniformly distributed random coefficient and the difference between the two randomly selected positions, where the uniformly distributed random coefficient follows a uniform distribution between 0 and 1.
[0039] The foraging sites, enhanced search sites, and predator avoidance sites are merged into a candidate site set. The candidate sites are then sorted in ascending order according to their fitness values, and the top N candidate sites with the smallest fitness values are selected to form a new population.
[0040] The CPLEX solver employs the branch-and-bound method and the simplex method to solve the single-layer mixed-integer nonlinear programming model, ensuring a globally optimal solution. The energy storage output optimization results include the energy storage charging and discharging power at each time period, and the distribution network operating status parameters include the power purchased from the main grid at each time period and the voltage distribution at each node. The fitness value is the upper-level optimization objective function value, reflecting the comprehensive economic efficiency and low-carbon performance of the energy storage configuration candidate schemes; a smaller fitness value indicates a better energy storage configuration candidate scheme.
[0041] The globally optimal energy storage configuration scheme is the candidate scheme with the smallest fitness value in each iteration. The globally optimal energy storage configuration scheme includes the location of energy storage installation nodes, the installed capacity of energy storage, and the installed power of energy storage. The distribution network operation and scheduling strategy includes the energy storage charging and discharging power in each time period, the power purchased from the main grid in each time period, and the voltage distribution of each node.
[0042] The method described in this invention effectively captures the randomness and temporal correlation of wind and solar power output by combining a Wasserstein generative adversarial network model with gradient penalty and temporal attention mechanisms, generating typical wind and solar power output scenarios that more closely resemble actual operational characteristics. Piecewise linearization techniques and mixed-integer programming methods are used to address the nonlinear and nonconvex characteristics of the tiered carbon trading cost model, transforming the complex carbon trading mechanism into a set of linear constraints. The KKT optimality condition and strong duality theorem are used to achieve a single-layer equivalent transformation of the distribution network operation optimization model, accurately characterizing the coupling relationship between upper and lower layer decisions. By jointly solving the problem using the Arctic Puffin optimization algorithm and the CPLEX solver, computational efficiency is significantly improved while ensuring global optimality, achieving synergistic optimization of energy storage systems towards decarbonization and economic efficiency.
[0043] As an optional implementation, the present invention also provides a computer-based approach to form a distributed energy storage two-layer optimized configuration system that considers the uncertainties of wind and solar power and carbon trading. The computer is equipped with a readable storage medium that stores program instructions, which can execute the above-described method when the computer is run.
[0044] It should be noted that this invention also solves the following technical problem: Existing energy storage configuration methods use fixed carbon prices or simple linear carbon price models when dealing with carbon trading mechanisms, which cannot accurately reflect the actual carbon trading rules of tiered carbon emission quota management and increasing penalties for excess emissions, resulting in insufficient responsiveness of energy storage configuration schemes to carbon emission reduction policies. This invention establishes a tiered carbon trading cost model, dividing the carbon emission trading amount into multiple intervals and setting differentiated carbon trading base prices and price growth rates for different intervals. This realistically portrays the nonlinear relationship of increasing carbon trading prices as carbon emissions increase. Furthermore, piecewise linearization techniques are used to introduce auxiliary continuous variables and binary variables, and the Big M method is used to construct logical constraints to ensure that the carbon emission trading amount uniquely falls within a certain interval. This transforms the nonlinear and non-convex carbon trading cost function into a set of linear constraints that can be solved efficiently, ensuring the accuracy of the carbon trading mechanism while avoiding the computational difficulties of nonlinear optimization. This enables energy storage configuration schemes to fully respond to carbon emission reduction policy signals and achieve low-carbon operation of the distribution network.
[0045] Furthermore, this invention also solves the technical problems of slow convergence speed and difficulty in guaranteeing global optimality in traditional bi-level optimization methods. Existing bi-level optimization methods typically employ heuristic algorithms for iterative optimization or directly use commercial solvers to solve the original bi-level model. The former requires repeated calls to the lower-level optimization model in each iteration due to the nested bi-level structure, resulting in huge computational load and a tendency to get trapped in local optima. The latter faces the challenge of solving non-convex bi-level optimization problems. This invention transforms the lower-level distribution network operation optimization problem into a set of equality and inequality constraints by utilizing KKT optimality conditions. Since the lower-level problem satisfies convexity and constraint specification conditions, and the KKT conditions are necessary and sufficient conditions for optimality, these conditions are introduced as constraints into the upper-level problem, realizing the equivalent single-level transformation of the two-level model and eliminating the double-level nested structure. Furthermore, it combines the global search capability of the Arctic Puffin optimization algorithm with the precise solution capability of the CPLEX solver for hybrid optimization. The Arctic Puffin optimization algorithm quickly locates the high-quality solution space of energy storage configuration decision variables by dynamically balancing global exploration and local development through behavioral transition coefficients. The CPLEX solver uses the branch and bound method to accurately solve the single-level mixed integer nonlinear programming model to obtain the optimal operation strategy. This collaborative mechanism of outer-level intelligent search and inner-level precise solution ensures global optimality and significantly improves computational efficiency.
[0046] Specifically, the principle of this invention is as follows: The fundamental reason why this invention can solve the above-mentioned technical problems lies in the use of a data-driven deep learning scene generation method to replace the traditional parameterized probability distribution assumption method. The core mechanism of the Wasserstein generative adversarial network model is to approximate the real data distribution through an adversarial game between the generator and the discriminator. The generator attempts to generate samples that are difficult to distinguish from real data, while the discriminator strives to distinguish between real samples and generated samples. This adversarial training process drives the generator to continuously learn the inherent distribution law of real data without the need for manually specifying the probability distribution type and parameters. The gradient penalty mechanism constrains the discriminator gradient at the interpolation point between real samples and generated samples, ensuring that the discriminator satisfies the Lipschitz continuity condition. This solves the problems of instability and mode collapse in traditional generative adversarial networks, enabling the network to converge to the real data distribution. The temporal attention mechanism calculates the correlation weights between different moments in a time series through scaling dot products of query vectors, key vectors, and value vectors. It assigns higher weights to historical moments with strong correlation to the current moment, thereby capturing the long-term dependencies and periodic fluctuation patterns of wind and solar power output over time. This mechanism ensures that the generated scenes not only match the statistical distribution of real data but also closely resemble the temporal evolution characteristics. The K-means clustering algorithm reduces the number of scenes based on two feature vectors representing key characteristics of wind and solar power output: volatility and peak-to-valley difference. It iteratively optimizes the distance from samples within a cluster to the cluster center to group scenes, with the center of each cluster representing a typical scene. This reduction method significantly reduces the number of scenes while preserving the main features of the original scene set, improving the efficiency of subsequent optimization calculations.
[0047] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0048] The specific implementation of step S01 is as follows: Historical wind power output data and historical photovoltaic power output data of the target distribution network area are collected to obtain a historical power output time series with a time span of no less than one year and a time resolution of 15 minutes or 1 hour. The collected historical wind power output data and historical photovoltaic power output data are then subjected to standardized preprocessing. The standardization formula is expressed as follows: ; In the formula, For the standardized first Real-time output data, with values ranging from 0 to 1; For the first Raw power output data at any given moment, in kilowatts; The minimum output value in the historical power output dataset, in kilowatts; The maximum output value in the historical power output dataset is expressed in kilowatts. After standardization preprocessing, a historical power output dataset is constructed, where the number of rows in the dataset matrix represents the number of time steps, and the number of columns represents the total number of wind farms and photovoltaic power plants.
[0049] The specific implementation of step S02 is as follows: Construct a Wasserstein generative adversarial network model, including a generator network and a discriminator network. The objective function of the generator network is expressed as follows: ; In the formula, For generator networks; For discriminator networks; For expectation operators; Provide data samples that reflect real historical events and conform to the actual data distribution. ; The probability distribution function of the real data; The simulated wind and solar power output data samples generated by the generator follow the generated data distribution. ; The probability distribution function for generating the data; For the discriminator to judge real samples The output value is the probability of the judgment being true, and the value ranges from 0 to 1; For the discriminator to generate samples The output value represents the probability of a true judgment, ranging from 0 to 1. The objective function of the discriminator network is expressed as follows: ; The Wasserstein distance is introduced to replace the traditional Jensen-Shannon divergence. The Wasserstein distance is defined as follows: ; In the formula, The Wasserstein distance between the real data distribution and the generated data distribution; For supremum operators; Discriminator It must satisfy the 1-Lipschitz continuity constraint, where For discriminator function The Lipschitz constant. The formula for calculating the interpolated samples using the gradient penalty mechanism is as follows: ; In the formula, For interpolation samples; The interpolation coefficients follow a uniform distribution between 0 and 1. The formula for calculating the gradient penalty term is as follows: ; In the formula, This is a gradient penalty term; This is the penalty weighting coefficient, usually set to 10; Let be the probability distribution function of the interpolated samples; For the discriminator in the interpolated samples to The gradient vector; This is the 2-norm operator. The final objective function of the Wasserstein generative adversarial network model is expressed as follows: ; Historical power output datasets were input into the Wasserstein generative adversarial network model for adversarial training, with 5000 to 10000 training epochs. A set of simulated wind and solar power output scenarios was generated, with the number of scenarios ranging from 1000 to 5000. The formula for calculating the volatility eigenvector is as follows: ; In the formula, This is the volatility eigenvector, dimensionless; The number of time steps for simulating the scene to contribute to the landscape; For the first The output value at any given moment, expressed in kilowatts; For the first The output value at any given moment, expressed in kilowatts; The power output is the average value in kilowatts for the simulated wind and solar power output scenario. The formula for calculating the peak-valley difference eigenvector is as follows: ; In the formula, This is the peak-valley difference eigenvector, which is dimensionless. The maximum output value in the wind and solar power output simulation scenario, in kilowatts; The minimum power output value in the wind and solar power output simulation scenario, in kilowatts; The rated output capacity is expressed in kilowatts. K-means clustering algorithm is used to reduce the scenario size of the volatility feature vector and peak-to-valley difference feature vector. The objective function of K-means clustering is as follows: ; In the formula, Assign sets to the clusters of the samples; For the first The cluster label to which each sample belongs; The total number of simulated scenes contributing to the landscape; For the first The feature vector of a simulated wind and solar power output scenario is composed of volatility feature vectors. and peak-valley difference eigenvector composition; For the first The cluster center of the cluster to which each sample belongs; This is the Euclidean distance operator. The number of clusters is determined using the silhouette coefficient method, and the formula for calculating the silhouette coefficient is as follows: ; In the formula, For the first The silhouette coefficient of each sample, with a value ranging from negative 1 to positive 1; For the first The average distance from each sample to other samples within its cluster; For the first The average distance from each sample to the nearest sample not belonging to its cluster. From each cluster, the sample closest to the cluster center is selected as a typical landscape power output scenario.
[0050] The specific implementation method of step S03 is as follows: Establish a tiered carbon trading cost model, dividing the carbon emission trading amount into 5 carbon emission intervals. The total cost calculation formula for the tiered carbon trading cost model is expressed as follows: ; In the formula, The carbon trading cost is expressed in yuan. The formula for calculating the carbon trading cost for the first carbon emission bracket is as follows: ; In the formula, The carbon trading cost for the first carbon emission bracket is expressed in yuan. This is the base price for carbon trading, expressed in yuan per ton. Carbon emissions trading value, in tons. This formula is applicable at this time; The length of the carbon emission interval is expressed in tons, with an empirical value of 100. The formula for calculating the carbon trading cost of the second carbon emission interval is as follows: ; In the formula, The carbon trading cost for the second carbon emission bracket is expressed in yuan. This represents the carbon trading price growth rate, dimensionless, and defaults to 0.2. This formula applies in this case. The formula for calculating the carbon trading cost for the third carbon emission zone is as follows: ; In the formula, The carbon trading cost for the third carbon emission bracket is expressed in yuan. This formula applies in this case. The formula for calculating the carbon trading cost for the fourth carbon emission zone is as follows: ; In the formula, The carbon trading cost for the fourth carbon emission bracket is expressed in yuan. This formula applies in this case. The formula for calculating the carbon trading cost for the fifth carbon emission zone is as follows: ; In the formula, The carbon trading cost for the fifth carbon emission zone is expressed in yuan. This formula applies when carbon emissions trading is involved. The formula for calculating carbon emissions trading is as follows: ; In the formula, The actual carbon emissions of the power distribution network are expressed in tons. Carbon emission allowances are allocated to the power distribution network, in tons. The formula for calculating the actual carbon emissions of the power distribution network is as follows: ; In the formula, Carbon emission intensity per unit of electricity, expressed in tons per kilowatt-hour, with an empirical value of 0.000785; For the first The power purchased from the main grid during the specified time period, in kilowatts; This is the number of time steps in the scheduling cycle, typically 24. The time step is in hours, typically 1. The formula for calculating carbon emission allowances allocated to the power distribution network is as follows: ; In the formula, The unit is the free electricity quota coefficient, expressed in tons per kilowatt-hour, with an empirical value of 0.000628. An auxiliary continuous variable is introduced. Indicates falling on the 1st Carbon emissions within a given carbon emission range, expressed in tons, are represented by binary variables for each carbon emission range. Indicates whether the carbon emissions trading volume falls within the first category. A carbon emission range, when The time indicates that the carbon emissions trading volume falls within the first... A carbon emission range, when The time indicated that the carbon emissions trading volume would not fall into the first category. One carbon emission range, The carbon emission interval is numbered, with values ranging from 1 to 5. The Big M method's logical constraints are expressed as follows: ; ; ; In the formula, It is a sufficiently large positive number, in tons, and is usually taken as the upper limit of the possible range of carbon emission trading amounts, with an empirical value of 10,000.
[0051] The specific implementation of step S04 is as follows: Establish an energy storage location and capacity optimization model, and the upper-level optimization objective function is expressed as follows: ; In the formula, The objective function for the upper-level optimization is expressed in units of yuan. The cost of energy storage configuration is expressed in yuan. The cost of electricity purchased from the main grid is expressed in yuan. The formula for calculating the cost of energy storage configuration is as follows: ; In the formula, The unit for investment cost of energy storage equipment is yuan. The unit for calculating the operation and maintenance cost of energy storage equipment is yuan. The formula for calculating the investment cost of energy storage equipment is as follows: ; In the formula, This represents the total number of nodes in the distribution network. For nodes The annual conversion factor for energy storage installation costs is dimensionless. The unit cost of energy storage equipment is expressed in yuan per kilowatt-hour, with an empirical value of 800. For nodes The energy storage installed capacity is expressed in kilowatt-hours. The unit power cost of energy storage equipment is expressed in yuan per kilowatt, with an empirical value of 2000. For nodes The energy storage installed capacity is expressed in kilowatts (kW); 365 represents the number of days in a year, used to convert annual costs to daily costs. The formula for calculating the annual cost conversion factor is as follows: ; In the formula, The discount rate is dimensionless and defaults to 0.08. For nodes The actual operating life of the energy storage equipment is expressed in years, with an empirical value of 10. The formula for calculating the operation and maintenance cost of energy storage equipment is as follows: ; In the formula, The unit of measurement is the operation and maintenance cost per unit of electricity, expressed in yuan per kilowatt-hour, with an empirical value of 0.05. For nodes In the The energy storage charging and discharging power during a given time period is expressed in kilowatts (kW). The formula for calculating the main grid electricity purchase cost is as follows: ; In the formula, For the first The time-of-use electricity price is expressed in yuan per kilowatt-hour. The empirical values for peak hour price are 1.2 yuan, for normal hour price are 0.8 yuan, and for off-peak price are 0.4 yuan. The upper and lower limits for energy storage capacity are defined as follows: ; In the formula, This represents the lower limit of energy storage capacity, expressed in kilowatt-hours, with an empirical value of 0. This represents the upper limit of energy storage capacity, expressed in kilowatt-hours, with an empirical value of 500. The upper and lower limits of energy storage output constraints are described below: ; In the formula, This represents the lower limit of energy storage output, measured in kilowatts, with an empirical value of -100. This represents the upper limit of energy storage output, expressed in kilowatts, with an empirical value of 100. The constraint on the number of energy storage installation nodes is described below: ; In the formula, For nodes The energy storage location decision variables, when the node The value is 1 when energy storage is installed, otherwise the value is 0. The maximum number of energy storage installation nodes is set at 3, based on experience.
[0052] The specific implementation of step S05 is as follows: Establish a power distribution network operation optimization model, and the lower-level optimization objective function is expressed as follows: ; In the formula, To optimize the objective function for the lower level; Active power loss in the distribution network, expressed in kilowatt-hours; This is a dimensionless indicator of the vulnerability of the power distribution network. This is the weighting coefficient for active power losses in the distribution network, dimensionless, with an empirical value of 0.5; The weighting coefficient for the vulnerability index of the distribution network is dimensionless and has an empirical value of 0.5, satisfying the following conditions: To ensure uniformity of the dimensions of the lower-level optimization objective function, the active power loss is normalized. The normalization formula is as follows: ; In the formula, The normalized active power loss is dimensionless. For reference active power loss, the unit is kilowatt-hour, and the empirical value is 1000. The lower-level optimization objective function is revised as follows: ; The formula for calculating active power loss in a power distribution network is as follows: ; In the formula, For nodes and nodes The line conductance of the circuit between them, in Siemens units; For the first Time period nodes The voltage is expressed in kilovolts. For the first Time period nodes The voltage is expressed in kilovolts. For the first Time period nodes and nodes The phase angle difference, expressed in radians. The formula for calculating the vulnerability index of the distribution network is as follows: ; In the formula, For the first The average vulnerability of the distribution network over a given time period is dimensionless. For the first The vulnerability balance of the distribution network during a given time period is dimensionless. To ensure safety and prevent the denominator from being zero, an empirical value of 0.0001 is used. The formula for calculating node vulnerability is as follows: ; In the formula, For nodes In the The vulnerability of time periods is dimensionless; For nodes In the The actual voltage during the time period, in kilovolts; For nodes The rated voltage, in kilovolts; The maximum voltage offset is dimensionless and has a value of 0.07. The formula for calculating the normalized vulnerability of a node is as follows: ; In the formula, For nodes In the Normalization vulnerability of time period, dimensionless; For the first Minimum vulnerability value of all nodes during the time period; For the first The maximum vulnerability value of all nodes during the time period. The formula for calculating the average vulnerability of the distribution network is as follows: ; The formula for calculating the node vulnerability ratio is as follows: ; In the formula, For nodes In the The vulnerability ratio for a given time period is dimensionless. The formula for calculating the vulnerability balance of a distribution network is as follows: ; In the formula, Pi, with a value of 3.14159; It is a logarithmic function to the base 2; the vulnerability balance of the distribution network. It is a dimensionless index, with a value range from 0 to 3.14159. A value close to 0 indicates that the node vulnerability is absolutely uniformly distributed among all nodes. A value close to 3.14159 indicates that node vulnerability is entirely concentrated in a single node. The active power balance constraint is expressed as follows: ; In the formula, For the first Distributed power access nodes during time periods The power, measured in kilowatts; For the first Total system load for the time period, in kilowatts; For the first The active power loss of the distribution network during a given time period, expressed in kilowatts, is calculated using the following formula: ; The power flow balance constraint is expressed as follows: ; ; In the formula, For the first Time-period injection node The active power, expressed in kilowatts; For the first Time-period injection node Reactive power, measured in kilovars; For nodes A set of connected nodes; For nodes To the node Conductance of line mutual admittance, in Siemens units; For nodes To the node The susceptance of the line mutual admittance, in Siemens units; For the first Time period nodes The voltage is expressed in kilovolts. For the first Time period nodes The voltage is expressed in kilovolts. For the first Time period nodes With nodes The phase angle difference, in radians. The node voltage constraint is described as follows: ; In the formula, For nodes In the Voltage during a given time period, in kilovolts; For nodes The upper limit of voltage, in kilovolts, has an empirical value of 1.07. For nodes The lower voltage limit, in kilovolts, has an empirical value of 0.93. The energy storage state-of-charge constraints are described as follows: ; ; In the formula, For nodes In the The state of charge during a given time period is dimensionless and ranges from 0 to 1. For nodes In the The state of charge during a given time period is dimensionless. The self-discharge rate of energy storage is dimensionless, with an empirical value of 0.001. Energy storage charging efficiency is dimensionless and has an empirical value of 0.95. For nodes In the Charging power during a given period, measured in kilowatts; For nodes In the The discharge power during a given period, expressed in kilowatts; The energy storage discharge efficiency is dimensionless and has an empirical value of 0.95. This is the lower limit of the state of charge of energy storage, dimensionless, with an empirical value of 0.2; This represents the upper limit of the energy storage's state of charge, is dimensionless, and has an empirical value of 0.9. The relationship between the energy storage's charging and discharging power and its total output is expressed as follows: ; In the formula, when When the energy storage is in a discharging state, The energy storage is in a charging state. A Lagrangian function is constructed for the distribution network operation optimization model, and Lagrange multipliers are introduced to correspond to each constraint condition. Partial derivatives are obtained with respect to the decision variables and Lagrange multipliers, and the partial derivatives are set to zero to obtain the KKT condition equation set as the KKT equivalent constraint set. The KKT equivalent constraint set is introduced as the upper-level constraint into the energy storage site selection and capacity optimization model to form a single-layer mixed integer nonlinear programming model.
[0053] The specific implementation of step S06 is as follows: Initialize the Arctic puffin optimization algorithm population. The population initialization formula is expressed as follows: ; In the formula, For the first The initial position vector of the Arctic Puffin includes energy storage location decision variables and energy storage capacity decision variables; Individuals in the population are numbered, with values ranging from 1 to... ; A random number between 0 and 1; The upper bound vector of the decision variables; Let the lower bound vector be the decision variable; The population size parameter is set, with an empirical value of 50. The maximum number of iterations parameter is also set. The empirical value is 100. The formula for calculating the behavioral transition coefficient is as follows: ; In the formula, The behavioral transition coefficient is dimensionless. This represents the current iteration number; It is a function of the natural logarithm. When the behavior is a transition coefficient... When the value exceeds the threshold of 0.5, a global search strategy is adopted. The position update formula for the over-the-air search mode is expressed as follows: ; ; In the formula, For the first The new position vector of the Arctic puffin after aerial search; For the first Only Arctic puffins in the 1st The current position vector in the next iteration; From 1 to random integers between and ; Let the position vector be randomly selected from the current population and ; The random numbers generated by Levy's flight are dimensionless. The dimension of the decision variables; This is a rounding function; These are dimensionless random numbers that follow a standard normal distribution. The formula for calculating Levy flight random numbers is as follows: ; , ; , ; In the formula, and These are random numbers that follow a normal distribution. Let be the Levy distribution parameter, which is dimensionless and has an empirical value of 1.5. It is a gamma function; random numbers Standard deviation; random numbers Standard deviation; This indicates that the mean is 0 and the variance is 0. The position update formula for the dive-predation pattern follows a normal distribution. ; ; In the formula, For the first The position vector of an Arctic puffin after it has dove to catch a prey; The tangent perturbation coefficient is dimensionless. The function is tangent. The aerial search positions and dive-to-prey positions are merged into a candidate position set, sorted in ascending order according to fitness values, and the position with the smallest fitness value is selected. Each candidate position forms a new population, and the update formula is expressed as follows: ; ; ; In the formula, For the set of candidate positions; This is a set union operation; This is a sorting function based on fitness values in ascending order. The set of sorted positions; For the first Only Arctic puffins in the 1st The position vector is updated in the next iteration. When the behavior is a transition coefficient... When the value is less than or equal to the threshold of 0.5, a local exploitation strategy is adopted. The position update formula for the clustered foraging mode is expressed as follows: ; In the formula, For the first The position vector of a single Arctic puffin after it has gathered to forage; The cooperation factor is dimensionless and ranges from 0 to 2, decreasing linearly with iteration. , , From 1 to Random integers between, which are distinct and none are equal to ; , , Let represent three position vectors randomly selected from the current population. The formula for calculating the cooperation factor is as follows: ; In the formula, the cooperation factor The value decreases linearly with the number of iterations, starting at 2 and eventually converging to 0. The position update formula for the enhanced search pattern is expressed as follows: ; ; In the formula, The time-varying amplification factor is dimensionless. The position update formula for predator avoidance mode is expressed as follows: ; In the formula, The random coefficients are uniformly distributed, dimensionless, and follow a uniform distribution between 0 and 1. Foraging sites, enhanced search sites, and predator avoidance sites are merged into a candidate site set, sorted in ascending order according to fitness values, and the site with the smallest fitness value is selected. Each candidate position forms a new population, and the update formula is expressed as follows: ; ; ; For each group of energy storage configuration candidate schemes, the CPLEX solver is used to solve a single-level mixed integer nonlinear programming model to obtain the energy storage output optimization results and distribution network operation state parameters. The formula for calculating the fitness value is as follows: ; In the formula, For the first The fitness value of each energy storage configuration candidate scheme, in yuan.
[0054] The specific implementation of step S07 is as follows: The candidate energy storage configuration schemes are sorted in ascending order according to their fitness values. The sorting formula is expressed as follows: ; In the formula, This is the sequence of fitness values sorted in ascending order. The first few fitness values are retained. A new population is formed from the candidate energy storage configuration schemes, and the globally optimal energy storage configuration scheme is updated. The update formula is expressed as follows: ; In the formula, For the first The globally optimal energy storage configuration scheme for the next iteration; The independent variable is used to minimize the objective function. The current iteration number is then determined. Has the maximum number of iterations been reached? ,like Then let And return to step S06 to continue iterative optimization, if Then output the globally optimal energy storage configuration scheme. And the corresponding distribution network operation and scheduling strategy. The globally optimal energy storage configuration scheme includes the location of energy storage installation nodes, the installed capacity of energy storage, and the installed power of energy storage. The distribution network operation and scheduling strategy includes the energy storage charging and discharging power in each time period, the power purchased from the main grid in each time period, and the voltage distribution of each node.
[0055] To better understand and implement this invention, a specific application scenario is provided below as Example 2: A technical team conducted research on the optimal configuration of distributed energy storage in a distribution network area containing 33 nodes. This distribution network connects 200kW distributed photovoltaic systems at nodes 9 and 30, and 200kW wind power systems at nodes 14 and 20. Due to the strong randomness and volatility of wind and solar power output, the distribution network operation is unstable, and it faces high carbon emission pressure. To solve the above problems, the technical team adopted the two-layer optimal configuration method for distributed energy storage that considers the uncertainty of wind and solar power and carbon trading, as described in this invention. The specific implementation process is as follows.
[0056] like Figure 1 As shown, the technical team first collected historical wind power output data and historical photovoltaic output data for the distribution network area over the past two years, totaling 730 days of 24-hour continuous data. The historical wind power output data and historical photovoltaic output data were standardized and preprocessed, normalizing the output data to between 0 and 1 to construct a historical output dataset. The technical team then constructed a Wasserstein generative adversarial network model, which includes a generator network and a discriminator network. The generator network receives a 128-dimensional random noise vector as input and generates simulated wind and solar power output time series. The discriminator network is used to distinguish between the real historical output data and the generated simulated wind and solar power output time series. The objective function of a traditional generative adversarial network can be expressed as... ,in This represents the expected value of the corresponding sample. For the generated data exist The probability of judging a value as true in the middle. Representing real data exist The probability of judging it as true.
[0057] The technical team introduced Wasserstein distance as the objective function to replace the Jensen-Shannon divergence in traditional generative adversarial networks. Wasserstein distance is defined as... ,in Discriminator It must satisfy 1-Lipschitz continuity. To enhance Lipschitz continuity and enable faster model convergence, the technical team introduced a gradient penalty mechanism, the expression of which is: ,in , , Describes the 2-norm. This indicates that the weight coefficient of the gradient penalty term is set to 10. At this point, the objective function of the Wasserstein generative adversarial network model transforms into... .
[0058] The technical team introduced a temporal attention mechanism into the generator network to capture the long-term dependencies in the wind and solar power output time series by calculating the correlation weight matrix between features at different times. After 200 rounds of iterative training, the trained generator generated 500 simulated scenarios that conformed to the characteristics of wind and solar power output. The team extracted the volatility feature vector and peak-to-valley difference feature vector for each scenario in the wind and solar power output simulation scenario set. The volatility feature vector was calculated by dividing the standard deviation of the output difference between adjacent times in the time series data of the wind and solar power output simulation scenario by the mean output of the wind and solar power output simulation scenario. The peak-to-valley difference feature vector was calculated by extracting the difference between the maximum and minimum output values in the wind and solar power output simulation scenario and dividing it by the rated output capacity. The team used the K-means clustering algorithm to reduce the volatility feature vector and peak-to-valley difference feature vector to minimize the objective function. ,in This indicates the cluster assignment of the samples. As the cluster center, This represents the Euclidean distance. The optimal number of clusters was determined to be 8 using the silhouette coefficient method. From each cluster, the sample closest to the cluster center was selected as a typical scene, resulting in 8 typical landscape power output scenes. For example... Figure 2 The image shows a typical wind power output scenario, such as... Figure 3 The image shows a typical photovoltaic power output scenario.
[0059] like Figure 4 As shown, the technical team established a tiered carbon trading cost model for improving the IEEE-33 node system of the distribution network. The team divided the carbon emission trading amount in the tiered carbon trading cost model into segments according to the interval length. ,in This represents the actual carbon emissions generated by the microgrid. The total carbon emission allowance allocated to microgrids by relevant departments. Set to 0.785 kg / kWh, Set to 0.542 kg / kWh, The electricity purchased by the distribution network from upstream power plants. The technical team divided the carbon emissions trading quota into five carbon emission zones, with each zone having a length of... Set to 500kg, base price for carbon trading Set at 80 yuan / ton, carbon trading price growth rate Set to 0.15. The carbon trading cost expression of the tiered carbon trading mechanism is a piecewise function. The carbon trading price in the first carbon emission interval is the base carbon trading price. The carbon trading prices in the second to fifth carbon emission intervals are successively increased by the base carbon trading price multiplied by the carbon trading price growth rate multiple based on the previous carbon emission interval.
[0060] The technical team transformed the tiered carbon trading cost model into a set of linear constraints for carbon trading using piecewise linearization and mixed-integer programming. For each carbon emission interval in the tiered carbon trading cost model, a binary variable representing whether the carbon emission trading amount falls within that interval is assigned. An auxiliary continuous variable represents the amount of carbon emissions falling within that interval. Logical constraints are constructed using the Big M method to ensure that exactly one carbon emission interval is activated, with M taking the value of 10000 kg.
[0061] like Figure 5 As shown, the technical team established an energy storage site selection and capacity optimization model. The upper-level optimization objective function is to minimize the sum of energy storage configuration costs, grid power purchase costs, and carbon trading costs. Among them, the cost of energy storage configuration This includes the investment cost of energy storage equipment and the operation and maintenance cost of energy storage equipment. Investment cost of energy storage equipment ,in For nodes The annual conversion factor for energy storage installation costs. Set to 10 years, discount rate Set to 0.08, unit capacity cost Set at 1200 yuan / kWh, unit power cost The cost is set at 800 yuan / kW. (This refers to the operation and maintenance cost of energy storage equipment.) Unit power operation and maintenance cost Set at 0.05 yuan / kW. Main grid electricity purchase cost. The peak-hour electricity price is set at 1.2 yuan / kWh, the normal-hour price at 0.8 yuan / kWh, and the off-peak price at 0.4 yuan / kWh. The constraints of the energy storage site selection and capacity optimization model include upper and lower limits on energy storage capacity. Lower limit of energy storage capacity Set to 0kWh, maximum energy storage capacity. Set to 1000kWh. Energy storage output upper and lower limits constraints. Lower limit of energy storage output Set to 0kW, maximum energy storage output Set to 500kW. Constraints on the number of energy storage installation nodes. Energy storage installation limit Set to 2 to allow access from nodes 2 to 33.
[0062] The technical team established a distribution network operation optimization model, using the weighted sum of distribution network active power loss and distribution network vulnerability indicators as the lower-level optimization objective function. ,in Set to 0.6, Set to 0.4. Active power loss in the distribution network. Vulnerability indicators of power distribution networks .node exist The fragility of time is Maximum voltage offset The value is 0.07. Node normalization vulnerability. Average vulnerability of distribution networks Vulnerability balance of distribution network ,in The constraints of the distribution network operation optimization model include active power balance constraints. Current balance constraint and Node voltage constraints and Energy storage state of charge constraints and Among them, energy storage charging and discharging efficiency and All are set to 0.95, energy storage self-discharge rate Set to 0.001, minimum state of charge for energy storage. Set to 0.2, upper limit of energy storage state of charge. Set it to 0.9.
[0063] The technical team transformed the distribution network operation optimization model into a KKT equivalent constraint set using KKT optimality conditions. Since the distribution network operation optimization model is a linear programming problem, satisfying the characteristics of convex optimization problems and the Slater constraint specification, according to the strong duality theorem, the optimal value of the primal problem in the distribution network operation optimization model equals the optimal value of the dual problem, and the KKT optimality conditions are necessary and sufficient conditions for optimality. The team constructed a Lagrangian function for the distribution network operation optimization model, introduced Lagrange multipliers corresponding to each constraint condition, and obtained partial derivatives with respect to the decision variables and Lagrange multipliers, setting the partial derivatives to zero to obtain the KKT condition equation set as the KKT equivalent constraint set. The team then introduced this KKT equivalent constraint set as a higher-level constraint into the energy storage site selection and capacity optimization model, forming a single-layer mixed-integer nonlinear programming model. The single-level mixed integer nonlinear programming model includes continuous decision variables and binary decision variables. The continuous decision variables include energy storage installed capacity, energy storage installed power, energy storage charging and discharging power, and distribution network operation status parameters. The binary decision variables include energy storage site selection decision variables and carbon emission range binary variables.
[0064] like Figure 6 As shown, the technical team used the Arctic Puffin optimization algorithm combined with the YALMIP+CPLEX method to solve a single-layer mixed-integer nonlinear programming model. The team initialized the Arctic Puffin optimization algorithm population and set the population size parameter. The maximum number of iterations is 50. The population is initialized to 100. Population initialization is performed using the formula... Uniformly distributed random numbers are generated between the upper and lower bounds of the energy storage site selection decision variables and the upper and lower bounds of the energy storage capacity determination decision variables to form an initial set of candidate energy storage configuration schemes. The technical team calculates the behavioral transition coefficient. The global search strategy or the local development strategy is selected based on the relationship between the behavior transition coefficient and the threshold of 0.5. When the behavior transition coefficient is greater than 0.5, the aerial search mode is adopted. ,in , These are random numbers that conform to a standard normal distribution. (Dive-and-prey pattern) ,in The new locations from the aerial search pattern and the post-dive locations are merged into a candidate location set, sorted in ascending order according to fitness values, and the top 50 candidate locations with the lowest fitness values are selected to form a new population. When the behavioral transition coefficient is less than or equal to 0.5, a gregarious foraging pattern is adopted; when the random number is greater than or equal to 0.5, a more aggressive foraging pattern is adopted. When the random number is less than 0.5 Among them, cooperation factor The iteration decreases linearly. This strengthens the search pattern. ,in Predator Avoidance Mode: When the random number is greater than or equal to 0.5 When the random number is less than 0.5 ,in The random numbers are uniformly distributed between 0 and 1. The foraging sites, enhanced search sites, and predator avoidance sites are merged into a candidate site set, sorted in ascending order according to fitness values, and the top 50 candidate sites with the lowest fitness values are selected to form a new population.
[0065] The technical team used the CPLEX solver to solve a single-level mixed-integer nonlinear programming model for each group of energy storage configuration candidate schemes, obtaining the energy storage output optimization results and distribution network operation parameters. The CPLEX solver used the branch and bound method and the simplex method to solve the single-level mixed-integer nonlinear programming model, ensuring that the globally optimal solution was obtained. The technical team calculated the fitness value of the upper-level optimization objective function, sorted the energy storage configuration candidate schemes in ascending order according to the fitness value, and retained the top 50 energy storage configuration candidate schemes with the smallest fitness values to form a new population, updating the globally optimal energy storage configuration scheme. The technical team checked whether the current iteration count had reached the maximum iteration count parameter. If not, it returned to continue iterating for optimization; if it had, it output the globally optimal energy storage configuration scheme and the corresponding distribution network operation and scheduling strategy. After 100 iterations, the technical team obtained the globally optimal energy storage configuration scheme as installing an energy storage system with a capacity of 789 kWh and a power of 394.5 kW at node 14 and an energy storage system with a capacity of 733 kWh and a power of 366.5 kW at node 33.
[0066] The technical team analyzed and verified the optimized configuration results, and the specific data is shown in Table 1.
[0067] Table 1 Comparison of Energy Storage Configuration Optimization Results
[0068] like Figure 7 The diagram shown illustrates the operational status of distributed energy storage with 14 nodes. Figure 8 The diagram shows the operational status of distributed energy storage across 33 nodes. The technical team observed that the energy storage system charges during off-peak hours and discharges during peak hours, fully utilizing its peak-shaving and valley-filling capabilities. The state of charge (SOC) of the energy storage system is consistently maintained between 0.2% and 0.9%, avoiding overcharging or over-discharging. Figure 9 The figure shows a comparison of daily load before and after the configuration of distributed energy storage. After configuring energy storage, the load curve is smoother, the peak-to-valley difference is significantly reduced, and the distribution network load tends to be in a balanced state.
[0069] This invention represents a significant technological advancement over traditional energy storage configuration methods. In modeling wind and solar uncertainties, traditional methods often rely on historical data statistics or simple probability distribution simulations, which struggle to accurately depict the temporal correlation and long-term dependence of wind and solar output. This invention, however, utilizes a Wasserstein generative adversarial network model combined with gradient penalty and temporal attention mechanisms to learn the intrinsic patterns of wind and solar output from a data-driven perspective. The generated typical scenarios more closely resemble actual operational characteristics, providing more reliable input data for energy storage configuration. Regarding carbon trading mechanism modeling, traditional methods often employ linear carbon trading cost functions, neglecting the nonlinear and non-convex characteristics of tiered carbon trading mechanisms. This invention transforms the complex carbon trading mechanism into a set of linear constraints through piecewise linearization and mixed-integer programming, accurately reflecting differentiated carbon trading prices across different emission ranges and incentivizing the distribution network to proactively reduce carbon emissions. Finally, in solving the two-level optimization model, traditional methods often employ iterative solutions or heuristic algorithms, which struggle to guarantee global optimality and suffer from low computational efficiency. This invention achieves a single-layer equivalent transformation of the distribution network operation optimization model through KKT optimality conditions and the strong duality theorem, accurately characterizing the coupling relationship between upper and lower layer decisions. It then uses the Arctic Puffin optimization algorithm and the CPLEX solver in conjunction to solve the problem, significantly improving computational efficiency while ensuring global optimality. Regarding the setting of optimization objectives, this invention simultaneously considers energy storage configuration costs, mains grid electricity purchase costs, and carbon trading costs in the upper-layer objectives, and simultaneously considers distribution network active power losses and vulnerability indicators in the lower-layer objectives, achieving comprehensive and synergistic optimization of economy, low carbon emissions, and security.
Claims
1. A two-tiered optimization allocation method for distributed energy storage considering wind and solar uncertainties and carbon trading, characterized in that, Historical wind power output data and historical photovoltaic output data of the target distribution network area are collected and a historical output dataset is constructed. A Wasserstein generative adversarial network model is constructed and a set of simulated wind and solar power output scenarios is generated through adversarial training. K-means clustering algorithm is used to reduce the scenarios to obtain typical wind and solar power output scenarios. A tiered carbon trading cost model is established and transformed into a set of linear constraints for carbon trading through piecewise linearization technology. An energy storage site selection and capacity optimization model and a distribution network operation optimization model are established. The distribution network operation optimization model is transformed into a set of KKT equivalent constraints using KKT optimality conditions and introduced into the energy storage site selection and capacity optimization model to form a single-layer mixed integer nonlinear programming model. The Arctic Puffin optimization algorithm is used in conjunction with the CPLEX solver to perform joint optimization and output the globally optimal energy storage configuration scheme and the corresponding distribution network operation scheduling strategy.
2. The method according to claim 1, characterized in that, The construction of the historical power output dataset specifically involves standardizing and preprocessing historical wind power output data and historical photovoltaic power output data to form a training dataset.
3. The method according to claim 2, characterized in that, The Wasserstein generative adversarial network model includes a generator network and a discriminator network. The generator network receives a random noise vector as input and generates a simulated wind and solar power output time series. The discriminator network is used to distinguish between real historical power output data and the generated simulated wind and solar power output time series.
4. The method according to claim 3, characterized in that, The Wasserstein generative adversarial network model enhances Lipschitz continuity by introducing a gradient penalty mechanism. The gradient penalty mechanism calculates the discriminator gradient norm at the interpolation point between the real sample and the generated sample, and applies a secondary penalty to the degree to which the gradient norm deviates from 1.
5. The method according to claim 4, characterized in that, The Wasserstein generative adversarial network model introduces a temporal attention mechanism into the generator network. The temporal attention mechanism captures the long-term dependence of wind and solar power output time series by calculating the correlation weight matrix between features at different times.
6. The method according to claim 5, characterized in that, The scenario reduction specifically involves extracting the volatility feature vector and peak-to-valley difference feature vector of each scenario in the wind and solar power output simulation scenario set, and using the K-means clustering algorithm to cluster the volatility feature vector and peak-to-valley difference feature vector to obtain typical wind and solar power output scenarios.
7. The method according to claim 6, characterized in that, The tiered carbon trading cost model divides the carbon emission trading amount into segments according to the length of the interval, and sets differentiated carbon trading base prices and carbon trading price growth rates for different carbon emission intervals.
8. The method according to claim 7, characterized in that, The piecewise linearization technique introduces auxiliary continuous variables and binary variables for carbon emission intervals, and uses the Big M method to construct logical constraints to ensure that only one carbon emission interval is activated.
9. The method according to claim 8, characterized in that, The energy storage site selection and capacity optimization model takes the minimum sum of energy storage configuration cost, grid electricity purchase cost and carbon trading cost as the upper-level optimization objective function. The constraints include upper and lower limits of energy storage capacity, upper and lower limits of energy storage output, and constraints on the number of energy storage installation nodes.
10. The method according to claim 9, characterized in that, The distribution network operation optimization model uses the weighted sum of distribution network active power loss and distribution network vulnerability index as the lower-level optimization objective function. The constraints include active power balance constraints, power flow balance constraints, node voltage constraints, and energy storage state of charge constraints.
Citation Information
Patent Citations
Grid-connected micro-grid optimal configuration method considering stepped carbon transaction and demand response
CN114243694A
Electric power system planning method and system considering load side and low carbon-economic collaboration
CN117689184A
Double-layer optimization configuration method for energy storage micro-grid containing electric hydrogen
CN118983800A
Equipment model selection method for energy interconnection system
WO2023134254A1