Control system and monitoring method

By integrating a measurement function into the OS to measure time intervals and identify task jitter and cycle time values, the control system can effectively determine deadline errors, addressing the limitations of existing systems in real-time performance monitoring.

JP7660478B2Active Publication Date: 2025-04-11HITACHI IND EQUIP SYST CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2021156308
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-09-27
Publication Date
2025-04-11
Estimated Expiration
2041-09-27

AI Technical Summary

Technical Problem

Existing control systems lack the capability to determine whether a deadline error has occurred for tasks executed by an OS that does not know the cycle time.

Method used

The implementation of an OS with a measurement function that measures time intervals between designated events, including an interface unit to acquire operation log data and an output unit to identify task jitter and cycle time values, allowing for the determination of deadline errors.

Benefits of technology

Enables the determination of deadline errors for tasks executed per control cycle, even when the OS is unaware of the cycle time, thereby improving real-time performance monitoring in control systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007660478000001
    Figure 0007660478000001
  • Figure 0007660478000002
    Figure 0007660478000002
  • Figure 0007660478000003
    Figure 0007660478000003
Patent Text Reader

Abstract

To determine whether deadline mistake has occurred or not on a task that is executed in each control cycle.SOLUTION: An OS is adopted which has a measurement function for measuring intervals of occurrence time between designated events. In the OS, (X) an ideal start event indicating that execution of a task should be started and an actual start event indicating that the execution of the task has been actually started, and (Y) the actual start event of the task and a completion event indicating that the execution of the task has been completed are designated. Operation log data to be acquired from the OS based on trace data of the task includes first interval of occurrence time between events in (X), and second interval of occurrence time between events in (Y). For the task, an output is provided based on a value of control cycle, a value of the first interval as a task jitter, and a value of the second interval as a cycle time.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates generally to monitoring in control systems. [Background technology]

[0002] A control system for controlling a controlled device (especially a control system for controlling an industrial device) requires real-time performance. Patent Document 1 discloses monitoring the execution status of a second program that has a lower execution priority than a first program that is repeatedly executed at a fixed cycle. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2020-61055 A Summary of the Invention [Problem to be solved by the invention]

[0004] In terms of real-time performance, it is important that a task executed in each control cycle for controlling a controlled device is completed within that control cycle. When a task is not completed within a control cycle, this is called a "deadline miss."

[0005] Although a task is executed by an OS, the OS cannot determine whether a deadline miss has occurred for that task, because the OS usually does not know the cycle time for that task.

[0006] Thus, Patent Document 1 neither discloses nor suggests a technique for making it possible to determine whether or not a deadline miss has occurred for a task executed by an OS that does not know the cycle time. [Means for solving the problem]

[0007] The OS of the control system is an OS having a measurement function for measuring the time interval between the occurrence times of specified events, and is equipped with an interface unit and an output unit. The interface unit provides the OS with the following (X) and (Y) as events that constitute the time interval to be measured: (X) an ideal start event, which means that a task should start executing, and an actual start event, which means that the task has actually started executing; (Y) the actual start event of the task and a completion event that signifies that the task has been completed; The interface unit acquires from the OS operation log data, which is data based on trace data of a target control task, which is a task of one or more control programs executed on the OS. The operation log data of the target control task includes a first time interval value of an occurrence time between events (X) and a second time interval value of an occurrence time between events (Y). The output unit specifies, for the target control task, the value of the first time interval as a task jitter value and the value of the second time interval as a cycle time value based on the operation log data, and performs output based on the value of a control cycle, which is the cycle of an ideal start event of the target control task, the specified task jitter value, and the specified cycle time value. Effect of the Invention

[0008] According to the present invention, it is possible to determine whether or not a deadline miss has occurred for a task executed in each control cycle. [Brief description of the drawings]

[0009] [Figure 1] 1 illustrates an example of a physical configuration of a system including a control system according to an embodiment. [Diagram 2] 2 shows an example of a logical configuration of a control system. [Diagram 3]1 shows configuration examples of a VCPU management table, a task management table, a histogram data table, and an RT performance table. [Figure 4] 2 shows an example of the relationship between the control cycle, task jitter, and cycle time. [Diagram 5] 13 shows an example of the flow of an OS setting process. [Figure 6] 13 shows an example of the flow of a monitoring output process. [Figure 7] An example of the RT performance screen configuration is shown below. [Figure 8] 13 shows another example of the relationship between the control cycle, task jitter, and cycle time. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] In the following description, an "interface apparatus" may refer to one or more interface devices, which may be one or more homogeneous communication interface devices or two or more heterogeneous communication interface devices.

[0011] In the following description, a "memory" refers to one or more memory devices, typically a primary storage device. At least one of the memory devices in the memory may be a volatile memory device or a non-volatile memory device.

[0012] In the following description, a "persistent storage device" refers to one or more persistent storage devices. A persistent storage device is typically a non-volatile storage device (e.g., an auxiliary storage device), and specifically, for example, a hard disk drive (HDD) or a solid state drive (SSD).

