Line loss prediction method and system based on physical-data dual-drive capsule network

By constructing a physical-data dual-driven capsule network model, and combining the equivalent circuit model of power equipment with the data-driven model, the problem of insufficient line loss prediction accuracy in existing technologies is solved, achieving high-precision and adaptive line loss prediction, and improving power grid operation efficiency and equipment evaluation capabilities.

CN120850810AActive Publication Date: 2025-10-28STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511347278.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-19
Publication Date
2025-10-28
Estimated Expiration
2045-09-19

AI Technical Summary

Technical Problem

Existing physical model-driven line loss prediction methods struggle to accurately cover nonlinear loss factors in complex power systems, leading to decreased prediction accuracy. There is an urgent need to improve the accuracy and interpretability of line loss prediction.

Method used

A physical-data dual-driven capsule network model is constructed, which combines the equivalent circuit model of power equipment and the data-driven model. Through multi-scale feature fusion and correction of the physical capsule network layer and the data capsule network layer, and using historical line loss data for training and optimization, high-precision line loss prediction is achieved.

Benefits of technology

It achieves high-precision, adaptive prediction of power system line losses, provides more accurate grid dispatch references, improves grid operation efficiency and equipment status assessment capabilities, identifies potential problems, and reduces energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120850810A_ABST
    Figure CN120850810A_ABST
Patent Text Reader

Abstract

The invention relates to a line loss prediction method and system based on a physical-data dual-drive capsule network. The line loss prediction system based on the physical-data dual-drive capsule network comprises the following steps: constructing a physical-data dual-drive capsule network model; performing training optimization on the physical-data dual-drive capsule network model by using historical line loss data; and performing line loss prediction based on the trained and optimized physical-data dual-drive capsule network model. According to the method, the interpretability of the physical driving model and the learning capability of the data driving model can be combined, and high-precision and self-adaptive prediction of the line loss of the power system can be realized; more accurate reference can be provided for power grid dispatching, reasonable arrangement of power transmission is helped, and the power grid operation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system automation technology, and in particular to a method and system for predicting line losses based on a physical-data dual-drive capsule network. Background Technology

[0002] In the operation of power systems, line loss is an important indicator for measuring grid efficiency. Currently, one method for predicting line loss is driven by a physical model.

[0003] The core of the physical model-driven approach is to rely on accurate equipment parameters and circuit models for line loss prediction. For example, when calculating line resistance loss, it is necessary to accurately know parameters such as the original resistance and temperature coefficient of the line, and then combine them with the corresponding physical formulas for calculation. However, this method has obvious limitations in the complex operating environment of power systems. For instance, in actual power grids, there are a large number of nonlinear loss factors, such as harmonic losses and changes in contact resistance. These nonlinear factors are difficult to accurately cover with traditional physical models, resulting in a significant reduction in the prediction accuracy of physical models under complex conditions.

[0004] With the continuous development and increasing complexity of power systems, improving the accuracy and interpretability of line loss prediction has become increasingly important. Therefore, there is an urgent need for a new line loss prediction method that can improve prediction accuracy and interpretability. Summary of the Invention

[0005] Therefore, it is necessary to provide a line loss prediction method and system based on a physical-data dual-driven capsule network to address the problems in related technologies.

[0006] To achieve the above objectives, in a first aspect, this application provides a line loss prediction method based on a physical-data dual-driven capsule network, the line loss prediction method based on the physical-data dual-driven capsule network comprising: Constructing a physical-data dual-driven capsule network model includes: building a physical capsule network layer based on an equivalent circuit model of power equipment, wherein the physical capsule network layer includes line loss capsules and transformer loss capsules; constructing a data capsule network layer; verifying the output results of the physical capsule network layer and the output results of the data capsule network layer, and correcting the physical capsule network layer and the data capsule network layer when the verification is abnormal; and performing multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model. The physical-data dual-driven capsule network model was trained and optimized using historical line loss data. Line loss prediction is performed based on a trained and optimized physical-data dual-driven capsule network model.

[0007] In some embodiments, the line loss capsule calculates line loss based on the following formula: ;

[0008]

[0009] in, This is the reference value for conductor resistance at 20℃. Here, T is the temperature coefficient of resistance, I is the conductor temperature, and T is the real-time current. The transformer loss capsule calculates transformer losses based on the following formula: ;

[0010]

[0011] in, For load rate, Oil temperature For temperature-related no-load losses, denoted as the short-circuit loss under rated load, and a, b, and c are coefficients obtained by fitting factory test data.

[0012] In some embodiments, constructing a data capsule network layer includes: Construct feature extraction capsules; The data capsule network layer is constructed using an attention-based mechanism.

