arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.14209cs.SE
收藏

Agents4PLC:在工业控制系统中使用基于 LLM 的智能体自动化闭环 PLC 代码生成与验证

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

Zihan Liu, Ruinan Zeng, Dongxia Wang, Gengyun Peng, Jingyi Wang, Qiang Liu, Peiyu Liu, Wenhai Wang

AI总结:

本文提出 Agents4PLC 框架,结合 LLM 多智能体、RAG 与思维链策略,实现工业控制系统中 PLC 代码的自动化生成与代码级验证,并构建了相关基准,评估证明其优于现有方法。

摘要:

在工业控制系统中,可编程逻辑控制器(PLC)代码的生成与验证对于确保运行效率和安全性至关重要。尽管大型语言模型(LLMs)在自动化代码生成方面取得了进展,但它们在提供正确性保证以及对 PLC 编程的专门支持方面往往存在不足。为了应对这些挑战,本文提出了 Agents4PLC,这是一个新颖的框架,它不仅实现了 PLC 代码生成的自动化,还通过基于 LLM 的多智能体系统包含了代码级验证。我们首先为可验证的 PLC 代码生成领域建立了一个全面的基准,实现了从自然语言需求到人工编写并验证的形式化规范以及参考 PLC 代码的转换。我们进一步通过引入检索增强生成(RAG)、高级提示工程技术以及思维链策略,专门针对工业控制系统增强了我们的“智能体”。针对该基准的评估表明,Agents4PLC 显著优于以往的方法,在一系列日益严格的指标上取得了优异的结果。这项研究不仅解决了 PLC 编程中的关键挑战,还突显了我们的框架生成适用于现实工业应用的可验证代码的潜力。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