Distributed photovoltaic energy storage system configuration method based on depth feature clustering and robust double-layer optimization

By using a deep feature clustering and robust two-layer optimization method, typical operating scenarios are generated and iterative interactive optimization is performed. This solves the problem that the spatiotemporal coupling characteristics in the planning of distributed photovoltaic and energy storage systems are not considered. It achieves optimized configuration of economy, low carbon emissions and power quality, reduces the risk of voltage exceeding limits and line loss, and improves the operating performance of the distribution network.

CN121618565APending Publication Date: 2026-03-06SHENNONGJIA FOREST REGION POWER SUPPLY CO LTD HUBEI ELECTRIC POWER CO
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511779210.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively consider the spatiotemporal coupling characteristics of photovoltaics and loads in the planning of distributed photovoltaic and energy storage systems. This makes it difficult for clustering results to truly reflect the joint operation characteristics. Furthermore, the optimization configuration research has not fully considered the impact of multiple operating scenarios and has neglected the simultaneous optimization of power quality and network losses.

Method used

A method based on deep feature clustering and robust two-layer optimization is adopted. Typical operating scenarios are generated through deep embedding feature extraction and clustering algorithms. Combined with the improved NSGA-II algorithm, iterative interactive optimization is carried out to construct a multi-objective optimization configuration model, which considers economy, low carbon emissions and power quality, and handles the impact of uncertainty and meteorological conditions.

Benefits of technology

It achieves an optimized configuration that balances economy, low carbon emissions, and power quality under uncertain conditions, reduces the risk of node voltage exceeding limits and line loss levels, improves the renewable energy absorption rate, and enhances the overall performance of the distribution network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121618565A_ABST
    Figure CN121618565A_ABST
Patent Text Reader

Abstract

A distributed photovoltaic energy storage system configuration method based on depth feature clustering and robust double-layer optimization comprises the steps of performing normalization processing on multi-source historical data such as photovoltaic output, load, electricity price and weather, and generating a typical operation scene capable of representing uncertainty by adopting a depth embedded feature extraction and clustering algorithm; constructing a double-layer optimization configuration model: in the upper-layer planning optimization model, taking annual comprehensive cost, carbon emission cost, node voltage deviation and renewable energy consumption rate as multi-objective functions, and determining the access position, capacity and rated power of photovoltaic and energy storage; in the lower-layer operation optimization model, the charging and discharging strategy and reactive power output of the energy storage system are optimized with the daily operation cost, the voltage deviation, the electric energy quality index and the auxiliary service income as optimization targets; and an improved NSGA-II algorithm based on an elitist strategy is adopted to realize closed-loop optimization of planning and operation. According to the method, economy, low-carbon property and electric energy quality can be considered while uncertainty is considered, and the comprehensive performance of operation of the power distribution network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed photovoltaic and energy storage system optimization configuration technology, specifically to a distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust two-layer optimization. Background Technology

[0002] In recent years, a large number of distributed resources have been connected to the distribution network, and the uncertainty and volatility of their power output have affected the stable operation of the distribution network. The application of energy storage systems in the distribution network can smooth power fluctuations, reduce the impact of distributed resources connected to the distribution network on the stability of the distribution network, and improve power quality and supply stability. The optimal configuration of distributed photovoltaic (DPV) and energy storage systems (ESS) is a key issue in ensuring the safe and stable operation of the distribution system.

[0003] The planning of distributed photovoltaic (PV) and energy storage systems often requires simultaneous consideration of planning outcomes and actual operating conditions. Therefore, it is necessary to generate typical scenarios to represent year-round operation, thereby reducing the complexity of planning and operational issues and the required computational load. However, current scenario clustering methods only consider the clustering effect of single datasets, ignoring the spatiotemporal coupling characteristics between different datasets. Since the planning of distributed PV and energy storage systems needs to balance planning outcomes with actual operating conditions, generating typical year-round operating scenarios is necessary to reduce the complexity and computational load of planning and operation.

[0004] Existing clustering methods for specific scenarios have the following shortcomings: most methods, such as K-means, improved K-means, and genetic algorithm clustering, only consider single data features and ignore the spatiotemporal coupling characteristics between photovoltaics and loads, making it difficult for the clustering results to truly reflect the joint operation characteristics; some methods, although having high clustering accuracy, have low computational efficiency or are greatly affected by meteorological conditions, resulting in insufficient representativeness of typical days; deep learning methods, such as CNN-BiLSTM autoencoders, can extract deep features, but still do not consider the time series correlation between photovoltaics and loads.

[0005] Furthermore, the diversity of typical scenarios directly impacts the optimal configuration results of photovoltaics and energy storage. The main problems with existing optimization studies include: most models, such as robust planning for wind-solar-storage combined systems and two-layer economic optimization models, do not fully consider the impact of multiple operating scenarios on planning; some methods focus only on economics, neglecting the power quality improvement role of energy storage during operation; there is insufficient research on simultaneously optimizing economics and power quality, and balancing reactive power regulation and network losses; and there is a lack of iterative interaction analysis between multiple operating scenarios and planning results. Summary of the Invention

[0006] To address the uncertainties, voltage limits, network losses, and carbon emission reduction constraints encountered when large-scale distributed power sources are integrated into distribution networks, this invention provides a distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust two-layer optimization. This method can consider uncertainties while simultaneously achieving economic efficiency, low carbon emissions, and power quality, thereby improving the overall performance of the distribution network.

[0007] The technical solution adopted in this invention is as follows:

[0008] A configuration method for distributed photovoltaic energy storage systems based on deep feature clustering and robust two-layer optimization includes the following steps:

[0009] Step 1: Normalize the historical data from multiple sources, such as photovoltaic output, load, electricity price, and meteorology, and use a combination of deep embedding feature extraction and clustering algorithm to generate typical operating scenarios that can represent uncertainties;

[0010] Step 2: Construct a two-layer optimization configuration model:

[0011] In the upper-level planning optimization model, the access location, capacity and rated power of photovoltaic and energy storage are determined by using multiple objective functions, including annual comprehensive cost, carbon emission cost, node voltage deviation and renewable energy absorption rate.

[0012] In the lower-level operation optimization model, the charging and discharging strategy and reactive power output of the energy storage system are optimized with daily operating cost, voltage deviation, power quality indicators and ancillary service revenue as optimization objectives.

[0013] Step 3: Adopt the improved NSGA-II algorithm based on the elite strategy, perform iterative interaction between the upper and lower level models, and handle the uncertainty of weather and load forecasts through the chance constraint mechanism to achieve closed-loop optimization of planning and operation.

[0014] In step 1, the historical data from multiple sources, such as photovoltaic output, load, electricity price, and meteorology, are normalized. The normalization process uses the range normalization method, as shown in equation (1) below:

[0015]

[0016] Where: x represents the original data, including historical data from multiple sources such as photovoltaic output, load, electricity price and meteorology; max(x) and min(x) represent the maximum and minimum values ​​of the feature dimension over 365 days, respectively; x′ represents the normalized data input into the IDEC-K network.

[0017] In step 1, a clustering model capable of representing uncertainty is established by combining deep embedding feature extraction with clustering algorithms. This clustering model ensures the representativeness of features and accurately captures coupling relationships under different operating conditions through low-dimensional embedding representation of the latent space.

[0018] For missing values ​​in the original data, a reconstruction mechanism is used to fill them in;

[0019] For anomalous data, detection and correction are performed based on robustness criteria or adaptive loss functions to reduce the interference of anomalous signals on feature extraction;

[0020] This ultimately yields a typical operating scenario driven by multimodal features, providing input for subsequent optimization. Among these:

[0021] (1): Missing value reconstruction is divided into daily missing value reconstruction and random time missing value reconstruction:

[0022] ①: Daily lack of reconstruction:

[0023]

