Spec2Control: Automating PLC/DCS Control-Logic Engineering from Natural Language Requirements with LLMs - A Multi-Plant Evaluation
Heiko Koziolek, Thilo Braun, Virendra Ashiwal, Sofia Linsbauer, Marthe Ahlgreen Hansen, Karoline Grotterud
TL;DR
The paper tackles the costly manual process of control-logic engineering in DCS/PLC environments by introducing Spec2Control, an end-to-end LLM-driven workflow that converts natural-language requirements into graphical IEC 61131-3 Function Block Diagrams (FBD). It employs a seven-step pipeline including narrative chunking, context generation from a function-block library, and a structured pseudo-code approach for FBD generation, followed by deterministic layout and PLC IDE integration. On an open dataset of 10 control narratives (65 sections), Spec2Control achieves $98.6\%$ correct control-strategy connections, $97.1\%$ alarm mappings, and $95\%$ time savings, with zero human interventions in most cases and a per-chunk cost of about $0.63$ USD for LLM processing. The work demonstrates high feasibility of large-scale, automated control-logic generation, provides an open dataset and open-source adapters for validation, and discusses integration with commercial ABB tools and future extensions to SFC/ST and HMI. These results suggest a practical path toward substantial automation in industrial control engineering, with significant implications for cost, speed, and consistency in DCS/PLC projects.
Abstract
Distributed control systems (DCS) manage the automation for many industrial production processes (e.g., power plants, chemical refineries, steel mills). Programming the software for such systems remains a largely manual and tedious process, incurring costs of millions of dollars for extensive facilities. Large language models (LLMs) have been found helpful in generating DCS control logic, resulting in commercial copilot tools. Today, these tools are focused on textual notations, they provide limited automation, and have not been tested on large datasets with realistic test cases. We introduce Spec2Control, a highly automated LLM workflow to generate graphical control logic directly from natural language user requirements. Experiments using an open dataset with 10 control narratives and 65 complex test cases demonstrate that Spec2Control can successfully identify control strategies, can generate 98.6% of correct control strategy connections autonomously, and can save between 94-96% of human labor. Spec2Control is being integrated into commercial ABB engineering tools, but is also available as an open-source variant for independent validation.
