This repository hosts my PyTorch implementations of PINN (Physics-Informed Neural Network) and iPINN (inverse Physics-Informed Neural Network) from the tutorial https://towardsdatascience.com/inverse-physics-informed-neural-net-3b636efeb37e
The original implementations were crafted using TensorFlow and can be accessed at https://github.com/jmorrow1000/PINN-iPINN
Python 3.10.12
PyTorch Version: 2.1.0+cu121
NumPy Version: 1.25.2
Matplotlib Version: 3.7.1
The current implementation concentrates on a PINN and iPINN for the second-order differential equation governing an RLC circuit:
Here,
Below are the results from training a PINN on three test cases: under-damped, critically-damped, and over-damped. For definitions of each scenario, please refer to the original tutorial. Each plot presents a comparison between the analytical solution and the response output from the trained PINN.
Below are the results of applying an iPINN to determine three unknown parameters—R, L, and C—in three different scenarios: under-damped, critically-damped, and over-damped. The tables juxtapose the parameters used to generate the test responses with those inferred by the iPINN. The plots provide a comparison of the analytical solutions and the predictions made by the trained iPINN.
Circuit Parameter | Generating Value | iPINN Value |
---|---|---|
R (ohms) | 1.20 | 1.201 |
L (henries) | 1.50 | 1.499 |
C (farads) | 0.30 | 0.300 |
Circuit Parameter | Generating Value | iPINN Value |
---|---|---|
R (ohms) | 4.47 | 4.472 |
L (henries) | 1.50 | 1.503 |
C (farads) | 0.30 | 0.299 |
Circuit Parameter | Generating Value | iPINN Value |
---|---|---|
R (ohms) | 6.00 | 6.005 |
L (henries) | 1.50 | 1.500 |
C (farads) | 0.30 | 0.299 |
@software{wojtak_pinn_ipinn_2024,
title = {PINN and iPINN for RLC Circuit Equation in Pytorch},
author = {Weronika Wojtak},
month = feb,
year = 2024,
version = {1.0},
publisher = {GitHub},
repository = {https://github.com/w-wojtak/PINNs-and-iPINNs-Pytorch},
}