[0013] Also, in the following description, "storage device" may be at least memory, including memory and persistent storage device.

[0014] Furthermore, in the following description, a "processor" may be one or more processor devices. The at least one processor device may typically be a microprocessor device such as a CPU (Central Processing Unit), but may also be other types of processor devices such as a GPU (Graphics Processing Unit). The at least one processor device may be a single-core or multi-core. The at least one processor device may be a processor core. The at least one processor device may also be a processor device in the broad sense, such as a hardware circuit (e.g., an FPGA (Field-Programmable Gate Array), a CPLD (Complex Programmable Logic Device), or an ASIC (Application Specific Integrated Circuit)) that performs part or all of the processing.

[0015] In addition, in the following description, the processing may be described with a "program" as the subject, but since the program is executed by a processor to perform a defined process using a storage device and / or an interface device, etc. as appropriate, the subject of the processing may be the processor (or a device such as a controller having the processor). The program may be installed in a device such as a computer from a program source. The program source may be, for example, a program distribution server or a computer-readable (e.g., non-transitory) recording medium. In the following description, two or more programs may be realized as one program, or one program may be realized as two or more programs.

[0016] In addition, in the following description, functions may be described using the expression "yyy unit", but the functions may be realized by one or more computer programs being executed by a processor. When a function is realized by a program being executed by a processor, the function may be at least a part of the processor, since the defined processing is performed using a storage device and / or an interface device, etc., as appropriate. Processing described with a function as the subject may be processing performed by a processor or a device having that processor. The description of each function is an example, and multiple functions may be combined into one function, or one function may be divided into multiple functions.

[0017] In the following description, information that provides an output for an input may be described using expressions such as "xxx table," but the information may be data of any structure (for example, structured data or unstructured data), or may be a neural network that generates an output for an input, or a learning model such as a genetic algorithm or random forest. Therefore, the "xxx table" may be referred to as "xxx information." In the following description, the configuration of each table is an example, and one table may be divided into two or more tables, or all or part of two or more tables may be one table.

[0018] In addition, in the following description, an ID, a name, or a number is used as an example of identification information, but the identification information may include other types of elements instead of or in addition to at least one of the ID, name, and number.

[0019] In addition, in the following description, when describing elements of the same type without distinguishing between them, common reference symbols will be used, and when describing elements of the same type with distinction between them, reference symbols will be used.

[0020] In the following description, an example of a control program is a control app, and an example of an information program is an information app. "App" is an abbreviation for application program, and is an example of a computer program.

[0021] FIG. 1 shows an example of a physical configuration of a system including a control system according to an embodiment.

[0022] A control system 109 is installed in a factory 10 in which a controlled device 12 is located. The controlled device 12 is, for example, an industrial device such as an industrial motor or compressor. The factory 10 is an example of a site in which the controlled device 12 is located.

[0023] The management system 101 and the control system 109 are connected to a communication network 108 (e.g., the Internet or a Wide Area Network (WAN)). The control system 109 is connected to, for example, a communication network 19 (e.g., a Local Area Network (LAN)) in the factory 10. The control system 109 can communicate with the management system 101 via the communication networks 19 and 108. The communication networks 108 and 19 are examples of communication networks used when an information communication process is performed by an information application (communication process different from the control process performed by a control application).

[0024] The control system 109 and one or more I / O modules 119 (an example of an I / O port) are connected to a communication network 118 (e.g., Ethernet (registered trademark)). The communication network 118 is an example of a communication network used to transmit control data to the control target device 12 in the control process performed by the control application.

[0025] The communication networks 19, 108, and 118 may be different networks, or two or more of the communication networks 19, 108, and 118 may be the same network.

[0026] One or more peripheral devices 120 are connected to one or more I / O modules 119. The peripheral devices 120 may be devices such as sensors or media drives (e.g., HDDs or SSDs). The I / O modules 119 function as bus slots to which the peripheral devices 120 are detachably attached as necessary. The control target device 12 is connected to the I / O modules 119 via or without the peripheral devices 120. The control target device 12 and the I / O modules 119 may be connected in any of 1:1, 1:multiple, multiple:1, and multiple:multiple. Some of the I / O modules 119 may be connected to the communication network 108 in addition to the communication network 118, that is, the some of the I / O modules 119 may be devices shared by the control application and the information application. At least one I / O module 119 may be at least a part of the network I / F device and I / O control device of at least one computing device 40.

[0027] The management system 101 is an example of a host system of the control system 109. The management system 101 includes an EPROM 201, a CPU 202, a main memory 203, a peripheral control device 205, a non-volatile storage device 206, and a network I / F device 207. The management system 101 is connected to a communication network 108 via the network I / F device 207.

[0028] The control system 109 includes one or more arithmetic devices 40. Each arithmetic device 40 includes an interface device, a storage device, and a processor connected to the interface device, a storage device, and the ...

