Distribution transformer voltage prediction method and system based on multivariable space-time diagram neural network

By constructing a multivariate spatiotemporal graph neural network, the problem of insufficient capture of temporal dynamics and spatial correlation in traditional methods is solved, enabling accurate prediction of future voltage, improving prediction accuracy and model generalization ability, and adapting to the voltage regulation needs of complex scenarios.

CN121840599APending Publication Date: 2026-04-10JIANGSU ELECTRIC POWER RES INST +2
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU ELECTRIC POWER RES INST
Filing Date
2026-03-13
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional methods struggle to capture both temporal dynamics and spatial correlations simultaneously, resulting in insufficient prediction accuracy, severe lag issues, weak multivariate fusion capabilities, inadequate inter-station correlation modeling, and an inability to handle complex scenarios.

Method used

A multivariate spatiotemporal graph neural network is constructed, which generates a hybrid adjacency matrix through an adaptive graph convolutional network, integrates multidimensional external factors, captures temporal dynamics and spatial correlations, and employs techniques such as mixed precision training and gradient pruning to enhance the model's generalization ability.

Benefits of technology

It achieves accurate prediction of distribution area voltage for the next 24 to 168 hours, eliminates lag, improves long-term prediction accuracy, enhances the ability to deeply integrate multi-dimensional external factors and model spatial correlation between distribution areas, and improves the model's generalization ability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121840599A_ABST
    Figure CN121840599A_ABST
Patent Text Reader

Abstract

The invention discloses a distribution transformer voltage prediction method and system based on a multivariable space-time diagram neural network, and the method comprises the steps: obtaining the historical voltage data and meteorological data of a power distribution area, and constructing a multi-dimensional feature matrix; a prior adjacency matrix is constructed according to an electrical coupling relation between transformer areas in a power distribution network, an adaptive adjacency matrix is generated through an adaptive graph convolutional network, and the prior adjacency matrix and the adaptive adjacency matrix are fused to obtain a mixed adjacency matrix; and constructing a multivariable space-time diagram neural network, and predicting to obtain the voltage of the power distribution area in a certain duration. According to the method, the end-to-end deep learning model is constructed, time dynamics and spatial correlation are captured at the same time, and multi-dimensional external factors are fused, so that accurate prediction of the voltage of the power distribution area from the next 24 hours to the next 168 hours is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of distribution network voltage monitoring and prediction, and relates to a distribution transformer voltage prediction method and system based on a multivariate spatio-temporal graph neural network. It is particularly suitable for fusing meteorological, environmental and other multi-dimensional external factors to achieve accurate long-term and short-term voltage trend prediction and support active regulation and preventive operation of the distribution network. BACKGROUND

[0002] With the large-scale access of new loads such as distributed photovoltaic and electric vehicle charging facilities, the load characteristics of the distribution network are becoming increasingly complex, voltage fluctuations in transformer areas occur frequently, and show strong randomness, fast evolution and multiple influencing factors. The traditional voltage regulation methods relying on manual experience and fixed thresholds have been difficult to meet the current fine and intelligent operation and management requirements, and the voltage abnormality problem in transformer areas is becoming increasingly prominent.

[0003] The prior art has the following problems: 1. Insufficient prediction accuracy: traditional LSTM, GRU and other methods are difficult to capture both time dynamics and spatial correlation, and the prediction error is large (MAE is generally above 2.0V).

[0004] 2. Hysteresis problem: existing methods such as CNN-BiGRU can only predict a single point (15 minutes) in the future, and the overall prediction result shows hysteresis, which cannot perceive the voltage out-of-limit risk in advance.

[0005] 3. Weak multivariate fusion capability: there is a lack of deep fusion modeling of external factors such as weather and environment, making it difficult to cope with complex scenarios such as extreme weather.

[0006] 4. Insufficient modeling of inter-transformer area correlation: the electrical coupling relationship between transformer areas in the distribution network is ignored, and the spatial correlation cannot be used to improve the prediction accuracy. SUMMARY

[0007] The purpose of the present application is to provide a distribution transformer voltage prediction method and system based on a multivariate spatio-temporal graph neural network, which builds an end-to-end deep learning model to capture both time dynamics and spatial correlation, and fuses multi-dimensional external factors to achieve accurate prediction of the voltage of the distribution transformer area in the next 24 to 168 hours.

[0008] The technical solution to achieve the purpose of the present application is: A distribution transformer voltage prediction method based on a multivariate spatio-temporal graph neural network, comprising the following steps: Obtain historical voltage data and meteorological data of the distribution transformer area, and construct a multi-dimensional feature matrix; Based on voltage data, a prior adjacency matrix is ​​constructed according to the electrical coupling relationship between distribution substations in the distribution network. An adaptive adjacency matrix is ​​generated through an adaptive graph convolutional network. The prior adjacency matrix and the adaptive adjacency matrix are fused to obtain a hybrid adjacency matrix. A multivariable spatiotemporal graph neural network is constructed. The multidimensional feature matrix and the hybrid adjacency matrix are input into the constructed multivariable spatiotemporal graph neural network to predict the distribution area voltage for a preset duration.

[0009] In the preferred technical solution, after acquiring historical voltage data and meteorological data of the distribution substation, the data preprocessing is also included, including: Obtain historical voltage data U and meteorological data M for the distribution substation area: ,

[0010] in, u ij 、m ij They represent the first i The first of the 1st district j Voltage and weather values ​​at specific times. i =1,2,…,N, where N is the number of transformer substations; j =1,2,…,T, where T is the length of the time series; If it is determined that the time index of the voltage data does not match the time index of the meteorological data, perform re-indexing and interpolation operations on the meteorological data; A combination of forward padding and backward padding strategies is used to fill in missing values; Standardize the voltage data for each transformer area:

[0011] in, This represents the original voltage of the i-th transformer area. For the first i Standardized voltage for each transformer substation and The first i The mean and standard deviation of each transformer area; Global standardization of meteorological data:

[0012] in, Represents the original meteorological characteristic value. The global mean representing meteorological characteristics. The global standard deviation representing meteorological characteristics.

