Automatic generation of function blocks in control systems

CN122837262APending Publication Date: 2026-09-29SCHNEIDER ELECTRIC PTY LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610387222.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-06-09
Filing Date
2026-03-27
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

设施中的用户可能具有不同级别的编程专业知识,从而限制了用户进行有效改变或实施各种控制的能力

Benefits of technology

[0062]鉴于上述内容,可以看出,实现了本发明的各方面的若干优点并且获得了其他有利的结果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122837262A_ABST
    Figure CN122837262A_ABST
Patent Text Reader

Abstract

A system and method for automatically generating function blocks using a Large Language Model (LLM) for use within a control system. An authentication processor receives natural language input. The natural language input indicates function variables, events, and objectives. The authentication processor executes an LLM function block engine. The LLM function block engine identifies input variables, input events, output variables, and output events based on the natural language input. The LLM function block engine generates one or more algorithms based on the function objectives, wherein the algorithms are executed based on input events, using the input variables to generate output variables and triggers, as well as output events. The LLM function block engine also presents variables, events, and algorithms as event-based execution blocks for application in industrial automation systems.
Need to check novelty before this filing date? Find Prior Art

Description

Background Technology

[0001] Industrial automation requires managing complex control systems and operating facilities that demand high levels of efficiency. Numerous software tools exist to support the management of hardware within industrial systems. However, configuring components within industrial management software can be complex. Generating function blocks for execution on various devices within a system requires programming expertise. For example, specific standards such as the IEC 61499 framework require a combination of programming expertise and an understanding of the standard's requirements. Users within the facility may possess varying levels of programming expertise, limiting their ability to effectively modify or implement various controls. Furthermore, equipment from different manufacturers may rely on different programming constructs and languages ​​than other equipment. Therefore, to develop effective function blocks for various devices within a control system, users must be familiar with various functional languages ​​and the devices themselves. Summary of the Invention

[0002] This disclosure provides a system and method for automatically generating function blocks for control systems such as industrial automation systems using a large language model (LLM). A user provides natural language input to an engineering processor. The engineering processor executes an LLM function block engine to generate function blocks for execution within the industrial automation system. According to other aspects of this disclosure, the LLM function block engine is continuously trained on the generated function blocks and utilizes low-rank adaptation (LoRA) to accelerate training and minimize the resource cost for executing the model.

[0003] In one aspect, a system for automatically generating function blocks includes an engineering processor and an engineering database coupled to the processor. The engineering database stores historical function block information. The system also includes memory coupled to the engineering processor. When executed by the engineering processor, computer-executable instructions stored in the memory configure the engineering processor to execute an LLM function block engine trained on the historical function block information to generate a function block execution model. Executing the LLM function block engine includes receiving natural language input indicating at least one of one or more function objectives, one or more function states, or one or more function variables, and determining one or more input variables, one or more output variables, one or more input events, and one or more output events based on the natural language input and the indicated function objectives, function states, and function variables. Executing the LLM function block engine also includes generating one or more algorithms based on the natural language input and function objectives, wherein the algorithms are configured to receive a subset of input variables upon execution, perform operations based on one of the function objectives, and return a subset of output variables, and identify one or more state definitions based on the natural language input, the algorithms, and the function states. The execution of the LLM function block engine also includes presenting input variables, output variables, state definitions, and algorithms into the function block execution model, which instructs each algorithm to execute in response to at least one input event associated with the function objective, and each algorithm to trigger at least one output event after execution.

[0004] In another aspect, a method for automatically generating function blocks includes: receiving natural language input indicating one or more function objectives, one or more function states, and one or more function variables; and executing an LLM function block engine by an automation expert processor. Executing the LLM function block engine includes determining one or more input variables, one or more output variables, one or more input events, and one or more output events based on the natural language input, function objectives, and function variables. Executing the LLM function block engine also includes generating one or more state definitions based on the function states, and generating one or more algorithms based on the natural language input and function objectives, wherein the algorithms are configured to receive a subset of input variables upon execution, perform operations based on one of the function objectives, and return a subset of output variables. Executing the LLM function block engine also includes presenting the input variables, output variables, input events, output events, state definitions, and algorithms as a function block execution model, the function block execution model indicating that each algorithm executes in response to at least one input event associated with a function objective, and each algorithm triggers at least one output event after execution. The method also includes generating an execution control graph of the function block execution model.

[0005] In another aspect, a method for training a reusable software component LLM includes receiving reusable software component information, which includes reusable software component syntax information, reusable software component semantic information, and reusable software component practice information. The method also includes training an LLM reusable software component engine based on the reusable software component information and historical reusable software component information, and receiving one or more test natural language inputs. The method further includes generating test reusable software component results based on the test natural language inputs, and modifying the parameters of the LLM reusable software component engine as a result of comparing the test reusable software component results with expected test reusable software component results.

[0006] Other objects and features of the invention will be apparent in part, and are also indicated herein. Attached Figure Description