[0029] The system configuration of the control system 109 differs depending on whether the extension device 40E is present, what type of communication medium the extension device 40E is connected to, and in which computing device 40 an information application that communicates with the control application is placed. In other words, the system configuration depends on the presence or absence of the extension device 40E, the type of communication medium to which each of the control device 40M and the extension device 40E is connected, and the computing device 40 to which each application is placed. In the example of FIG. 1, the extension device 40E1 is connected to the communication network 118. The extension device 40E2 is connected to a PIO bus 28 (an example of a bus) ("PIO" is an abbreviation for Programmed I / O). The PIO bus 28 may be a bus printed on a baseboard, and by connecting the control device 40M and the extension device 40E2 to the baseboard, the control application executed in the control device 40M and the information application executed in the extension device 40E2 may communicate (share) data via the PIO bus 28.

[0030] In addition, in an embodiment in which the control application can also be placed on the expansion device 40E, or in an embodiment in which any of the computing devices 40 can be expanded or reduced and any of the computing devices 40 can be a destination for the control application, the system configuration also depends on the control application.

[0031] As described above, the control system 109 includes at least one control device 40M. The control device 40M is a computing device in which at least one control application is arranged. The role of the control device 40M is to control the control target device 12 without delay by periodically executing the control application.

[0032] The control application periodically performs a scan process. The "scan process" may include reading information of a device connected to an I / O (Input / Output) port, calculating the read information, and writing the calculated information. The scan process may be an example of a control process.

[0033] Taking the control device 40M as an example, the hardware configuration of the arithmetic device 40 is described as follows. That is, the control device 40M includes a memory 169 (e.g., an EPROM 208 and a main memory 210), a peripheral control device 212, an I / O control device 214, a non-volatile storage device 215, a network I / F device 213, and a CPU 209 connected thereto. The I / O control device 214 and the network I / F device 213 are examples of interface devices. The memory 169 and the non-volatile storage device 215 are examples of storage devices. The CPU 209 is an example of a processor.

[0034] The peripheral control device 212 is connected to a network I / F device 213, an I / O control device 214, a non-volatile storage device 215, and a bus 211. The bus 211 is also connected to the memory 169 and the CPU 209.

[0035] At least one of the control application and the information application may be stored in advance in the EPROM 208, or a program downloaded from a program source such as a program distribution server (not shown) may be stored in the EPROM 208. The control system 109 may be equipped with not only one control application and one information application, but also multiple control applications and / or multiple information applications by setting resources that the control system 109 can use for each program.

[0036] The CPU 209 reads out the control application (and information application) stored in the EPROM 208 into the main memory 210 and executes it to control the operation of the control application (and information application). For example, the CPU 209 executes the control application to control a plurality of peripheral devices 120 via the peripheral control device 212, the I / O control device 214, and a plurality of I / O modules 119. The peripheral devices 120 may be associated with the I / O modules 119 on a one-to-one basis. The CPU 209 may be either a single-core or a multi-core. One core may execute at least one of one or more control applications and one or more information applications. Typically, one core may execute one control application, one control application and one or more information applications, or one or more information applications.

[0037] The setting terminal 29 is connected to the control system 109 (e.g., the control device 40M) via the communication network 19 (or without via the communication network 19). The setting terminal 29 is, for example, a computer (e.g., a desktop, laptop, or tablet personal computer, or a smartphone) having an input device, a display device, an interface device, a storage device, and a processor connected thereto. The setting terminal 29 may issue instructions to and set the control system 109. The setting terminal 29 may be a part of the management system 101. The setting terminal 29 may also be a remote computer (e.g., connected to the Internet) as a client terminal of the control system 109.

[0038] FIG. 2 shows an example of a logical configuration of the control system 109.

[0039] FIG. 2 illustrates the control device 40M and the expansion device 40E2 of the control system 109.

[0040] The control device 40M has a shared memory 56. The shared memory 56 is at least a part of the storage area of ​​the memory 169. Although not shown, a shared memory may also exist in at least one of the extension devices 40E.

[0041] The extension device 40E2 is a computing device connected to a communication network 118 to which the control device 40M is connected. The communication medium between the control device 40M and the extension device 40E2 is the communication network 118. The network I / F device 213A of the control device 40M and the network I / F device 213B of the extension device 40E2 are connected to the communication network 118.

[0042] The control device 40M executes a WEB server 69. The WEB server 69 is a program for functioning as a WEB server. The WEB server 69 communicates with at least one of the management system 101 and the setting terminal 29. For example, the WEB server 69 is an example of a user interface program that accepts various instructions and settings from the setting terminal 29. The WEB server 69 may be executed by at least one extension device 40E instead of or in addition to the control device 40M.

[0043] The non-volatile storage device 206 (an example of a storage device) of the management system 101 stores VCPU management information 73. The VCPU management information 73 includes, for example, a VCPU image and a VCPU ID for each VCPU. "VCPU" means a virtual CPU and is an example of an application execution environment. The VCPU may be, for example, a VM (virtual machine) or a container.

