Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agents

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Liu, Zihan, Zeng, Ruinan, Wang, Dongxia, Peng, Gengyun, Wang, Jingyi, Liu, Qiang, Liu, Peiyu, Wang, Wenhai
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915080224899072
author Liu, Zihan
Zeng, Ruinan
Wang, Dongxia
Peng, Gengyun
Wang, Jingyi
Liu, Qiang
Liu, Peiyu
Wang, Wenhai
author_facet Liu, Zihan
Zeng, Ruinan
Wang, Dongxia
Peng, Gengyun
Wang, Jingyi
Liu, Qiang
Liu, Peiyu
Wang, Wenhai
contents In industrial control systems, the generation and verification of Programmable Logic Controller (PLC) code are critical for ensuring operational efficiency and safety. While Large Language Models (LLMs) have made strides in automated code generation, they often fall short in providing correctness guarantees and specialized support for PLC programming. To address these challenges, this paper introduces Agents4PLC, a novel framework that not only automates PLC code generation but also includes code-level verification through an LLM-based multi-agent system. We first establish a comprehensive benchmark for verifiable PLC code generation area, transitioning from natural language requirements to human-written-verified formal specifications and reference PLC code. We further enhance our `agents' specifically for industrial control systems by incorporating Retrieval-Augmented Generation (RAG), advanced prompt engineering techniques, and Chain-of-Thought strategies. Evaluation against the benchmark demonstrates that Agents4PLC significantly outperforms previous methods, achieving superior results across a series of increasingly rigorous metrics. This research not only addresses the critical challenges in PLC programming but also highlights the potential of our framework to generate verifiable code applicable to real-world industrial applications.
format Preprint
id arxiv_https___arxiv_org_abs_2410_14209
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agents
Liu, Zihan
Zeng, Ruinan
Wang, Dongxia
Peng, Gengyun
Wang, Jingyi
Liu, Qiang
Liu, Peiyu
Wang, Wenhai
Software Engineering
In industrial control systems, the generation and verification of Programmable Logic Controller (PLC) code are critical for ensuring operational efficiency and safety. While Large Language Models (LLMs) have made strides in automated code generation, they often fall short in providing correctness guarantees and specialized support for PLC programming. To address these challenges, this paper introduces Agents4PLC, a novel framework that not only automates PLC code generation but also includes code-level verification through an LLM-based multi-agent system. We first establish a comprehensive benchmark for verifiable PLC code generation area, transitioning from natural language requirements to human-written-verified formal specifications and reference PLC code. We further enhance our `agents' specifically for industrial control systems by incorporating Retrieval-Augmented Generation (RAG), advanced prompt engineering techniques, and Chain-of-Thought strategies. Evaluation against the benchmark demonstrates that Agents4PLC significantly outperforms previous methods, achieving superior results across a series of increasingly rigorous metrics. This research not only addresses the critical challenges in PLC programming but also highlights the potential of our framework to generate verifiable code applicable to real-world industrial applications.
title Agents4PLC: Automating Closed-loop PLC Code Generation and Verification in Industrial Control Systems using LLM-based Agents
topic Software Engineering
url https://arxiv.org/abs/2410.14209