[0007] Figure 1 A block diagram of a system for automatically generating function blocks using LLM, according to an embodiment, is shown.

[0008] Figure 2 This is a flowchart illustrating the process of automatically generating function blocks according to an embodiment.

[0009] Figure 3 This is a block diagram illustrating functional blocks conforming to the IEC 61499 standard according to an embodiment.

[0010] Figure 4 It is an execution control diagram associated with function blocks according to an embodiment.

[0011] Figure 5A and 5B This is an example of an execution control model presented as an XML document according to an embodiment.

[0012] Figure 6 This is a flowchart illustrating the process of training an LLM using function block information according to an embodiment.

[0013] Figure 7 This is a flowchart illustrating the process of updating the LLM using low-rank adaptive (LoRA) according to an embodiment.

[0014] Throughout the accompanying drawings, corresponding reference numerals denote the corresponding parts. Detailed Implementation

[0015] The features and other details of the concepts, systems, and techniques sought to be protected herein will now be described in more detail. It should be understood that any particular embodiment described herein is shown by way of illustration and not intended to limit the scope of this disclosure and the concepts described herein. Features of the subject matter described herein may be employed in various embodiments without departing from the scope of the sought-protected concepts.

[0016] To meet the needs of industrial systems, tools are required for the efficient management, configuration, and control of equipment within the system. Ideally, interactive engineering management software provides users with simplified management and programming tools. A user refers to any entity that configures and / or manages function block programming. For example, users can include plant operators, personnel with programming expertise in an industrial environment, or other automated equipment that can provide instructions for configuring or creating function blocks. However, each device within the system requires function blocks to execute within the environment. Because devices may originate from various manufacturers, different requirements may apply. To simplify and unify management, standards have created uniform guidelines for creating function blocks or other reusable software components. For example, IEC 61499 provides a management standard for industrial applications.

[0017] The need for distributed control topologies led to the development of programming language standards such as IEC 61499, an international standard published by the International Electrotechnical Commission (IEC) specifically for distributed (event-based) industrial applications. Typically, IEC 61499 defines a general architecture that enables application-centric design, where one or more applications are defined by a network of interconnected function blocks for the entire system, and then distributed to available devices. A function block is a convenient programming mechanism that combines a set of programming instructions to perform specific and standardized actions, such as speed control, interval control, or counting. A function block may include configuration data, a set of operating parameters, and typically one or more data inputs and outputs. All devices within the system are described within a device model, and the system topology is reflected in the system model. IEC 61499 discusses the topic of function block-based distributed control applications for industrial process measurement and control systems.

[0018] In the IEC 61499 architecture model, distributed applications are built by interconnecting instances of reusable functional block types with appropriate event and data connections in the same way as designing a circuit board with integrated circuits. Using IEC 61499-compliant software tools, these functional blocks can be distributed and then deployed over a network to runtime components of IEC 61499-compliant physical devices (controllers). In this way, distributed control and automation systems can be configured from a library of reusable IEC 61499-compliant components.

[0019] According to this standard, the execution of control applications is event-driven, where events represent changes in system state or conditions, unlike classic scan-based distributed control systems. The IEC 61499 standard also specifies a set of software components and applications that implementers of the standard must implement or develop.

[0020] While the IEC 61499 standard provides a framework for function block development, its use, without additional tools, relies on the individual user's expertise in the standard. By combining interactive engineering management software with specially trained machine learning models (such as LLM), the system can provide easy and efficient generation of function blocks for implementation within industrial automation systems. Furthermore, by utilizing fine-tuning training, such as through LoRA, LLM can operate on relatively lightweight hardware within industrial automation systems and offers a more efficient and targeted training process.

[0021] Referring to the accompanying drawings and the following description, a system for generating function blocks is disclosed. Figure 1 This is a block diagram illustrating the system. The system generates function blocks for controlling and operating industrial automation equipment 102. Industrial automation equipment 102 may include control devices such as distributed control systems (DCS), monitoring and data acquisition (SCADA) systems, programmable automation controllers (PACs), remote terminal units (RTUs), industrial automation and control systems (IACS), and intelligent electronic devices (IEDs). Additionally, industrial automation equipment 102 may include industrial equipment for performing industrial processes, such as sensors, robots, or other machinery. Examples of various industrial automation equipment 102 in industrial automation systems are further described in U.S. Patent Application Publication No. 2024 / 0377808, entitled "Systems and Methods for Autonomous Anomaly Management in Industrial Sites," attributed to Schneider Electric Systems, USA, the entire contents of which are incorporated herein by reference. Although described as function blocks, function blocks can be any other form of reusable software component. In some embodiments, the generated function blocks conform to the IEC 61499 standard. However, while the IEC 61499 standard is described below, other software standards may define requirements for reusable software components. Engineering processor 104 generates function blocks or reusable software components. In some embodiments, engineering processor 104 monitors and controls the operation of industrial systems within an industrial facility. In other embodiments, engineering processor 104 operates outside the industrial facility via the cloud. Engineering processor 104 is electrically coupled to a memory storing instructions for executing the generation of function blocks.