[0044] The management system 101 includes a distribution unit 72. The distribution unit 72 distributes a VCPU image to the arithmetic device 40 via the communication network 108. In the arithmetic device 40, a VCPU 37 is generated based on the VCPU image. The VCPU 37 executes one or more applications (in this embodiment, either a control application 41 or an information application 42). After the VCPU 37 is realized, an application may be distributed to the VCPU 37 by the distribution unit 72, or the VCPU image may include an image of an application, and a VCPU including the application may be realized based on the VCPU image. In the example shown in FIG. 2, the VCPUs 37A and 37B are distributed to the control device 40M, and the VCPU 37C is distributed to the extension device 40E2. The VCPU 37A executes the control application 41. The VCPU 37B executes the information application 42A. The VCPU 37C executes the information application 42B.

[0045] The information application 42 is an application that performs information processing defined in the information application 42 .

[0046] The control application 41 performs a scan process, which is a process for controlling the control target device 12 and a process having real-time characteristics, at each cycle time determined for the control application 41.

[0047] In each computing device 40, an OS 37 having a measurement function described below is adopted as an OS (Operating System). The OS 37 may be adopted in the computing device 40 in which the control application 41 may be arranged. Communication via the communication network 118 and input / output to the shared memory 56 may be performed via the OS 37. The execution timing of the control application 41 and the information application 42 may be controlled by the OS 37 (or runtime software). The OS 37 may be a real-time general-purpose OS (an OS that is a type of general-purpose OS for information processing but has a real-time function that can provide the required real-time performance).

[0048] The manager 44 is executed on the OS 37. The manager 44 is an example of an element outside the kernel of the OS 37. The manager 44 may be included in the OS 37. The manager 44 may set the VCPU management table 91 and the task management table 92. For example, the manager 44 receives the program name of the execution program (the program executed in the VCPU 37) together with the VCPU 37 from, for example, the setting terminal 29, and records information such as the VCPU name 301 and the program name 302 in the VCPU management table 91 as illustrated in FIG. 3. The VCPU name 301 indicates the name of the VCUP, and the program name 302 indicates the name of the execution program. In addition, for example, when the VCPU 37 is started, the manager 44 obtains the task IDs of the parent task (the task executed first) and the child task (the task executed after the parent task) of the execution program of the VCPU 37, and records information such as the task name 311, the attribute 312, and the task ID 313 for each task in the task management table 92. Task management table 92 may be prepared for each program executed by VCPU 37, and may be associated with VCPU 37 (or the program). Task name 311 indicates the name of the task, attribute 312 indicates, for example, whether it is a parent task or a child task, and task ID 313 indicates the ID of the task. For example, a process or kernel thread realized by OS 37 may be used as a method of implementing a task. For simplicity of explanation, hereinafter, a task and a process or thread correspond one-to-one, and will be referred to as a "task" regardless of the implementation method.

[0049] The OS 37 (and the manager 44) identifies the relationship between the VCPU 37, programs, and tasks based on the VCPU management table 91 and the task management table 92. The VCPU management table 91 and the task management table 92 are stored in the memory 169 or the non-volatile storage device 215, for example.

[0050] The OS 37 records the history data 81 in a storage device (for example, the memory 169). Each time an event occurs for a task, an operation detail entry (data representing details regarding the operation of the task) for the task is added to the history data 81. The operation detail entry includes data representing, for example, the name of the event that occurred, the ID of the task in which the event occurred, the priority of the task, the time of occurrence of the event (for example, a timestamp), and the like. The operation detail entry may be stored in a buffer in a first-in first-out (FIFO) format, for example. Therefore, when the size of the history data 81 becomes the same as the size of the buffer (i.e., the buffer becomes full) and a further operation detail entry is added, the operation detail entry may overwrite the oldest operation detail entry. In this way, the operation detail entry may be deleted as appropriate. For each task, a collection of operation detail entries recorded for the task can be called "trace data" as data that can be used to trace the task.

[0051] The measurement function of the OS37 (for example, the kernel of the OS37) is a function that measures the time interval of occurrence times between specified events. For example, the measurement function is a function that obtains statistics of the time interval of occurrence times between specified events. Specifically, for example, the OS37 may be a Linux OS (Linux is a registered trademark), and the measurement function may be a function according to synthetic events, specifically, a function according to Histogram Triggers (for example, a function that executes processing in response to a histogram trigger command). The measurement function generates or updates histogram data 82 illustrated in FIG. 3 based on trace data of a task (for example, a task with a task name of “Task1” (see FIG. 3)). The histogram data 82 of a task is an example of operation log data based on the trace data of the task. The histogram data 82 includes information such as pid (task ID), prio (priority), lat (a value of a first time interval described later), and hitcount (a count value indicating the number of times the lat has been hit), as illustrated in FIG. 3. The histogram data 82 may be prepared for each task (e.g., in particular, for each task that is executed periodically). The "first time interval" is the time interval between a sched_waking event (an example of an ideal start event) and a sched_switch event (an example of an actual start event) described below. Although not shown, the histogram data 82 includes information indicating the value of another type of time interval and the number of times that the time interval value corresponds (count value) in addition to the value of the first time interval. Specifically, for example, the histogram data 82 includes the value of a second time interval (the time interval between the occurrence time of a sched_switch event and an event indicating the completion of execution of a task) and the number of times that the value corresponds (count value).

