RTLola in Detail

Stream-based Real-time Monitoring

RTLola is a real-time monitoring toolkit for cyber-physical systems and networks. RTLola processes, evaluates, and aggregates streams of input data, such as sensor readings, and provides a real-time analysis in the form of comprehensive statistics and logical assessments of the system health. RTLola has been applied successfully in the monitoring of autonomous systems such as unmanned aircraft.

An RTLola monitor is generated from a formal description given in the RTLola specification language. RTLola specifications consist of stream equations that translate input streams into output streams. RTLola specifications are statically analyzed to determine the required memory and are then either directly executed by the RTLola interpreter, or compiled onto an FPGA.

  • Formal specifications. The RTLola specification language is a highly expressive specification language with a precise formal semantics.
  • Reliable guarantees. RTLola monitors are guaranteed to never run out of memory, because the memory consumption is determined statically.
  • Maintainability and reusability. RTLola specifications are structured into multiple streams, which can be modified and reused with a high degree of flexibility. Specifications can immediately be evaluated in the RTLola interpreter.
  • Efficiency. The RTLola toolkit also includes a compiler to VHDL, which makes it possible to run highly efficient, parallelized RTLola monitors on FPGAs with very limited resources.

The RTLola Language

RTLola receives incoming data in the form of timed, and possibly asynchronous, input streams. The RTLola specification language uses stream equations to translate input streams into output streams. Stream equations play a similar role as variable assignments in standard programming languages. They filter incoming data, compare values from different streams, or carry out more complex computations. RTLola supports different accesses to streams such as direct accesses of current stream values, offset accesses to access previous values, or aggregations, such as averaging the values from stream over a certain temporal window. The produced output can be periodic, i.e., at predefined points in time, or follow the flow of the incoming data. To recognize safety violations, the specification contains triggers consisting of a boolean expression and an alarm message. Triggers characterize critical situations that require further action.

The RTLola Interpreter and Compiler

The implementation of the RTLola toolkit is organized into the frontend and several backends. The frontend takes a specification file and produces an intermediate representation (IR). This representation contains an abstract syntax tree (AST) of the specification and includes additional information relevant for the backends.

RTLola specifications can be run in the software-based interpreter or compiled into the hardware description language VHDL. The interpreter takes the IR and interprets the specification based on the incoming data of the system. The incoming data can be read from a CSV file or received from the standard input. In any case, the monitor prints trigger messages on the standard output. The VHDL-compilation on the other hand takes the IR and produces VHDL code, describing a monitor for the given specification. The corresponding input wires in the monitor implementation receive the input, and the current stream values are stored on the corresponding output wires. With this setup, the monitor can be integrated into the system itself or as a separate component after implementing the missing communication, i.e., a UDP communication where the monitor analyzes the UDP packages sent by the system. The VHDL description can then be synthesized onto an FPGA.