[0022] In some embodiments, Figure 1The engineering processor 104 executes interactive engineering management software, enabling users to configure and modify industrial systems and their components. The engineering processor 104 is coupled to input and output devices such as a keyboard, mouse, display, and / or microphone for inputting information to the processor 104 and the interactive software. Furthermore, the interactive engineering management software allows users to input information for function block generation. The interactive software also displays various aspects of the industrial automation system, including function block information and execution control charts of related function blocks. For example, Schneider Electric's EcoStruxure Automation Expert (EAE) provides suitable interactive software for managing various aspects of the system used to generate function blocks, as well as the industrial automation system itself.

[0023] Engineering database 106 is electrically coupled to engineering processor 104. Engineering database 106 stores information about industrial automation systems. In some embodiments, engineering database 106 also stores standard information about the generation of function blocks and reusable software components. Standard information includes syntax, semantics, and best practice information. In some embodiments, syntax, semantics, and best practice information are defined by standards such as IEC 61499. In one or more embodiments, engineering database 106 additionally stores historical function block information, such as previously generated function blocks themselves, information about the devices associated with the function blocks, and execution information for the function blocks.

[0024] Further reference Figure 1 The LLM function block engine 108 receives input information from the user to generate function blocks. The engineering processor 106 executes the LLM function block engine 108. As further described below, the LLM function block engine 108 is trained on historical function block information and pre-generated function blocks designed to perform tasks within an industrial automation system. In some embodiments, the LLM function block engine 108 is further trained on semantic, syntactic, and best practice information for generating function blocks. In some embodiments, the LLM function block engine 108 implements LoRA to update the model based on industrial system information. By utilizing LoRA, as further described below, the model updates target parameters and achieves simplified retraining and execution.

[0025] Figure 2This is a flowchart illustrating the process of generating a function block according to an embodiment. Starting at step 202, the engineering processor 104 receives natural language input to generate the function block. In some embodiments, the user enters text into a prompt in the interactive software to create natural language input. In other embodiments, the user speaks the input into a microphone coupled to the engineering processor 104, and a speech-to-text engine renders the input as text. For example, the user could enter a request to “write code 61499 for analog input scaling with original high and original low values ​​and engineering high and engineering low values”.

[0026] In some embodiments, at step 204, the LLM function block engine 108, executed by the engineering processor 104, evaluates the input text. The LLM function block engine 108 evaluates the text to determine whether the text provides sufficient information for the generation of the function block. For example, in order to generate an appropriate function block according to the IEC 61499 standard, the LLM function block engine 108 may need to identify the device used to perform control, the function objective, one or more function states, and function variables. Therefore, this input information can be associated with components of the function block, such as input events, input variables, algorithmic logic, output events, and output variables.

[0027] Referring to the previous example input "Write code 61499 for analog input scaling with original high and original low values ​​and engineering high and engineering values", the LLM function block engine 108 can determine the input recognition target, perform "analog input scaling", and a set of inputs "original high and original low values ​​and engineering high and engineering low values". Therefore, the LLM function block engine 108 then determines whether the information can be presented into the function block. In some embodiments, if the LLM function block engine 108 determines that the input text is insufficient for generation, the LLM function block engine 108 generates a prompt to present to the user requesting more information. The LLM function block engine 108 can then receive supplementary or alternative input from the user to meet the generation requirements. For example, if the user only requests "Generate function block to perform analog input scaling", the LLM function block engine 108 can request the user to indicate which variables to apply scaling to. In other embodiments, if the input is insufficient, the LLM function block engine 108 generates an error and returns to... Figure 2 At step 202, new input is received from the user. Therefore, in response to the insufficient sample request, the LLM function block engine 108 requests the user to input a complete generation request. Then, in step 206, the LLM function block engine 108 begins generating the components of the function block.

[0028] Figure 3This is a block diagram illustrating the structure of a function block according to the IEC 61499 standard. The LLM function block engine 108 identifies and generates input events 302 and input variables 304, as well as output events 306 and output variables 308. An input event 302 to a function block triggers the function block to execute algorithm 310 based on the current state and the current input variable 304. For example, input event 302 could be the completion of a previous task within an industrial automation system or the triggering of an alarm on a device in the system. Input variables 304 represent the inputs to be performed on the function to which the function is executed. Output variables 308 similarly represent variables generated by the execution of the function block, while event output 306 is an event trigger to be executed upon completion of the relevant execution of the function block. In some embodiments, the variables defining the function block include the type of the variable defined according to the standard. For example, based on natural language input, the LLM function block engine determines whether a given input variable 304 should be typed as a Boolean, integer, time, string, or any other type.

[0029] LLM Function Block Engine 108 is based on Figure 2 At step 208, the input natural language generates one or more algorithms. Based on the functional objective identified within the natural language input, the LLM function block engine 108 generates algorithms for obtaining the objective. In some embodiments, the LLM function block engine 108 identifies multiple algorithms associated with the same function block, each algorithm being associated with one or more input events. For example, a user can request the generation of a function block for tracking a count. The count can increment in response to an event trigger and decrement in response to another event trigger. Therefore, the LLM function block engine generates an incrementing function associated with a first event trigger, such as X = X + 1, and the engine generates a decrementing function associated with a second event trigger, such as X = X - 1.