[0013] In some embodiments, the output results of the physical capsule network layer and the output results of the data capsule network layer are validated, and the physical capsule network layer and the data capsule network layer are corrected when the validation is abnormal, including: The consistency index between the output of the physical capsule network layer and the output of the data capsule network layer is obtained based on the following formula. :

[0014] in, This is the output of the physical capsule network layer. This is the output of the data capsule network layer; This represents the absolute difference between the output of the physical capsule network layer and the output of the data capsule network layer. When consistency index When the value exceeds a preset threshold, the physical capsule network layer and the data capsule network layer are corrected as follows: Backpropagation sensitivity analysis was performed on the physical capsule network layer to obtain its parameters. Consistency Indicators gradient ; The parameters of the physical capsule network layer are based on the following formula. Perform correction:

[0015] in, These are the corrected parameters. These are the parameters before correction. For correction factors, This is the output of the physical capsule network layer. This is the output of the data capsule network layer; Reset the coupling coefficient of the abnormal data capsule to its initial value.

[0016] In some embodiments, multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model, including: The gated output value is obtained based on the following formula:

[0017] in, This is the gated output value. For activation function, This is the weight matrix for the gating mechanism. This is the concatenation operation between the output of the physical capsule network layer and the output of the data capsule network layer. It is the bias vector; Multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer based on the gated output value:

[0018] in, The predicted value of the obtained physical-data dual-driven capsule network model is represented by ⊙, where ⊙ represents element-wise multiplication.

[0019] In some embodiments, the physical-data dual-driven capsule network model is trained and optimized using historical line loss data, including: Construct a composite loss function, the formula of which is as follows:

[0020] in, To predict error loss, For physical consistency loss, Due to the instability loss caused by dynamic routing, , , These are the weights for prediction error loss, physical consistency loss, and dynamic routing stability loss, respectively. The parameters of the data capsule network layer are fixed, and only the physical parameters of the physical capsule network layer are optimized; An adaptive learning strategy is used to jointly fine-tune the physics-data dual-driven capsule network model; A sliding window is used to incrementally learn the physical-data dual-driven capsule network model.

[0021] In some embodiments, before obtaining the physical-data dual-driven capsule network model after multi-scale feature fusion of the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism, the method further includes: dynamically adjusting the fusion weights of the physical capsule network layer and the data capsule network layer using an evidence weight fusion algorithm, including: The confidence level of the physical capsule network layer output and the membership level of the data capsule network layer output are obtained based on the following formulas: ;

[0022]

[0023] in, The membership degree of the physical capsule network layer output to the k-th cluster. The membership degree of the data capsule network layer output to the k-th cluster. This is the output of the physical capsule network layer. The output of the data capsule network layer. Let be the center vector of the k-th cluster. Let be the variance of the k-th cluster, and K be the total number of clusters. Let l be the center vector of the l-th cluster. Let K be the variance of the l-th cluster, where l ≤ k ≤ K; The Jousselme distance between the membership distribution of the physical capsule network layer output and the membership distribution of the data capsule network layer output is obtained based on the following formula. :

[0024] in, This represents the membership vector output by the physical capsule network layer. This is the transpose of the membership vector of the output of the physical capsule network layer. This represents the membership vector output by the data capsule network layer. Let D be the transpose of the membership vector of the data capsule network layer output, and D be the positive definite weight matrix. A sliding window mechanism is used to dynamically adjust the fusion weights of the physical capsule network layer and the data capsule network layer. The formula for the fusion weights of the physical capsule network layer is as follows:

[0025] in, denoted as the fusion weights of the physical capsule network layer; t represents the time step; [Nn, N] represents the time range of the sliding window, which contains n+1 samples from Nn to N; n+1 represents the total number of samples in the sliding window. The Jousselme distance is the membership distribution between the output of the physical capsule network layer and the output of the data capsule network layer at time t. For indicator functions; Threshold for conflict judgment; The fusion weights of the data capsule network layer are obtained based on the following formula:

[0026] in, For the fusion weights of the data capsule network layer, , which represents the fusion weights of the physical capsule network layer.

[0027] In some embodiments, the fusion weights of the data capsule network layer are adjusted based on the following formula: ;

[0028]

[0029] in, The adjusted fusion weights for the data capsule network layer. The fusion weights of the data capsule network layer before adjustment. t represents the initial decay weights of the data capsule network layer, and t represents the number of times the physical-data dual-driven capsule network model has been trained.

