Prediction system, information processing device, and information processing program
Patent Information
- Application Number
- JP2021103097
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-06-22
- Publication Date
- 2025-03-05
- Estimated Expiration
- 2041-06-22
AI Technical Summary
【0018】 本開示の予測システム、情報処理装置および情報処理プログラムは、予測モデルをより簡易的に評価できる。
Smart Images

Figure 0007639574000001 
Figure 0007639574000002 
Figure 0007639574000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a prediction system that predicts changes occurring in a controlled object, an information processing device that constitutes the prediction system, and an information processing program for realizing the information processing device. [Background technology]
[0002] Controllers used to control the operation of machines and equipment include general-purpose PLCs and program-controlled controllers dedicated to individual machines.
[0003] A PLC is composed of multiple units, such as a CPU (Central Processing Unit) unit that includes a microprocessor that executes a control program, and an IO (Input Output) unit that handles signal input from external switches and sensors and signal output to external relays and actuators. The PLC executes control operations by sending and receiving data between these units via the PLC system bus and / or field network for each control program execution cycle.
[0004] The controller support device is used to create a control program to be executed by the controller and various setting information for the controller, and to transfer them to the controller. The controller support device is configured, for example, by installing the controller support program in a general-purpose computer. The controller support device has, for example, an editor function for creating a source list of the control program, a compiler function for generating an object program that runs on the controller from the source list of the control program, a controller simulator function for test-executing the control program in the controller support device, and a communication function with the controller.
[0005] In the development stage of a control program, it is necessary to know the execution time required for the controller to execute the control program. This execution time of the control program is referred to when determining the period of the execution cycle of the control program. In addition, when determining different execution priorities and execution cycle periods for multiple control programs to be executed by the controller, the execution time of each control program is referred to.
[0006] The controller support device and the controller often have different hardware and operation systems for executing the control program. In addition, the execution code of the control program itself may differ between the simulator and the controller. Therefore, the execution time of the control program executed by the simulator of the controller support device may differ from the execution time of the control program executed by the controller, and various methods have been proposed (see Patent Document 1). [Prior art documents] [Patent documents]
[0007] [Patent Document 1] JP 2012-194669 A Summary of the Invention [Problem to be solved by the invention]
[0008] On the other hand, in the variable prediction model construction method using machine learning for control, the inference execution time varies depending on the input data, so there is a problem that the maximum execution time is unknown. Therefore, with the prediction model placed on the device, it is necessary to repeatedly execute inference and measure the execution time, which makes it time-consuming to evaluate the prediction model.
[0009] The present disclosure provides a method for more simply evaluating a prediction model. [Means for solving the problem]
[0010] A prediction system based on a certain aspect includes a control calculation unit that executes a control calculation for controlling a controlled object, a prediction value acquisition unit that acquires a predicted value by inputting an actual value consisting of one or more state values among state values that the control calculation unit can refer to into a prediction model, a prediction model generation unit that generates a prediction model based on a tree-structured learning algorithm, and a prediction model evaluation unit that evaluates the prediction model. The prediction model evaluation unit includes an execution time acquisition unit that acquires first and second execution times, which are times required to output a predicted value by inputting first and second data into the prediction model, a maximum execution time calculation unit that calculates a maximum execution time of the prediction model based on the first and second execution times acquired by the execution time acquisition unit, and an evaluation unit that evaluates the prediction model based on the calculation result of the maximum execution time calculation unit. With this configuration, the prediction system calculates the maximum execution time of the prediction model and can simply evaluate the prediction model based on the calculation result.
[0011] The maximum execution time calculation unit calculates a unit execution time for a unit processing count based on the difference between the first and second execution times and the difference between the processing count in the first execution time and the processing count in the second execution time, and calculates the maximum execution time based on the maximum processing count and the unit execution time. According to this configuration, the prediction system calculates the maximum execution time based on the difference between the processing counts, the maximum processing count, and the unit execution time. Therefore, the prediction model can be easily evaluated.
[0012] The prediction model executes a plurality of prediction processes for the input data. The maximum execution time calculation unit calculates the number of processing times in the first and second execution times based on the sum of the number of processing times for each of the plurality of prediction processes, and calculates the maximum number of processing times based on the sum of the maximum number of processing times for each of the plurality of prediction processes. According to this configuration, the prediction system calculates the maximum execution time based on the number of processing times for each of the prediction processes and the sum of the maximum number of processing times. Therefore, the prediction model can be easily evaluated.
[0013] The prediction model is generated based on a learning algorithm of a decision tree structure using random forest. With this configuration, it is possible to realize a highly accurate prediction system. The evaluation unit evaluates the prediction model based on a comparison between a predetermined control task period and a maximum execution time. With this configuration, it is possible to simply evaluate the prediction model.
[0014] The prediction model generating unit generates a plurality of prediction models according to the parameter adjustment by the adjusting unit. The prediction model evaluating unit further includes an evaluation result output unit that evaluates each of the plurality of prediction models and outputs evaluation results of the plurality of prediction models. With this configuration, the prediction models can be evaluated simply.
[0015] An information processing device based on a certain aspect is an information processing device connected to a control device, the control device including a control calculation unit that executes a control calculation for controlling a control target, and a predicted value acquisition unit that acquires a predicted value by inputting an actual value consisting of one or more state values among state values that the control calculation unit can refer to into a prediction model. The information processing device includes a prediction model generation unit that generates a prediction model based on a tree-structured learning algorithm, and a prediction model evaluation unit that evaluates the prediction model. The prediction model evaluation unit includes an execution time acquisition unit that acquires first and second execution times, which are times required to output a predicted value by inputting first and second data into the prediction model, respectively, a maximum execution time calculation unit that calculates a maximum execution time of the prediction model based on the first and second execution times acquired by the execution time acquisition unit, and an evaluation unit that evaluates the prediction model based on the calculation result of the maximum execution time calculation unit. With this configuration, the information processing device can calculate the maximum execution time of the prediction model and simply evaluate the prediction model based on the calculation result.
[0016] An information processing program based on a certain aspect is an information processing program executed by a computer connected to a control device, the control device including a control calculation unit that executes a control calculation for controlling a controlled object, and a predicted value acquisition unit that acquires a predicted value by inputting an actual value consisting of one or more state values among state values that the control calculation unit can refer to into a prediction model, and the information processing program causes the computer to execute a step of generating a prediction model based on a tree-structured learning algorithm, and a step of evaluating the prediction model. The step of evaluating the prediction model includes a step of acquiring first and second execution times, which are times required to output a predicted value by inputting first and second data into the prediction model, respectively, a step of calculating a maximum execution time of the prediction model based on the acquired first and second execution times, and a step of evaluating the prediction model based on the calculation result of the maximum execution time. According to this configuration, the information processing program calculates the maximum execution time of the prediction model, and the prediction model can be simply evaluated based on the calculation result.
[0017] In this disclosure, "part" and "apparatus" do not simply mean physical means, but also include a configuration in which the functions of the "part" and "apparatus" are realized by software. Furthermore, the functions of one "part" and "apparatus" may be realized by two or more physical means or devices, or the functions of two or more "parts" and "apparatus" may be realized by one physical means or device. Furthermore, "part" and "apparatus" are concepts that can be rephrased as, for example, "means" and "system." Effect of the Invention
[0018] The prediction system, information processing device, and information processing program disclosed herein can more easily evaluate a prediction model. [Brief description of the drawings]
[0019] [Figure 1] 1 is a schematic diagram showing an example of the overall configuration of a prediction system 1 based on an embodiment. [Diagram 2]FIG. 2 is a schematic diagram showing an application example of the prediction system 1 based on the embodiment. [Diagram 3] FIG. 2 is a diagram illustrating a control system of a prediction system 1 based on an embodiment. [Figure 4] FIG. 2 is a schematic diagram showing an example of control based on a prediction result of a prediction control system by a prediction system 1 based on an embodiment. [Diagram 5] 13 is a flowchart showing a processing procedure for generating a prediction model 140 using the prediction system 1 based on the embodiment. [Figure 6] FIG. 2 is a diagram illustrating a learning method of a prediction model 140 based on an embodiment. [Figure 7] FIG. 2 is a block diagram showing an example of a hardware configuration of a control device 100 constituting a prediction system 1 based on an embodiment. [Figure 8] FIG. 2 is a block diagram showing an example of a hardware configuration of a support device 200 constituting the prediction system 1 based on the embodiment. [Figure 9] FIG. 2 is a block diagram showing an example of the software configuration of a control device 100 and a support device 200 that constitute a prediction system 1 based on an embodiment. [Figure 10] FIG. 10 is a block diagram illustrating an overview of functional modules included in analysis program 226 shown in FIG. 9 based on an embodiment. [Figure 11] FIG. 11 is a diagram illustrating a prediction model evaluation unit that evaluates a prediction model based on an embodiment. [Figure 12] FIG. 2 is a diagram illustrating a structure of a prediction model based on an embodiment. [Figure 13] FIG. 11 is a conceptual diagram illustrating a processing time of a prediction model based on an embodiment. [Figure 14] FIG. 11 is a diagram illustrating the execution time of prediction data of a prediction model based on an embodiment. [Figure 15] 11 is a diagram illustrating a unit execution time with respect to the number of unit processes of a prediction model based on an embodiment. FIG. [Figure 16] FIG. 10 is a diagram illustrating a method for calculating the maximum execution time of a prediction model based on an embodiment. [Figure 17] It is a conceptual diagram for explaining the evaluation of a prediction model based on an embodiment. [Figure 18] It is a diagram for explaining the flow of an evaluation process of a prediction model based on an embodiment. [Figure 19] It is a diagram for explaining an evaluation result screen 500 based on an embodiment. [Figure 20] It is another diagram for explaining an evaluation result screen based on an embodiment. [Figure 21] It is a diagram for explaining details of evaluation results for a plurality of prediction models based on an embodiment.
DETAILED DESCRIPTION OF THE INVENTION
[0020] Embodiments will be described in detail with reference to the drawings. For the same or corresponding parts in the drawings, the same reference numerals are given and their descriptions will not be repeated.
[0021] <A. Application Example> First, an example of a scenario to which this embodiment is applied will be described.
[0022] Main aspects of a control system having a prediction function based on an embodiment will be described. In the following description, mainly, attention will be focused on the prediction function that the control system has, so the entire control system will also be referred to as a "prediction system".
[0023] FIG. 1 is a schematic diagram showing an overall configuration example of a prediction system 1 based on an embodiment. Referring to FIG. 1, a prediction system 1 based on an embodiment includes, as main components, a control device 100 that controls a control target, and a support device 200 connected to the control device 100.
[0024] The control device 100 may be embodied as a type of computer, such as a programmable controller (PLC). The control device 100 may be connected to a field device group 10 via a field bus 2, and may be connected to one or more display devices 400 via a field bus 4. Furthermore, the control device 100 may be connected to an upper server 300 via an upper network 6. Note that the upper server 300 and the display device 400 are optional components and are not essential components of the prediction system 1.
[0025] The control device 100 has a control logic (hereinafter also referred to as a "PLC engine") that executes various calculations for controlling equipment and machines. In addition to the PLC engine, the control device 100 has a collection function that collects data (hereinafter also referred to as "input data") that is measured by the field device group 10 and transferred to the control device 100. Furthermore, the control device 100 also has a prediction function that predicts future changes over time based on the collected input data.
[0026] Specifically, a time series database (hereinafter also referred to as "TSDB (Time Series Data Base)") 130 implemented in the control device 100 provides a collection function, and a prediction model 140 implemented in the control device 100 provides a monitoring function. The TSDB 130 and the prediction model 140 will be described in detail later.
[0027] It is preferable that an industrial communication protocol is adopted for the field bus 2 and the field bus 4. Known examples of such communication protocols include EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), and CompoNet (registered trademark).
[0028] The field devices 10 include devices that collect input data from controlled objects or manufacturing devices and production lines related to the control (hereinafter collectively referred to as "field"). Assumed devices for collecting such input data include input relays and various sensors. The field devices 10 further include devices that perform some kind of action on the field based on commands (hereinafter also referred to as "output data") generated by the control device 100. Assumed devices for performing some kind of action on such a field include output relays, contactors, servo drivers and servo motors, and any other actuators. These field devices 10 exchange data including input data and output data with the control device 100 via the field bus 2.
[0029] In the exemplary configuration shown in FIG. 1, the field device group 10 includes a remote I / O (Input / Output) device 12, a relay group 14, an image sensor 18 and a camera 20, a servo driver 22 and a servo motor 24.
[0030] The remote I / O device 12 includes a communication unit that communicates via the field bus 2, and an input / output unit (hereinafter also referred to as an "I / O unit") for collecting input data and outputting output data. Input data and output data are exchanged between the control device 100 and the field via such an I / O unit. Fig. 1 shows an example in which digital signals are exchanged as input data and output data via a relay group 14.
[0031] The I / O unit may be directly connected to the field bus 2. An example in which the I / O unit 16 is directly connected to the field bus 2 is shown in FIG.
[0032] The image sensor 18 performs image measurement processing such as pattern matching on the image data captured by the camera 20, and transmits the processing results to the control device 100.
[0033] The servo driver 22 drives the servo motor 24 in accordance with output data (eg, a position command) from the control device 100.
[0034] As described above, data is exchanged between the control device 100 and the field device group 10 via the field bus 2, and the exchanged data is updated at very short intervals of the order of several hundred μsec to several tens of msec. Such an update process of the exchanged data is sometimes called an "I / O refresh process."
[0035] In addition, the display device 400, which is connected to the control device 100 via the field bus 4, receives operations from a user, transmits commands to the control device 100 in response to the user operations, and graphically displays the calculation results, etc., of the control device 100.
[0036] The upper server 300 is connected to the control device 100 via an upper network 6, and transmits and receives necessary data between the control device 100 and the upper network 6. A general-purpose protocol such as Ethernet (registered trademark) may be implemented in the upper network 6.
[0037] The support device 200 is an information processing device (an example of a computer) that supports the preparations required for the control device 100 to control a control target. Specifically, the support device 200 provides a development environment (program creation and editing tools, parsers, compilers, etc.) for user programs executed by the control device 100, a setting environment for setting parameters (configurations) for the control device 100 and various devices connected to the control device 100, a function for transmitting the generated user programs to the control device 100, a function for modifying and changing the user programs executed on the control device 100 online, and the like.
[0038] Furthermore, the support device 200 based on the embodiment has a function for supporting the generation and optimization of the prediction model 140 implemented in the control device 100. That is, the support device 200 has a prediction model generation unit that predetermines the prediction model 140. Details of these functions will be described later.
[0039] Next, an application example of the control device 100 included in the prediction system 1 will be described. 2 is a schematic diagram showing an application example of the prediction system 1 based on the embodiment. In FIG. 2, an example of a production facility including a press machine 30 is shown.
[0040] 2, the press machine 30 receives a workpiece 31 and places the received workpiece 31 on a support table 34 provided on a base 33. Then, the workpiece 31 is compressed by a pressing plate 35 provided on the tip of a drive shaft 36 driven by a motor 37, to generate an intermediate product 32.
[0041] In the press machine 30, it is assumed that defects may occur in the intermediate product 32 due to unexpected fluctuations in factors. Therefore, whether or not there is a defect in the intermediate product 32 is judged by an inspection machine arranged downstream of the press machine 30, or by visual inspection or random inspection by an inspector. If it is judged that there is a defect, the target value, etc. will be adjusted each time.
[0042] Thus, in a normal manufacturing process, in order to maintain and improve the yield rate of the intermediate product 32, it is necessary to adjust the target value each time. However, even if the design is done in advance from various perspectives, it is difficult to respond to all fluctuations in factors.
[0043] In response to this, by predicting the state of the intermediate product 32 (i.e., the quality after processing) using the prediction model 140 based on the embodiment, it is possible to correct the control by the control device 100 before a defect actually occurs. By utilizing such advance prediction of the occurrence of unnecessary occurrence, it is possible to reduce the man-hours related to each adjustment of target values, etc., and prevent the occurrence of defects in the intermediate product 32.
[0044] FIG. 3 is a diagram for explaining a control system by the prediction system 1 based on an embodiment. Referring to FIG. 3, the controlled object in this example is a press machine 30. A set value of the device is input to the existing control system to generate a target value. An operation amount for the controlled object is set by feedback control based on the control amount and the target value of the press machine 30. In addition, a prediction control system is provided for the existing control system. Specifically, a predictor is provided that calculates an objective variable for an explanatory variable. An example of the predictor is a prediction model 140. A correction value is calculated by a corrector based on the target value of the quality characteristic of the press machine 30 and the objective variable. The correction value is added to the operation amount.
[0045] FIG. 4 is a schematic diagram showing an example of control based on a prediction result of a prediction control system by prediction system 1 based on the embodiment.
[0046] 4A shows a planned value (command) of the pressing position of the press machine at a certain point in time and an actual pressing position (achieved value) of the press machine 30. The target value indicates the desired thickness of the intermediate product 32 after processing.
[0047] Referring to FIG. 4(B), at a certain point in time, a future pushing position (predicted value) of the press machine 30 is calculated based on information up to that point (which may include actual values), and the operation amount for the press machine 30 is corrected by a correction value based on the calculated predicted value.
[0048] 2 to 4, the pressing position of the press machine 30 is predicted and the control amount is corrected based on the prediction result, so that it is not necessary for an operator to adjust a target value each time in response to, for example, variations in hardness of the workpiece 31. As a result, it is possible to suppress the occurrence of defective products due to unexpected fluctuations in factors, and it is possible to stabilize the quality even if there is some variation in the workpiece 31.
[0049] The data used for prediction (actual values or observed values) and the data to be predicted may be partially or entirely the same, or may be completely different.
[0050] The prediction system 1 according to the embodiment provides a function for appropriately generating the prediction model 140. The function for appropriately generating the prediction model 140 may typically be implemented in the support device 200.
[0051] <B. Overview of Generation and Operation of Prediction Model> Next, an overview of the generation and operation of the prediction model 140 using the prediction system 1 according to the embodiment will be described.
[0052] FIG. 5 is a flowchart showing the processing procedure of the generation process of the prediction model 140 using the prediction system 1 according to the embodiment. Each step shown in FIG. 5 is typically realized by the processor 202 of the support device 200 executing programs (such as the analysis program 226 and the OS 228).
[0053] Referring to FIG. 5, the support device 200 acquires the time-series data of the actual values stored in the TSDB 130 (step S1). Subsequently, the support device 200 receives the setting of the prediction target interval from the acquired time-series data of the actual values (step S2).
[0054] The support device 200 selects learning samples used for generating a prediction model for predicting changes in the prediction target interval set in step S2 (step S3). In step S3, it is selected which of the plurality of types of data is used for learning.
[0055] The support device 200 performs machine learning based on the selected learning samples (step S4).
[0056] The support device 200 generates the prediction model 140 by machine learning (step S6). In this example, the prediction model 140 is configured by a decision tree. The decision tree is configured to output a pressing position (predicted value) for a feature amount at a certain time point. The learning method of this decision tree may be CLS (Concept Learning System), ID3 (Iterative Dichotomiser 3), C4.5, or the like.
[0057] In this specification, a "sample" refers to a data string of a predetermined length of time used as teacher data for a predicted value to be output from the prediction model 140. The "sample" basically uses time series data (raw data) to be predicted, but when the prediction target is a feature extracted from the time series data, the feature may be used. The term "sample" focuses on the processing unit when processing multiple data, and does not particularly limit the contents of the data contained therein.
[0058] In this specification, data referenced to calculate or determine any predicted value is also referred to as "explanatory variables." Any predicted value is calculated or determined using one or more "explanatory variables." Therefore, the training samples are somehow associated with data that can be candidates for "explanatory variables."
[0059] In this specification, the term "feature amount" is a term that includes information contained in the time series data to be processed, and may include, for example, the maximum value, minimum value, median value, average value, standard deviation, variance, etc., of the target time series data. Note that the "feature amount" may also include the target time series data itself.
[0060] FIG. 6 is a diagram for explaining a learning method of the prediction model 140 according to the embodiment. As shown in FIG. 6(A), the time-series data stored in the TSDB 130 is shown. For the time-series data, a prediction target interval is set, and a predicted value, which is a target variable to be predicted, is estimated for the feature amounts at two points in time t and t-1 in the prediction target interval. As shown in FIG. 6(B), a case is shown where learning processing is executed while shifting the time-series data by a unit time.
[0061] By setting the prediction model 140 generated by the above processing procedure in the control device 100, operations as shown in FIGS. 2 to 4 become possible.
[0062] <C. Hardware Configuration Example> Next, a hardware configuration example of the main devices constituting the prediction system 1 according to the embodiment will be described.
[0063] (c1: Hardware Configuration Example of Control Device 100) FIG. 7 is a block diagram showing a hardware configuration example of the control device 100 constituting the prediction system 1 according to the embodiment. Referring to FIG. 7, the control device 100 includes a processor 102 such as a CPU (Central Processing Unit) or an MPU (Micro-Processing Unit), a chipset 104, a main storage device 106, a secondary storage device 108, an upper network controller 110, a USB (Universal Serial Bus) controller 112, a memory card interface 114, an internal bus controller 122, field bus controllers 118, 120, and I / O units 124-1, 124-2,....
[0064] The processor 102 reads out various programs stored in the secondary storage device 108, expands them in the main storage device 106, and executes them to realize the PLC engine 150 and the prediction model 140. The chipset 104 controls data transmission between the processor 102 and each component.
[0065] In addition to a system program for implementing the PLC engine 150, the secondary storage device 108 stores a user program executed using the PLC engine 150. Furthermore, the secondary storage device 108 also stores a program for implementing the prediction model 140.
[0066] The upper network controller 110 controls data exchange with other devices via the upper network 6. The USB controller 112 controls data exchange with the support device 200 via a USB connection.
[0067] The memory card interface 114 is configured so that a memory card 116 can be attached and detached, and is capable of writing data to the memory card 116 and reading various data (user programs, trace data, etc.) from the memory card 116.
[0068] The internal bus controller 122 is an interface for transmitting and receiving data between the I / O units 124-1, 124-2, . . . mounted on the control device 100.
[0069] A fieldbus controller 118 controls the exchange of data with other devices via fieldbus 2. Similarly, a fieldbus controller 120 controls the exchange of data with other devices via fieldbus 4.
[0070] FIG. 7 shows an example of a configuration in which the processor 102 executes a program to provide necessary functions, but some or all of these provided functions may be implemented using a dedicated hardware circuit (e.g., an Application Specific Integrated Circuit (ASIC) or a Field-Programmable Gate Array (FPGA)). Alternatively, the main part of the control device 100 may be realized using hardware based on a general-purpose architecture (e.g., an industrial PC based on a general-purpose PC). In this case, virtualization technology may be used to run multiple OSs (operating systems) with different uses in parallel, and necessary applications may be executed on each OS.
[0071] (c2: Example of hardware configuration of support device 200) The support device 200 according to the embodiment is realized, for example, by executing a program using hardware based on a general-purpose architecture (for example, a general-purpose personal computer).
[0072] Fig. 8 is a block diagram showing an example of a hardware configuration of a support device 200 constituting the prediction system 1 based on the embodiment. With reference to Fig. 8, the support device 200 includes a processor 202 such as a CPU or an MPU, an optical drive 204, a main storage device 206, a secondary storage device 208, a USB controller 212, a higher-level network controller 214, an input unit 216, and a display unit 218. These components are connected via a bus 220.
[0073] The processor 202 reads out various programs stored in the secondary storage device 208, deploys them in the main storage device 206, and executes them to realize various processes including a model generation process, which will be described later.
[0074] The secondary storage device 208 is composed of, for example, a hard disk drive (HDD) or a flash solid state drive (SSD). The secondary storage device 208 typically stores a development program 222 for creating a user program to be executed in the support device 200, debugging the created user program, defining a system configuration, setting various parameters, etc., a PLC interface program 224 for exchanging data related to the prediction function with the control device 100, an analysis program 226 for realizing the generation of the prediction model 140, etc., and an OS 228. The secondary storage device 208 may store necessary programs other than the programs shown in FIG. 8.
[0075] The support device 200 has an optical drive 204, and a computer-readable program stored in a recording medium 205 (e.g., an optical recording medium such as a DVD (Digital Versatile Disc)) is read from the recording medium 205 in which the program is non-transiently stored, and the program is installed in a secondary storage device 208 or the like.
[0076] Various programs executed by the support device 200 may be installed via a computer-readable recording medium 205, or may be installed by downloading from an arbitrary server on a network. In addition, the functions provided by the support device 200 according to the embodiment may be realized by using some of the modules provided by the OS.
[0077] The USB controller 212 controls data exchange with the control device 100 via a USB connection. The host network controller 214 controls data exchange with other devices via any network.
[0078] The input unit 216 is made up of a keyboard, a mouse, etc., and receives user operations. The display unit 218 is made up of a display, various indicators, a printer, etc., and outputs the processing results from the processor 202, etc.
[0079] FIG. 8 shows a configuration example in which the functions necessary for the processor 202 to execute a program are provided. However, some or all of these provided functions may be implemented using a dedicated hardware circuit (for example, an ASIC or an FPGA).
[0080] <D. Software Configuration Example / Functional Configuration Example> Next, a software configuration example and a functional configuration example of the control device 100 and the support device 200 that constitute the prediction system 1 according to the embodiment will be described.
[0081] FIG. 9 is a block diagram showing a software configuration example of the control device 100 and the support device 200 that constitute the prediction system 1 according to the embodiment. Referring to FIG. 9, the control device 100 includes, as main functional configurations, a TSDB 130 and a prediction model 140 in addition to the PLC engine 150.
[0082] The PLC engine 150 sequentially interprets the user program 154 and executes a specified control operation. The PLC engine 150 manages the state values collected from the field in the form of variables 152, and the variables 152 are updated at a predetermined cycle. The PLC engine 150 may be realized by the processor 102 of the control device 100 executing a system program.
[0083] In this specification, the "state value" includes an input value collected from the field, a command value output to the field, and a system state value and an internal value managed inside the control device 100. In the control device 100 according to the embodiment, since the "state value" is referred to in the form of a "variable", in the following description, for convenience, the term "variable" is used in the sense of including the "state value". Note that the technical scope of the present disclosure is not limited to the configuration in which the "state value" is referred to in the form of a "variable".
[0084] The user program 154 includes a predicted value acquisition code 156 , an error estimation code 158 , an additional learning code 160 , a TSDB write code 162 , and a control operation code 164 .
[0085] The predicted value acquisition code 156 realizes a predicted value acquisition unit that acquires a predicted value by inputting actual values consisting of one or more state values among the state values that the control operation code 164 can refer to, to the prediction model 140. More specifically, the predicted value acquisition code 156 includes an instruction to acquire a necessary actual value managed as a variable 152, and input the result value to the prediction model 140 to acquire a predicted value.
[0086] The error evaluation code 158 includes instructions for evaluating the error between the predicted value obtained by the predicted value acquisition code 156 and the target value.
[0087] The additional training code 160 includes instructions for additional training of the predictive model 140, if necessary, depending on the error estimated by the error estimation code 158.
[0088] The TSDB write code 162 obtains predetermined variables from among the variables managed as the variables 152, and writes them into the storage area 132 of the TSDB .
[0089] The control calculation code 164 realizes a control calculation unit that executes a control calculation for controlling a control target. More specifically, the control calculation code 164 executes a control calculation for controlling a control target, and corrects a target value used in the control calculation according to an error evaluated by the error evaluation code 158, as necessary.
[0090] The TSDB 130 has an export module 134 that exports the data written in the storage area 132 to the support device 200 or the like as necessary.
[0091] The predictive model 140 has a reference trajectory 144 . On the other hand, in the support device 200, a development program 222 and an analysis program 226 are installed.
[0092] The development program 222 generates the user program 154 in accordance with user operations, and transfers it to the control device 100. The development program 222 also has a function of appropriately correcting the contents of the control operation code 164.
[0093] The analysis program 226 corresponds to an information processing program for realizing a prediction model generation unit that predetermines the prediction model 140. More specifically, the analysis program 226 supports the generation of the prediction model 140, and includes a model generation module 2262 and an evaluation module 2264.
[0094] The model generation module 2262 realizes the functions required for the process of generating the predictive model 140.
[0095] The evaluation module 2264 evaluates the performance of the target predictive model 140. Fig. 10 is a block diagram showing an outline of functional modules included in analysis program 226 shown in Fig. 9 based on an embodiment. Referring to Fig. 10, analysis program 226 of support device 200 includes, as main functional components, a user interface 230, an input / output management module 236, a screen display module 238, a graph library 240, an analysis module 242, and an analysis library 244.
[0096] The user interface 230 receives settings from the user and executes overall processing for providing various information to the user. As a specific implementation form, the user interface 230 has a script engine 232, reads a setting file 234 including a script describing necessary processing, and executes the set processing.
[0097] The input / output management module 236 includes a file input function for reading data from a specified file or the like, a stream input function for receiving a data stream, and a file output function for outputting a file including generated data or the like.
[0098] The screen display module 238 includes a function for generating a model evaluation screen based on the input prediction model and a function for displaying the evaluation result in response to a user operation. It may be configured to execute necessary processing by referring to the graph library 240.
[0099] The analysis module 242 is a module that realizes the main processing of the analysis program 226 and has a model generation function. Each function included in the analysis module 242 is realized by referring to the analysis library 244.
[0100] The analysis library 244 includes libraries for each function included in the analysis module 242 to execute processing. More specifically, the analysis library 244 may have a statistic function, a decision tree function, a time series regression function, a grid search function, a clustering function, an inference speed evaluation function, an accuracy evaluation function, and an anomaly detection function.
[0101] <E. Evaluation of Prediction Model> FIG. 11 is a diagram for explaining a prediction model evaluation unit that evaluates a prediction model according to an embodiment. Referring to FIG. 11, the prediction model evaluation unit 250 includes a prediction model acquisition unit 251, an execution time acquisition unit 252, a maximum execution time calculation unit 254, and an evaluation unit 256. The prediction model evaluation unit 250 is realized by the evaluation module 2264 as an example.
[0102] The execution time acquisition unit 252 respectively acquires a first execution time and a second execution time, which are the times for outputting prediction values by inputting first and second data to the prediction model.
[0103] The maximum execution time calculation unit 254 calculates the maximum execution time of the prediction model based on the first and second execution times acquired by the execution time acquisition unit 252. The maximum execution time calculation unit 254 calculates the unit execution time in the unit processing count based on the difference between the first and second execution times and the difference between the processing count in the first execution time and the processing count in the second execution time, and calculates the maximum execution time based on the maximum processing count and the unit execution time. The prediction model executes multiple prediction processes for the input data. The maximum execution time calculation unit 254 calculates the processing count in the first and second execution times based on the sum of the processing counts in each of the multiple prediction processes, and calculates the maximum processing count based on the sum of the maximum processing counts in each of the multiple prediction processes. The prediction model is generated based on a learning algorithm of a decision tree structure by random forest, for example.
[0104] The evaluation unit 256 evaluates the prediction model based on the calculation result of the maximum execution time calculation unit 254. The evaluation unit 256 evaluates the prediction model based on a comparison between a predetermined control task period and the maximum execution time.
[0105] Fig. 12 is a diagram for explaining the structure of a prediction model based on an embodiment. Referring to Fig. 12, a prediction model with a decision tree structure using a random forest is shown. In this example, decision trees DT1 to DTN are provided, and a case is shown in which prediction results are obtained respectively and a final prediction result is obtained by majority vote as an example.
[0106] The computation process of the prediction model is a search process that follows links from the root node to the leaf nodes. Specifically, it is determined whether the input data satisfies the branching condition set in the root data, and based on this determination result, the search proceeds to the next applicable node.
[0107] Therefore, the number of processing times differs depending on the structure of the decision tree. In this example, information on the number of processing times and the maximum number of processing times in each decision tree is obtained along with the final prediction result.
[0108] FIG. 13 is a conceptual diagram for explaining the processing time of a prediction model based on an embodiment. Referring to FIG. 13, the processing time of the prediction model in this example has a fixed value and a variable value. Specifically, the variable value is due to the number of times of processing. In this regard, a plurality of processes 1 to N for acquiring prediction data are shown. Furthermore, the number of times of processing in each process and the maximum number of times of processing are acquired. Then, the sum of the number of times of processing in each process is calculated. Furthermore, the sum of the maximum number of times of processing in each process is calculated.
[0109] Fig. 14 is a diagram for explaining the execution time of the prediction data of the prediction model based on the embodiment. Referring to Fig. 14, two prediction data PD1 and PD2 for the prediction model are shown. As shown in the figure, the number of processing times is divided into a fixed part and a variable part. The variable part of the number of processing times is the difference in the execution time of the two data.
[0110] 15 is a diagram illustrating a unit execution time for the number of unit processes of a prediction model based on an embodiment. Referring to FIG 15, a processing time ΔT for one process in a decision tree of a prediction model is shown.
[0111] 16 is a diagram illustrating a calculation method of the maximum execution time of a prediction model based on an embodiment. Referring to FIG. 16, ΔT is calculated based on a difference between an execution time T1 of the prediction data PD1 and an execution time T2 of the prediction data PD2, and a difference between a processing count C1 of the prediction data PD1 and a processing count C2 of the prediction data PD2.
[0112] ΔT=|T1-T2| / |C1-C2| Thus, the maximum execution time B is calculated by the following formula:
[0113] B = T1 + ΔT × (Cmax-C1) FIG. 17 is a conceptual diagram illustrating evaluation of a prediction model based on an embodiment.
[0114] With reference to FIG. 17, it is possible to determine whether the maximum execution time is within the control task period, and if it is within the control task period, to determine that the prediction model is usable.
[0115] FIG. 18 is a diagram illustrating a flow of the process of evaluating a prediction model based on the embodiment.
[0116] 18, the prediction model acquiring unit 251 acquires a prediction model (step S10). Next, the execution time acquiring unit 252 acquires a first execution time T1 resulting from input of the first data for the acquired prediction model (step S12).
[0117] Next, the execution time acquisition unit 252 acquires a second execution time T2 resulting from inputting the second data for the acquired prediction model (step S14).
[0118] Next, the maximum execution time calculation unit 254 calculates the difference in the number of times of processing (step S16). The maximum execution time calculation unit 254 calculates the difference |C1-C2| between the number of times of processing the predicted data PD1 obtained by inputting the first data and the number of times of processing the predicted data PD2 obtained by inputting the second data.
[0119] Next, the maximum execution time calculation unit 254 calculates the unit processing time ΔT based on the number of unit processing times (step S18). The maximum execution time calculation unit 254 calculates the difference |C1-C2| between the number of times of processing of the predicted data PD1 obtained by inputting the first data and the number of times of processing of the predicted data PD2 obtained by inputting the second data. In addition, the maximum number of operations Cmax of processing times of the prediction model is acquired. The maximum execution time calculation unit 254 calculates the unit processing time ΔT based on the number of unit processing times based on the difference between the execution time T1 of the predicted data PD1 and the execution time T2 of the predicted data PD2, and the difference between the number of times of processing C1 of the predicted data PD1 and the number of times of processing C2 of the predicted data PD2.
[0120] Next, the maximum execution time calculation unit 254 calculates the maximum execution time (step S20). The maximum execution time calculation unit 254 calculates the maximum execution time B (B=T1+ΔT×(Cmax−C1)).
[0121] Next, the evaluation unit 256 judges whether the maximum execution time is within the control task period (step S22). The evaluation unit 256 judges whether the calculated maximum execution time B is within the control task period. The control task period can be set to any value by the system.
[0122] In step S22, when the evaluation unit 256 determines that the maximum execution time is within the control task period (YES in step S22), it determines that the determination is OK (step S24).
[0123] On the other hand, in step S22, when the evaluation unit 256 determines that the maximum execution time is not within the control task period (NO in step S22), it makes an NG determination (step S26).
[0124] Then, the process ends (END). In this example, an evaluation result screen is output based on the evaluation result of the evaluation unit 256. Specifically, the screen display module 238 is executed to output the evaluation result screen.
[0125] FIG. 19 is a diagram illustrating evaluation result screen 500 based on the embodiment. Referring to FIG. 19, evaluation result screen 500 shows tabs relating to model evaluation.
[0126] In this example, a graph 502 is displayed regarding the execution time of a prediction model M1 that satisfies the condition of a control task period of 1 ms. Data of other prediction models M2 to M4 are also shown.
[0127] Specifically, the graph 502 shows a control program time of 0.7 ms, a system service time of 0.15 ms, a maximum execution time of 0.08 ms, and a free time of 0.07 ms.
[0128] The maximum execution time is calculated by the maximum execution time calculation unit 254 described above. The control program time and the system service time are fixed and determined.
[0129] In this example, by calculating the maximum execution time, available time is secured, and therefore a message 504 "Inference can be executed within the control task period" is displayed.
[0130] In addition, an adjustment input field 510 is provided, which has an item for inputting a file as input data, an item for setting hyperparameters, an item for inputting inference accuracy as a target value, and an item for inputting a control task period as a PLC setting.
[0131] The adjustment input field 510 is provided so that a prediction model can be constructed or reconstructed based on the data entered in the adjustment input field 510 .
[0132] The tree depth and the number of trees relate to the settings of the tree structure of, for example, a random forest.
[0133] FIG. 20 is another diagram illustrating the evaluation result screen based on the embodiment. Referring to FIG. 20, evaluation result screen 520 shows tabs relating to model evaluation.
[0134] In this example, a graph 522 is displayed regarding the execution time of the prediction model M5 that satisfies the condition of a control task period of 1 ms. Data of the other prediction models M6 to M8 are also displayed.
[0135] Specifically, graph 522 shows a control program time of 0.7 ms, a system service time of 0.15 ms, and a maximum execution time of 0.2 ms.
[0136] The maximum execution time is calculated by the maximum execution time calculation unit 254 described above. The control program time and the system service time are fixed and determined.
[0137] In this example, by calculating the maximum execution time, no free time is secured, so the message 524 "The control task period will be exceeded. Please change the settings and perform parameter tuning." is displayed.
[0138] In addition, an adjustment input field 530 is provided, which has an item for inputting a file as input data, an item for setting hyperparameters, an item for inputting inference accuracy as a target value, and an item for inputting a control task period as a PLC setting.
[0139] The adjustment input field 530 is provided so that a prediction model can be constructed or reconstructed based on the data entered in the adjustment input field 530.
[0140] The tree depth and the number of trees are related to the settings of the tree structure of, for example, a random forest. By adjusting the tree depth and the number of trees, the maximum execution time of the prediction model is adjusted so that the total time falls within the control task period.
[0141] FIG. 21 is a diagram illustrating details of evaluation results for a plurality of prediction models based on the embodiment.
[0142] Referring to FIG. 21, evaluation results are shown for prediction models M10 to M16.
[0143] The fit rate and maximum execution time for each predictive model are shown in tabular form. By checking the list of the evaluation results, the user can select a suitable prediction model. Specifically, the user may choose the prediction model with the shortest maximum execution time, or may prioritize the Fit rate and select the prediction model with the maximum Fit rate. Alternatively, since the data sizes of the prediction models also vary, the user may choose the prediction model with the smallest data size. Or, the user may choose a prediction model based on other parameters.
[0144] By this method, it is possible to select the optimal prediction model for the prediction system by displaying a list of the evaluation results for evaluating the prediction models.
[0145] In the above, the case of generating a prediction model based on a learning algorithm of a tree structure mainly represented by a decision tree has been described. However, the present invention is not limited to the decision tree, and can be similarly applied to a prediction model using other learning algorithms as long as it is a tree structure.
[0146] <F. Supplementary Note> The present embodiment as described above includes the following technical ideas.
[0147] [Configuration 1] The prediction system (1) includes a control operation unit (164) that executes a control operation for controlling a control target, a prediction value acquisition unit (156) that acquires a prediction value by inputting an actual value composed of one or more state values among the state values that can be referred to by the control operation unit to a prediction model, a prediction model generation unit (2262) that generates a prediction model based on a learning algorithm of a tree structure, and a prediction model evaluation unit (2264, 250) that evaluates the prediction model. The prediction model evaluation unit includes an execution time acquisition unit (252) that respectively acquires a first execution time and a second execution time, which are times for outputting a prediction value by inputting first and second data to the prediction model, a maximum execution time calculation unit (254) that calculates the maximum execution time of the prediction model based on the first and second execution times acquired by the execution time acquisition unit, and an evaluation unit (256) that evaluates the prediction model based on the calculation result of the maximum execution time calculation unit.
[0148] [Configuration 2] The maximum execution time calculation unit calculates a unit execution time for a unit number of processing operations based on a difference between the first and second execution times and a difference between the number of processing operations in the first execution time and the number of processing operations in the second execution time, and calculates a maximum execution time based on the maximum number of processing operations and the unit execution time.
[0149] [Configuration 3] The prediction model executes a plurality of prediction processes for the input data. The maximum execution time calculation unit calculates the number of times of processing in the first and second execution times based on the sum of the number of times of processing in each of the plurality of prediction processes, and calculates the maximum number of times of processing based on the sum of the maximum number of times of processing in each of the plurality of prediction processes.
[0150] [Configuration 4] The predictive model is generated based on a random forest decision tree structure learning algorithm.
[0151] [Configuration 5] The prediction model generating unit generates a plurality of prediction models according to the adjustment of the parameters by the adjusting unit. The prediction model evaluating unit further includes an evaluation result output unit that evaluates each of the plurality of prediction models and outputs evaluation results of the plurality of prediction models.
[0152] [Configuration 6] The information processing device (200) is an information processing device connected to the control device (100). The control device includes a control arithmetic unit (164) that executes a control arithmetic operation for controlling a control target, and a prediction value acquisition unit (156) that acquires a prediction value by inputting an actual value composed of one or more state values among the state values that can be referred to by the control arithmetic unit into a prediction model. The information processing device includes a prediction model generation unit (2262) that generates a prediction model based on a tree-structured learning algorithm, and a prediction model evaluation unit (2264, 250) that evaluates the prediction model. The prediction model evaluation unit includes an execution time acquisition unit (252) that respectively acquires first and second execution times, which are times for outputting prediction values by inputting first and second data to the prediction model, a maximum execution time calculation unit (254) that calculates the maximum execution time of the prediction model based on the first and second execution times acquired by the execution time acquisition unit, and an evaluation unit (256) that evaluates the prediction model based on the calculation result of the maximum execution time calculation unit.
[0153] [Configuration 7] The information processing program is an information processing program executed by a computer connected to the control device (100). The control device includes a control arithmetic unit (164) that executes a control arithmetic operation for controlling a control target, and a prediction value acquisition unit (156) that acquires a prediction value by inputting an actual value composed of one or more state values among the state values that can be referred to by the control arithmetic unit into a prediction model. The information processing program causes the computer to execute a step of generating a prediction model based on a tree-structured learning algorithm and a step of evaluating the prediction model. The step of evaluating the prediction model includes steps (S12, S14) of respectively acquiring first and second execution times, which are times for outputting prediction values by inputting first and second data to the prediction model, a step (S20) of calculating the maximum execution time of the prediction model based on the acquired first and second execution times, and steps (S24, S26) of evaluating the prediction model based on the calculation result of the maximum execution time.
[0154] <G. Advantage> In the prediction system based on the embodiment, a prediction model can be easily evaluated, so that a prediction model suitable for actual operation can be easily generated.
[0155] The embodiments disclosed herein should be considered to be illustrative and not restrictive in all respects. The scope of the present disclosure is defined by the claims, not the above description, and is intended to include all modifications within the meaning and scope of the claims. [Explanation of symbols]
[0156] 1 prediction system, 2, 4 field bus, 6 upper network, 10 field device group, 14 relay group, 100 control device, 102, 202 processor, 104 chip set, 106, 206 main memory, 108, 208 secondary memory, 110, 214 upper network controller, 112, 212 controller, 114 memory card interface, 116 memory card, 118, 120 field bus controller, 122 internal bus controller, 132 storage area, 134 export module, 140 prediction model, 144 reference trajectory, 150 engine, 152 variables, 154 user program, 156 predicted value acquisition code, 158 error evaluation code, 160 additional learning code, 162 write code, 164 control operation code, 200 support device, 204 optical drive, 205 recording medium, 216 input section, 218 Display unit, 220 bus, 222 development program, 224 interface program, 226 analysis program, 230 user interface, 232 script engine, 234 configuration file, 236 input / output management module, 238 screen display module, 240 graph library, 242 analysis module, 244 analysis library, 250 prediction model evaluation unit, 300 upper server, 2262 model generation module, 2264 evaluation module.
Claims
1. a control calculation unit that executes a control calculation for controlling a control target; a prediction value acquisition unit that acquires a prediction value by inputting an actual value consisting of one or more state values among state values that the control calculation unit can refer to into a prediction model; a prediction model generation unit that generates the prediction model based on a tree-structured learning algorithm; A prediction model evaluation unit that evaluates the prediction model, The prediction model evaluation unit is an execution time acquisition unit that acquires first and second execution times, which are times required to output the predicted value by inputting first and second data to the prediction model; a maximum execution time calculation unit that calculates a maximum execution time of the prediction model based on the first and second execution times acquired by the execution time acquisition unit; an evaluation unit that evaluates the prediction model based on a calculation result of the maximum execution time calculation unit, the maximum execution time calculation unit calculates a unit execution time for a unit number of processing operations based on a difference between the first and second execution times and a difference between a number of processing operations in the first execution time and a number of processing operations in the second execution time, and calculates the maximum execution time based on a maximum number of processing operations and the unit execution time.
2. The predictive model performs a plurality of prediction processes on input data, The maximum execution time calculation unit calculating a number of times of processing in the first and second execution times based on a sum of the number of times of processing in each of the plurality of prediction processes; The prediction system according to claim 1 , wherein the maximum number of times of processing is calculated based on a sum of maximum numbers of times of processing in each of the plurality of prediction processes.
3. A prediction system as described in claim 1, wherein the predictive model is generated based on a learning algorithm of a decision tree structure using random forest.
4. A prediction system as described in claim 1, wherein the evaluation unit evaluates the prediction model based on a comparison between a predetermined control task period and the maximum execution time.
5. Further comprising an adjustment unit capable of adjusting parameters of the prediction model, the prediction model generation unit generates a plurality of the prediction models in accordance with the adjustment of parameters by the adjustment unit; The prediction model evaluation unit evaluates each of the plurality of prediction models, The prediction system according to claim 1 , further comprising an evaluation result output unit that outputs evaluation results of the plurality of prediction models.
6. An information processing device connected to a control device, The control device includes a control calculation unit that executes a control calculation for controlling a control target, and a prediction value acquisition unit that acquires a prediction value by inputting an actual value consisting of one or more state values among state values that the control calculation unit can refer to into a prediction model, The information processing device includes: a prediction model generation unit that generates the prediction model based on a tree-structured learning algorithm; a prediction model evaluation unit for evaluating the prediction model, The prediction model evaluation unit is an execution time acquisition unit that acquires first and second execution times, which are times required to output the predicted value by inputting first and second data to the prediction model; a maximum execution time calculation unit that calculates a maximum execution time of the prediction model based on the first and second execution times acquired by the execution time acquisition unit; an evaluation unit that evaluates the prediction model based on a calculation result of the maximum execution time calculation unit, the maximum execution time calculation unit calculates a unit execution time for a unit number of processing operations based on a difference between the first and second execution times and a difference between a number of processing operations in the first execution time and a number of processing operations in the second execution time, and calculates the maximum execution time based on a maximum number of processing operations and the unit execution time.
7. An information processing program executed by a computer connected to a control device, the control device including: a control calculation unit that executes control calculations for controlling a control target; and a predicted value acquisition unit that acquires a predicted value by inputting an actual value consisting of one or more state values among state values that the control calculation unit can refer to into a prediction model; The information processing program is configured to: generating the predictive model based on a tree-structured learning algorithm; and evaluating the predictive model; The step of evaluating the predictive model includes: acquiring first and second execution times, which are times required to output the predicted value by inputting first and second data to the prediction model, respectively; calculating a maximum execution time of the prediction model based on the first and second execution times; evaluating the prediction model based on the calculated maximum execution time; an information processing program, the step of calculating the maximum execution time includes calculating a unit execution time for a unit number of processing operations based on a difference between the first and second execution times and a difference between a number of processing operations in the first execution time and a number of processing operations in the second execution time, and calculating the maximum execution time based on a maximum number of processing operations and the unit execution time.
Citation Information
Patent Citations
Controller support device, controller support program to be executed in controller support device, recording medium storing controller support program, and method for estimating execution duration of control program
JP2012194669A
Prediction model creating device, production facility monitoring system, and production facility monitoring method
JP2018116545A
Control unit, control method, and control program
JP2019179468A
Prediction model creating device, prediction model creating method and computer program
JP2020102082A
Predictive control developing apparatus, predictive control developing method, and predictive control developing program
JP2020135758A