[0024] Where: f m (t) represents the repaired data value at time t for the m-th typical day (or day m); f i (t) represents the observation value of the i-th normal day (non-missing day) at time t; N represents the total number of days of the same type in the sample set; i≠m indicates that the data used for repair comes from all non-missing days.

[0025] ②: Missing reconstruction at random time:

[0026]

[0027] Where: f m (t) represents the missing value at time t on day m after repair; f m (t-1) represents the actual observed value at the previous time point on that day; f m (t+1) represents the actual observed value at a time point one day later.

[0028] (2): Anomaly detection uses an improved Lajda criterion:

[0029] For dataset X i =(x1,x2,…,x m ), x1, x2, ..., x m Let represent the observed values ​​of the sequence at sampling times 1 to m, and let represent the mean μ and standard deviation σ, respectively. Then: This is an outlier; where: x j denoted by , representing the j-th data point in the sequence, such as the load or photovoltaic output at hour j; μ represents the mean of all data in the sequence, used to characterize the overall level of the sequence; σ represents the standard deviation of the sequence, reflecting the degree of data fluctuation; |x j -μ∣ represents the magnitude of the deviation from the mean at that point; t represents the threshold coefficient used to determine whether the deviation is abnormal, which is a key parameter.

[0030] The threshold parameter t is as follows:

[0031]

[0032] Where: R0=σ / μ, representing the coefficient of variation before removing extreme values; R1=σ / μ, representing the coefficient of variation after removing extreme values. (3): A method combining deep embedding feature extraction and clustering algorithms is used to generate typical operating scenarios that can represent uncertainty. For example Figure 1 The IDEC-K network architecture diagram shown includes deep embedding feature extraction, which includes:

[0033] ①: Encoder formula:

[0034] z = f θ (x)=σ(Wx+b)(5);

[0035] Where: z is the low-dimensional embedding representation output by the encoder, preserving the core structure and correlation of the original multi-source data; f θ (x) represents the nonlinear mapping function implemented by the encoder; σ is the nonlinear activation function, used to enhance the network's ability to express complex features; W is the weight matrix of the encoder, which projects the input features to a high-dimensional or low-dimensional space; x is the normalized input data vector, containing multi-source features such as photovoltaic, load, and meteorological data; b is the bias vector, which enables the neuron output to have translation capabilities; θ is the set of all encoder parameters, including all weights and biases.

[0036] ②: Decoder formula:

[0037]

[0038] in: The reconstructed output features are used to measure whether the encoder has preserved the original information; g φ (z) represents the reconstruction mapping function implemented by the decoder; σ is the nonlinear activation function; W′ is the decoder weight matrix, which is symmetric to the encoder structure; b′ is the decoder bias; φ is the decoder parameter set.

[0039] ③: Reconstruction loss:

[0040]

[0041] Where: L r The reconstruction loss is used to ensure that the latent spatial structure truly reflects the original data; N is the total number of samples; Z0 is the latent representation of the original input after the encoder; Z recon is the reconstructed latent representation output by the decoder; ||·||2 is the L2 norm operation used to calculate the reconstruction error.

[0042] ④: Flexible clustering allocation:

[0043] Set up a student t-distribution:

[0044]

[0045] Where: q ij z is the soft assignment probability that the i-th sample belongs to the j-th cluster; i μ is the latent representation of the i-th sample; j Let |z be the j-th cluster center; i -μ j || 2 This represents the Euclidean distance between a sample and its cluster center.

[0046] Set the target distribution:

[0047]

[0048] Where: b ij Let q be the target probability distribution of the i-th sample belonging to cluster j; ij The current soft assignment probability estimated for the student distribution; ∑ i q ij The degree of clustering of cluster j;

[0049] KL divergence is the clustering loss:

[0050]

[0051] Where: L c KL(i) represents the clustering loss, used to measure the difference between the network output and the ideal clustering distribution; KL(i) represents the Kullback–Leibler divergence function; B represents the target clustering distribution matrix composed of the target probability distributions of all samples; Q represents the current clustering distribution matrix composed of the soft assignment probabilities of the current network output; b ij q represents the target distribution; ij This represents the current distribution.

[0052] In step 2, the multi-objective function of the upper-level planning optimization model simultaneously considers annual comprehensive cost, carbon emission cost, node voltage deviation, and renewable energy integration rate:

[0053] 2.1: Annual comprehensive cost F1 is as follows:

[0054] F1 = C PV +C ESS +C loss (11);

[0055] Where: C PV C represents the annualized cost of photovoltaic investment; ESSIndicates the annualized cost of energy storage investment; C loss This represents the annualized network loss cost;

[0056] ①Annualized cost of photovoltaic investment:

[0057]

[0058] Where: i∈PV represents the set of nodes where photovoltaics are installed; P PV,i c represents the photovoltaic installed capacity of node i; PV Unit capacity investment cost; r represents the discount rate; y PV This indicates the lifespan of a photovoltaic system.

[0059] ②Annualized cost of energy storage investment:

[0060]

[0061] Where: E ESS,j Indicates energy storage capacity; P ESS,j Indicates the rated power of energy storage; c E Indicates cost per unit capacity; c P Indicates cost per unit of power; y ESS This indicates the lifespan of the energy storage system.

[0062] ③ Annualized network loss cost:

[0063]

[0064] Where: NC represents the number of typical scenarios; d m Indicates scene weight; c represents the line loss at scene m and time t; PE,t represents the electricity purchase price; m represents the scenario; t represents the time.

[0065] 2.2: The carbon emission cost F2 is as follows:

[0066] Carbon emissions are generated when the system purchases electricity from the main grid:

[0067]

[0068] in: Indicates the carbon trading price; Indicates the mainnet; represents the active power purchased from the main network in the m-th typical scenario and the t-th time period; NC represents the total number of typical operating scenarios.

[0069] 2.3: The node voltage deviation F3 is as follows:

[0070] Reflects voltage quality and safety:

[0071]

[0072] Among them: U m,t,n U represents the voltage at node n; ref =1pu, representing the reference voltage; N represents the total number of nodes; n represents the number of the nth node in the distribution network.

[0073] 2.4: The renewable energy absorption rate F4 is as follows:

[0074] F4 = -R PV (17);

[0075] Where: R PV This indicates the distributed photovoltaic energy absorption rate of the system across all typical scenarios and throughout the day.

[0076]

[0077] in: This represents the photovoltaic active power actually absorbed by the system in the m-th typical scenario and the t-th time period; This represents the theoretical active power that a photovoltaic power station can generate under given irradiance and meteorological conditions in the m-th typical scenario and the t-th time period.

[0078] Decision variables include the location, capacity, and rated power of photovoltaic and energy storage connections:

[0079] The decision variables for upper-level optimization include the access location, capacity, and rated power of photovoltaic and energy storage:

[0080] X up ={a i ,P PV,i ,x j E ESS,j ,P ESS,j}(19);

[0081] Where: X up a represents the upper-level optimization decision variable; i Indicates the location of photovoltaic grid connection; P PV,i This indicates the photovoltaic capacity, which determines the installed photovoltaic capacity connected to this node, including upper and lower limits: x j Indicates the location of energy storage connection; indicates E ESS,j Energy storage capacity; P ESS,j Indicates the rated power of energy storage;

[0082] The constraints cover node voltage, current limits, and inverter capacity limitations:

[0083] ①. Node voltage constraints:

[0084] U min ≤Um,t,n ≤U max (20);

[0085] Among them: U m,t,n U represents the voltage amplitude at the m-th typical scenario, at the t-th time, and at the n-th node; min Indicates the minimum allowable voltage value for the node; U max This represents the highest allowable voltage value for a node, typically taken as U. min =0.95, U max =1.05.

[0086] ②. Branch current limit:

[0087]

[0088] Among them: I ij,m,t This represents the current value of the line (branch) connecting node i and node j in a typical scenario at time t. The upper limit of the rated current of line ij.

[0089] ③. Power flow balance constraints:

[0090]

[0091] Where: P i Q represents the injected active power at node i; i P represents the injected reactive power at node i; i load This represents the active power load demand of node i; U represents the reactive power load demand of node i; i U j Represents the voltage magnitudes at nodes i and j; cosθ ij sinθ ij G represents a trigonometric function representing the phase angle difference; ij B ij Represents the elements of the admittance matrix; θ ij Indicates the phase angle difference; Ω i Represents the set of adjacent branches of node i;

[0092] ④. Inverter capacity constraints:

[0093]

[0094] in: This represents the active power output of energy storage device j in the m-th typical scenario and the t-th time period; This represents the reactive power output of energy storage device j in the m-th typical scenario and the t-th time period. This indicates the rated apparent power capacity of the inverter for energy storage device j.

[0095] The active and reactive power of energy storage should not exceed the apparent capacity of the inverter, so as to achieve a balance between economy and low carbon emissions.

[0096] The upper-level model comprehensively balances economic efficiency, environmental friendliness, and network security while ensuring power flow constraints, node voltage ranges, branch current limits, and inverter capacity constraints in the distribution network. Through multi-objective optimization driven by typical scenarios, the upper-level planning and optimization model determines the long-term planning results for the system and transmits the decision results to the lower-level operational optimization model.

[0097] In step 2, within the lower-level operation optimization model, based on the distributed photovoltaic and energy storage access locations and capacities determined by the upper-level planning, the active power output of each energy storage device is optimized using a typical working day as the operating cycle. This optimizes the daily operating cost of the distribution network, node voltage deviation, and network losses simultaneously. The decision variable for the lower-level optimization is the active power output P of each energy storage device at each time period. ESS,j,t .

[0098] The lower-level operation optimization model is represented as follows:

[0099] min(f1,f2,f3)sth(X2)≤0(25);

[0100] Where: min(f1,f2,f3) represents the lower-level optimization objective function; f1 represents the daily operating cost target; f2 represents the node voltage deviation target; f3 represents the network loss target; h(X2) represents the set of constraint functions on the decision vector X2 in the lower-level operation optimization model;

[0101] This is the output decision vector for the energy storage system.

[0102] They represent the 1st, 2nd, ..., nth hour of a typical day. ESS The active power output of the energy storage device.

[0103] 1) Daily operating cost target f1:

[0104] The daily operating cost objective function f1 represents the electricity purchase cost of a typical distribution network within a day, and its expression is as follows:

[0105]

[0106] Among them, c PE,t P is the electricity price for hour t; L,t P represents the net load power between the distribution network and the main grid in hour t. ESS,j,tLet n be the active power output of the j-th energy storage device in hour t, and the summation range is 24 hours of a typical working day; ESS This indicates the number of energy storage devices configured in the distribution network.

[0107] 2) Target f2 of node voltage deviation:

[0108] The daily voltage deviation objective function f2 is used to characterize the degree to which the voltage at distribution network nodes deviates from the rated value at various times during a typical day, and can be expressed as:

[0109]

[0110] Where N is the number of distribution network nodes; U t,n U represents the voltage amplitude at node n in hour t; ref The rated voltage is denoted by t. The smaller this target value, the smaller the voltage deviation and the better the voltage quality; t represents time; n represents the node.

[0111] 3) Network loss target f3:

[0112] The daily network loss objective function f3 represents the total active power loss of a typical daily distribution network, and can be expressed as:

[0113]

[0114] Where NL represents the number of distribution network branches; Let be the active power loss of the l-th branch in hour t, calculated from the power flow. The smaller this target value, the lower the line loss.

[0115] 4) Daily operating costs are:

[0116]

[0117] Where: C daily Indicates daily operating cost; c PE,t P represents the electricity purchase price for hour t; t grid This indicates that the system purchases electricity from the main network in hour t; c loss,t P represents the line loss cost in hour t; t loss This represents the network loss in hour t.

[0118] 5) Node voltage deviation:

[0119]

[0120] Where: V dev Indicates node voltage deviation; U t,n U represents the voltage at node n in hour t; refThis indicates the reference rated voltage; the voltage deviation rate characterizes the voltage quality.

[0121] The lower-level operation optimization model generates operation strategies and feeds back optimization results based on the capacity and location planned by the upper-level planning optimization model.

[0122] In step 3, an improved NSGA-II algorithm based on an elite strategy is used to iterate between the upper and lower layer models.

[0123] 3.1 Improved NSGA-II algorithm by combining fast non-dominated sorting and crowding distance to maintain the diversity and balance of solution sets;

[0124] ① Quick Non-Dominated Sort:

[0125] Let the population be P and the individuals be x. i Its multi-objective vector is:

[0126] f(x i )=(f1(x i ),f2(x i ),…,f M (x i ))(31);

[0127] Where: f(x) i f1(x) represents the objective function value vector of an individual; i ),f2(x i ),…,f M (x i ) represent individual x i The values ​​taken on the first, second, and up to the Mth objective functions.

[0128] Definition of non-dominance:

[0129] Individual x a Non-dominated to individual x b , recorded as If and only if: for all objectives m = 1, ..., M, where m represents the index of the objective function and M represents the number of objectives; f m (x a )≤f m (x b And there exists at least one objective m that satisfies f m (x a ) <f m (x b ), f m (x a ) represents individual x a The value of f on the m-th objective function; m (x b ) represents individual xb The value of the m-th objective function.

[0130] The result of fast nondominated sorting is several nondominated levels: F1, F2, ..., F K ;

[0131] Where: F1 is the set of completely non-dominated individuals; F2 is the first-level non-dominated set after removing F1; F k Denotes the k-th non-dominated frontier

[0132] This process continues until all individuals are stratified. In the algorithm implementation, for each individual i, the set S of individuals it governs is recorded. i The number of individuals that control it, n i When n i When n = 0, individual i belongs to the first layer; after deleting this layer, update n for the remaining individuals. i Then filter the second layer, and continue filtering until the layering is complete. i ,n i This represents an auxiliary counting variable used for rapid stratification.

[0133] ②Distance of congestion:

[0134] In the same non-dominated layer F k Within this context, the priority of retaining individuals needs to be determined based on the density between solutions, for the same non-dominated layer F. k For an individual i, the crowding distance is defined as:

[0135]

[0136] Where, d i Indicates the distance based on congestion level; for each target m, press f first. m Sort the individuals in this layer; This represents the function values ​​of the individuals immediately before and after individual i on that target after sorting by the m-th target; This represents the maximum and minimum values ​​of the current layer on the m-th target, used for normalization; d i The value represents the crowding distance of individual i. The larger the value, the more likely the individual is in the "sparse region" of the target space, which is more conducive to maintaining the diversity of the solution set.

[0137] 3.2. The search intensity is dynamically adjusted through adaptive crossover and mutation operators to balance global exploration and local convergence;

[0138] ①. Adaptive crossover probability:

[0139]

[0140] Where: p c(g) represents the crossover probability used in the g-th generation, which gradually decreases with each iteration; These represent the preset upper and lower bounds of the crossover probability, respectively; g represents the current iteration number; G max Indicates the maximum number of iterations;

[0141] ② Adaptive mutation probability:

[0142]

[0143] Where: p m (g) represents the mutation probability used in the g-th generation; These represent the upper and lower limits of the mutation probability, respectively;

[0144] 3.3 To address the uncertainties in weather and load forecasting, an opportunity constraint mechanism is introduced to ensure that the operating results meet the requirements of node voltage and renewable energy consumption at a certain confidence level;

[0145] ① Voltage probability constraint:

[0146] Let ξ be a random variable, then:

[0147] Pr{U min ≤U n,t (ξ)≤U max}≥1-ε v (35);

[0148] Among them: U n,t (ξ) represents the voltage of node n at time t under the prediction error ξ; U min U max These represent the upper and lower limits of the voltage, respectively; ε v Let Pr{i} represent the allowed voltage exceedance probability; Pr{i} represents the probability operator. Formula (35) represents the voltage U at node n at time t under the influence of prediction error ξ. n,t (ξ) falls within the allowable voltage range [U min U max The probability within ] .

[0149] ② Probabilistic constraints on renewable energy absorption rate:

[0150]

[0151] Where: R PV (ξ) represents the photovoltaic absorption rate under uncertain conditions; Indicates the minimum absorption level required by the plan; ε r This indicates the probability that the target is not met.

[0152] 3.4 During the optimization process, the upper and lower level models iteratively pass information to each other, gradually approaching the global Pareto optimal solution set:

[0153] 1) The membership function is used to select the compromise optimal solution from the lower-level Pareto solution set. For the k-th Pareto solution obtained from the lower-level NSGA-II, its membership function is used to select the optimal solution from the i-th objective f. i The membership degree on is:

[0154]

[0155] in: This represents the membership degree of the solution on the objective. i (k) f represents the value of the k-th solution on the i-th objective; i min ,f i max This represents the minimum and maximum values ​​of the target in the current Pareto set.

[0156] The overall membership degree can be calculated using a weighted sum:

[0157]

[0158] Where: μ (k) The overall membership degree; w i This represents the weight of each objective, and μ is chosen. (k) The largest solution is used as the optimal compromise solution at the lower level and fed back to the upper level as an evaluation of the corresponding configuration scheme at the upper level in the runtime dimension.

[0159] 2) The interaction process between the upper and lower layers of NSGA-II:

[0160] Upper-level search generation: The upper-level NSGA-II calculates targets F1 and F2 based on the current population individual X1 (photovoltaic / energy storage location and capacity decision); in order to accurately evaluate the operation effect, the lower-level operation optimization model is called once for each upper-level individual to perform operation optimization.

[0161] Lower-level solution: Given the upper-level scheme, the lower-level NSGA-II solves the problem with daily operating cost, voltage deviation, and network loss as objectives, obtaining a set of Pareto solutions. The optimal compromise solution is selected through the membership function, and the lower-level objective value corresponding to the compromise solution is transmitted back to the upper level.

[0162] Upper-level update of individual fitness: The upper-level layer takes the compromise results received from the lower-level layer and substitutes them into the calculation of the upper-level annual comprehensive cost and total voltage deviation to update the objective function value of the individual.

[0163] The upper layer performs non-dominated sorting, crowd distance, and elite selection to generate the next generation of solutions.

[0164] Repeat the above upper-level generation and corresponding lower-level solutions until the upper-level NSGA-II reaches the maximum number of iterations, and obtain the Pareto optimal configuration set of the overall two-level model.

[0165] In step 3, if the lower-level operation optimization results show voltage exceeding limits or insufficient renewable energy consumption, the scenario regeneration mechanism is triggered. This dynamically adjusts the scenario clustering weights, regenerates typical operating scenarios, and returns them to the upper-level planning and optimization model for correction.

[0166] 3.1 Triggering conditions:

[0167] Voltage over-limit criterion:

[0168]

[0169] in: This represents the proportion of voltage exceedances in the node-time combination under this scenario; m represents the m-th typical scenario; N represents the number of distribution network nodes; U m,t,n U represents the voltage at scene m, time t, and node n; min U max The upper and lower limits of voltage are represented by I{·}; I{·} represents the indicator function, which is 1 if the condition is met and 0 otherwise.

[0170] 3.2 Criteria for Insufficient Renewable Energy Consumption:

[0171]

[0172] Where: R PV,m This represents the photovoltaic absorption rate in scenario m; This represents the photovoltaic power actually utilized at scenario m and time t. This indicates the theoretical power output of photovoltaic power generation; Indicates the minimum absorption level required by the plan; ΔR m This indicates the "shortage gap" in this scenario.

[0173] In the k-th round of each iteration between the upper and lower layers, the weights are penalized or amplified, and a comprehensive "problem severity index" is defined:

[0174]

[0175] Among them: J m This represents the "operational risk indicators" for scenario m; An indicator representing the degree of voltage exceedance in scenario m; α r The importance weight of insufficient absorption; α v Indicates the importance weight of voltage exceeding the limit; ΔR m This represents the photovoltaic power consumption gap in scenario m.

[0176] Based on J m Adjust scene weights:

[0177]

[0178] in: This represents the new, unnormalized weights; λ represents the weight of scenario m in the k-th iteration; λ represents the adjustment coefficient, which controls the adjustment range. This represents the new weights after normalization, ensuring... Let represent the new weight of the unnormalized scenario m in the k-th iteration; NC represents the total number of typical scenarios.

[0179] After obtaining the operational risk indicators for each typical scenario through the lower-level optimization model, the scenario weights are updated, and sample weights are introduced into the IDEC-K deep clustering model to regenerate typical scenarios. The objective function of the weighted IDEC-K deep clustering model can be expressed as:

[0180]

[0181] in, The weight of sample s in the (k+1)th round of scene regeneration is used to reflect the importance of the sample in the clustering process; s is the index of the original sample, and each sample corresponds to one day of multi-source data; z s (θ) represents the low-dimensional embedded feature vector extracted from sample s by the encoder part (parameter θ) of the deep autoencoder, used to characterize the key features of that day; C={c1,…,c K} represents the set of K cluster centers; c k(s) q represents the cluster center of the cluster to which sample s belongs; s The j-th component q represents the soft partition distribution vector output by the clustering layer. sj This indicates that sample s belongs to the j-th scenario in terms of probability; p s Indicates a soft partition distribution q s The constructed target distribution vector is used to amplify the impact of high-confidence samples on cluster center updates; KL(p s q s ) represents the target distribution p s With the current distribution q s The divergence between the two is used to constrain the output of the clustering layer to gradually approach the target distribution; β represents the importance coefficient that balances the clustering reconstruction term and the distribution matching term, and is used to balance feature embedding and clustering stability.

[0182] The update rule for sample weights is as follows:

[0183]

[0184] Where: m(s) represents the typical scenario number to which sample s belongs in the previous round of clustering; This represents the weight of scenario m(s) in the (k+1)th iteration, dynamically adjusted based on the severity of problems such as voltage exceeding limits or insufficient absorption encountered during the optimization process. A larger scenario weight corresponds to a larger weight of its corresponding sample. The larger the value, the more significant its contribution to the objective function, thus attracting more attention in new feature learning and clustering iterations.

[0185] By solving the above weighted IDEC-K clustering model, the updated typical scenario curves can be obtained. That is, the new typical operating day characteristics, the updated representative day samples within the scenario, and the updated scenario weights. After introducing a scene regeneration mechanism, the updated typical scene curves will be... and their weights As a new input scenario in the upper-level planning and optimization model, the objective function values ​​such as annual comprehensive cost, annual voltage deviation and photovoltaic absorption rate are recalculated, and the upper-level NSGA-II evolution is continued on this basis, thereby realizing closed-loop iterative optimization of scenario-planning-operation.

[0186] This dynamic feedback mechanism enables closed-loop optimization of planning and operation. Ultimately, the improved NSGA-II algorithm outputs a consistent optimal solution for the capacity configuration and operation strategy of distributed photovoltaic and energy storage systems. This solution set effectively improves power quality and network security while ensuring system economy and low carbon emissions.

[0187] This invention provides a configuration method for a distributed photovoltaic energy storage system based on deep feature clustering and robust two-layer optimization, with the following technical advantages:

[0188] 1) This invention can accurately capture the time-series coupling characteristics of photovoltaic power output and load data, and generate representative typical joint operation scenarios.

[0189] 2) This invention establishes a two-layer optimization configuration model based on typical joint operation scenarios. The upper layer focuses on economic efficiency and low carbon emissions, while the lower layer considers power quality and operational reliability. Through an improved evolutionary algorithm for interactive solving, it not only effectively reduces the risk of node voltage exceeding limits and line loss levels, but also improves the renewable energy absorption rate, achieving synergistic optimization of economic efficiency, reliability, and environmental benefits.