[0013] In the preferred technical solution, constructing the multidimensional feature matrix includes: Extract the dynamic characteristics of voltage time series, where the dynamic characteristics of voltage time series include the first derivative, the second derivative, and the moving standard deviation , the moving mean , and the trend intensity; where the trend intensity is the absolute value of the local linear fitting slope represents the number of samples in the moving window represents the observed value at the i -th moment represents the local mean within the moving window represents the current time index represents the time index within the moving window Extract the composite meteorological index, where the composite meteorological index includes the lag feature, the perceived temperature temp + 0.33 hum - 0.7 wind - 4.0, the solar load effect solar (temp > 0); temp is the temperature, hum is the humidity, wind is the wind speed, and solar is the light intensity Extract the event - type flag features, where the event - type flag features include heatwaves temp > mean + 2σ, cold snaps temp < mean - 2σ, strong winds wind > mean + 2σ, heavy rains precip > 90% quantile; mean is the mean, σ is the standard deviation, and precip is the precipitation Unify all features into the (T, N, 1) dimension and concatenate them along the last dimension, finally forming a multi - dimensional feature matrix X of dimension (T, N, F) high ; where T represents the length of the time series, N represents the number of distribution transformer areas, and F represents the feature dimension

[0014] In the preferred technical solution, fusing the prior adjacency matrix and the adaptive adjacency matrix to obtain the hybrid adjacency matrix includes Calculating the effective correlation coefficient between transformer areas based on voltage data

[0015] Where represents the covariance of the voltages of transformer area i and transformer area j ; represents the standard deviation of the voltage of transformer area i ; represents the standard deviation of the voltage of transformer area j ; Calculating the correlation for the simultaneously valid time points and constructing the prior adjacency matrix

[0016] Where Threshold is the threshold value; Learnable node embedding matrices E1 and E2 are introduced inside the adaptive graph convolutional network, and the adaptive adjacency matrix is ​​dynamically generated using the following formula:

[0017] Where W is the learnable weight matrix and Softmax is the normalization function; The resulting hybrid adjacency matrix is:

[0018] in, α These are the weighting coefficients.

[0019] In a preferred embodiment, the multivariate spatiotemporal graph neural network includes an input mapping layer, multiple MTGNN layers, and an output mapping layer. Input data passes through the input mapping layer and then enters the multiple MTGNN layers. Each MTGNN layer includes a cascaded dilated temporal convolution module and an adaptive graph convolution module. The dilated temporal convolution module employs causal convolution, expanding the receptive field exponentially through progressively increasing dilation rates to capture multi-scale temporal dependencies from short-term to long-term. The adaptive graph convolution module models the spatial relationships between transformer substations using a learned hybrid adjacency matrix. Each substation aggregates feature information from its neighboring substations to represent electrical coupling relationships. Each MTGNN layer, through residual connections and batch normalization, is processed by multiple MTGNN layers before entering the output mapping layer. First, key features are extracted using dimensionality reduction convolution, and then historical information is compressed into future predictions using temporal aggregation convolution.

[0020] In the preferred technical solution, the data processing for each MTGNN layer includes: For input X, the dilated temporal convolution operation is as follows:

[0021] Where kernel is the convolution kernel, k is the kernel size, d is the dilation rate, and dilation is the dilation rate. This represents dilated causal convolution operation, BatchNorm represents batch normalization, and ReLU is the activation function. Perform adaptive graph convolution on the output Y of the dilated temporal convolution:

[0022] in, The normalized hybrid adjacency matrix , Indicates the first The node feature matrix before the layer graph convolution operation. For learnable weight matrix, This is the ReLU activation function.

[0023] In the preferred technical solution, when the curve correlation between the node and other transformer substations is less than a set value, let =I, where I is the identity matrix, forcing each transformer node to be modeled independently.

[0024] In the preferred technical solution, after constructing the multivariate spatiotemporal graph neural network, the following is also included: constructing a multi-objective weighted loss function:

[0025] in, α, β, γ As weight; To smooth out L1 loss; The loss is in the direction of the voltage trend; This represents the peak alignment loss.

[0026] in, To predict the difference, For true difference, d is the time series, and D represents the total length of the time series; The set of valid prediction points;

[0027] The function mean represents the average of the minimum distances between the predicted peak and the actual peak. Indicates the predicted peak value i Location at time Indicates the actual peak value j The time position, where λ is the peak value error weight. This represents the voltage prediction value at the predicted peak time point. L1 represents the actual voltage value at the actual peak time point, and L1 is the absolute error loss.

[0028] This invention also discloses a distribution transformer voltage prediction system based on a multivariable spatiotemporal graph neural network, used to implement the aforementioned distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network, comprising: The multidimensional feature matrix construction module acquires historical voltage and meteorological data of the distribution substation area and constructs a multidimensional feature matrix. The hybrid adjacency matrix construction module constructs a priori adjacency matrix based on voltage data and the electrical coupling relationship between distribution substations in the distribution network. It then generates an adaptive adjacency matrix through an adaptive graph convolutional network and merges the priori adjacency matrix and the adaptive adjacency matrix to obtain a hybrid adjacency matrix. The prediction module constructs a multivariate spatiotemporal graph neural network. By inputting the multidimensional feature matrix and the hybrid adjacency matrix into the constructed multivariate spatiotemporal graph neural network, the voltage of the distribution station area for a preset duration is predicted.

[0029] The present invention also discloses a computer storage medium storing a computer program thereon, wherein when the computer executes the computer program, it implements the distribution transformer voltage prediction method based on multivariable spatiotemporal graph neural network described above.

[0030] The present invention also discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the distribution transformer voltage prediction method based on multivariable spatiotemporal graph neural network described above.

[0031] Compared with the prior art, the significant advantages of this invention are: 1. Improve the accuracy of long-term forecasts By expanding the receptive field through dilated causal convolution in the multivariate spatiotemporal graph neural network (MTGNN) architecture, it supports the prediction of the complete voltage curve for the next 24 to 168 hours, eliminates hysteresis, and enables early detection of voltage over-limit risks.

