Physics Informed Neural Networks(PINNs)


(PS: Cover is generated by Ideogram AI scary isn't it 😱)
How I came across PINNs :
During my 4th Sem at IIT BHU, I had an Exploratory Project in which our professors assigned us a project based on our interest I was very interested in Machine Learning so my professor gave me a project to solve Partial Differential Equation(PDE) of Timoshenko Equation(used in Structural Mechanics).
My professor told me about PINNs and gave me a research paper on PINNs at first I was overwhelmed by the paper it was very mathematical but it was impressive how the author described it and used it in solving PDEs
Many of you must be wondering....
What are PINNs?
Why it's important?
Why are we calling it Physics Informed Neural Network why not only Neural Network?
and many more questions...
Let's answer the questions to understand things from basics.....
What are PINNs :
It is a technique to solve complex scientific problems using physical law(not physics) and machine learning.
Instead of just using the raw data to make predictions, PINNs use these physical equations in a neural network model. So, the neural network not only learn from the data but also from the fundamental equations.
Why it's important? :
This is very useful when it is difficult/expensive to obtain a large amount of data. PINNs can make more accurate predictions, even when the available data is limited or noisy.
One of the most common use cases of PINNs is for solving Partial Differential Equations(PDEs) in various fields of science and engineering.
Neural Network V/S PINNs :
Neural Networks are good for machine learning models that can learn patterns and predict outcomes based on data but...
PINNs are very effective in case of limited or noisy data by using its physical principles but it is very time-consuming so the results we get are very accurate.
Solving PDEs using PINNs :
We will use a machine learning library called TensorFlow and DeepXDE to solve PDEs
Let's start by importing libraries:
Now code the PDEs in the DeepXDE library syntax:
Now we define the boundary conditions and functions:
At last, we write the Neural Network architecture:
The results from PINNs are very accurate and can reach high accuracy by changing the architecture of hidden layers in Neural Networks and activation functions.
Subscribe to my newsletter
Read articles from Ankit Kumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Ankit Kumar
Ankit Kumar
Pre Final Year student at IIT BHU passionate about building softwares