[0190] 3) The deep clustering algorithm of this invention takes into account both the economy and reliability of the distribution network. Based on typical photovoltaic scenarios, it establishes a two-layer planning model for photovoltaic and energy storage systems and rationally configures distributed photovoltaic-energy storage integrated systems. This not only reduces the voltage difference between nodes in the distribution network and decreases the voltage fluctuation range at nodes, but also reduces the risk of voltage over-limit and line loss rate in the distribution network, thereby improving the overall operation level of the distribution network. Attached Figure Description

[0191] The present invention will be further described below with reference to the accompanying drawings and examples:

[0192] Figure 1 This is a network structure diagram of the light-load scene generation method based on IDEC-K.

[0193] Figure 2 This is a flowchart of a multi-objective evolutionary algorithm based on an elite strategy (an improved version of NSGA-II).

[0194] Figure 3 This is a diagram of the IEEE 33-node system.

[0195] Figure 4 The distribution of the two-tier planning results for distributed photovoltaic and energy storage configurations in the target space.

[0196] Figure 5 This is a voltage deviation curve for a typical scenario.

[0197] Figure 6 The image shows the network loss curve for a typical system scenario.

[0198] Figure 7 This is an overall flowchart of the two-layer optimized configuration method for the distributed photovoltaic energy storage system of the present invention. Detailed Implementation

[0199] A configuration method for distributed photovoltaic energy storage systems based on deep feature clustering and robust two-layer optimization includes the following steps:

[0200] S1: An IDEC-K clustering model is established to normalize multi-source data such as photovoltaic output, load, electricity price, and meteorological data. A method combining deep embedding feature extraction and clustering is adopted to ensure accurate capture of data coupling characteristics in low-dimensional space and output basic feature representations. The processed embedded features are then input into the K-means algorithm for cluster analysis to obtain a set of typical operating scenarios covering different seasons, weekdays, and weekends, providing scenario input for subsequent optimization.

[0201] S2: The upper-level planning optimization model uses multiple objective functions, including annual comprehensive cost, carbon emission cost, node voltage deviation, and renewable energy absorption rate. Decision variables include the access location, capacity, and rated power of photovoltaic (PV) and energy storage. Constraints cover power flow equations, voltage and current limits, and inverter capacity boundaries. Through robust optimization driven by typical scenarios, the optimal planning configuration scheme for PV and energy storage is obtained.

[0202] S3: The lower-level operation optimization model aims to optimize the charging and discharging power and reactive power output of energy storage by considering daily operating costs, voltage deviation, power quality indicators, and ancillary service revenue. Energy storage operation is constrained by state of charge, efficiency, and cycle depth, and maintains a regressible state of charge within a typical operating day to ensure the sustainability of dispatch.

[0203] S4: An improved elite strategy multi-objective evolutionary algorithm is employed to iteratively interact between upper and lower level models. The algorithm combines fast non-dominated sorting and crowding distance to maintain the diversity of the Pareto front, and utilizes adaptive crossover and mutation operators to improve convergence speed. Through a chance constraint mechanism, the running solution satisfies voltage and absorption constraints at high confidence, thus balancing global optimality and robustness.

[0204] Improved NSGA-II algorithm, such as Figure 2 As shown, the specific steps are as follows:

[0205] Step 1: Generate an initial population P0 (size N), calculate the multi-objective function value and constraint violation degree for each individual, and obtain the fitness evaluation results;

[0206] Step 2: Perform fast non-dominated sorting F1, F2... on the population, and divide the individuals into several level front sets according to the dominance relationship, where F1 is the non-dominated solution set;

[0207] Step 3: Calculate the crowding distance in each front set to measure the local density of the solution; sort individuals in the same front set according to "non-dominant level priority and crowding distance from large to small", and set the crowding distance of boundary individuals to infinite in order to prioritize the preservation of their diversity;

[0208] Step 4: Select the parent generation based on strategies such as tournament selection / roulette wheel selection, and perform crossover and adaptive mutation to generate the offspring Q. t The adaptive mechanism dynamically adjusts the crossover probability and mutation intensity according to generation and population diversity; for individuals that do not meet the physical / current constraints, the feasibility priority or repair operator is applied to project them to the feasible region.

[0209] Step 5: Merge the parent and child generations into R. t =P t ∪Q t , for R t Non-dominated sorting and crowding distance calculations were performed, and the next generation elite population P was obtained by extracting the population based on "rank priority + crowding distance". t+1 (Scale N), thereby achieving the retention of elites;

[0210] Step 6: If the termination condition is met, such as the maximum number of iterations, hypervolume gain ΔHV < ε, or frontier stability, output the Pareto optimal solution set and elite files; otherwise, let t ← t+1, and repeat Step 3 to Step 5 until the termination condition is met.

[0211] In Step 5, when the lower-level operation results show voltage exceeding limits or insufficient renewable energy absorption, the clustering weights are dynamically adjusted, typical operating scenarios are regenerated, and the results are returned to the upper-level model for correction. Through this feedback mechanism, closed-loop coupled optimization of planning and operation is achieved, ultimately outputting a consistent global optimal solution for the capacity configuration and operation strategy of distributed photovoltaic and energy storage systems.

[0212] Verification Example:

[0213] use Figure 3 The IEEE 33-node system example shown analyzes the effectiveness of the method for optimizing the joint configuration and operation of distributed photovoltaic (PV) and energy storage. The total load of the distribution network is 3715kW + 2300kvar, the base voltage is 12.66kV, and the base power is 10MW. It is assumed that distributed PV and energy storage can be connected to each node of the distribution network, with 10 PV units and 5 energy storage units that can be installed, and the initial SOC of the energy storage is 0.6.

[0214] During the configuration phase, decision variables include the site selection and capacity of 10 distributed photovoltaic systems, and the site selection, capacity, and rated power of 5 energy storage devices; during the operation phase, the decision variable is the charging and discharging power of the energy storage devices.

[0215] The selected NSGA-II algorithm parameters are set as follows: the maximum number of iterations in the upper layer is 50 generations, and the population size is 20; the maximum number of iterations in the inner layer is 50, and the population size is 50; the crossover probability is set to 0.9, and the mutation scale factor is set to 0.1.

[0216] Based on typical photovoltaic and load operation scenarios, using the NSGA-II algorithm, the distribution of the optimized joint optimization scheme (Pareto solution) for distributed photovoltaic and energy storage planning and operation in the target space is as follows: Figure 4 As shown, by Figure 4 It is evident that the two objectives of model optimization (economic objective and voltage deviation objective) are contradictory; that is, there is no optimal solution that simultaneously optimizes both objective functions, and therefore, there is no absolutely globally optimal solution. Membership functions are used to calculate the compromise optimal solution for each candidate solution, and this is compared with the economically optimal solution and the voltage deviation optimal solution, resulting in Table 1. Table 1 presents the configuration scheme of 8 distributed photovoltaic systems and 4 energy storage systems when selecting three types of optimal solutions, namely the installation location and capacity of the 8 distributed photovoltaic systems, and the installation location, capacity, and rated power of the 4 energy storage systems. Table 2 shows the daily-scale operating results.

[0217] Table 1 Typical solutions for two-tier planning of distributed photovoltaic and energy storage configurations

[0218]

[0219] Table 2 Optimal Scheme for Two-Tier Planning of Distributed Photovoltaic and Energy Storage Configurations

[0220]

[0221]

