Electric-thermal coupling system fault flow prediction method and system based on domain adaptation
Patent Information
- Application Number
- CN202611282857.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-24
- Publication Date
- 2026-09-25
AI Technical Summary
该类方法具有明确的物理解释,但在大规模电热耦合网络、多故障场景及重复安全校核任务下,计算负担较重,效率低,且对初始值、方程条件数和拓扑变化较为敏感,精度受限
本发明以异构图表达电力网络、热力网络和电热耦合关系,通过故障支路或设备的邻接权重更新显式刻画故障后的拓扑变化;采用双分支特征提取机制保留节点局部状态差异并提取邻域传播信息;在物理状态条件约束下实施领域对抗训练,兼顾统计对齐、物理一致性及运行边界约束,从而提高故障样本稀缺和跨拓扑工况下的多能流预测精度与泛化能力。
Smart Images

Figure CN122817846A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fault power flow prediction technology, and particularly relates to a fault power flow prediction method and system for electrothermal coupling systems based on domain adaptation. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Integrated Energy Systems (IES), as a new energy form that integrates multiple energy carriers such as electricity, heat, and natural gas, effectively improve energy utilization efficiency, promote the consumption of renewable energy, and provide important support for the safe, stable, low-carbon, and efficient operation of energy systems. Multi-energy flow computation, as a prerequisite for IES analysis, optimization, and control, directly determines the scientific validity and effectiveness of IES operation scheduling, system planning, and safety verification, playing an irreplaceable role in improving system operating efficiency and ensuring energy supply security.
[0004] As a crucial component of integrated energy systems, electrothermal coupling systems facilitate energy conversion and coordinated operation between the power and thermal systems through coupling devices such as combined heat and power (CHP) units, electric boilers, heat pumps, and thermal storage devices. The steady-state multi-energy flow distribution of the system is jointly determined by factors including wind power, photovoltaic power, substations, transmission lines, electrical loads, heat sources, heating networks, heat exchange stations, and building heat loads. In extreme situations, sudden events such as transmission line failures, equipment outages, limited heat sources, load overloads, or sudden load changes can occur, altering the network topology and energy transmission paths. Furthermore, power flow redistribution is transmitted to the thermal system via electrothermal coupling devices, causing interconnected changes in state variables such as voltage, phase angle, node temperature, pipeline flow, and branch flow.
[0005] Traditional multi-energy flow computation typically relies on accurate physical models and iterative solution methods. While these methods have clear physical interpretations, they suffer from heavy computational burdens, low efficiency, and sensitivity to initial values, equation condition numbers, and topology changes in large-scale electrothermal coupled networks, multi-fault scenarios, and repetitive safety verification tasks, thus limiting their accuracy.
[0006] Data-driven methods can learn the nonlinear mapping between input operating conditions and power flow states, thereby improving online computation speed and attracting increasing attention and research in the field of integrated energy systems. However, common data-driven methods such as Support Vector Machines (SVM) and Least Linear Squares (LLS) typically represent operating states as vectors and can only convert them into regularly distributed 2D convolutional structures, making it difficult to directly describe the non-Euclidean topology of integrated energy systems and thus difficult to capture the nonlinear relationships within them. Existing graph neural network methods are mostly designed for normal operating conditions or identically distributed samples, and their generalization performance tends to decline when fault samples are scarce or when there are differences between the target topology and the training topology. In addition, existing domain adaptive methods usually focus on the overall feature alignment between the source and target domains, without fully incorporating physical state conditions such as voltage, phase angle, temperature, flow rate, and branch power flow. This can easily lead to situations where statistical distributions are aligned but physical meanings are inconsistent, resulting in prediction results that do not meet the electrothermal balance relationship or operating boundary requirements. Summary of the Invention
[0007] To address the technical problems mentioned above, this invention provides a fault flow prediction method and system for electrothermal coupling systems based on domain adaptation. It uses a heterogeneous graph to represent the power network, thermal network, and electrothermal coupling relationships, explicitly characterizing the topological changes after a fault by updating the adjacency weights of faulty branches or devices. A dual-branch feature extraction mechanism is employed to preserve local state differences of nodes and extract neighborhood propagation information. Domain adversarial training is implemented under physical state constraints, taking into account statistical alignment, physical consistency, and operational boundary constraints, thereby improving the prediction accuracy and generalization ability of multi-energy flow under conditions of scarce fault samples and cross-topology operation.
[0008] To achieve the above objectives, the present invention adopts the following technical solution: The first aspect of the present invention provides a fault power flow prediction method for an electrothermal coupling system based on domain adaptation, comprising: Obtain topology data, equipment parameter data, normal operating condition samples, and fault operating condition samples of the integrated electric and thermal energy system, and construct a heterogeneous graph based on the topology data and equipment parameter data; Normal operating condition samples are constructed as source domain samples, faulty operating condition samples are constructed as target domain samples, and the adjacency weights of the heterogeneous graph are updated based on the faulty branches or faulty equipment in the target domain samples. The source domain heterogeneous graph and the target domain heterogeneous graph are input into a two-branch feature extractor to obtain the node latent representations. Based on the node latent representations, the multi-energy flow state is predicted by a multi-energy flow predictor. A physical state condition vector is constructed based on the multi-energy flow state, and adversarial training is performed through a neighborhood discriminator and a gradient reversal layer to align the distribution of source domain samples and target domain samples under physical state condition constraints. Among them, the neighborhood discriminator learns to distinguish between normal operating conditions in the source domain and fault operating conditions in the target domain, and the feature extractor learns the domain-invariant features that confuse the neighborhood discriminator during backpropagation. Fault flow prediction is performed using a trained bi-branch feature extractor and a multi-energy flow predictor.
[0009] Furthermore, during forward propagation, the gradient inversion layer does not change the input features; during backward propagation, the gradient inversion layer multiplies the gradient from the neighborhood discriminator by a negative coefficient and then passes it to the feature extractor.
[0010] Furthermore, the loss function used during training is a weighted sum of multi-energy flow supervision loss, conditional domain adversarial loss, physical consistency constraint loss, and operational boundary loss.
[0011] Furthermore, the node implicit representation and physical state condition vector are used by a random multilinear mapping module to generate conditional domain discriminant features. These features contain both topological embedding information and power flow state information, which serve as input to the conditional domain discriminator.
[0012] Furthermore, the dual-branch feature extractor includes: a node self-feature branch learning the node's own operational attributes and mechanistic attributes; a topology aggregation feature branch learning the neighborhood topology propagation attributes; concatenating the self-operation attributes, mechanistic attributes, and neighborhood topology propagation attributes; and inputting them into a multilayer perceptron to obtain the node's implicit representation.
[0013] Furthermore, the multi-energy flow state includes at least one of node voltage amplitude, phase angle, supply and return water temperature, pipeline flow rate, branch power flow, and thermal power.
[0014] Furthermore, the topology data includes power network topology, thermal network topology, and the connection relationships of electrothermal coupling devices; The equipment parameter data includes power branch parameters, thermal pipeline parameters, and electrothermal conversion equipment parameters; The heterogeneous graph includes at least power nodes, thermal nodes, coupled device nodes, power branch edges, thermal pipe edges, and electrothermal coupling edges; if there is a power branch edge, thermal pipe edge, or electrothermal coupling edge between two nodes, the corresponding connection weight is set in the adjacency matrix.
[0015] A second aspect of the present invention provides a domain-adaptive fault flow prediction system for electrothermal coupling systems, comprising: The graph construction module is configured to: acquire topology data, equipment parameter data, normal operating condition samples and fault operating condition samples of the integrated electric and thermal energy system, and construct a heterogeneous graph based on the topology data and equipment parameter data. The graph update module is configured to: construct normal operating condition samples as source domain samples, construct fault operating condition samples as target domain samples, and update the adjacency weights of the heterogeneous graph based on the faulty branches or faulty devices in the target domain samples. The training module is configured to: input the source domain heterogeneous graph and the target domain heterogeneous graph into a two-branch feature extractor to obtain the node latent representations; predict the multi-energy flow state through a multi-energy flow predictor based on the node latent representations; construct a physical state condition vector based on the multi-energy flow state, and perform adversarial training through a neighborhood discriminator and a gradient reversal layer to align the distribution of source domain samples and target domain samples under physical state condition constraints; wherein, the neighborhood discriminator learns to distinguish between normal operating conditions in the source domain and fault operating conditions in the target domain, and the feature extractor learns the domain-invariant features that confuse the neighborhood discriminator during backpropagation; The prediction module is configured to perform fault flow prediction using a trained bi-branch feature extractor and a multi-energy flow predictor.
[0016] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the domain-adaptive electrothermal coupling system fault power flow prediction method described above.
[0017] A fourth aspect of the present invention provides a computer device including a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein the processor executes the program to implement the steps in the domain-adaptive electrothermal coupling system fault power flow prediction method described above.
[0018] Compared with the prior art, the beneficial effects of the present invention are: This invention uses heterogeneous graphs to represent power networks, thermal networks, and electrothermal coupling relationships. It explicitly characterizes the topological changes after a fault by updating the adjacency weights of faulty branches or devices. It employs a dual-branch feature extraction mechanism to preserve the local state differences of nodes and extract neighborhood propagation information. Under physical state constraints, it implements domain adversarial training, taking into account statistical alignment, physical consistency, and operational boundary constraints, thereby improving the accuracy and generalization ability of multi-energy flow prediction under fault sample scarcity and cross-topology conditions. Attached Figure Description
[0019] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0020] Figure 1 This is a flowchart of the fault power flow prediction method for an electrothermal coupling system based on domain adaptation, according to Embodiment 1 of the present invention. Figure 2 This is a schematic diagram of the heterogeneous structure of the electrothermal integrated energy system according to Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of the dual-branch feature extraction and conditional neighborhood alignment module in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of the joint optimization training process according to Embodiment 1 of the present invention; Figure 5 This is a schematic diagram of the accuracy distribution of 20 fault topology systems according to Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the inherent prediction accuracy of each system in Embodiment 1 of the present invention; Figure 7 This is a schematic diagram of the structure of a computer device according to Embodiment 4 of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0022] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0023] Terminology Explanation: N-1: The electrothermal coupling system can remain stable even after any independent component (generator, line, transformer, etc.) fails or goes out of service, meaning it will not affect the normal power supply to users or downstream power grids.
[0024] N-2: The electrothermal coupling system can remain stable even after any two independent components fail or are taken out of service, meaning it will not affect the normal power supply to users or downstream power grids.
[0025] Example 1 This embodiment provides a fault flow prediction method for electrothermal coupling systems based on domain adaptation.
[0026] The domain-adaptive electrothermal coupling system fault flow prediction method provided in this embodiment improves prediction accuracy, physical consistency, and cross-domain generalization ability under conditions of scarce fault samples and topology changes by updating heterogeneous topology after a fault, extracting bi-branch features, and conducting domain adversarial training under physical state constraints.
[0027] The domain-adaptive electrothermal coupling system fault flow prediction method provided in this embodiment uses large sample, fully labeled data under normal operating conditions as the source domain and small sample, labeled data of N-1 branch faults, N-2 branch faults, equipment outages, overloads, or limited heating as the target domain. Cross-domain prediction is achieved through heterogeneous topology updates and conditional domain alignment after a fault.
[0028] The fault power flow prediction method for electrothermal coupling systems based on domain adaptation provided in this embodiment, such as Figure 1 As shown, the specific implementation involves the following steps: Step 1: Construct a multi-energy flow model for the integrated electro-thermal energy system. The power subsystem establishes power flow constraints based on node injected power, voltage amplitude, phase angle, and branch admittance; the thermal subsystem establishes hydraulic and thermal constraints based on node thermal power, pipe flow rate, supply and return water temperatures, pipe impedance, and heat dissipation along the pipe; and electro-thermal coupling relationships are established through combined heat and power units, electric boilers, heat pumps, or thermal storage devices.
[0029] Step one, the detailed process of constructing the multi-energy flow model of the integrated electrothermal energy system includes: 1-1: Based on the actual topology of the integrated electrothermal energy system to be analyzed, models of the power subsystem, thermal subsystem, and electrothermal coupling equipment are established. The power subsystem includes components such as power nodes, transmission lines, conventional power sources, wind power, photovoltaic power, and electrical loads; the thermal subsystem includes components such as heat source nodes, thermal pipelines, heat exchange stations, building heat loads, and thermal balance nodes; and the electrothermal coupling equipment includes energy conversion units such as combined heat and power units, electric boilers, heat pumps, and thermal storage devices.
[0030] 1-2: In the power subsystem modeling, the main state variables are node injected active power, reactive power, voltage amplitude, and phase angle. Power flow constraints are established by combining branch impedance, admittance matrix, and node power balance relationships. For power nodes, they can be classified into balancing nodes, PV nodes (voltage-controlled nodes), and PQ nodes (load nodes) based on their operating attributes, with corresponding known and unknown quantities assigned respectively. For transmission lines, branch power flow transmission relationships are described based on parameters such as line resistance, reactance, and susceptance. In the thermal subsystem modeling, the main variables are node thermal power, supply water temperature, return water temperature, pipe segment mass flow rate, pipe resistance coefficient, and friction loss parameters. Hydraulic and thermal balance constraints are established. The hydraulic model describes the flow conservation and pressure drop relationships at each node in the network; the thermal model describes the relationship between heat source output, heat load demand, pipe segment temperature drop, and node mixing temperature. In the electrothermal coupling equipment modeling, coupling equations between the power and thermal sides are established based on the equipment's energy conversion relationships. For combined heat and power (CHP) units, the relationship between electrical power and thermal power is described by the heat-to-power ratio or the thermoelectric coupling curve; for electric boilers and heat pumps, the relationship between input electrical power and output thermal power is described by conversion efficiency. These equipment relationships, along with power and heat network constraints, form part of the physical consistency constraints to ensure that the prediction results meet the energy conversion laws.
[0031] Step 2: Generate or collect samples of normal and fault conditions. Randomly sample wind power, photovoltaic power output, and electrothermal load to obtain multi-energy flow samples under different operating combinations; for fault conditions, set up scenarios such as N-1 branch fault, N-2 branch fault, equipment shutdown, restricted operation, load overload, or limited heating.
[0032] Step two, the detailed process of generating or collecting samples of normal and fault conditions, includes: First, collect or set the basic operating parameters of the integrated electric and thermal energy system, including power network topology, thermal network topology, branch parameters, pipeline parameters, coupling equipment parameters, output range of conventional units, wind power and photovoltaic installed capacity, and basic values of electrical load and thermal load.
[0033] For normal operating conditions, wind power, photovoltaic output, electrical load, and thermal load are randomly sampled to form operating scenarios under different source-load combinations. Wind power output can be obtained from the wind speed probability distribution and wind turbine power curve, photovoltaic output can be obtained from the solar intensity probability distribution, and electrical load and thermal load can be subjected to a certain proportion of random perturbation on the basis of the baseline load.
[0034] To address fault operation conditions, scenarios such as N-1 branch fault, N-2 branch fault, equipment shutdown, branch restricted operation, load overload, or limited heating are set up based on the normal operating condition sample. For branch fault scenarios, the corresponding transmission line or heating pipeline is set to the shutdown state; for equipment shutdown scenarios, the operating capacity of the corresponding coupling equipment or heat source equipment is set to zero; for restricted operation scenarios, its transmission capacity or conversion capacity is reduced according to the degree of restriction.
[0035] When the integrated electrothermal energy system is in normal long-cycle operation, the ambient temperature fluctuates normally, and all equipment operates stably, exhibiting characteristics of a large sample size and complete labeling. This situation is classified as the source domain. When an integrated electric and thermal energy system experiences overload or faces extreme faults, the disconnection of certain branches leads to a step-like decrease in local flow. Because extreme scenarios are rare in multi-energy power systems, it is difficult to collect comprehensive fault flow samples in actual operation, resulting in limited data collection in the target domain. It exhibits the characteristics of "scarce samples and few labels".
[0036] ; ; In the formula: X and Y These represent the input features and the output label values, respectively. and For the first The initial feature inputs of heterogeneous graph nodes and branches corresponding to normal samples and migrating samples (including node load, distributed power output, etc.) and For the corresponding electrothermal power flow status label, the true value or empty label (such as voltage amplitude, phase angle, pipe temperature, etc.); Let be the joint probability distribution of the source domain; Let be the joint probability distribution of the target domain; and These represent the total number of samples in the source and target domains, respectively. This is due to the potential joint probability distribution. and Significant differences exist, which is the fundamental reason for the poor generalization ability of traditional neural networks.
[0037] The existing mechanical power flow calculation method (Newton-Raphson method) is used to solve the above normal and fault conditions, obtaining state variables such as node voltage magnitude, phase angle, branch power flow, supply and return water temperature, pipe mass flow rate, and heat power. These are then used as label data for model training and testing. For the source domain normal condition samples, complete labels are retained; for the target domain fault condition samples, only a few or partial labels are retained to simulate transfer learning scenarios under conditions of scarce fault samples.
[0038] Step 3: Abstract the system into a heterogeneous graph. Power nodes and thermal nodes constitute different node types, and transmission lines, thermal pipelines, and electrothermal coupling relationships constitute different edge types. Node injection power, thermal power, load, and renewable energy output are used as node features, while line impedance, pipeline resistance coefficient, heat transfer coefficient, and conversion equipment efficiency are used as edge or equipment features.
[0039] Heterogeneous graphs include at least power nodes, thermal nodes, coupled device nodes, power branch edges, thermal pipe edges, and electrothermal coupling edges, as well as corresponding binary calorific value codes to distinguish different classification features.
[0040] Step three details the process of abstracting the integrated electrothermal energy system into a heterogeneous diagram, as follows: Figure 2 As shown, the integrated electrothermal energy system is represented as a heterogeneous graph structure, where power nodes, thermal nodes, and coupling device nodes constitute the node set, and transmission lines, thermal pipelines, and electrothermal coupling relationships constitute the edge set. This graph structure describes the physical connections between the power network, thermal network, and electrothermal coupling devices.
[0041] Construct a node feature matrix. For power nodes, the node features should include at least node type code, active power injection, reactive power injection, load power, and renewable energy output. For thermal nodes, the node features should include at least node type code, heat load, heat source output, initial supply water temperature, and initial return water temperature. For coupled equipment nodes, the node features may include equipment type code, rated power, conversion efficiency, and operating status.
[0042] Construct a set of edge features. For power branch edges, the edge features should include at least line resistance, reactance, susceptance, and rated transmission capacity; for thermal pipeline edges, the edge features should include at least pipeline length, pipe diameter, resistance coefficient, heat transfer coefficient, and maximum allowable flow rate; for electrothermal coupling edges, the edge features should include at least conversion efficiency, thermoelectric ratio, rated capacity, and upper and lower limits of equipment operation.
[0043] A heterogeneous adjacency matrix or adjacency weight set is constructed based on the physical connections between nodes. If two nodes are connected by power transmission lines, heating pipes, or coupling equipment, corresponding connection weights are set in the adjacency matrix; otherwise, the corresponding weights are zero. This results in heterogeneous graph data containing a set of nodes, a set of edges, an adjacency matrix, a node feature matrix, and a set of edge features.
[0044] Step 4: Update heterogeneous adjacency weights based on the target domain's fault status. For lines, pipelines, or equipment that have completely exited the network, reset the corresponding adjacency weights to zero; for branches with limited operation or equipment with reduced switching capacity, decrease the adjacency weights according to the degree of limitation, so that the target domain's heterogeneous graph can reflect the topology changes and energy transmission path reconstruction after the fault.
[0045] Step four, the detailed process of updating heterogeneous adjacency weights for the target domain fault state includes: 4-1: Based on the fault types given in the fault samples of the target domain, identify the faulty transmission lines, heating pipelines, coupling equipment, or energy equipment, and form a fault set. The fault set should include at least the fault object number, fault type, fault location, and fault impact.
[0046] 4-2: When the target domain sample is N-1 or N-2 branches that have completely exited the fault, the adjacency weights corresponding to the faulty branches are reset to zero to indicate that the branches no longer participate in energy transmission after the fault. If the faulty object is an electrothermal coupling device, the corresponding electrothermal coupling edge weights are reset to zero to indicate that the coupling channel between the power system and the thermal system is interrupted.
[0047] 4-3: When the target domain sample is experiencing branch-limited operation, reduced equipment capacity, or decreased conversion efficiency, the corresponding connection relationship is not directly deleted. Instead, the adjacency weights are attenuated according to the degree of limitation. For example, when a branch can only operate at a portion of its rated capacity, its adjacency weight is multiplied by the corresponding capacity attenuation coefficient; when the conversion capability of the coupled equipment decreases, the weight of the corresponding coupled edge is adjusted according to the proportion of the equipment's available capacity.
[0048] 4-4: Through the adjacency weight update method described above, a heterogeneous fault graph of the target domain is obtained, which can explicitly reflect the changes in network topology, energy transmission path reconstruction, and equipment operating capacity after a fault. This updated heterogeneous graph serves as the input for subsequent target domain feature extraction and fault flow prediction.
[0049] Under normal operating conditions, the topology of the integrated electric and thermal energy system consists of an adjacency matrix. This indicates that a heterogeneous graph of the source domain is obtained; for the line fault scenario, the adjacency matrix is: This yields a heterogeneous graph of the target domain; where, Indicates the first The change terms in the adjacency matrix corresponding to each faulty line This indicates which fault situation has occurred.
[0050] Heterogeneous graphs can be represented as ,in, Indicates the domain type. Represents a set of nodes. Denotes the set of edges. This represents a heterogeneous adjacency matrix or adjacency weight set. Represents the node feature matrix, This represents a set of characteristics of a branch or device.
[0051] Step 5: Input the source domain heterogeneous map and the target domain heterogeneous map into the two-branch feature extractor, such as... Figure 3 As shown, the node's own feature branch learns its own operational and mechanistic attributes, while the topology aggregation feature branch learns the neighborhood topology propagation attributes. These two types of features are concatenated and input into a multilayer perceptron to obtain a discriminative and transferable latent representation of the node. This structure avoids premature smoothing of the node's own mutation information by neighborhood aggregation, which is beneficial for identifying local state changes under the influence of faults.
[0052] In step five, the source domain heterogeneous map and the target domain heterogeneous map are input into the dual-branch feature extractor, such as... Figure 3 As shown. The dual-branch feature extractor includes a node-specific feature branch and a topology aggregation feature branch. The node-specific feature branch extracts the node's local operational and mechanistic attributes, while the topology aggregation feature branch aggregates information from neighboring nodes and edges based on adjacency relationships, thereby describing the changes in the energy propagation path after a fault disturbance. ; ; In the formula, Indicates the node at the 1st The layer's own mechanism is embedded; and These are the learnable parameters of the feature extractor; It is a non-linear activation function; Represents a node The neighborhood aggregation property (i.e., the neighborhood topology propagation property). Represents the original input features; Representation of domain The number of nodes in; Representation of domain Next node With nodes Topological proximity between them.
[0053] In the node's own feature branch, the node feature matrix is input into a multilayer perceptron or nonlinear mapping network to obtain the node's own mechanism embedding. This branch does not directly perform neighborhood smoothing, which can preserve the abrupt change information of the node's local state after the fault occurs, and avoid the excessive averaging of local abnormal features during the early feature propagation process.
[0054] In the topology aggregation feature branch, neighborhood information is aggregated based on the heterogeneous adjacency matrix corresponding to the source or target domain. For different types of edges, different weight matrices or message passing functions can be set to ensure that power lines, thermal pipes, and electrothermal coupling relationships maintain their respective physical meanings during feature propagation.
[0055] The node's intrinsic mechanism embedding and topological aggregation embedding are concatenated and then input into a multilayer perceptron for feature fusion to obtain the node's latent representation. This latent node representation... h i,d It also includes the local running status of the node. Information propagation with neighborhood topology It can be used for subsequent multi-energy flow prediction and neighborhood alignment: ; in, W c and b c These are the learnable parameters of the feature extractor.
[0056] Step Six: Input the node implicit representation into the multi-energy flow predictor, and output at least one state prediction result among node voltage amplitude, phase angle, supply and return water temperature, pipe flow rate, branch power flow, and thermal power. Then, normalize the predicted state into a physical state condition vector, and combine it with the node implicit representation through random multilinear mapping to form a conditional neighborhood discriminant feature.
[0057] In step six, the node implicit representations output by the dual-branch feature extractor are input into the multi-energy flow predictor. The multi-energy flow predictor can consist of a multilayer perceptron, a linear output layer, or a node-type-dependent output head, and is used to predict the state variables of the power system and the thermal system, respectively.
[0058] For power nodes, the prediction results should include at least the node voltage magnitude and phase angle; for power branches, the prediction results should include at least the active power flow and reactive power flow; for thermal nodes, the prediction results should include at least the supply water temperature, return water temperature, and node thermal power; for thermal pipelines, the prediction results should include at least the pipeline mass flow rate; and for electrothermal coupling equipment, the prediction results should include at least the electrical power, thermal power, and their conversion relationship.
[0059] Multi-energy flow prediction results Normalization is performed to obtain normalized prediction results. and combined with the hidden representation of nodes Forming physical state condition vectors This physical state condition vector is used to characterize the operational features of the current sample at the physical state level, including voltage, phase angle, temperature, flow rate, and branch power flow. This ensures that subsequent neighborhood alignment focuses not only on the distribution of statistical features but also on the consistency of distribution under physical state conditions. To enable the neighborhood discriminator... Simultaneously, node features are perceived and the physical state region of the node is further determined. Here, random multilinear mapping is used to construct physical state condition interaction features.
[0060] ; ; In the formula, and It is a random mapping matrix. For the mapped interaction dimension, It represents the Hadamardi (or Hadama) stack; This represents the neighborhood probability output by the neighborhood discriminator. q i,d This represents the normalized prediction result; G D This represents the domain discriminator.
[0061] The implicit representations of nodes and the physical state condition vectors are input into the random multilinear mapping module to generate conditional neighborhood discriminant features. These features contain both topological embedding information and power flow state information, and can be used as input to the conditional neighborhood discriminator to achieve distribution alignment between the source and target domains under physical state condition constraints.
[0062] Step 7: Implement adversarial training using a conditional domain discriminator and a gradient inversion layer. The domain discriminator learns to distinguish between normal operating conditions in the source domain and fault conditions in the target domain, while the feature extractor learns to obfuscate the domain-invariant features of the domain discriminator during backpropagation, causing fault samples in the target domain to be distributed closer to samples in the source domain under similar physical conditions.
[0063] In step seven, adversarial training is implemented using a conditional domain discriminator and a gradient inversion layer, such as... Figure 3 As shown, the conditional neighborhood discriminant features corresponding to the source domain samples and target domain samples are input into the neighborhood discriminator. The neighborhood discriminator is used to determine whether the input features come from the normal operating condition of the source domain or the fault condition of the target domain, and outputs the corresponding neighborhood classification result.
[0064] During training, the goal of the domain discriminator is to distinguish between source and target domain samples as accurately as possible; while the goal of the feature extractor is to generate domain-invariant features that are difficult for the domain discriminator to distinguish. To achieve this adversarial process, a gradient inversion layer is set between the domain discriminator and the feature extractor.
[0065] During forward propagation, the gradient inversion layer does not change the input features; during backward propagation, the gradient inversion layer (GRL) multiplies the gradient from the neighborhood discriminator by a negative coefficient and passes it to the feature extractor, enabling the feature extractor to gradually learn the implicit feature representation shared by the source and target domains during the optimization process.
[0066] Through conditional domain adversarial training, the target domain fault samples can be distributed closer to the source domain samples under similar physical conditions, thereby reducing the difference in feature distribution between normal and fault conditions caused by topological changes and power flow redistribution, and improving the model's predictive ability in low-label fault scenarios.
[0067] Step 8: As Figure 3 As shown, the model jointly minimizes the source domain supervision loss, the target domain few-label supervision loss, the conditional domain adversarial loss, and the physical consistency constraint loss. The physical consistency constraints include at least power balance, thermal-hydraulic balance, and thermal-thermal balance. After training, inputting new fault conditions into the model will output the corresponding fault power flow prediction results.
[0068] Step eight, the detailed process of jointly minimizing multiple types of losses and predicting fault flow includes: Constructing multi-energy flow monitoring loss For source domain normal operating condition samples, the source domain supervision loss is calculated using complete power flow labels, so that the voltage amplitude, phase angle, node temperature, pipeline flow and branch power flow predicted by the model are close to the actual power flow results; for target domain fault samples with few labels, the target domain supervision loss is calculated using its few labels, so that the model can learn the local power flow change law under fault conditions.
[0069] Constructing Physical Consistency Constraint Loss This loss includes at least the residuals of power balance, thermal-hydraulic balance, thermal-thermal balance, and energy conversion relationships of coupled equipment. Specifically, the power balance residuals constrain the consistency between node injected power and branch flow; the thermal-hydraulic balance residuals constrain the flow conservation at nodes and the pressure drop relationship in pipe sections; the thermal-thermal balance residuals constrain the relationship between heat sources, heat loads, supply and return water temperatures, and heat losses in pipe sections; and the energy conversion residuals of coupled equipment constrain the electrothermal conversion laws of combined heat and power (CHP), electric boilers, heat pumps, and thermal storage devices.
[0070] ; ; In the formula, This indicates the actual multi-energy flow state label corresponding to the sample. This indicates the model's prediction results; This represents the power balance residual of the power system; This represents the hydraulic and thermal balance residuals of a thermal system. λ represents the residuals of operating boundary constraints for variables such as voltage magnitude, branch power flow, pipeline flow rate, and node temperature; e , λ h , λ b Each represents its corresponding weight coefficient; N represents the number of samples.
[0071] Constructing a conditional domain to combat loss According to the domain discriminator The difference between the output and the real domain label is used to calculate the domain classification loss. The gradient reversal layer is used to achieve adversarial optimization between the feature extractor and the domain discriminator, so that the source domain and the target domain gradually achieve distribution alignment under the constraints of physical state conditions.
[0072] ; ; In the formula, , , These are the weight coefficients for the target domain few-sample supervision loss, the physical consistency constraint loss, and the conditional adversarial domain loss, respectively, to balance the contributions of different modules; N S and N t These are the sample sizes in their respective fields; Z i,s and Z i,t They are physical state variables in their respective fields.
[0073] Multi-current monitoring loss (source domain monitoring loss) Loss of supervision due to fewer labels in the target domain The overall training objective L of the model is obtained by weighted summation of the conditional domain adversarial loss and the physical consistency constraint loss. The parameters of the bi-branch feature extractor, multi-energy flow predictor, and conditional domain discriminator are updated through backpropagation algorithm and optimizer until the training loss converges or the preset training rounds are reached.
[0074] After training is complete, the trained bi-branch feature extractor and multi-energy flow predictor are saved. In the online prediction phase, for new fault conditions, the heterogeneous adjacency weights are first updated according to the faulty line, faulty pipeline, or faulty equipment to form a new target domain fault heterogeneous graph. Then, the updated node features, edge features, and adjacency relationships are input into the trained model, and the predicted multi-energy flow states such as voltage amplitude, phase angle, node temperature, pipeline flow, branch power flow, and thermal power after the fault are directly output.
[0075] The above prediction process does not require rebuilding the complete mechanism iterative solution process for new fault scenarios, nor does it require retraining an independent model for each fault topology. Through heterogeneous topology updates, bi-branch feature extraction, and conditional domain alignment, the model can adapt to fault flow prediction tasks with flexible topology changes and improve prediction accuracy, physical consistency, and generalization ability under conditions of few labeled fault samples.
[0076] The domain-adaptive power flow prediction method for electrothermal coupled systems provided in this embodiment involves simultaneously inputting normal operating condition samples from the source domain and N-1 fault operating condition samples from the target domain into the model during training. The graph neural network first extracts latent node representations based on node features, edge features, and topological adjacency relationships. A multi-energy flow predictor outputs the power and thermal state variables based on these latent representations. A domain discriminator aligns the feature distributions of the source and target domains through adversarial training. Physical consistency constraints and operational boundary constraints further refine the model's learning direction. Through joint optimization, the model can not only learn the multi-energy flow mapping relationships under normal operating conditions but also adapt to topological changes and power flow distribution shifts under fault conditions.
[0077] This embodiment abstracts the integrated electrothermal energy system into a heterogeneous graph structure containing power nodes, thermal nodes, power branch edges, thermal pipe edges, and electrothermal coupling edges. A cross-domain learning dataset is constructed using normal operating condition samples from the source domain and fault operating condition samples from the target domain. A dual-branch feature extractor is used to extract the node's own operating attributes and the neighboring topology propagation attributes, respectively. A multi-energy flow predictor outputs state variables such as voltage, phase angle, temperature, flow rate, and branch power flow. Domain adversarial training under physical state constraints is used to align the distribution of the source and target domains. Finally, through joint optimization using multiple loss functions, the model can achieve fast, accurate, and physically consistent fault power flow prediction under conditions of scarce fault samples and topology changes.
[0078] A coupled system consisting of an IEEE 30-node power network and a 23-node heating network, or a coupled system consisting of an IEEE 69-node power network and an 18-node heating network, was used as a case study. The source domain was formed by random sampling under normal operating conditions, and the N-1 and N-2 fault scenarios were used as the target domain to verify the predictive performance of the model under topology changes and operational distribution shifts.
[0079] like Figure 4 The convergence curve of the model error mean absolute error (MAE) with training epochs is shown. Two sets of variables are set up to compare the results with and without transfer learning. There are 20 simulation examples of different system topologies. Each curve is the MAE time series of a complete training of a set of topologies. The interval is filled with the mean curve + 10%~90% quantile to reflect the fluctuation of results brought about by different topologies.
[0080] like Figure 5 The accuracy distribution of 20 topological systems is shown. Red represents the MAE using domain adaptation. It can be seen that the use of transfer learning in different scenarios has brought about an improvement in accuracy, with an average improvement of 28.3%.
[0081] like Figure 6 From MAE, mean absolute percentage error (MAPE), and fit coefficient respectively The raw values and normalized error burden of the three evaluation indicators demonstrate the model's inherent prediction accuracy in electric, thermal, and integrated energy systems. The color represents the normalized error, and the cell number represents the raw indicator. It is clear that the error in the thermal subsystem is generally higher than that in the electric subsystem, indicating that the prediction of the heating network itself is more difficult.
[0082] Example 2 The domain-adaptive electrothermal coupling system fault flow prediction system provided in this embodiment includes: The graph construction module is configured to: acquire topology data, equipment parameter data, normal operating condition samples and fault operating condition samples of the integrated electric and thermal energy system, and construct a heterogeneous graph based on the topology data and equipment parameter data. The graph update module is configured to: construct normal operating condition samples as source domain samples, construct fault operating condition samples as target domain samples, and update the adjacency weights of the heterogeneous graph based on the faulty branches or faulty devices in the target domain samples. The training module is configured to: input the source domain heterogeneous graph and the target domain heterogeneous graph into a two-branch feature extractor to obtain the node latent representations; predict the multi-energy flow state through a multi-energy flow predictor based on the node latent representations; construct a physical state condition vector based on the multi-energy flow state, and perform adversarial training through a neighborhood discriminator and a gradient reversal layer to align the distribution of source domain samples and target domain samples under physical state condition constraints; wherein, the neighborhood discriminator learns to distinguish between normal operating conditions in the source domain and fault operating conditions in the target domain, and the feature extractor learns the domain-invariant features that confuse the neighborhood discriminator during backpropagation; The prediction module is configured to perform fault flow prediction using a trained bi-branch feature extractor and a multi-energy flow predictor.
[0083] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, and their specific implementation processes are the same, so they will not be repeated here.
[0084] Example 3 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the domain-adaptive electrothermal coupling system fault flow prediction method described in Embodiment 1 above.
[0085] Example 4 This embodiment provides a computer device, such as... Figure 7As shown, the system includes a computer-readable storage medium 1003, a processor 1001, a communication interface 1002, and a computer program stored on the computer-readable storage medium 1003 and executable on the processor 1001. The processor 1001, communication interface 1002, and computer-readable storage medium 1003 can be connected via a bus or other means. The communication interface 1002 is used to receive and send data. When the processor 1001 executes the program, it implements the steps in the domain-adaptive electrothermal coupling system fault flow prediction method described in Embodiment 1 above.
[0086] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A fault power flow prediction method for electrothermal coupling systems based on domain adaptation, characterized in that, include: Obtain topology data, equipment parameter data, normal operating condition samples, and fault operating condition samples of the integrated electric and thermal energy system, and construct a heterogeneous graph based on the topology data and equipment parameter data; Normal operating condition samples are constructed as source domain samples, faulty operating condition samples are constructed as target domain samples, and the adjacency weights of the heterogeneous graph are updated based on the faulty branches or faulty equipment in the target domain samples. The source domain heterogeneous graph and the target domain heterogeneous graph are input into a two-branch feature extractor to obtain the node latent representations. Based on the node latent representations, the multi-energy flow state is predicted by a multi-energy flow predictor. A physical state condition vector is constructed based on the multi-energy flow state, and adversarial training is performed through a neighborhood discriminator and a gradient reversal layer to align the distribution of source domain samples and target domain samples under physical state condition constraints. Among them, the neighborhood discriminator learns to distinguish between normal operating conditions in the source domain and fault operating conditions in the target domain, and the feature extractor learns the domain-invariant features that confuse the neighborhood discriminator during backpropagation. Fault flow prediction is performed using a trained bi-branch feature extractor and a multi-energy flow predictor.
2. The fault power flow prediction method for electrothermal coupling systems based on domain adaptation as described in claim 1, characterized in that, During forward propagation, the gradient inversion layer does not change the input features; during backward propagation, the gradient inversion layer multiplies the gradient from the neighborhood discriminator by a negative coefficient and then passes it to the feature extractor.
3. The fault power flow prediction method for electrothermal coupling systems based on domain adaptation as described in claim 1, characterized in that, The loss function used during training is a weighted sum of multi-energy flow supervision loss, conditional domain adversarial loss, physical consistency constraint loss, and operational boundary loss.
4. The fault power flow prediction method for electrothermal coupling systems based on domain adaptation as described in claim 1, characterized in that, The node implicit representation and physical state condition vector are used to generate conditional domain discriminant features through a random multilinear mapping module. The conditional domain discriminant features contain both topological embedding information and power flow state information, which serve as the input to the conditional domain discriminator.
5. The fault power flow prediction method for electrothermal coupling systems based on domain adaptation as described in claim 1, characterized in that, The dual-branch feature extractor includes: a node self-feature branch that learns the node's own operational attributes and mechanistic attributes; a topology aggregation feature branch that learns the neighborhood topology propagation attributes; and concatenation of the self-operation attributes, mechanistic attributes, and neighborhood topology propagation attributes, which are then input into a multilayer perceptron to obtain the node's implicit representation.
6. The fault power flow prediction method for electrothermal coupling systems based on domain adaptation as described in claim 1, characterized in that, The multi-energy flow state includes at least one of node voltage amplitude, phase angle, supply and return water temperature, pipeline flow rate, branch power flow, and thermal power.
7. The fault power flow prediction method for electrothermal coupling systems based on domain adaptation as described in claim 1, characterized in that, The topology data includes power network topology, thermal network topology, and the connection relationships of electrothermal coupling devices; The equipment parameter data includes power branch parameters, thermal pipeline parameters, and electrothermal conversion equipment parameters; The heterogeneous graph includes at least power nodes, thermal nodes, coupled device nodes, power branch edges, thermal pipe edges, and electrothermal coupling edges; if there is a power branch edge, thermal pipe edge, or electrothermal coupling edge between two nodes, the corresponding connection weight is set in the adjacency matrix.
8. A domain-adaptive electrothermal coupling system for fault power flow prediction, characterized in that, include: The graph construction module is configured to: acquire topology data, equipment parameter data, normal operating condition samples and fault operating condition samples of the integrated electric and thermal energy system, and construct a heterogeneous graph based on the topology data and equipment parameter data. The graph update module is configured to: construct normal operating condition samples as source domain samples, construct fault operating condition samples as target domain samples, and update the adjacency weights of the heterogeneous graph based on the faulty branches or faulty devices in the target domain samples. The training module is configured to: input the source domain heterogeneous graph and the target domain heterogeneous graph into a two-branch feature extractor to obtain the node latent representations; predict the multi-energy flow state through a multi-energy flow predictor based on the node latent representations; construct a physical state condition vector based on the multi-energy flow state, and perform adversarial training through a neighborhood discriminator and a gradient reversal layer to align the distribution of source domain samples and target domain samples under physical state condition constraints; wherein, the neighborhood discriminator learns to distinguish between normal operating conditions in the source domain and fault operating conditions in the target domain, and the feature extractor learns the domain-invariant features that confuse the neighborhood discriminator during backpropagation; The prediction module is configured to perform fault flow prediction using a trained bi-branch feature extractor and a multi-energy flow predictor.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the fault flow prediction method for electrothermal coupled systems based on domain adaptation as described in any one of claims 1-7.
10. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the fault flow prediction method for electrothermal coupled systems based on domain adaptation as described in any one of claims 1-7.