Introduction
Cyber-Physical Systems (CPS), such as aircraft controllers and automotive transmissions, are notoriously difficult to debug due to their integration of discrete logic and continuous physical dynamics. While current tools are effective at identifying that a system has failed (falsification), they often function as "black boxes," providing little insight into why the failure occurred. Faults in these systems propagate through hundreds of variables over time, requiring engineers to spend days manually tracing signals through complex models to find a root cause.
CPSDebug is a new framework designed to automate this diagnostic process. By mining behavioral invariants from successful simulations and comparing them against failing ones, it narrows down hundreds of internal signals to a handful of suspicious components, providing a time-ordered narrative of fault propagation.
Methodology
The authors introduce CPSDebug, a three-phase workflow designed to "open the black box" of CPS failures:
- Testing & Instrumentation: The tool automatically instruments a Simulink/Stateflow model to log every internal signal. It runs a test suite and uses Signal Temporal Logic (STL) to automatically label traces as "passing" or "failing."
- Property Mining: CPSDebug analyzes passing traces to infer "normal" behavior using Daikon, an invariant detection tool. It generates thousands of candidate properties (e.g., "Signal A is always less than Signal B") and retains only the statistically significant ones.
- Failure Explanation: When a failure occurs, the tool checks the failing trace against the mined properties. Any violation is flagged as an anomaly. To prevent information overload, k-means clustering groups these violations by time and location, producing a sequence of "snapshots" that show the fault's origin and its path through the system.
Evaluation and Case Studies
The approach was evaluated on two complex, industry-standard CPS models:
- Aircraft Elevator Control System: A highly redundant model with 426 signals (361 internal), including hydraulic circuits, flight control units, and various sensors.
- Automatic Transmission Control System: A model with 51 variables, featuring four lookup tables and two parallel finite state machines.
The authors injected various faults into these models, such as sensor failures, low-pressure hydraulic leaks, and incorrect lookup table values, to validate the framework's ability to pinpoint root causes.
Key Insights
- Learning from Success: Instead of predefined failure modes, the system learns what "correct" looks like from passing tests, making it adaptable to different models without manual rule-writing.
- Dimensionality Reduction: To handle the massive data volume in CPS models, the authors used cross-correlation to prune redundant signals, reducing 361 variables to 121 in the aircraft case.
- The "Story" of a Fault: By clustering violations chronologically, the tool creates a narrative. It can show, for example, how a sensor signal first became suspicious, leading to an unexpected controller state, and finally a safety requirement violation.
Results and Impact
- Massive Scope Reduction: In the aircraft case study, CPSDebug reduced the number of signals an engineer needs to inspect by 90% to 96%.
- High Accuracy: The tool successfully identified the root cause in 75% of the complex failure scenarios tested.
- Professional Validation: Engineers from major automotive and simulation tool vendors confirmed that the visual feedback within the modeling environment was highly valuable for navigating complex models during post-mortem analysis.
- Performance: While the mining phase is computationally heavy, the actual analysis of a failure happens in seconds, enabling an interactive debugging workflow.
Limitations and Future Work
Current limitations include a struggle with faults that only affect signal timing rather than value. Additionally, the property mining phase remains a bottleneck. Future research aims to optimize the mining process and extend support to heterogeneous components, such as physical modeling blocks (SimScape) common in industrial production.
Summary updated