[0052] The manager 44 generates an RT (Real Time) performance table 350 based on the histogram data 82, as illustrated in FIG. 3. There is histogram data 82 for each task, and therefore an RT performance table may be generated for each task. The RT performance table 350 is data resulting from the analysis of the histogram data 82, and includes information such as a task name 321, a control cycle 322, a priority 323, a cycle count 324, a maximum cycle time 325, an average cycle time 326, a cycle time SD (SD: standard deviation) 327, a maximum task jitter 328, an average task jitter 329, and a task jitter SD 330. The task name 321 indicates a task name (task name identified from the task management table 92) corresponding to the pid (task ID) in the histogram data 82. The control cycle 322 indicates a value of the control cycle for the task. The priority 323 indicates the prio (priority) of the task. The cycle count 324 indicates the number of times a control cycle has occurred. The maximum cycle time 325 represents the maximum value among the multiple values ​​of the second time interval. The average cycle time 326 represents the average value of the multiple values ​​of the second time interval. The cycle time SD 327 represents the standard deviation obtained based on the multiple values ​​of the second time interval. The maximum task jitter 328 represents the maximum value among the multiple values ​​of the first time interval. The average task jitter 329 represents the average value of the multiple values ​​of the first time interval. The task jitter SD 330 represents the standard deviation obtained based on the multiple values ​​of the first time interval. The maximum cycle time 325, the average cycle time 326, the cycle time SD 327, the maximum task jitter 328, the average task jitter 329, and the task jitter SD 330 are examples of values ​​representing RT performance. Other types of values ​​may be adopted as values ​​representing RT performance. For example, types of values ​​other than the maximum cycle time 325 and the maximum task jitter 328 may be optional.

[0053] FIG. 4 shows an example of the relationship between the control cycle, the task jitter, and the cycle time.

[0054] A control task, which is a task of a control application, is taken as an example in Figure 4. For convenience, this one control task (typically, a control task executed periodically) is called a "target control task."

[0055] A control cycle is defined for the target control task. A "control cycle" is a cycle of ideal start events for the target control task. An "ideal start event" is an event that means that the target control task should start executing. An example of an ideal start event may be a sched_waking event. In FIG. 4, T(T n , T n+1 , T n+2 , ...) is the occurrence time of the ideal start event.

[0056] For each control cycle of a target control task, there is a task jitter and a cycle time.

[0057] "Task jitter" refers to the time interval between the occurrence time of the ideal start event of the target control task and the occurrence time of the actual start event, i.e., the difference between the time when the target control task should start to be executed and the time when it actually starts to be executed (the delay in the start of the target control task). The "actual start event" is an event that means that the target control task actually starts to be executed. An example of an actual start event is the sched_switch event. In FIG. 4, S(S n , S n+1 , S n+2 , ...) is the occurrence time of the actual start event. Therefore, the task jitter is n -T n , S n+1 -T n+1 , S n+2 -T n+2 , ...).

[0058] The "cycle time" refers to the time interval between the occurrence time of the actual start event and the occurrence time of the completion event of the target control task, that is, the time from when the target control task starts to when it is completed. The "completion event" is an event that means that the target control task is completed. In FIG. 4, E(E n , E n+1 , E n+2 , …) are the occurrence times of the completion events. Therefore, the cycle time is C = ES(C n =E n -S n , C n+1 =E n+1 -S n+1 , C n+2 =E n+2 -S n+2 , ...).

[0059] A "deadline miss" for a target control task means that the execution of the target control task is not completed within the control cycle. In other words, a "deadline miss" is when the sum of the task jitter and the cycle time exceeds the control cycle. According to the example shown in Figure 4, the task jitter (S n+2 -T n+2 ) and cycle time C n+2 (=E n+2 -S n+2 ) exceeds the control cycle, which means a deadline miss has occurred.

[0060] In this embodiment, the "task jitter" and "cycle time" in the deadline miss judgment (judgment of whether the sum of the task jitter value and the cycle time value exceeds the control cycle value) are the maximum task jitter and the maximum cycle time, but other types of task jitter such as the average task jitter may be adopted instead of the maximum task jitter, and other types of cycle times such as the average cycle time may be adopted instead of the maximum cycle time. Also, when operation log data (e.g., the trace data itself) in which the time interval between events is described for one control cycle is acquired instead of statistical data such as the histogram data 82, the "task jitter" and "cycle time" in the deadline miss judgment may be the task jitter and cycle time described in the operation log data.

