A power distribution network state estimation method considering user behavior and spatio-temporal randomness under high proportion of EV access

By introducing user behavior profiling and deep learning methods, combined with multi-head attention mechanism and Transformer encoder, the spatiotemporal randomness problem of distribution network state estimation under high proportion of EV access is solved, realizing accurate perception and robustness improvement of distribution network state.

CN121503296BActive Publication Date: 2026-04-14SHANXI ELECTRIC POWER CO POWER COMM CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANXI ELECTRIC POWER CO POWER COMM CENT
Filing Date
2026-01-12
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing power distribution network state estimation methods struggle to effectively model the spatiotemporal randomness of EV charging when a high proportion of electric vehicles are connected, leading to decreased state estimation accuracy. Furthermore, they lack the ability to fuse multi-source heterogeneous data, making it impossible to accurately perceive the operating status of the power distribution network.

Method used

By introducing user behavior profiles, employing a multi-head attention mechanism and a Transformer encoder, and combining multi-scale fluctuation perception and gating fusion units, EV load data and power grid operation data are deeply integrated to accurately model the spatiotemporal distribution and evolution of EV loads, thereby improving the accuracy and robustness of state estimation.

Benefits of technology

It achieves improved accuracy in distribution network state estimation without increasing the number of measuring devices, can accurately capture the spatiotemporal characteristics of EV loads, enhances the physical interpretability and robustness of the model, and is suitable for real-time monitoring and optimized scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503296B_ABST
    Figure CN121503296B_ABST
Patent Text Reader

Abstract

The application belongs to the field of smart grid and artificial intelligence, and specifically relates to a power distribution network state estimation method considering user behavior and space-time randomness under high proportion EV access. It includes user clustering and category definition, data modeling and graph structure construction, physical information space feature extraction, multi-scale fluctuation perception-based time series feature modeling, multi-source data fusion, and state estimation output. The application successfully solves the challenges faced by power distribution network state estimation under high proportion of electric vehicle access, providing a solution with high precision, strong robustness and good scalability. This method is not only suitable for state estimation tasks, but also provides a solid technical foundation for real-time monitoring, optimal scheduling and electric vehicle charging management of future power distribution networks, and has important theoretical value and engineering application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary field of smart grid and artificial intelligence, and specifically relates to a distribution network state estimation method, especially a distribution network state estimation method that considers user behavior and spatiotemporal randomness under high proportion of EV access. Background Technology

[0002] The distribution network is a crucial component of the power system, and its operational status directly impacts power supply reliability and power quality. With the widespread adoption of EVs (electric vehicles), their charging load has become a significant source of disturbance in the distribution network. EV charging behavior not only exhibits high spatiotemporal randomness but also stems from deeper differences in user travel habits, social attributes, and other behavioral patterns. Existing distribution network state estimation methods primarily include traditional methods based on Weighted Least Squares (WLS) and Kalman filtering. However, these methods suffer from the following shortcomings: high dependence on measurement points; when the number of observation points is insufficient or data is missing, the estimation accuracy decreases significantly (the MAE of the current amplitude increases to 9.2A when 10% of the observation point data is missing in the traditional WLS method); failure to effectively model the complex topology and temporal dynamic characteristics of the distribution network; and lack of ability to fuse multi-source heterogeneous data. Currently, deep learning offers a new approach to power distribution network state estimation. However, existing models based on CNNs, RNNs, or simple graph neural networks still have significant limitations when dealing with the spatiotemporal randomness of EV charging: Spatiotemporal graph convolutional networks show a voltage amplitude RMSE of 0.0152 pu when the EV load ratio is 40%, with the error rising to 0.0189 pu during peak charging periods; GCN-LSTM suffers from high estimation errors for random EV loads because it fails to distinguish user behavior types. Most of these methods treat EV loads as homogeneous random signals, failing to identify and integrate the behavioral motivation differences among different user groups from the data, resulting in insufficient modeling depth and limited generalization ability for complex spatiotemporal randomness. Therefore, there is an urgent need for a novel state estimation method specifically designed to address the spatiotemporal randomness of EV loads, enabling accurate and real-time perception of the operating state of power distribution networks with a high proportion of EVs. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a distribution network state estimation method that considers user behavior and spatiotemporal randomness under high-proportion EV access. This method introduces user behavior profiling to more precisely characterize the spatiotemporal uncertainty of EV charging, aiming to solve the problem of decreased state estimation accuracy caused by the spatiotemporal uncertainty of EV charging behavior. This method can deeply integrate EV load data and grid operation data, accurately model the spatiotemporal distribution and evolution of EV loads, thereby significantly improving the state estimation accuracy and robustness of distribution networks containing EVs without increasing the number of measurement devices.

[0004] This invention is achieved through the following technical solution: a distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access, comprising the following steps:

[0005] S1: User clustering and category definition: Based on historical user travel EV load data, users are divided into several typical categories through clustering algorithms, and then the clustering error is analyzed to finally determine user labels;

