PLC Control Logic Generation Under LLM Token Limits

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing generative AI models, such as large language models (LLMs), are limited by input token limits, making it difficult to process the complex and verbose requirements of industrial automation projects like P&IDs, I/O lists, and control narratives, which often exceed the token limit and contain interdependencies, leading to manual labor and potential human errors in generating control logic code.

Innovation Solution

A method using a meta-language syntax to transform and compress automation requirements into natural language form, partitioning them into chunks, and utilizing embeddings and similarity searches to generate control logic code within token limits, preserving semantic content and reducing data size, thereby enabling efficient and automated control logic generation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If requirements are processed manually by automation engineers, then control logic code can be generated, but labor intensity and potential for human errors increase

Engineering Contradiction:
Improveerror reductionVSAvoidautomation level
Core Design Contradiction:
ReliabilityVSExtent of automation

Solution Approach 1:

The patent introduces an intermediary system comprising a requirements parser, natural language generator, and prompt assembler that mediates between the input requirements and the LLM. This intermediary automatically transforms structured requirements into natural language prompts, eliminating manual interpretation while maintaining reliability through systematic processing.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical manual process of requirement interpretation and code generation with an automated computational system. The system uses algorithmic processing to parse requirements, generate natural language descriptions, and assemble prompts, substituting human cognitive labor with automated intelligence.

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

2Loss of information

If LLM input token limit is increased to accommodate all requirements, then complete requirements can be processed, but system resource consumption and cost increase

Engineering Contradiction:
Improveinformation completenessVSAvoidtoken consumption
Core Design Contradiction:
Loss of informationVSUse of energy by moving object

Solution Approach 1:

The patent extracts only the essential information from comprehensive requirements by using a requirements parser to identify key elements and a natural language generator to create concise descriptions. This extraction process removes redundant details while preserving critical information needed for control logic generation.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent transforms the parameter of information representation from detailed structured formats to condensed natural language descriptions. By changing the representation parameters, the system maintains information completeness while reducing token consumption to fit within LLM input limits.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If requirements are partitioned into individual parts, then token limit is respected, but interdependencies between parts may be lost

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidinterdependency preservation
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements feedback mechanisms where the system analyzes requirements, generates initial natural language descriptions, evaluates them against interdependency criteria, and refines the descriptions to preserve critical relationships. This iterative feedback process ensures interdependencies are maintained while achieving efficient processing.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP4621554A1A method for generating a control logic code for controlling an automated industrial process
Publication Date: 2025.09.24 ABB (SCHWEIZ) AG
  • EP4621554A1 patent drawingFigure 1~2
  • EP4621554A1 patent drawingFigure 3~4
  • EP4621554A1 patent drawingFigure 5~6

AI summary

A method (100) for generating a control logic code (134) for controlling an automated industrial process by means of at least one programmable logic controller is proposed, the method comprising: Providing a plurality of specifications (111) of an appliance structure of the automated industrial process, comprising a plurality of components and/or subcomponents; and/or Providing a plurality of functional requirements (111) of each component of the automated industrial process; Transforming (121, 122, 123) the plurality of specifications (111) and/or the requirements (111) into a natural language form; wherein a semantic content of the plurality of specifications (111) and/or the requirements (111) are preserved; Providing at least one control concept (113) related to the plurality of components and/or subcomponents for controlling the industrial process; Generating (127) a prompt (135) for a first generative artificial intelligence model (140) configured for natural language processing based on the natural language form of at least parts of the plurality of specifications (111) of an appliance structure; and/or at least parts of the plurality of functional requirements (111) of each component of the automated industrial process; and the at least one control concept (113); and a task statement for control logic generation, for the first generative artificial intelligence model (140); Providing the prompt (135) to the first generative artificial intelligence model (140); and Generating the control logic code (134) for performing the automated industrial process by means of the first generative artificial intelligence model (140) based on the prompt (135) as provided.