[0030] Secondly, this application also provides a line loss prediction system based on a physical-data dual-driven capsule network; the line loss prediction system based on the physical-data dual-driven capsule network includes: A physical-data dual-driven capsule network model construction module is used to construct a physical capsule network layer based on the equivalent circuit model of power equipment. The physical capsule network layer includes a line loss capsule and a transformer loss capsule. A data capsule network layer is constructed. The output results of the physical capsule network layer and the data capsule network layer are verified, and corrections are performed on the physical capsule network layer and the data capsule network layer when verification is abnormal. Multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model. The training and optimization module is used to train and optimize the physical-data dual-driven capsule network model using historical line loss data; the trained and optimized physical-data dual-driven capsule network model is used for line loss prediction.

[0031] In some embodiments, the physical-data dual-driven capsule network model building module includes: A physical capsule network layer construction unit is used to construct a physical capsule network layer based on the equivalent circuit model of power equipment. The physical capsule network layer includes line loss capsules and transformer loss capsules. Data capsule network layer building blocks are used to construct data capsule network layers; The verification and correction unit is used to verify the output results of the physical capsule network layer and the output results of the data capsule network layer, and to correct the physical capsule network layer and the data capsule network layer when the verification is abnormal. The fusion unit is used to perform multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model.

[0032] The aforementioned line loss prediction method and system based on physical-data dual-driven capsule networks, by constructing a physical-data dual-driven capsule network model including a physical capsule network layer and a data capsule network layer, can combine the interpretability of the physical-driven model and the learning ability of the data-driven model to achieve high-precision, adaptive prediction of power system line losses; it can provide a more accurate reference for power grid dispatching, help to rationally arrange power transmission, and improve power grid operation efficiency. Attached Figure Description

[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0034] Figure 1 This is a flowchart of a line loss prediction method based on a physical-data dual-driven capsule network provided in one embodiment of this application; Figure 2 This is a structural block diagram of a line loss prediction system based on a physical-data dual-driven capsule network provided in another embodiment of this application; Figure 3 This is a structural block diagram of the physical-data dual-driven capsule network model construction module in a line loss prediction system based on physical-data dual-driven capsule networks provided in another embodiment of this application.

[0035] Figure labeling: 10, Physical-Data Dual-Driven Capsule Network Model Construction Module; 101, Physical Capsule Network Layer Construction Unit; 102, Data Capsule Network Layer Construction Unit; 103, Verification and Correction Unit; 104, Fusion Unit; 20, Training Optimization Module. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0037] In one embodiment, see Figure 1 This application provides a line loss prediction method based on a physical-data dual-driven capsule network, which includes the following steps: S10~S30.

[0038] S10: Construct a physical-data dual-driven capsule network model, including: constructing a physical capsule network layer based on the equivalent circuit model of power equipment, wherein the physical capsule network layer includes line loss capsules and transformer loss capsules; constructing a data capsule network layer; verifying the output results of the physical capsule network layer and the output results of the data capsule network layer, and correcting the physical capsule network layer and the data capsule network layer when the verification is abnormal; and performing multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model.

[0039] S20: Train and optimize the physical-data dual-driven capsule network model using historical line loss data.

[0040] Line loss prediction is performed based on a trained and optimized physical-data dual-driven capsule network model.

[0041] The line loss prediction method based on physical-data dual-driven capsule networks proposed in this application constructs a physical-data dual-driven capsule network model, which includes a physical capsule network layer and a data capsule network layer. This model combines the interpretability of the physical-driven model with the learning ability of the data-driven model, enabling high-precision and adaptive prediction of power system line losses. It provides a more accurate reference for power grid dispatching, helping to rationally arrange power transmission and improve power grid operating efficiency. In terms of equipment status assessment, it can more accurately determine the operating status of equipment and promptly identify potential problems. Regarding energy-saving optimization, it helps to identify links with high line losses, allowing for targeted measures to reduce energy consumption.

[0042] In step S10, please refer to Figure 1 Step S10 of the process involves constructing a physical-data dual-driven capsule network model, including: constructing a physical capsule network layer based on an equivalent circuit model of power equipment, wherein the physical capsule network layer includes line loss capsules and transformer loss capsules; constructing a data capsule network layer; verifying the output results of the physical capsule network layer and the output results of the data capsule network layer, and correcting the physical capsule network layer and the data capsule network layer when the verification is abnormal; and performing multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model.

[0043] As an example, the line loss capsule and transformer loss capsule in the constructed physical capsule network layer can calculate the line loss using physical formulas and T-type equivalent circuits, respectively.

[0044] As an example, the physical capsule network layer can adopt a modular design, which may include two core processing units: a line loss capsule and a transformer loss capsule. Each capsule can encapsulate the physical characteristic equations and equivalent circuit models of a specific power device, and interpretable expressions of physical laws can be achieved through parametric calculations.

[0045] As an example, the implementation details of the line loss capsule are as follows: Input parameters: Real-time current I (unit: A), conductor temperature T (unit: °C).

[0046] As an example, the line loss capsule can be used to calculate line loss based on the following formula: ;

