Leveraging programmable logic controllers for machine learning applications in industrial setups

Read full text
Authors: David Zamora-Arranz, Pablo Garcia-Bringas, Juan J. Gude, Javier Del Ser
Cited by: 3
References: 11

Abstract

Machine Learning (ML) has become a powerful tool for addressing complex classification and regression tasks in industrial settings. Despite the widespread use of programmable logic controllers (PLCs) in these environments, ML models are typically executed on external computing devices due to inherent PLC limitations: restricted memory capacity, long cycle times, and limited computational power. These constraints hinder the direct deployment of ML algorithms on PLCs and often require additional hardware, increasing system complexity and deployment costs. This paper addresses this challenge by demonstrating the direct implementation of four ML algorithms on a Siemens S7-1516 PLC: Linear Regression, Logistic Regression, k-Nearest Neighbors (kNN), and a Neural Network. In addition, a real-world laboratory prototype modeling the thermal behavior of an industrial 3D printer is presented to illustrate the practical applicability of our research findings. To overcome PLC resource constraints, two optimization strategies are proposed: (1) algorithmic adaptations to reduce execution cycle time, and (2) a custom, high-performance matrix multiplication library designed to replace the naive implementation common in standard tools. We evaluate the performance of the proposed implementations across datasets of varying sizes, comparing the standard TIA Portal functions to our optimized library. The results demonstrate that that the optimized implementations achieve acceptable cycle times and consistently outperform the baseline, confirming the feasibility of efficient, native ML execution on PLCs. These findings open new avenues for embedding ML capabilities directly into PLC-based automation systems, enabling smarter and more autonomous industrial control.

Fields of Study & Subjects

Physical Unclonable Functions (PUFs) and Hardware Security Industrial Automation and Control Systems Embedded Systems Design Techniques

Publication details

Journal / source
Results in Engineering
Publisher
Elsevier BV
Volume
30
Pages
110194–110194
Publication date
22 March 2026
Language
EN