LLM-based Iterative Refinement of Finite-State Machines with STPA Controller Constraints and Generation of IEC 61499 Code
Year: 2025
Type: conference-paper
Abstract: Large Language Models (LLMs) are increasingly being used in software development and in applications like code generation. While LLMs can provide significant value in the form of time savings in common programming languages like Python, their usability in generating automation software has yet to be studied extensively. In the context of generating control software in the form of IEC 61131-3 compliant code, initial studies suggest LLMs provide a promising avenue for increasing control engineer productivity. However, similar code generation for IEC 61499-based control applications is still scarce. While tools are being developed for this purpose, their capabilities are not yet fully understood, and they often require significant human input to generate the intended outcomes. This paper explores LLM-based code generation for IEC 61499-based applications through iterative prompting. The prompts for the experiments are derived from requirements generated by System-Theoretic Process Analysis (STPA), which provides a systematic approach to creating prompts that also connect to the larger systems engineering workflow. The results indicate that while the approach may be successful in some instances, more work is required to mitigate the issues arising from its application.
Authors: Akira King, Valeriy Vyatkin
Institution: Aalto University
Language: English
Subfield: Control and Systems Engineering
Field: Engineering
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W4415400040
