Contextualizing Timed Automata via Knowledge Graphs for Agentic LLM-Based Fault Diagnosis
Timed automata learned from fault-free operation data are an established tool for anomaly detection in Cyber-Physical Production Systems, but they provide no mechanism for fault diagnosis: the automaton operates at the signal level and encodes neither the physical meaning of its states nor the causal relationships needed to reason from an observed anomaly to its root cause. We address this by constructing a semantically enriched knowledge graph that supplies the missing context, integrating the learned automaton with the physical plant model represented in AutomationML. Thus, we ground its states and detected anomalies in the physical process they represent. Building on this knowledge graph, a two-stage large language model agent pipeline generates natural-language state descriptions and diagnoses root causes of detected anomaly syndromes without task-specific training data, fault signature libraries, or manually crafted rules. Evaluated on a simulated modular production system benchmark across ten configurations of increasing complexity, state descriptions achieve near-perfect accuracy (99.5% on states observed in fault-free operation, 100% on anomaly-induced states). Syndrome diagnosis identified the correct root cause in 99.4% of localized faults. Propagating faults, whose effects span multiple states, remain the harder case at 76.5%. The results demonstrate that semantic grounding of learned behavioral models is a viable path toward adaptive fault diagnosis where neither fault history nor expert annotations are available.