이 제출물을 팔로우합니다
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다
PINN Loss Function Generation with Symbolic Math
Physics-Informed Neural Networks (PINNs) can approximate solutions to ordinary differential equations (ODEs) and partial differential equations (PDEs) by embedding the differential equations into the loss function of the network to guide the learning process. In this way, PINNs can provide more physically consistent predictions than purely data-driven methods. Further, they provide meshfree alternatives to traditional numerical methods.
Central to the PINN loss function is the physics-informed loss term, which evaluates the residual of the differential equation at interior collocation points in the domain. The derivatives are usually computed via automatic differentiation (AD).
This repository provides helper functions which automatically generate the physics-informed loss term from symbollically defined ODEs and PDEs. This physics-informed term can then be used to train PINNs to approximate solutions to PDEs and ODEs, as well as solve inverse and parametric problems.
Setup
Ensure that the files pde2PINNLossFunction.m and ode2PINNLossFunction.m are on your path.
Requires MATLAB® R2024a or newer
- Symbolic Math Toolbox™
- Deep Learning Toolbox™
- Statistics and Machine Learning Toolbox™ (only for training data generation)
To view the examples in the Live Editor, use MATLAB R2025a or newer. See the Live Code File Format documentation page for more details.
Getting Started
- Check out the examples in Start_here.m to learn how to define differential equations symbolically and how to use the repository functions to generate the physics-informed loss functions from these symbolic equations.
- For examples which walk through the entire PINN workflow, see Burgers_PDE.m, Poisson_PDE.m, RLC_ODE.m, RLC_ODE_Inverse.m, and Parametric_ODE.m.
- For an advanced workflow which may offer improved performance through less network forward passes, see NoForward_example.m.
Workflow Examples
- Burgers_PDE.m: use a PINN to approximate the solution to 1D Burgers' equation. This extends the documentation example Solve PDE Using Physics-Informed Neural Network to auto-generate the physics-informed loss term from symbolic Burgers' equation.
- Poisson_PDE.m: use a PINN to approximate the solution to 2D Poisson equation. This extends the documentation example Solve Poisson Equation on Unit Disk Using Physics-Informed Neural Networks to auto-generate the physics-informed loss term from symbolic Poisson equation.
- RLC_ODE.m: use a PINN to approximate the 2nd order ODE arising from an RLC circuit
- RLC_ODE_Inverse.m: use a PINN to estimate circuit parameters in an RLC circuit
- Parametric_ODE.m: use a PINN to estimate the solution to a parametric ODE given a new value of the parameter
License
The license is available in the License.txt file in this repository.
Community Support
Copyright 2025 The MathWorks, Inc.
인용 양식
Mae Markowski (2026). PINN Loss Function Generation with Symbolic Math (https://kr.mathworks.com/matlabcentral/fileexchange/172049-pinn-loss-function-generation-with-symbolic-math), MATLAB Central File Exchange. 검색 날짜: .
| 버전 | 퍼블리시됨 | 릴리스 정보 | Action |
|---|---|---|---|
| 1.1.2 | Updating files from Live Script (.mlx) to Live Code File Format (.m), fixed a broken link in the description. |
||
| 1.1.1 | Adding support for inverse and parametric problems. |
||
| 1.1.0 | Added functionality for inverse problems (parameter estimation from data) and parametric problems. |
||
| 1.0.0 |
