LLM Control Code Generation With ECS Architecture Constraints

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The generation of computer simulation models for technical systems, such as digital twins, is time-consuming and requires significant domain knowledge, making it challenging to adapt and generate automatically using large language models like GPT-3 or BERT, as the generated code often needs further processing.

Innovation Solution

An apparatus and method utilizing a pre-trained language model tailored to an Entity Component System (ECS) architecture to generate source code directly suited for controlling technical systems, incorporating domain knowledge and cyber security constraints, with validation and modification modules to ensure code quality.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional methods are used to generate computer simulation models for technical systems, then the models can be created with high accuracy and reliability, but the process is time-consuming and expensive requiring critical domain knowledge

Engineering Contradiction:
Improvemodel accuracyVSAvoidgeneration time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent replaces traditional manual model generation processes (mechanical/systematic approach requiring domain experts) with a language model-based automated system. The language model processes natural language descriptions and directly generates simulation code, eliminating the need for time-consuming manual modeling while maintaining reliability through the model's trained understanding of technical domains.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The system enables self-service model generation where users can create simulation models by providing natural language descriptions without requiring critical domain knowledge or extensive technical expertise. The language model autonomously translates these descriptions into functional simulation code, making the process accessible to non-experts while maintaining model quality.

Inventive Principle:
Principle #25Self-service

2Productivity

If large language models are used to generate source code from natural language description, then the initial code generation is faster and more accessible, but the generated code requires further processing to be suitable for computer simulation purposes

Engineering Contradiction:
Improvecode generation speedVSAvoidprocessing complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent makes the language model universally applicable to simulation code generation by training it on domain-specific datasets. This enables the model to directly generate simulation-ready code from natural language without requiring additional processing steps, combining the speed of natural language processing with the specificity of simulation requirements in a single unified system.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system performs preliminary training of the language model on simulation-specific datasets and code patterns before actual code generation. This preliminary action embeds domain knowledge and simulation requirements into the model, enabling it to generate directly usable simulation code without requiring post-generation processing or adaptation steps.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If automated code generation is implemented without architecture constraints, then the generation process is simpler and faster, but the generated code lacks adherence to proven software design patterns like Entity Component System

Engineering Contradiction:
Improvegeneration efficiencyVSAvoidcode quality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies local quality by incorporating architecture-specific constraints and patterns into the code generation process. The language model is guided to produce code that adheres to specific software design patterns (such as Entity Component System) while maintaining overall generation efficiency. This ensures that critical portions of the code follow proven patterns without requiring complete redesign of the generation system.

Inventive Principle:
Principle #3Local quality

Data Source

PatentEP4685630A1Generation of a control code using large language models for controlling a technical system
Publication Date: 2026.01.28 SIEMENS AG
  • EP4685630A1 patent drawingFigure 1
  • EP4685630A1 patent drawingFigure 2
  • EP4685630A1 patent drawingFigure 3

AI summary

The inventions relates to an apparatus (100) and a computer-implemented method for generating a control code for controlling a technical system (TS). The apparatus comprises: - an interface (101) that is configured to access a pre-trained language model (LLM1), wherein the pre-trained language model (LLM1) is configured to generate source code depending on provided input data, - an input module (102) that is configured to receive text data (TD) as input data for the pre-trained language model (LLM1), - wherein the text data (TD) are natural language text data, - wherein the text data (TD) specify that source code generated by the pre-trained language model is to be suited for an Entity Component System architecture (ECS) and for the technical system (TS), - and wherein the text data (TD) comprise a generation request (GR) for generating at least one component, at least one system and/or at least one entity according to the specified Entity Component System architecture, - a processor (103) that is configured to process the text data (TD) using the pre-trained language model (LLM1), wherein the at least one component (COMP), the at least one system (SYS) and/or the at least one entity (ENT) according to generation request (GR) is generated as source code (SC), and - an output module (104) that is configured to provide the source code (SC) for controlling the technical system (TS).