PINN model construction method for electrothermal coupling dynamic energy flow calculation and related device
By introducing parameter training network and soft update rules into the PINN model, the weight values of each constraint rule in the loss function are dynamically adjusted, and the problems of high training cost and low accuracy of PINN network in the prior art are solved, and a more efficient and accurate solution to partial differential equations of the electrothermal coupled system are achieved.
Patent Information
- Application Number
- CN202411992652.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
When using physical information neural network (PINN) to solve partial differential equations in the electrothermal coupled system, the prior art lacks an effective method to give the weight values of each constraint rule in the loss function, resulting in high network training cost and low calculation accuracy.
By introducing a special parameter training network, the weight values of each constraint rule in the PINN model loss function are dynamically calculated, and a soft update rule is designed to iteratively update the weight values to improve the training efficiency and accuracy of the network.
The resolution accuracy of the PINN network for the partial differential equation system of the electrothermal coupled system is improved, the training cost is reduced, and the generalization ability and adaptability of the network are improved.
Smart Images

Figure CN119783749A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electrothermal coupling system modeling, and in particular relates to a PINN model construction method and related devices for electrothermal coupling dynamic energy flow calculation. Background Art
[0002] The electrothermal coupling system is composed of the coupling of electrical and thermal energy subsystems. The modeling and analysis of the network is an important basis for the optimized operation of the energy system. Among them, an important difficulty faced in the characterization of the characteristics of multi-energy networks is that the network contains many branches and nodes, and each branch and each node requires complex partial differential equations to describe the transmission characteristics.
[0003] In recent years, deep neural networks have become a research hotspot in the field of solving direct and inverse problems of partial differential equations. Raissi et al. proposed a physics-informed neural network (PINN) as a method for solving partial differential equations driven by the fusion of data and mechanism, which has been widely used in many fields. Explanatory speaking, the core of PINN is to introduce the control equations of the physical system, the initial conditions of the control equations, the boundary conditions and experimental observation data into the loss function of the neural network with certain weights, so that the network can output high-quality solutions that satisfy the control equations, boundary conditions and observation data through network training; compared with traditional grid-based methods (for example, finite difference, finite element and other methods), PINN directly uses automatic differentiation based on the chain differentiation rule to calculate the spatiotemporal derivatives, which can avoid the problems of grid generation and grid quality affecting the solution accuracy in grid-based methods; however, the training of PINN requires a large number of optimization iterations, especially in the actual training of PINN networks for solving partial differential equations of electrothermal coupling systems, there is a lack of effective given methods for the weight values of constraint rules such as control equations, initial conditions, boundary conditions and experimental observation data in the loss function (explanatory speaking, they are generally given manually or randomly at present), which increases the cost of network training and also affects the network calculation accuracy. Summary of the invention
[0004] The purpose of the present invention is to provide a PINN model construction method and related devices for electrothermal coupling dynamic energy flow calculation to solve one or more of the above-mentioned technical problems. The improved PINN model of the present invention can be used to quickly solve the partial differential equations in the characteristic calculation of the electrothermal coupling system; wherein, the PINN model construction method of the present invention calculates the weight value of each constraint rule in the PINN model loss function through a special parameter training network, which can improve the accuracy of solving the partial differential equations.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a PINN model construction method for electrothermal coupling dynamic energy flow calculation, comprising the following steps:
[0007] Obtain an electrothermal coupling branch model;
[0008] Constructing a deep neural network as the main body of the PINN model; wherein the deep neural network is used to input relevant electrothermal input parameters in the electrothermal coupling branch model and output predicted electrothermal coupling dynamic energy flow results;
[0009] The PINN model is trained based on a defined loss function using a pre-acquired training data set, and after reaching a preset convergence condition, a constructed PINN model for electrothermal coupling dynamic energy flow calculation is obtained;
[0010] Among them, the expression of the defined loss function Loss is:
[0011]
[0012] In the formula, loss r,i 、loss IC,j 、loss BC,p and loss Data,q They represent the partial differential equation deviation, initial condition deviation, boundary condition deviation and observation or simulation data deviation in the PINN model respectively. The subscripts i, j, p and q represent the loss r,i 、loss IC,j 、loss BC,p and loss Data,q The deviation of the i-th mechanism partial differential equation, the deviation of the j-th initial condition, the deviation of the p-th boundary condition, and the deviation of the q-th observation or simulation data; N1, N2, N3, N4 represent the number of mechanism equations, the number of initial conditions, the number of boundary conditions, and the number of observation or simulation data, respectively; λ i , j , p , q They represent loss respectively. r,i 、loss IC,j 、loss BC,p and loss Data,q The weight value of
[0013] λ i , j , p , q The weight values are given by the parameter training network;
[0014] The parameter training network consists of M fully connected layers, which are connected to the softmax function and output weight value results.
[0015] A further improvement of the present invention is that the input of the parameter training network is the instantaneous loss output by the PINN model in the loss function of the PINN model. r 、loss IC 、loss BC and loss Data , the output is the predicted weight value of each loss item in the loss function of the PINN model; during the training process of the parameter training network, the loss function of the parameter training network is back-propagated to continuously update the internal parameters of the parameter training network;
[0016] Among them, the loss function Loss of the parameter training network C Defined as:
[0017]
[0018] Where, subscript C is the parameter training network identifier, λ C,i , C,j , C,p , C,q Respectively represent the loss output by the parameter training network r,i 、loss IC,j 、loss BC,p 、loss Data,q The weight value of .
[0019] A further improvement of the present invention is that the step of using a pre-acquired training data set to train the PINN model based on a defined loss function, and after reaching a preset convergence condition, obtaining a constructed PINN model for electrothermal coupling dynamic energy flow calculation comprises:
[0020] Based on the training data set, relevant electrothermal input parameters are input into the PINN model;
[0021] Loss function calculated by PINN model output for and The weighted sum of is given randomly, denoted as storage and sequence; will and The sequence is used as the input of the parameter training network, and the output of the parameter training network is the predicted weight value of each loss item in the loss function of the PINN model, denoted as When the Loss calculated by the PINN network A When the value increases for P consecutive rounds, the loss function Loss obtained in the calculation that makes the parameter training networkC Smallest Through soft update Update, the updated weight parameter is λ A 1 Substitute and participate in PINN model calculation;
[0022] The loop is iterated until the PINN model converges.
[0023] A further improvement of the present invention is that the calculation formula of the soft update method is:
[0024]
[0025] μ+γ=1;
[0026] Where μ and γ are hyperparameters.
[0027] In a second aspect, the present invention provides a PINN model construction system for electrothermal coupling dynamic energy flow calculation, comprising:
[0028] An acquisition module, used for acquiring an electrothermal coupling branch model;
[0029] A PINN model construction module, used to construct a deep neural network as the main body of the PINN model; wherein the deep neural network is used to input relevant electrothermal input parameters in the electrothermal coupling branch model and output predicted electrothermal coupling dynamic energy flow results;
[0030] A training module, used to train the PINN model based on a defined loss function using a pre-acquired training data set, and to obtain a constructed PINN model for electrothermal coupling dynamic energy flow calculation after reaching a preset convergence condition;
[0031] Among them, the expression of the defined loss function Loss is:
[0032]
[0033] In the formula, loss r,i 、loss IC,j 、loss BC,p and loss Data,q They represent the partial differential equation deviation, initial condition deviation, boundary condition deviation and observation or simulation data deviation in the PINN model respectively. The subscripts i, j, p and q represent the loss r,i 、loss IC,j 、loss BC,p and loss Data,qThe deviation of the i-th mechanism partial differential equation, the deviation of the j-th initial condition, the deviation of the p-th boundary condition, and the deviation of the q-th observation or simulation data; N1, N2, N3, N4 represent the number of mechanism equations, the number of initial conditions, the number of boundary conditions, and the number of observation or simulation data, respectively; λ i , j , p , q They represent loss respectively. r,i 、loss IC,j 、loss BC,p and loss Data,q The weight value of
[0034] λ i , j , p , q The weight values are given by the parameter training network;
[0035] The parameter training network consists of M fully connected layers, which are connected to the softmax function and output weight value results.
[0036] A further improvement of the present invention is that the input of the parameter training network is the instantaneous loss output by the PINN model in the loss function of the PINN model. r 、loss IC 、loss BC and loss Data , the output is the predicted weight value of each loss item in the loss function of the PINN model; during the training process of the parameter training network, the loss function of the parameter training network is back-propagated to continuously update the internal parameters of the parameter training network;
[0037] Among them, the loss function Loss of the parameter training network C Defined as:
[0038]
[0039] Where, subscript C is the parameter training network identifier, λ C,i , C,j , C,p , C,q Respectively represent the loss output by the parameter training network r,i 、loss IC,j 、loss BC,p 、loss Data,q The weight value of .
[0040] A further improvement of the present invention is that, in the training module, the step of using a pre-acquired training data set to train the PINN model based on a defined loss function, and after reaching a preset convergence condition, obtaining a constructed PINN model for electrothermal coupling dynamic energy flow calculation comprises:
[0041] Based on the training data set, relevant electrothermal input parameters are input into the PINN model;
[0042] Loss function calculated by PINN model output for and The weighted sum of is given randomly, denoted as storage and sequence; will and The sequence is used as the input of the parameter training network, and the output of the parameter training network is the predicted weight value of each loss item in the loss function of the PINN model, denoted as When the Loss calculated by the PINN network A When the value increases for P consecutive rounds, the loss function Loss obtained in the calculation that makes the parameter training network C Smallest Through soft update Update, the updated weight parameter is λ A 1 Substitute and participate in PINN model calculation;
[0043] The loop is iterated until the PINN model converges.
[0044] A further improvement of the present invention is that the calculation formula of the soft update method is:
[0045]
[0046] μ+γ=1;
[0047] Where μ and γ are hyperparameters.
[0048] In a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a PINN model construction method for electrothermal coupling dynamic energy flow calculation as described in any one of the first aspects of the present invention is implemented.
[0049] In a fourth aspect of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the PINN model construction method for electrothermal coupling dynamic energy flow calculation as described in any one of the first aspects of the present invention is implemented.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] The present invention proposes an improved PINN (physical information neural network) network construction and training method. The core of the method is to dynamically calculate the weight values of each constraint rule in the PINN network loss function by introducing a special parameter training network. The present invention proposes for the first time a calculation framework and network construction method for calculating the weight values of each constraint rule in the PINN loss function using a special parameter training network. This method dynamically captures and reflects the importance of each constraint rule in the training process through a parameter network, provides a basis for subsequent weight updates, and can improve the accuracy of solving partial differential equations.
[0052] The present invention also designs a set of novel weight update rules, so that these weight values can be continuously iterated and updated during the training process, and adopts a "greedy" strategy, that is, the current weight is "soft updated" according to the weight value calculated by the parameter network. This update method not only retains the original weight information, but also incorporates new weight information, and realizes smooth and continuous iterative update of the weights of each constraint rule in the PINN network loss function. Through the above design, the technical solution of the present invention makes the weight values of each constraint rule of the PINN network trainable, iterative and parameter adaptive, further speeds up the training speed of the PINN network, and improves the accuracy of the network in solving the partial differential equations of the electrothermal coupling system. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below; obviously, the drawings described below are some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 It is a flow chart of a method for constructing a PINN model for calculating electrothermal coupled dynamic energy flow in an embodiment of the present invention;
[0055] Figure 2 1 is a schematic diagram comparing the loss function design of the existing traditional PINN method and the loss function design of the method of the present invention in an embodiment of the present invention;
[0056] Figure 3 is a schematic diagram of a parameter training network in an embodiment of the present invention;
[0057] Figure 4 is a schematic diagram of an improved PINN model in an embodiment of the present invention;
[0058] Figure 5 It is a schematic diagram of a PINN model construction system for electrothermal coupling dynamic energy flow calculation in an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments and technical solutions are only part of the embodiments of the present invention, not all of the embodiments.
[0060] All other embodiments obtained by those of ordinary skill in the art without creative work based on the technical solutions disclosed in the embodiments of the present invention belong to the scope of protection of the present invention. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] See also Figure 1 , a PINN model construction method for electrothermal coupling dynamic energy flow calculation provided by an embodiment of the present invention includes the following steps:
[0062] Step 1, obtaining an electrothermal coupling branch model;
[0063] Step 2, constructing a deep neural network as the main body of the PINN model; wherein the deep neural network is used to input relevant electrothermal input parameters of the electrothermal coupling branch model (interpretatively, such as current, voltage, temperature, time, etc.), and output predicted electrothermal coupling dynamic energy flow results;
[0064] In a specific exemplary technical solution, the network architecture of the deep neural network may include multiple hidden layers, each layer using a selected appropriate activation function (exemplarily, such as ReLU, Tanh, etc.) to increase the nonlinear expression ability of the model;
[0065] Step 3, using the pre-acquired training data set, training the PINN model based on the defined loss function, and after reaching the preset convergence condition, obtaining the constructed PINN model for electrothermal coupling dynamic energy flow calculation;
[0066] In the specific exemplary technical solution, the obtained training data set includes parameters such as current, voltage, temperature, etc. under different working conditions, as well as the corresponding electrothermal coupling dynamic energy flow results; if the actual data is difficult to obtain, it is possible to consider using simulation data or data generated based on physical laws;
[0067] Among them, the expression of the loss function Loss is:
[0068]
[0069] Where N1, N2, N3, and N4 represent the number of mechanism equations, the number of initial conditions, the number of boundary conditions, and the number of observation or simulation data, respectively; loss r,i 、loss IC,j 、loss BC,p and loss Data,q denote the deviation of the i-th mechanism partial differential equation, the deviation of the j-th initial condition, the deviation of the p-th boundary condition, and the deviation of the q-th observation or simulation data, respectively; i , j , p , q Respectively represent each loss (i.e. loss r,i 、loss IC,j 、loss BC,p and loss Data,q )’s weight value;
[0070] λ i , j , p , q The weight value is given by a parameter training network, which consists of M fully connected layers and outputs the weight value result after connecting the softmax function.
[0071] In the technical solution provided by the embodiment of the present invention, the weight value of each constraint rule in the PINN network loss function is calculated through a special parameter training network, and the update rule is designed to iteratively update the weight, so that the weight value of each constraint rule of the PINN network can be trained and iterated, and has a parameter adaptive function, which accelerates the training speed of the PINN network and improves the accuracy of the network in solving the partial differential equation group of the electrothermal coupling system. In the technical solution provided by the embodiment of the present invention, through the parameter adaptive function, the PINN network can converge to the optimal solution faster, significantly improve the training speed, and the ability to dynamically adjust the weight value enables the network to more effectively utilize limited computing resources during the training process. For complex partial differential equation groups such as electrothermal coupling systems, the improved method proposed in the present invention can more accurately capture the dynamic behavior of the system. By accurately adjusting the weight value of each constraint rule in the loss function, the network can better balance the mutual influence between different constraints, thereby improving the solution accuracy. In the present invention, the introduction of the parameter training network enables the PINN network to have a stronger generalization ability and can be applied to a wider range of partial differential equation solution scenarios. The mechanism of dynamically adjusting the weight value enables the network to adapt faster and give accurate solutions when facing new problems.
[0072] In summary, the improved PINN network construction and training method proposed in the present invention significantly accelerates the training speed, improves the solution accuracy, and enhances the generalization ability of the network by introducing parameter training network and dynamic adjustment of weight value mechanism. These significant effects and progress make the technical solution of the embodiment of the present invention have broad application prospects and important practical value in the field of solving partial differential equations.
[0073] In a specific embodiment of the present invention, in step 1, the specific steps of obtaining the electrothermal coupling branch model include:
[0074] In the power branch model, with voltage U and current I as state quantities, the Maxwell equations describing current transmission can be expressed as follows:
[0075]
[0076] In the formula, x and t are space and time respectively; R, L, G, and C are branch resistance, inductance, and ground conductance and capacitance per unit length respectively; U is voltage; I is current;
[0077] In the thermal branch model, the ambient temperature is taken as the reference temperature, and the temperature T and the actual heat power Q carried by the working fluid are taken as the state quantities. Then the state quantities satisfy:
[0078] Q = cmT;
[0079] In the formula, Q is the thermal power; T is the temperature; c is the specific heat capacity of water; m is the mass flow rate in the pipeline;
[0080] Combined with the heat conduction equation, thermal energy transfer can be characterized as follows:
[0081]
[0082] Where v is the flow velocity in the pipeline; λ h is the pipeline thermal resistance; r is a constant used to simplify the expression construction;
[0083] The mathematical model of the branch of the electrothermal coupling system is uniformly expressed as:
[0084]
[0085] In the formula, f is the "relative potential" of the multi-energy network, corresponding to the voltage U of the power grid and the relative temperature T of the heat network; g is the "flow" of the multi-energy network, corresponding to the current I of the power grid and the thermal power Q of the heat network; a1, a2, b1, b2 are coefficients determined by the branch attributes, which have different expressions in the power and heat networks;
[0086] Among them, for the power grid, For the heating network,
[0087] The electrothermal coupling branch model can be uniformly expressed as:
[0088]
[0089] Where K1 and K2 are constant coefficient matrices; f and g are two sets of state quantities.
[0090] See also Figure 2 In one embodiment of the present invention, in step 2, the steps of building a neural network model specifically include:
[0091] The traditional PINN method, in the input time ( Figure 2 t) and space ( Figure 2 After obtaining the data (represented as x in the figure), we first use a fully connected neural network to approximate the function, then use automatic differentiation technology to find the residual of the partial differential equation and the initial boundary value residual, and put them into the loss function as regular terms. Finally, we use optimization algorithms such as the gradient descent method to obtain the neural network connection weight parameters (direct problem) and the physical parameters of the partial differential equation (inverse problem).
[0092] For example, the main mathematical operation process of the positive problem is given, including:
[0093] The electrothermal coupling branch model can unify the expression and further simplify it into the following partial differential equation:
[0094] u t +N(u,λ)=0,x∈Ω,t∈[0,T止 ];
[0095] Where N(u,λ) is a functional with parameter λ that performs differential operations on u, x is a spatial variable, t is a time variable, and Ω is the Euclidean space R D A subset of T 止 It's the end time.
[0096] According to the existing traditional PINN model, a neural network u=u N (t,x) approximates the solution of the partial differential equation, is the residual of the partial differential equation, and defines the loss function of PINN as Loss = Loss u +Loss r (like Figure 2 As shown in (a) of the figure,
[0097] represents the data-driven part of the loss function; represents the training data obtained through initial state, boundary state, actual observation or numerical simulation, and is recorded as loss IC 、loss BC and loss Data , N u Represents the number of constraints in the data-driven part.
[0098] The other part of the loss function is:
[0099] The physical model driving part that represents the loss function (generally a set of partial differential equations used to express the physical mechanism), Represents the training points of the equation, and the residual value r(t,x) can be automatically obtained by automatic differentiation technology, N r Represents the driving part of the physical model, that is, the number of partial differential equations.
[0100] In the above-mentioned conventional PINN method, when dealing with Loss u and Loss r When calculating the weights of the various components in , the averaging method is used, for example, Loss r is the Nr-term partial differential physical equation deviation The weight value can also be given artificially or randomly.
[0101] In the embodiment of the present invention, a parameter adjustment and updating method based on a neural network is proposed, which is different from the prior art. The present invention is consistent with the traditional PINN method in the calculation part of the differential equation, that is, it includes a neural network (which can be recorded as N A), automatic differentiation, deviation calculation, loss function calculation, error back propagation training and other steps; Different from the traditional PINN method, in the Loss setting, the weights of each component in the Loss are no longer simply averaged, but are assigned separately (such as Figure 2 , as shown in (b) in the figure).
[0102] λ i , j , p , q The weight value is given by Figure 3 The parameter training network shown (which can be denoted as N C ) is given. The input of the parameter training network is the instantaneous loss output by the PINN network in the loss function. r 、loss IC 、loss BC and loss Data , which can be expressed as and The parameter training network consists of M fully connected layers, which are connected to the softmax function and output the weight value result, which is recorded as λ i ins , j ins , p ins , q ins .
[0103] Explanatory, in the following text, subscript A represents the relevant parameters of the PINN network, and subscript C represents the relevant parameters of the parameter training network.
[0104] See also Figure 4 In one embodiment of the present invention, the training and testing process of the PINN network specifically includes:
[0105] 1) At the beginning of the calculation, the spatiotemporal data of the partial differential equations such as x and t are input into the PINN network;
[0106] 2) PINN network outputs the loss function of the calculation network for and The weighted sum of is calculated in the same way as the above loss function, with the weight coefficient is given randomly, denoted as Create dedicated memory space to store and sequence;
[0107] 3) and Sequence as Figure 3The input of the parameter training network shown in the figure is the predicted weight value of each loss item, which is recorded as The loss function of the parameter training network is defined as:
[0108]
[0109] Where N1, N2, N3, and N4 represent the number of mechanism equations, the number of initial conditions, the number of boundary conditions, and the number of observation or simulation data, respectively; loss r,i 0 、loss IC,j 0 、loss BC,p 0 and loss Data,q 0 They represent the deviation of the i-th mechanism partial differential equation output by PINN, the deviation of the j-th initial condition, the deviation of the p-th boundary condition, and the deviation of the q-th observation or simulation data when the network is initially running; Respectively represent the network initial runtime loss r,i 0 、loss IC,j 0 、loss BC,p 0 and loss Data,q 0 After inputting the parameter training network, the initial weight value is generated. The subscript C is the parameter training network identifier.
[0110] The loss function is back-propagated to continuously update the parameters of the training network internal parameters θ C ;
[0111] 4) When the Loss calculated by the PINN network A When the value increases for P consecutive rounds, the parameter training network loss function Loss obtained in step 3) is calculated C Minimum (greedy) Through soft update, Update, the updated weight parameter is The soft update method is to ensure the stability of PINN network iterative training. The soft update calculation formula is:
[0112]
[0113] μ+γ=1;
[0114] In the formula, μ and γ are hyperparameters;
[0115] Step 5) Set λ A 1Enter the process of step 2 and participate in PINN network calculation;
[0116] Step 6) Iterate step 1) to step 5) until the PINN network converges. The convergence condition is that the Loss value in the loss function of the PINN network is less than the set threshold e.
[0117] In a specific embodiment of the present invention, various hyperparameters required in the technical solution of the embodiment of the present invention are set, namely, the number of parameter training network layers M (specifically, set to 3), Loss A The number of continuous growth rounds P (specifically, set to 2), the soft update weights μ and γ (specifically, set to 0.5), and the threshold e (specifically, set to 0.01); further, the PINN network activation function is set to tanh(x), and the optimization algorithm is the L-BFGS algorithm; the parameter training network activation function is set to Relu(x), and the optimization algorithm is Adam. After the parameter setting is completed, 75% of the x, t and other partial differential equations time-space data are used as training data, and input into the PINN network according to the time series correspondence for network and parameter training; the remaining 25% of the x, t and other partial differential equations time-space data are used as test data for network testing. After the test meets the performance requirements, the final model is obtained.
[0118] In the technical solution of the embodiment of the present invention, a method for calculating the weight values of each constraint rule in the PINN network loss function and a network construction method using a special parameter training network are proposed, and an update rule for the weight values of each constraint rule in the PINN loss function is proposed. By "greedily" selecting the weight value in the parameter network calculation and using the weight value to "soft update" the original weight value, an iterative update of the weights of each constraint rule in the PINN network loss function is achieved, so that the weight value is trainable and iterable, and has a parameter adaptive function, which is conducive to improving the calculation accuracy.
[0119] The following are device embodiments of the present invention, which can be used to implement the method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.
[0120] See also Figure 5 In an embodiment of the present invention, a PINN model construction system for electrothermal coupling dynamic energy flow calculation is provided, comprising:
[0121] An acquisition module, used for acquiring an electrothermal coupling branch model;
[0122] A PINN model construction module, used to construct a deep neural network as the main body of the PINN model; wherein the deep neural network is used to input relevant electrothermal input parameters in the electrothermal coupling branch model and output predicted electrothermal coupling dynamic energy flow results;
[0123] A training module, used to train the PINN model based on a defined loss function using a pre-acquired training data set, and to obtain a constructed PINN model for electrothermal coupling dynamic energy flow calculation after reaching a preset convergence condition;
[0124] Among them, the expression of the defined loss function Loss is:
[0125]
[0126] In the formula, loss r,i 、loss IC,j 、loss BC,p and loss Data,q They represent the partial differential equation deviation, initial condition deviation, boundary condition deviation and observation or simulation data deviation in the PINN model respectively. The subscripts i, j, p and q represent the loss r,i 、loss IC,j 、loss BC,p and loss Data,q The deviation of the i-th mechanism partial differential equation, the deviation of the j-th initial condition, the deviation of the p-th boundary condition, and the deviation of the q-th observation or simulation data; N1, N2, N3, N4 represent the number of mechanism equations, the number of initial conditions, the number of boundary conditions, and the number of observation or simulation data, respectively; λ i , j , p , q They represent loss respectively. r,i 、loss IC,j 、loss BC,p and loss Data,q The weight value of
[0127] λ i , j , p , q The weight values are given by the parameter training network;
[0128] The parameter training network consists of M fully connected layers, which are connected to the softmax function and output weight value results.
[0129] In one embodiment of the present invention, a computer device is provided, the computer device comprising a processor and a memory, the memory being used to store a computer program, the computer program comprising program instructions, and the processor being used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in a computer storage medium to implement a corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used to perform the operation of the PINN model construction method for electrothermal coupling dynamic energy flow calculation.
[0130] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM (Random Access Memory) memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the PINN model construction method for electrothermal coupling dynamic energy flow calculation in the above embodiment.
[0131] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) that contain computer-usable program code.
[0132] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0133] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A PINN model construction method for electrothermal coupling dynamic energy flow calculation, characterized in that: The following steps are involved: Obtain an electrothermal coupling branch model; Constructing a deep neural network as the main body of the PINN model; wherein the deep neural network is used to input relevant electrothermal input parameters in the electrothermal coupling branch model and output predicted electrothermal coupling dynamic energy flow results; The PINN model is trained based on a defined loss function using a pre-acquired training data set, and after reaching a preset convergence condition, a constructed PINN model for electrothermal coupling dynamic energy flow calculation is obtained; Among them, the expression of the defined loss function Loss is: In the formula, loss r,i 、loss IC,j 、loss BC,p and loss Data,q They represent the partial differential equation deviation, initial condition deviation, boundary condition deviation and observation or simulation data deviation in the PINN model respectively. The subscripts i, j, p and q represent the loss r,i 、loss IC,j 、loss BC,p and loss Data,q The deviation of the i-th mechanism partial differential equation, the deviation of the j-th initial condition, the deviation of the p-th boundary condition, and the deviation of the q-th observation or simulation data; N1, N2, N3, N4 represent the number of mechanism equations, the number of initial conditions, the number of boundary conditions, and the number of observation or simulation data, respectively; λ i , j , p , q They represent loss respectively. r,i 、loss IC,j 、loss BC,p and loss Data,q The weight value of λ i , j , p , q The weight values are given by the parameter training network; The parameter training network consists of M fully connected layers, which are connected to the softmax function and output weight value results.
2. A PINN model construction method for electrothermal coupling dynamic energy flow calculation according to claim 1, characterized in that: The input of the parameter training network is the instantaneous loss output by the PINN model in the loss function of the PINN model. r 、loss IC 、loss BC and loss Data , the output is the predicted weight value of each loss item in the loss function of the PINN model; during the training process of the parameter training network, the loss function of the parameter training network is back-propagated to continuously update the internal parameters of the parameter training network; Among them, the loss function Loss of the parameter training network C Defined as: Where, subscript C is the parameter training network identifier, λ C,i , C,j , C,p , C,q Respectively represent the loss output by the parameter training network r,i 、loss IC,j 、loss BC,p 、loss Data,q The weight value of .
3. A PINN model construction method for electrothermal coupling dynamic energy flow calculation according to claim 2, characterized in that: The step of using the pre-acquired training data set to train the PINN model based on a defined loss function, and obtaining the constructed PINN model for electrothermal coupling dynamic energy flow calculation after reaching a preset convergence condition comprises: Based on the training data set, relevant electrothermal input parameters are input into the PINN model; Loss function calculated by PINN model output for and The weighted sum of is given randomly, denoted as storage and sequence; will and The sequence is used as the input of the parameter training network, and the output of the parameter training network is the predicted weight value of each loss item in the loss function of the PINN model, denoted as When the Loss calculated by the PINN network A When the value increases for P consecutive rounds, the loss function Loss obtained in the calculation that makes the parameter training network C Smallest Through soft update Update, the updated weight parameter is Will Substitute and participate in PINN model calculation; The loop is iterated until the PINN model converges.
4. A PINN model construction method for electrothermal coupling dynamic energy flow calculation according to claim 3, characterized in that: The calculation formula of the soft update method is: μ+γ1; Where μ and γ are hyperparameters.
5. A PINN model construction system for electrothermal coupling dynamic energy flow calculation, characterized in that: include: An acquisition module, used for acquiring an electrothermal coupling branch model; A PINN model construction module, used to construct a deep neural network as the main body of the PINN model; wherein the deep neural network is used to input relevant electrothermal input parameters in the electrothermal coupling branch model and output predicted electrothermal coupling dynamic energy flow results; A training module, used to train the PINN model based on a defined loss function using a pre-acquired training data set, and to obtain a constructed PINN model for electrothermal coupling dynamic energy flow calculation after reaching a preset convergence condition; Among them, the expression of the defined loss function Loss is: In the formula, loss r,i 、loss IC,j 、loss BC,p and loss Data,q They represent the partial differential equation deviation, initial condition deviation, boundary condition deviation and observation or simulation data deviation in the PINN model respectively. The subscripts i, j, p and q represent the loss r,i 、loss IC,j 、loss BC,p and loss Data,q The deviation of the i-th mechanism partial differential equation, the deviation of the j-th initial condition, the deviation of the p-th boundary condition, and the deviation of the q-th observation or simulation data; N1, N2, N3, N4 represent the number of mechanism equations, the number of initial conditions, the number of boundary conditions, and the number of observation or simulation data, respectively; λ i , j , p , q They represent loss respectively. r,i 、loss IC,j 、loss BC,p and loss Data,q The weight value of λ i , j , p , q The weight values are given by the parameter training network; The parameter training network consists of M fully connected layers, which are connected to the softmax function and output weight value results.
6. A PINN model construction system for electrothermal coupling dynamic energy flow calculation according to claim 5, characterized in that: The input of the parameter training network is the instantaneous loss output by the PINN model in the loss function of the PINN model. r 、loss IC 、loss BC and loss Data , the output is the predicted weight value of each loss item in the loss function of the PINN model; during the training process of the parameter training network, the loss function of the parameter training network is back-propagated to continuously update the internal parameters of the parameter training network; Among them, the loss function Loss of the parameter training network C Defined as: Where, subscript C is the parameter training network identifier, λ C,i , C,j , C,p , C,q Respectively represent the loss output by the parameter training network r,i 、loss IC,j 、loss BC,p 、loss Data,q The weight value of .
7. A PINN model construction system for electrothermal coupling dynamic energy flow calculation according to claim 6, characterized in that: In the training module, the steps of using a pre-acquired training data set to train the PINN model based on a defined loss function, and obtaining a constructed PINN model for electrothermal coupling dynamic energy flow calculation after reaching a preset convergence condition include: Based on the training data set, relevant electrothermal input parameters are input into the PINN model; Loss function calculated by PINN model output for and The weighted sum of is given randomly, denoted as storage and sequence; will and The sequence is used as the input of the parameter training network, and the output of the parameter training network is the predicted weight value of each loss item in the loss function of the PINN model, denoted as When the Loss calculated by the PINN network A When the value increases for P consecutive rounds, the loss function Loss obtained in the calculation that makes the parameter training network C Smallest Through soft update Update, the updated weight parameter is Will Substitute and participate in PINN model calculation; The loop is iterated until the PINN model converges.
8. A PINN model construction system for electrothermal coupling dynamic energy flow calculation according to claim 7, characterized in that: The calculation formula of the soft update method is: μ+γ=1; Where μ and γ are hyperparameters.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the PINN model construction method for electrothermal coupled dynamic energy flow calculation according to any one of claims 1 to 4 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the PINN model construction method for electrothermal coupled dynamic energy flow calculation according to any one of claims 1 to 4 is implemented.
Citation Information
Cited By
Power-on test analysis system based on copper wire processing
CN120629758A
Two-stage electrothermal coupling system energy flow calculation method and system based on hybrid drive
CN121743632A