Inspiration

Our main reason for starting this project was to learn more about Taipy and how to use each of the three main applications for the frontend, backend, and development of our project. Additionally, for this Hackathon, three of our four group members are engineering majors, so we wanted to create a project that incorporates engineering with computer science. To achieve this, we decided to use physics-informed neutral networks (PINNs) since they can provide an easy way to predict the result of differential equations that are otherwise harder to solve. Our group picked projectile motion as the differential equation to model since all of the members were at least familiar with the concept.

What it does

PINN Projectiles is an interactive website that allows a user to train a PINN model to predict the projectile motion of an object given acceleration, velocity, and position. On the left of the website, there are three boxes that the user can enter their initial values into and then they use the submit button to create the graph. The graph will have two lines, one orange and one blue. The orange line represents our PINN's predicted projectile motion, and the blue line represents the real projectile motion. With about 1,000 epochs, the PINN's predicted line is almost completely on top of the real line which means that the PINN was successfully trained and can be used to find other projectile motion graphs.

How we built it

Our first step was to create a PINN model by calculating the loss equation using projectile motion equations Then we train a PINN by providing the initial conditions and domains for the initial conditions. This allows for the PINN to estimate the differential equation without having to run hundreds of thousands of epochs and instead can run a couple thousand which is much faster. Taipy was then used to create an interactive website that allows a user to train models on any values and then displays a graph with the predicted projectile path against the real projectile graph. The website itself is run on Taipy Cloud with the Taipy code running the displays and labels.

Challenges we ran into

The first major challenge we faced was shortening the time it takes to train the PINN model. At one point, the model was taken around 10 minutes to train, but we were able to reduce the training time to about 1 minute on a good computer by reducing the number of hidden layers and the size of the layers. Our major challenge with Taipy was that the graph of the projectile motion was not updating in real time. The process for the graph would stall out if the process took too long so the graph would not be updated on the website unless you refreshed the page. We found a way around this problem by using what Taipy refers to as a heavy function, long callback, and status.

Accomplishments that we're proud of

Our biggest accomplishment was successfully learning and utilizing a PINN. Our group has never used PINNs before and we a proud that we were able to learn it and get it running successfully in the 36 hours that we were provided. We also have never used Taipy before, so being able to complete and deploy a website from scratch is a big accomplishment for us.

What we learned

We learned two new programs through this project: Taipy and PINN. None of our team members had experience using either of these programs before, so we now know how to implement these programs into other project in the future.

What's next for PINN Projectiles

Our current PINN Projectiles is setup to retrain our PINN every time the initial conditions change. The next step for the PINN Projectiles program would be to train a model to use one initial velocity, initial position, and initial acceleration and then be able to predict the projectile motion for any initial values instead.

Built With

Share this project:

Updates