MoULDyS: A Monitoring Tool For Autonomous Systems

Developer: Bineet Ghosh (Many thanks to Étienne André for the useful suggestions).

Autonomous Systems

  • Vehicles.

  • Drones.

  • Robots.

  • Medical Devices.

What is Monitoring?

  • In the event of crash: Police and Insurance Companies are interested in questions like "cause of crash?", "who was at fault?".

  • The vehicles and planes are generally equipped with a device called the black box, that stores the information of vehicle/plane until the time of the crash.

  • Monitoring: Detecting possible safety violations from the stored information—helps in detecting cause of the crash, and the vehicle at fault.

Checkout MoULDyS

  • MoULDyS: A tool to perform monitoring of autonomous systems.

  • The code is available source through a public GitHub repository, under the GNU General Public License v3.0 (gpl-3.0).

  • Questions? Feel free to email Bineet Ghosh at bineet@cs.unc.edu.

MoULDyS: A Tool to Perform Monitoring of Autonomous Systems

  • A log, comprising of recorded samples (from the black-box), can have samples missing at various time steps, and also the recorded samples can have added noise to it due to sensor uncertainties.

  • The bounding model of the system (an over-approximation of the system model) is given as an input to MoULDyS.

  • MoULDyS can analyze such logs to detect possible safety violations, that might have caused the failure—this is known as Offline Monitoring.

  • Further, MoULDyS has a framework to infer safety of a system that triggers the logging system to sample only when needed. This is known as Online Monitoring, which targets at energy efficiency by sampling only when required.

  • MoULDyS detects safety at discrete time steps.

  • The algorithms implemented in MoULDyS is presented in the paper by Bineet Ghosh and Étienne André, Offline and Online Monitoring of Scattered Uncertain Logs Using Uncertain Linear Dynamical Systems (published in FORTE 2022).

Interested In Using MoULDyS?

  • Given the bounding model of the system, MoULDyS can detect possible safety violations using Offline Monitoring (from a given noisy log) or Online Monitoring (that targets at energy saving).

  • MoULDyS is implemented in Python and can run on a standard laptop with a Linux operating system.

  • MoULDyS can analyze system logs of systems (such as Anesthesia and ACC) under 2.5 minutes on a standard laptop!

  • MoULDyS is available open-source through a public GitHub repository, under the GNU General Public License v3.0 (gpl-3.0).

  • MoULDyS is easy to install—it can be simply installed by installing the dependencies and setting the path variable. Check out the installation guide for details.

  • Tutorials with sample code on how to MoULDyS use can be found in the user guide.

How does MoULDyS work?

MoULDyS implements the ideas presented in the paper by Bineet Ghosh and Étienne André, Offline and Online Monitoring of Scattered Uncertain Logs Using Uncertain Linear Dynamical Systems (published in FORTE 2022).


Offline Monitoring

The main idea of offline monitoring is to recreate the missing samples. Consider two consecutive logs k and k +1 with time stamps t and t+5. In this case, the main objective is to check if an unsafe behavior has happened between time steps t and t+5. This is achieved by computing (over-approximate) reachable sets from time step t, with the initial set as per the log k, up-to time step t + 5 respectively. If the over-approximate reachable set intersects with the unsafe set, the system is flagged as possibly unsafe; if not, the system is definitely safe. It further proposes a heuristic to reduce the number of false alarms.

Online Monitoring

The online monitoring framework, too, uses reachable sets at discrete steps to detect if there is a possible violation of safety. If there is a violation, it triggers and sample at that time step.

Results Using MoULDyS

Anesthesia

An automated Anesthesia delivery model using the drug propofol is used. The system models the metabolization of the drug by the body, and the depth of hypnosis. The system models the metabolization of the drug by the body, and the depth of hypnosis. The state variables encode the various concentration levels---that must be within a certain limit at all times—modeling the metabolization of the drug and the depth of hypnosis. Note that a higher concentration level would mean that the patient remains unconscious for a longer period of time, while a lower concentration level would mean that patient remains conscious during the surgery—which can be traumatic. Clearly, monitoring of this system for safety (i.e., the concentration levels are within a safe bound at all times) is crucial. However, it is not possible for a busy human doctor or a practitioner to manually monitor all the patients at all times. Thus, MoULDyS enables them to perform an automated monitoring of the patients without compromising on safety and save their time.


Adaptive Cruise Control (ACC)

Most modern day cars are equipped with adaptive cruise control, which behaves like an ordinary cruise control when there is no car in its sight, and maintains a safe distance when there is a car in its sight. In the event of a crash, the only data available to analyze the crash is the stored logs. Offline Monitoring provides an automated way to detect the cause of the crash and who was at fault—these questions are particularly useful to police and insurance companies. Similarly, consider a vehicle driving in a highway with a vehicle in its sight. The ACC unit will have to continuously read sensor values to track several parameters, such as acceleration of the lead vehicle, braking force, etc.—causing an wastage of energy. In these cases, deploying online monitoring on the vehicle ACC will ensure that the sensor values are only read when there is a potential unsafe behavior—thus saving a lot energy. Thus, MoULDyS enables the cars to perform an automated monitoring.