[0061] The target control task is executed periodically, for example, as follows. That is, an ideal start event occurs at the ideal start of execution (at the start of a control cycle), and an actual start event occurs when execution actually starts. When execution eventually completes, a completion event occurs, and a timer is set from outside OS37 (OS37 kernel) with the time until the next ideal start of execution being the sleep time of the target control task. When the sleep time has elapsed, an ideal start event occurs (i.e. the next control cycle starts).

[0062] An example of the processing performed in this embodiment will be described below.

[0063] FIG. 5 shows an example of the flow of the OS setting process.

[0064] The OS setting process may be an example of a preparatory process before starting periodic execution of the control application 41. In the OS setting process, the manager 44, for example, in response to a request from the setting terminal 29, specifies a target control task (e.g., a task ID) to the OS 37 (measurement function) (S501). The manager 44 specifies the following (X) and (Y) to the OS 37 as the interval between events that constitute the time interval to be measured (S502). (X) An ideal start event (e.g., a sched_waking event) which means that a task should start executing, and an actual start event (e.g., a sched_switch event) which means that the task has actually started executing. (Y) The actual start event of the task and a completion event which signifies that the task has been completed.

[0065] The OS setting process may be performed for each task that is executed periodically (for example, a control task or an information task described below) in addition to the target control task.

[0066] After the OS setting process is executed, the control system 109 starts controlling the control target device 12. In the control of the control target device 12, a target control task is periodically executed. In the periodic execution of the target control task, the OS 37 performs the following every time the target control task is executed. The OS 37 updates the history data 81 (records an operation detail entry). The OS 37 measures a first time interval between the occurrence times of the events (X) and a second time interval between the occurrence times of the events (Y) in accordance with the designation received in the OS setting process. The OS 37 updates the count values ​​in the histogram data 82 that correspond to the measured values ​​of the first time interval and the second time interval.

[0067] FIG. 6 shows an example of the flow of the monitoring output process.

[0068] The manager 44 transmits a histogram data acquisition request (e.g., a request for a function following Histogram Triggers) specifying a target control task (e.g., a task ID) to the OS 37, thereby acquiring histogram data 82 of the target control task from the OS 37 (S601). The manager 44 analyzes the histogram data 82 to identify the cycle count, maximum cycle time, average cycle time, cycle time SD, maximum task jitter, average task jitter, and task jitter SD of the target control task, and generates an RT performance table 350 describing the identified information (S602).

[0069] When the manager 44 performs a deadline miss judgment (S603: YES) (for example, when the manager 44 has a function for making a deadline miss judgment), the manager 44 performs a deadline miss judgment (S604). Here, it is judged whether or not the sum of the maximum task jitter value and the maximum cycle time value exceeds the control cycle value.

[0070] If the determination result in S604 is true (S604: YES), the manager 44 saves at least a part of the trace data of the target control task (for example, data within a certain period of time from the most recent time) (S605). Here, "saving" may mean writing at least a part of the trace data to a non-volatile storage area, for example, as a log file. Note that in S604, the manager 44 may save at least a part of the control data written to the memory 169 during the execution of one or more control tasks of the control application (for example, writing it to a non-volatile storage area as a file).

[0071] After S604: NO (the judgment result of S604 is false) or S605, if the manager 44 displays the RT performance information (S606: YES), it displays the RT performance information, for example, via the WEB server 69 (S607). Even if the manager 44 does not perform a deadline miss judgment (S603: NO) (for example, if the manager 44 does not have a function for making a deadline miss judgment), S607 is performed.

[0072] FIG. 7 shows an example of the configuration of the RT performance screen.

[0073] The RT performance screen is, for example, a screen (for example, a GUI (Graphical User Interface)) displayed on the setting terminal 29 by the WEB server 69. For this reason, for example, the monitoring output process illustrated in Fig. 6 may be performed when a monitoring request (for example, a request to display RT performance) is received from the setting terminal 29 via the WEB server 69.

[0074] The RT performance screen displays, for example, RT performance information for a target control task selected by a user. The RT performance information may be the same information as that in the RT performance table 350 of the target control task as illustrated in FIG. 7, or may be information based on the RT performance table 350 (for example, a part of the RT performance table 350). From this screen, the user can determine, for example, whether the sum of the maximum task jitter value and the maximum cycle time value exceeds the control cycle value. If the result of this determination is true, there is a possibility that a deadline miss has occurred. Specifically, if either the task jitter or the cycle time is at the maximum value in one control cycle, there is a high possibility that a deadline miss has occurred.

[0075] The RT performance information may include the data saved in S605 (e.g., at least a portion of the trace data (and at least a portion of the control data)), or may include a link to the data, as illustrated in Fig. 7. When the link is specified by the user, the data saved in S605 may be displayed by the manager 44 through the WEB server 69.

[0076] The above is a description of the present embodiment. The above description can be summarized, for example, as follows. The following summary may include supplements and modifications of the above description.