[0047]

[0048] in, This is the reference value for conductor resistance at 20℃. Here, T is the temperature coefficient of resistance, I is the conductor temperature, and T is the real-time current.

[0049] As can be seen from the above, the line loss capsule first calculates the current resistance value based on the temperature sensor data. Then, the line loss is calculated by combining the current transformer measurements. .

[0050] As an example, the implementation details of the transformer loss capsule are as follows: Input parameter: load rate (per unit value), oil temperature (Unit: °C)

[0051] As an example, the transformer loss capsule calculates transformer losses based on the following formula: ;

[0052]

[0053] in, For load rate, Oil temperature For temperature-related no-load losses, denoted as the short-circuit loss under rated load, and a, b, and c are coefficients obtained by fitting factory test data.

[0054] As can be seen from the above, the transformer loss capsule first calculates the current iron loss based on the oil temperature. Then, combined with the load rate, the variable copper loss is calculated. Finally, the transformer loss was obtained. .

[0055] As an example, the data capsule network layer can employ a dynamic routing capsule network to learn nonlinear loss characteristics (such as harmonic characteristics, contact resistance characteristics, and environmental characteristics) not covered by the physical capsule network layer. Specifically, harmonic characteristics can be additional losses caused by distortions such as current harmonics (e.g., 3rd harmonic, 5th harmonic); contact resistance characteristics can be loss fluctuations caused by changes in the contact resistance of wire joints; and environmental characteristics can be the effects of temperature and humidity on wire resistance (e.g., high temperature leads to increased resistance).

[0056] As an example, constructing a data capsule network layer may include the following: constructing a feature extraction capsule group; and constructing the data capsule network layer using an attention-based mechanism.

[0057] As an example, the core of the feature extraction capsule group can be to convert the input high-dimensional feature vector into a capsule output with a clear physical meaning through three sets of parallel convolutional capsule layers.

[0058] Specifically, input feature vector The formula after processing with 3 sets of parallel convolutional capsule layers is as follows:

[0059] in, Input feature vector The i-th component (or sub-feature) in the input feature vector It is a high-dimensional feature representation obtained after preprocessing the original input data, with a dimension of n. It is a specific feature element in a high-dimensional vector; Let k be the output vector of the j-th capsule in the l-th subspace (harmonic features, contact resistance features, or environmental features); k is the input feature vector. The number of components in the middle; For trainable convolutional kernels, This is a bias term.

[0060] As an example, the relevant formula for a bidirectional routing protocol based on an attention mechanism is as follows:

[0061] in, The core output represents the attention weight of node i to candidate object j; Let i be the feature vector of node i; Let be the feature vector of candidate object j relative to node i; This is the inner product of vectors, used to quantify the similarity between two vectors. Let k be the feature vector of candidate object k relative to node i; This is a temperature coefficient used to adjust the concentration of weights. The larger the value, the more concentrated the weight is on a few highly similar candidates (differences are amplified). The smaller the value, the more evenly the weight distribution (the difference is weakened);

[0062] in, This is the original feature vector of node i itself; It is a learnable weight matrix or parameter matrix used to map the feature vector of node i to the feature space associated with candidate object j.

[0063] As an example, the aggregated feature vector of candidate object j can be obtained based on the following formula. :

[0064] The output of the data capsule network layer is obtained based on the following formula. (Right now ):

[0065] in, To Normalize to obtain a vector with the same direction and a magnitude of 1; Let be a scaling factor, whose value ranges from [0,1). As the time approaches infinity, the scaling factor approaches 1.

[0066] As an example, validating the output of the physical capsule network layer and the output of the data capsule network layer, and correcting the physical capsule network layer and the data capsule network layer when the verification is abnormal, may include the following: The consistency index between the output of the physical capsule network layer and the output of the data capsule network layer is obtained based on the following formula. :