[0222] The results can be obtained by running and cleaning up. Figure 5 This paper presents the voltage deviation time-series variation curves of the distribution network under various typical scenarios, with and without energy storage. Figure 5 It can be seen that energy storage has different effects on improving distribution network voltage deviation in different typical scenarios. When the charging and discharging power of energy storage is optimized in scenarios 1 and 3, the voltage deviation of the distribution network is reduced in the 6–10h and 18–22h periods compared with the absence of energy storage optimization, while the voltage deviation in the 10–18h period is significantly increased. In typical daily operation, optimizing the charging and discharging power of energy storage can effectively improve the voltage deviation in the 6–10h and 18–22h periods. On typical days with lower maximum photovoltaic output, the addition of energy storage will increase the overall voltage deviation throughout the day; while on typical days with higher maximum photovoltaic output, the impact of energy storage optimization on the voltage deviation during peak photovoltaic periods is weak, and the trend is basically consistent with the voltage deviation without energy storage.

[0223] Figure 6 The diagram illustrates the time-series variation curves of distribution network losses under various typical scenarios, with and without energy storage. When energy storage charging and discharging power optimization is added to scenarios 1 and 3, compared to scenarios without optimization, the distribution network losses decrease in the 5–10h and 17–22h periods, but significantly increase in the 10–18h period. Scenario 1 and 3 represent typical days with relatively low overall photovoltaic (PV) output. Energy storage primarily reduces network losses during periods of low PV output (morning and evening), but actually increases losses during the midday peak when PV absorbs active power. In typical daily operation, optimizing energy storage charging and discharging power can reduce distribution network losses. On typical days with low PV output, energy storage fails to reduce network losses during peak PV periods and may even increase them; however, on typical days with high PV output, energy storage effectively reduces distribution network losses for most of the time.

Claims

1. A distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust double-layer optimization, characterized in that The method comprises the following steps: Step 1: normalizing the multi-source historical data of photovoltaic output, load, electricity price and weather, and adopting a method combining deep embedding feature extraction and clustering algorithm to generate typical operation scenarios capable of representing uncertainty; Step 2: constructing a double-layer optimization configuration model: In the upper-layer planning optimization model, taking the annual comprehensive cost, carbon emission cost, node voltage deviation and renewable energy consumption rate as the multi-objective function, the access location, capacity and rated power of photovoltaic and energy storage are determined; In the lower-layer operation optimization model, taking the daily operation cost, voltage deviation, power quality index and auxiliary service income as the optimization objective, the charging and discharging strategy and reactive power output of the energy storage system are optimized; Step 3: adopting an improved NSGA-II algorithm based on an elite strategy to iteratively interact between the upper-layer and lower-layer models, and processing the weather and load prediction uncertainty through an opportunity constraint mechanism to realize closed-loop optimization of planning and operation.

2. The distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust bi-level optimization according to claim 1, characterized in that: In step 1, the multi-source historical data of photovoltaic output, load, electricity price and weather are normalized, and the normalization adopts a range normalization method, as shown in the following formula (1): Wherein x represents original data, including multi-source historical data of photovoltaic output, load, electricity price and weather; max(x) and min(x) respectively represent the maximum and minimum values in 365 days in the feature dimension; x' represents the data after normalization input into the IDEC-K network.

3. The distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust double-layer optimization according to claim 2, characterized in that: In step 1, for the missing values in the original data, a reconstruction mechanism is adopted for completion; For abnormal data, a robust criterion or an adaptive loss function is adopted for detection and correction to weaken the interference of abnormal signals on feature extraction; Finally, the typical operation scenarios driven by multi-modal features are obtained, providing input for subsequent optimization; wherein: (1): the reconstruction of missing values is divided into whole-day missing reconstruction and random-time missing reconstruction: ①: whole-day missing reconstruction: where: f m (t) represents the repaired data value at time t for the mth typical day; f i (t) represents the observed value at time t for the ith normal day; N represents the total number of like days in the sample set; i≠m represents that the data used for repair comes from all non-missing days; ②: random-time missing reconstruction: where: f m (t) denotes the missing value at time t on day m after repair;f m (t-1) denotes the actual observation at the time point one day before;f m (t+1) denotes the actual observation at the time point one day after. (2): the improved Lajda criterion is adopted for abnormal data detection: For dataset X i =(x1,x2,…,x m ), x1, x2, ..., x m Let represent the observed values ​​of the sequence at sampling times 1 to m, and let represent the mean μ and standard deviation σ, respectively. Then: This is an outlier; where: x j represents the jth data point in the sequence, such as the jth hourly load or photovoltaic output; μ represents the mean of all data in the sequence, used to characterize the overall level of the sequence; σ represents the standard deviation of the sequence, reflecting the degree of data fluctuation; |x j -μ| represents the amplitude of the point deviating from the mean; t represents the threshold coefficient for judging whether the deviation is abnormal, which is a key parameter; The threshold parameter t is as follows: Wherein R0=σ / μ represents the coefficient of variation before removing extreme values; R1=σ / μ represents the coefficient of variation after removing extreme values; (3): a method combining deep embedding feature extraction and clustering algorithm is adopted to generate typical operation scenarios capable of representing uncertainty; the deep embedding feature extraction comprises: ①: encoder formula: z = f θ (x) = σ(Wx + b) (5); wherein: z is the low-dimensional embedding representation of the encoder output, preserving the core structure and relevance of the original multi-source data; f θ (x) represents a nonlinear mapping function implemented by the encoder; σ is a nonlinear activation function, used to enhance the expression ability of the network to complex features; W is the weight matrix of the encoder, which projects the input features to a high-dimensional or low-dimensional space; x is the normalized input data vector, containing multi-source features such as photovoltaic, load and weather; b is the bias vector, which makes the neuron output have the ability of translation; θ is the parameter set of the encoder, including all weights and biases; ②: decoder formula: wherein: is the reconstructed output feature, used to measure whether the original information is preserved by the encoder; g φ (z) represents the reconstruction mapping function implemented by the decoder; σ is a non-linear activation function; W' is the decoder weight matrix, symmetric to the encoder structure; b' is the decoder bias; φ is the decoder parameter set; ③: reconstruction loss: wherein: L r is the reconstruction loss used to ensure that the latent space structure truly reflects the original data; N is the total number of samples; Z0is the latent representation of the original input after the encoder; Z recon is the reconstructed latent representation output by the decoder; ||·||2is the 2-norm operation used to calculate the reconstruction error; ④: clustering flexible allocation: Set student distribution: where: q ij is the soft assignment probability of the ith sample to the jth cluster; z i is the latent representation of the ith sample; μ j is the jth cluster center; ∣∣z i - μ j ∣∣ 2 denotes the Euclidean distance between a sample and a cluster center. Set target distribution: where: b ij is the target probability distribution for the ith sample to belong to cluster j; q ij is the current soft assignment probability of the student distribution estimate;∑ i q ij is the degree of aggregation of cluster j; The KL divergence is the clustering loss: where: L c is the clustering loss, which measures the gap between the network output and the ideal clustering distribution; KL(·) denotes the Kullback-Leibler divergence function; B denotes the target clustering distribution matrix composed of the target probability distribution of all samples; Q denotes the current clustering distribution matrix composed of the soft assignment probability output by the current network; b ij is the target distribution; q ij is the current distribution.