[0030] In step 210, the LLM function block engine 108 further identifies the components of the function block. For example, in some embodiments, the LLM function block engine 108 generates state and / or transition definitions for creating an execution control chart. An execution control chart is a graph illustrating the execution process of a function block over time. Therefore, the state and transition definitions provide information indicating the processing steps for executing the function block used to generate the execution control chart. In one or more embodiments, the execution control chart information conforms to the semantic requirements of the IEC 61499 standard.

[0031] Figure 4 An example of an execution control chart associated with a function block according to the IEC 61499 standard is shown. Figure 4The initialization steps of function block 402, defined by INIT, are shown. Execution of the function continues with several execution steps 404 defined by REQ, SET, and FINISH. As shown, each step of the function includes a transition condition 405, which may include input events for executing algorithm 406, such as INITALG, REGALG, REQ_RETURNALG, and FINISH_ALG. Algorithm 406 emits an output event 408 upon completion. Therefore, the execution control chart provides a visual overview of the process of executing the function block.

[0032] Although the generation of components of a function block is described sequentially, the identification and generation of components can be performed within the LLM function block engine 108 in any suitable order or simultaneously. Furthermore, although described as discrete steps, the interactions and dependencies of components on other components require a comprehensive analysis by the LLM function block engine 108 within the context of the desired function block output, such as standard-specific syntax and semantics.

[0033] Further reference Figure 2 After generating the components of the function block in step 210, the LLM function block engine 108 presents the components as an event-based execution model at step 212. The event-based execution model includes information about the function block or reusable software component. It provides a format or structure for presenting the function block in a human-readable or transferable form from one system to another. For example, the event-based execution model may conform to a standard such as IEC 61499 to define the structure of the component and how those elements are organized. In some embodiments, the event-based execution model is presented as a file format, such as XML, for importing or exporting to interactive software or other systems.

[0034] Figure 5A and 5BAn example of an event-based execution model conforming to the IEC 61499 standard is shown in XML format. The exemplary event-based execution model illustrates a model for simulating input scaling, having raw high, raw low, engineered high, and engineered low as described above as input examples. Input event 502 (RECEIVE_SIGNAL) is associated with the EventInput tag, while output event 504 (CNF) is defined using the EventOutputs tag. Input variable 506 is defined by the InputVars tag, which includes InputSignal, RawLow, RawHigh, EngLow, and EngHigh, while output variable 508 is defined by OutputVars. The ECC tag 510 defines the parameters used to generate the execution control chart, where each state is defined using the ECState tag. Finally, the algorithm tag defines the algorithm 512 executed by the function block. This example illustrates scaling the raw high and low values ​​using engineered high and low.

[0035] Refer again Figure 2 In step 214, the LLM function block engine 108 sends the generated function blocks. In some embodiments, the function blocks are sent as exported XML files. In other embodiments, the function blocks are sent to interactive software for application to the control and operation of the industrial automation system. In one embodiment, the interactive software presents the function blocks and execution control charts to the user for review before application to the system. The user can adjust the function blocks. In response to changes to the function blocks, the function blocks are fed back to the LLM function block engine for retraining 108. In one or more embodiments, the user of the interactive software provides supplementary natural language input instead of directly modifying the function blocks or the event-based execution model. The supplementary input may indicate changes to the functionality of the function block, such as changing the target or changing variable names, or the supplementary input may indicate additional functionality required by the function block that was not previously identified in the original natural language input. After this supplementary input, the process returns to step 204 to begin generating new or updated function blocks.

[0036] In one or more embodiments, at step 216, the event-based execution model is applied directly to the system via interactive software. The event-based execution model operates on the industrial system, performing any of a variety of functions, such as monitoring, controlling, or configuring equipment within the system. Execution of the event-based execution model involves receiving one or more input variables and, in response to an input event trigger, executing an algorithm associated with that trigger. An output variable associated with the algorithm is then generated, and an associated output event is triggered. After application, the event-based execution model can be monitored to evaluate performance. If the event-based execution model needs modification, the user can modify the model directly via the interactive software or generate a new model by inputting new natural language input for the process starting at 202. Because this process rapidly generates executable functional blocks for the system, users can quickly update or modify the execution of the industrial automation system based on changing environments such as new equipment, new production processes, or new production requirements.

