Robust online monitoring of signal temporal logic

Jyotirmoy V. Deshmukh, Alexandre Donzé, Shromona Ghosh, Xiaoqing Jin, Garvit Juniwal, Sanjit A. Seshia

TL;DR

This paper introduces a novel "robust interval semantics" for Signal Temporal Logic (STL) that allows for monitoring system properties even with incomplete data (partial traces). They then present an efficient online algorithm that leverages this semantics to significantly speed up simulations by detecting violations early, offering substantial time savings with minimal computational overhead.

What Problem Does This Paper Address?

Cyberphysical systems (CPS) are increasingly complex, integrating digital and continuous components. Rigorously specifying and verifying their behavior is crucial. Signal Temporal Logic (STL) is a powerful formalism for this, offering a "quantitative semantics" that not only checks if a property holds but also by how much. While algorithms exist for "offline monitoring" (analyzing complete simulation traces after they've run), this approach is impractical for real-time embedded systems or when simulations are extremely long. These scenarios demand "online monitoring" that can provide timely feedback and potentially abort simulations early. The challenge lies in defining and efficiently computing property satisfaction when only partial data is available, making it impossible to definitively say "true" or "false."

Methods

The core contribution is the formalization of a robust interval semantics for STL over partial traces. Instead of a single Boolean or quantitative value, this semantics returns an interval representing the possible range of satisfaction values for all possible completions of the partial trace. This interval captures uncertainty due to missing data.

Building on this, the authors propose an efficient online algorithm. This algorithm operates on the syntax tree of the STL formula and uses a dynamic programming approach. It maintains "worklists" at each node of the syntax tree, storing the robust satisfaction intervals for subformulas at relevant time points. Crucially, it avoids recomputing values by incrementally updating these worklists as new data arrives. The algorithm leverages a "sliding window maximum" filter for temporal operators and is designed to have minimal runtime overhead compared to its offline counterpart. They also present specialized algorithms for monitoring formulas with untimed temporal operators, allowing for constant or bounded memory usage.

Datasets

The paper evaluates its approach on two large-scale, real-world case studies:

  • Diesel Engine Model (DEM): An industrial-sized Simulink® model of a prototype airpath system in a diesel engine, featuring a complex plant model with over 3000 blocks and numerous lookup tables.
  • CPSGrader: A publicly available automatic grading and feedback generation tool for online virtual labs in cyber-physical systems, used to test student solutions.

Key Insights and Ideas

  • Interval Semantics for Uncertainty: The idea of using an interval to represent the possible satisfaction values of a property when data is incomplete is a key innovation. This elegantly handles the inherent uncertainty in partial traces.
  • Early Termination for Speedup: The most significant practical insight is that by monitoring online and detecting violations or a definitive satisfaction interval early, expensive simulations can be aborted, leading to substantial time savings.
  • Minimal Overhead: The proposed online algorithm is designed to be computationally efficient, adding minimal overhead to the simulation process itself. This is critical for its applicability in resource-constrained environments.
  • Untimed Formulae Optimization: The development of specialized algorithms for untimed temporal operators demonstrates a deeper understanding of how to manage memory and computation for different classes of STL formulas in an online setting.

Key Results

The paper demonstrates significant improvements in simulation time through early termination:

  • Diesel Engine Model: Savings of up to 24% simulation time were observed, with negligible overhead (around 0.1%) for the online algorithm.
  • CPSGrader: Up to 24% simulation time savings were achieved, with the online algorithm's overhead being less than 1% of the simulation time and consistently lower than a naive recomputation approach by a factor of 40x to 80x.
  • The online algorithm consistently outperformed a naive approach that recomputes everything at each step.

Limitations and Future Work

  • Untimed Formulae Generalization: While Theorem 1 addresses specific untimed formulas, the paper notes that generalizing this to all untimed formulas requires further conditions (bounded horizon subformulae and smallest step-size). Theorem 2 provides a path for monitoring certain untimed formulas with bounded memory.
  • Interpolation Assumption: The paper assumes piecewise constant interpolation for reconstructing signals. While common, other interpolation methods might require adjustments.
  • Future Work: The authors suggest extending the results to more complex STL formulas and exploring further optimizations for untimed operators. The work also lays the groundwork for integrating online monitoring into real-time control systems.

Summary updated

BibTeX
@article{deshmukh2017robust,
  author = {Jyotirmoy V. Deshmukh and Alexandre Donzé and Shromona Ghosh and Xiaoqing Jin and Garvit Juniwal and Sanjit A. Seshia},
  title = {{Robust online monitoring of signal temporal logic}},
  journal = {Formal Methods Syst. Des.},
  year = {2017},
  doi = {10.1007/s10703-017-0286-7},
}
Figure