Note

This is a work-in-progress and requires considerable research efforts to materialize into a demonstration-ready prototype. However, we believe the idea has numerous significant applications and are currently working towards enabling the same.

Background

Due to the COVID-19 related lockdowns in India, physically testing the algorithm developed for the Drowsiness Detection Wearable project became a significant problem.

As an alternative, my team decided to evaluate its efficacy against simulated EOG signals. However, there were two essential points pertaining to the drowsiness detection logic that we needed to consider:

  1. For accurate testing of its performance, the logic must be executed on the TIVA TM4C123G microcontroller that we had selected for our project.
  2. The logic employs ML, i.e., it first studies the features of EOG signals of varying strength and vigour generated by a particular user and then uses this knowledge to classify prolonged blinks (PBs) detected by that user in practice.

Therefore, the simulator was required to not only produce signals that resemble EOG signals corresponding to real-world eye moments but also generate them with the desired variability to recreate the differences in vigour and speed exhibited by human subjects. Using AI may be one of the available options, but since the constituent calculations may be resource-intensive, they cannot be implemented directly on the MCU. Additionally, executing AI-based simulations on a PC and then relaying it over to the MCU over a serial connection may add overhead on the detection logic, and ensuing evaluations may not be an accurate measure of its performance.

Solution

We developed the PID Simulation algorithm using the underlying concepts of the Proportional-Integral-Derivative (PID) controllers used in the process industry. It accepts a two-dimensional signal in the form of change in amplitude over time as input and outputs two-dimensional simulations that are highly correlated to the input in terms of its length and shape, with minor differences present in each simulation.

There are two main steps part of the PID Simulation process:

  1. Automatically calculates a discrete series of PID gains (Kp, Ki and Kd) that represent the skeleton of the original signal.
  2. Using the series above, recreate the signal with random minute variations in each PID gains to purposefully vary the simulated signal in a controlled manner on each instance.

The PID Simulation technique imitates a signal only in its capacity to traverse a two-dimensional space. It conforms to the highest possible degree of abstraction; no knowledge about any facet of the system producing the original waveform is required. Additionally, it is also not a modelling technique and is completely divorced from the signal that it is simulating.

An interesting point to note is that the PID Simulator project was a precursor to the PIDEG and PIDS projects.

PID Simulated sine wave

PID Simulated sine wave

Applications

While we are yet to come up with a comprehensive list of applications for the PID Simulator, some of its potential uses that we have envisioned as of now include:

  • Simulation of physiological signals like ECG, EEG, EOG and EMG.
    Simulating a ECG signal using the PID Simulator

    Simulating a ECG signal using the PID Simulator

  • Radio signal compression
  • Lossy compression of files
  • Encoding images