[0037] Figure 6 This is a flowchart illustrating the process of training an LLM to generate function blocks according to an embodiment. In step 602, function block information for training the LLM must be generated. In one or more embodiments, the function block information is compiled into prompts submitted to the LLM. In some embodiments, the function block information includes syntactic information, semantic information, and best practice information. Syntactic information provides the LLM with information about the language structure. Because each programming language has unique standards regarding how the language must be constructed and what characters can be used, the LLM must be trained on the specific structures associated with a given language. For example, whether a programming language requires a semicolon (;) is syntactic information, or how and when parentheses can be used. Semantic information provides information about the meaning of the language. Semantic training information trains the LLM on how to interpret the language and how to determine whether a given statement is valid. For example, semantic rules indicate whether an operation is valid regardless of the syntax, such as performing an increment operation on a string such as "x=x+1", where x is defined as a string. By training on the syntactic and semantic information, the LLM is trained to generate function blocks or reusable software components for a given language.

[0038] In some embodiments, function block information also includes best practice information, pre-generated function block information, or historical function block information. Best practice information describes best practices for coding in a particular language. While a given statement may generally meet syntactic and semantic requirements, there may be best practices for readability or efficiency that are not captured in the syntactic or semantic information. In some embodiments, function block information used for training includes pre-generated function blocks. Pre-generated function blocks include all information related to working function blocks used for common operations, such as inputs and outputs. Therefore, LLM also trains on function blocks that conform to syntactic, semantic, and best practice standards to ensure that the function blocks are both operable and efficient.

[0039] In one or more embodiments, the function block information includes historical function block information. Historical function block information may include function blocks currently or previously applied to the current industrial automation system, including user adjustments to the function blocks, such as previous combinations. Figure 2 Therefore, the LLM can be trained and / or retrained based on specific operations of the industrial automation system connected to the engineering processor 106 and / or based on user adjustments to the generated function blocks. In one embodiment, pre-generated or historical function blocks include natural language statements indicating requests for generating associated function blocks. Thus, the training data also provides the LLM with natural language information related to function block generation, as well as programming language-specific information. In some embodiments, the function block information is based on standards. For example, the LLM model can be specifically trained using the IEC 61499 standard to generate function blocks suitable for use in industrial automation environments.

[0040] Refer again Figure 6 After generating the function block information, the LLM is trained on the function block information in step 604. The generated function block information is then applied to the LLM to train the model. After initial training of the model, the model is evaluated and refined at step 606 with generated function block test data. The function block test data includes test natural language input, which is a natural language statement indicating the expected goal of a function block not present in the training data. The function block test data also includes test inputs and outputs of the function blocks. For example, the test data may include test event triggers, a set of input variables, and expected output variables generated by executing the function block that achieves the goal of the natural language input. In some embodiments, the function block test data also includes an expected event-based execution model of the expected function block.

[0041] After generating test data, in step 608, the LLM is tested by generating function blocks with the model. In some embodiments, testing the LLM includes providing test natural language input to the model. In one or more embodiments, the LLM acts as a chatbot to further develop natural language input. In this embodiment, the test natural language input may be partial input to evaluate the LLM's ability to recognize missing information. Therefore, the test data may include a sequence of natural language input provided to the LLM in response to subsequent requests. After receiving complete natural language input or a sufficient set of inputs to generate, the LLM generates function blocks based on further information contained in the natural language input to achieve the goal of testing the natural language input.

[0042] exist Figure 6 Step 610 involves evaluating the function block generated by the LLM. Evaluating function block generation can involve considering various factors, such as syntactic correctness, semantic correctness, conformity to best practices, and whether the function block achieves its objectives. The initial evaluation of the function block includes providing one or more input variables to the function block and then triggering an input event. The output variables and output event triggers are then compared to the expected output variables and output event triggers. In one or more embodiments, although the output may meet the expected output, the generated function block may be evaluated for other considerations. Successful execution of the function block to receive the expected output indicates that the function block meets syntactic and semantic requirements; however, it does not indicate whether the function block conforms to best practices. Therefore, in some embodiments, the actual algorithm may be evaluated to determine whether the function block executes in an unexpected manner or performs unnecessary functions that require more execution time than expected.

[0043] In response to evaluating the LLM, the LLM is updated in step 612. Updating the LLM involves fine-tuning the model's parameters based on the evaluation results. In some embodiments, the initial training and subsequent updates of the model involve direct modification of the parameters. In other embodiments, updating the model during initial training includes applying LoRA, which is further described below. In other embodiments, initial training includes direct modification of the parameters, while subsequent updates are performed by applying LoRA. Different aspects of the model may need to be adjusted when updating the LLM. For example, if the model incorrectly identifies any of the variables, events, or targets, the model may need to modify the parameters related to interpreting natural language input. Alternatively or additionally, if the model generates function blocks with errors related to syntax, semantics, or general execution, the parameters related to the generation of the function blocks may need to be updated.

[0044] In step 614, the model continues to retrain using the function block information. After initial training, LLM can be implemented within an industrial automation system through the execution of the LLM function block engine 108. After generating function blocks in response to natural language input sent by the user, the LLM receives the final version of the function blocks exported or applied after user modification. For example, if the user modifies variables or algorithms, the LLM uses this information to retrain. As previously described, in some embodiments, retraining the LLM involves directly updating the model's parameters. In other embodiments, retraining involves applying LoRA to the model to simplify the training process and minimize the model's execution cost.