[0006] S2: Data Modeling and Graph Structure Construction: Modeling the distribution network as a graph structure ,in A set of nodes, where each node represents a busbar or measurement point in the distribution network; Let be the set of edges, where each edge represents a branch connecting a node; Let be the node feature matrix, where For the real number field, For the number of nodes, The feature dimension is defined as follows: the feature vector of the node feature matrix includes electrical quantity data, distributed power sources, EV load data, and user tags.

[0007] S3: Physical Information Spatial Feature Extraction: Node computation via multi-head attention mechanism with neighboring nodes Impedance weights between nodes, aggregating neighbor nodes The feature vectors are used to obtain the final spatial features of each node;

[0008] S4: Temporal feature modeling based on multi-scale fluctuation perception: The final spatial features of each node are arranged in time series to form a feature sequence. Then, the feature sequence is fused with the fluctuation index to construct fluctuation perception. The input is fed into the Transformer encoder, and multi-layer encoding is performed through the self-attention mechanism to obtain the spatiotemporal features of each node at each time step.

[0009] S5: Multi-source data fusion: The gating fusion unit adaptively adjusts the information flow ratio of the final spatial and spatiotemporal features of each node to output the final joint features;

[0010] S6: State estimation output: The joint features are mapped through a fully connected decoding layer to obtain the final distribution network state estimate.

[0011] As a further improvement to the technical solution of the present invention, in step S1, the clustering algorithm includes K-Means, DBSCAN, or hierarchical clustering.

[0012] As a further improvement to the technical solution of the present invention, in step S1, the clustering error analysis method is the elbow rule.

[0013] As a further improvement to the technical solution of the present invention, in step S3, the extraction of physical information spatial features specifically involves: through nodes with neighboring nodes The original attention coefficients are calculated from the feature vectors. Then, impedance weights are introduced to calculate the physically enhanced attention coefficients. The physically enhanced attention coefficients are then standardized, and finally, neighboring nodes are aggregated. The feature vectors are used to obtain the final spatial features of each node.

[0014] As a further improvement to the technical solution of the present invention, in step S3, the original attention coefficient is calculated. The calculation process is as follows:

[0015]

[0016] In the formula: This represents the learnable weight matrix. This represents the weight vector of a single-layer feedforward neural network for each attention head. express The transpose of the matrix, , These are nodes with neighboring nodes The eigenvectors of , where || represents the concatenation operation. This represents the activation function.

[0017] As a further improvement to the technical solution of the present invention, in step S3, the impedance weighting The calculation process is as follows:

[0018]

[0019] In the formula: Indicates the connection node with neighboring nodes The branch impedance magnitude; This represents the learnable scaling factor used to adjust the degree of impedance effect, with a value of (0,1].

[0020] Physically enhanced attention coefficient The calculation process is as follows:

[0021]

[0022] Attention coefficient for physical enhancement Standardization processes are performed, specifically as follows:

[0023]

[0024] In the formula: Representing neighboring nodes The set, Represents the standardized attention coefficient;

[0025] Aggregate neighbor nodes The process of calculating the eigenvectors is as follows:

[0026]

[0027] In the formula: Represents a node exist The output features of an attention head This represents the Sigmoid activation function;

[0028] Then the node The output features of all attention heads are concatenated to obtain the node. The final spatial features The calculation formula is as follows:

[0029]

[0030] In the formula: This indicates the number of heads of attention.

[0031] As a further improvement to the technical solution of the present invention, in step S4, the final spatial features of each node are arranged in a time sequence to form a feature sequence. ,in Indicates a time step;

[0032] The calculation process for the volatility index is as follows:

[0033]

[0034] In the formula: It is the average value of EV load data within the sliding window. Indicates time step EV load data, Indicates the length of the sliding window. Indicates volatility;

[0035] By fusing feature sequences with volatility indicators, a volatility sensing mechanism can be constructed. :

[0036]

[0037] In the formula: Represents the linear embedding of the feature sequence. , Indicates time step The node feature matrix, and These represent the weights and biases of the linear embedding, respectively. This indicates a splicing operation. Indicators of volatility Learnable weight vectors mapped to high-dimensional vectors;

[0038] feature sequence With volatility indicators The wave perception obtained after fusion ;

[0039] The fluctuation sensing data is input into the Transformer encoder, and multi-layer encoding is performed through a self-attention mechanism to obtain the spatiotemporal features of each node at each time step. .

[0040] As a further improvement to the technical solution of the present invention, the specific process of multi-source data fusion in step S5 is as follows:

[0041]

[0042]

[0043] In the formula: and Representing spatial features respectively and spatiotemporal characteristics The set, and Let represent the learnable parameter matrix and bias vector, respectively. This represents element-wise multiplication. Represents the gate vector, Indicates joint features;

[0044] Gated vectors The algorithm learns to assign weights to spatial and spatiotemporal features, achieving adaptation and outputting the final joint features. .

[0045] As a further improvement to the technical solution of the present invention, the specific process of outputting the state estimation in step S6 is as follows:

[0046] Joint features The final distribution network state estimate is obtained through a fully connected decoding layer, and its calculation formula is as follows:

[0047]

[0048] In the formula: Indicates in Time step to node The state estimator, where , , , They represent in Time step node The voltage amplitude, voltage phase angle, and branch current amplitude.

[0049] As a further improvement to the technical solution of the present invention, the error calculation is performed on the estimated value of the distribution network state in step S6. Taking into account the estimation accuracy, the function definition of the estimation accuracy is as follows:

[0050]

[0051] In the formula: , , These represent the weighting coefficients for the root mean square error of the voltage amplitude estimate, the mean absolute error of the branch current amplitude estimate, and the mean absolute error of the voltage phase angle estimate, respectively. , , These represent the root mean square error of the voltage amplitude estimate, the mean absolute error of the branch current amplitude estimate, and the mean absolute error of the voltage phase angle estimate, respectively. This represents the error in the estimated state of the distribution network.

[0052] The present invention provides a distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access, which has the following advantages compared with the prior art:

[0053] 1. This invention provides finer modeling granularity and higher accuracy: By introducing user behavior categories into the distribution network state estimation, it analyzes the root cause of the spatiotemporal randomness of EV load from the perspective of "human-vehicle-network" coupling, thus achieving more refined and accurate spatiotemporal modeling of EV load.

[0054] 2. Strong physical interpretability: This invention embeds the physical constraints of the power grid, such as branch impedance and radial topology, into the deep learning model in a differentiable manner, breaking through the "black box" limitation of traditional data-driven methods. The decision-making process of the model is more physically meaningful and easier for domain experts to understand and trust.

[0055] 3. Accurate capture of fluctuations: The multi-scale fluctuation perception attention mechanism enables the model to simultaneously take into account both local abrupt changes and global trends in EV load. Compared with the original Transformer and single-scale models, the state estimation accuracy is significantly improved during periods of severe load fluctuations.

[0056] 4. This invention successfully addresses the challenges of distribution network state estimation in the context of a high proportion of electric vehicles (EVs), providing a solution with high accuracy, robustness, and scalability. This method is not only applicable to state estimation tasks but also provides a solid technical foundation for future real-time monitoring, optimized scheduling, and EV charging management of distribution networks, possessing significant theoretical value and promising engineering applications. Attached Figure Description

[0057] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 This describes the model structure of a distribution network state estimation method that considers user behavior and spatiotemporal randomness under a high proportion of EV access.

[0060] Figure 2 This diagram illustrates the connection of the IEEE 33-node system. Detailed Implementation

[0061] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.

[0062] Many specific details are set forth in the following description in order to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the invention, and not all embodiments.

[0063] like Figure 1 As shown, this invention provides a specific implementation of a distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access, including the following steps:

[0064] S1: User Clustering and Category Definition: Based on historical user travel EV load data, users are divided into several typical categories through clustering algorithms, and then the clustering error is analyzed to finally determine user labels.

[0065] Specifically, this invention uses a clustering algorithm to divide users into several typical categories. By comparing the silhouette coefficients of three algorithms—K-Means, DBSCAN, and hierarchical clustering (K-Means: 0.612, DBSCAN: 0.48, hierarchical clustering: 0.53)—and noting that K-Means' clustering results match the actual user tags by 89.7%, the K-Means algorithm was selected.

[0066] Clustering error was analyzed using the "elbow method." When the number of clusters was 3, the error curve showed a clear inflection point. Furthermore, these three user groups exhibited significant differences in key behavioral characteristics such as charging start time, average daily mileage, and commonly used charging power (ANOVA test, P < 0.001). Therefore, three user tags were ultimately identified: commuter, ride-hailing / commercial vehicle, and random user. Each user tag corresponds to a different charging behavior pattern. The penetration rates for each user tag were set with reference to statistics from the State Grid's 2024 "High Proportion EV Access to Distribution Network Survey Report"—commuter users accounted for 52%-58%, operational users for 13%-17%, and random users for 25%-33%. To cover common scenarios and facilitate subsequent analysis, this invention uses the median value to cover general scenarios.

[0067] Commuter users: Their weekday schedules are fixed, commuting between home and work daily, and they immediately plug in their chargers upon returning home in the evening, exhibiting a highly regular charging pattern. Charging power preference: Primarily slow charging (7kW), as they have ample time to recharge overnight. Highly concentrated in residential load nodes (such as nodes 17-32 in the IEEE 33-node system). Penetration rate target: Approximately 55% of total EV load.

[0068] Ride-hailing / commercial vehicle users: Their vehicles have long average daily mileage, charging behavior is profit-driven, prioritizing fast charging, and charging times are fragmented and highly unpredictable. They are concentrated in commercial areas, main network nodes, and charging stations. Figure 2 In the IEEE 33 system (nodes 1-4, 14-16), the penetration rate is set at approximately 15% of the total EV load.