[0077] As explained with reference to Fig. 4, a sleep time is set in the OS37 so that the next control cycle starts when the sleep time has elapsed. Therefore, the OS37 does not know the cycle time. Therefore, even if the OS37 has the above-mentioned measurement function, the OS37 cannot determine whether a deadline has been missed.

[0078] In addition, the measurement function is merely a function for measuring the time interval between the occurrence times of specified events. In other words, it is not possible to obtain the values ​​of task jitter and cycle time by specifying them to the OS 37 having such a measurement function.

[0079] Therefore, in this embodiment, the control system 109 includes an interface unit and an output unit. The interface unit and the output unit may be functions that are realized by, for example, executing at least the manager 44 out of the manager 44 and the WEB server 69.

[0080] The interface unit specifies the following (X) and (Y) to the OS 37 as the interval between events that constitute the time interval to be measured. (X) An ideal start event, which means that a task should start executing, and an actual start event, which means that the task has actually started executing. (Y) The actual start event of the task and a completion event that signifies that the task has been completed.

[0081] The operation log data of the target control task includes a first time interval value of the occurrence time between events (X) for the target control task, and a second time interval value of the occurrence time between events (Y) for the target control task.

[0082] The output unit specifies, for the target control task, a value of the first time interval as a task jitter value and a value of the second time interval as a cycle time value based on the operation log data. The output unit performs output based on a value of a control cycle, which is a cycle of an ideal start event, the specified task jitter value, and the specified cycle time value for the target control task.

[0083] This makes it possible for the OS 37 to determine whether or not a deadline miss has occurred for the target control task executed in each control cycle, even if the OS 37 does not know the control cycle.

[0084] The output by the output unit may display at least one of the following (a) and (b) and (c) for the target control task, which allows a user (e.g., an administrator) to determine whether or not a deadline miss may have occurred for the target control task. (a) Control cycle value. (b) Task jitter value and cycle time value. (c) The sum of the task jitter value and the cycle time value.

[0085] The trace data of the target control task (data in the history data 81) is data temporarily stored in the memory 169 (e.g., a buffer). When the sum of the task jitter value and the cycle time value of the target control task exceeds the control cycle value of the target control task (e.g., when the judgment result of S604 is true), the output by the output unit may be at least one of storing at least a part of the trace data of the target control task (e.g., S605) and displaying the at least a part of the trace data of the target control task. The operation detail entries (data in the trace data) may be deleted as new operation detail entries are added. Therefore, it is expected that the cause of the sum of the task jitter value and the cycle time value exceeding the control cycle value of the target control task can be identified by storing and / or displaying at least a part of the trace data when the sum of the task jitter value and the cycle time value of the target control task exceeds the control cycle value of the target control task. When the sum of the task jitter value and the control cycle value of the target control task exceeds the control cycle value of the target control task, at least one of the following may be performed: saving at least a part of the control data written to the memory 169 in the execution of one or more control tasks of one or more control applications 41; and displaying the at least a part of the data. This increases the expectation that it will be possible to identify the cause of the sum of the task jitter value and the cycle time value exceeding the control cycle value of the target control task.

[0086] The measurement function may be a function for obtaining statistics on the time intervals of occurrence times between specified events. The operation log data may be data (e.g., histogram data 82) showing statistics on the values ​​of the first time interval and the second time interval. The task jitter value on which the output for the target control task is based may be a value (e.g., the maximum value) based on multiple values ​​of the first time interval. The cycle time value on which the output for the target control task is based may be a value (e.g., the maximum value) based on multiple values ​​of the second time interval. This makes it possible to determine whether or not a deadline miss may have occurred during a certain period based on the results of measurement during that period.

[0087] In addition to the control application 41, the multiple programs in the control system 109 may include one or more information applications 42, each of which is an application that performs information processing. As illustrated in FIG. 8, in a control cycle of a target control task, a target information task, which is at least one of the tasks of one or more information programs, may be executed. For the target control task, the output may be based on a value of the control cycle, a value of the task jitter and a value of the cycle time for the target information task (e.g., an information task executed periodically), in addition to a value of the control cycle, and a value of the task jitter and a value of the cycle time for the target control task. For example, when there is one target information task executed in a control cycle, the elements compared with the control cycle may include a sum of the task jitter value and the cycle time value for the target information task, in addition to a sum of the task jitter value and the cycle time value for the target control task. For the target information task, an ideal start event, an actual start event, and a completion event may also be specified in the OS 37, and the task jitter value and cycle time value of the target information task may be identified from the values ​​(the value of the first time interval and the value of the second time interval) represented by the histogram data 82 (an example of operation log data) of the target information task. Also, the time interval between the execution of the target control task and the execution of the target information task may be the difference in the occurrence time between the completion event of the target control task and the ideal start event of the target information task, or may be the difference in the occurrence time between the completion event of the target information task and the ideal start event of the target control task. This makes it possible to determine whether a deadline miss has occurred even when a control task and an information task are executed in one control cycle. In the example shown in FIG. 8, the occurrence time of the ideal start event of the target information task is R n The actual start event of the target information task occurs at the time S in The time when the completion event of the target information task occurs is E in It is.

