arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.15154cs.AI
收藏

MCCoder:借助LLM辅助代码生成与严格验证简化运动控制

MCCoder: Streamlining Motion Control with LLM-Assisted Code Generation and Rigorous Verification

Thrust of Data Science and Analytics, The Hong Kong University of Science and Technology (Guangzhou)(数据科学与分析 thrust,香港科学与技术大学(广州));Department of Industrial Engineering and Decision Analytics, The Hong Kong University of Science and Technology(工业工程与决策分析系,香港科学与技术大学);MOVENSYS Inc.(MOVENSYS公司);University of Cologne(科隆大学)

Yin Li, Liangwei Wang, Shiyuan Piao, Boo-Ho Yang, Ziyue Li, Wei Zeng, Fugee Tsung

AI总结:

MCCoder是一个LLM驱动的运动控制代码生成系统,通过多任务分解、混合RAG和迭代自校正提升代码质量,并集成3D模拟器与轨迹日志进行验证,在MCEVAL数据集上显著优于基线模型。

摘要:

大型语言模型(LLMs)在代码生成方面已展现出显著潜力。然而,在工厂自动化领域,尤其是运动控制中,手动编程以及低效且不安全的调试实践仍然普遍存在。这源于机械与电气系统之间复杂的相互作用以及严格的安全要求。此外,当前大多数AI辅助运动控制编程工作都集中在PLC上,对高级语言和函数库的关注很少。为应对这些挑战,我们提出了MCCoder,这是一个由LLM驱动的系统,专为生成运动控制代码而设计,并与软运动控制器集成。MCCoder通过一个结构化工作流改进代码生成,该工作流结合了多任务分解、混合检索增强生成(RAG)和迭代自校正,并利用了一个成熟的运动库。此外,它集成了一个3D模拟器用于直观的运动验证,并记录完整运动轨迹日志用于数据验证,显著提高了准确性和安全性。在缺乏专门用于评估运动控制代码生成的基准数据集和指标的情况下,我们提出了MCEVAL,这是一个涵盖不同复杂度运动任务的数据集。实验表明,MCCoder在使用Advanced RAG的基线模型中表现更优,在MCEVAL数据集上实现了33.09%的整体性能提升,在复杂任务上实现了131.77%的提升。

英文摘要:

Large Language Models (LLMs) have demonstrated significant potential in code generation. However, in the factory automation sector, particularly motion control, manual programming, alongside inefficient and unsafe debugging practices, remains prevalent. This stems from the complex interplay of mechanical and electrical systems and stringent safety requirements. Moreover, most current AI-assisted motion control programming efforts focus on PLCs, with little attention given to high-level languages and function libraries. To address these challenges, we introduce MCCoder, an LLM-powered system tailored for generating motion control code, integrated with a soft-motion controller. MCCoder improves code generation through a structured workflow that combines multitask decomposition, hybrid retrieval-augmented generation (RAG), and iterative self-correction, utilizing a well-established motion library. Additionally, it integrates a 3D simulator for intuitive motion validation and logs of full motion trajectories for data verification, significantly enhancing accuracy and safety. In the absence of benchmark datasets and metrics tailored for evaluating motion control code generation, we propose MCEVAL, a dataset spanning motion tasks of varying complexity. Experiments show that MCCoder outperforms baseline models using Advanced RAG, achieving an overall performance gain of 33.09% and a 131.77% improvement on complex tasks in the MCEVAL dataset.

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

↑