[0069] Random users: Vehicles are used for various purposes (picking up family, shopping, leisure and entertainment), charging needs are infrequent and highly random, and their behavior patterns are the most unpredictable. They are randomly distributed across all accessible residential and commercial area nodes. Figure 2 In the IEEE 33 system (nodes 5-13), there is no obvious spatial clustering. Permeability setting: approximately 30% of the total EV load.

[0070] This step establishes a solid behavioral foundation for the subsequent state estimation model, enabling the model to perform refined modeling and perception of EV charging load from the perspective of "human-vehicle-network" coupling.

[0071] S2: Data Modeling and Graph Structure Construction: Modeling the distribution network as a graph structure ,in A set of nodes, where each node represents a busbar or measurement point in the distribution network; Let be the set of edges, where each edge represents a branch connecting a node; Let be the node feature matrix, where For the real number field, For the number of nodes, The feature dimension is defined as follows: the feature vector of the node feature matrix includes electrical quantity data, distributed power sources, EV load data, and user tags.

[0072] S3: Physical Information Spatial Feature Extraction: Node computation via multi-head attention mechanism with neighboring nodes Impedance weights between nodes, aggregating neighbor nodes The feature vectors are used to obtain the final spatial features of each node. In step S3, the physical information spatial feature extraction specifically involves: extracting the spatial features of each node... with neighboring nodes The original attention coefficients are calculated from the feature vectors. Then, impedance weights are introduced to calculate the physically enhanced attention coefficients. The physically enhanced attention coefficients are then standardized, and finally, neighboring nodes are aggregated. The feature vectors are used to obtain the final spatial features of each node. This invention uses an attention network as a spatial convolutional layer and introduces learnable scaling coefficients. and impedance weight The influence of different branch impedances on attention weights is adaptively adjusted, thereby effectively distinguishing and modeling the electrical coupling strength of different types of branches.

[0073] In step S3, the original attention coefficients are calculated. The calculation process is as follows:

[0074]

[0075] In the formula: This represents the learnable weight matrix. This represents the weight vector of a single-layer feedforward neural network for each attention head. express The transpose of the matrix, , These are nodes with neighboring nodes The eigenvectors of , where || represents the concatenation operation. This represents the activation function, which is an improved version of the standard ReLU function. It assigns a non-zero slope to negative inputs, aiming to alleviate the problem that using the standard ReLU function may cause neurons to 'die', thereby enhancing the stability of the original attention coefficient calculation and the training dynamics of the model.

[0076] Impedance weight The calculation process is as follows:

[0077]

[0078] In the formula: Indicates the connection node with neighboring nodes The branch impedance magnitude; This represents the learnable scaling factor used to adjust the degree of impedance effect, with a value of (0,1). This ensures that the greater the impedance (the greater the electrical distance), the smaller the weight value.

[0079] Physically enhanced attention coefficient The calculation process is as follows:

[0080]

[0081] Attention coefficient for physical enhancement Standardization processes are performed, specifically as follows:

[0082]

[0083] In the formula: Representing neighboring nodes The set, This represents the standardized attention coefficient.

[0084] Aggregate neighbor nodes The process of calculating the eigenvectors is as follows:

[0085]

[0086] In the formula: Represents a node exist The output features of an attention head This represents the Sigmoid activation function.

[0087] Then the node The output features of all attention heads are concatenated to obtain the node. The final spatial features The calculation formula is as follows:

[0088]

[0089] In the formula: This indicates the number of heads of attention.

[0090] S4: Temporal Feature Modeling Based on Multi-Scale Fluctuation Perception: The final spatial features of each node are arranged into a feature sequence according to the time series. Then, the feature sequence is fused with volatility indicators to construct fluctuation perception, which is input into the Transformer encoder. Multi-layer encoding is performed through a self-attention mechanism to obtain the spatiotemporal features of each node at each time step. The Transformer encoder is used to mine the long-term temporal dependence and periodic patterns of EV load data (such as morning and evening peak charging patterns). The specific steps of step S4 are as follows:

[0091] Arrange the final spatial features of each node in a time series to form a feature sequence. ,in This represents the time step; in this embodiment, the sliding window method is used to calculate the local standard deviation of EV load data, thereby obtaining the volatility index. .

[0092] The calculation process for the volatility index is as follows:

[0093]

[0094] In the formula: It is the average value of EV load data within the sliding window. Indicates time step EV load data, Indicates the length of the sliding window. This represents a volatility indicator; the one used in this embodiment... The 30-minute window is crucial; a window that is too short is more sensitive to noise, while a window that is too long may smooth out the true fluctuation patterns. This invention, through experimental verification, sets... It can effectively capture most EV load data, such as power change events like start-up and shutdown, while achieving a good balance between computational complexity and perception effect.

[0095] By fusing feature sequences with volatility indicators, a volatility sensing mechanism can be constructed. :

[0096]

[0097] In the formula: Represents the linear embedding of the feature sequence. , Indicates time step The node feature matrix, and These represent the weights and biases of the linear embedding, respectively. This indicates a splicing operation. Indicators of volatility Learnable weight vectors mapped to high-dimensional vectors; in this embodiment Dimensions and This consistency allows volatility metrics to be fused with the feature sequences at a matching dimensionality, enabling the model to effectively learn how to adaptively modulate feature representations according to the intensity of volatility. It allows the model to explicitly focus on and learn the instability and drastic changes of EV loads over time.