[0088] Although one embodiment has been described above, this is merely an example for explaining the present invention, and the scope of the present invention is not limited to this embodiment. The present invention can be implemented in various other forms. For example, the control system 109 may be a logical system (for example, a system as a cloud computing service) realized on a physical system (for example, a cloud platform) instead of a physical system having one or more arithmetic devices 40. Also, for example, in FIG. 6, S603 to S606 may be optional. [Explanation of symbols]

[0089] 109…Control system

Claims

1. A control system that controls one or more control target devices by executing one or more control programs among one or more programs on an OS (Operating System), an interface unit that requests, from the OS, operation log data that is data based on trace data for a target control task that is a task of the one or more control programs among the one or more tasks of the one or more programs; an output unit that performs output based on the operation log data acquired from the OS in response to the request; Equipped with The OS has a measurement function for measuring a time interval between occurrence times of specified events, The interface unit specifies the following (X) and (Y) to the OS as events between which a time interval to be measured is to be configured, (X) an ideal start event, which means that a task should start executing, and an actual start event, which means that the task has actually started executing; (Y) the actual start event of the task and a completion event that signifies that the task has been completed; The operation log data of the target control task includes a first time interval value of an occurrence time between events (X) for the target control task, and a second time interval value of an occurrence time between events (Y) for the target control task, The output unit is For the target control task, a value of a first time interval is identified as a task jitter value and a value of a second time interval is identified as a cycle time value based on the operation log data; outputting the target control task based on a control cycle value, which is a cycle of an ideal start event, the specified task jitter value, and the specified cycle time value; Control system.

2. The output by the output unit is to display, for the target control task, the following (a) and at least one of the following (b) and (c): (a) the control cycle value; (b) a task jitter value and a cycle time value; (c) the sum of the task jitter value and the cycle time value; The control system of claim 1 .

3. the trace data of the target control task is temporarily stored data, The output by the output unit is, when a sum of a task jitter value and a cycle time value of the target control task exceeds a control cycle value of the target control task, at least one of saving at least a portion of the trace data of the target control task and displaying the at least a portion of the trace data of the target control task. The control system of claim 1 .

4. When the sum of the task jitter value and the cycle time value of the target control task exceeds the control cycle value of the target control task, the output by the output unit further includes at least one of saving at least a portion of the control data written to the memory in the execution of the one or more tasks of the one or more control programs and displaying the at least a portion of the data. The control system of claim 3.

5. A sleep time of the target control task is designated each time the execution of the target control task is completed, and an ideal start event of the target control task occurs when the designated sleep time has elapsed. The control system of claim 1 .

6. the measurement function is a function for obtaining statistics on time intervals between occurrence times of designated events; the operational log data represents statistics of values ​​of a first time interval and values ​​of a second time interval; a task jitter value on which an output for the target control task is based is a value based on a plurality of values ​​of a first time interval; a cycle time value on which the output for the target control task is based is a value based on a plurality of values ​​of a second time interval; The control system of claim 1 .

7. a task jitter value on which an output for the target control task is based is a maximum value among the plurality of values ​​for a first time interval; a cycle time value on which the output for the target control task is based is a maximum value among the plurality of values ​​of a second time interval; 7. The control system of claim 6.

8. the plurality of programs include one or more information programs each of which is a program for performing information processing; In the control cycle of the target control task, a target information task, which is at least one of the tasks of the one or more information programs, is executed; For the target control task, the output is based on the value of the control cycle and the value of the task jitter and the value of the cycle time for the target control task, as well as the value of the task jitter and the value of the cycle time for the target information task. The control system of claim 1 .

9. A monitoring method for a control system that controls one or more control target devices by executing one or more control programs among one or more programs on an OS (Operating System), In an OS having a measurement function for measuring the time interval between occurrence times of specified events, the following (X) and (Y) are specified as events constituting the time interval to be measured, (X) an ideal start event, which means that a task should start executing, and an actual start event, which means that the task has actually started executing; (Y) the actual start event of the task and a completion event that signifies that the task has been completed; requesting, from the OS, operation log data that is data based on trace data for a target control task that is a task of the one or more control programs among the one or more tasks of the one or more programs; the operation log data acquired from the OS in response to the request includes a value representing a first time interval between events (X) for the target control task, and a value representing a second time interval between events (Y) for the target control task, For the target control task, a value representing a first time interval is identified as a task jitter value and a value representing a second time interval is identified as a cycle time value based on the operation log data; outputting the target control task based on a control cycle value, which is a cycle of an ideal start event, the specified task jitter value, and the specified cycle time value; Monitoring method.

Citation Information

Patent Citations

  • Task control device

    JP2007041890A

  • Program creation device for testing model

    JP2010157105A

  • Response delay analysis system and response delay analysis method

    JP2015203962A

  • Control system, control device and control method

    JP2020061055A

  • Control controller and vehicle control system

    WO2019239522A1