DOI: https://doi.org/10.1016/j.rineng.2026.110194
تاريخ النشر: 2026-03-22
المؤلف: David Zamora-Arranz وآخرون
الموضوع الرئيسي: وظائف غير قابلة للاستنساخ (PUFs) وأمن الأجهزة
نظرة عامة
تستكشف هذه الورقة البحثية تنفيذ خوارزميات التعلم الآلي (ML) مباشرة على وحدات التحكم المنطقية القابلة للبرمجة (PLCs) من Siemens S7-1516، مع معالجة قيود وحدات التحكم المنطقية مثل الذاكرة المحدودة، وأوقات الدورة الطويلة، والقدرة الحاسوبية المحدودة. يوضح المؤلفون بنجاح تنفيذ أربع خوارزميات تعلم آلي – الانحدار الخطي، والانحدار اللوجستي، وأقرب الجيران (kNN)، وشبكة عصبية – على وحدات التحكم المنطقية، إلى جانب نموذج مختبري يقوم بمحاكاة السلوك الحراري لطابعة ثلاثية الأبعاد صناعية. لتحسين الأداء، تقدم الدراسة استراتيجيتين: التكيفات الخوارزمية لتقليل وقت تنفيذ الدورة ومكتبة ضرب المصفوفات عالية الأداء (MML) المخصصة التي تعزز الكفاءة الحاسوبية. تشير النتائج إلى أن هذه التنفيذات المحسّنة تحقق أوقات دورة مقبولة وتتفوق على وظائف TIA Portal القياسية، مما يثبت جدوى التنفيذ الأصلي للتعلم الآلي على وحدات التحكم المنطقية.
في الاستنتاجات، يبرز المؤلفون أهمية معالجة سرعة الحوسبة ووقت الدورة في تنفيذ وحدات التحكم المنطقية. يقومون بتحليل أوقات الوصول إلى الذاكرة، كاشفين عن تأثيرها الحاسم على سرعة الحوسبة، ويظهرون أن تقسيم الحسابات المكثفة عبر دورات متعددة يمكن أن يحافظ على أوقات دورة منخفضة. تؤكد النتائج من سيناريوهات مختلفة فعالية المكتبة والاستراتيجيات المقترحة في التغلب على قيود وحدات التحكم المنطقية. تشمل اتجاهات البحث المستقبلية تحسين تقنيات فك الحلقة لضرب المصفوفات، وتحسين سرعة الوصول إلى الذاكرة، وإجراء مقارنة كمية بين تنفيذات التعلم الآلي المعتمدة على الكمبيوتر وتلك المعتمدة على وحدات التحكم المنطقية. تضع الورقة أساسًا منهجيًا لمزيد من استكشاف أحمال التعلم الآلي المتطلبة، بما في ذلك التعلم العميق والنماذج الهجينة، مما يضع هذا العمل كخطوة نحو تعزيز قدرات الأتمتة الصناعية.
مقدمة
تستعرض مقدمة هذه الورقة البحثية التطور التاريخي لأنظمة التحكم الصناعية، مع تسليط الضوء على الانتقال من الحلول التقليدية المعتمدة على الأجهزة إلى وحدات التحكم المنطقية القابلة للبرمجة (PLCs) التي بدأها MODICON 084 في عام 1969. لقد سمح هذا التحول بمرونة أكبر وسهولة إعادة التكوين في عمليات التصنيع. تؤكد الورقة على الدور المتزايد للذكاء الاصطناعي (AI) والتعلم الآلي (ML) في تعزيز الأتمتة الصناعية، مما يمكّن التطبيقات مثل الصيانة التنبؤية وتحسين اللوجستيات، والتي تساهم في الكفاءة التشغيلية وتقليل التكاليف.
على الرغم من مزايا دمج التعلم الآلي في وحدات التحكم المنطقية، يشير المؤلفون إلى أن البحث في هذا المجال محدود، وغالبًا ما يركز على حالات استخدام معزولة دون معالجة التحديات الأوسع في التنفيذ. تهدف هذه الورقة إلى سد هذه الفجوة من خلال إثبات جدوى نشر خوارزميات التعلم الآلي مباشرة على وحدات التحكم المنطقية Siemens S7-1516 باستخدام النص المنظم (ST). يقوم المؤلفون بتنفيذ أربع خوارزميات تعلم آلي – الانحدار الخطي، والانحدار اللوجستي، وأقرب الجيران، وشبكة عصبية – ويقترحون استراتيجيات تحسين لتحسين الأداء وتقليل وقت الدورة. تشير النتائج إلى أن نماذج التعلم الآلي يمكن دمجها بشكل فعال في أنظمة التحكم الصناعية في الوقت الحقيقي دون الاعتماد على الأجهزة الخارجية، مما يحول وحدات التحكم المنطقية إلى وكلاء ذكيين قادرين على مهام التحكم والتنبؤ المعقدة.
طرق
في هذا القسم، يوضح المؤلفون إعداد التجربة وعملية التحقق المستخدمة لتقييم أداء خوارزميات التعلم الآلي (ML) المنفذة على وحدات التحكم المنطقية القابلة للبرمجة (PLCs). تتناول التجارب ثلاثة أسئلة بحثية: (RQ1) أداء خوارزميات التعلم الآلي المختلفة أثناء التدريب والاستدلال على وحدة التحكم المنطقية، (RQ2) المقايضات التصميمية المتعلقة بوقت الدورة وعدد التكرارات لكل دورة، و(RQ3) تأثير التكرارات على سرعة تنفيذ التدريب. استخدم الإعداد وحدة معالجة مركزية Siemens S7-1516F-3 PN/DP مع بطاقات إدخال وإخراج رقمية محددة، مما أسس لحد أدنى لوقت الدورة يبلغ 1 مللي ثانية وحد أقصى يبلغ 6 ثوانٍ لتسهيل قياسات الوقت الشاملة، على الرغم من الطبيعة غير الشائعة لمثل هذه الأوقات الطويلة في التطبيقات العملية.
للتحقق من النتائج النظرية، استخدم المؤلفون نموذجًا مختبريًا يعرف باسم إعداد تجربة سخان ديستو (Deusto HES)، والذي يحاكي عملية حرارية في العالم الحقيقي. يتضمن هذا الإعداد رأس طابعة ثلاثية الأبعاد يعمل كعنصر تسخين، مع مراقبة درجة الحرارة بواسطة مستشعر مدمج. تظهر ديناميات العملية الحرارية سلوكًا من الدرجة الكسرية، وأجرى المؤلفون اختبار خطوة في حلقة مفتوحة لتوصيف استجابة النظام. تم جمع ما مجموعه 4,501 عينة لتدريب نموذج الانحدار المتعدد الحدود، مع الإشارة إلى أن نماذج الحدود من الدرجة الثالثة والرابعة قدمت ملاءمات مرضية، كما يتضح من معاملات التحديد العالية ($R^2$). يؤكد هذا التحقق من التطبيق العملي لتقنيات التعلم الآلي على وحدات التحكم المنطقية، مما يظهر أن طرق التعلم المتقدمة يمكن دمجها في أنظمة التحكم الصناعية دون الاعتماد على الأجهزة الخارجية المتخصصة.
نتائج
في هذا القسم، يقدم المؤلفون نتائج تتعلق بثلاثة أسئلة بحثية (RQs) تم توضيحها في الأقسام الفرعية السابقة. يركز RQ1، الذي تم مناقشته في القسم الفرعي 6.1، على الفرضية الأولية والتحقق منها من خلال البيانات التجريبية، مما يظهر علاقات كبيرة بين المتغيرات المدروسة. يستكشف RQ2، الذي تم تناوله في القسم الفرعي 6.2، تداعيات هذه النتائج ضمن سياق هندسي أوسع، مع تسليط الضوء على التطبيقات والقيود المحتملة. أخيرًا، يفحص RQ3، الذي تم تفصيله في القسم الفرعي 6.3، الأطر النظرية التي تدعم النتائج، مقدماً رؤى حول اتجاهات البحث المستقبلية وأهمية الدراسة في التحديات الهندسية المستمرة. بشكل عام، تسهم النتائج في تقديم معرفة قيمة للمجال، مع التأكيد على التقدمين العملي والنظري.
مناقشة
تستعرض قسم المناقشة في الورقة البحثية دمج التعلم الآلي (ML) ضمن بيئات وحدات التحكم المنطقية القابلة للبرمجة (PLC)، مع التركيز على التكيفات مع القيود الحاسوبية للأجهزة الصناعية. تصنف الأساليب الحالية إلى ثلاثة أنواع: (1) أنظمة التعلم الآلي المدمجة، حيث تتعامل وحدات التحكم المنطقية مع كل من التدريب والاستدلال؛ (2) الأنظمة الهجينة، حيث يحدث الاستدلال على وحدة التحكم المنطقية ويتم التدريب خارجيًا؛ و(3) الأنظمة الخارجية، حيث تعمل وحدات التحكم المنطقية فقط كواجهات اتصال. يبرز القسم التحديات المتعلقة بنشر التعلم الآلي على وحدات التحكم المنطقية، خاصة بسبب ذاكرتها المحدودة، وقدرتها الحاسوبية، وافتقارها إلى أطر البرمجة عالية المستوى. يتم مناقشة التقدم الملحوظ في TinyML، الذي يمكّن تنفيذ الذكاء الاصطناعي على الأجهزة منخفضة الطاقة، مع عرض تنفيذات ناجحة مثل Bonsai وProtoNN التي تحقق أداءً تنافسيًا على الأجهزة المقيدة.
تستكشف الورقة أيضًا سيناريوهات نشر متنوعة، من التعلم الكامل على الجهاز إلى أدوار الاستدلال فقط، وتراجع استراتيجيات التغلب على قيود الموارد. تحدد فجوة في التنفيذ المنهجي لخوارزميات التعلم الآلي ضمن وحدات التحكم المنطقية، خاصة للتدريب، وتقدم نهجًا جديدًا يتضمن كل من قدرات التدريب والاستدلال مباشرة على وحدات التحكم المنطقية من Siemens. يقدم هذا النهج مكتبة ضرب مصفوفات مخصصة محسّنة لهندسة وحدات التحكم المنطقية وتقنية تقسيم تكرارية لتقسيم تنفيذ الخوارزمية عبر دورات متعددة، مما يعالج قيود وقت الدورة الحرجة. تشير النتائج إلى أن تمكين التدريب في الموقع يمكن أن يبسط سير العمل، ويقلل من زمن الاستجابة، ويعزز قابلية تطبيق التعلم الآلي في البيئات الصناعية، مما يساهم في تقدم حلول التعلم الآلي في الوقت الحقيقي في سياقات الأتمتة.
DOI: https://doi.org/10.1016/j.rineng.2026.110194
Publication Date: 2026-03-22
Author(s): David Zamora-Arranz et al.
Primary Topic: Physical Unclonable Functions (PUFs) and Hardware Security
Overview
This research paper explores the implementation of machine learning (ML) algorithms directly on Siemens S7-1516 programmable logic controllers (PLCs), addressing the limitations of PLCs such as restricted memory, long cycle times, and limited computational power. The authors successfully demonstrate the execution of four ML algorithms—Linear Regression, Logistic Regression, k-Nearest Neighbors (kNN), and a Neural Network—on PLCs, alongside a laboratory prototype that models the thermal behavior of an industrial 3D printer. To optimize performance, the study introduces two strategies: algorithmic adaptations to reduce execution cycle time and a custom high-performance matrix multiplication library (MML) that enhances computational efficiency. The results indicate that these optimized implementations achieve acceptable cycle times and outperform standard TIA Portal functions, thereby validating the feasibility of native ML execution on PLCs.
In the conclusions, the authors highlight the significance of addressing computational speed and cycle time in PLC implementations. They analyze memory access times, revealing their critical impact on computation speed, and demonstrate that partitioning intensive calculations across multiple cycles can maintain low cycle times. The findings from various scenarios confirm the effectiveness of the proposed library and strategies in overcoming PLC limitations. Future research directions include refining loop unrolling techniques for matrix multiplication, optimizing memory access speed, and conducting a quantitative comparison between PC-based and PLC-based ML implementations. The paper lays a methodological foundation for further exploration of demanding ML workloads, including deep learning and hybrid models, positioning this work as a stepping stone toward enhanced industrial automation capabilities.
Introduction
The introduction of this research paper outlines the historical evolution of industrial control systems, highlighting the transition from traditional hardware-based solutions to programmable logic controllers (PLCs) initiated by the MODICON 084 in 1969. This shift has allowed for greater flexibility and ease of reconfiguration in manufacturing processes. The paper emphasizes the growing role of Artificial Intelligence (AI) and machine learning (ML) in enhancing industrial automation, enabling applications such as predictive maintenance and logistics optimization, which contribute to operational efficiency and cost reduction.
Despite the advantages of integrating ML into PLCs, the authors note that research in this area is limited, often focusing on isolated use cases without addressing broader implementation challenges. This paper aims to fill that gap by demonstrating the feasibility of deploying ML algorithms directly on Siemens S7-1516 PLCs using Structured Text (ST). The authors implement four ML algorithms—Linear Regression, Logistic Regression, k-Nearest Neighbors, and a Neural Network—and propose optimization strategies to improve performance and reduce cycle time. The findings suggest that ML models can be effectively integrated into real-time industrial control systems without relying on external hardware, thus transforming PLCs into intelligent agents capable of sophisticated control and prediction tasks.
Methods
In this section, the authors detail the experimental setup and validation process used to evaluate the performance of machine learning (ML) algorithms implemented on Programmable Logic Controllers (PLCs). The experiments address three research questions: (RQ1) the performance of various ML algorithms during training and inference on a PLC, (RQ2) the design trade-offs related to cycle time and iterations per cycle, and (RQ3) the impact of iterations on training execution speed. The setup utilized a Siemens S7-1516F-3 PN/DP CPU with specific digital input and output cards, establishing a minimum cycle time of 1 millisecond and a maximum of 6 seconds to facilitate comprehensive time measurements, despite the uncommon nature of such long cycle times in practical applications.
To validate the theoretical findings, the authors employed a laboratory prototype known as the Deusto Heater Experimental Setup (Deusto HES), which simulates a real-world thermal process. This setup includes a 3D-printer extruder head functioning as a heating element, with temperature monitored by an integrated sensor. The dynamics of the thermal process exhibit fractional-order behavior, and the authors conducted an open-loop step test to characterize the system’s response. A total of 4,501 samples were collected for training a polynomial regression model, with the results indicating that third- and fourth-degree polynomial models provided satisfactory fits, as evidenced by their high coefficients of determination ($R^2$). This validation confirms the practical applicability of ML techniques on PLCs, demonstrating that advanced learning methods can be integrated into industrial control systems without reliance on specialized external hardware.
Results
In this section, the authors present findings related to three research questions (RQs) outlined in previous subsections. RQ1, discussed in Subsection 6.1, focuses on the initial hypothesis and its validation through experimental data, demonstrating significant correlations between the variables studied. RQ2, addressed in Subsection 6.2, explores the implications of these findings within a broader engineering context, highlighting potential applications and limitations. Finally, RQ3, detailed in Subsection 6.3, examines the theoretical frameworks that underpin the results, offering insights into future research directions and the relevance of the study to ongoing engineering challenges. Overall, the results contribute valuable knowledge to the field, emphasizing both practical and theoretical advancements.
Discussion
The discussion section of the research paper reviews the integration of machine learning (ML) within Programmable Logic Controller (PLC) environments, emphasizing adaptations to the computational constraints of industrial hardware. It categorizes existing approaches into three types: (1) embedded ML systems, where PLCs handle both training and inference; (2) hybrid systems, where inference occurs on the PLC and training is performed externally; and (3) external systems, where PLCs serve solely as communication interfaces. The section highlights the challenges of deploying ML on PLCs, particularly due to their limited memory, computational power, and lack of high-level programming frameworks. Notable advancements in TinyML, which enables AI execution on low-power devices, are discussed, showcasing successful implementations like Bonsai and ProtoNN that achieve competitive performance on constrained hardware.
The paper further explores various deployment scenarios, from full on-device learning to inference-only roles, and reviews strategies to overcome resource limitations. It identifies a gap in the systematic implementation of ML algorithms within PLCs, particularly for training, and presents a novel approach that includes both training and inference capabilities directly on Siemens PLCs. This approach introduces a custom matrix multiplication library optimized for PLC architecture and an iterative slicing technique to partition algorithm execution across multiple cycles, addressing critical cycle time constraints. The findings suggest that enabling on-site training can streamline workflows, reduce latency, and enhance the applicability of ML in industrial settings, thereby contributing to the advancement of real-time ML solutions in automation contexts.