4. The method of claim 3, wherein the method further comprises: In step 2, the multi-objective function of the upper-layer planning optimization model simultaneously considers the annual comprehensive cost, carbon emission cost, node voltage deviation and renewable energy consumption rate: 2.1: the annual comprehensive cost F1 is as follows: F1 = C PV + C ESS + C loss (11); Where: C PV represents the annualized cost of photovoltaic investment; C ESS represents the annualized cost of energy storage investment; C loss represents the annualized cost of network loss; ①: photovoltaic investment annualized cost: where: i ∈ PV represents the set of nodes with installed photovoltaics; P PV,i represents the installed photovoltaic capacity at node i; c PV represents the unit capacity investment cost; r represents the discount rate; y PV represents the photovoltaic life cycle; ②: energy storage investment annualized cost: wherein: E ESS,j represents the energy storage capacity; P ESS,j represents the energy storage rated power; c E represents the unit capacity cost; c P represents the unit power cost; y ESS represents the energy storage life cycle; ③: annualized network loss cost: where: NC represents the number of typical scenarios; d m represents the scenario weight; represents the line loss for scenario m, time t; c PE,t represents the electricity purchase price; m represents the scenario; t represents the time; 2.2: the carbon emission cost F2 is as follows: Carbon emissions are generated when the system purchases electricity from the main grid: wherein: represents the carbon trading price; represents the main grid; represents the active power purchased from the main grid at the mth typical scenario and the tth time period; NC represents the total number of typical operation scenarios; 2.3: the node voltage deviation F3 is as follows: where: U m,t,n represents the voltage of node n; U ref = 1 pu, represents the reference voltage; N represents the total number of nodes; n represents the number of the nth node in the power distribution network; 2.4: the renewable energy consumption rate F4 is as follows: F4 = -R PV (17); where: R PV represents the distributed PV energy consumption rate of the system in all typical scenarios and throughout the day. wherein: Pm,t represents the photovoltaic active power actually absorbed by the system for the m-th typical scenario, for the t-th time interval; Pm,t represents the theoretical active power that the photovoltaic plant can generate for the m-th typical scenario, for the t-th time interval, under the given irradiation and meteorological conditions.

5. The distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust bi-level optimization according to claim 4, characterized in that: The decision variables include the access location, capacity and rated power of photovoltaic and energy storage: The decision variables of the upper-layer optimization include the access location, capacity and rated power of photovoltaic and energy storage: X up = {a i , P PV,i , x j , E ESS,j , P ESS,j}(19); Where: X up represents the upper layer optimization decision variable; a i represents the photovoltaic access location; P PV,i represents the photovoltaic capacity, determines the photovoltaic installed capacity accessed by the node, contains the upper and lower limits: x j represents the energy storage access location; E ESS,j represents the energy storage capacity; P ESS,j represents the energy storage rated power. 6.The distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust bi-level optimization according to claim 5, characterized in that: The constraints include node voltage, current limit and inverter capacity limit: ①. Node voltage constraint: U min ≤U m,t,n ≤U max (20); wherein: U m,t,n represents the voltage amplitude at the mth typical scenario, the tth time instant, the nth node; U min represents the minimum voltage value allowed at the node; U max represents the maximum voltage value allowed at the node; ②. Branch current limit: wherein: I ij,m,t denotes the line (branch) current value between the connection node i and the node j at the typical scenario m, time t; rated current upper limit of the line i-j; ③. Power flow balance constraint: P i represents the injected real power of node i; Q i represents the injected reactive power of node i; P i load represents the real load demand of node i; represents the reactive load demand of node i; U i ,U j represents the voltage magnitude of node i and node j; cosθ ij ,sinθ ij represents the trigonometric function of phase angle difference; G ij ,B ij represents the admittance matrix element; θ ij represents the phase angle difference; Ω i represents the set of adjacent branches of node i; ④. Inverter capacity constraint: wherein: Pmjtjrepresents the active power output of the energy storage device j at the mth typical scenario, the tth time period; Qmjtjrepresents the reactive power output of the energy storage device j at the mth typical scenario, the tth time period; Pmjtjrepresents the active power output of the energy storage device j at the mth typical scenario, the tth time period; The upper-level planning optimization model determines the long-term planning results of the system and transmits the decision results to the lower-level operation optimization model.

