Hamza Alsharif

Machine Learning | Embedded Systems

My old humble workshop back at KFUPM.

Overview

My MPhil work at Cambridge. In this work I investigated the effectiveness of Physics-informed Neural Networks (PINNs) as surrogate predictive models to be deployed within real physical systems. I benchmarked the accuracy of PINNs against equivalent uninformed neural networks, for:

Additionally performed a parallel heating experiment to investigate questions related to noise and uncertainty. The general areas that the thesis is centered around include physics-informed machine learning, surrogate modelling, embedded systems, and physical experimentation.

Backstory

Newton

Figure 1: Newton framework diagram. Newton can be used to define and incorporate invariant relationships within embedded systems that interact with the physical world. Sensors can be associated with signal definitions in Newton.

Newton, a description language for physics, was what initially sparked the motivation for my MPhil topic. The main purpose of Newton is to act as a domain-specific language for embedded systems that interact with the physical world.

It offers programmatic abstractions for describing physical signals, constants, signal dimensions, and invariant relationships between different signals. A compiler statically analyses the descriptions (using dimensional function synthesis) to extract dimensional information between signals, and then performs dimensional analysis to generate the π products of the Buckingham π theorem.

Going into my MPhil, I was interested in extending Newton with features for describing and encoding differential equations. Many physical systems are governed by differential equations, so having a way to incorporate them into embedded computers would enable programmers to build systems that exploit the mathematical structures and physical properties of signals based on these equations. This would lead to sensor-driven systems controllers that are generally more robust and efficient.

Hardware

One of the other motivations I had with the project was focused on the hardware side, given my background and interest in FPGAs and computer architecture. I was interested in exploring whether a hardware synthesis tool for physical systems could be developed, and what such a tool would look like. In essence, is there a way to synthesise hardware based on a differential equation, where the signals in the equation are linked to sensors.

PINNs for Physical Experiments

Figure 2: PINN architecture using the 2D heat equation.

My interest in encoding differential equations for physical systems led me to physics-informed neural networks (PINNs) , and I instead focused my attention on using them rather than on Newton. I had seen that PINNs were effective in their application as PDE solvers, and so I decided to investigate whether they could be used as surrogate models for real physical systems. Therefore, I selected the simple nonlinear pendulum and 2D heat diffusion as the basis for my experiments in evaluating PINNs on real experimental setups. The factors that motivated this choice were the physical ease of setting up the experiments, the existence differential equations that were not too complicated, and the existence of measurable signals that correspond to the equation variables.

With a new shift in the focus of the project from using Newton towards evaluating PINNs, I also shifted the hardware focus of the project from developing a hardware synthesis tool for physical systems to investigating hardware deployment of PINNs. This led me to FINN, a framework for deploying quantised neural networks into FPGAs. I played around quite a bit with FINN during my research, but unfortunately decided not to include any mention of it in the main chapters of my thesis. However, I did use a PYNQ-Z1 FPGA for data collection in my experiments. This seems like an odd and unexplained choice in my thesis, but the idea behind it was to eventually work towards deploying a PINN model that would make predictions in real-time based on the current sensor measurements.

Figure 3: Experimental setup for the parallel heating experiment in Chapter 5.

The final work chapter of the thesis (Ch. 5) goes over an experiment which is similar to the heating experiment in (Ch. 4), but with 4 more thermal cameras. The experimental setup looks convoluted and questionable, and that's because it is. I did this experiment in the last two weeks of my practical work on my thesis so it was very rushed. The idea behind it is to look into averaging techniques for data from parallel sensors, and investigate questions related to noise. Unfortunately, I realised during the analysis of the data from the experiment that there were some major issues with is. The biggest of these is that the data streams from the cameras were not sychronised or "coherent in time". I still found that there were some valuable lessons to present from the experiment, and so I presented it regardless.

Overall, I think that my MPhil work scratches the surface of an area that can be explored in much more depth — namely physics-informed machine learning for surrogate models in real physical systems. It is an exciting area of research that I continue to enjoy following and would love to pursue further in the future.

Results

Simple Nonlinear Pendulum — Numerical Solution
Simple Nonlinear Pendulum — Experimental Data
Heat Diffusion Experiment
Parallel Heating Experiment