[0098] feature sequence With volatility indicators The wave perception obtained after fusion The fluctuation perception is input into the Transformer encoder, and multi-layer encoding is performed through a self-attention mechanism to obtain the spatiotemporal features of each node at each time step. .

[0099] The Transformer encoder effectively captures the dependencies between any two time points in a sequence through its self-attention mechanism. Its standard calculation formula is:

[0100]

[0101] In the formula: These represent the query, key, and value matrices obtained from the input sequence through a linear transformation, respectively. This represents the dimension of the key vector.

[0102] Through a binary mask matrix This limits each attention point to focus on information within a specific time window.

[0103] For short-scale attention heads:

[0104] In the formula: The window size for short-scale focus is defined as 6, or 30 minutes, which is consistent with the length of the sliding window used to calculate the volatility index, ensuring that the model can effectively detect abrupt events in EV load data within a local timeframe. The value depends on the node with neighboring nodes The distance between and The relationship.

[0105] For long-scale attention heads: .

[0106] The long-scale attention head in this embodiment is an attention head whose scale is larger than the window size of the short-scale attention. That is, it uses global attention without any restrictions.

[0107] binary mask matrix Add to attention weight calculation:

[0108]

[0109] By using binary mask matrix Set as , The function sets its weight to 0, thereby allowing only specific regions to be focused on.

[0110] Through the above multi-layered encoding, the spatiotemporal features of each node at each time step are finally obtained. .

[0111] S5: Multi-source data fusion: The gating fusion unit adaptively adjusts the information flow ratio of the final spatial and spatiotemporal features of each node to output the final joint features.

[0112] This invention utilizes a gated fusion unit (GFU), whose structure is inspired by a gated recurrent unit (GRU). The specific process of multi-source data fusion is as follows:

[0113]

[0114]

[0115] In the formula: and Representing spatial features respectively and spatiotemporal characteristics The set, and Let represent the learnable parameter matrix and bias vector, respectively. This represents element-wise multiplication (Hadamard product). Represents the gate vector, Indicates joint features.

[0116] The gating fusion unit receives two streams of information: spatial features and spatiotemporal features, and then... The sigmoid activation function generates a gated vector with values ​​in the range (0,1). Gating vector It acts as a soft switch or dimmer, where the values ​​in each dimension adaptively determine the final joint feature. In this context, how much information should be retained from both spatial and spatiotemporal features? Gating vector. The algorithm learns to assign weights to spatial and spatiotemporal features, achieving adaptation and outputting the final joint features. .when When it approaches 1, Closer to the set of spatial features ,and When approaching 0, Closer to the time series feature set In this way, the model achieves adaptive control of information flow, and can finely characterize the different contributions of "base load" and "disturbance" to the distribution network state under different scenarios, thereby making more accurate estimates.