[0067] in, This is the output of the physical capsule network layer; The output of the data capsule network layer; the outputs of both the physical capsule network layer and the data capsule network layer can be vectors. The norm of a vector, usually the L2 norm, i.e., Euclidean distance, is used to quantify the magnitude or strength of a vector. The absolute difference between the outputs of the physical capsule network layer and the outputs of the data capsule network layer is used to measure their distance in the feature space. This is the maximum value of the output magnitude of the physical capsule network layer and the output magnitude of the data capsule network layer. It is used to normalize the absolute difference and avoid distortion of the difference measurement caused by the excessive strength of the vector itself. When consistency index When the value exceeds a preset threshold (for example, the preset threshold could be 0.3), the physical capsule network layer and the data capsule network layer are corrected as follows: Backpropagation sensitivity analysis was performed on the physical capsule network layer to obtain its parameters. Consistency Indicators gradient Specifically, it can be decomposed using the chain rule into The derivative of a physical characteristic and the physical property with respect to a parameter The derivative of can be efficiently calculated using automatic differentiation tools (such as PyTorch's backward). The parameters of the physical capsule network layer are based on the following formula. Perform correction:

[0068] in, These are the corrected parameters. These are the parameters before correction. For correction factors, This is the output of the physical capsule network layer. This is the output of the data capsule network layer; Reset the coupling coefficient of the abnormal data capsule to its initial value.

[0069] As an example, the parameters of a physical capsule network layer It can include parameters such as the transformation matrix and coupling coefficients of the physical capsule network layer used to calculate the output of the physical capsule network layer.

[0070] As an example, multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model, including: The gated output value is obtained based on the following formula:

[0071] in, This is the gated output value. For activation function, This is the weight matrix for the gating mechanism. This is the concatenation operation between the output of the physical capsule network layer and the output of the data capsule network layer. It is the bias vector; Multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer based on the gated output value:

[0072] in, The predicted value of the obtained physical-data dual-driven capsule network model is represented by ⊙, where ⊙ represents element-wise multiplication.

[0073] It should be noted that the gated output value g can be the fusion weight of the physical capsule network layer at this time, and 1-g can be the fusion weight of the data capsule network layer at this time.

[0074] It should be further explained that, after the output results of the physical capsule network layer and the data capsule network layer have been verified to be normal, multi-scale feature fusion can be performed on the physical capsule network layer and the data capsule network layer based on the gated feature aggregation mechanism. If the output results of the physical capsule network layer and the data capsule network layer are not verified to be normal, the above method needs to be used to correct the physical capsule network layer and the data capsule network layer until the output results of the physical capsule network layer and the data capsule network layer are verified to be normal, and then multi-scale feature fusion can be performed on the physical capsule network layer and the data capsule network layer based on the gated feature aggregation mechanism.

[0075] As an example, before obtaining the physical-data dual-driven capsule network model after multi-scale feature fusion of the physical capsule network layer and the data capsule network layer based on the gated feature aggregation mechanism, the method may further include: dynamically adjusting the fusion weights of the physical capsule network layer and the data capsule network layer using an evidence weight fusion algorithm. This dynamic adjustment of the fusion weights may include the following: The confidence level of the physical capsule network layer output and the membership level of the data capsule network layer output are obtained based on the following formulas: ;

[0076]

[0077] in, The membership degree of the physical capsule network layer output to the k-th cluster. The membership degree of the data capsule network layer output to the k-th cluster. This is the output of the physical capsule network layer. The output of the data capsule network layer. Let be the center vector of the k-th cluster. Let be the variance of the k-th cluster, and K be the total number of clusters. Let l be the center vector of the l-th cluster. Let K be the variance of the l-th cluster, where l ≤ k ≤ K; The squared Euclidean distance between the output of the physical capsule network layer and the center vector of the kth cluster; The squared Euclidean distance between the output of the physical capsule network layer and the center vector of the l-th cluster; The squared Euclidean distance between the output of the data capsule network layer and the center vector of the kth cluster; The squared Euclidean distance between the output of the data capsule network layer and the center vector of the l-th cluster; The Jousselme distance between the membership distribution of the physical capsule network layer output and the membership distribution of the data capsule network layer output is obtained based on the following formula. :

[0078] in, This represents the membership vector output by the physical capsule network layer. This is the transpose of the membership vector of the output of the physical capsule network layer. This represents the membership vector output by the data capsule network layer. Let D be the transpose of the membership vector of the data capsule network layer output, and D be the positive definite weight matrix. A sliding window mechanism is used to dynamically adjust the fusion weights of the physical capsule network layer and the data capsule network layer. The formula for the fusion weights of the physical capsule network layer is as follows:

[0079] in, denoted as the fusion weights of the physical capsule network layer; t represents the time step; [Nn, N] represents the time range of the sliding window, which contains n+1 samples from Nn to N; n+1 represents the total number of samples in the sliding window. The Jousselme distance is the membership distribution between the output of the physical capsule network layer and the output of the data capsule network layer at time t. For indicator functions; Threshold for conflict judgment; The fusion weights of the data capsule network layer are obtained based on the following formula:

[0080] in, For the fusion weights of the data capsule network layer, , which represents the fusion weights of the physical capsule network layer.

[0081] As an example, the fusion weights of the data capsule network layer can also be adjusted based on the following formula: ;

[0082]

[0083] in, The adjusted fusion weights for the data capsule network layer. The fusion weights of the data capsule network layer before adjustment. t represents the initial decay weights of the data capsule network layer, and t represents the number of times the physical-data dual-driven capsule network model has been trained.

[0084] It should be noted that when the fusion weights of the data capsule network layer are adjusted, the fusion weights of the physical capsule network layer are updated accordingly as follows: .

[0085] In step S20, please refer to Figure 1 In step S20, the physical-data dual-driven capsule network model is trained and optimized using historical line loss data.

[0086] As an example, step S20, which uses historical line loss data to train and optimize the physical-data dual-driven capsule network model, may include the following steps: S201~S204.

[0087] S201: Construct a composite loss function, the formula of which is as follows:

[0088] in, To predict error loss, For physical consistency loss, Due to the instability loss caused by dynamic routing, , , These are the weights for prediction error loss, physical consistency loss, and dynamic routing stability loss, respectively.

[0089] S202: Fix the parameters of the data capsule network layer, and optimize only the physical parameters of the physical capsule network layer.

[0090] S203: Adaptive learning strategy is used to jointly fine-tune the physical-data dual-driven capsule network model.

[0091] S204: Incremental learning of the physical-data dual-driven capsule network model is performed using a sliding window.

[0092] As an example, in step S20, historical line loss data is used to train and optimize the physical-data dual-driven capsule network model using optimization algorithms such as gradient descent. The parameters of the physical-data driven capsule network model are adjusted to minimize prediction error and improve line loss prediction accuracy. Specifically, a hierarchical adaptive training strategy can be adopted, using a data-driven framework guided by physical constraints to achieve parameter optimization.

[0093] As an example, in step S201, The prediction error loss can be achieved using an improved Huber loss function:

[0094] Among them, y is the true value, The value is the predicted value, which is 1.5 times the standard deviation of historical data.

[0095] As an example, in step S201, the physical consistency loss Used to calculate the mean square error between the output of the physical network capsule layer and the theoretical value:

[0096] Where N is the number of physical capsules. This is the theoretical value for the i-th physical capsule. This is the output of the i-th physical capsule.

[0097] As an example, in step S201, dynamic routing stability loss It can be measured by the entropy value of the coupling coefficient between capsules, and the corresponding formula is as follows:

[0098] in, denoted as the entropy value of the coupling coefficient between capsules, and k is the number of capsules.

[0099] As an example, in step S203, an adaptive learning strategy can be adopted based on the following formula to jointly fine-tune the physics-data dual-driven capsule network model using cosine annealing:

[0100] in, The initial learning rate, =0.001; Minimum learning rate; t represents the learning rate after joint fine-tuning; T represents the annealing temperature; and t represents the current temperature.

[0101] As an example, before training and optimizing a physical-data dual-driven capsule network model using historical line loss data, a preprocessing step of the historical line loss data can also be included. Specifically, preprocessing can include steps such as outlier detection and correction, multi-source data alignment, adaptive normalization, and feature enhancement.

[0102] As an example, an improved Isolation Forest algorithm can be used for outlier detection, and the specific formula is as follows:

[0103] in, For the sample Path length in an isolated tree This is the standardization factor.

[0104] As an example, the following optimizations can be made based on the characteristics of power data: a) Introduce a sliding window mechanism (the window size can be 24 hours) to construct an isolated tree within the sliding window; b) For continuous variables (such as current), use a piecewise linear kernel function instead of the default Euclidean distance; c) Set dynamic anomaly thresholds.

