Industrial Automation
MBO-KISS: The future of control applications in industry

Can AI revolutionize production control? This is the question the research project MBO-KISS (Methods for Evaluating and Optimizing AI-generated Control Applications Based on the Physical Simulation of Machines and Their Desired Behavior) aims to address. The project has started at the beginning of the year, with a total duration of three years. The goal is to investigate the possible usage of Large Language Models (LLMs) for generating and securely applying control applications in industrial production.

Person using a tablet
mask Person using a tablet

If Large Language Models (LLMs) were capable of programming industrial control applications that run safely and reliably, this would not only significantly reduce the engineering effort from planning to prototyping, but also partially alleviate the skilled worker shortage problem in the field of industrial automation. This is because specialists with knowledge of IEC 61131-3 programming languages, the prevailing standard in the industry, are becoming increasingly rare.

To approach this goal, the crucial obstacles in the overall development process must first be removed. One of the problems is a language barrier, which occurs because publicly available LLMs that are optimized for code generation have primarily been trained with code in high-level languages such as Python, Java, or C/C++. However, common IEC 61131-3 languages such as Structured Text (ST) or Sequential Function Chart (SFC) are largely known only to automation professionals, representing a small portion of the training data for large language models. Additionally, since IEC 61131-3 languages are predominantly used within companies and are often part of the IP of machines, freely available code bases are scarce. Real-time requirements, communication with actuators and sensors, and safety-critical requirements, as described in the IEC standard, are also insufficiently represented in the training data.

Reducing Complexity

Another problem that is very relevant to code generation via LLMs is the complexity of the desired application. The higher the complexity, the more important the choice of a suitable decomposition approach becomes, i.e., the way to break the application down into individual, less complex components to achieve optimal results during code generation. The decomposition process must reconcile the methods used in classical software architecture design with the patterns identified (given a statistical frequency) in the training data.

Once individual code components have been generated, the next challenge is to verify their functionality and assemble a working application from them. At this stage, the interfaces defined during decomposition will affect the orchestration of the components into the overall control application.

While the Fraunhofer Institute for Cognitive Systems IKS will focus on control code generation aspects during the MBO-KISS research project, the participating industrial partners will investigate automated testing possibilities for the generated software components and for the entire application. By combining the results of all partners, a code generation cycle should emerge in which the results of the tests feed back into the LLM prompting, thus iteratively improving the application.

Focus on Using Existing LLMs

The MBO-KISS project will not focus on the creation of IEC 61131-3-specific models, but rather on the use of existing or available models with the aforementioned limitations. Methods are being developed to evaluate these limitations and to devise solutions that enable the use of such models to generate IEC 61131-3 code. Thus, it becomes quite conceivable to retrain a pre-trained model using proprietary datasets (e.g., based on the CodeGen model) or to use RAGs (Retrieval-Augmented Generation) during prompt creation, which is a technique that improves the results of the LLMs and avoids AI hallucinations.

Two-Stage Testing Workflow

The testing occurs in the form of a two-stage automated testing workflow, consisting of static and dynamic methods. First, the code itself is analyzed, and then it is verified in a test environment, consisting of a software PLC, the simulation of the machine, and controlling test tools. The results of the static and dynamic tests are used for further generation cycles.

A total of six partners are involved in the MBO-KISS project. Besides Fraunhofer IKS, whose focus, in addition to project management, is primarily on code generation aspects, the following three companies from the field of code analysis, test automation, and application development are involved:

ITQ GmbH will focus on the automated quality analysis of the generated code, which represents one dimension of the verification process. As the first step, various metrics for static code analysis will be defined and implemented. Based on this, a dynamic code analysis will be carried out with the help of a plant simulation.

Sepp.med GmbH will focus on test analysis, test design, test implementation, test automation, and test coverage, which represent another verification dimension.

Max Streicher GmbH & Co. KGaA will take on the role of the user and provide, among other things, the use cases. They will also align the development progress and partial results with their own needs and will test them as thoroughly as possible under real conditions.

In addition, the associated partners Codesys Group and Bosch Rexroth AG will accompany and evaluate the project.

The AI technology of LLMs is currently evolving rapidly, so regular improvements to models can be expected. Thus it is essential to not only consider methods for integrating LLMs to create control applications. Instead, it is also crucial to design suitable methods to employ LLMs for control tasks and to make them readily available to manufacturing companies.


This project is funded by the Bavarian Ministry of Economic Affairs, Regional Development and Energy under the digitalization funding line of the BayVFP programme.

Read next

Industry 4.0
Toolbox offers more flexibility in production

Alex da silva photo
Alexandre Sawczuk da Silva
Industry 4.0 / Fraunhofer IKS
Industry 4.0