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

LLM4SFC: 通过大语言模型生成顺序功能图

LLM4SFC: Sequential Function Chart Generation via Large Language Models

Bosch Research(博世研究)

Ofek Glick, Vladimir Tchuiev, Marah Ghoummaid, Michal Moshkovitz, Dotan Di-Castro

AI总结:

LLM4SFC通过大语言模型生成可执行的顺序功能图,实现图形与文本PLC语言的高效转换。

摘要:

尽管大语言模型(LLMs)越来越多地用于合成文本型PLC编程语言如结构化文本(ST)代码,其他IEC 61131-3标准图形语言如顺序功能图(SFCs)仍处于探索阶段。生成SFCs具有挑战性,因为其图形性质和嵌入的ST动作,不直接兼容标准生成技术,通常导致不可执行的代码,与工业工具链不兼容。在本工作中,我们介绍了LLM4SFC,这是首个能够接收工业工作流程的自然语言描述并提供可执行SFCs的框架。LLM4SFC基于三个组件:(i)一种简化的结构化表示,捕捉必要的拓扑结构和嵌入的ST及简化的文本冗余;(ii)微调和少样本检索增强生成(RAG)以对齐SFC编程规范;(iii)一种结构化生成方法,实时修剪非法标记以确保符合SFCs的文本格式。我们评估了LLM4SFC在真实世界SFCs数据集上的表现,使用开源和专有LLMs。结果表明,LLM4SFC可靠地生成语法有效的SFC程序,有效弥合图形和文本PLC语言之间的鸿沟,达到75% - 94%的生成成功率,为自动化工业编程铺平道路。

英文摘要:

While Large Language Models (LLMs) are increasingly used for synthesizing textual PLC programming languages like Structured Text (ST) code, other IEC 61131-3 standard graphical languages like Sequential Function Charts (SFCs) remain underexplored. Generating SFCs is challenging due to graphical nature and ST actions embedded within, which are not directly compatible with standard generation techniques, often leading to non-executable code that is incompatible with industrial tool-chains In this work, we introduce LLM4SFC, the first framework to receive natural-language descriptions of industrial workflows and provide executable SFCs. LLM4SFC is based on three components: (i) A reduced structured representation that captures essential topology and in-line ST and reduced textual verbosity; (ii) Fine-tuning and few-shot retrieval-augmented generation (RAG) for alignment with SFC programming conventions; and (iii) A structured generation approach that prunes illegal tokens in real-time to ensure compliance with the textual format of SFCs. We evaluate LLM4SFC on a dataset of real-world SFCs from automated manufacturing projects, using both open-source and proprietary LLMs. The results show that LLM4SFC reliably generates syntactically valid SFC programs effectively bridging graphical and textual PLC languages, achieving a generation generation success of 75% - 94%, paving the way for automated industrial programming.

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

↑