Method and system for generating artificial intelligence models
By defining and deploying AI functions in the engineering framework system, the problem of low efficiency in automatic configuration in distributed systems and AI model deployment on PLC is solved, efficient AI model integration and online training are achieved, and the engineering configuration process is simplified.
Patent Information
- Application Number
- CN201980084330.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-12-20
- Filing Date
- 2019-12-20
- Publication Date
- 2024-08-13
- Estimated Expiration
- 2039-12-20
AI Technical Summary
Existing technology makes it difficult to automatically configure and execute projects in distributed systems, resulting in increased engineering errors, time, cost, and workload. Deploying AI models on PLC requires manual and labor-intensive steps, affecting efficiency.
By determining the AI function in the engineering framework system, defining the inference path, converting it into a processing format, extracting and extending it in the AI workbench module, deploying it to the processing module, and using the communication adapter to communicate with the AI framework module, the AI model parameters are automatically updated.
It improves the integration efficiency and adaptability of AI models in engineering systems, simplifies the deployment process, achieves time- and cost-effective engineering configuration, and supports online/real-time training and model parameter updates.
Smart Images

Figure CN113168564B_ABST
Abstract
Description
[0001] The present invention relates to a method and system for generating an artificial intelligence model for an engineering system.
[0002] Conventionally, in distributed systems, such as in manufacturing plants, executing engineering and configuring different processes involves contributions from experts who have domain knowledge of various types of equipment that are part of such engineering. In addition, the performance of such engineering depends largely on the experts manually referencing engineering data associated with the equipment, selecting automation function instances (i.e., logical representations) for the equipment, and manually configuring the engineering of the distributed system. However, when a process or a product is being engineered, and when the engineering is being implemented in real time, failure to automatically configure and execute the engineering typically results in engineering errors due to lack of verification and confirmation of the execution of the engineering. In addition, failure to automatically execute engineering configuration also results in an increase in the time, cost, and workload required to execute such engineering, thereby affecting the overall operational efficiency of the distributed control system.
[0003] Furthermore, in the case of downtime, maintenance or equipment replacement, in which new equipment is inserted into the distributed system, conventional engineering methods and systems cannot automatically update the configuration of the project, such as software configuration or network configuration, to incorporate the newly inserted equipment, because these conventional engineering methods and systems mainly rely on manual configuration of the process. This typically leads to increased maintenance costs.
[0004] In order to use artificial intelligence methods, AI, or machine learning, ML, for such tasks, the typical approach is to record data from devices and / or systems and / or other data sources, and then feed it into the AI model. Using this data, the AI model can then find a solution for a specific task. The training of the model is done in a framework such as Tensorflow. TM or Theano TM or Caffe TM or Torch TM This is done in the context of AI frameworks such as , which are implemented on powerful hardware tools, as the training of AI models requires a lot of computing power and memory.
[0005] However, only a fraction of the computing power and memory is required for the execution of the final trained AI model compared to the training. Therefore, the final AI model can be executed on a processing module of an edge device with limited computing resources, which in an industrial context can be a programmable logic controller (PLC). A programmable logic controller (PLC) or programmable controller is an industrial digital computer suitable for controlling manufacturing processes, such as assembly lines or robotic equipment, or any activity that requires high-reliability control and easy programming and processing fault diagnosis. They are widely used as high-reliability automation controllers suitable for industrial environments.
[0006] For safety and security reasons, PLCs are typically closed platforms with limited access to the operating system. Therefore, customers need to use engineering frameworks, such as Siemens' TIA Portal, for configuration and programming of PLCs. Therefore, in order to deploy AI models on PLCs, various manual and labor-intensive steps are required.
[0007] Furthermore, in many cases, multiple iterations of these labor-intensive deployment steps are required because the recorded data for AI model training does not always cover all possible system states. For updates to the AI model architecture (e.g., adding a new sensor signal) or model parameters (e.g., system behavior changes), the training and deployment steps need to be repeated several times. Furthermore, data records or simulations of industrial systems are not always available. Especially for highly dynamic systems, such as network traffic, online / real-time learning methods are required.
[0008] Furthermore, the configuration and programming of PLCs usually consists of a reference to an AI framework and its corresponding high-level programming language (such as Python). TM ) is done by customers with limited knowledge of PLCs. Typically, during configuration and programming of a PLC, customers are used to work with a typical engineering framework. The default programming language used in the engineering framework uses a graphical structure such as ladder diagrams or function block diagrams, or textual content such as instruction lists or structured text (structured control languages).
[0009] Currently, several manual and labor-intensive steps are required to deploy AI models into PLC programs. Adaptation of AI models is a continuous process because changes in the environment or configuration in complex automation systems may lead to deteriorated AI model results. In such cases, further time-consuming data collection, training, and deployment iterations are required.
[0010] Document US 2018 / 293517 AI describes an artificial intelligence (AI) engine having an architecture module to create multiple nodes and describe how these nodes are connected in a conceptual node graph that constitutes the resulting AI model. The architecture module also creates a first concept node by packaging an external entity of the code into a software container having an interface configured to exchange information in a protocol of a software language used by the external entity of the code. The architecture module also creates a second concept node derived from its description in a script file coded in a teaching programming language, and connects the second concept node to the node graph in the resulting AI model.
[0011] Therefore, an object of the present invention is to provide a method and system for improving the efficiency of integrating AI models into processing modules of engineering systems and simplifying the adaptation of AI models to the rearrangement of engineering systems for performing engineering with improved accuracy in a time and cost-effective manner.
[0012] According to a first aspect, the present invention provides a method for generating an artificial intelligence (AI) model for an engineering system. The method comprises
[0013] - determining an artificial intelligence AI function in the engineering framework system, wherein an artificial intelligence AI function is a specific functional block including a definition of the operation of an algorithm,
[0014] - defining an inference path or generation of an AI model starting from the determined AI function by means of a computational graph, wherein the inference path for reaching the AI model is described by operational steps (such as convolutions) or by providing functional blocks corresponding to parameterizable layers or by a single functional block representing a complete neural network (such as a convolutional neural network);
[0015] -Convert AI functions and inference paths into processing formats;
[0016] - Sending and exporting the converted AI functions and the converted interference paths to an extraction and extension module of an AI workbench module, wherein the extraction and extension module of the AI workbench module has the function of extracting and extending the computational graph architecture of the previously defined inference path through the operation of an algorithm for model training;
[0017] - deploying the converted AI functionality on a processing module and / or another processing device of an engineering system;
[0018] -Transferring the extended computation graph of the inference path from the extraction and expansion module to the AI framework module;
[0019] - enabling the communication adapter to communicate continuously with the processing module by using a supporting communication protocol for receiving training data as inputs for the AI functions and forwarding them to the AI framework module;
[0020] -Pass the learned parameters of the AI model from the API interface of the AI framework module to the communication adapter for updating the AI model.
[0021] In a preferred embodiment, the method comprises the step of evaluating, by an extraction and extension module of the AI workbench module, the interface and context annotations of the AI functions for extracting addresses for storing data and parameters on the processing module.
[0022] In a further embodiment, the address is used to automatically configure a communication adapter for communicating with the processing module.
[0023] Advantageously, the communication protocol contains a semantic data model of the addresses of the AI functions.
[0024] In a further preferred embodiment, the processing module may be configured as a programmable logic controller (PLC).
[0025] Furthermore, the AI function includes a description of what parameters and data are needed to train the AI function.
[0026] According to a second aspect of the present invention, a system for generating an artificial intelligence AI model is provided, the system comprising an engineering framework system configured to determine an artificial intelligence AI function, wherein the artificial intelligence AI function is a specific functional block including a definition of the operation of an algorithm. The engineering framework system is configured to define an inference path for the generation of an AI model starting from the determined AI function through a computational graph. The inference path for reaching the AI model is described by an operation step (such as convolution) or by providing a functional block corresponding to a parameterizable layer or by a single functional block representing a complete neural network (such as a convolutional neural network). The engineering framework system is configured to convert the AI function and the inference path into a processing format, and send and export the converted AI function to an extraction and extension module of an AI workbench module. The extraction and extension module of the AI workbench module has the function of extracting and extending the computational graph architecture of a previously defined inference path through the operation of an algorithm for model training. The processing module and / or another processing device of the engineering system is used to deploy the converted AI function. Further, the extraction and extension module is configured to transmit the extended computational graph of the inference path to the AI framework module. The communication adapter is configured to continuously communicate with the processing module by using a supporting communication protocol to receive training data as input of the AI function and forward them to the AI framework module; and the AI framework module is configured to pass the parameters of the learned AI model from the API interface of the AI framework module to the communication adapter for updating the AI model (200).
[0027] Preferably, the extraction and expansion module of the AI workbench module is configured to evaluate the interface and context annotations of the AI functions for extracting addresses for storing data and parameters on the processing module.
[0028] In an advantageous embodiment, the address is used to automatically configure a communication adapter for communicating with the processing module.
[0029] In a further preferred embodiment, the communication protocol contains a semantic data model of the addresses of the AI functions.
[0030] Furthermore, the processing module may be configured as a programmable logic controller (PLC).
[0031] Preferably, the AI function includes a description of which parameters and data are required to train the AI function.
[0032] The above and other features of the present invention will now be described with reference to the accompanying drawings of the present invention.The illustrated embodiments are intended to illustrate rather than limit the present invention.
[0033] In the following, the present invention will be further described with reference to illustrative embodiments shown in the accompanying drawings, in which:
[0034] Figure 1 Schematically illustrates an exemplary system for generating an AI model for integration into a processing module of an engineering system according to an embodiment of the first aspect of the present invention;
[0035] Figure 2 A schematic flow chart illustrating an embodiment of a method according to the second aspect of the invention is shown.
[0036] Various embodiments are described with reference to the accompanying drawings, wherein the same reference numerals are used to refer to the same elements throughout. In the following description, for the purpose of explanation, many specific details are set forth in order to provide a thorough understanding of one or more embodiments of the present invention. Obviously, such embodiments can be practiced without these specific details.
[0037] Figure 1A system 100 for generating an artificial intelligence (AI) model 200 for integration into a processing module 310 of an engineering system 300 is illustrated. In a preferred embodiment, the processing module 310 comprises a PLC program. The engineering system 300 may include several further processing modules 320, 330 connected via a communication network (not shown). The processing modules 310, 320, 330 may be accessed by a user device (not shown), such as a personal computing device, a workstation, a client device, a network-enabled computing device, any other suitable computing equipment, and a combination of multiple computing equipment. A user using the user device may access an engineering framework system 400 (which may also be part of the engineering system 300). The engineering framework system 400 is connected to a backend system 500. The backend system 500 comprises an AI workbench module 520 and an AI framework module 540. The AI workbench module 520 comprises an extraction and expansion module 522 and a communication adapter 524. The AI framework module 540 comprises an application programming interface (API) module 542 and a training module 544. The engineering framework system 400, the backend system 500 and the processing modules 300, 310, 320 are connected via a communication network 700. The communication network 700 may include a cloud-based network. The communication network 700 may also represent a network shared by the Internet of Things (IoT). Further, the engineering framework system 400, the backend system 500 and the processing modules 300, 310, 320 are provided with a database.
[0038] The engineering framework system 400, such as Siemens' TIA Portal, includes standard functions (not shown) and at least one artificial intelligence AI function 420. The AI function 420 is a specific functional block that includes the definition of the operation of the algorithm. The AI functions 420 are different from standard engineering functions because they can include parameters that can be optimized through a learning or training process, while in standard engineering functions, physical measurements of certain parameters (such as temperature, pressure, etc.) are recorded as data for these parameters, or the customer / user can also provide default values or estimates for these parameters.
[0039] exist Figure 2 In FIG. 4 , several main steps of a possible embodiment of the computer-implemented method according to the present invention are illustrated.
[0040] In step S10, an AI function 420 is determined in the engineering framework system 400. The AI function 420 includes a description of which parameters and data are required for training the AI function 420. The description of the AI function 420 may include pre-determination / post-determination of specific parameters and / or further annotations.
[0041] In step S20, an inference path 422 for generating the AI model 200 is defined by a computation graph starting from the determined AI function 420. The computation graph is used by most AI frameworks to describe the AI model 200 in order to describe the AI model 200, such as Tensorflow. TM 、Theano TM 、Caffe TM and Torch TM . Typically, the inference path 422 for reaching the AI model 200 can be described by a step of operations such as convolution. Further, the inference path 422 can be described by providing function boxes corresponding to parameterizable layers (e.g., convolutional layers with specific pooling and activation functions) or by a single functional block representing a complete neural network (such as a convolutional neural network CNN). Further abstraction can be achieved by providing a library of single parameterizable functional blocks for specific purposes (such as anomaly detection, object recognition). Such a description of the inference path 422 is particularly interesting in applications that deal with image recognition and analysis (such as microscopy, radiology, video surveillance, etc.).
[0042] In the next step S30 , the AI function 420 , including the inference path 422 with the computation graph architecture and the description of the input / output and related parameters, is converted into a processing format, such as SCL, XML or other serialization format.
[0043] In step S40, the converted AI function 420 is sent and exported to the extraction and expansion module 522 of the AI workbench module 520. This may be performed automatically by the engineering framework system 400 (eg, by using the TIA Portal Openness API).
[0044] In step S50, the converted AI functionality 420 is deployed on the processing module 310. In a further embodiment, instead of deploying the converted AI functionality 420 directly on the processing module 310, it is also possible to move the execution to a further dedicated AI hardware module configured as a processing module extension.
[0045] The AI workbench module 520 has the function of extracting the computational graph architecture of the previously defined inference path 422. The extracted computational graph is extended in the extraction and extension module 522 by the operations of the algorithm for model training, such as mathematical loss functions, differential and integral operations, optimizers. Based on the type of problem defined by the inference path 422, the extension of the computational graph is automatically performed. Examples of extensions are mean squared error for regression problems, cross entropy for classification problems, and / or optimizers that can be developed by heuristics or using machine learning.
[0046] In step S60, the extended computation graph of the inference path 422 is transferred from the extraction and expansion module 522 to the AI framework module 540 using an application programming interface (API) 542, which can be configured as a representation state transfer (REST) API. The AI workbench module 520 and the AI framework module 540 are separate modules to enable different deployment options.
[0047] In step S70, the communication adapter 524 continuously communicates with the processing module 310 by using a supported industrial protocol, such as OPC Unified Architecture (OPC UA), which is a machine-to-machine communication protocol for industrial automation developed by the OPC Foundation. It receives field data transmitted as input to the AI model 200 and forwards it to the AI framework 540 for training of the AI model 200.
[0048] In step S80, the API interface 542 of the AI framework module 540 transmits the learned parameters of the AI model 200 to the communication adapter 524. The learned parameters of the AI model 200 are sent to the communication adapter 524, which in turn transmits them back to the processing module 310 so as to update the AI model 200.
[0049] During extraction of the inference path 422 for extracting the address 220 where data is stored on the processing module 310 , the extraction and expansion module 522 may evaluate the interface and context annotations of the AI function 420 .
[0050] The addresses 220 are used to automatically configure a communication adapter 524 for communicating with a communication protocol running on the processing module 310. In a further embodiment, the communication protocol contains a semantic data model of the addresses 220 of the AI functions 420. The semantic data model generates a mapping structure from the abstract information model to the specific addresses 220 of the processing module 310. This allows the use of several similar automation systems without the need to specify their specific addresses 220 in the communication adapter 524. Alternatively, the communication adapter 524 uses the semantic data model for generating the addresses 220.
[0051] The modification of the AI model 200 is performed in the engineering framework 400 by adapting the AI function 420. This may be a modification of a block interface, such as adding further sensor inputs or a model architecture of the AI model 200. The engineering framework system 400 detects these changes and the AI function 420 may be adapted, preferably by the user. Steps S10 to S80 are then performed again according to the method of the invention.
[0052] In order to effectively train the AI model 200, the AI framework 540 requires a powerful backend system 500 for its execution, such as an industrial computer environment. On the other hand, the main task of the AI workbench 520 is the extraction / expansion and communication of the AI functions 420, and does not require so much computing power. Therefore, in a further embodiment, the AI workbench 520 can be moved to another less powerful hardware module.
[0053] An example of an AI model 200 is described below.
[0054] The AI Model 200 can handle a simple regression problem:
[0055] y(x) = w * x + b
[0056] The function y(x) describes the output based on the input x and the parameters w and b.
[0057] The corresponding AI function 420 includes functional blocks that can be represented by using ladder diagrams and SCL representations.
[0058] Each AI function block corresponds to an operation in the AI framework. A processed export (eg, a serialized export) of the AI function 420 may be created as described by the following protocol:
[0059]
[0060] .
[0061] By extracting and expanding the inference path 422, it is possible to generate Tensorflow TM The computational graph corresponds to the following Python TM Code:
[0062]
[0063]
[0064]
[0065] .
[0066] In order to continuously communicate with the processing module 310 for providing training data and driving model updates, the interface and calling context of the AI function 420 are evaluated. With this information, the following address 220 can be used in the processing module 310:
[0067] .
[0068] Based on this information, the communication adapter 524 can be automatically configured by specifying the corresponding OPC UA topic. Now, the communication adapter 524 is able to continuously communicate with the communication protocol on the processing module 310 to provide the inputs (x and y) of the AI function 420, transmit them to the AI framework module 540 for model training, and write back the learned model parameters (w and b) for AI model 200 updates.
[0069] The present invention significantly improves the workflow for training and deploying the AI model 200 of the engineering system 300. This leads to faster development, extension, and updating of new model architectures. Further, it enables electrical engineers / PLC programmers to define the AI model 200 using their known environment, so that they do not have to learn the full functionality of the AI framework 540 and the corresponding programming language.
[0070] Furthermore, by automatically configuring the communication adapter 524 between the processing module 310 and the AI framework module 540, the present invention enables efficient online / real-time training and model parameter updating.
[0071] AI functionality 420 is available in the engineering framework working system 400 and contains the definition of the architecture of the AI model 200.
[0072] The AI workbench module 520 automatically extracts the definition of the AI model 200 from the AI function 420 generated by the engineering framework system 400 .
[0073] The communication adapter 524 is part of the AI workbench 520 and is automatically configured based on the interface of the AI function 420 .
[0074] According to the present method and system of the present invention, the AI framework module 540 continuously communicates with the processing module 310. For communication and further monitoring of the generation system 100, a communication adapter 524 using an industrial protocol such as a server supported by the processing module 310 and a gateway to transmit data to the AI framework system 540 is required.
[0075] The method and system of the present invention provide a solution for integrating machine learning (ML) into an engineering framework system 400 such as Siemens' TIA (Totally Integrated Automation) Portal to improve the use of artificial intelligence (AI) methods. This allows the user to efficiently use artificial intelligence methods to generate solutions for his / her automation projects in industry or other sectors.
[0076] By means of the method and system of the present invention, the workflow of the definition and training of the AI model 200 and its deployment on the processing module 310 can be automated by using the open interfaces of the different modules 520, 522, 524, 540, 542, 544 of the generation system 100. Further, it enables customers and users to use the AI function 420 in the known engineering framework system 400 without any further knowledge about the AI framework system 540 to generate the AI function 420. By means of the method and system of the present invention, the AI function 420 can be integrated into the known engineering framework system 400 in a transparent manner.
Claims
1. A computer-implemented method for generating an artificial intelligence (AI) model (200) integrated into a processing module (310) of an engineering system, the method comprising: - determining (S10) an artificial intelligence, AI function (420) in the engineering framework system (400), wherein the artificial intelligence, AI function (420) is a functional block including a definition of the operation of an algorithm for model training; - defining (S20) an inference path (422) for the generation of the AI model (200) starting from the determined AI function (420) by means of a computational graph, wherein the inference path (422) for reaching the AI model (200) is described by means of operational steps or by providing functional blocks corresponding to parameterizable layers or by means of a single functional block representing a complete neural network; - Converting (S30) the AI functions (420) and inference paths (422) into a processing format; - sending and exporting (S40) the converted AI function (420) and the converted inference path (422) to the extraction and extension module (522) of the AI workbench module (520), wherein the extraction and extension module (522) of the AI workbench module (520) has the function of extracting and extending the computational graph architecture of the previously defined inference path (422) through the operation of the algorithm for model training; - deploying (S50) the converted AI function (420) on said processing module (310) of an engineering system and / or another processing device; - transmitting (S60) the extended computation graph of the inference path (422) from the extraction and expansion module (522) to the AI framework module (540); - enabling the communication adapter (524) of the AI workbench module (520) to continuously communicate with the processing module (310) by using a supporting communication protocol (S70) to receive training data as input of the AI function (420) and forward the training data to the AI framework module (540) for training the AI model (200); - Transferring (S80) the learned parameters of the AI model (200) from the API interface (542) of the AI framework module (540) to the communication adapter (524) for updating the AI model (200).
2. The method according to claim 1, wherein the method comprises the step of evaluating, by an extraction and expansion module (522) of an AI workbench module (520), interfaces and context annotations of the AI functions (420) for extracting addresses (220) for storing data and parameters on a processing module (310).
3. The method of claim 2, wherein the address (220) is used to automatically configure a communication adapter (524) for communicating with the processing module (310).
4. The method according to any one of claims 1 to 3, wherein the communication protocol contains a semantic data model of the address (220) of the AI function (420).
5. The method according to any one of claims 1 to 3, wherein the processing module (310) is configured as a programmable logic controller (PLC).
6. The method according to any one of claims 1 to 3, wherein the AI function (420) comprises a description of which parameters and data are required for training the AI function (420).
7. The method of claim 1, wherein the operating step is a convolution.
8. The method of claim 1, wherein the complete neural network is a convolutional neural network.
9. A system (100) for generating an artificial intelligence (AI) model (200) integrated into a processing module (310) of an engineering system, comprising an engineering framework system (400) configured to determine an artificial intelligence (AI) function (420), wherein the artificial intelligence (AI) function (420) is a functional block including a definition of the operation of an algorithm for model training, and is configured to define an inference path (422) for generating an AI model (200) starting from the determined AI function (420) through a computational graph, wherein the inference path (422) for reaching the AI model (200) is described by operational steps or by providing functional blocks corresponding to parameterizable layers or by a single functional block representing a complete neural network, and is configured to convert the AI function (420) and the inference path (422) into a processing format, and export the converted AI function (420) and the converted inference path (422) to an extraction and expansion module (522) of an AI workbench module (520), wherein the extraction and expansion module of the AI workbench module (520) (522) has the function of extracting and extending the computational graph architecture of the previously defined inference path (422) through the operation of the algorithm for model training and is configured to transmit the extended computational graph of the inference path (422) to the AI framework module (540); further includes a processing module (310) of the engineering system and / or another processing device configured to deploy the converted AI function (420); further includes a communication adapter (524) of the AI workbench module (520), which is configured to continuously communicate with the processing module (310) by using a supporting communication protocol to receive training data as input of the AI function (420) and forward the training data to the AI framework module (540) for training the AI model (200); and wherein the AI framework module (540) is configured to use the API interface (542) of the AI framework module (540) to pass the learned parameters of the AI model (200) to the communication adapter (524) for updating the AI model (200).
10. The system (100) according to claim 9, wherein: The extraction and expansion module (522) of the AI workbench module (520) is configured to evaluate the interface and context annotations of the AI function (420) for extracting the address (220) for storing the data and parameters on the processing module (310).
11. The system (100) of claim 10, wherein the extracted address (220) is used to automatically configure a communication adapter (524) for communicating with the processing module (310).
12. The system (100) of claim 10 or 11, wherein the communication protocol comprises a semantic data model of the address of the AI function (420).
13. The system (100) according to claim 10 or 11, wherein: The processing module (310) is configured as a programmable logic controller (PLC).
14. The system (100) of claim 10 or 11, wherein the AI function (420) includes a description of which parameters and data are required to train the AI function (420).
15. The system (100) of claim 9, wherein the operating step is a convolution.
16. The system (100) of claim 9, wherein the complete neural network is a convolutional neural network.