[0045] Figure 7 This is a flowchart illustrating the process of updating a model by applying LoRA. LoRA allows for the modification and updating of an LLM through a lightweight process with simplified execution, enabling efficient operation on limited processing resources. To update the model, the engineering processor 106 first receives the function block generation results at 702. The function block generation results can be unmodified function blocks generated through the process described above. Alternatively, the function block generation results can include user-provided modifications or feedback associated with the unmodified function block results.

[0046] When updating the LLM via LoRA, the model's parameters are "frozen" at step 704. By "freezing" or keeping the model's parameters unchanged, the original training knowledge of the LLM is preserved. Then, in step 706, parameters that need to be adapted are identified. Instead of updating the entire model as needed through some update method, only the parameters that need to be changed are updated in a simplified manner. Therefore, only a subset of key layers learns task-specific representations, such as specific requirements, syntactic, semantic, and best practice information for generating function blocks.

[0047] Next, in step 708, two low-rank matrices and a scaling factor are applied to the model's parameters. LoRA performs adaptation by decomposing parameter updates into two low-rank matrices A and B. The rank r of these matrices is set to be significantly lower than the dimension of the original parameter matrix. For each of the parameters W' that need to be tuned, LoRA tunes the parameter by W' = W + α·A·BW', where W' is the adaptive parameter to be applied in the final model, A and B represent the low-rank matrices, and α represents the scaling factor that controls the effect of parameter modifications. Applying LoRA reduces the number of parameters to be tuned and lowers memory requirements. Because the low-rank matrices A and B require fewer resources to compute and store, the overall model footprint is reduced. Furthermore, LoRA speeds up the training process and allows execution on lighter hardware, such as an 8GB GPU.

[0048] The LoRA-updated model continues to be tested at step 710. The model is tested by providing a set of natural language cues associated with pre-generated or historical function block information. After providing the training set in step 712, the results are analyzed, and the trained model continues to update the low-rank matrix and scaling factor, as described above. By utilizing application-specific training information such as function block information, the low-rank layer is tuned to respond to application-specific cues. Therefore, Parameter Effective Fine-Tuning (PEFT) can be described by the following formula:

[0049] PEFT = LoRA(P min ) + Δ adapt (x,y)

[0050] Where P min Δ represents the minimum parameter required for task-specific adaptation. adapt (x,y) represents the low-rank adjustment applied to the model weights during fine-tuning. Therefore, the LLM can be tuned to respond to cues and generate specific responses for unique solutions (e.g., function blocks according to the IEC 61499 standard). Similarly, limited computational and memory requirements allow the model to execute on limited hardware within industrial automation environments.

[0051] Embodiments of this disclosure may include a dedicated computer, which includes various computer hardware as described in more detail herein.

[0052] For illustrative purposes, programs and other executable program components may be shown as discrete boxes. However, it should be recognized that such programs and components reside in different storage components of the computing device at different times and are executed by the device's data processor.

[0053] Although described in conjunction with an example computing system environment, embodiments of various aspects of the invention may operate in conjunction with other dedicated computing system environments or configurations. The computing system environment is not intended to impose any limitation on the scope or functionality of any aspect of the invention. Furthermore, the computing system environment should not be construed as having any dependency or requirement associated with any one or combination of the components shown in the example operating environment. Examples of computing systems, environments, and / or configurations to which various aspects of the invention may be applied include, but are not limited to, personal computers, server computers, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, mobile phones, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the foregoing systems or devices, etc.

[0054] Embodiments of the aspects of this disclosure can be described in the general context of data and / or processor-executable instructions (such as program modules) stored in one or more tangible, non-transitory storage media and executed by one or more processors or other devices. Typically, program modules include, but are not limited to, routines, programs, objects, components, and data structures that perform a particular task or implement a particular abstract data type. The aspects of this disclosure can also be practiced in a distributed computing environment, where tasks are performed by remote processing devices linked via a communication network. In a distributed computing environment, program modules can reside in both local and remote storage media, including memory storage devices.

[0055] In operation, processors, computers, and / or servers can execute processor-executable instructions (e.g., software, firmware, and / or hardware) as shown herein to implement aspects of the present invention.

[0056] Embodiments can be implemented using processor-executable instructions. These processor-executable instructions can be organized into one or more processor-executable components or modules on a tangible processor-readable storage medium. Furthermore, embodiments can be implemented using any number and organization of such components or modules. For example, aspects of this disclosure are not limited to the specific processor-executable instructions or specific components or modules shown in the accompanying drawings and described herein. Other embodiments may include different processor-executable instructions or components having more or fewer functions than those shown and described herein.

[0057] Unless otherwise stated, the order in which operations of the aspects of this disclosure shown and described herein are performed or carried out is not required. That is, unless otherwise stated, operations may be performed in any order, and embodiments may include more or fewer operations than those disclosed herein. For example, it is contemplated that a particular operation may be performed before, simultaneously with, or after another operation within the scope of this invention.