[0105] As an example, multi-source data alignment can include constructing a timestamp alignment matrix, as shown in the following formula:

[0106] in, The output of the timestamp alignment matrix is ​​a binary value (0 or 1) indicating whether the i-th time feature of the physical capsule network layer matches the j-th time feature of the data capsule network layer. This represents the i-th temporal feature of the physical capsule network layer. This represents the j-th temporal feature of the data capsule network layer. The absolute difference between two time features; This is the time matching threshold.

[0107] As an example, the optimal matching can be solved using the Hungarian algorithm, and its corresponding formula is:

[0108] The constraints are as follows: and .

[0109] As an example, adaptive normalization can include: using a hybrid normalization strategy for different physical quantities; specifically: for current and voltage, using improved Tanh normalization; for temperature, using constrained Min-Max normalization; and for discrete states, using One-Hot encoding.

[0110] As an example, feature enhancement can include generating derived features, specifically current harmonic distortion rate and load imbalance. Load imbalance... The formula can be expressed as follows:

[0111] Among them, I a , I b and I c It is a three-phase current.

[0112] In step S30, please refer to Figure 1 In step S30, line loss prediction is performed based on the trained and optimized physical-data dual-driven capsule network model.

[0113] As an example, real-time power data can be collected, preprocessed, and then input into a trained and optimized physical-data dual-driven capsule network model for line loss prediction. The preprocessing methods for real-time power data can refer to those for historical line loss data preprocessing, and will not be elaborated upon here.