[0032] 2. Deep integration of multidimensional external factors

[0033] A high-order feature engineering system is constructed to extract voltage time-series dynamic features (first derivative, second derivative, moving statistics, trend intensity), composite meteorological indices (felt temperature, solar load effect, hysteresis features), and event-type marker features (heat wave, cold wave, rainstorm, strong wind). The input dimensions are optimized through feature importance analysis.

[0034] 3. Spatial correlation between modeling platform intervals

[0035] An adaptive graph convolutional network is introduced to dynamically learn the implicit topological relationships between stations. Strong coupling relationships are preserved through Top-K sparsification. The prior adjacency matrix (based on voltage correlation) and the data-driven adaptive adjacency matrix are integrated to balance physical rationality and flexibility.

[0036] 4. Enhance the model's generalization ability and robustness

[0037] We employ techniques such as EMA weight smoothing, mixed precision training, gradient pruning, and DropEdge regularization, combined with the OneCycleLR learning rate scheduling strategy, to ensure rapid convergence and escape from local optima. Attached Figure Description

[0038] Figure 1 This is a flowchart of the distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network in this embodiment; Figure 2 This is a flowchart of the distribution transformer voltage prediction system based on a multivariable spatiotemporal graph neural network in this embodiment; Figure 3 This is a schematic diagram illustrating robust prediction under extreme weather conditions in this embodiment; Figure 4 This is a long-term voltage trend prediction graph for this embodiment. Detailed Implementation

[0039] The principle of this invention is as follows: By expanding the receptive field through dilated causal convolutions in a multivariate spatiotemporal graph neural network (MTGNN) architecture, it supports the prediction of complete voltage curves over the next 24 to 168 hours, eliminating hysteresis and enabling early detection of voltage limit exceedance risks. An adaptive graph convolutional network is introduced to dynamically learn implicit topological relationships between stations. Top-K sparsification preserves strong coupling relationships, and a prior adjacency matrix (based on voltage correlation) is fused with a data-driven adaptive adjacency matrix, balancing physical rationality and flexibility.

[0040] Example: like Figure 1 As shown, a method for predicting distribution transformer voltage based on a multivariable spatiotemporal graph neural network includes the following steps: Acquire historical voltage and meteorological data of the distribution substation area and construct a multidimensional feature matrix; Based on voltage data, a prior adjacency matrix is ​​constructed according to the electrical coupling relationship between distribution substations in the distribution network. An adaptive adjacency matrix is ​​generated through an adaptive graph convolutional network. The prior adjacency matrix and the adaptive adjacency matrix are fused to obtain a hybrid adjacency matrix. A multivariable spatiotemporal graph neural network is constructed. The multidimensional feature matrix and the hybrid adjacency matrix are input into the constructed multivariable spatiotemporal graph neural network to predict the distribution area voltage for a preset duration.

[0041] In a preferred embodiment, after acquiring historical voltage data and meteorological data of the distribution substation, the method further includes data preprocessing, including: Obtain historical voltage data U and meteorological data M for the distribution substation area: ,

[0042] in, u ij 、m ij They represent the first i The first of the 1st district j Voltage and weather values ​​at specific times. i =1,2,…,N, where N is the number of transformer substations; j =1,2,…,T, where T is the length of the time series; If it is determined that the time index of the voltage data does not match the time index of the meteorological data, perform re-indexing and interpolation operations on the meteorological data; A combination of forward padding and backward padding strategies is used to fill in missing values; Standardize the voltage data for each transformer area:

[0043] in, This represents the original voltage of the i-th transformer area. For the first i Standardized voltage for each transformer substation and The first i The mean and standard deviation of each transformer area; Global standardization of meteorological data:

[0044] in, Represents the original meteorological characteristic value. The global mean representing meteorological characteristics. The global standard deviation representing meteorological characteristics.

[0045] In a preferred embodiment, constructing a multidimensional feature matrix includes: Extracting voltage time-series dynamic features, which include the first derivative, second derivative, and moving standard deviation. Moving average Trend strength; wherein, the trend strength is the absolute value of the slope of the local linear fit; This indicates the number of samples in the sliding window. Indicates the first i The observed value at time, This represents the local mean within the sliding window. Indicates the index at the current time. This represents the time index within the sliding window; A composite meteorological index is extracted, which includes lag characteristics and perceived temperature temp+0.33. hum-0.7 Wind-4.0, Solar Load Effect (temp>0); temp is temperature, hum is humidity, wind is wind speed, and solar is light intensity. Extract event-based flag features, where the event-based flag features include heatwaves temp > mean + 2σ, cold snaps temp < mean - 2σ, strong winds wind > mean + 2σ, heavy rains precip > 90th percentile; mean is the mean value, σ is the standard deviation, and precip is the precipitation; Unify all features into the (T, N, 1) dimension and concatenate them along the last dimension, finally forming a multi-dimensional feature matrix X of (T, N, F). high ; where T represents the length of the time series, N represents the number of distribution transformer areas, and F represents the feature dimension.

[0046] In a preferred embodiment, fusing the prior adjacency matrix and the adaptive adjacency matrix to obtain a hybrid adjacency matrix includes: Calculate the effective correlation coefficient between transformer areas based on voltage data:

[0047] Among them, represents the covariance of the voltages of transformer area i and transformer area j , represents the voltage standard deviation of transformer area i , represents the voltage standard deviation of transformer area j ; Calculate the correlation for the simultaneously valid time points and construct a prior adjacency matrix:

[0048] where Threshold is the threshold; Introduce learnable node embedding matrices E1 and E2 inside the adaptive graph convolutional network, and dynamically generate an adaptive adjacency matrix through the following formula:

[0049] where W is a learnable weight matrix and Softmax is a normalization function; The obtained hybrid adjacency matrix is:

[0050] where, α is the weight coefficient.

