Method and apparatus for training a PINN for predicting physical quantities of an object
By employing a preconditioner through ILU factorization, the convergence and prediction accuracy of PINNs are improved, addressing the challenges of solving complex PDEs and enhancing structural optimization processes.
Patent Information
- Application Number
- PCT/CN2023/142251
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2025-07-03
AI Technical Summary
Existing Physics-Informed Neural Networks (PINNs) face convergence and prediction accuracy issues when solving complex partial differential equations (PDEs), hindering effective structural optimization of objects.
Employing a preconditioner through incomplete LU (ILU) factorization to reduce the condition number of the PINN, improving convergence and prediction accuracy by using precomputed preconditioners during the training process.
Enhances the convergence and prediction accuracy of PINNs, enabling more efficient structural optimization of objects by mitigating training pathologies and improving the sensitivity of network predictions.
Smart Images

Figure CN2023142251_03072025_PF_FP_ABST
Abstract
Description
METHOD AND APPARATUS FOR TRAINING A PINN FOR PREDICTING PHYSICAL QUANTITIES OF AN OBJECTFIELD
[0001] Aspects of the present disclosure relate generally to artificial intelligence (AI) , and more particularly, to method and apparatus for training a Physics-Informed Neural Network (PINN) for predicting physical quantities of an object.BACKGROUND
[0002] The structure of an object, such as its shape, size, or distribution of materials, influences the performance of the object. Examples of the object may be the wing of an airplane, the truss of a house, the pipes in a reactor, or the like. For example, the shape of an airfoil influences the pressure and velocity of the airflow with respect to the airfoil while the pressure and velocity influencing the performance of the physical system of the airfoil. The physical system can be described by partial differential equations (PDEs) . The physical quantities of the physical system such as the pressure and velocity can be obtained by solving the PDEs based on the structural quantities such as those describing the shape of the object.
[0003] It is desirable to design the structure of an object so as to improve its performance, this procedure may be referred to as structural optimization. The structural optimization is applicable in many areas including scientific area, engineering area, industrial area or the like. For example, the shape of chemical catalyst pellets, the shape of auto parts or the like may be optimized through the structural optimization procedure before manufacturing.
[0004] Since most physical systems are described by PDEs, structural optimization is typically carried out with the governing PDEs, which need to be solved to determine the state of the structure at each iteration of the optimization. The efficiency and accuracy of the solving of PDEs, especially for an object with complex structure, would be critical for improving the performance of the structural optimization of the object to be manufactured.
[0005] PINNs have shown good performance in solving complex PDEs. However, certain training pathologies have emerged for PINNs, compromising both convergence and prediction accuracy in practical applications. It would be desirable if the convergence and prediction accuracy of PINNs for solving PDEs can be improved, and the structural optimization process may be improved if the prediction accuracy of PINNs for solving PDEs can be improved.SUMMARY
[0006] In order to address the above-mentioned problem, the disclosure propose a method for training a PINN for solving PDEs, in which a preconditioner is employed in the training of the PINN to improve convergence and prediction accuracy.
[0007] According to an embodiment, there provides a computer implemented method for training a PINN for predicting physical quantities of an object, comprising: discretizing PDEs, which are formulated to characterize a physical system related to the object with structural quantities and the physical quantities of the object, on a mesh including a plurality of points into a linear equation, the linear equation is formulated to characterize the physical system with a first discretization matrix and the physical quantities at the plurality of points of the mesh; determining a preconditioning matrix based on the first discretization matrix; predicting values of the physical quantities of the object at the plurality of points of the mesh by the PINN; obtaining a loss based on the predicted values of the physical quantities of the object and the preconditioning matrix; updating learnable parameters of the PINN based on the loss.
[0008] According to an embodiment, there provides a computer implemented method for performing structural optimization of an object, comprising: training a PINN for solving PDEs describing a physical system related to the object by using the method according to aspects of the disclosure; predicting physical quantities of the object by using the trained PINN; updating the structural features of the object based on the predicted physical quantities of the object.
[0009] According to an embodiment, there provides a computer system, which comprises one or more processors and one or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.
[0010] According to an embodiment, there provides one or more computer readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.
[0011] According to an embodiment, there provides a computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method as mentioned above as well as to perform the operations of the method according to aspects of the disclosure.BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The disclosed aspects will hereinafter be described in connection with the appended drawings that are provided to illustrate and not to limit the disclosed aspects.
[0013] Fig. 1 illustrates an exemplary framework for optimizing structure of an object according to aspects of the disclosure.
[0014] Fig. 2 illustrates an exemplary method for training a PINN for predicting solutions of PDEs of an object according to aspects of the disclosure.
[0015] Fig. 3 illustrates an exemplary application for training a PINN for solving a Laplace’s equation according to aspects of the disclosure.
[0016] Fig. 4 illustrates an exemplary application for training a PINN for solving a Poisson equation according to aspects of the disclosure.
[0017] Fig. 5 illustrates an exemplary method for structural optimization of Flow Baffles according to aspects of the disclosure.
[0018] Fig. 6 illustrates an exemplary application for training a PINN for solving time-dependent PDEs of a physical system of an object according to aspects of the disclosure.
[0019] Fig. 7 illustrates an exemplary method for structural optimization of 2D battery pack according to aspects of the disclosure.
[0020] Fig. 8 illustrates an exemplary method for training a PINN for predicting physical quantities of an object according to aspects of the disclosure.
[0021] Fig. 9 illustrates an exemplary method for performing structural optimization of an object according to aspects of the disclosure.
[0022] Fig. 10 illustrates an exemplary computing system according to aspects of the disclosure.DETAILED DESCRIPTION
[0023] The present disclosure will now be discussed with reference to several example implementations. It is to be understood that these implementations are discussed only for enabling those skilled in the art to better understand and thus implement the embodiments of the present disclosure, rather than suggesting any limitations on the scope of the present disclosure.
[0024] Various embodiments will be described in detail with reference to the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts. References made to particular examples and embodiments are for illustrative purposes, and are not intended to limit the scope of the disclosure.
[0025] Fig. 1 illustrates an exemplary framework for optimizing structure of an object according to aspects of the disclosure.
[0026] The object to be structurally optimized in the example shown in Fig. 1 is an airfoil. As shown in block 120 of Fig. 1, the shape of the airfoil is presented by a boundary γ, which is parameterized by structural quantities W. In this example, the structural quantities W may be a set of control points which consist of splines representing the shape of the airfoil. In other words, the structure to be optimized is the shape of the airfoil represented by splines with a set of control points W. The label Ω denotes the problem domain or particularly denotes the domain of the physical system related to the airfoil.
[0027] As shown in block 110 of Fig. 1, the arrowed lines denote airflows on the airfoil. The physical state of the airflow on the airfoil may be represented by physical quantities of the physical system related to the airfoil. In this example, the physical quantities may be the velocity u=u (x) and the pressure p=p (x) . The label x denotes spatial coordinates in the domain Ω.
[0028] The velocity u=u (x) and the pressure p=p (x) may be characterized by PDEs, with the constraint of the shape of the airfoil represented by the boundary γ. It is appreciated that PDEs are well known physical equations that can be used to describe the three-dimensional motion of viscous fluid substances. The second-order PDEs may be used to model the weather, ocean currents, heat conducting, air flow around an airfoil, water flow in a pipe or in a reactor and many other applications. The PDEs for a physical system of an object may be formulated according to physical laws related to the physical system of the object. In the illustrated example, the PDEs of the physical system of the airfoil may be established according to the related physical law as shown by label 140 of Fig. 1. As the PDEs are used to govern the optimization of the structure of the airfoil, they may be referred to as governing PDEs. It is appreciated that the formulation of the governing PDEs may be implemented with well-known physical knowledge, and other kinds of PDEs used to describe a physical system of an object may also be used as the governing PDEs in aspects of the disclosure.
[0029] As shown by label 130 of Fig. 1, the objective or goal of the structural optimization of the airfoil is to reach the desired pressure distribution pref on the airfoil surface by changing the structural parameter W. The objective function J may be formulated as shown by label 130, and the aim of the structural optimization is to minimize the objective function J, which is a functional of the pressure p. The shape of the airfoil corresponding to the boundary γ parameterized by structural quantities W may be iteratively optimized to minimize the objective function J, so as to reach the desired pressure distribution pref on the airfoil surface.
[0030] In each loop of the structural optimization, the PDEs 140 need to be solved to obtain the physical quantities such as the velocity u and pressure p, and then the objective function J may be evaluated based on the physical quantities such as the pressure p. Then the structural quantities W may be updated or optimized based on the calculated objective function J as shown by label 160.
[0031] In an example, as shown by label 150, a NN model may be used to obtain the velocity u and pressure p by solving the PDEs 140. For example, PINN (Maziar Raissi, Paris Perdikaris, and George E Karniadakis. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics, 378: 686–707, 2019) and its extensions are powerful for predicting the solutions of the PDEs and may be employed to implement the NN model 150. By integrating PDE residuals into the loss function in the training process of the NN model, PINNs not only ensure that the neural network adheres to the physical constraints but also maintain its versatility for a series of PDE-related problems. While PINNs have successes in solving PDEs over various physical domains, their full potential and capabilities remain under-explored. It is desirable if the training of the PINN has improved error control and faster convergence. Also, if the prediction accuracy of the trained PINN can be improved, it is advantage for the optimization of the object as example in Fig. 1.
[0032] Fig. 2 illustrates an exemplary method for training a PINN for predicting solutions of PDEs of an object according to aspects of the disclosure.
[0033] PDEs may be generally denoted as in Ω with a boundary condition (BC) of where Ω is an open, bounded subset of where d denotes the number of dimensions. Here, and are known functions or known conditions and may be referred to as source terms of the PDEs; is a partial differential operator including at most k-order partial derivatives, where and V, W are normed subspaces of L2 (Ω) . The solution of the PDEs is u that satisfies the PDEs, in other words, u is the unknown physical quantities to be determine based on the PDEs.
[0034] The PINN with learnable parameters θ ∈ Θ outputs the predicted solution uθ of the PDEs to approximate the solution u, where represents the parameter space and is the number of parameters of the PINN. The optimization problem of PINN can be formalized as a constrained optimization problem: subject to Two primary strategies to address the constraint are:
[0035] Where denotes the norm evaluated at and the norms are estimated via Monte Carlo integration. The first approach shown in equation (1) adds a penalty term for BC enforcement. However, this can induce loss imbalances, leading to training instability. In contrast, the second approach employs a specialized ansatz: with being a smoothed distance function to This method naturally adheres to the BC, mitigating potential imbalances. In the embodiments of the disclosure, the second approach is employed to determine the loss in the training process of PINNs, while in the following description the hat notation of is omitted for sake of simplicity, assuming uθ fulfills the BC.
[0036] At step 210, the continuous PDEs are discretized on a N-point mesh corresponding to the domain Ω, so that the continuous PDEs are converted to an equivalent discretized equation: Au = b. Here, is an invertible sparse matrix and may be referred to as a discretization matrix, and It is appreciated that the discretization of PDEs may be performed by using any suitable method including known methods. For example, the finite difference method (FDM) may be used to discretize the PDEs. For example, the FEM may be used for the discretization of PDEs on FEniCS platform. The domain Ω including the boundaries may be determined by the structural quantities of the PDEs, for example, the structural quantities may include position, radius, width, height, length, anchor points and / or the like which may describe the shape of the domain or the domain boundaries.
[0037] At step 220, the PINN denoted as predicts the solutions of the PDEs on the mesh points where k refers to the current number of training iteration while refers to the PINN with parameters θ (k-1) updated in the last training iteration (k-1) . The predicted solution of the PDEs may be which are the predicted values of the physical quantities u at the N mesh points.
[0038] At step 230, a loss is determined based on the predicted values of the physical quantities of the object. In an embodiment, the loss may be determined based on the second approach of equation (1) , and is illustrated in the following equation (2) :
[0039] Where uθ corresponds to the in equation (1) and are obtained from by the above mentioned ansatz: It is appreciated that uθ in the loss functions illustrated hereafter also corresponds to the in equation (1) when the second approach of equation (1) is employed to determine the loss.
[0040] In an embodiment, the loss may be determined based on the first approach of equation (1) , and is illustrated in the following equation (3) :
[0041] Where uθ corresponds to the uθ in equation (1) . It is appreciated that uθ in the loss functions illustrated hereafter also corresponds to the uθ in equation (1) when the first approach of equation (1) is employed to determine the loss.
[0042] At step 240, the parameters θ of the PINN denoted as are updated based on the loss obtained in step 230. For example, the parameters θ of the PINN are updated via gradient descent based on the loss. For example, an Adam optimizer may be used to update the parameters θ of the PINN via gradient descent based on the loss. The steps 220 to 240 may be performed iteratively for multiple times to train the PINN.
[0043] Although the PINNs are powerful tools in solving complex PDEs, certain training pathologies have emerged for PINNs, compromising both convergence and prediction accuracy in practical applications. According to aspects of the disclosure, the condition number is introduced as a metric to accurately quantify pathologies in PINNs. In traditional numerical analysis, the condition number acts as a metric for assessing the sensitivity of a function’s output relative to its input. A higher condition number typically indicates potential issues, such as susceptibility to errors. According to aspects of the disclosure, the condition number is introduced as a metric to accurately quantify pathologies in PINNs. A training method for PINN is designed to optimize this metric of condition number so as to enhance both prediction accuracy and training convergence of the PINNs.
[0044] As illustrated in above step 210, the continuous PDEs are discretized to an equivalent discretized equation: Au = b. For slightly complex problems, the condition number may be large, for example, may reach the level of 103, suggesting potential bigger sensitivity of the network prediction and training. According to aspects of the disclosure, in order to improve the condition number metric for the PINN, a preconditioning algorithm is employed to compute a matrix P to construct a third linear system: P-1Au = P-1b, which is equivalent to the second discretized system Au = b and in turn is equivalent to first continuous system If the preconditioned matrix P-1A has a smaller condition number, the bigger condition number inherent to the first continuous system and the second discretized system may be reduced to the smaller condition number of the third linear system, while the solutions of the three equivalent systems keep same. According to aspects of the disclosure, in order to achieve a reduced condition number of the preconditioned matrix P-1A, an incomplete LU (ILU) factorization process is employed based on the matrix A to obtain preconditioning matrix P. For example, the ILU factorization is performed to the matrix A to obtain sparse invertible lower and upper triangular matrices and and let In this way, the preconditioning process can reduce the condition number inherent to the physical system defined by the PDEs by several orders of magnitude while keeping the time cost much cheaper than solving Au = b. This process of reducing the condition number can be formulated as the transition from the following equation (4) based on the discretized system Au = b to the following equation (5) based on the equivalent preconditioned system P-1Au =P-1b:
[0045] Where cond (PDEs) denotes the condition number of the PDEs.
[0046] According to aspects of the disclosure, the PINN can be trained based on precomputed preconditioners so as to reduce the condition number of the PINN which corresponds to the physical system defined by the PDEs. A method 1 for training PINNs with precomputed preconditioners is provided in the following.
[0047] It is appreciated that although the matrix is referred to as the preconditioner, the matrix does not need to be actually calculated. For example, the loss may be obtained by the following steps:
[0048] (a) Compute the residual
[0049] (b) Solve to obtain and let r ← y, which should be very fast since is sparse;
[0050] (c) Solve to obtain and let r ← y;
[0051] (d) Compute
[0052] Fig. 3 illustrates an exemplary application for training a PINN for solving a Laplace’s equation according to aspects of the disclosure. The Laplace’s equation may be formulated as: Δu (x1, x2) =0, x1∈ (0, 1] , x2∈ [0, 1] (7a) u (x1, x2) =g (x2) , x1=0, x2∈ [0, 1] (7b)
[0053] where equation (7a) gives the form of the PDE, and equation (7b) is a Dirichlet boundary condition (BC) . A solution to the above problem is a solution to equation (7a) which also satisfies equation (7b) , where the domain Ω of the PDE is the two-dimensional space x1∈ [0, 1] , x2∈ [0, 1] . In an implementation, the domain Ωcorresponds to a heat transfer object or a part of the heat transfer object, where the physical quantity u is the temperature. In an implementation, the domain Ωcorresponds to an electrostatic field or a part of the electrostatic field, where the physical quantity u is the electrostatic field strength.
[0054] PINN employ a neural network uθ (x1, x2) to approximate or predict the solution of the PDE, i.e., where θ denotes the trainable parameters of the neural network. According to an embodiment, the above method 1 is used to train the PINN uθ (x1, x2) .
[0055] Taking the heat transfer object as an example, the continuous PDEs are discretized on a N-point mesh corresponding to the domain Ω of the object, so as to obtain the equivalent discretized equation: Au = b. In an implementation, the FEM may be used for the discretization of PDEs on FEniCS platform. It is appreciated that the discretization of the PDEs to the equivalent discretized system presented by A and b may be performed by any suitable known method such as the FEM on any suitable known platform such as the FEniCS. Then the preconditioner may be obtained via ILU factorization on the discretization matrix A, the loss may be determined based on the preconditioner, and the PINN may be trained by updating the parameters of the neural network based on the loss, as illustrated in the method 1. In an embodiment, the physical quantity such as the temperature output by the trained PINN can be used to optimize the structure of the heat transfer object, for example, the structure optimization goal is to achieve a reference temperature distribution in the domain Ω.
[0056] Referring back to the method 1, if the PDEs includes nonlinear components with respect to the physical quantity u, the method 1 may be adjusted to handle the nonlinear problems with a strategy of moving the nonlinear components to the right-hand side of the equation and only preconditioning the linear portion of the equation. For example, for the equation Δu (x) +sinu (x) =f (x) , the nonlinear term sinu (x) is moved to the right-hand-side to obtain Δu (x) =f (x) -sin u (x) , The linear part of the equation Δu (x) =f (x) is discretized to Au=b as performed in lines 3-4 of method 1, and the discretized equation is assembled as Au= b-sinu (x) . Then, the preconditioner is obtained via ILU factorization on the linear part A as performed in line 5 of method 1, and the loss function shown in equation (6) is adjusted as The adjusted method from the method 1 may be referred to as method 1a.
[0057] Fig. 4 illustrates an exemplary application for training a PINN for solving a Poisson equation according to aspects of the disclosure. The Poisson equation may be formulated as: Δu (x) +k2u (x) =f, ∈Ω (8a) u (x) =u1 (x) , x∈γ1, left, up (8b) u (x) =0, x∈γwall (8c)
[0058] Where x= (x1, x2) is the spatial coordinate, u= (u1, u2) is the velocity, k is a given constant, f=f (x) is given, γ1, left is the left part of γ1, γ1, left, up is the upper half of γ1, left , γ1, left, down is the lower half of γ1, left , γwall =γ1, up ∪γ1, down ∪γ2∪γ3∪γ4∪γ5∪γ1, left, down , and In an implementation, the physical system illustrated in Fig. 4 corresponds to Flow Baffles, where γ2 to γ5 located in corresponding grids are the flow baffles. The governing PDEs describing the physical system related to the flow baffles may be formulated according to physical laws.
[0059] PINN employ a neural network uθ (x) to approximate or predict the solution of the PDEs, i.e., where θ denotes the trainable parameters of the neural network. According to an embodiment, the above method 1 is used to train the neural network NNθ (x) .
[0060] Taking the Flow Baffles object as an example, the continuous PDEs are discretized on a N-point mesh corresponding to the domain Ω of the object, so as to obtain the equivalent discretized equation: Au = b. In an implementation, the FEM may be used for the discretization of PDEs on FEniCS platform. In an implementation, a mesh including N (For example, N = 9382) nodes is generated by Gmsh which is a finite element mesh generator, and the FEniCS is employed to discretize the PDEs on the mesh. It is appreciated that the discretization of the PDEs to the equivalent discretized system presented by A and b may be performed by any suitable known method. Then the preconditioner may be obtained via ILU factorization on the discretization matrix A, the loss may be determined based on the preconditioner, and the PINN may be trained by updating the parameters of the neural network based on the loss, as illustrated in the method 1. In an embodiment, the physical quantity such as the velocity output by the trained PINN can be used to optimize the structure of the flow baffles object.
[0061] Fig. 5 illustrates an exemplary method for structural optimization of Flow Baffles according to aspects of the disclosure.
[0062] As shown in Fig. 4, γ2 to γ5 located in corresponding grids are the flow baffles to be optimized. The goal of the structural optimization is to optimize the shape and position of the baffles γ2 to γ5 so as to obtain an even distribution of fluid flow at the outlet γ1, right with the little energy dissipated by the fluid.
[0063] The objective function of the structural optimization may be formulated based on fluid mechanics as shown in the following equation (9) :
[0064] where β is a balance factor, for example, β = 0.01, u= (u1, u2) is the velocity, k is the viscosity. The structural optimization object is to minimize J (W) .
[0065] At step 510, structural quantities are determined, wherein the structural quantities are used to describe boundaries of the object. For the object of flow baffles as shown in Fig. 4, the structural parameters include the center and the radius of circular baffles γ2 to γ5, that is, structural features W= (x0, r0, …, x3, r3) .
[0066] At step 520, the PINN for solving the PDEs describing the physical system related to the flow baffles as exampled in equations (8a) to (8c) is trained by using the method 1.
[0067] At step 530, the velocity u= (u1, u2) is predicted by the trained PINN.
[0068] At step 540, a loss l (W) is obtained based on J (W) , which is obtained based on equation (9) by substituting the predicted velocity u= (u1, u2) .
[0069] The process goes back to step 510, in which the structural features W= (x0, r0, …, x3, r3) are updated based on the loss l (W) . Then a next iteration of the process from step 520 to 540 to 510 may be performed based on the updated structural features.
[0070] It is appreciated that the loss l (W) may be determined at step 540 by using any suitable method including the known approach, and the update of the structural features at step 510 may be performed by using any suitable method including the known approach.
[0071] The time dimension is not described in the embodiments of the above discussed method 1 and its variant method 1a. For time-dependent problems one straightforward approach is to treat time as an additional spatial dimension, resulting in a spatial-temporal equation. For example, supposing that we are dealing with a problem defined in a 2D square [0, 1] 2 and a time interval [0, 1] , we can consider it as a problem defined in a 3D cube [0, 1] 3, then the method 1 and its variant method 1a can be used to handle time dependent problems.
[0072] According to aspects of the disclosure, the time dimension may be discretized into specific time steps and subsequently the spatial equation may be solved iteratively for each step. In this way, the mesh dimension for accommodating the time dimension may be avoided and the mesh size may be reduced significantly, particularly for problems with fine temporal granularity.
[0073] In an embodiment, the time dependent PDEs may be formulated as the equation (10) :
[0074] with the initial condition of u (x, 0) =h (x) , and proper boundary conditions, where t denotes the time coordinate, and u is the unknown physical quantities to be solved. The time interval is discretized into n time steps t0, t1, ..., tn (t0=0, tn tn=T) . Let ui (x) denote u (x, ti) . Starting from u0 (x) =h (x) , the following iterative systems (i = 1, 2, 3, ..., n) can be can constructed:
[0075] Then, the continues equation (11) at time step ti may be discretized in the spatial dimension with a mesh to obtain: ui+A (ti) ui= b (ti) +ui-1 (12a)
[0076] The discretized equation (12a) is rewritten as:
[0077] (I+A (ti) ) ui= b (ti) +ui-1 (12b)
[0078] Where A (ti) and b (ti) are matrixes at time ti, and It is noted that the specific form of equation (12b) depends on the numerical schemes employed in the discretization process. For example, when using the FEM to perform the discretization, equation (12b) become: (K+A (ti) ) ui= b (ti) +ui-1, where K is a is the mass matrix which simply integrates the trial and test functions.
[0079] According to aspects of the disclosure, the PINN can be trained based on precomputed preconditioners so as to reduce the condition number of the trained PINN which corresponds to the physical system defined by the PDEs. A method 2 for training PINNs with precomputed preconditioners is provided in the following.
[0080] It is appreciated that if the mesh the matrix A (ti) , and the bias b (ti) do not vary with time in a specific embodiment, they can be generated once at the beginning instead of regenerated at each time step. As shown in line 14 of method 2, transfer learning is used to migrate the neural network from the previous time step to the next time step since the solution varies little for most physical problems.
[0081] According to aspects of the disclosure, a method 3 for training PINNs with precomputed preconditioners is provided in the following. In the embodiment of method 2, the equation (12b) is sequentially and iteratively solved with a PINN obtain the solution at each time step. In the embodiment of method 3, the time interval is divided into several sub-intervals and the PINNs are trained in parallel within each sub-interval.
[0082] In the embodiment of method 3, multiple neural networks, denoted as i=1, …, n, are employed to predict the solutions of the PDEs at n time steps of a sub-interval in parallel. During an implementation, the n neural networks may share all their weights except for the final linear layer. This design choice ensures efficient memory usage without compromising the distinctiveness of each network’s predictions.
[0083] Fig. 6 illustrates an exemplary application for training a PINN for solving time-dependent PDEs of a physical system of an object according to aspects of the disclosure.
[0084] The object is a 2D battery pack, and the PDEs describing the physical system related to the 2D battery pack may be formulated according to physical laws, for example, the PDEs may be given by: T (x, 0) =T0, x∈Ω, (15e)
[0085] where x= (x1, x2) is the spatial coordinate, t is the temporal coordinate. T (x, t) is the temperature over time, k is the thermal conductivity, h is the heat transfer coefficient. Ta, Tc, Tw are respectively the temperature of the air, the cells (nc= 11 cells of radius rc) , the cooling pipes (nw = 6 pipes of radius rc, ) , and are set to Ta = 0.1, Tc = 5, Tw = 1. T0 is the initial temperature and is set to T0 = 0.1 in this example. In Fig. 6, γou stands for the outer boundaries of the battery packet, γc, i stands for the boundaries of the cells, γp, i stands for the boundaries of the cooling pipes. The temperature T (x, t) are the unknown physical quantities to be solved based on the PDEs.
[0086] In an embodiment, the above method 1 and method 1a may be employed to solve time dependent PDEs of the physical system of the 2D battery pack by taking the temporal t as an additional spatial dimension.
[0087] In another embodiment, the above method 2 and method 3 may be employed to solve the time dependent PDEs of the physical system of the 2D battery pack. Referring back to equations (10) to (11) , the equation (15a) may be reformulated as the iterative system as shown in equation (11) where the time interval t∈ (0, 1] is discretized into n time steps t0, t1, ..., tn (t0=0, tn tn=1) , and the method 2 and method 3 may be employed to training the PINNs for solving the governing PDEs and output the temperature T (x, t) at each time step. It is appreciated that the structure of the 2D battery pack does not change during the process of method 2 and 3, that is to say, the mesh the matrix A (ti) , and the bias b (ti) can be only generated once at the beginning instead of regenerated at each time step.
[0088] Fig. 7 illustrates an exemplary method for structural optimization of 2D battery pack according to aspects of the disclosure.
[0089] As shown in Fig. 6, the cell boundaries γc, i and cooling pipe boundaries γp, i located in domain Ω are the structure to be optimized. The goal of the structural optimization is to optimize the shape and position of the cells and cooling pipes so as to obtain an even distribution of the temperature over time.
[0090] The structural optimization problem for the 2D battery pack shown in Fig. 6 may be represented by
[0091] where T is the temperature, Tref is the reference temperature, the structural optimization object is to minimize J (W) .
[0092] At step 710, structural quantities are determined, wherein the structural quantities are used to describe boundaries of the object. For the object of 2D battery pack as shown in Fig. 6, the structural parameters include the center and the radius of the cell boundaries γc, i and cooling pipe boundaries γp, i , that is, structural features W= (x0, r0, …, x17, r17) .
[0093] At step 720, the PINN for solving the PDEs describing the physical system related to the flow baffles as exampled in equations (15a) to (15e) is trained by using one of the method 1, method 1a, method 2 and method 3.
[0094] At step 730, the temperature T (x, t) at each time step is predicted by the trained PINN. It is appreciated that when method 2 and 3 are employed, the training step 720 and the prediction step 730 are performed alternately and iteratively.
[0095] At step 740, a loss l (W) is obtained based on J (W) , which is obtained based on equation (20) by substituting the predicted temperature T (x, t) .
[0096] The process goes back to step 710, in which the structural features W= (x0, r0, …, x17, r17) are updated based on the loss l (W) . Then a next iteration of the process from step 720 to 740 to 710 may be performed based on the updated structural features.
[0097] It is appreciated that the loss l (W) may be determined at step 740 by using any suitable method including the known approach, and the update of the structural features at step 710 may be performed by using any suitable method including the known approach.
[0098] As discussed above, method 1a may be used to process a nonlinear problem. according to aspects of the disclosure, the Newton-Raphson method may be employed to linearize the nonlinear problem. Specifically, assembling a nonlinear problem results in a system of nonlinear equations: F (u) =0, F (u) = (F1 (u) , …, Fm (u) ) (21)
[0099] where m is the number of nonlinear equations. The Newton-Raphson method solves the above equation with the following iterations (i = 1, 2, 3 ... ) : ui= ui-1-JF (ui-1) -1 F (ui-1) (22)
[0100] Where JF (ui-1) -1 is the Jacobian matrix of F at ui-1. Now, the neural network can be used to solve the linear equation JF (ui-1) ui= JF (ui-1) ui-1-F (ui-1) for ui and proceed the iteration. A method 4 for training PINNs with precomputed preconditioners is provided in the following
[0101] It is appreciated that in the structure optimization methods 500 and 700 as illustrated in Figs. 5 and 7, the training step 520 / 720 and the prediction step 530 / 730 are performed by using the method 4 or the method 1a for nonlinear PDEs describing a physical system of an object.
[0102] It is appreciated that although the structure optimization methods 500 and 700 are illustrated taking the specific objects of flow baffles and 2D battery pack as examples, the structure optimization methods may be performed for optimizing the structure of other objects, for example, the object may be one of a fuel cell bipolar plate, a part of a car, a part of a plane, a part of a building, pipes of a reactor, flow baffles and so on, that are to be manufactured or designed. For example, the structural quantities may comprise at least one of position, radius, width, height, length, anchor points, and so on, and physical quantities may comprise at least one of velocity, pressure, temperature, and so on.
[0103] Fig. 8 illustrates an exemplary method for training a PINN for predicting physical quantities of an object according to aspects of the disclosure.
[0104] At step 810, PDEs are discretized on a mesh including a plurality of points into a linear equation, the PDEs are formulated to characterize a physical system related to the object with structural quantities and the physical quantities of the object, the linear equation is formulated to characterize the physical system with a first discretization matrix and the physical quantities at the plurality of points of the mesh.
[0105] At step 820, a preconditioning matrix is determined based on the first discretization matrix.
[0106] At step 830, values of the physical quantities of the object are predicted at the plurality of points of the mesh by the PINN.
[0107] At step 840, a loss is obtained based on the predicted values of the physical quantities of the object and the preconditioning matrix.
[0108] At step 850, learnable parameters of the PINN are updated based on the loss.
[0109] According to an embodiment, at step 820, the preconditioning matrix is determined by performing incomplete LU factorization on the first discretization matrix.
[0110] According to an embodiment, at step 840, the loss is obtained based on substantively multiplying the inverse matrix of the preconditioning matrix with the first discretization matrix.
[0111] According to an embodiment, at step 840, the first discretization matrix is multiplied with the predicted values of the physical quantities of the object to predict values of source terms at the plurality of points of the mesh, wherein the source terms are decided by the PDEs; a difference between the predicted values of the source terms and known values of the source terms at the plurality of points of the mesh are obtained; and the loss is obtained based on multiplication of the inverse matrix of the preconditioning matrix and the difference.
[0112] According to an embodiment, at step 810, the PDEs are discretized into the linear equation by using FDM on the plurality of points of the mesh.
[0113] According to an embodiment, at step 810, the PDEs are discretized on a current time step mesh including a plurality of points into a current time step linear equation, the current time step linear equation is formulated to characterize the physical system with a current time step first discretization matrix and the physical quantities at the plurality of points of the current time step mesh. The method 800 further comprises obtaining last time step values of the physical quantities of the object at the plurality of points of the current time step mesh. At step 820, a current time step preconditioning matrix is determined based on the current time step first discretization matrix. At step 830, current time step values of the physical quantities of the object at the plurality of points of the current time step mesh are predicted by the PINN. At step 840, a loss is obtained based on the predicted current time step values of the physical quantities of the object, the last time step values of the physical quantities of the object and the preconditioning matrix.
[0114] According to an embodiment, at step 820, the current time step preconditioning matrix is determined by performing incomplete LU factorization on a second discretization matrix which is a sum of a unit matrix and the current time step first discretization matrix.
[0115] According to an embodiment, at step 840, the loss is obtained based on substantively multiplying the inverse matrix of the current time step preconditioning matrix with the second discretization matrix.
[0116] According to an embodiment, at step 840, the second discretization matrix is multiplied with the predicted values of the physical quantities of the object to obtain a first sum of predicted values of source terms at the plurality of points of the mesh and the predicted values of the physical quantities of the object, wherein the source terms are decided by the PDEs; a difference between the first sum and a second sum of known values of the source terms at the plurality of points of the mesh and the last time step values of the physical quantities of the object is obtained; and the loss is obtained based on multiplication of the inverse matrix of the current time step preconditioning matrix and the difference.
[0117] According to an embodiment, the PINN comprises a plurality of sub-PINNs. At step 810, the PDEs are discretized on a current time interval mesh including a plurality of points into a plurality of linear equations for a plurality of time steps of the current time interval, the plurality of linear equations are respectively formulated to characterize the physical system with a plurality of first discretization matrixes corresponding to the plurality of time steps of the current time interval and the physical quantities at the plurality of points of the current time interval mesh. At step 820, a plurality of preconditioning matrixes are determined based respectively on the plurality of first discretization matrixes. At step 830, a plurality sets of values of the physical quantities of the object at the plurality of points of the current time interval mesh are predicted by the plurality of sub-PINNs. At step 840, a loss is obtained based on the plurality sets of predicted values of the physical quantities of the object and the plurality of preconditioning matrixes.
[0118] According to an embodiment, at step 820, the plurality of preconditioning matrixes are determined by performing incomplete LU factorization on a plurality of second discretization matrixes, each of which is a sum of a unit matrix and a corresponding one of the plurality of first discretization matrixes.
[0119] According to an embodiment, at step 840, the loss is obtained based on substantively multiplying the inverse matrix of each of the plurality of preconditioning matrixes with a corresponding one of the plurality of second discretization matrixes.
[0120] According to an embodiment, at step 840, each of the plurality of second discretization matrixes is multiplied with a corresponding set of the plurality sets of predicted values of the physical quantities of the object to obtain a plurality of first sums of predicted values of source terms at the plurality of points of the mesh and the predicted values of the physical quantities of the object, wherein the source terms are decided by the PDEs; a plurality of differences between the plurality of first sums and a plurality of second sums are obtained, wherein each of the plurality of second sums is a sum of known values of the source terms at the plurality of points of the mesh for a corresponding time step of the plurality of time steps and one set of the plurality sets of values of the physical quantities of the object for a previous time step of the plurality of time steps; and the loss is obtained based on respective multiplications of the inverse matrixes of the plurality of preconditioning matrixes and the plurality of differences. At step 850, the learnable parameters of the plurality of sub-PINNs are updated based on the loss.
[0121] According to an embodiment, at step 810, last newton iteration values of the physical quantities of the object for a last newton iteration at the plurality of points of the mesh are obtained, a nonlinear prediction matrix is obtained based on the last newton iteration values and nonlinear equations derived from the PDEs, and a Jacobian matrix of the nonlinear prediction matrix is obtained, wherein the Jacobian matrix being taken as the first discretization matrix. At step 830, current newton iteration values of the physical quantities of the object at the plurality of points of the mesh are predicted by the PINN. At step 840, a loss is obtained based on the predicted current newton iteration values of the physical quantities of the object, the last newton iteration values of the physical quantities of the object and the preconditioning matrix.
[0122] According to an embodiment, at step 820, the preconditioning matrix is determined by performing incomplete LU factorization on the first discretization matrix.
[0123] According to an embodiment, at step 840, the loss is obtained based on substantively multiplying the inverse matrix of the preconditioning matrix with the first discretization matrix.
[0124] According to an embodiment, at step 840, a difference between a multiplication of the first discretization matrix with the predicted current newton iteration values and a multiplication of the first discretization matrix with the last newton iteration values is obtained; a sum of the difference and the nonlinear prediction matrix is obtained; and the loss is obtained based on multiplication of the inverse matrix of the preconditioning matrix and the sum.
[0125] According to an embodiment, the object is one of a fuel cell bipolar plate, a part of a car, a part of a plane, a part of a building, pipes of a reactor, flow baffles, wherein the structural quantities comprise at least one of position, radius, width, height, length, anchor points, and wherein the physical quantities comprise at least one of velocity, pressure, temperature.
[0126] Fig. 9 illustrates an exemplary method for performing structural optimization of an object according to aspects of the disclosure.
[0127] At step 910, a PINN for solving the PDEs describing the physical system related to the object is trained by using the training method according to the embodiments of the present disclosure as described in connection with Figs. 1-8.
[0128] At step 920, physical quantities of the object are predicted by using the trained PINN. It is appreciated that the training step 910 and the prediction step 920 may be performed alternately and iteratively in some embodiments, for example, when method 2 and 3 are employed.
[0129] At step 930, the structural features of the object are updated or optimized based on the predicted physical quantities of the object.
[0130] According to an embodiment, the object is one of a fuel cell bipolar plate, a part of a car, a part of a plane, a part of a building, pipes of a reactor, flow baffles, wherein the structural quantities comprise at least one of position, radius, width, height, length, anchor points, and wherein the physical quantities comprise at least one of velocity, pressure, temperature.
[0131] Fig. 10 illustrates an exemplary computing system according to aspects of the disclosure. The computing system 1000 may comprise at least one processor 1010. The computing system 1000 may further comprise at least one storage device 1020. The storage device 1020 may store computer-executable instructions that, when executed, cause the processor 1010 to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-9.
[0132] The embodiments of the present disclosure may be embodied in a computer-readable medium such as non-transitory computer-readable medium. The non-transitory computer-readable medium may comprise instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-9.
[0133] The embodiments of the present disclosure may be embodied in a computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform any operations according to the embodiments of the present disclosure as described in connection with Figs. 1-9.
[0134] It should be appreciated that all the operations in the methods described above are merely exemplary, and the present disclosure is not limited to any operations in the methods or sequence orders of these operations, and should cover all other equivalents under the same or similar concepts.
[0135] It should also be appreciated that all the modules in the apparatuses described above may be implemented in various approaches. These modules may be implemented as hardware, software, or a combination thereof. Moreover, any of these modules may be further functionally divided into sub-modules or combined together.
[0136] The previous description is provided to enable any person skilled in the art to practice the various aspects described herein. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects. Thus, the claims are not intended to be limited to the aspects shown herein. All structural and functional equivalents to the elements of the various aspects described throughout the present disclosure that are known or later come to be known to those of ordinary skill in the art are expressly incorporated herein by reference and are intended to be encompassed by the claims.
Claims
1.A computer implemented method for training a Physics-informed neural network (PINN) for predicting physical quantities of an object, comprising:discretizing partial differential equations (PDEs) , which are formulated to characterize a physical system related to the object with structural quantities and the physical quantities of the object, on a mesh including a plurality of points into a linear equation, the linear equation is formulated to characterize the physical system with a first discretization matrix and the physical quantities at the plurality of points of the mesh;determining a preconditioning matrix based on the first discretization matrix;predicting values of the physical quantities of the object at the plurality of points of the mesh by the PINN;obtaining a loss based on the predicted values of the physical quantities of the object and the preconditioning matrix;updating learnable parameters of the PINN based on the loss.2.The method of claim 1, wherein the determining a preconditioning matrix comprises:determining the preconditioning matrix by performing incomplete LU factorization on the first discretization matrix.3.The method of claim 2, wherein the obtaining a loss comprises:obtaining the loss based on substantively multiplying an inverse matrix of the preconditioning matrix with the first discretization matrix.4.The method of claim 3, wherein the obtaining a loss comprises:multiplying the first discretization matrix with the predicted values of the physical quantities of the object to predict values of source terms at the plurality of points of the mesh, wherein the source terms are decided by the PDEs;obtaining a difference between the predicted values of the source terms and known values of the source terms at the plurality of points of the mesh; andobtaining the loss based on multiplication of the inverse matrix of the preconditioning matrix and the difference.5.The method of claim 1, wherein the discretizing PDEs comprises: discretizing the PDEs into the linear equation by using finite difference method (FDM) on the plurality of points of the mesh.6.The method of claim 1, whereinthe discretizing PDEs comprises: discretizing the PDEs on a current time step mesh including a plurality of points into a current time step linear equation, the current time step linear equation is formulated to characterize the physical system with a current time step first discretization matrix and the physical quantities at the plurality of points of the current time step mesh;the method further comprises: obtaining last time step values of the physical quantities of the object at the plurality of points of the current time step mesh;the determining a preconditioning matrix comprises: determining a current time step preconditioning matrix based on the current time step first discretization matrix;the predicting values of the physical quantities of the object comprises: predicting current time step values of the physical quantities of the object at the plurality of points of the current time step mesh by the PINN;the obtaining a loss comprises: obtaining the loss based on the predicted current time step values of the physical quantities of the object, the last time step values of the physical quantities of the object and the preconditioning matrix.7.The method of claim 6, wherein the determining a current time step preconditioning matrix comprises:determining the current time step preconditioning matrix by performing incomplete LU factorization on a second discretization matrix which is a sum of a unit matrix and the current time step first discretization matrix.8.The method of claim 7, wherein the obtaining a loss comprises:obtaining the loss based on substantively multiplying an inverse matrix of the current time step preconditioning matrix with the second discretization matrix.9.The method of claim 8, wherein the obtaining a loss comprises:multiplying the second discretization matrix with the predicted values of the physical quantities of the object to obtain a first sum of predicted values of source terms at the plurality of points of the mesh and the predicted values of the physical quantities of the object, wherein the source terms are decided by the PDEs;obtaining a difference between the first sum and a second sum of known values of the source terms at the plurality of points of the mesh and the last time step values of the physical quantities of the object; andobtaining the loss based on multiplication of the inverse matrix of the current time step preconditioning matrix and the difference.10.The method of claim 1, wherein the PINN comprises a plurality of sub-PINNs,the discretizing PDEs comprises: discretizing the PDEs on a current time interval mesh including a plurality of points into a plurality of linear equations for a plurality of time steps of the current time interval, the plurality of linear equations are respectively formulated to characterize the physical system with a plurality of first discretization matrixes corresponding to the plurality of time steps of the current time interval and the physical quantities at the plurality of points of the current time interval mesh;the determining a preconditioning matrix comprises: determining a plurality of preconditioning matrixes based respectively on the plurality of first discretization matrixes;the predicting values of the physical quantities of the object comprises: predicting a plurality sets of values of the physical quantities of the object at the plurality of points of the current time interval mesh by the plurality of sub-PINNs;the obtaining a loss comprises: obtaining a loss based on the plurality sets of predicted values of the physical quantities of the object and the plurality of preconditioning matrixes.11.The method of claim 10, wherein the determining a plurality of preconditioning matrixes comprises:determining the plurality of preconditioning matrixes by performing incomplete LU factorization on a plurality of second discretization matrixes, each of which is a sum of a unit matrix and a corresponding one of the plurality of first discretization matrixes.12.The method of claim 11, wherein the obtaining a loss comprises:obtaining the loss based on substantively multiplying the inverse matrix of each of the plurality of preconditioning matrixes with a corresponding one of the plurality of second discretization matrixes.13.The method of claim 12, wherein the obtaining a loss comprises:multiplying each of the plurality of second discretization matrixes with a corresponding set of the plurality sets of predicted values of the physical quantities of the object to obtain a plurality of first sums of predicted values of source terms at the plurality of points of the mesh and the predicted values of the physical quantities of the object, wherein the source terms are decided by the PDEs;obtaining a plurality of differences between the plurality of first sums and a plurality of second sums, wherein each of the plurality of second sums is a sum of known values of the source terms at the plurality of points of the mesh for a corresponding time step of the plurality of time steps and a set of the plurality sets of values of the physical quantities of the object for a previous time step of the plurality of time steps; andobtaining the loss based on respective multiplications of the inverse matrixes of the plurality of preconditioning matrixes and the plurality of differences,wherein the updating learnable parameters of the PINN comprises updating learnable parameters of the plurality of sub-PINNs based on the loss.14.The method of claim 1, whereinthe discretizing PDEs comprises: obtaining last newton iteration values of the physical quantities of the object at the plurality of points of the mesh, obtaining a nonlinear prediction matrix based on the last newton iteration values and nonlinear equations derived from the PDEs, and obtaining a Jacobian matrix of the nonlinear prediction matrix, wherein the Jacobian matrix being taken as the first discretization matrix;the predicting values of the physical quantities of the object comprises: predicting current newton iteration values of the physical quantities of the object at the plurality of points of the mesh by the PINN;the obtaining a loss comprises: obtaining a loss based on the predicted current newton iteration values of the physical quantities of the object, the last newton iteration values of the physical quantities of the object and the preconditioning matrix.15.The method of claim 14, wherein the obtaining a loss comprises:obtaining the loss based on substantively multiplying an inverse matrix of the preconditioning matrix with the first discretization matrix.16.The method of one of claims 1 to 15, wherein the object is one of a fuel cell bipolar plate, a part of a car, a part of a plane, a part of a building, pipes of a reactor, flow baffles, wherein the structural quantities comprise at least one of position, radius, width, height, length, anchor points, and wherein the physical quantities comprise at least one of velocity, pressure, temperature.17.A computer implemented method for performing structural optimization of an object, comprising:training a PINN for solving PDEs describing a physical system related to the object by using the method of one of claims 1-16;predicting physical quantities of the object by using the trained PINN;updating the structural features of the object based on the predicted physical quantities of the object.18.A computer system, comprising:one or more processors; andone or more storage devices storing computer-executable instructions that, when executed, cause the one or more processors to perform the operations of the method of one of claims 1-17.19.A computer program product comprising computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of one of claims 1-17.20.One or more computer readable storage media storing computer-executable instructions that, when executed, cause one or more processors to perform the operations of the method of one of claims 1-17.
Citation Information
Patent Citations
Partial differential equation solving method and system based on physical information neural network
CN114780909A
Plant protection unmanned aerial vehicle downwash wind field reconstruction method based on physical information neural network
CN115239018A
Flood forecasting method based on SCM-PINNs
CN116975513A
Optimization and digital twin of chromatography purification process using physics-informed neural networks
US20230359888A1
Methods, systems, and computer readable media for causal training of physics-informed neural networks
WO2023172408A2