[0117] S6: State estimation output: Combined features Through a fully connected decoding layer ( The final distribution network state estimate is obtained by mapping, and its calculation formula is as follows:

[0118]

[0119] In the formula: Indicates in Time step to node The state estimator, where , , , They represent in Time step node The voltage amplitude, voltage phase angle, and branch current amplitude. The output layer is configured with different activation functions according to the estimation task. In this invention, the voltage amplitude preferably adopts the Sigmoid activation function, the voltage phase angle preferably adopts the Tanh activation function, and the branch current amplitude preferably adopts the ReLU function.

[0120] S7: Model Training and Loss Function Definition: The error of the distribution network state estimate in step S6 is calculated. Taking into account the estimation accuracy, the specific estimation accuracy function is defined as follows:

[0121]

[0122] In the formula: , , These represent the weighting coefficients for the root mean square error of the voltage amplitude estimate, the mean absolute error of the branch current amplitude estimate, and the mean absolute error of the voltage phase angle estimate, respectively. , , These represent the root mean square error of the voltage amplitude estimate, the mean absolute error of the branch current amplitude estimate, and the mean absolute error of the voltage phase angle estimate, respectively. This represents the error in the estimated state of the distribution network.

[0123] Among them, the root mean square error (RMSE) of the voltage amplitude estimate is:

[0124]

[0125] Mean Absolute Error (MAE) of estimated branch current amplitude:

[0126]

[0127] Mean absolute error (MAE) of voltage phase angle estimates:

[0128]

[0129] In the formula: This represents the total number of training samples. , Representing nodes respectively The estimated voltage amplitude and the actual voltage amplitude, , Representing nodes respectively The estimated value of the branch current amplitude and the actual value of the branch current amplitude. , Representing nodes respectively The estimated and actual voltage phase angle values.

[0130] The specific embodiments of the present invention will be described in detail below.

[0131] This embodiment is based on a Python simulation environment and uses the IEEE 33-bus distribution system as a test case to fully demonstrate the entire process of the method of the present invention from data preparation to model training and evaluation.

[0132] 1. Experimental setup and data preparation

[0133] (1) Distribution network topology and basic data

[0134] Distribution network model: IEEE 33-bus system (base voltage 12.66kV, total load 3.72MW).

[0135] The IEEE 33-node system supplies power from node 1 (the balancing node) to the end via a main line (branch lines 1-2, 2-3, etc.), and forms two main branch feeders at nodes 18-33. To simulate the spatial heterogeneity of loads and EV access in a real distribution network, based on the system's topological characteristics and load distribution in conventional studies, its nodes are divided into three typical regions and spatially associated with user behavior labels: Residential load nodes (nodes 17-32), these nodes typically represent areas with concentrated residential users, relatively stable load characteristics, and significant diurnal differences. This area is designated as the primary access point for "commuter" EV users, as their vehicles are usually charged at their workplace or upon returning home. Commercial area and transportation hub nodes (nodes 0-4, 14-16), these nodes simulate urban commercial centers, office buildings, and areas along major traffic arteries, with high load levels and daytime activity; this area is designated as the primary access point for "ride-hailing / commercial vehicle" EV users to reflect their frequent activity in commercial areas and their use of public fast-charging facilities. The mixed / general load nodes (nodes 5-13) are considered mixed load areas, which include both residential and a small amount of commercial loads; this area is open to all user types, but is mainly used to simulate the distributed access of “random” EV users.

[0136] Simulation tools: Pandapower is used for power flow calculation; PyTorch is used for deep learning modeling.

[0137] (2) EV load data generation

[0138] EV load data was generated using an EV charging behavior model based on stochastic processes. To simulate the spatiotemporal randomness of EV charging behavior, specific parameters (such as charging start time, average daily mileage, and charging power) were set based on probability distributions (such as normal distribution N and uniform distribution U), referencing the statistical patterns in actual survey reports (such as the State Grid 2024 report), and are specifically defined as follows:

[0139] Table 1 Comparison of different charging behavior patterns

[0140]

[0141] The load ratio of EVs in the distribution network is set to 40% (high-ratio access scenario).

[0142] Using the above model, the charging power time series of all EVs is generated every 5 minutes during the simulation period and accumulated to the total load of their respective nodes.

[0143] (3) Data synthesis and sample construction

[0144] Simulation period: 7 consecutive days of simulation with a sampling interval of 5 minutes, resulting in a total of 2016 time sections.

[0145] Power flow calculation of distribution network: For each time segment, the node load data superimposed with EV load is input into Pandapower for power flow calculation to obtain the true values ​​of voltage amplitude, voltage phase angle and branch current amplitude of each node.

[0146] Feature matrix construction: for each node eigenvectors at time step t Defined as:

[0147]

[0148] In the formula: , They are nodes At time step The base load (non-EV load). Represents a node At time step EV load data (i.e., charging power). , They represent Voltage and phase angle at time step (time-series dependence of analog measurement data). A three-dimensional one-hot vector is used to facilitate the model's identification of different user behavior patterns. This vector does not change over time and is determined solely by the dominant user type of the node. It represents the dominant user type of the node (commuter [1,0,0], ride-hailing [0,1,0], random [0,0,1]). This results in a feature tensor with dimensions [2016,33,6] and a label tensor with dimensions [2016,33,3].

[0149] (4) Data preprocessing

[0150] Data set split: The data from the first 5 days is used as the training set (1440 samples), the data from the 6th day is used as the validation set (288 samples), and the data from the 7th day is used as the test set (288 samples).

[0151] Standardization: Calculate the mean and standard deviation for each feature dimension of the training set, and perform Z-score standardization on the training, validation, and test sets.

[0152]

[0153] In the formula: Represents the standardized features. This represents the mean of the features in the training set. The standard deviation of the features in the training set. This represents the node feature matrix. This step can accelerate model training convergence and improve performance.

[0154] 2. Model Building and Training

[0155] (1) Model architecture implementation:

[0156] The spatial feature extraction layer of this invention employs a two-layer GATConv architecture. The first layer uses four attention heads with an output dimension of 64, and the second layer uses four attention heads with an output dimension of 32. ReLU is used as the activation function. The temporal feature extraction layer inputs the time series data from 33 nodes into a Transformer encoder. This encoder contains two layers, each using eight attention heads, with a feedforward network dimension of 128. Learnable parameters are used for positional encoding. The fusion and output layer passes the spatiotemporal features through a gated fusion unit (GFU) and finally connects them to a three-layer... (Fully connected decoding layer), with hidden layer dimensions of 64 and 32 respectively, and an output layer dimension of 3 (corresponding to...). , , The output layer uses Sigmoid (voltage), Tanh (phase angle), and ReLU (current) as activation functions to scale the output to a reasonable range.

[0157] (2) Model training details:

[0158] Loss function: Weighted comprehensive loss is used. This invention aims to achieve comprehensive perception of the basic operating status of the distribution network; therefore, it selects three core state variables—voltage amplitude, current amplitude, and voltage phase angle—as estimation targets. Weighting coefficients are set according to their physical importance. , , .

[0159] During model training, the network parameters are iteratively updated using the Adam optimizer. The Adam optimizer typically performs better when handling sparse gradients and non-stationary objective functions, and can more efficiently guide the model parameters towards the minimum of the loss function. In this embodiment, the initial learning rate is set to 1e-4, and a dynamic learning rate adjustment mechanism, namely the ReduceLROnPlateau scheduler, is introduced. The learning rate is halved when the validation set loss no longer decreases within 10 epochs. The purpose is to use a relatively large learning rate in the early stages of training to help the model converge quickly. In the later stages of training, when the model is close to a local optimum, an excessively large learning rate may cause it to oscillate repeatedly around the optimum and fail to converge. At this time, automatically reducing the learning rate helps the model approach the optimum with finer step sizes, thereby achieving more stable convergence and better generalization performance and preventing overfitting.

[0160] Regularization: in use To prevent overfitting.

[0161] Training batches: Batch size is 32, and the maximum number of training epochs is 100. An early stopping strategy is adopted: if the validation set loss does not improve within 15 epochs, training is terminated early to prevent the model from overlearning on the training set and to save computational resources.

[0162] 3. Experimental Results and Analysis

[0163] To comprehensively and rigorously evaluate the performance of the method of this invention (denoted as GAT-Transformer), this embodiment includes multiple sets of comparative experiments and in-depth analysis. All experiments were conducted in the same hardware environment (NVIDIA RTX 4060 GPU) and software framework (PyTorch 1.11.0) to ensure fairness.

[0164] This experiment compares the model with Weighted Least Squares (WLS), GCN-LSTM, GRU, and STGCN. All data-driven models used the same training, validation, and test sets, and underwent hyperparameter tuning to achieve optimal performance. The experimental results are shown in Table 2.

[0165] Table 2 Comparative Experiments

[0166]

[0167] Note: The overall score is consistent with the weights of the loss function and is normalized for comparison.

[0168] As shown in the table, the method of the present invention achieves the best performance in all core indicators. The voltage RMSE, current MAE and voltage phase angle MAE are reduced by 35.5%, 31.9% and 44.7% respectively compared with the best baseline method (STGCN).

[0169] The present invention further analyzed the performance of each method during the peak EV load period (18:00-22:00), as shown in Table 3.

[0170] Table 3 Experimental performance during peak EV load

[0171]

[0172] As shown in the table, the performance of the traditional WLS method drops sharply during the evening peak hours when the distribution network load fluctuates most dramatically. However, the method of this invention, thanks to its powerful spatiotemporal dynamic capture capability, exhibits relatively minimal performance degradation, and its accuracy advantage is even more pronounced during this period, which is crucial for ensuring the safe operation of the power grid.

[0173] In addition, to test the generalization ability and engineering feasibility of the testing method, this invention adds two key tests:

[0174] Tests with different EV load ratios (20%, 40%, 60%): As the ratio increases, system uncertainty increases, and the estimation errors of all methods increase. However, the error of this invention increases the slowest (the voltage RMSE is only 0.015 pu at the 60% ratio), maintaining an absolute advantage and demonstrating its strong robustness in dealing with high uncertainty scenarios.

[0175] Real-time performance test (hardware environment: NVIDIA RTX 4060 GPU): The single-time section inference time of the method described in this invention is 42ms, which meets the "second-level monitoring" requirement of the State Grid Distribution Network Real-time Monitoring Technical Guidelines (industry requirement ≤100ms) and the number of parameters is only 85% of STGCN (reducing redundant calculations), and can be deployed on edge computing nodes.

[0176] The above results demonstrate that the method described in this invention possesses both robustness and engineering feasibility.

[0177] 4. Conclusion

[0178] This embodiment comprehensively verifies the power distribution network state estimation method considering the stochasticity of electric vehicle charging proposed in this invention by constructing a complete simulation experimental environment. Experimental results show that the method of this invention exhibits excellent performance, including significantly improved estimation accuracy, superior spatiotemporal dynamic capture capability, and outstanding robustness and generalization ability, under different test scenarios.

[0179] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the present invention. Although detailed descriptions have been provided with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments, and all should be covered by the protection scope of the claims.

Claims

1. A method for estimating the state of a distribution network considering user behavior and spatiotemporal randomness under high-proportion EV access, characterized in that, Includes the following steps: S1: User clustering and category definition: Based on historical user travel EV load data, users are divided into several typical categories through clustering algorithms, and then the clustering error is analyzed to finally determine user labels; S2: Data Modeling and Graph Structure Construction: Modeling the distribution network as a graph structure ,in A set of nodes, where each node represents a busbar or measurement point in the distribution network; Let be the set of edges, where each edge represents a branch connecting a node; Let be the node feature matrix, where For the real number field, For the number of nodes, For feature dimensions; The feature vectors of the node feature matrix include electrical quantity data, distributed power sources, EV load data, and user tags; S3: Physical Information Spatial Feature Extraction: Node computation via multi-head attention mechanism with neighboring nodes Impedance weights between nodes, aggregating neighbor nodes The feature vectors are used to obtain the final spatial features of each node; S4: Temporal feature modeling based on multi-scale fluctuation perception: The final spatial features of each node are arranged in time series to form a feature sequence. Then, the feature sequence is fused with the fluctuation index to construct fluctuation perception. The input is fed into the Transformer encoder, and multi-layer encoding is performed through the self-attention mechanism to obtain the spatiotemporal features of each node at each time step. S5: Multi-source data fusion: The gating fusion unit adaptively adjusts the information flow ratio of the final spatial and spatiotemporal features of each node to output the final joint features; S6: State estimation output: The joint features are mapped through a fully connected decoding layer to obtain the final distribution network state estimate; In step S3, the physical information spatial feature extraction specifically involves: through nodes with neighboring nodes The original attention coefficients are calculated from the feature vectors. Then, impedance weights are introduced to calculate the physically enhanced attention coefficients. The physically enhanced attention coefficients are then standardized, and finally, neighboring nodes are aggregated. The feature vectors are used to obtain the final spatial features of each node; In step S3, the original attention coefficients are calculated. The calculation process is as follows: ; In the formula: This represents the learnable weight matrix. This represents the weight vector of a single-layer feedforward neural network for each attention head. express The transpose of the matrix, , These are nodes with neighboring nodes The eigenvectors of , where || represents the concatenation operation. Indicates the activation function; In step S3, impedance weighting The calculation process is as follows: ; In the formula: Indicates the connection node with neighboring nodes The branch impedance magnitude; This represents the learnable scaling factor used to adjust the degree of impedance effect, with a value of (0,1]. Physically enhanced attention coefficient The calculation process is as follows: ; Attention coefficient for physical enhancement Standardization processes are performed, specifically as follows: ; In the formula: Representing neighboring nodes The set, Represents the standardized attention coefficient; Aggregate neighbor nodes The process of calculating the eigenvectors is as follows: ; In the formula: Represents a node exist The output features of an attention head This represents the Sigmoid activation function; Then the node The output features of all attention heads are concatenated to obtain the node. The final spatial features The calculation formula is as follows: ; In the formula: Indicates the number of heads of attention; In step S4, the final spatial features of each node are arranged in time series to form a feature sequence. ,in Indicates a time step; The calculation process for the volatility index is as follows: ; ; In the formula: It is the average value of EV load data within the sliding window. Indicates time step EV load data, Indicates the length of the sliding window. Indicates volatility; By fusing feature sequences with volatility indicators, a volatility sensing mechanism can be constructed. : ; In the formula: Represents the linear embedding of the feature sequence. , Indicates time step The node feature matrix, and These represent the weights and biases of the linear embedding, respectively. This indicates a splicing operation. Indicators of volatility Learnable weight vectors mapped to high-dimensional vectors; feature sequence With volatility indicators The wave perception obtained after fusion ; The fluctuation sensing data is input into the Transformer encoder, and multi-layer encoding is performed through a self-attention mechanism to obtain the spatiotemporal features of each node at each time step. .

2. The distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access as described in claim 1, characterized in that, In step S1, the clustering algorithm includes K-Means, DBSCAN, or hierarchical clustering.

3. A distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access as described in claim 1 or 2, characterized in that, In step S1, the clustering error is analyzed using the elbow rule.

4. A distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access as described in claim 1 or 2, characterized in that, In step S5, the specific process of multi-source data fusion is as follows: ; ; In the formula: and Representing spatial features respectively and spatiotemporal characteristics The set, and Let represent the learnable parameter matrix and bias vector, respectively. This represents element-wise multiplication. Represents the gate vector, Indicates joint features; Gated vectors The algorithm learns to assign weights to spatial and spatiotemporal features, achieving adaptation and outputting the final joint features. .

5. The distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access as described in claim 4, characterized in that, In step S6, the specific process of outputting the state estimation is as follows: Joint features The final distribution network state estimate is obtained through a fully connected decoding layer, and its calculation formula is as follows: ; In the formula: Indicates in Time step to node The state estimator, where , , , They represent in Time step node The voltage amplitude, voltage phase angle, and branch current amplitude.

6. The distribution network state estimation method considering user behavior and spatiotemporal randomness under high-proportion EV access as described in claim 5, characterized in that, Error calculation is performed on the estimated distribution network state value in step S6. Taking into account the estimation accuracy, the function definition for the specific estimation accuracy is as follows: ; In the formula: , , These represent the weighting coefficients for the root mean square error of the voltage amplitude estimate, the mean absolute error of the branch current amplitude estimate, and the mean absolute error of the voltage phase angle estimate, respectively. , , These represent the root mean square error of the voltage amplitude estimate, the mean absolute error of the branch current amplitude estimate, and the mean absolute error of the voltage phase angle estimate, respectively. This represents the error in the estimated state of the distribution network.