[0051] In a preferred embodiment, the multivariate spatiotemporal graph neural network includes an input mapping layer, multiple MTGNN layers, and an output mapping layer. Input data passes through the input mapping layer and then enters the multiple MTGNN layers. Each MTGNN layer includes a cascaded dilated temporal convolution module and an adaptive graph convolution module. The dilated temporal convolution module employs causal convolution, expanding the receptive field exponentially through progressively increasing dilation rates to capture multi-scale temporal dependencies from short-term to long-term. The adaptive graph convolution module models the spatial relationships between substations using a learned hybrid adjacency matrix, aggregating feature information from each substation to represent electrical coupling relationships. Each MTGNN layer, after processing through multiple MTGNN layers via residual connections and batch normalization, enters the output mapping layer. First, key features are extracted through dimensionality reduction convolution, and then historical information is compressed into future predictions through temporal aggregation convolution.

[0052] In a preferred embodiment, data processing for each MTGNN layer includes: For input X, the dilated temporal convolution operation is as follows:

[0053] Where kernel is the convolution kernel, k is the kernel size, d is the dilation rate, and dilation is the dilation rate. This represents dilated causal convolution operation, BatchNorm represents batch normalization, and ReLU is the activation function. Perform adaptive graph convolution on the output Y of the dilated temporal convolution:

[0054] in, The normalized hybrid adjacency matrix , Indicates the first The node feature matrix before the layer graph convolution operation, i.e., the node feature matrix at the th layer... The hidden states (feature representations) of all nodes before the convolutional update of the subgraph. For learnable weight matrix, This is the ReLU activation function.

[0055] In a preferred embodiment, when the curve correlation between the network and other network nodes is less than a preset value, let =I, where I is the identity matrix, forcing each transformer node to be modeled independently.

[0056] In a preferred embodiment, after constructing the multivariate spatiotemporal graphical neural network, the method further includes: constructing a multi-objective weighted loss function.

[0057] in, α, β, γ As weight; To smooth out L1 loss; The loss is in the direction of the voltage trend; This represents the peak alignment loss.

[0058] in, - To predict the difference, For true difference, d is the time series, 1[·] indicates that the loss function is 1 when the condition is met, and 0 otherwise, D represents the total length of the time series; The set of valid prediction points;

[0059] The function mean represents the average of the minimum distances between the predicted peak and the actual peak. Indicates the predicted peak value i Location at time Indicates the actual peak value j The time position, where λ is the peak value error weight. This represents the voltage prediction value at the predicted peak time point. This invention uses L1 (absolute error) loss as an error measurement method to represent the actual voltage value at the actual peak time point. Compared with L2, the most outlier value is more robust.

[0060] Another embodiment provides a distribution transformer voltage prediction system based on a multivariable spatiotemporal graph neural network, used to implement the aforementioned distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network, comprising: The multidimensional feature matrix construction module acquires historical voltage and meteorological data of the distribution substation area and constructs a multidimensional feature matrix. The hybrid adjacency matrix construction module constructs a priori adjacency matrix based on voltage data and the electrical coupling relationship between distribution substations in the distribution network. It then generates an adaptive adjacency matrix through an adaptive graph convolutional network and merges the priori adjacency matrix and the adaptive adjacency matrix to obtain a hybrid adjacency matrix. The prediction module constructs a multivariate spatiotemporal graph neural network. By inputting the multidimensional feature matrix and the hybrid adjacency matrix into the constructed multivariate spatiotemporal graph neural network, the voltage of the distribution station area for a preset duration is predicted.

[0061] The following example illustrates the workflow of a distribution transformer voltage prediction system based on a multivariable spatiotemporal graph neural network. Figure 2 As shown, it includes the following steps: Step 1: Data Preprocessing and Feature Engineering Extraction 1.1 Data Loading and Time Alignment Introduce the historical voltage dataset U of the distribution substation area and the meteorological data M of the area to ensure time index alignment.

[0062]

[0063] in, u ij、 m ij Indicates the first i The first of the 1st district j Voltage and weather values ​​at specific times. i =1,2,…,N, where N is the number of transformer substations; j =1,2,…,T, where T is the total number of time points. Meteorological data includes five dimensions: temperature, wind speed, relative humidity, rainfall, and solar radiation.

[0064] If there is a time index mismatch between voltage data and meteorological data, perform reindexing and interpolation operations on the meteorological data.

[0065] 1.2 Missing Value Handling and Standardization

[0066] Missing value imputation: A combination of forward imputation and backward imputation strategies is used to ensure that no outlier values ​​are passed into the model.

[0067] Node-wise standardization: Voltage data for each transformer substation is independently standardized using Z-scores to avoid the impact of voltage baseline differences between substations on model learning. The formula is as follows:

[0068] in, This represents the original voltage of the i-th transformer area. For the first i The standardized voltage of each transformer area (the voltage after Z-score transformation). and The first i The mean and standard deviation of each station area are calculated. The scaler parameters for each station area are saved for subsequent inverse normalization.

[0069] Meteorological feature standardization: Global standardization of five meteorological dimensions.

[0070] The standardized formula is as follows:

[0071] in, Represents the original meteorological characteristic value. The global mean representing meteorological characteristics. The global standard deviation representing meteorological characteristics.

[0072] 1.3 Higher-order feature extraction

[0073] Based on standardized voltage and meteorological data, a multidimensional feature matrix X is constructed. high ∈R T×N×F , where F is the feature dimension. The features and their meanings are shown in Table 1: Table 1: Features and their meanings

[0074] in, This indicates the number of samples in the sliding window. Indicates the first i The observed value at time, This represents the local mean within the sliding window. Indicates the index at the current time. This represents the time index within the sliding window. `temp` is the temperature, `hum` is the humidity, `wind` is the wind speed, and `mean` is the average value. σ , where is the standard deviation, solar is the light intensity, and precip is the precipitation.

[0075] All features are uniformly expanded to a (T, N, 1) dimension and concatenated along the last dimension to ultimately form a three-dimensional matrix data X with (T, N, F) dimensions. high Where T represents the total length of the time series, N represents the number of distribution radio stations, and F represents the feature dimension.

[0076] Step 2: Construct an adaptive adjacency matrix

[0077] This step mainly involves constructing the adjacency matrix between distribution transformer areas in the line topology, which is used to discover the correlation of voltage fluctuations between distribution transformers.

