Introduction
Stream-based monitoring is a cornerstone of runtime verification for cyber-physical systems (CPS). By relating input streams (sensor data) to output streams (aggregations or safety checks), monitors provide real-time assurance. However, traditional monitors are passive: they consume data at rates dictated by the system's sensors. In resource-constrained environments—such as autonomous aircraft where battery life and communication bandwidth are at a premium—this "one-size-fits-all" sampling approach is often inefficient.
This paper introduces an active monitoring framework using the RTLola specification language. By allowing the monitor to dynamically dictate sensor sampling rates based on the system's current state, we can prioritize safety-critical data when needed and conserve resources during nominal operation.
The Problem: The Inefficiency of Passivity
Traditional stream-based monitoring sits at the end of a data pipe, processing whatever sensor readings the system sends. This creates a dilemma in resource-constrained environments:
- Low Frequency: Saves bandwidth but risks missing transient safety violations or reacting too late.
- High Frequency: Ensures safety but exhausts communication channels and energy, potentially starving other critical system functions.
In a drone flight, for instance, GPS coordinates are vital when approaching a restricted geofence but less critical when hovering in a safe zone. A passive monitor cannot distinguish between these states to adjust its data intake, leading to either wasted bandwidth or increased risk.
The Active Monitoring Framework
The proposed approach transforms the monitor into an intelligent component that "asks" for data. This is achieved through three primary pillars:
1. Scheduling Annotations
The authors extend RTLola syntax to include priority and deadline annotations. These allow developers to define how the importance of a stream changes relative to the system state. For example, a geofence monitor might have its priority increased automatically as the distance to the boundary decreases.
2. Formal Scheduled Semantics
To ensure reliability, the framework defines mathematical semantics for scheduled monitors. This logic ensures that the scheduler respects hard bandwidth limits (e.g., a maximum number of sensor queries per time unit) while guaranteeing that no sensor is ignored indefinitely, preventing data starvation.
3. The Translation Approach
A key contribution is the portability of this method. The authors developed a translator that converts these high-level scheduling annotations into standard RTLola output streams. These streams serve as instructions for a dedicated Scheduler Component that interfaces with the hardware. This allows active monitoring to be implemented without modifying the underlying RTLola monitoring engine.
Experimental Evaluation
The framework was evaluated using the Microsoft AirSim simulator, a high-fidelity environment for autonomous vehicles. The researchers designed a scenario where a drone performs a barometer-based experiment while adhering to geofence and altitude constraints.
The active monitor was compared against four fixed-frequency passive baselines (ranging from 0.33 Hz to 2 Hz). The goal was to determine if the active monitor could maintain safety while reducing the data load compared to these traditional methods.
Key Results
The evaluation demonstrated that specification-guided scheduling provides a superior trade-off between resource usage and safety:
- Bandwidth Efficiency: The active monitor achieved the same violation detection speed as a 2 Hz fixed-frequency monitor while using 50% less bandwidth.
- Faster Detection: When restricted to the same bandwidth as a 1 Hz passive monitor, the active monitor detected safety violations significantly sooner.
- Dynamic Adaptation: The monitor successfully shifted bandwidth from experimental sensors (barometers) to safety sensors (GPS/Altitude) the moment the drone entered a high-risk state, reverting to experimental data collection once the danger passed.
Conclusion and Future Work
Active monitoring represents a significant shift in runtime verification, moving the monitor from a passive observer to a proactive controller of information flow. By leveraging the monitor's unique global view of the system state, RTLola can optimize resource allocation without compromising safety.
Future research will focus on measuring the communication overhead of the "query-response" cycle on physical hardware and extending the framework to handle more complex sensor dependencies and varying data widths across different communication protocols.
Summary updated