7. The distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust bi-level optimization according to claim 6, characterized in that: In step 2, in the lower-level operation optimization model, based on the distributed photovoltaic and energy storage access location and capacity determined by the upper-level planning, the active power output of each energy storage device is optimized in a typical working day as the operation cycle, so that the daily operation cost, node voltage deviation and network loss of the distribution network are simultaneously optimized; The decision variable of the lower layer optimization is the active power output P of each energy storage device at each time period ESS,j,t ; The lower-level operation optimization model is represented as: min(f1,f2,f3) s.t. h(X2)≤0 (25); Where: min(f1,f2,f3) represents the lower-level optimization objective function; f1 represents the daily operation cost objective; f2 represents the node voltage deviation objective; f3 represents the network loss objective; h(X2) represents the constraint function set of decision vector X2 in the lower-level operation optimization model; an output decision vector for the energy storage system; P1, P2,... Pn represent the active power output of the first, second,... nth energy storage device respectively at hour t of a typical day ESS P1, P2,... Pn represent the active power output of the first, second,... nth energy storage device respectively at hour t of a typical day 1) Daily operation cost objective f1: The daily operation cost objective function f1 represents the power purchase cost of the distribution network in a typical day, and its expression is: where c PE,t is the electricity price at hour t; P L,t is the net load power between the distribution grid and the main grid at hour t; P ESS,j,t is the active power output of the jth energy storage device at hour t, summed over the 24 hours of a typical working day; n ESS denotes the number of energy storage devices deployed in the distribution grid; 2) Node voltage deviation objective f2: The daily voltage deviation objective function f2 is used to represent the degree of deviation of the node voltage of the distribution network from the rated value at each time in a typical day, and can be represented as: Wherein, N is the number of distribution network nodes; U t,n U is the voltage amplitude of the nth node in the tth hour; U ref U is the rated voltage; the smaller the target is, the smaller the voltage deviation is, and the better the voltage quality is; t represents the time; n represents the node; 3) Network loss objective f3: The daily network loss objective function f3 represents the total active power loss of the distribution network in a typical day, and can be represented as: Wherein, NL is the number of distribution network branches; Ploss(t, l) is the active power loss of the lth branch in the tth hour, which is obtained by power flow calculation; the smaller the target is, the lower the line loss is. 4) Daily operation cost: where: C daily represents the daily operating cost; c PE,t represents the purchase price of electricity at the tth hour; P t grid represents the amount of electricity purchased from the main grid at the tth hour; c loss,t represents the line loss cost at the tth hour; P t loss represents the network loss at the tth hour; 5) Node voltage deviation: where: V dev represents the node voltage deviation; U t,n represents the voltage of the nth node in the tth hour; U ref represents the reference rated voltage; the voltage deviation rate characterizes the voltage quality; The lower-level operation optimization model generates operation strategies and feeds back optimization results based on the planning capacity and location of the upper-level planning optimization model. 8.The distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust bi-level optimization of claim 7, wherein: In step 3, the improved NSGA-II algorithm based on the elite strategy is used to interact and iterate the upper and lower models; 3.1, the improved NSGA-II algorithm combines fast non-dominated sorting and crowding distance; ① Fast non-dominated sorting: Let the population be P and the individual be x i with multi-objective vector: f(x i )=(f1(x i ),f2(x i ),…,f M (x i ))(31); wherein: f(x i ) represents a vector of objective function values for an individual; f1(x i ), f2(x i ),..., f M (x i ) represent the value of the individual x i on the 1st, 2nd, up to Mth objective function, respectively; Non-dominated definition: Individual x a Non-dominated by individual x b , denoted as iff: for all objectives m = 1,..., M, m denotes the index of the objective function; M denotes the number of objectives; f m (x a ) < f m (x b ) and at least one objective m satisfies f m (x a ) < f m (x b ), f m (x a ) denotes the value of individual x a on the m-th objective function; f m (x b ) denotes the value of individual x b on the m-th objective function; The result of fast non-dominated sorting is to get several non-dominated layers: F1, F2, …, F K ; where: F1 is the set of completely non-dominated individuals; F2 is the first layer of non-dominated set after F1 is removed; F k represents the kth non-dominated front; in this way, until all individuals are layered; when the algorithm is implemented, for each individual i, record: the set of individuals S i dominated by it; the number of individuals n i dominating it; when n i =0, individual i belongs to the first layer; after deleting this layer, update the n i of the remaining individuals, and then screen the second layer until the layering is completed; ② Crowding distance: In the same non-dominated layer F k The priority of an individual to be retained needs to be measured according to the density between solutions, and the crowding distance of an individual i in the same non-dominated layer F k is defined as: where d i denotes the crowding distance; for each target m, first sort the individuals by f m sort the individuals in the layer; denotes the function value of the individual i and its adjacent individuals on the mth target after sorting; denotes the maximum and minimum of the current layer on the mth target, used for normalization; d i denotes the crowding distance of the individual i, the larger the value, the more likely the individual is in the "sparse area" of the target space, which is more conducive to maintaining the diversity of the solution set; 3.2, dynamically adjust the search intensity through adaptive crossover and mutation operators; ①. Adaptive crossover probability: where: p c (g) denotes the crossover probability used at the gth generation, which is gradually reduced as the iterations proceed; denote the preset upper and lower limits of the crossover probability, respectively; g denotes the current iteration number; G max denotes the maximum iteration number; ② Adaptive mutation probability: where: p m (g) denotes the probability of variation used for the gth generation; respectively denote the upper and lower limits of the variation probability; 3.3, to deal with the uncertainty of meteorological and load prediction, the chance constraint mechanism is introduced; ① Voltage probability constraint: Let ξ be a random variable, then: Pr{U min ≤U n,t (ξ)≤U max}≥1-ε v (35); where: U n,t (ξ) denotes the voltage of node n at time t under the prediction error ξ; U min , max denote the upper and lower voltage limits, respectively; ε v denotes the allowed probability of voltage excursion; Pr{·} denotes the probability operator, and equation (35) is the probability that the voltage of node n at time t n,t (ξ) falls within the allowed voltage range [U min , max ]. ② Renewable energy consumption rate probability constraint: where: R PV (ξ) represents the PV curtailment rate under uncertain conditions; represents the minimum curtailment level required by the planning; ε r represents the probability of allowing non-compliance; 3.4, in the optimization process, the upper and lower models are iterated and transmitted, and the global Pareto optimal solution set is gradually approached: 1) The membership function is used to select the best compromise solution from the lower Pareto set. The membership of the kth Pareto solution obtained by the lower NSGA-II at the ith objective f i is given by: where: represents the membership value of the solution to the objective; f i (k) represents the value of the kth solution to the ith objective; f i min ,f i max represents the minimum and maximum values of the objective in the current Pareto set; The comprehensive membership function is taken as the weighted sum: where: μ (k) represents the comprehensive membership degree; w i represents the weight of each target, and the solution with the maximum μ (k) is taken as the optimal compromise solution of the lower layer, and is fed back to the upper layer as the evaluation of the corresponding configuration scheme of the upper layer in the operation dimension. 2) Interaction process of upper and lower NSGA-II: Upper-level search: the upper NSGA-II calculates the objectives F1, F2 according to the current population individuals X1; to accurately evaluate the operation effect, the lower-level operation optimization model is called once for each upper-level individual to perform operation optimization; Lower-level solution: given the upper-level scheme, the lower NSGA-II solves the objectives of daily operation cost, voltage deviation and network loss to obtain a set of Pareto solutions; the optimal compromise solution is selected through the membership function, and the lower-level objective values corresponding to the compromise solution are transmitted back to the upper level; Upper layer updates individual fitness: the upper layer will receive the lower layer compromise results, and put it into the calculation of the upper layer annual comprehensive cost and total voltage deviation to update the individual objective function value; The upper layer performs non-dominated sorting, crowding distance, and elite selection to generate the next generation of solutions; Repeat the above upper layer generation and corresponding lower layer solution until the upper layer NSGA-II reaches the maximum iteration number to obtain the Pareto optimal configuration set of the overall bi-level model. 9.The distributed photovoltaic energy storage system configuration method based on deep feature clustering and robust bi-level optimization of claim 8, wherein: In step 3, when the lower layer optimization result shows that the voltage exceeds the limit or the renewable energy consumption is insufficient, the scene regeneration mechanism is triggered, the scene clustering weight is dynamically adjusted, the typical operation scene is regenerated, and the upper layer planning optimization model is returned for correction: 3.1), Triggering condition: Voltage limit criterion: wherein: represents the proportion of voltage out-of-limit in the node-time combination under the scenario; m represents the mth typical scenario; N represents the number of nodes of the power distribution network; U m,t,n represents the voltage of scenario m, time t, and node n; U min , max represents the upper and lower limits of the voltage; I{·} represents an indicator function, which is 1 if the condition is met, and 0 otherwise; 3.2), Renewable energy consumption insufficient criterion: wherein: R PV,m represents the photovoltaic curtailment rate of scenario m; represents the photovoltaic power actually utilized at time t in scenario m; represents the photovoltaic theoretical available power; represents the minimum curtailment level required by the schedule; AR m represents the "curtailment gap" in this scenario; In the kth round of each upper and lower layer iteration, the weight is punished or amplified, and a comprehensive "problem degree index" is defined: wherein: J m represents the "operational risk indicator” for scenario m; represents the voltage excursion degree indicator for scenario m; a r represents the importance weight of under-consumption; a v represents the importance weight of voltage excursion; AR m represents the PV under-consumption gap for scenario m; Based on J m Adjust scene weight: wherein: denotes the new weight without normalization; denotes the weight of scene m at the kth iteration; λ denotes an adjustment factor, which controls the adjustment amplitude; denotes the new weight after normalization, which ensures denotes the new weight without normalization of scene m at the kth iteration; NC denotes the total number of typical scenes.

10. The method of claim 9, wherein the method further comprises: After obtaining the operation risk index of each typical scene through the lower layer operation optimization model, the scene weight is updated, the sample weight is introduced into the IDEC-K deep clustering model, and the regeneration of the typical scene is realized; the objective function of the weighted IDEC-K deep clustering model can be represented as: wherein, denotes the weight of sample s in the k+1th round of scene regeneration process, which is used to reflect the importance of the sample in the clustering process; s is the index of the original sample, and each sample corresponds to multi-source data of a day; z s denotes the low-dimensional embedding feature vector extracted by the encoder part of the deep autoencoder for the sample s, which is used to represent the key features of the day; C={c1,…,c K} denotes the set of K cluster centers; c k(s) is the cluster center corresponding to the cluster to which the sample s belongs; q s denotes the soft partition distribution vector output by the clustering layer, and the jth component q sj denotes that the sample s belongs to the jth scene in the form of probability; p s denotes the target distribution vector constructed by the soft partition distribution q s , which is used to amplify the influence of high-confidence samples on the update of the cluster center; KL(p s ||q s ) denotes the divergence between the target distribution p s and the current distribution q s , which is used to constrain the clustering layer output to gradually approximate the target distribution; β denotes the importance coefficient for balancing the clustering reconstruction term and the distribution matching term, which is used to balance the feature embedding and the clustering stability; The update rule of the sample weight is: where m(s) represents the typical scene number that sample s belongs to in the last round of clustering; represents the weight of scene m(s) in the k+1th iteration, which is dynamically adjusted according to the severity of the voltage out-of-limit or insufficient accommodation problem of the scene in the running optimization; the greater the weight of the scene, the greater the weight of the corresponding sample , and the more significant the contribution in the objective function, so as to get more attention in the new feature learning and clustering iteration. By solving the above weighted IDEC-K clustering model, the updated typical scenario curve is obtained That is, the new typical operating day feature, the updated intra-scenario representative day sample, and the updated scenario weight After introducing the scenario regeneration mechanism, the updated typical scenario curve and its weight As the new input scenario in the upper planning optimization model, the objective function values such as annual comprehensive cost, annual voltage deviation, and photovoltaic accommodation rate are recalculated, and on this basis, the upper NSGA-II evolution is continued to be executed, thereby realizing the closed-loop iterative optimization of scenario-planning-operation.

Citation Information

Cited By

  • Differentiated scheduling method, device and equipment for renewable energy direct current system

    CN121840541A