[0078] 2.1 Construction of the Prior Adjacency Matrix

[0079] Calculate the effective correlation coefficient between stations based on the voltage data in the training set:

[0080] in, Indicates the area i Hetai District j voltage covariance, Indicates the area i voltage standard deviation, Indicates the area j The standard deviation of voltage.

[0081] Correlation is calculated only for concurrently valid time points to avoid interference from missing values. A threshold (default 0.8) is set to construct a binary adjacency matrix.

[0082] 2.2 Adaptive Adjacency Matrix Learning

[0083] Learnable node embedding matrices E1, E2 ∈ R are introduced into the model. (N×D) Where N is the number of distribution radio stations and D is the embedding dimension (e.g., 128-dimensional), the adjacency matrix is ​​dynamically generated using the following formula:

[0084] Where W is the learnable weight matrix. To prevent overly dense connections, a Top-K sparsity operation is performed, retaining only the first K maximum values ​​of each row (K=5 or 10).

[0085] Softmax is a normalization function used to convert any real matrix into a probability distribution matrix.

[0086] 2.3 Hybrid Adjacency Matrix

[0087] The final adjacency matrix integrates physical priors and data-driven adaptive information:

[0088] in, α This is the weighting coefficient (default 0.7), which can be adjusted experimentally. Perform normalization to ensure the properties of the probability distribution.

[0089] Step 3: MTGNN Model Architecture Design

[0090] 3.1 Overall Architecture

[0091] The model consists of the following modules: input mapping layer, multi-layer MTGNN layer, and output mapping layer.

[0092] The input data has the shape (B, T, N, F), where B is the batch size, T is the length of the historical time series (e.g., 672 steps), N is the number of transformer substations, and F is the feature dimension.

[0093] First, the input mapping layer is used to increase the feature dimension from F to the hidden dimension C through convolution operations, while adjusting the data format to (B, C, N, T) to adapt to subsequent convolution operations.

[0094] Next, we move on to a multi-layered MTGNN (6 layers stacked together), each layer containing two cascaded core modules: The first is the dilated temporal convolution module, which uses causal convolution to ensure temporal causality and exponentially expands the receptive field by increasing the dilation rate (1-2-4-8-16-32) layer by layer, enabling the model to capture multi-scale temporal dependencies from the short term to the long term. Second, the adaptive graph convolution module uses the learned hybrid adjacency matrix to model the spatial relationships between substations. Each substation aggregates the feature information of its neighboring substations to represent the electrical coupling relationship.

[0095] Each MTGNN layer ensures smooth gradient propagation and accelerates convergence through residual connections and batch normalization.

[0096] After six layers of processing, the data still retains the (B, C, N, T) shape but contains rich spatiotemporal features.

[0097] Finally, the output mapping layer is entered. First, key features are extracted through dimensionality reduction convolution. Then, T-step historical information is compressed into P-step future predictions through temporal aggregation convolution (the kernel size is the length of the entire historical window). The output shape is (B, N, P).

[0098] Finally, through inverse normalization, the true voltage value is restored using the mean and standard deviation parameters saved by each transformer area, and the complete voltage curve prediction results for the next 24 to 168 hours are obtained.

[0099] The entire architecture achieves end-to-end deep fusion modeling of temporal dynamics and spatial correlation.

[0100] 3.2 Core Module: MTGNN Layer

[0101] Each MTGNN layer contains a concatenated structure of dilated temporal convolutions and adaptive graph convolutions.

[0102] 3.2.1 Dilated Temporal Convolution

[0103] Causal convolution is used to ensure that time t depends only on historical information, avoiding information leakage. The dilation rate increases exponentially (1, 2, 4, 8, ...), and the receptive field size is 2^t. L -1, where L is the number of layers.

[0104] For input X∈R B×F×N×T (Transposed to Conv2D format), the convolution operation is as follows:

[0105] Where k is the kernel size (default 3) and d is the dilation rate. By stacking 6 layers, the receptive field can cover 672 steps of history. X represents the input tensor. This indicates a convolution operation, specifically dilated causal convolution, which is primarily used to extract features in the time dimension.

[0106] BatchNorm stands for batch normalization. It is used to normalize the output of convolutional layers, prevent gradient vanishing, and accelerate model convergence. ReLU is an activation function. It introduces non-linear features, enabling the model to fit complex voltage change curves.

[0107] 3.2.2 Adaptive Graph Convolution

[0108] The temporal convolution outputs Y∈R B×C×N×T Remodeled into (B) T, N, C), perform graph convolution:

[0109] in, = W is the normalized mixed adjacency matrix. (l) For learnable weight matrix, Indicates the first The node feature matrix before the layer graph convolution operation, i.e., the node feature matrix at the th layer... The hidden states (feature representations) of all nodes before the convolutional update of the subgraph. Let F be the ReLU activation function. C represents the dimension of the hidden space after F is mapped by convolution.

[0110] Key improvement: After testing different configurations, it was found that fully adaptive graph learning may introduce noise interference. This invention provides an optional "self-loop only" mode. =I, I is the identity matrix, which forces each node to be modeled independently, allowing for flexible selection based on the actual data characteristics.

[0111] The implementation of the "self-loop only" mode essentially involves removing the "graph" structure from the graph neural network, retaining only the nonlinear fitting capability of the neural network. When the curve correlation between the node and other nodes is weak (less than a set value), only the node itself is modeled.

[0112] 3.2.3 Residual Connectivity and Normalization

[0113] in This represents the features after propagation and transformation through the graph structure. This indicates that the original input features of the current MTGNN layer are "skipped" directly, which is used to alleviate the gradient vanishing problem in deep networks.

[0114] Residual connections ensure smooth gradient propagation, while BatchNorm accelerates convergence and prevents gradient vanishing.

[0115] 3.3 Output Mapping Layer

[0116] After passing through 6 layers of MTGNN units, the data dimension is (B, C, N, T). Predictions are generated through the following steps: 1. Dimensionality reduction convolution: Conv2d(C, 128, kernel=(1,1)) 2. Time aggregation: Conv2d(128, P, kernel=(1,T)) compresses T steps of history into P steps of future prediction, where T represents the length of the input sequence.