[0114] In another embodiment, please refer to Figure 1 See Figure 2 This application also provides a line loss prediction system based on a physical-data dual-driven capsule network. The system may include: a physical-data dual-driven capsule network model construction module 10 and a training and optimization module 20. The physical-data dual-driven capsule network model construction module 10 is used to construct a physical capsule network layer based on an equivalent circuit model of power equipment, the physical capsule network layer including line loss capsules and transformer loss capsules; construct a data capsule network layer; verify the output results of the physical capsule network layer and the data capsule network layer, and correct the physical capsule network layer and the data capsule network layer when verification is abnormal; perform multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model; the training and optimization module 20 is used to train and optimize the physical-data dual-driven capsule network model using historical line loss data; the trained and optimized physical-data dual-driven capsule network model 10 is used for line loss prediction.

[0115] As an example, please combine Figure 1 and Figure 2 See Figure 3 The physical-data dual-driven capsule network model construction module 10 may include: a physical capsule network layer construction unit 101, a data capsule network layer construction unit 102, a verification and correction unit 103, and a fusion unit 104; wherein, the physical capsule network layer construction unit 101 is used to construct a physical capsule network layer based on the equivalent circuit model of power equipment, the physical capsule network layer including line loss capsules and transformer loss capsules; the data capsule network layer construction unit 102 is used to construct a data capsule network layer; the verification and correction unit 103 is used to verify the output results of the physical capsule network layer and the output results of the data capsule network layer, and to correct the physical capsule network layer and the data capsule network layer when the verification is abnormal; the fusion unit 104 is used to perform multi-scale feature fusion of the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model.

[0116] As an example, the line loss prediction system based on a physical-data dual-driven capsule network in this embodiment can be used to perform tasks such as... Figure 1 The line loss prediction method based on physical-data dual-driven capsule networks described in the relevant embodiments.

[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features of the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0118] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A line loss prediction method based on a physical-data dual-driven capsule network, characterized in that, include: Constructing a physical-data dual-driven capsule network model includes: building a physical capsule network layer based on an equivalent circuit model of power equipment, wherein the physical capsule network layer includes line loss capsules and transformer loss capsules; constructing a data capsule network layer; verifying the output results of the physical capsule network layer and the output results of the data capsule network layer, and correcting the physical capsule network layer and the data capsule network layer when the verification is abnormal; and performing multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model. The physical-data dual-driven capsule network model was trained and optimized using historical line loss data. Line loss prediction is performed based on a trained and optimized physical-data dual-driven capsule network model.

2. The method according to claim 1, characterized in that, The line loss capsule calculates line loss based on the following formula: ; in, This is the reference value for conductor resistance at 20℃. Here, T is the temperature coefficient of resistance, I is the conductor temperature, and T is the real-time current. The transformer loss capsule calculates transformer losses based on the following formula: ; in, For load rate, Oil temperature For temperature-related no-load losses, denoted as the short-circuit loss under rated load, and a, b, and c are coefficients obtained by fitting factory test data.

3. The method according to claim 1, characterized in that, Constructing a data capsule network layer includes: Construct feature extraction capsules; The data capsule network layer is constructed using an attention-based mechanism.

4. The method according to claim 1, characterized in that, The output results of the physical capsule network layer and the data capsule network layer are validated. If an anomaly is detected, the physical capsule network layer and the data capsule network layer are corrected, including: The consistency index between the output of the physical capsule network layer and the output of the data capsule network layer is obtained based on the following formula. : in, This is the output of the physical capsule network layer; This is the output of the data capsule network layer; This represents the absolute difference between the output of the physical capsule network layer and the output of the data capsule network layer. When consistency index When the value exceeds a preset threshold, the physical capsule network layer and the data capsule network layer are corrected as follows: Backpropagation sensitivity analysis was performed on the physical capsule network layer to obtain its parameters. Consistency Indicators gradient ; The parameters of the physical capsule network layer are based on the following formula. Perform correction: in, These are the corrected parameters. These are the parameters before correction. For correction factors, This is the output of the physical capsule network layer. This is the output of the data capsule network layer; Reset the coupling coefficient of the abnormal data capsule to its initial value.

5. The method according to claim 1, characterized in that, Based on a gated feature aggregation mechanism, multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer to obtain the physical-data dual-driven capsule network model, including: The gated output value is obtained based on the following formula: in, This is the gated output value. For activation function, This is the weight matrix for the gating mechanism. This is the concatenation operation between the output of the physical capsule network layer and the output of the data capsule network layer. It is the bias vector; Multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer based on the gated output value: in, The predicted value of the obtained physical-data dual-driven capsule network model is represented by ⊙, where ⊙ represents element-wise multiplication.