[0058] When describing elements of the invention or embodiments thereof, the articles “a,” “an,” “the,” and “the” are intended to indicate the presence of one or more elements. The terms “comprising,” “including,” and “having” are intended to be inclusive and mean that additional elements may be present in addition to those listed.

[0059] Not all of the components shown or described may be required. Additionally, some implementations and embodiments may include additional components. Variations in the arrangement and type of components may be made without departing from the spirit or scope of the claims set forth herein. Furthermore, different or fewer components may be provided, and components may be combined. Alternatively or additionally, a component may be implemented by several components.

[0060] The above description illustrates embodiments by way of example and not limitation. This description enables those skilled in the art to make and use aspects of the invention, and describes numerous embodiments, adaptations, variations, alternatives, and uses of aspects of the invention, including modes currently considered best for carrying out aspects of the invention. Furthermore, it should be understood that aspects of the invention, in their application, are not limited to the construction details and component arrangements set forth in the following description or shown in the accompanying drawings. Aspects of the invention can have other embodiments and can be practiced or performed in various ways. Moreover, it should be understood that the wording and terminology used herein are for descriptive purposes and should not be considered limiting.

[0061] It is obvious that modifications and variations are possible without departing from the scope of the invention as defined in the appended claims. Since various changes can be made to the above structures and methods without departing from the scope of the invention, all content contained in the above description and shown in the drawings is intended to be illustrative rather than restrictive.

[0062] In view of the foregoing, it can be seen that several advantages of various aspects of the present invention have been achieved and other advantageous results have been obtained.

[0063] The abstract and summary are provided to help the reader quickly determine the nature of the disclosed technology. They are presented with the understanding that they will not be used to interpret or limit the scope or meaning of the claims. The summary is provided to introduce some concepts in a simplified form, which will be further described in the detailed embodiments. The summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to help determine the claimed subject matter.

Claims

1. A system for automatically generating function blocks, the system comprising: Engineering processor; An engineering database coupled to the processor, the engineering database storing historical function block information; A memory storing computer-executable instructions, which, when executed by the engineering processor, configure the engineering processor to: Executing a large language model (LLM) function block engine trained on the historical function block information to generate a function block execution model, wherein executing the LLM function block engine includes: Receive natural language input, which indicates at least one of one or more functional objectives, one or more functional states, or one or more functional variables; Based on the functional objectives, functional states, and functional variables of the natural language input and instructions, determine one or more input variables, one or more output variables, one or more input events, and one or more output events; One or more algorithms are generated based on the natural language input and the functional objectives, wherein the algorithms are configured to receive a subset of the input variables when executed; perform operations based on one of the functional objectives; and return a subset of the output variables. Based on the natural language input, the algorithm, and the functional state, one or more state definitions are identified; and The input variables, the output variables, the state definitions, and the algorithms are presented in the function block execution model, which instructs each algorithm to execute in response to at least one of the input events associated with the functional objective, and each algorithm triggers at least one of the output events after execution.

2. The system according to claim 1, wherein, The memory stores computer-executable instructions, which, when executed by the engineering processor, further configure the engineering processor to: Execute the engineering consulting engine, wherein executing the engineering consulting engine includes: Receive the function block execution model; The function block execution model is stored in the project database; Generate an execution control graph based on the aforementioned functional block execution model; and The execution control graph and the function block execution model are displayed on a display coupled to the processor.

3. The system according to claim 1 or claim 2, wherein, Executing the engineering consulting engine further includes: Receive updated natural language input; Based on the natural language input recognition, one or more functional block components to be updated, the functional block components including at least one of the input variable, the output variable, the state definition, or the algorithm; and Update the function block execution model using the function block component.

4. The system according to any one of claims 1 to 3, wherein, The memory stores computer-executable instructions, which, when executed by the engineering processor, further configure the engineering processor to: Receive function block information, which includes function block syntax information, function block semantic information, and function block practice information; The LLM function block engine is trained based on the function block information and the historical function block information; Receive one or more test natural language inputs; The test function block results are generated based on the test natural language input; as well as As a result of comparing the test function block results with the expected test function block results, one or more parameters of the LLM function block engine are modified.

5. The system according to any one of claims 1 to 4, wherein, The memory stores computer-executable instructions, which, when executed by the engineering processor, further configure the engineering processor to: Updating the LLM function block engine, wherein updating the function block engine includes: Receive function block results, which include one or more results from the function block execution model and one or more previous natural language inputs; One or more parameters of the LLM function block engine generated through training are retained; Based on the results of the aforementioned function block, one or more parameters that require adaptation are identified; and Apply two low-rank matrices and a scaling factor to each parameter that requires adaptation.

6. The system according to any one of claims 1 to 5, wherein, The historical function block information conforms to the IEC 61499 standard, and the function block execution model conforms to the IEC 61499 standard.

7. The system according to any one of claims 1 to 6, wherein, The function block execution model includes function block XML files.