[0117] 3. Output: Squeeze out the time dimension to get (B, N, P)

[0118] Conv2d() is a two-dimensional convolutional layer function. Conv2d(kernel=(1,1)) represents a dimensionality reduction convolution operation, which extracts important features and reduces data redundancy. Conv2d(kernel=(1,T)) represents global time modeling, which compresses historical information into future predictions. The squeeze operation is used to simplify the output format for easier subsequent use.

[0119] Step 4: Enhance the design of the loss function

[0120] Traditional MSE losses are not sensitive enough to high-voltage ranges (such as above 230V), making it difficult to meet the stringent requirements of power systems regarding over-limit risks. This invention proposes a multi-objective weighted loss function.

[0121] 4.1 Smoothing L1 Loss

[0122] in, The set of effective prediction points (excluding missing values) is defined as follows: i represents the i-th node (variable), and t represents the t-th time step. The SmoothL1 function approximates L2 when the error is less than β, and turns into L1 when the error is greater than β, thus balancing robustness and smoothness.

[0123]

[0124] in, = -y , representing the predicted value Compared with the true value y The difference (residual) This represents the threshold parameter, typically set to 0.3 or 1.0. This method is used to measure the difference between predicted and true values.

[0125] 4.2 Directional Loss

[0126] The accuracy of voltage trends is crucial for control decisions. Define directional consistency:

[0127] in, - To predict the difference, For true differences, V represents the total length of the time series. Inconsistent signs are counted to penalize trend prediction errors.

[0128] 4.3 Peak Alignment Loss

[0129] The power distribution system focuses on accurately capturing voltage peak points. First, Z-score normalization is performed on the predicted and actual sequences. Then, voltage data at time t that meets the following conditions is detected. As the peak point: The mean, The standard deviation is denoted as .

[0130] Calculate the predicted peak set With the true peak set The minimum distance matrix between them is defined as follows:

[0131] in Indicates the predicted peak value i Location at time Indicates the actual peak value j The time position, λ (default 2.0) is the peak value error weight. This represents the voltage prediction value at the predicted peak time point. This represents the actual voltage value at the actual peak time point.

[0132] 4.4 Overall Losses

[0133] Default configuration: weights α=0.6, β=0.2, γ=0.2. Ablation experiments verified that this configuration achieves optimal balance on the validation set.

[0134] Step 5: Training Strategies and Optimization Techniques

[0135] 5.1 Data Partitioning

[0136] Partitioning the dataset chronologically to prevent information leakage: Training set: first 70%, validation set: middle 10%, test set: last 20% 5.2 Optimizer and Learning Rate Scheduling Optimizer: AdamW, learning rate 5e-3, weight decay 1e-4, combining the advantages of adaptive learning rate and L2 regularization.

[0137] Learning rate scheduling: OneCycleLR strategy, linearly increasing the learning rate to the maximum for the first 20% of epochs, and cosine decaying to 1e-6 for the next 80% of epochs, accelerating convergence and escaping local optima.

[0138] 5.3 Mixed Precision Training

[0139] Using PyTorch's torch.cuda.amp module to implement mixed-precision training (FP16+FP32) reduces memory usage by 30%, increases training speed by 40%, and maintains numerical stability.

[0140] 5.4 Gradient Clipping and Regularization

[0141] Gradient clipping: torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=1.0) to prevent gradient explosion.

[0142] DropEdge: Randomly discards 20% of the edges in graph convolution to enhance generalization ability.

[0143] EMA weighted smoothing: The exponential moving average of the maintenance parameter (decay=0.995) is used to improve stability during testing.

[0144] 5.5 Early Stop Strategy

[0145] Monitor the validation set MAE. If there is no improvement after 50 consecutive epochs, stop training to prevent overfitting.

[0146] Step 6: Reasoning and Anti-normalization

[0147] 6.1 Model Reasoning

[0148] Given a history sequence X∈R seq_len×N×F The model outputs standardized predictions. ∈R pred_len×N .

[0149] 6.2 Inverse Normalization

[0150] Reconstruct the true voltage node by node using the saved Scaler parameters:

[0151] in, This represents the normalized predicted value output by the model. Indicates the first iThe original voltage standard deviation of each node (transformer area), Indicates the first i The average original voltage of each node.

[0152] 6.3 Predicted Output

[0153] Returns the complete voltage curve for the next 24 or 168 hours, supporting distribution network control decisions.

[0154] The effects of this invention are illustrated below using specific implementation examples: Case 1: Accurate 24-hour voltage prediction Scenario description: A distribution radio station in a certain region, with historical data from September 2023 to September 2025 (731 days), in 15-minute granularity.

[0155] Prediction task: Based on voltage and meteorological data from the past 7 days (672 time points), predict the voltage curve for the next 24 hours (96 steps).

[0156] Implementation steps: Data preprocessing: Load 70176 steps of voltage data and corresponding meteorological data, and perform missing value imputation and node standardization.

[0157] Feature engineering: Extract 6 basic features + 10 lag features + 3 time codes + 6 event features, with a total dimension F=40.

[0158] Adjacency matrix: The correlation coefficient is calculated based on the voltage of the training set, with a threshold of 0.8 and an adjacency matrix density of 12.3%.

[0159] Model training: MTGNN (6 layers, 128 channels, K=5), batch size 64, AdamW optimization, OneCycleLR scheduling, 400 training rounds.

[0160] Validation results: Validation set MAE=1.5545V, RMSE=2.0562V, MAPE=0.71%, orientation accuracy 92.8%.

[0161] Predicted results: as shown in Table 2: Table 2: Validation results of different models

[0162] Compared to the Informer model, MAE decreased by 16.8% and MAPE decreased by 16.5%.

[0163] The prediction accuracy for the high-voltage segment (>230V) was improved by 37.1% (MAE decreased from 2.379V to 1.496V).

[0164] 95% of the prediction error is controlled within ±1.3V, which meets the requirements for power system operation.

