A method for coordinated scheduling of electric vehicle charging load considering power grid carrying capacity
Patent Information
- Application Number
- CN202611106611.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-16
AI Technical Summary
由此带来的直接问题是:模型在训练数据覆盖较好的常规工况下表现良好,一旦面临极端负荷或拓扑变化等分布外场景,输出的重构方案可能违反辐射状运行、拓扑连通性等基本电网运行规则,通常只能依赖后处理校验与修正
1、实现了配电网重构与充电负荷调度的端到端协同决策与毫秒级快速推理。
Smart Images

Figure CN122931861A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of AC power distribution network circuit technology, specifically to a method for coordinated scheduling of electric vehicle charging loads that takes into account the grid carrying capacity. Background Technology
[0002] With the continuous growth of electric vehicle ownership, the impact of their charging behavior on power system operation is becoming increasingly significant. Electric vehicle charging load exhibits a clear evening peak concentration characteristic in terms of time, with users concentrating on charging after get off work, overlapping with peak residential electricity consumption to create a "peak-on-peak" load curve. Spatially, the charging density in urban centers, large residential communities, and commercial complexes can be several times that of suburban areas, resulting in local distribution network loads far exceeding the national average.
[0003] Against this backdrop, intelligent scheduling of electric vehicle charging load has become a research hotspot in the field of power system operation and control. In existing technologies, time-of-use pricing-based orderly charging strategies guide users to charge during off-peak hours through price signals, but the control effect relies on user self-response and lacks rigid constraints under emergency grid conditions. Load forecasting-based charging scheduling methods utilize machine learning to predict charging demand and formulate plans in advance, but prediction accuracy significantly decreases under scenarios with drastic load fluctuations, such as extreme weather and holidays, resulting in insufficient robustness of the scheduling scheme. In recent years, the coordinated optimization of distribution network reconfiguration and charging scheduling has received widespread attention. Distribution network reconfiguration, by changing the opening and closing states of sectionalizing switches and tie switches to replan power flow paths, is an important means of alleviating local line overload and balancing the overall network load. Theoretically, its joint optimization with charging power allocation can achieve better system operation results than independent decision-making.
[0004] However, existing collaborative solutions face a dilemma: if a two-layer mathematical programming iterative solution is used, each iteration requires repeatedly solving the optimal power flow problem at different time points, and the computational burden increases exponentially with the network size, making it difficult to meet the real-time requirements of online scheduling; if a simplified model adopts heuristic or single-layer optimization strategies, the safety constraints are often only soft penalty terms in the objective function rather than hard constraints at the architectural level, resulting in weak constraint propagation and difficulty in guaranteeing the safety of the solution under conditions close to the carrying capacity limit. Meanwhile, data-driven methods have also made progress in the field of distribution network reconfiguration. Graph neural networks have been introduced due to their natural adaptation to the graph structure characteristics of distribution networks, used to accelerate reconfiguration decisions or replace traditional power flow calculations. However, most existing solutions are purely data-driven, with their core logic being to model the reconfiguration problem as an end-to-end mapping task, i.e., inputting the operating state and outputting switching actions. This logic implicitly assumes that the training data has covered all feasible and safe operating states. However, in actual operation, the true safety boundary of the power grid is determined by Kirchhoff's laws and the rated parameters of the equipment, and there is no natural correlation between this and the data distribution. The direct problem arising from this is that while the model performs well under normal operating conditions with good training data coverage, it may violate fundamental power grid operation rules such as radial operation and topological connectivity when faced with extreme loads or topological changes. Typically, post-processing is required for verification and correction. In power grid dispatching scenarios, this approach reduces decision-making efficiency and fails to provide provable security guarantees. This is because post-processing can only correct known rule violations and is powerless to address physical constraints not explicitly modeled in the model.
[0005] Further analysis of the challenges faced by these two technical approaches reveals that, regardless of mathematical programming or end-to-end learning methods, distribution network reconfiguration and charging load scheduling in existing schemes are treated as a unidirectional process of first sensing the state and then making a decision. This unidirectional process implicitly assumes that the grid's carrying capacity boundary is fixed a priori and does not change with scheduling decisions. However, in actual physical systems, reconfiguration decisions alter power flow paths, thereby changing the voltage distribution at each node and the load rate of lines. In other words, the carrying capacity boundary itself is a result of the reconfiguration decision, not a prerequisite. Therefore, existing technical solutions suffer from a causal misalignment: using pre-reconfiguration topology information to decide on post-reconfiguration charging power allocation, or performing reconfiguration first and then scheduling verification, severs the feedback relationship between the two. This misalignment may not be significant during routine small adjustments, but under conditions close to the load-bearing limit, such as the evening when residential air conditioning loads are high during hot weather, and at the same time a large number of electric vehicles are connected to charging, the coupling effect between topology adjustment and load distribution is amplified dramatically. It is difficult to find a feasible point that satisfies both constraints in a single decision, and multiple rounds of repeated adjustments are often required, which further exacerbates the computational burden of mathematical programming methods or the risk of failure of end-to-end models.
[0006] Meanwhile, existing methods also have shortcomings at the data level upon which model training depends. Training data typically comes from two sources: sampling from historical operating records and generation using generative adversarial networks (GANs). Physically constrained GANs, by embedding physical rules into a loss function, can generate scenarios that conform to the operating patterns of the power grid and have been widely used in this field. However, existing solutions aim for statistical realism and physical plausibility in their generation. The former requires the generated scenarios to closely approximate historical data in distribution, while the latter requires that they do not violate physical constraints. Essentially, they involve interpolation or smooth extrapolation within the distribution range of existing historical data. However, the key samples that determine the safety boundary of the scheduling strategy are precisely located at the edge of the historical data distribution or even beyond, such as rare cases of extreme high temperatures combined with high renewable energy output. In these areas, existing generation methods lack sufficient historical samples for reference and are limited by physical constraint losses, making it difficult to advance towards the boundary. The resulting scenario set is concentrated in the normal operating condition range, contributing little to improving the scheduling model's decision-making ability under extreme conditions.
[0007] In summary, the existing technical problems can be categorized into three levels: At the collaborative architecture level, there is a lack of feedback loop between refactoring and scheduling, and the intrinsic characteristics of the safety boundary changing with decision-making are not explicitly modeled, resulting in low optimization efficiency and weak constraint guarantees; at the decision model level, data-driven refactoring methods lack intrinsic guarantees of physical rules, and the feasibility of the output solution depends on post-processing corrections; at the training data level, scenario generation methods cannot efficiently cover the safety boundary region of scheduling decisions, limiting the model's generalization ability under extreme conditions. These three levels of problems overlap and jointly restrict the safety and response speed of electric vehicle charging load scheduling under conditions near the limit of distribution network carrying capacity.
[0008] To address the aforementioned issues, this invention proposes an electric vehicle charging load scheduling method based on a topology-load two-layer collaborative graph network that considers the grid's carrying capacity. Summary of the Invention
[0009] To address the aforementioned problems in the existing technology, this invention provides a collaborative scheduling solution for electric vehicle charging loads that takes into account the grid's carrying capacity.
[0010] This invention proposes a method for coordinated scheduling of electric vehicle charging loads considering grid carrying capacity, comprising the following steps: S1, obtain the source-load scenario set, which includes the time-series data of distribution network operation conditions, electric vehicle charging load and distributed new energy output; S2, Construct a topology-load two-layer heterogeneous graph neural network model, including: Construct a lower-level topology network with the busbars or distribution transformers of the distribution network as nodes and lines and switches as edges. The output of this network includes the carrying capacity margin index of each physical node and the distribution network reconfiguration action strategy. Construct an upper-level load graph network with charging stations or charging pile clusters as nodes and the power transmission coupling strength between nodes as edges. The power transmission coupling strength is updated in real time based on the physical power flow sensitivity under the reconstructed topology output by the lower-level topology graph network and is used as the edge feature input of the upper-level load graph network. The output of this network includes the charging power allocation strategy. A cross-layer physical feature interaction path is constructed, which maps the carrying capacity margin index of each physical node output by the lower-layer topology graph network to the node feature space of the upper-layer load graph network, generates carrying capacity bias modulation parameters, and uses the modulation parameters to adjust the neighborhood attention weight of the upper-layer load graph network to constrain the charging power allocation decision to avoid nodes and power supply paths with insufficient carrying capacity. In this training process, the lower-layer topology graph network and the upper-layer load graph network adopt a gradient decoupling strategy: the discrete reconstruction action of the lower-layer topology graph network updates the parameters through the policy gradient method, and the continuous power allocation of the upper-layer load graph network updates the parameters through backpropagation. The two only interact with each other through forward physical feature transfer. S3, using the source-load scenario set to jointly train the topology-load two-layer heterogeneous graph neural network model, to obtain the trained scheduling model; S4: Obtain real-time operating status and charging demand forecast data of the distribution network, input the trained scheduling model, generate a distribution network reconfiguration scheme and a charging power allocation scheme corresponding to the current operating status, and issue them for execution after physical feasibility verification.
[0011] According to some embodiments, in the method proposed in this invention, in step S1, the source payload scene set is generated through an improved generative adversarial network, and the generation process is as follows: A generative adversarial network is constructed, which includes a generator, a discriminator, a differentiable power flow calculation unit, and a scene diversity evaluation unit; the generator receives noise and operating condition labels and outputs source load time sequence scenes. The generator's total loss function is obtained by weighted summation of adversarial loss, physical regularization loss, and scene boundary coverage loss, satisfying: ; in, To counteract the loss, the discriminator output measures the difference in statistical distribution between the source load temporal scene and the real scene; This is the physical regularization loss, used to measure the extent to which the power flow exceeds the limit in a source-load time-series scenario; The scene boundary coverage loss is used to measure the uniformity of the distribution of the source load temporal scene set in the load-output feature space, driving the source load temporal scene to cover the feasible domain boundary and avoiding mode collapse. , , These are the corresponding weighting coefficients; The generator is trained with the total loss function as the optimization objective, and the output is a set of source load scenarios covering both normal and extreme working conditions.
[0012] According to some embodiments, in the method proposed in this invention, the physical canonical loss is calculated by a differentiable power flow calculation unit: The differentiable power flow calculation unit uses a differentiable AC power flow solver to load the source load time sequence scenario output by the generator as the node injected power onto the distribution network reference topology, and solves for the voltage amplitude of each node and the power distribution of each line. The weighted sum of the over-limit of each node voltage amplitude relative to its operating upper and lower limits and the over-limit of each line power relative to its rated capacity is used as the physical regularization loss value. The solution process of the differentiable AC power flow solver maintains the differentiability of the computation graph throughout the entire solution process, allowing the physical regularization loss value to directly participate in the gradient backpropagation of the generator.
[0013] According to some embodiments, in the method proposed in this invention, the scene boundary coverage loss is calculated in the following manner: Map all source-load time-series scenarios output by the generator to a feature space with the total node load and total new energy output as coordinate axes, and calculate the convex hull volume or determinant value of the feature covariance matrix of all generated scenario point sets in the feature space. With the optimization direction of maximizing the convex hull volume or the determinant of the feature covariance matrix, a scene boundary coverage loss is generated to drive the source load temporal scene to spread uniformly in the feasible region and approach the safe boundary. At the same time, the physical regularization loss is used to filter out the over-limit scene.
[0014] According to some embodiments, in the method proposed in this invention, step S2, the process of constructing the cross-layer physical feature interaction path includes: Sa1, obtain the carrying capacity margin index of each physical node in the lower-level topology network output and the corresponding node voltage-power sensitivity parameters under the reconstructed topology; Sa2, based on the node voltage-power sensitivity parameters, maps the load capacity margin index of each physical node to each load node in the upper load graph network, generating the original load capacity bias value of the corresponding load node. Sa3 inputs the original value of the load-bearing capacity bias into the feature modulation parameter generation network and outputs modulation parameters that are compatible with the attention layer of the upper load map network. Sa4 applies modulation parameters to the attention calculation process of the upper-level load graph network, using the modulated attention score to constrain the charging power allocation decision, so that the charging load allocation avoids nodes and power supply paths with insufficient carrying capacity.
[0015] According to some embodiments, in the method proposed in this invention, in step Sa1, the carrying capacity margin index is determined by comprehensively considering the voltage magnitude margin, line current carrying capacity margin, and distribution transformer capacity margin of the corresponding physical node under the current reconfigured topology.
[0016] According to some embodiments, in the method proposed by the present invention, step S4 specifically includes: Obtain ultra-short-term load and charging demand forecast data for multiple future time segments, input them into the trained scheduling model, and obtain multiple sets of candidate distribution network reconfiguration schemes and charging power allocation schemes for each time segment. The timing sequence is spliced using a dynamic programming algorithm, with the penalty term for the number of switching actions and the minimum action interval constraint as constraints. The optimal action sequence is selected, and after physical feasibility verification, the action plan corresponding to the current time period is issued for execution.
[0017] According to some embodiments, in the method proposed in this invention, the physical feasibility verification adopts a dual verification mechanism that combines front-end rule filtering and back-end global verification. Among them, the front-end rule filtering is used to block obviously non-compliant switch combinations, and the back-end global verification is used to verify the radial operation requirements and connectivity requirements of the global topology.
[0018] According to some embodiments, the method proposed in this invention further includes a model periodic fine-tuning step: Real-time collection of actual operational data after scheduling execution; identification of high uncertainty periods where operational deviations exceed preset thresholds; and storage of these periods as difficult samples. By periodically utilizing accumulated difficult samples, the generative adversarial network and the topology-load two-layer heterogeneous graph neural network model are incrementally fine-tuned.
[0019] According to some embodiments, in the method proposed in this invention, the lower-level topology graph network adopts a policy network architecture based on Markov decision process modeling: The lower-level topology network takes the real-time operating status of the distribution network as input and outputs the probability distribution of the operation of each operable switch. During training, discrete reconstructed actions are extracted from the action probability distribution through Monte Carlo sampling, and the parameters of the lower-level topology graph network are updated using the policy gradient algorithm. The upper-layer load graph network adopts a deterministic network architecture based on graph attention mechanism and updates parameters through backpropagation.
[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. It realizes end-to-end collaborative decision-making and millisecond-level fast reasoning for distribution network reconfiguration and charging load scheduling.
[0021] By employing a topology-load two-layer heterogeneous graph neural network model and a gradient decoupling strategy, the collaborative optimization problem, which traditional mathematical programming methods require several minutes of iterative solutions, is compressed into a single forward propagation, further improving inference speed and meeting the time window requirements for online real-time scheduling. Simultaneously, through cross-layer physical feature interaction, carrying capacity constraints are embedded as modulation parameters into the attention calculation process of the upper-layer network, achieving endogenous transmission of safety constraints at the network architecture level and ensuring that the scheduling scheme does not exceed the power grid's carrying capacity boundary. This is the core technical effect of this invention.
[0022] 2. It achieves efficient coverage of training data across all operating conditions.
[0023] By combining scene boundary coverage loss and physical regularization loss, the generated scene spreads evenly across the feasible domain boundary without exceeding the limit, ensuring that the scheduling model has sufficient training samples to support both normal and extreme operating conditions, thus significantly improving the decision reliability of the model across the entire operating range.
[0024] 3. It achieves architecture-level assurance of the physical feasibility of the output solution.
[0025] By applying physical regularization constraints to the generated scenario through a differentiable AC power flow solver, and employing a dual mechanism of front-end rule filtering and back-end global verification, the reconstructed scheme output by the scheduling model satisfies the basic operating rules of the power grid, such as radial structure and topological connectivity, thereby reducing the dependence on post-processing corrections.
[0026] 4. It enables the dynamic reconfiguration decision to adapt to the on-site operation procedures of the project.
[0027] By combining multi-candidate parallel reasoning with dynamic programming timing, the hard constraints of the field, such as the upper limit of the number of switching actions and the minimum action interval, are embedded into the decision-making process, and the output scheme can be directly issued and executed through the SCADA / EMS system.
[0028] 5. It has achieved the ability for continuous self-evolution of the scheduling model.
[0029] By using a closed-loop dual-model collaborative fine-tuning driven by difficult samples, the scenario generation model and the scheduling decision model can promote each other and evolve collaboratively in actual operation, and the system performance can be continuously improved as the running time increases. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating an embodiment 1000 of the electric vehicle charging load collaborative scheduling method considering grid carrying capacity according to the present invention. Figure 2A flowchart illustrating the construction of sub-step S2a of the cross-layer physical feature interaction path in step S2 of Example 1000; Figure 3 This is a flowchart illustrating step S4 in Example 1000; Figure 4 This is a flowchart illustrating an embodiment 2000 of the electric vehicle charging load collaborative scheduling method considering grid carrying capacity according to the present invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0032] Figure 1 This is a flowchart illustrating an embodiment 1000 of the electric vehicle charging load collaborative scheduling method considering grid carrying capacity according to the present invention. Figure 1 As shown, Example 2000 includes steps S1-S4.
[0033] In step S1, a source-load scenario set is obtained, which includes time-series data on distribution network operating conditions, electric vehicle charging load, and distributed renewable energy output. In some specific embodiments, the source-load scenario set in step S1 is generated using an improved generative adversarial network, and the generation process is as follows: A generative adversarial network (GAN) is constructed, comprising a generator, a discriminator, a differentiable power flow calculation unit, and a scene diversity assessment unit. The generator receives noise and operating condition labels and outputs the source load time series scene. The specific components of the GAN are described below: (a) Generator In some specific embodiments, the generator employs a four-layer fully connected neural network, with the following structure: an input layer with a dimension equal to the sum of the random noise dimension and the working condition label dimension; a first hidden layer with 256 neurons and ReLU activation; a second hidden layer with 512 neurons and ReLU activation; a third hidden layer with 256 neurons and ReLU activation; and an output layer with a dimension equal to the data dimension of the scene to be generated and linear activation. Batch normalization and Dropout are used between the input layer and the first hidden layer, and between each hidden layer, to prevent overfitting.
[0034] Optionally, the generator's input consists of two parts: (1) Random noise vector z: sampled from the standard normal distribution N(0,I) with a dimension of 64.
[0035] (2) Operating condition label c: The operating condition label adopts 6-dimensional one-hot encoding. The specific encoding rules are as follows: the first and second positions represent the season type (01=spring, 10=summer, 11=autumn, 00=winter), the third and fourth positions represent the weather type (01=sunny, 10=cloudy, 11=rainy), and the fifth and sixth positions represent the date type (01=weekday, 10=weekend, 11=holiday).
[0036] The random noise vector z and the load condition label c are concatenated at the input layer into a 70-dimensional joint vector, which serves as the complete input to the generator. Guided by the load condition label c, the generator outputs the source load time series scene corresponding to that label.
[0037] The generator's output data specifically includes: active power load values (MW) and reactive power load values (Mvar) for each node in the distribution network at a given time segment; and active power output values (MW) and reactive power output values (Mvar) for each distributed renewable energy source, such as photovoltaic power plants and wind farms. All output power values are expressed in per-unit values, with the base value being the rated capacity of each node or power plant. If the generated time-series scenario involves multiple time segments, the generator's output tensor has a shape of T×N, where T is the number of time segments and N is the total dimension of node load and renewable energy output. In this embodiment, T=96, meaning 96 15-minute segments per day.
[0038] (ii) Discriminator The discriminator employs a four-layer fully connected neural network, whose structure is essentially symmetrical to that of the generator. The input layer has a dimension equal to the data dimension of a complete scene (i.e., T×N), and then passes through three hidden layers with 256, 128, and 64 neurons respectively, activated by LeakyReLU with a slope of 0.2, ultimately outputting a scalar value.
[0039] The discriminator operates within the WGAN-GP framework. Its output bypasses the sigmoid probability mapping function and directly outputs a real value representing the realism score of the input scene. During training, the discriminator's optimization objective is to maximize the difference between the scores of the real and generated scenes.
[0040] Specifically, the loss function of the discriminator is: ; Where x represents a real historical scene. To generate the scene, Here, γ represents the random interpolation point between the real and generated scenes, and γ is the gradient penalty coefficient (γ=10 in this embodiment). This loss function is the discriminator loss of WGAN-GP, where the first and second terms constitute the estimate of the Wasserstein distance, and the third term is the gradient penalty term, used to force the discriminator to satisfy the 1-Lipschitz continuity constraint.
[0041] (III) Differentiable Power Flow Calculation Unit The differentiable power flow calculation unit employs a differentiable AC power flow solver based on a Physics-Informed Neural Network (PINN). This solver is an independent neural network model, trained to fit the solution mapping of the AC power flow in the distribution network.
[0042] (1) Offline training of PINN solver Before step S1 is executed, the PINN solver is first trained offline. Training data is obtained by sampling a large number of nodal injected power samples uniformly distributed within the physically feasible region on a distribution network reference topology, and then using a traditional Newton-Raphson power flow calculation program to label the corresponding nodal voltage magnitude and line power distribution for each sample. Using nodal injected power as input and nodal voltage and line power as output, a five-layer fully connected neural network is trained, with the training loss function being the mean square error between the predicted value and the labeled Matpower value. Optionally, the number of neurons in each layer of the five-layer fully connected neural network is 128-256-512-256-128, and the activation function is Swish.
[0043] (2) Online calling of PINN solver During the training of the Generative Adversarial Network (GAN), after the generator outputs a batch of source-load time-series scenarios, the node injection power data at each time segment is sequentially input into the pre-trained PINN solver. The PINN solver outputs the corresponding node voltage amplitude and power distribution of each line in one go through the neural network forward propagation, without iterative calculation. Since the forward propagation process of the PINN solver consists entirely of matrix multiplication and activation functions of the neural network, its computation graph remains differentiable throughout when implemented in a deep learning framework. This allows the physical regularization loss value calculated subsequently to be directly backpropagated to the generator via the chain rule.
[0044] If the distribution network topology used in this method is large, such as having more than 100 nodes, the training complexity of the PINN solver may increase significantly. In this case, a PINN solver can be trained separately for each seasonal type or each typical operating mode during the offline training phase. When called online, the most suitable solver can be automatically selected based on the current operating condition label to balance computational accuracy and inference speed.
[0045] (iv) Scenario Diversity Assessment Unit The scene diversity assessment unit is implemented by an additional computational branch within the generator. In each training batch, after the generator outputs M scenes (M=64 in this embodiment), the total active power load of each of the M scenes is calculated. They always contribute to new energy sources. Extracted, forming M two-dimensional coordinate points. , .
[0046] Calculate the convex hull area of these M points. This embodiment uses the standard Graham scan algorithm to calculate the 2D convex hull and its area. The negative value of the convex hull area is used as the scene boundary coverage loss value. The more dispersed and wider the coverage of the generated scene in the feature space, the larger the convex hull area. The smaller the value, the larger the absolute value of the negative value, thus guiding the generator to optimize in the direction of expanding the scene coverage.
[0047] In some specific embodiments, to avoid misleading training due to an abnormally large convex hull area caused by a small number of outliers, outliers that are more than 3 times the standard deviation away from the center point of the feature space (i.e., the mean coordinates of the M points) can be removed before calculating the convex hull, thereby ensuring that the convex hull area stably reflects the coverage of the mainstream scene.
[0048] The generator's total loss function is obtained by weighted summation of adversarial loss, physical regularization loss, and scene boundary coverage loss, satisfying: ; in, To counteract the loss, the discriminator output measures the difference in statistical distribution between the source load temporal scene and the real scene; This is the physical regularization loss, used to measure the extent to which the power flow exceeds the limit in a source-load time-series scenario; The scene boundary coverage loss is used to measure the uniformity of the distribution of the source load temporal scene set in the load-output feature space, driving the source load temporal scene to cover the feasible domain boundary and avoiding mode collapse. , , The corresponding weight coefficients are used; the generator is trained with the total loss function as the optimization objective, and the output is a set of source load scenarios covering both normal and extreme working conditions.
[0049] Optionally, in this embodiment, the weighting coefficient is taken as: The values in this set were determined through a grid search on a small validation set. Their physical meaning is as follows: the adversarial loss, as the primary optimization objective, maintains standard weights, while the physical regularization loss and boundary cover loss are assigned lower weights as constraint terms to avoid excessive constraints that could impair the diversity of generated scenes. The following provides a detailed explanation of each loss term.
[0050] In some specific embodiments, within the WGAN-GP framework, the adversarial loss of the generator is defined as the negative expected value of the discriminator's score on the generated scene: ; Where M is the batch size. D is the generator's output for the kth sample, and D(.) is the discriminator's score output. The smaller the value, the higher the score the discriminator gives to the generated scene, meaning the generated scene is statistically closer to the real scene.
[0051] Optionally, the physical regularization loss is calculated by a differentiable power flow calculation unit: the differentiable power flow calculation unit uses a differentiable AC power flow solver, loads the source load time series scenario output by the generator as the node injected power onto the distribution network reference topology, and solves for the voltage amplitude of each node and the power distribution of each line; the over-limit amplitude of each node voltage relative to its operating upper and lower limits and the over-limit amplitude of each line power relative to its rated capacity are weighted and summed as the physical regularization loss value; the solution process of the differentiable AC power flow solver keeps the computation graph differentiable throughout, so that the physical regularization loss value directly participates in the gradient backpropagation of the generator.
[0052] Specifically, for physical regularization loss : In each training batch, the generator outputs MM scenarios. The node-injected power data of each scenario is input into the PINN solver to obtain the corresponding node voltage amplitude. and transmission power of each line The lower limit of the operating voltage amplitude at each node is taken as follows: pu, upper limit The formula for calculating the physical regularization loss is: ; Where α=1.0 and β=1.0, voltage and line power exceedances are weighted equally. Exceedance magnitudes are expressed in per-unit values, thus requiring no additional normalization. All physical quantities involving voltage and power have been unified to the per-unit system, with voltage based on node rated voltage and power based on line rated capacity. Since the forward propagation process of the PINN solver is implemented within the PyTorch framework, all its operations, including matrix multiplication, activation functions, and additions, are recorded in the automatic differential calculation graph by the framework. The gradient relative to the generator output can be directly obtained through The chain rule is automatically calculated and backpropagated to the generator, enabling real-time guidance of generator training by physical constraints.
[0053] Optionally, the scene boundary coverage loss is calculated as follows: all source-load time-series scenes output by the generator are mapped to a feature space with the total node load and the total output of new energy sources as coordinate axes, and the convex hull volume or the determinant of the feature covariance matrix of all generated scene point sets in the feature space is calculated; the scene boundary coverage loss is generated with the optimization direction of maximizing the convex hull volume or maximizing the determinant of the feature covariance matrix, which is used to drive the source-load time-series scenes to spread uniformly in the feasible region and approach the safe boundary, while filtering out over-limit scenes through physical regularization loss.
[0054] In some specific embodiments, scene boundary coverage loss The calculation process is as described above, and its specific mathematical form is: ; The loss value is always negative or zero, and its absolute value is proportional to the area covered by the generated scene in the load-output feature space. The smaller the value (the larger the absolute value), the larger the coverage of the generated scene. This loss works in conjunction with the physical regularization loss: the physical regularization loss prevents the generated scene from going beyond the physical boundary, while the boundary coverage loss pushes the generated scene towards the boundary. Together, they drive the generated scene to achieve maximum coverage within the physically feasible domain.
[0055] In some specific embodiments, in step S1, the training of the generative adversarial network employs an alternating optimization strategy, and the following steps are performed in each iteration: (1) Fix the generator parameters, randomly sample M=64 real scenarios from the real historical dataset, and simultaneously sample M=64 generated scenarios from the generator, along with randomly generated working condition labels. Calculate the discriminator loss. The discriminator parameters are updated using the Adam optimizer, with the discriminator updated 5 times in each iteration. Optionally, the learning rate of the Adam optimizer is lr=0.0001. =0.5, =0.9.
[0056] (2) Fix the discriminator parameters, sample M=64 generated scenarios from the generator (with randomly generated working condition labels), and sequentially call the differentiable power flow calculation unit to calculate. Call the scenario diversity assessment unit to calculate Along with the feedback from the discriminator ,according to The generator parameters are updated by weighted summation and the Adam optimizer is used to update the generator once in each iteration.
[0057] The above steps (1) and (2) are performed alternately until training converges. The convergence criteria are: the adversarial loss fluctuates within a range of no more than 5% in the last 100 iterations, the physical regularization loss drops below 0.01 pu and no longer continues to decrease, that is, the generated scene basically no longer exceeds the limit; the boundary coverage loss continues to increase in the last 100 iterations, that is, the coverage range continues to expand and then enters a stable plateau period.
[0058] After training, the source load time-series scenarios output by the generator according to different operating condition labels are aggregated into a source load scenario set. In a preferred implementation, 500 scenarios are generated independently for each operating condition label, resulting in a total of approximately 500 × 27 = 13,500 scenarios, including 27 combinations of operating condition labels, which constitute the complete source load scenario set used for subsequent scheduling model training.
[0059] Optionally, to further reduce the computational burden of training, scene reduction can be performed after the scene set is generated. Specifically, all generated scenes are grouped according to their working condition labels. Within each group of 500 scenes, a K-means++ clustering algorithm is used, with 20 clusters. The scene closest to each cluster center is selected as the representative scene of that group. Finally, each group of 500 scenes is reduced to 20 typical scenes, preserving the representativeness of various working conditions while significantly reducing the computational load of subsequent training. This scene reduction operation is an optional preferred implementation and not a necessary step in this method.
[0060] According to the above embodiments, the core task of step S1 is to provide a set of source load scenarios that covers both normal and extreme operating conditions, and where all scenarios do not violate physical limit constraints. Compared with traditional scenario generation methods that rely solely on historical data, this solution has the following technical advantages: First, the generated scenario set is evenly distributed in the load-output feature space and approaches the safety boundary, which enables the subsequent scheduling model to fully learn the optimal decision logic under the boundary conditions during the training process, thus having a stronger adaptability when facing extreme situations in actual operation.
[0061] Secondly, the differentiable design of the physical regularization loss allows the generator to continuously receive gradient information during training about which directions would lead to exceeding the limits, thereby actively constraining the output within the physically feasible region and greatly reducing the cost of subsequent data screening and cleaning.
[0062] Third, the synergistic optimization of the three loss terms achieves an engineering balance between distribution realism, physical feasibility, and boundary coverage through determined weighting coefficients. The values of these weighting coefficients are determined based on a grid search of a small validation set, ensuring stable universality in distribution network applications of different scales.
[0063] The core task of step S2 is to construct a topology-load two-layer heterogeneous graph neural network model. This model consists of a lower-layer topology graph network and an upper-layer load graph network. Information is transferred between the two networks through a cross-layer physical feature interaction path, and a gradient decoupling strategy is employed during training. The following details the implementation of this step from four aspects: the lower-layer topology graph network, the upper-layer load graph network, the cross-layer physical feature interaction path, and the joint training and inference process. Specifically, the lower-layer topology graph network and the upper-layer load graph network employ a gradient decoupling strategy during training: the discrete reconstruction action of the lower-layer topology graph network updates parameters through a policy gradient method, while the continuous power allocation of the upper-layer load graph network updates parameters through backpropagation. Information exchange between the two occurs only through forward physical feature transfer.
[0064] In step S2, a topology-load two-layer heterogeneous graph neural network model is constructed, including: Construct a lower-level topology network with distribution network buses or distribution transformers as nodes and lines and switches as edges. The output of this network includes the carrying capacity margin index of each physical node and the distribution network reconfiguration action strategy.
[0065] Optionally, the lower-level topology network adopts a policy network architecture based on Markov decision process modeling: the lower-level topology network takes the real-time operating status of the distribution network as input and outputs the action probability distribution of each operable switch; during the training process, discrete reconstructed actions are extracted from the action probability distribution through Monte Carlo sampling, and the parameters of the lower-level topology network are updated using the policy gradient algorithm.
[0066] Optionally, the structural design of the lower-level topology graph network follows the technical chain of "graph neural network extracting spatial features → policy network outputting action probabilities → policy gradient updating parameters", and is implemented as follows.
[0067] (1) Definition of graph structure The lower-level topology network uses the distribution network's buses or distribution transformers as nodes and lines and switches as edges to construct an undirected graph. ,in For a set of physical nodes, This is a set of branches. The initial feature vector of each physical node includes: node voltage magnitude (pu), node injected active power (MW), node injected reactive power (Mvar), current power of the load connected to the node (MW), current output of the distributed power source connected to the node (MW), current load rate of the distribution transformer (%), and a flag indicating whether the node can perform load transfer (0 / 1). The initial features of each edge include: branch type (line / switch, 0 / 1), current on / off state of the branch (0 / 1), rated current carrying capacity of the branch (A), and branch impedance parameter (R+jX).
[0068] (2) Feature extraction module The lower-level topological graph network first extracts spatial features from the node and edge features using a multi-layer graph convolutional network. This embodiment employs a three-layer graph attention convolutional layer (GAT layer), with output dimensions of 128, 128, and 64 for each layer, and ReLU activation function. The calculation process for each GAT layer is as follows: ; in Let i be the feature vector of node i in the l-th layer. The weight matrix is a learnable matrix. Let be the attention coefficient between node i and its neighbor node j, and N(i) be the set of neighbor nodes of node i. The ReLU activation function and the attention coefficient are... Calculated using both node features and edge features: ; in, For edge feature vectors, Let be the weight matrix for the edge features. This is a vector concatenation operation. The three-layer GAT layer outputs a high-dimensional representation vector for each physical node. .
[0069] (3) Output head design The lower-level topology network is configured with two output heads: First output header: Bearing capacity margin index prediction header. This output header contains the high-dimensional representation vector of each physical node. Given a single-layer fully connected network with 64-dimensional input and 1-dimensional output, and sigmoid activation, output the load margin index of the node in its current state. . This indicates that the node has no remaining carrying capacity. This indicates that the node is completely idle. This metric is determined by a combination of the node's voltage magnitude margin, line current carrying capacity margin, and transformer capacity margin under the current reconfigured topology. The metric is randomly initialized by the network during the initial training phase, and during training, the network is gradually guided to learn and output accurate margin estimates through penalty terms related to physical constraints in the reward signal.
[0070] Second output header: Distribution network reconfiguration action strategy header. This header contains the high-dimensional representation vector of each physical node. Graph representation is obtained after global average pooling. Then Input a policy network. This policy network contains two fully connected layers, one with 128 dimensions and the other with 128 dimensions. Dimension, among which Given the total number of operable switches, the output layer uses Softmax activation and outputs a probability distribution. , representing the probability that each operable switch will be selected to perform an action (closing or opening) under the current distribution network operating state s. In this embodiment, the action space of each switch is binary: 0 indicates maintaining the current state or opening, and 1 indicates closing. However, only a limited number of switch states are allowed to change in each decision step to avoid an explosion of action combinations.
[0071] (4) Policy gradient training framework The lower-level topology graph network is trained using a policy gradient method based on Markov decision process modeling, and its core elements are as follows: State space S: The current operating state of the distribution network, which includes all node features and edge features defined in step (1).
[0072] Action Space A: The set of all operable switches. Each action selects one switch and specifies its target state (closed / open).
[0073] Reward function R: The reward value fed back by the environment after each refactoring action is defined as follows: ; in, For the active power loss of the reconstructed network, ρ represents the safety threshold for bearing capacity margin, and ρ is the penalty coefficient for exceeding the bearing capacity limit. This flag indicates whether an action violates basic power constraints, and δ is a penalty constant for violating the constraints. This reward function guides the lower-level network to optimize in two directions simultaneously: reducing network losses and increasing the minimum carrying capacity margin of the entire network.
[0074] This embodiment uses the Proximal Policy Optimization (PPO) algorithm to update the parameters of the lower-layer network. PPO limits the magnitude of each update step by truncating the importance sampling ratio to avoid policy collapse. Its loss function is: ; in: The probability ratio between the old and new strategies; The value of the dominance function is estimated using the generalized dominance estimation (GAE), where γ = 0.99 and λ = 0.95; ϵ is the pruning hyperparameter, which is set to 0.2 in this embodiment.
[0075] The policy gradient method is only used to update the policy network parameters in the lower-level topological graph network, namely the second output head and its upstream graph convolutional feature extraction network; while the capacity margin index prediction head, namely the first output head, is used as an auxiliary task, and its output is also shared and updated with the feature extraction layer of the policy network during training.
[0076] In some specific embodiments, an upper-layer load graph network is constructed, with charging stations or charging pile clusters as nodes and the power transmission coupling strength between nodes as edges. The power transmission coupling strength is updated in real time according to the physical power flow sensitivity under the reconstructed topology output by the lower-layer topology graph network and is used as the edge feature input of the upper-layer load graph network. The output of this network includes the charging power allocation strategy. The upper-layer load graph network adopts a deterministic network architecture based on graph attention mechanism and updates parameters through backpropagation.
[0077] Optionally, the construction of the upper-level load graph network specifically includes: (1) Definition of graph structure The upper-level load graph network uses charging stations or charging pile clusters as nodes to construct an undirected graph. ,in For the set of charging load nodes, The power transmission coupling edges between nodes represent the electrical coupling relationship between two charging load nodes. The initial feature vector of each charging load node includes: the predicted charging demand (kW) of the charging station / cluster in the current time period, the current actual charging power (kW), the number of connected charging vehicles, the adjustable upper and lower limits of charging power (kW), and the physical node number of the distribution network to which the node is connected, used for cross-layer mapping. The initial feature of the edge is the power transmission coupling strength between nodes, and its specific value is updated in real time based on the physical power flow sensitivity under the reconstructed topology output by the lower-layer topology graph network (the update method is detailed in the subsequent cross-layer interaction section).
[0078] (2) Graph attention feature extraction The upper-layer load graph network uses a multi-head graph attention network (GAT) as the backbone for feature extraction, with 4 heads. The attention coefficient of the m-th attention head on node i and its neighbor node j is... The calculation method is as follows: ; in, The initial characteristics of load node i, For edge features, , , These are all learnable parameters of the m-th attention head. The outputs of the four attention heads are concatenated to obtain the updated features of each load node. Each head outputs 64 dimensions.
[0079] The aforementioned attention layer consists of two stacked layers: the first layer outputs 128 dimensions (4 heads × 32 dimensions); the second layer is a single-head attention layer, outputting 64 dimensions. In the calculation of the second layer's attention, the edge features in the formula... It must be synchronized with the physical flow sensitivity under the current reconstructed topology. That is, after the reconstructed topology changes, the edge features need to be recalculated and the input updated to the next round of attention calculation. The specific update timing is explained in the timing description of the cross-layer interaction section below.
[0080] (3) Charging power distribution output head The feature vectors of each load node output from the last layer of the upper load graph network. Given a single-layer fully connected network with 64-dimensional input and 1-dimensional output, after sigmoid activation and scaling to an adjustable power range, output the charging power allocation value for this charging station / cluster. ,in , The actual operating constraints of the charging station are determined, such as the lower and upper limits of the rated power of the charging piles. The upper-level load graph network is a standard feedforward neural network, and its parameters are updated through conventional backpropagation, combined with joint training in the subsequent step S3.
[0081] In some specific embodiments, a cross-layer physical feature interaction path is constructed to map the carrying capacity margin index of each physical node output by the lower-layer topology graph network to the node feature space of the upper-layer load graph network, generate carrying capacity bias modulation parameters, and use the modulation parameters to adjust the neighborhood attention weight of the upper-layer load graph network to constrain the charging power allocation decision to avoid nodes with insufficient carrying capacity and power supply paths.
[0082] Optionally, the process of constructing cross-layer physical feature interaction pathways includes: In step Sa1, the carrying capacity margin index of each physical node output by the lower-level topology graph network and the corresponding node voltage-power sensitivity parameters under the reconstructed topology are obtained. In step Sa2, based on the node voltage-power sensitivity parameters, the carrying capacity margin index of each physical node is mapped to each load node of the upper-level load graph network to generate the original value of the carrying capacity bias of the corresponding load node. In step Sa3, the original value of the carrying capacity bias is input into the feature modulation parameter generation network to output modulation parameters that are compatible with the attention layer of the upper-level load graph network. In step Sa4, the modulation parameters are applied to the attention calculation process of the upper-level load graph network to constrain the charging power allocation decision with the modulated attention score, so that the charging load allocation avoids nodes and power supply paths with insufficient carrying capacity.
[0083] In some specific embodiments, the present invention includes a timing convention for cross-layer interaction: throughout the entire scheme, the lower-layer topology graph network and the upper-layer load graph network cannot interact arbitrarily at any time. Specifically, the upper-layer load graph network only learns the new topology information after the lower-layer topology graph network outputs a new reconstruction action strategy and completes the distribution network topology update, and then re-obtains the updated physical power flow sensitivity and carrying capacity margin indices from the lower layer, thereby updating its edge features and modulation parameters. The two networks employ a gradient decoupling strategy during the training process in step S3, as detailed below.
[0084] In some specific embodiments, the lower-layer topology graph network and the upper-layer load graph network do not share gradients during training. Specifically: The parameters of the lower-level topology graph network are updated using the policy gradient method, and their gradient paths are completely independent, without involving any backpropagation. The parameters of the upper-level load graph network are updated using standard backpropagation, and their loss function comes from the scheduling objective defined in step S3. This gradient information does not flow into the lower-level topology graph network.
[0085] The two networks interact only through forward physical feature transmission: the lower-level topology graph network outputs the carrying capacity margin index and physical flow sensitivity under the current reconstructed topology as forward calculation results, and the upper-level load graph network uses this information as input features. However, the loss gradient of the upper-level network is not fed back to the lower-level network through these two pieces of information, thereby avoiding training instability caused by discrete actions and continuous actions sharing the same gradient path.
[0086] In step S3, the topology-load two-layer heterogeneous graph neural network model is jointly trained using the source-load scenario set to obtain the trained scheduling model.
[0087] In the joint training phase of step S3, the lower-layer topology graph network and the upper-layer load graph network are trained alternately. The specific training process is as follows: The loop iterates, with each round consisting of two phases: Phase 1: Training the lower-level topology graph network: The parameters of the upper-level load graph network are fixed. A batch of scenarios are sampled from the source-load scenario set. The lower-level topology graph network outputs a reconstruction action strategy π(a|s) based on the current state. Monte Carlo sampling is used to execute the reconstruction action, obtaining the reward signal calculated according to the aforementioned reward function. The PPO algorithm is then used to update the lower-level network parameters. In this embodiment, the lower-level network is continuously updated 4 times in each iteration while keeping the upper-level network parameters fixed.
[0088] Phase Two: Training the Upper-Layer Load Graph Network: The parameters of the lower-layer topology graph network are fixed. A batch of scenarios is sampled from the source-load scenario set. The reconstruction scheme output by the current lower-layer network is executed. Under this reconstructed topology, the edge features and modulation parameters of the upper-layer network are updated. The upper-layer network outputs a charging power allocation strategy, and the scheduling target loss is calculated. The scheduling target loss is the conventional regression loss from step S3, such as the mean square error between the charging power allocation and the ideal allocation curve, and the total charging cost. The upper-layer network parameters are updated through backpropagation, including the parameters of the feature modulation parameter generation network. In this embodiment, the upper-layer network is continuously updated once per iteration while keeping the lower-layer network parameters fixed.
[0089] The two phases described above are executed alternately until the respective loss functions of the two layers converge.
[0090] In some specific embodiments, after training is complete, the model constructed in step S2 enters the actual inference phase. The inference process is as follows: Step 1: Obtain real-time operating status data of the distribution network, and input the data into the lower-level topology network after data preprocessing.
[0091] Step 2: The lower-level topology network propagates forward, outputting the capacity margin index and reconstruction action strategy for each physical node. The reconstruction action strategy is a probability distribution. Monte Carlo sampling is no longer performed during the inference phase; instead, the action with the highest probability is directly adopted, or several high-probability candidate actions are selected through beam search.
[0092] Step 3: The carrying capacity margin index and physical power flow sensitivity under the reconstructed topology output by the lower-level topology graph network are passed to the upper-level load graph network. The upper-level load graph network updates the edge features, i.e., power transmission coupling strength, and modulation parameters based on the received physical features, and generates the network through the feature modulation parameters. Graph attention forward propagation is performed to output the charging power allocation values for each charging station / charging pile cluster.
[0093] Step 4: Summarize the reconstruction scheme of the lower layer output and the charging power allocation scheme of the upper layer output, and send them to the execution mechanism after physical feasibility verification in step S4.
[0094] Throughout the inference process, the parameters of the lower-level topology graph network and the upper-level load graph network remain fixed, without gradient updates. The two networks only interact through forward feature transfer, consistent with the training phase.
[0095] Based on the source-load scenario set generated in step S1 and the two-layer heterogeneous graph neural network model constructed in step S2, step S3 performs end-to-end joint training to obtain the trained scheduling model. The core of this joint training lies in the gradient decoupling strategy between the lower-layer topology graph network and the upper-layer load graph network; that is, their parameter update paths are independent and do not interfere with each other. Optionally, the joint training process in step S3 includes: (1) Training Samples and Data Loading Training samples are sampled in batches from the source-load scenario set generated in step S1. Each training sample contains distribution network operation data for a complete time segment, specifically including: load power and distributed renewable energy output of each physical node, current status of each operable switch, and predicted charging demand of each charging station or charging pile cluster. In this embodiment, the batch size is set to 64, meaning that 64 time segment samples are processed simultaneously in each iteration.
[0096] (2) Training of the lower-level topology graph network The training of the lower-level topology graph network employs a policy gradient method based on Markov decision process modeling, specifically using a near-end policy optimization algorithm. In each training iteration, all parameters of the upper-level load graph network are first fixed. For each sample in the current batch, the distribution network operating status data is input into the lower-level topology graph network. This network extracts spatial features through a graph attention convolutional layer and outputs the action probability distribution of each operable switch via a policy output head. Subsequently, a specific switch action combination is extracted from this probability distribution through Monte Carlo sampling and applied to the current distribution network topology to obtain a new reconstructed topology. The simulation environment calculates the reward value of this action, and the expression for its reward function R is: ; in, The active power loss of the reconstructed network is expressed in per-unit values. The bearing capacity margin index of physical node i The bearing capacity margin safety threshold is set to 0.15 in this embodiment. This is the penalty coefficient for exceeding the bearing capacity limit. The penalty constant for violating the constraint, This flag indicates whether an action violates basic power constraints. The reward function guides the lower-level network to optimize in two directions simultaneously: reducing network losses and increasing the overall network's minimum carrying capacity margin. After collecting multiple samples of the "state-action-reward" sequence, a pruned loss function of the near-end policy optimization algorithm is used to calculate the gradient. The Adam optimizer then updates the policy network parameters and shared graph convolutional feature extraction layer parameters in the lower-level topology graph network. During this process, the carrying capacity margin index prediction head serves as an auxiliary task, sharing the underlying feature extraction layer. Although its output does not directly participate in reward calculation, it is indirectly optimized through gradient updates of the shared representation layer.
[0097] (3) Training of the upper-level load graph network The upper-level load graph network is trained using the standard backpropagation algorithm. In each training iteration, all parameters of the lower-level topology network are first fixed. For each sample in the current batch, the distribution network operating status data is input into the lower-level topology network to obtain the current forward propagation output reconstruction scheme and the corresponding carrying capacity margin indices of each physical node. The distribution network topology is updated according to this reconstruction scheme, the node voltage-power sensitivity parameters are recalculated, and the edge characteristics, i.e., power transmission coupling strength, of the upper-level load graph network are updated accordingly.
[0098] Simultaneously, the carrying capacity margin index is converted into modulation parameters for each charging load node through sensitivity-weighted mapping and feature modulation parameter generation networks in the cross-layer physical feature interaction path. In the feature extraction process of the graph attention mechanism in the upper-layer load graph network, the modulation parameters are applied to the feature linear modulation stage of the attention score. The method for calculating the modulated attention score reflects the control of the carrying capacity constraint on the attention weight, and its expression is: ; in, The raw attention score is calculated from node features and edge features. and These are the scaling factor and translation factor, respectively, generated from the original value of the bearing capacity bias through the feature modulation parameters and output by the network. This represents element-wise multiplication. After Softmax normalization, the final attention weights are obtained. The modulation parameters corresponding to nodes with insufficient capacity enable these nodes to obtain lower attention weights in the neighborhood feature aggregation, thereby achieving proactive avoidance of nodes with insufficient capacity in charging power allocation. The upper-layer network then outputs the charging power allocation values for each charging station or charging pile cluster based on this.
[0099] Calculate the scheduling target loss based on this allocation value. It is defined as the weighted sum of the total charging cost, the penalty for unmet charging demand, and the network active power loss, and is expressed as: ; Where M is the batch size. Let be the electricity cost coefficient for charging node i. For the allocated charging power, For charging needs, Let μ be the network active power loss under the current reconstructed topology, ν be the penalty coefficient for unmet demand, and ν be the network loss weight coefficient. The gradient of this loss relative to all parameters of the upper-layer load graph network and the characteristic modulation parameters is calculated using the chain rule, and then updated via backpropagation using the Adam optimizer.
[0100] (4) Alternating training strategy The lower-level topology graph network and the upper-level load graph network are updated alternately according to a set ratio. In each complete iteration, the lower-level topology graph network is updated four times consecutively while keeping the parameters of the upper-level network fixed, and then the upper-level load graph network is updated once consecutively while keeping the parameters of the lower-level network fixed. This alternation continues until the loss functions of both networks converge to a preset tolerance range. The joint model obtained after convergence is the trained scheduling model.
[0101] (5) Ensuring physical consistency during training Throughout the joint training process, the physical feasibility verification module participates in the training as a simulated environment. Whenever the lower-level topology network outputs a reconstruction action, the verification module immediately determines whether the action will lead to a non-radial topology or islanded operation. If it is determined to be a violation, the violation flag in the reward function is set to 1, giving the action a large negative reward value, thereby guiding the policy network to gradually avoid such invalid actions during training. This mechanism ensures that the lower-level network learns to output physically feasible reconstruction schemes during the training phase, rather than relying entirely on post-training verification.
[0102] In step S4, real-time operating status and charging demand prediction data of the distribution network are obtained, input into the trained scheduling model, and a distribution network reconfiguration scheme and charging power allocation scheme corresponding to the current operating status are generated and then executed after physical feasibility verification.
[0103] After joint training is completed in step S3, the resulting scheduling model is deployed in the distribution network dispatch center for online decision-making in a real-time operating environment.
[0104] In some specific embodiments, step S4 includes generating a forward-looking scheme across multiple time sections and performing time-optimized splicing and execution, specifically including: The system acquires ultra-short-term load and charging demand forecasts for multiple time segments in the future, inputs them into the trained scheduling model, and obtains multiple candidate distribution network reconfiguration schemes and charging power allocation schemes for each time segment. The system then uses a dynamic programming algorithm to splice the time sequence, with the penalty term for the number of switching actions and the minimum action interval constraint as constraints, selects the optimal action sequence, and issues the action scheme corresponding to the current time segment for execution after physical feasibility verification.
[0105] In some specific implementations, the physical feasibility verification in step S4 adopts a dual verification mechanism that combines front-end rule filtering and back-end global verification; wherein, front-end rule filtering is used to shield obviously non-compliant switch combinations in a local area, and back-end global verification is used to verify the radial operation requirements and connectivity requirements of the global topology.
[0106] The physical feasibility verification adopts a dual verification mechanism that combines front-end rule filtering with back-end global verification; Among them, the front-end rule filtering is used to block obviously non-compliant switch combinations, and the back-end global verification is used to verify the radial operation requirements and connectivity requirements of the global topology.
[0107] The front-end rule filtering is responsible for quickly screening candidate solutions for obvious local violations of switch combinations. The specific verification rules include three items: first, checking if two power nodes are directly connected; second, checking if a switch action causes the load rate of a line to exceed the emergency limit; and third, checking if a bus loses all power supply after a switch action. If a candidate solution triggers any of the above front-end rules, the solution is immediately marked as invalid, triggering a fallback mechanism. This involves removing the invalid solution from the optimal sequence of dynamic programming and selecting a suboptimal solution for resubmission until a solution passes the front-end rule filtering.
[0108] Schemes filtered by front-end rules then undergo global verification by the back-end. This global verification invokes a deterministic distribution network topology analysis program independent of neural networks. This program uses graph theory algorithms to rigorously verify the entire network topology under the candidate reconfiguration scheme. The verification includes two parts: first, a radial operation requirement, verifying that there are no ring structures in the entire network topology, mathematically equivalent to verifying that the number of edges in the topology graph equals the number of nodes minus the number of connected components; second, a connectivity requirement, verifying that all load nodes in the entire network maintain electrical connectivity with at least one power source node, mathematically equivalent to verifying that there exists a reachable path from any load node to any power source node in the topology graph. Once both verifications pass, the candidate scheme is deemed physically feasible.
[0109] Once verified, the distribution network reconfiguration plan and charging power allocation plan are distributed from the dispatch center to the field execution units. The distribution network reconfiguration plan is sent to the smart terminals of each operable switch, and the charging power allocation plan is sent to the local controllers of each charging station or charging pile cluster. Both are executed simultaneously according to predetermined time synchronization instructions to complete the dispatching task for the current time period. After execution, the dispatching system waits for the start of the next dispatching cycle, re-executes to obtain new forecast data, and generates the next round of dispatching plan.
[0110] According to such Figure 1 The implementation scheme shown here achieves end-to-end collaborative decision-making for distribution network reconfiguration and charging allocation by constructing a topology-load dual-layer heterogeneous graph neural network model. The lower-layer topology graph network is responsible for sensing the grid carrying capacity and outputting the reconfiguration strategy, while the upper-layer load graph network allocates charging power based on attention weights modulated by physical features. The two adopt a gradient decoupling strategy to update parameters separately, thereby avoiding mutual interference between discrete and continuous actions. At the same time, the cross-layer physical feature interaction path embeds the carrying capacity constraint into the upper-layer attention calculation process through feature linear modulation, enabling charging allocation to actively avoid nodes and power supply paths with insufficient carrying capacity during the decision-making stage. On this basis, an improved generative adversarial network with physical regularization loss and scene boundary coverage loss is used to produce a source-load scene set covering both normal and extreme operating conditions. During online operation, the model continuously evolves through high deviation period identification and incremental fine-tuning mechanisms. Ultimately, under the premise of ensuring the safe operation of the distribution network, the scheme achieves economical and efficient absorption of charging load in different regions and has the ability to adapt to changes in grid state and charging behavior drift.
[0111] Figure 2 This is a flowchart illustrating the sub-step S2a of constructing the cross-layer physical feature interaction path in step S2 of Example 1000. For example... Figure 2 Sub-step S2a further includes steps Sa1-Sa4.
[0112] In step Sa1, the carrying capacity margin index of each physical node output by the lower-level topology graph network and the corresponding node voltage-power sensitivity parameters under the reconstructed topology are obtained.
[0113] After the lower-level topology network completes one forward propagation, the carrying capacity margin index of each physical node is obtained from the first output head. Simultaneously, based on the reconstructed topology output by the lower-layer network, the node voltage-power sensitivity parameters are calculated. In this embodiment, the sensitivity coefficient of node voltage amplitude to the injected active power is specifically used. ,in Let i be the voltage amplitude of physical node i. The active power injected into physical node j. This sensitivity matrix is obtained by the corresponding elements in the inverse of the Jacobian matrix under the current reconstructed topology. During the forward propagation of the differentiable power flow computation unit, the Jacobian matrix can be recorded and extracted as an intermediate calculation result.
[0114] In step Sa2, based on the node voltage-power sensitivity parameters, the load capacity margin index of each physical node is mapped to each load node in the upper load diagram network, generating the original load capacity bias value of the corresponding load node.
[0115] In some specific embodiments, in step Sa2, each charging station / charging pile cluster node In the distribution network, there is a unique physical node for connection, denoted as . The carrying capacity margin of physical node map(q) This directly reflects the remaining load capacity that the access point can continue to carry. However, charging loads are not completely isolated between access points, and power changes at charging node q will affect the voltage and power distribution of multiple physical nodes near its access point through power flow propagation.
[0116] Therefore, for each charging load node q, the carrying capacity margin index of its connected physical node map(q) and several nearby physical nodes is aggregated using electrical distance as the weight: ; Optionally, in this embodiment, a neighborhood with a distance less than 3 is selected. Wherein, This is the set of physical nodes whose electrical distance from physical node map(q) is less than a third-order neighborhood. To achieve weighted normalization, the voltage-power sensitivity coefficient between node i and access point map(1) is used. The normalized value is the weight: ; This is the original value of the load-bearing capacity offset corresponding to the charging load node q, which ranges from [0,1]. The lower the value, the more strained the load-bearing capacity of the grid structure at the location of the charging node.
[0117] In step Sa3, the original value of the load-bearing capacity bias is input into the feature modulation parameter generation network, and the output is a modulation parameter that is compatible with the attention layer of the upper load graph network.
[0118] Optionally, in step Sa3, to effectively integrate physical bearing capacity information into the upper-level attention calculation, this embodiment introduces a feature modulation parameter generation network to convert the original bearing capacity bias value into modulation parameters adapted to the upper-level attention mechanism. The feature modulation parameter generation network is a three-layer fully connected network: input layer (1-dimensional, i.e. The hidden layer is 32-dimensional with ReLU activation, and the output layer is 64-dimensional, the same dimension as the query-key inner product of the upper attention layer. This output layer has no activation function and directly outputs the modulation vector. The parameters of this network are updated synchronously with the parameters of the upper-level load graph network during the joint training process in step S3.
[0119] Optionally, this embodiment also synchronously outputs translation modulation parameters. Another three-layer fully connected network with the same structure but independent input The output is 64-dimensional and is used to perform scaling and translation modulation simultaneously during attention computation.
[0120] In step Sa4, the modulation parameters are applied to the attention calculation process of the upper load graph network. The modulated attention score is used to constrain the charging power allocation decision, so that the charging load allocation avoids nodes and power supply paths with insufficient carrying capacity.
[0121] The original query-key inner product of the single-head attention layer in the second layer of the upper load graph network, i.e., the attention score before Softmax normalization. The calculation formula is: ; in, , The node features are the output of the first layer of attention. After introducing load-bearing capacity modulation, the above equation is modified to: ; That is, adjusting the scaling factor in the parameters. Translation factor Feature-wise Linear Modulation (FiLM) is applied to the attention score of node i in all attention calculations. Because... , All are based on the original value of bearing capacity offset. Obtained through the feature modulation parameter generation network, when the access area of node i has limited carrying capacity, i.e. At lower levels, the feature modulation parameters generate the network output. , The attention score will be modulated accordingly to obtain a lower attention weight in the neighborhood feature aggregation, thereby achieving the physical constraint effect of "prioritizing the ignoring of the charging needs of nodes with insufficient carrying capacity".
[0122] According to such Figure 2The implementation method shown in this invention realizes deep coupling between the physical state of the lower-level power grid and the charging decision of the upper-level grid through the cross-layer physical feature interaction path. This allows the load-bearing capacity constraint to no longer be involved as a post-verification step, but to participate in each round of forward propagation as an endogenous modulation signal in attention calculation. This mathematically encodes the physical bottleneck information directly into the allocation weight of charging power.
[0123] Specifically, this pathway transmits the carrying capacity margin of physical nodes to load nodes through sensitivity-weighted mapping, enabling the upper-layer network to not only perceive the state of the charging station itself but also understand the vulnerability of its connection location within the entire distribution network. Based on this, the feature modulation parameter generation network transforms the original carrying capacity bias value into a scaling and translation factor that matches the attention mechanism, avoiding the numerical overload problem caused by the direct superposition of physical quantities. With this mechanism, the upper-layer load graph network can proactively reduce the neighborhood attention weights of nodes with insufficient carrying capacity and their adjacent power supply paths corresponding to charging nodes during the attention feature aggregation stage. This achieves pre-guidance of charging load from heavily loaded areas to lightly loaded areas, proactively avoiding carrying capacity bottlenecks before charging demand is even met.
[0124] Figure 3 This is a flowchart illustrating step S4 in Example 1000. Figure 3 As shown, step S4 includes steps S41 and S42.
[0125] In step S41, ultra-short-term load and charging demand forecast data for multiple future time segments are obtained, and input into the trained scheduling model to obtain multiple candidate distribution network reconfiguration schemes and charging power allocation schemes for each time segment.
[0126] During the real-time operation of the distribution network, the dispatch center first acquires the current distribution network operating status data, and simultaneously acquires ultra-short-term load forecast data and electric vehicle charging demand forecast data for multiple future time segments. In this embodiment, the time window for ultra-short-term forecasting is one hour in the future, and the time segment interval is fifteen minutes, resulting in a total of four time segments. The aforementioned forecast data can be obtained using existing time series forecasting methods, such as load forecasting models based on long short-term memory networks.
[0127] The current distribution network operation status data and the load and charging demand forecast data for the next four time segments are input into the trained scheduling model. The scheduling model performs a forward propagation independently for each time segment. The reasoning process for each segment includes: the lower-level topology graph network outputs candidate distribution network reconfiguration schemes and the carrying capacity margin indices of each physical node for that segment; the upper-level load graph network outputs candidate charging power allocation schemes for that segment based on the received physical characteristics. Thus, for the next four time segments, the scheduling model outputs four sets of candidate schemes, each set containing one distribution network reconfiguration scheme and one charging power allocation scheme.
[0128] To provide sufficient optimization space in subsequent steps, this embodiment employs a bundle search strategy to generate multiple candidate schemes for each time segment, rather than outputting only a single optimal scheme. Specifically, after the policy output head of the lower-level topology graph network outputs the action probability distribution of each operable switch during the inference phase, it selects the top K action combinations with the highest probabilities as candidate reconstruction schemes for that segment. In this embodiment, K is set to three, meaning three sets of candidate schemes are generated for each time segment.
[0129] In step S42, the timing sequence is spliced using a dynamic programming algorithm. The optimal action sequence is selected based on the penalty term for the number of switching actions and the minimum action interval constraint. After physical feasibility verification, the action plan corresponding to the current time period is issued for execution.
[0130] After obtaining three candidate schemes for each of the four future time segments, step S42 performs time sequence splicing to determine the specific action scheme to be issued at the current time. The core task of time sequence splicing is to select an action sequence from all possible candidate scheme sequences that satisfies the physical constraints of the switching action and has the lowest overall cost. This embodiment uses a dynamic programming algorithm to solve this optimization problem.
[0131] In dynamic programming, the state is defined as the minimum cumulative cost when recursively moving from the initial time segment to the current time segment and selecting a candidate solution. The accumulated cost during state transition consists of two parts: the first part is the immediate scheduling cost after selecting a candidate solution at the current time segment, which is obtained by weighted summation of network active power loss and total charging cost under that solution; the second part is the penalty cost for the number of actions incurred due to switch state switching between adjacent time segments, with one penalty for each switch action. In addition, a minimum action interval constraint is enforced during state transition, meaning that if a switch is activated between two adjacent time segments, it cannot be activated again within at least two time segments after that action. This constraint is implemented by checking whether the action time interval of the same switch in the candidate solution sequence meets the requirement during dynamic programming transition.
[0132] Dynamic programming recursively calculates from the current cross-section to the fourth future cross-section, ultimately obtaining the globally optimal cumulative cost. Backtracking is then used to obtain a sequence of optimal candidate solutions from the current cross-section to the fourth future cross-section. This sequence includes the first candidate solution corresponding to the current time period, i.e., the reconfiguration solution and charging power allocation solution that should be executed at the current moment. This solution is then sent to the physical feasibility verification module for final confirmation.
[0133] According to such Figure 1 and Figure 3 In the implementation method shown, the technical effects of step S4 are mainly reflected in two aspects: timing optimization and security verification. In terms of timing optimization, step S4 achieves forward-looking scheduling decisions by inputting ultra-short-term forecast data from multiple future time segments into the scheduling model in parallel, avoiding frequent adjustments caused by short-sighted decisions. Based on this, a dynamic programming algorithm is used to perform globally optimal timing stitching of multi-segment candidate schemes. By embedding penalties for the number of switching actions and minimum action interval constraints into the optimization objective, unnecessary switching operations are effectively reduced, equipment lifespan is extended, and maintenance costs are lowered. The dual verification mechanism constructed in step S4 quickly eliminates obviously illegal switch combinations through front-end rule filtering with extremely low computational cost, and then rigorously verifies the radial structure and connectivity through back-end global verification based on graph theory algorithms, effectively balancing real-time performance and security. Furthermore, the verification logic is completely consistent with the physical consistency guarantee mechanism embedded in the training phase, eliminating the physical cognitive bias between training and deployment, and further improving the scheduling reliability of the model in actual operation.
[0134] Figure 4 This is a flowchart illustrating an embodiment 2000 of the electric vehicle charging load collaborative scheduling method considering grid carrying capacity according to the present invention. Figure 4 As shown, Embodiment 2000 includes steps S201-S206. Specifically, steps S201-S204 and... Figure 1 Steps S1-S4 in Example 1000 are the same and will not be repeated here.
[0135] In step S205, the actual running data after the scheduling is executed is collected in real time, and high uncertainty periods with running deviations exceeding a preset threshold are identified and stored as difficult samples.
[0136] During the online scheduling execution in step S204, the actual operating state of the distribution network may deviate from the model predictions due to various factors, including: ultra-short-term load forecasting errors, the randomness of electric vehicle charging behavior, the volatility of distributed renewable energy output, and communication delays or abnormal data acquisition. To capture these periods of high uncertainty that lead to a decline in the quality of model decisions, step S205 designs a difficult sample identification and storage mechanism based on a deviation threshold.
[0137] After each dispatch command is issued and executed, the data acquisition system records the actual operating data for that period. This actual operating data includes: measured voltage amplitudes of each physical node, measured active and reactive power of each line, actual charging power output of each charging station or charging pile cluster, and actual output of each distributed renewable energy power station. Simultaneously, the dispatch system saves the model input data for that period, namely the ultra-short-term load forecast, charging demand forecast, and renewable energy output forecast used at the time of dispatch, as well as the distribution network reconfiguration scheme and charging power allocation scheme output by the model at that time.
[0138] After data acquisition, the deviation calculation module calculates the predicted deviation for each physical node and each line. For node voltage, the deviation is defined as the absolute deviation of the predicted node voltage value relative to the measured value, expressed in per-unit values. For node load and renewable energy output, the deviation is defined as the relative deviation of the predicted value relative to the measured value, expressed as a percentage. For charging power allocation, the deviation is defined as the relative deviation of the actual charging power executed after the allocation command is issued relative to the command value. After the deviation calculation is completed, the system compares the voltage deviation of each physical node, the power deviation of each line, and the power deviation of each charging node with their respective preset deviation thresholds.
[0139] Optionally, the specific settings for the deviation thresholds in this embodiment are as follows: the alarm threshold for node voltage deviation is 5%, meaning that when the absolute value of the difference between the measured and predicted voltage values of any physical node exceeds 5% of the node's rated voltage, that period is marked as having high uncertainty; the alarm threshold for line power deviation is 10%, meaning that when the absolute value of the difference between the measured and predicted power values of any line exceeds 10% of the line's rated capacity, a flag is triggered; the alarm threshold for charging power deviation is 15%, meaning that when the absolute value of the difference between the actual charging power of any charging station and the dispatch command value exceeds 15% of the station's rated charging power, a flag is triggered. These thresholds can be adjusted online according to the actual operating characteristics of the distribution network and the requirements for dispatch accuracy. For example, for feeder sections with poor voltage stability, the voltage deviation threshold can be appropriately tightened to 3%.
[0140] If the deviation of any physical node, any line, or any charging node exceeds the corresponding alarm threshold within the current time period, then that time period is identified as a high-uncertainty period. The mathematical expression of the identification logic is: for the current time period t, if there exists a node i that satisfies... Or there exists a line (i,j) that satisfies Or there exists a charging node q that satisfies If so, that time period is marked.
[0141] Once a time period is marked as a high-uncertainty period, the difficult sample generation module packages the complete data corresponding to that period into a difficult sample and stores it in the difficult sample cache. Each difficult sample contains the following fields: the operating condition label for that time period, specifically including season type, weather type, and date type; the prediction data input to the model for that time period, namely the node load prediction value, the renewable energy output prediction value, and the charging demand prediction value; the scheduling scheme output by the model for that time period, namely the reconfiguration action scheme and the charging power allocation scheme; the actual operational feedback data collected for that time period, namely the measured values of voltage, power, and charging power; and the various deviations that occurred during the actual operation of that time period, namely, detailed records of the voltage deviation of each node, the power deviation of each line, and the power deviation of each charging node. The storage format of each difficult sample is consistent with the sample format of the source-load scenario set in step S201, so that it can be seamlessly integrated into the joint training framework of step S203 during subsequent incremental fine-tuning.
[0142] If multiple consecutive time segments are marked as high uncertainty periods, the system stores the data from these consecutive segments as independent difficult samples, rather than merging them into a single long sequence sample, in order to support batch training in the incremental fine-tuning step S206. In this embodiment, the scheduling cycle is once every 15 minutes, meaning that a total of 96 time segments of running data are collected each day.
[0143] In step S206, the accumulated difficult samples are periodically used to incrementally fine-tune the generative adversarial network and the topology-load two-layer heterogeneous graph neural network model.
[0144] When the number of accumulated samples in the hard sample cache reaches a preset batch threshold, step S206 triggers the incremental fine-tuning process. In this embodiment, the batch threshold is 128 samples, meaning that incremental fine-tuning is initiated once the cache is full of 128 hard samples. If the accumulation rate of hard samples is slow, to prevent the operating mode reflected by earlier hard samples in the cache from becoming outdated, the system also sets a maximum cache time threshold. In this embodiment, the maximum cache time threshold is set to 7 days, meaning that incremental fine-tuning is initiated every 7 days, regardless of whether the cache is full.
[0145] After the incremental fine-tuning process is initiated, the system reads all hard samples from the hard sample cache and uses them as the incremental training dataset. It should be noted that the incremental fine-tuning targets two models: the first is the generative adversarial network constructed and trained in step S201, and the second is the topology-load two-layer heterogeneous graph neural network model constructed and trained in steps S202 and S203. Both models employ different incremental update strategies.
[0146] The purpose of incremental fine-tuning of the generative adversarial network (GAN) is to enable the generator to adjust the scene distribution of its output based on the latest operational data, making the newly generated scenes more closely resemble the actual operating characteristics of the current power grid. During fine-tuning, difficult samples are used as new real samples and input into the discriminator, which recalculates the adversarial loss based on these difficult samples. Simultaneously, the generator generates new scenes under the guidance of new operating condition labels, calls the differentiable power flow calculation unit to calculate the physical regularization loss, and calls the scene diversity evaluation unit to calculate the scene boundary coverage loss. The total loss composition of the generator remains consistent with the expression in step S201. The discriminator and generator undergo several rounds of fine-tuning training using the same alternating training method as in step S201. Since the number of difficult samples is much smaller than the complete scene set during initial training, in this embodiment, the number of rounds of incremental fine-tuning is set to 1 / 10 of the number of rounds of initial training, i.e., only a small number of rounds are required.
[0147] The incremental fine-tuning of the topology-load two-layer heterogeneous graph neural network model aims to enable the scheduling model to quickly adapt to the high-uncertainty operating conditions corresponding to difficult samples while maintaining its existing decision-making capabilities. During fine-tuning, the predicted data from the difficult samples is used as the model input, and the actual operating feedback data from the difficult samples is used as the supervision signal to calculate the deviation loss between the model output and the actual feedback. The fine-tuning of the lower-layer topology graph network follows the policy gradient method, but the initial policy parameters are no longer randomly initialized, but are instead the parameters of the currently used online model. The reward value in the reward function is calculated based on the actual feedback data from the difficult samples. The fine-tuning of the upper-layer load graph network follows standard backpropagation, and its loss function form is consistent with the scheduling target loss in step S203. However, in the loss calculation, the actual charging power is based on the actual execution value recorded in the difficult samples rather than the predicted demand.
[0148] To avoid overfitting the model to a small number of difficult samples during incremental fine-tuning, which could lead to performance degradation under normal operating conditions, this embodiment adds a regularization term to the loss function of incremental fine-tuning. This regularization term constrains the model parameters after fine-tuning. Compared with the model parameters before fine-tuning The difference between them results in a significant shift in the penalty parameter. The mathematical form of the regularization term is: ,in, This is the regularization coefficient, and in this embodiment it is set to 0.01. The essential function of this regularization term is to prevent the model from forgetting its already mastered decision-making ability for conventional operating conditions when learning new operating conditions.
[0149] The learning rate during incremental fine-tuning is set to 1 / 10 of the initial training rate. For example, if the learning rate of the upper-layer load graph network during initial training in step S203 is 0.0001, then the learning rate during incremental fine-tuning is 0.00001; if the learning rate of the generative adversarial network during initial training in step S201 is 0.0001, then the corresponding learning rate during incremental fine-tuning is 0.00001. A lower learning rate ensures that the model takes smaller steps during updates, thus preserving as many effective features in the original parameter space as possible while absorbing new knowledge. The optimizer used for incremental fine-tuning remains the Adam optimizer, with its momentum parameter kept consistent with that during initial training.
[0150] After incremental fine-tuning is complete, the system replaces the currently used model parameters with the newly obtained model parameters, achieving online model updates. Once the update is complete, the hard sample cache is cleared, and the accumulation of hard samples for the next cycle begins again. If new hard samples quickly accumulate in the cache after fine-tuning, it indicates that the power grid's operating characteristics are changing rapidly, and the system will correspondingly shorten the trigger interval for the next fine-tuning.
[0151] According to the implementation method shown in the figure, steps S205 and S206 together constitute the online learning closed loop of this scheme. By continuously identifying high deviation periods in actual operation and incrementally updating the model parameters accordingly, the scheduling model can maintain its adaptive ability to changes in the operating state of the distribution network and the drift of charging behavior patterns after deployment, making the model's full life cycle performance superior to the traditional static model scheme that is trained once and used permanently.
[0152] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0153] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for coordinated scheduling of electric vehicle charging loads considering grid carrying capacity, characterized in that, Includes the following steps: S1, Obtain the source-load scenario set, which includes time-series data of power distribution network operation conditions, electric vehicle charging load and distributed new energy output; S2, Construct a topology-load two-layer heterogeneous graph neural network model, including: Construct a lower-level topology network with the busbars or distribution transformers of the distribution network as nodes and lines and switches as edges. The output of this network includes the carrying capacity margin index of each physical node and the distribution network reconfiguration action strategy. Construct an upper-level load graph network with charging stations or charging pile clusters as nodes and power transmission coupling strength between nodes as edges. The power transmission coupling strength is updated in real time according to the physical power flow sensitivity under the reconstructed topology output by the lower-level topology graph network and is used as the edge feature input of the upper-level load graph network. The output of this network includes a charging power allocation strategy. A cross-layer physical feature interaction path is constructed, and the carrying capacity margin index of each physical node output by the lower-layer topology graph network is mapped to the node feature space of the upper-layer load graph network to generate carrying capacity bias modulation parameters. The neighborhood attention weight of the upper-layer load graph network is adjusted using the modulation parameters to constrain the charging power allocation decision to avoid nodes and power supply paths with insufficient carrying capacity. In this context, the lower-layer topology graph network and the upper-layer load graph network adopt a gradient decoupling strategy during training: the discrete reconstruction action of the lower-layer topology graph network updates parameters through the policy gradient method, and the continuous power allocation of the upper-layer load graph network updates parameters through backpropagation. The two networks only interact with each other through forward physical feature transfer. S3, use the source-load scene set to jointly train the topology-load two-layer heterogeneous graph neural network model to obtain the trained scheduling model; S4: Obtain real-time operating status and charging demand forecast data of the distribution network, input the trained scheduling model, generate a distribution network reconfiguration scheme and a charging power allocation scheme corresponding to the current operating status, and issue them for execution after physical feasibility verification.
2. The method according to claim 1, characterized in that, In step S1, the source payload scene set is generated using an improved generative adversarial network, and the generation process is as follows: A generative adversarial network is constructed, comprising a generator, a discriminator, a differentiable power flow calculation unit, and a scene diversity evaluation unit; the generator receives noise and operating condition labels and outputs source load time sequence scenes. The total loss function of the generator is obtained by weighted summation of adversarial loss, physical regularization loss, and scene boundary coverage loss, satisfying the following: ; in, The adversarial loss, output by the discriminator, is used to measure the statistical distribution difference between the source payload temporal scene and the real scene. The physical regularization loss is used to measure the degree of power flow exceeding the limit in the source load time-series scenario; The scene boundary coverage loss is used to measure the uniformity of the distribution of the source load temporal scene set in the load-output feature space, driving the source load temporal scene to cover the feasible domain boundary and avoiding mode collapse. , , These are the corresponding weighting coefficients; The generator is trained with the total loss function as the optimization objective, and the output is the source load scenario set covering both normal and extreme operating conditions.
3. The method according to claim 2, characterized in that, The physical canonical loss is calculated by the differentiable power flow calculation unit: The differentiable power flow calculation unit uses a differentiable AC power flow solver to load the source load time sequence scenario output by the generator as the node injected power into the distribution network reference topology, and solves for the voltage amplitude of each node and the power distribution of each line. The weighted sum of the over-limit of each node voltage amplitude relative to its operating upper and lower limits and the over-limit of each line power relative to its rated capacity is used as the physical regularization loss value. The solution process of the differentiable AC power flow solver maintains the differentiability of the computation graph throughout, allowing the physical regularization loss value to directly participate in the gradient backpropagation of the generator.
4. The method according to claim 2, characterized in that, The scene boundary coverage loss is calculated in the following way: Map all the source load time series scenarios output by the generator to a feature space with the total node load and the total output of new energy as coordinate axes, and calculate the convex hull volume or the determinant value of the feature covariance matrix of all generated scenario point sets in the feature space. The scene boundary coverage loss is generated with the optimization direction of maximizing the convex hull volume or maximizing the determinant of the feature covariance matrix. This loss is used to drive the source load temporal scene to spread uniformly in the feasible region and approach the safe boundary. At the same time, the scene that exceeds the limit is filtered out by physical regularization loss.
5. The method according to claim 1, characterized in that, In step S2, the construction process of the cross-layer physical feature interaction path includes: Sa1, obtain the carrying capacity margin index of each physical node output by the lower-level topology network and the corresponding node voltage-power sensitivity parameters under the reconstructed topology; Sa2, based on the node voltage-power sensitivity parameters, maps the bearing capacity margin index of each physical node to each load node in the upper load graph network, generating the original bearing capacity bias value of the corresponding load node; Sa3, inputs the original value of the bearing capacity bias into the feature modulation parameter generation network, and outputs modulation parameters that are adapted to the attention layer of the upper load graph network; Sa4 applies the modulation parameters to the attention calculation process of the upper load graph network, and uses the modulated attention score to constrain the charging power allocation decision, so that the charging load allocation avoids nodes and power supply paths with insufficient carrying capacity.
6. The method according to claim 5, characterized in that, In step Sa1, the carrying capacity margin index is determined by comprehensively considering the voltage magnitude margin, line current carrying capacity margin, and transformer capacity margin of the corresponding physical node under the current reconfigured topology.
7. The method according to claim 1, characterized in that, Step S4 specifically includes: Obtain ultra-short-term load and charging demand forecast data for multiple future time segments, input them into the trained scheduling model, and obtain multiple candidate distribution network reconfiguration schemes and charging power allocation schemes for each time segment. The timing sequence is spliced using a dynamic programming algorithm, with the penalty term for the number of switching actions and the minimum action interval constraint as constraints. The optimal action sequence is selected, and after the physical feasibility is verified, the action plan corresponding to the current time period is issued for execution.
8. The method according to claim 1, characterized in that, The physical feasibility verification adopts a dual verification mechanism that combines front-end rule filtering and back-end global verification. The front-end rule filtering is used to block obviously non-compliant switch combinations, and the back-end global verification is used to verify the radial operation requirements and connectivity requirements of the global topology.
9. The method according to claim 2, characterized in that, It also includes the model periodic fine-tuning step: Real-time collection of actual operational data after scheduling execution; identification of high uncertainty periods where operational deviations exceed preset thresholds; and storage of these periods as difficult samples. The accumulated difficult samples are periodically used to incrementally fine-tune the generative adversarial network and the topology-load two-layer heterogeneous graph neural network model.
10. The method according to claim 1, characterized in that, The lower-level topology graph network adopts a policy network architecture based on Markov decision process modeling: The lower-level topology network takes the real-time operating status of the distribution network as input and outputs the probability distribution of the operation of each operable switch. During training, discrete reconstructed actions are extracted from the action probability distribution through Monte Carlo sampling, and the parameters of the lower-level topology graph network are updated using the policy gradient algorithm. The upper-layer load graph network adopts a deterministic network architecture based on graph attention mechanism and updates parameters through backpropagation.