6. The method according to claim 1, characterized in that, The physical-data dual-driven capsule network model is trained and optimized using historical line loss data, including: Construct a composite loss function, the formula of which is as follows: in, To predict error loss, For physical consistency loss, Due to the instability loss caused by dynamic routing, , , These are the weights for prediction error loss, physical consistency loss, and dynamic routing stability loss, respectively. The parameters of the data capsule network layer are fixed, and only the physical parameters of the physical capsule network layer are optimized; An adaptive learning strategy is used to jointly fine-tune the physics-data dual-driven capsule network model; A sliding window is used to incrementally learn the physical-data dual-driven capsule network model.

7. The method according to any one of claims 1 to 6, characterized in that, Before obtaining the physical-data dual-driven capsule network model by performing multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on the gated feature aggregation mechanism, the method further includes: dynamically adjusting the fusion weights of the physical capsule network layer and the data capsule network layer using an evidence weight fusion algorithm, including: The confidence level of the physical capsule network layer output and the membership level of the data capsule network layer output are obtained based on the following formulas: ; in, The membership degree of the physical capsule network layer output to the k-th cluster. The membership degree of the data capsule network layer output to the k-th cluster. This is the output of the physical capsule network layer. The output of the data capsule network layer. Let be the center vector of the k-th cluster. Let be the variance of the k-th cluster, and K be the total number of clusters. Let l be the center vector of the l-th cluster. Let K be the variance of the l-th cluster, where l ≤ k ≤ K; The Jousselme distance between the membership distribution of the physical capsule network layer output and the membership distribution of the data capsule network layer output is obtained based on the following formula. : in, This represents the membership vector output by the physical capsule network layer. This is the transpose of the membership vector of the output of the physical capsule network layer. This represents the membership vector output by the data capsule network layer. Let D be the transpose of the membership vector of the data capsule network layer output, and D be the positive definite weight matrix. A sliding window mechanism is used to dynamically adjust the fusion weights of the physical capsule network layer and the data capsule network layer. The formula for the fusion weights of the physical capsule network layer is as follows: in, denoted as the fusion weights of the physical capsule network layer; t represents the time step; [Nn, N] represents the time range of the sliding window, which contains n+1 samples from Nn to N; n+1 represents the total number of samples in the sliding window. The Jousselme distance is the membership distribution between the output of the physical capsule network layer and the output of the data capsule network layer at time t. For indicator functions; Threshold for conflict judgment; The fusion weights of the data capsule network layer are obtained based on the following formula: in, For the fusion weights of the data capsule network layer, , which represents the fusion weights of the physical capsule network layer.

8. The method according to claim 7, characterized in that, The fusion weights of the data capsule network layer are adjusted based on the following formula: ; in, The adjusted fusion weights for the data capsule network layer. The fusion weights of the data capsule network layer before adjustment. t represents the initial decay weights of the data capsule network layer, and t represents the number of times the physical-data dual-driven capsule network model has been trained.

9. A line loss prediction system based on a physical-data dual-driven capsule network, characterized in that, include: A physical-data dual-drive capsule network model construction module is used to construct a physical capsule network layer based on the equivalent circuit model of power equipment, wherein the physical capsule network layer includes line loss capsules and transformer loss capsules; and to construct a data capsule network layer. The output results of the physical capsule network layer and the data capsule network layer are verified. If the verification is abnormal, the physical capsule network layer and the data capsule network layer are corrected. Multi-scale feature fusion is performed on the physical capsule network layer and the data capsule network layer based on the gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model. The training and optimization module is used to train and optimize the physical-data dual-driven capsule network model using historical line loss data; the trained and optimized physical-data dual-driven capsule network model is used for line loss prediction.

10. The line loss prediction system according to claim 9, characterized in that, The physical-data dual-driven capsule network model construction module includes: A physical capsule network layer construction unit is used to construct a physical capsule network layer based on the equivalent circuit model of power equipment. The physical capsule network layer includes line loss capsules and transformer loss capsules. Data capsule network layer building blocks are used to construct data capsule network layers; The verification and correction unit is used to verify the output results of the physical capsule network layer and the output results of the data capsule network layer, and to correct the physical capsule network layer and the data capsule network layer when the verification is abnormal. The fusion unit is used to perform multi-scale feature fusion on the physical capsule network layer and the data capsule network layer based on a gated feature aggregation mechanism to obtain the physical-data dual-driven capsule network model.

Citation Information

Patent Citations

  • Rectal cancer pathology image classification method based on multi-channel collaborative capsule network

    CN111191660A

  • Line loss prediction method and system based on LSTM neural network

    CN111639783A

  • Determining interventional device shape

    CN116472553A

  • Power grid line loss prediction method based on neural network model

    CN116629625A

  • Predictive motion mapping for flexible devices

    CN116670711A