[0165] Case 2: Robust Prediction under Extreme Weather

[0166] Scenario Description: During the heat wave in July 2025, the temperature exceeded 38°C for five consecutive days, and the surge in air conditioning load caused some transformer substations to exceed their voltage limits.

[0167] Predictive task: Provide early warning of voltage over-limit risks 24 hours in advance.

[0168] Implementation steps: Event feature activation: Temperature > mean + 2σ was detected, heat wave flag position 1.

[0169] Composite meteorological index: The perceived temperature reaches 45℃, indicating a significant solar load effect.

[0170] Model prediction: For high-risk transformer areas, the model accurately predicts that the voltage will exceed the limit (>235.4V) between 8:00-12:00 and 17:00-22:00 the following day.

[0171] Control response: It is recommended to adjust the transformer tap and activate reactive power compensation in advance to avoid over-limit accidents.

[0172] Predicted effects, such as Figure 3 As shown: Under extreme weather conditions, MAPE is 0.37%, slightly lower than 0.71% under normal conditions, demonstrating strong robustness.

[0173] Accurately warn of the time periods when the power grid exceeds the limit.

[0174] Case 3: Long-term 168-hour voltage trend prediction

[0175] Scenario description: Before the peak summer season, it is necessary to predict the load change trend for the next week (168 hours) in order to optimize the maintenance plan.

[0176] Prediction task: Based on data from the past 7 days, predict the voltage curve for the next 7 days.

[0177] Implementation steps: Model configuration: pred_len=672 (168 hours × 4 steps / hour), other configurations are the same as in Case 1.

[0178] Rolling forecast: A fixed window sliding strategy is adopted, and the historical window is updated gradually for each forecast of the next 168 hours.

[0179] Predicted effects, such as Figure 4 As shown: The long-term forecast has an average MAE of 2.1V, which is slightly higher than the 24-hour forecast, but still better than the Transformer (MAE=2.7V).

[0180] Accurately capturing the trend of load changes during peak summer seasons provides a basis for selecting maintenance windows.

[0181] The prediction curve showed no significant drift, demonstrating the model's excellent long-term predictive ability.

[0182] Case 4: Interpretability Analysis: Importance of SHAP Features

[0183] Scenario Description: To enhance model reliability, SHAP (SHapley Additive exPlanations) is used to quantify the contribution of each feature to the prediction. See Table 3: Table 3: Quantifying the contribution of each feature to the prediction using SHAP

[0184] Conclusion: Historical voltage and first derivative accounted for 51% of the total, while meteorological factors accounted for 32.8%, verifying the necessity of multivariate fusion modeling.

[0185] In summary, this invention achieves the following technical effects by developing a distribution substation voltage prediction method based on a multivariable spatiotemporal graph neural network: The prediction accuracy is significantly improved: MAE=1.5545V, which is 16.8%-33.2% lower than the existing technology, and MAPE=0.71%, meeting the requirements of refined operation and maintenance of power systems.

[0186] Long-term forecasting capability: Supports full voltage curve forecasting for the next 24 to 168 hours, eliminating the lag of traditional methods and enabling early detection of over-limit risks.

[0187] Multivariate deep fusion: It integrates 40-dimensional features (voltage dynamics, meteorological index, event markers, and time coding), and has strong robustness to extreme weather scenarios (MAPE < 0.9%).

[0188] Spatial association modeling: By using a hybrid adjacency matrix mechanism, the electrical coupling relationship between stations is adaptively learned, which improves the accuracy by 8.3% compared to independent modeling.

[0189] Engineering deployability: It adopts mixed precision training, with a single inference time of <50ms, and supports real-time prediction; it provides complete feature engineering, model training, and inference process code, which is easy to reproduce in engineering.

[0190] In another embodiment, a computer storage medium stores a computer program thereon, wherein when a computer executes the computer program, it implements the distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network as described above.

[0191] The specific implementation method is the one described above, and will not be repeated here.

[0192] In another embodiment, an electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor runs the computer program stored in the memory, wherein the computer program, when executed, implements the distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network as described in any of the preceding embodiments.

[0193] The specific implementation method is the one described above, and will not be repeated here.

[0194] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for predicting distribution transformer voltage based on a multivariable spatiotemporal graph neural network, characterized in that, It includes the following steps: Obtain the historical voltage data and meteorological data of the distribution transformer area, and construct a multi-dimensional feature matrix; Based on the voltage data, construct a prior adjacency matrix according to the electrical coupling relationship between the transformer areas in the distribution network. Generate an adaptive adjacency matrix through an adaptive graph convolutional network, and fuse the prior adjacency matrix and the adaptive adjacency matrix to obtain a hybrid adjacency matrix; Construct a multi-variable spatio-temporal graph neural network, and input the multi-dimensional feature matrix and the hybrid adjacency matrix into the constructed multi-variable spatio-temporal graph neural network to predict the voltage of the distribution transformer area for a preset duration.

2. The distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network according to claim 1, characterized in that, After obtaining the historical voltage data and meteorological data of the distribution transformer area, it also includes preprocessing the data, including: Obtain the historical voltage data U and meteorological data M of the distribution transformer area: , in, u ij 、m ij They represent the first i The first of the 1st district j Voltage and weather values ​​at specific times. i =1,2,…,N, where N is the number of transformer substations; j =1,2,…,T, where T is the length of the time series; If it is determined that the time indexes of the voltage data and the meteorological data do not match, perform reindexing and interpolation operations on the meteorological data; Adopt a combined strategy of forward filling and backward filling to fill the missing values; Standardize the voltage data of each transformer area: in, This represents the original voltage of the i-th transformer area. For the first i Standardized voltage for each transformer substation and The first i The mean and standard deviation of each distribution area; Perform global standardization on the meteorological data: in, Represents the original meteorological characteristic value. The global mean representing meteorological characteristics. The global standard deviation representing meteorological characteristics.