8. The system according to any one of claims 1 to 7, further comprising: An industrial automation device coupled to the engineering processor, the industrial automation device comprising: Device processor; and A memory coupled to the device processor stores computer-executable instructions that, when executed by the device processor, configure the device processor to: Receive the function block execution model from the engineering processor; Receive one or more device inputs associated with the input variable; Receive an input event triggered in association with one of the input events; Execute the algorithm associated with the triggered input event to update the output variable based on the result of applying the algorithm to the input variable; and Trigger the output event associated with the algorithm.

9. The system according to claim 8, wherein, The engine that executes the LLM function block also includes: Before receiving the natural language input, partial input is received, which indicates at least one of the functional objective, the functional state, or the functional variable; One or more prompts are generated based on the partial input, and the prompts indicate additional required information based on at least one of the functional goal, the functional state, or the functional variable.

10. The system according to any one of claims 1 to 9, wherein, The LLM function block engine includes a low-rank adaptive (LoRA) LLM.

11. A method for automatically generating function blocks, the method comprising: Receive natural language input, which indicates one or more functional objectives, one or more functional states, and one or more functional variables; An automated expert processor executes a large language model (LLM) function block engine, wherein executing the LLM function block engine includes: Based on the natural language input, the functional objective, and the functional variables, determine one or more input variables, one or more output variables, one or more input events, and one or more output events; One or more state definitions are generated based on the aforementioned functional states; One or more algorithms are generated based on the natural language input and the functional objectives, wherein the algorithms are configured to receive a subset of the input variables when executed, perform an operation based on one of the functional objectives, and return a subset of the output variables. The input variables, output variables, input events, output events, state definitions, and algorithms are presented in a function block execution model, which instructs each algorithm to execute in response to at least one of the input events associated with the functional objective, and each algorithm triggers at least one of the output events upon execution; and Generate the execution control graph of the function block execution model.

12. The method according to claim 11, further comprising: Receive function block information, which includes function block syntax information, function block semantic information, and function block practice information; The LLM function block engine is trained based on the function block information and the historical function block information; Receive one or more test natural language inputs; The test function block results are generated based on the test natural language input; as well as The parameters of the LLM function block engine are modified as a result of comparing the test function block results with the expected test function block results.

13. The method according to claim 11 or claim 12, further comprising: It receives test inputs, including one or more test variable inputs, one or more test variable outputs, and one or more test event inputs; The test input is applied to the function block execution model to generate test results; Compare the test results with the output of the test variables; In response to the output variable failing to match the test variable output, one or more updated algorithms are generated; as well as The input variables, the output variables, the state definitions, and the update algorithm are presented as an updated function block execution model.

14. The method according to any one of claims 11 to 13, wherein, The functional block execution model presented is based on the IEC 61499 standard.

15. The method according to any one of claims 11 to 14, the method further comprising: Before receiving the natural language input, partial input is received, which indicates at least one of the functional objective, the functional state, or the functional variable; The LLM function block engine is executed by the automation expert processor, wherein executing the LLM function block engine further includes: One or more prompts are generated based on the partial input, and the prompts indicate additional required information based on at least one of the functional goal, the functional state, or the functional variable.

16. The method according to any one of claims 11 to 15, wherein, The engine that executes the LLM function block also includes: Before determining the input variables, prompts are generated based on the natural language input, the prompts including requests for updated function block information; Send the aforementioned prompt to the client; and Receive natural language prompt responses from the client; and Specifically, determining the input variable, the output variable, the input event, and the output event is based on the natural language prompt response; generating the state definition is also based on the natural language prompt response; and generating the algorithm is also based on the natural language prompt response.

17. The method according to any one of claims 11 to 16, further comprising: Send the function block execution model to the industrial automation equipment; In response to a triggered event, the processor of the industrial automation equipment executes one of the algorithms of the function block execution model.

18. A method for training a large language model (LLM) of reusable software components, the method comprising: Receive reusable software component information, which includes reusable software component syntax information, reusable software component semantic information, and reusable software component practice information; The LLM reusable software component engine is trained based on the reusable software component information and the historical reusable software component information. Receive one or more test natural language inputs; Based on the test natural language input, generate test results for reusable software components; as well as As a result of comparing the test results of the reusable software component with the expected test results of the reusable software component, the parameters of the LLM reusable software component engine are modified.

19. The method of claim 18, further comprising: Receive reusable software component results, the reusable software component results including one or more reusable software component execution models as results and one or more previous natural language inputs; Preserve the parameters of the LLM reusable software component engine generated through training; Based on the results of the reusable software components, one or more parameters that need to be adapted are identified; as well as Apply two low-rank matrices and a scaling factor to each parameter that requires adaptation.

20. The method according to claim 18 or 19, wherein, The reusable software component syntax information includes IEC-61499 standard syntax information, the reusable software component semantic information includes IEC-61499 standard semantic information, and the reusable software component practice information includes IEC-61499 standard practice information.

Citation Information

Patent Citations

  • Systems and methods for autonomous anomaly management of an industrial site

    US20240377808A1