3. The distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network according to claim 2, characterized in that, Constructing the multi-dimensional feature matrix includes: Extracting voltage time-series dynamic features, which include the first derivative, second derivative, and moving standard deviation. Moving average Trend strength; wherein, the trend strength is the absolute value of the slope of the local linear fit; This indicates the number of samples in the sliding window. Indicates the first i The observed value at time, This represents the local mean within the sliding window. Indicates the index at the current time. This represents the time index within the sliding window; A composite meteorological index is extracted, which includes lag characteristics and perceived temperature temp+0.

33. hum-0.7 Wind-4.0, Solar Load Effect (temp>0); temp is temperature, hum is humidity, wind is wind speed, and solar is light intensity. Extract event-type flag features, and the event-type flag features include high temperature heat wave temp > mean + 2σ, cold wave temp < mean - 2σ, strong wind wind > mean + 2σ, heavy rain precip > 90% quantile; mean is the mean value, σ is the standard deviation, and precip is the precipitation; All features are uniformly expanded to a (T, N, 1) dimension and concatenated along the last dimension to finally form a multidimensional feature matrix X with (T, N, F) dimensions. high Where T represents the time series length, N represents the number of distribution radio stations, and F represents the feature dimension.

4. The distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network according to claim 3, characterized in that, Fusing the prior adjacency matrix and the adaptive adjacency matrix to obtain the hybrid adjacency matrix includes: Calculate the effective correlation coefficient between the transformer areas based on the voltage data: in, Indicates the area i Hetai District j voltage covariance, Indicates the area i voltage standard deviation, Indicates the area j The standard deviation of voltage; Calculate the correlation for the simultaneously valid time points and construct a prior adjacency matrix: Where, Threshold is the threshold; Introduce learnable node embedding matrices E1 and E2 inside the adaptive graph convolutional network, and dynamically generate the adaptive adjacency matrix through the following formula: Where, W is the learnable weight matrix, and Softmax is the normalization function; The obtained hybrid adjacency matrix is: in, α These are the weighting coefficients.

5. The distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network according to claim 1, characterized in that, The multi-variable spatio-temporal graph neural network includes an input mapping layer, multiple MTGNN layers, and an output mapping layer; the input data enters the multiple MTGNN layers after passing through the input mapping layer. Each MTGNN layer includes a cascaded dilated temporal convolutional module and an adaptive graph convolutional module. The dilated temporal convolutional module uses causal convolution and expands the receptive field exponentially with a gradually increasing dilation rate to capture multi-scale temporal dependencies from short-term to long-term; the adaptive graph convolutional module uses the learned hybrid adjacency matrix to model the spatial association between the transformer areas, and each transformer area aggregates the feature information of its neighboring transformer areas to realize the characterization of the electrical coupling relationship. Each MTGNN layer passes through residual connections and batch normalization. After being processed by multiple MTGNN layers, it enters the output mapping layer. First, key features are extracted through dimensionality reduction convolution, and then the historical information is compressed into future predictions through temporal aggregation convolution.

6. The distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network according to claim 5, characterized in that, The data processing of each MTGNN layer includes: For the input X, the dilated temporal convolution operation is: Where kernel is the convolution kernel, k is the kernel size, d is the dilation rate, and dilation is the dilation rate. This represents dilated causal convolution operation, BatchNorm represents batch normalization, and ReLU is the activation function. Perform adaptive graph convolution on the output Y of the dilated temporal convolution: in, The normalized hybrid adjacency matrix , Indicates the first The node feature matrix before the layer adaptive graph convolution operation. For learnable weight matrix, This is the ReLU activation function.

7. The distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network according to claim 6, characterized in that, When the curve correlation between the node and other transformer substations is less than the set value, let =I, where I is the identity matrix, forcing each transformer node to be modeled independently.

8. The distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network according to claim 1, characterized in that, After constructing the multi-variable spatio-temporal graph neural network, it also includes: constructing a multi-objective weighted loss function: in, α, β, γ As weight; To smooth out L1 loss; The loss is in the direction of the voltage trend; This represents the peak alignment loss. in, To predict the difference, For true difference, 1[·] means 1 when the condition is true and 0 otherwise, d is the time series, and D is the total length of the time series; The set of valid prediction points; The function mean represents the average of the minimum distances between the predicted peak and the actual peak. Indicates the predicted peak value i Location at time Indicates the actual peak value j The time position, where λ is the peak value error weight. This represents the voltage prediction value at the predicted peak time point. L1 represents the actual voltage value at the actual peak time point, and L1 is the absolute error loss.

9. A distribution transformer voltage prediction system based on a multivariable spatiotemporal graph neural network, characterized in that, The method for predicting distribution transformer voltage based on a multivariable spatiotemporal graph neural network as described in any one of claims 1-8 includes: The multidimensional feature matrix construction module acquires historical voltage and meteorological data of the distribution substation area and constructs a multidimensional feature matrix. The hybrid adjacency matrix construction module constructs a priori adjacency matrix based on voltage data and the electrical coupling relationship between distribution substations in the distribution network. It then generates an adaptive adjacency matrix through an adaptive graph convolutional network and merges the priori adjacency matrix and the adaptive adjacency matrix to obtain a hybrid adjacency matrix. The prediction module constructs a multivariate spatiotemporal graph neural network. By inputting the multidimensional feature matrix and the hybrid adjacency matrix into the constructed multivariate spatiotemporal graph neural network, the voltage of the distribution station area for a preset duration is predicted.

10. A computer storage medium having a computer program stored thereon, characterized in that, When the computer executes the computer program, it implements the distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network as described in any one of claims 1-8.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, which, when executed by a processor, implements the distribution transformer voltage prediction method based on a multivariable spatiotemporal graph neural network as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Cross-modal retrieval algorithm based on mixed hypergraph learning in subspace

    CN106886601A

  • Method for predicting residual service life of scraper conveyor, medium and equipment

    CN119443402A

  • Transformer area distribution network data sensing method and system based on space-time diagram neural network

    CN119559005A

  • Complex traffic flow prediction method based on dynamic graph convolution and interactive learning

    CN119784195A

  • Low-voltage distribution network node voltage prediction method based on total element learning graph neural network

    CN119940616A