control device
The control device addresses the challenge of outdated control information in cloud-based systems by using reception time and flag verification to ensure accurate and continuous control, with backup calculations for network failures.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- KK TOSHIBA
- Filing Date
- 2025-01-10
- Publication Date
- 2026-07-23
AI Technical Summary
Cloud-based controller systems face issues in accurately determining whether control information stored in edge devices has been correctly updated due to communication network failures, leading to potential misuse of outdated or incorrectly updated control information.
A control device that includes a transmitting unit, receiving unit, storage unit, and control unit to manage and verify the freshness of control information by checking reception times and flags, ensuring proper control calculations are performed based on up-to-date information.
Ensures continuous and accurate control of connected devices by distinguishing between correctly received and outdated control information, preventing unintended control using outdated data and allowing for backup calculations when communication fails.
Smart Images

Figure 2026121116000001_ABST
Abstract
Description
Technical Field
[0005] ,
[0001] This embodiment relates to a control device.
Background Art
[0002] There is a cloud-based controller system that performs control calculations on a cloud server. In the cloud-based controller system, the cloud server establishes a communication connection with an edge device via a communication network, transmits control information for a device to the edge device, and controls the device connected to the edge device. The cloud server is configured, for example, as a virtual machine of a PLC on the Internet. The control information transmitted from the cloud server is stored in the storage unit of the edge device, and the control unit of the edge device reads the control information from the storage unit and controls the device.
[0003] Since the communication between the cloud server and the edge device is performed via a communication network, if the communication is not performed normally, the control information stored in the storage unit may not be updated correctly. Therefore, for example, if there is no change in the control information stored in the storage unit from the previous time, it is unclear whether the content of the storage unit has not been updated because the communication is not performed normally, or whether the communication is performed normally but the previous and current control information happens to match. In order to correctly control the device, it is necessary to clearly distinguish whether the control information stored in the storage unit has been correctly updated.
[0004] As a related technique, there is a system that switches whether to perform calculations by a server or by the device itself according to the communication quality of communication via a network. However, even if the communication quality is good, there may be cases where the communication is not actually performed correctly. Applying this technique to the above-described cloud-based controller system does not solve the above problems.
Prior Art Documents
Patent Documents
[0005] [Patent Document 1] Patent No. 6534956 [Overview of the project] [Problems that the invention aims to solve]
[0006] Therefore, this embodiment provides a control device that properly controls the controlled device regardless of the communication status with the control calculation unit. [Means for solving the problem]
[0007] The control device according to this embodiment includes: a transmitting unit that transmits state data relating to the state of a controlled device to a control calculation device via a communication network; a receiving unit that receives first control information generated by a control calculation based on the state data from the controlled device; a storage unit that stores the first control information received by the receiving unit and the reception time at which the first control information was received; and a control unit that determines whether the first control information can be used based on the reception time in the storage unit according to the control timing for controlling the controlled device, controls the controlled device based on the first control information if the first control information can be used, and generates second control information by performing a control calculation based on the state data if the first control information cannot be used, and controls the controlled device based on the second control information.
[0008] The control device according to this embodiment includes: a transmitting unit that transmits state data relating to the state of a controlled device to a control calculation device via a communication network; a receiving unit that receives first control information generated by a control calculation based on the state data from the controlled device; a storage unit including a first storage area for storing the first control information and a second storage area for storing reception identification information indicating whether or not the first control information has been received; a reset unit that resets the reception identification information in the second storage area of the storage unit to a first value indicating that the first control information has not been received; and, in response to the reception unit receiving the first control information, the storage unit's front The device comprises: a writing unit that overwrites the first control information stored in the first memory area and sets the reception identification information in the second memory area of the storage unit to a second value indicating that the first control information has been received; and a control unit that, in accordance with the control timing for controlling the controlled device, checks the reception identification information in the second memory area of the storage unit, controls the controlled device based on the first control information in the first memory area of the storage unit if the reception identification information is a second value, and generates second control information by performing a control calculation based on the state data if the reception identification information is a first value, and controls the controlled device based on the second control information. [Brief explanation of the drawing]
[0009] [Figure 1] A diagram showing the overall configuration of the system according to the first embodiment. [Figure 2] A block diagram showing a control device according to the first embodiment. [Figure 3] This figure shows an example of writing control information and reception time to the storage unit according to the first embodiment. [Figure 4] A flowchart showing an example of the processing of the control device according to the first embodiment. [Figure 5] A sequence diagram showing the operation of each part of the control device according to the first embodiment. [Figure 6]A diagram showing a control device according to the second embodiment. [Figure 7] A diagram showing an example of control information and a received flag in a storage unit according to the second embodiment. [Figure 8] A flowchart showing an example of the processing of the control device according to the second embodiment. [Figure 9] A sequence diagram showing the operation of each part of the control device according to the second embodiment. [Figure 10] A diagram showing the overall configuration of the system according to the third embodiment. [Figure 11] A block diagram showing a control device according to the third embodiment. [Figure 12] A flowchart showing an example of the processing of the control device according to the third embodiment. [Figure 13] A sequence diagram showing the operation of each part of the control device according to the third embodiment. [Figure 14] A diagram showing the hardware configuration of the control device according to the first to third embodiments. [Modes for carrying out the invention]
[0010] Embodiments of the present invention will be described below with reference to the drawings. The following description will focus on the main components of these embodiments, but there may be components and functions not shown or described. The following description does not exclude any components or functions not shown or described.
[0011] (First Embodiment) Figure 1 shows the overall configuration of the system according to the first embodiment. The control device 100 is connected to the controlled device 300 via a local network. The local network is, for example, Ethernet, TC-net, etc., but is not limited thereto. Further, the control device 100 is connected to the control arithmetic device 200 via the Internet 400 which is a communication network. As an example, the control arithmetic device 200 is a virtual server on the cloud, and the control device 100 corresponds to an edge device. The controlled device 300 is, for example, a device constituting an industrial plant, such as a valve, a pump, a heat exchanger, a mixer, etc.
[0012] In the example of Figure 1, the number of controlled devices 300 connected to the control device 100 is one, but it may be plural. Also, the control device 100 and the control arithmetic device 200 may be connected to the Internet 40 via a proxy server or a firewall, may be directly connected to the Internet 40, or may be connected by other methods.
[0013] Figure 2 is a block diagram showing the control device 100 according to the first embodiment.
[0014] The control device 100 includes a time management unit 12, a communication unit 13, a storage unit 14, and a control unit 16. The control unit 16 includes a control management unit 11 and a control arithmetic unit 15. The control unit 16 controls the operation of the entire control device 100.
[0015] The time management unit 12 manages the acquisition timing of state data representing the state of the controlled device 300, the control timing related to the control of the controlled device 300, and the transmission timing of the state data to the control arithmetic device 200. For example, at regular time intervals, the arrival of the acquisition timing, the control timing, and the transmission timing is detected. The regular time intervals may be common for two or three of these timings, or may all be different. The time management unit 12 manages these timings using, for example, a clock or a timer. The time management unit 12 notifies the control management unit 11 of the arrival of the acquisition timing and the control timing, and notifies the communication unit 13 of the arrival of the transmission timing.
[0016] Upon receiving a notification of the acquisition timing from the time management unit 12, the control management unit 11 in the control unit 16 acquires data (status data) representing the state of the controlled device 300 from the controlled device 300 via the local network and writes it into the storage unit 14. The status data includes, for example, measurement data acquired by sensors provided in the controlled device 300, and may further include information indicating classifications such as whether the controlled device 300 is normal or abnormal. The status data is written, for example, into a predetermined area in the storage unit 14, and the old status data may be updated each time new status data is acquired, or a history of status data for a certain period may be stored.
[0017] Upon receiving a notification of the transmission timing from the time management unit 12, the communication unit 13 reads out the status data of the controlled device 300 from the storage unit 14 and transmits it to the control arithmetic unit 200. The status data to be read out is, for example, the latest status data. However, other examples are possible, such as status data for a certain period immediately before. Also, when the communication unit 13 receives control information generated by control arithmetic based on the status data from the control arithmetic unit 200, it writes the received control information into the storage unit 14 in association with the time (reception time) when the control information was received. The communication unit 13 includes a writing unit 17 that writes the control information and the reception time into the storage unit 14. The communication unit 13 includes a transmission unit 18 that transmits the status data and a reception unit 19 that receives the control information (first control information). The control information received from the control arithmetic unit 200 corresponds to the first control information according to this embodiment.
[0018] Figures 3(A) and 3(B) show examples of writing control information and reception time to the memory unit 14. The control information and reception time are written to a predetermined area. In the example in Figure 3(A), the control information and reception time are written to adjacent memory addresses. In the example in Figure 3(B), the control information and reception time are written together to the same memory address. By writing, the control information and reception time previously written are updated (overwritten). That is, the memory unit 14 holds the latest control information and reception time. By writing the control information and reception time to adjacent memory addresses or the same memory address, the control management unit 11 can easily read the control information and reception time. However, the writing method is not limited to the methods in Figures 3(A) and 3(B). For example, the set of control information and reception time for a certain period of time in the past may be stored.
[0019] When the control calculation unit 15 receives an instruction from the control management unit 11 to execute a control calculation, it reads the information necessary for the control calculation from the storage unit 14, performs the control calculation, and passes the control information obtained as a result of the control calculation to the control management unit 11. The information necessary for the control calculation includes the state data of the controlled device 300, and may also include control information obtained from the previous control calculation. The previous control calculation may include either a control calculation performed by the control calculation unit 15 or a control calculation performed by the control calculation device 200. The control information generated by the control calculation unit 15 corresponds to the second control information according to this embodiment.
[0020] The control management unit 11, in response to notification from the time management unit 12 of the arrival of a control timing, checks the reception time stored in the storage unit 14 and determines whether the control information stored in the storage unit 14 is usable. This determination is made based on the elapsed time since the reception time. In this example, the difference between the current time and the reception time stored in the storage unit 14 is used. If the difference is less than or equal to a predetermined time, the control information stored in the storage unit 14 (control information acquired from the control calculation device 200) is usable; if it is greater than the predetermined time, it is determined to be unusable. Being usable means that the controlled device 300 is controlled using the control information stored in the storage unit 14; being unusable means that the control calculation unit 15 is made to generate control information through control calculations, and the controlled device 300 is controlled using the generated control information.
[0021] When the control management unit 11 determines that the control information stored in the storage unit 14 is usable, it reads the control information from the storage unit 14 and controls the controlled device 300 based on the read control information. For example, it controls the controlled device 300 by transmitting the control information, or a control signal based on the control information, to the controlled device 300.
[0022] If the control management unit 11 determines that the control information stored in the storage unit 14 is unusable, it causes the control calculation unit 15 to perform a control calculation based on the status data in the storage unit 14 to generate control information. Based on the generated control information, the control management unit 11 controls the controlled device 300. For example, it controls the controlled device 300 by transmitting the control information, or a control signal based on the control information, to the controlled device 300.
[0023] The storage unit 14 has a storage area for storing information or data, and is composed of a storage medium such as memory, hard disk, or SSD. The memory may be volatile or non-volatile memory. The storage area includes an area for storing state data acquired from the controlled device 300, and an area for storing control information received from the control calculation unit 200 and the reception time of the control information. The storage area may also include an area for storing control information generated by the control calculation unit 15.
[0024] Figure 4 is a flowchart showing an example of the processing performed by the control device 100.
[0025] The time management unit 12 periodically notifies the communication unit 13 of the arrival of the timing for transmission to the control calculation unit 200 (S301).
[0026] Upon receiving notification from the time management unit 12, the communication unit 13 reads the data necessary for control calculation (status data of the controlled device 300) from the storage unit 14 and transmits the read status data to the control calculation device 200 via the internet 400 (S302).
[0027] If the communication unit 13 receives control information generated by a control calculation based on state data from the control calculation device 200 (Yes in S303), it writes the received control information to the storage unit 14 along with the reception time when the control information was received (S304).
[0028] If the communication unit 13 does not receive control information (No. in S303), it does not write anything. In this case, the storage unit 14 retains the data that was previously written (control information and reception time).
[0029] The control management unit 11 detects the arrival of the control timing a predetermined time after the transmission timing based on a notification from the time management unit 12, and reads the reception time from the storage unit 14 (S305).
[0030] The control management unit 11 calculates the difference between the current time and the read reception time, and determines whether the calculated difference is less than or equal to a predetermined time (S306). The predetermined time may be the value of the interval (period) between the transmission timings, the value of the time interval between the control timing and the transmission timing, or a value obtained by adding or subtracting a margin from any of these intervals. Alternatively, the predetermined time may be determined based on the time required for communication between the control device 100 and the control calculation device 200. The method for determining the predetermined time is not limited to these methods.
[0031] If the calculated difference is less than or equal to a predetermined time (Yes), the control management unit 11 determines that control information has been successfully received from the control calculation device 200 and decides that the control information written in the storage unit 14 is usable (S307). That is, it decides to control the controlled device 300 using the control information in the storage unit 14. The control management unit 11 reads the control information from the storage unit 14 and controls the controlled device 300 based on the read control information (same as S307).
[0032] On the other hand, if the calculated difference is greater than a predetermined time (No), the control management unit 11 determines that it has not been able to receive control information properly from the control calculation device 200 and decides that the control information written to the storage unit 14 is unusable (S308). That is, it decides to generate control information by performing control calculations in its own device using the control calculation unit 15. The control calculation unit 15 reads the data necessary for control calculations from the storage unit 14 and generates control information by performing control calculations. The data necessary for control calculations may be the status data of the controlled device 300, or a set of previously used control information and the said status data. The control management unit 11 controls the controlled device 300 based on the control information generated by the control calculation unit 15 (same as S308).
[0033] The control calculation unit 15 is provided for performing control calculations on its own only when it is unable to receive control information from the control calculation device 200. In other words, normally, control information is generated using the control calculation device 200, which has high processing speed and durability, but when the communication of control information does not occur correctly, the control calculation unit 15 is used as an emergency workaround to generate control information. For this reason, high specifications for the CPU (Central Processing Unit) and memory are not required, and the price of the control device 100 can be kept down.
[0034] The operation of each part of the control device 100 will be explained in more detail below using Figure 5. Figure 5 is a sequence diagram showing the operation of each part of the control device 100. The vertical lines represent the time axis. The operations corresponding to the steps in the flowchart of Figure 4 are denoted by the same reference numerals as the corresponding steps.
[0035] First, the communication unit 13, triggered by a notification from the time management unit 12 (see S301 in Figure 4), transmits status data of the controlled device 300 (data necessary for control calculation) to the control calculation unit 200 (S302). This notification is transmitted at a fixed control cycle (see Figure 5). The communication unit 13 receives control information (here, "ABCD1") generated by the control calculation of the control calculation unit 200 based on the status data (S303). The communication unit 13 writes the received control information "ABCD1" along with the reception time (here, "2024 / 08 / 16 11:40:32.539231") to the storage unit 14 (S304).
[0036] Next, triggered by a notification from the time management unit 12, the control management unit 11 reads the reception time written in the storage unit 14 and calculates the difference between the current time and the reception time. Since the difference is less than or equal to a predetermined time (see S305 and S306 in Figure 4), the controlled device 300 is controlled based on "ABCD1" generated by the control calculation device 200 (S307). The control management unit 11 reads the control information written in the storage unit 14 and transmits it to the controlled device 300 (same S307). Here, the control management unit 11 ensures a certain period of time from when it starts processing in step S305 (reading the reception time) until it transmits the control information to the controlled device 300. The length of this certain period of time is longer than the time required for the control calculation unit 15 to perform the control calculation and generate the control information. As a result, whether the controlled device 300 is controlled using the control information generated by the control calculation device 200 or the controlled device 300 is controlled using the control information generated by the control calculation unit 15, the interval at which the controlled device 300 is controlled can be kept constant.
[0037] Next, the communication unit 13, triggered by a notification from the time management unit 12 (see S301 in Figure 4), transmits the status data of the controlled device 300 (data necessary for control calculation) to the control calculation unit 200 (S302). The communication unit 13 receives control information (here, coincidentally the same as last time, "ABCD1") generated by the control calculation of the control calculation unit 200 based on the status data (S303). The communication unit 13 writes the received time control information "ABCD1" along with the reception time (here, "2024 / 08 / 16 11:40:32.638971") to the storage unit 14 (S304).
[0038] Next, the control management unit 11, triggered by a notification from the time management unit 12, reads the reception time written in the storage unit 14 and calculates the difference between the current time and the reception time. Since the calculated difference is less than or equal to a predetermined time (see S305 and S306 in Figure 4), it controls the controlled device 300 based on "ABCD1" generated by the control calculation unit 200 (S307). The control management unit 11 reads the control information written in the storage unit 14 and transmits it to the controlled device 300 (S307). Although the content has not changed from the previous control information, the control information has been correctly updated, so the controlled device 300 is properly controlled based on the control information written in the storage unit 14.
[0039] Next, the communication unit 13, triggered by a notification from the time management unit 12 (see S301 in Figure 4), transmits status data of the controlled device 300 (data necessary for control calculation) to the control calculation unit 200 (S302). In this case, due to an internet 400 failure or communication delay, the communication unit 13 does not receive the control information generated by the control calculation of the control calculation unit 200 based on the status data (see "×" in the figure). Since control information was not received from the control calculation unit 200, the control information and reception time are not written to the storage unit 14, and the previously written information is maintained.
[0040] Next, the control management unit 11, triggered by a notification from the time management unit 12, reads the reception time written in the storage unit 14 and calculates the difference between the current time and the reception time. It determines whether the calculated difference is less than or equal to a predetermined time. The reception time written in the storage unit 14 is the previously written reception time, "2024 / 08 / 16 11:40:32.638971". Since the calculated difference is greater than the predetermined time, the control management unit 11 determines that the control information "ABCD1" written in the storage unit 14 is unusable and decides to generate control information by performing a control calculation in the control calculation unit 15. For this reason, the control management unit 11 outputs an instruction to the control calculation unit 15 to execute the control calculation, and the control calculation unit 15, upon receiving the instruction, reads the data necessary for the control calculation from the storage unit 14 and performs the control calculation (S308). The data necessary for control is, for example, the status data of the controlled device 300, or a pair of previously used control information and status data. The control calculation unit 15 acquires control information (here, for example, "ABCD2") obtained as a result of the control calculation and passes the acquired control information to the control management unit 11 (S308). The control management unit 11 controls the controlled device 300 based on the control information generated by the control calculation unit 15 (S308). For example, the control management unit 11 controls the controlled device 300 by transmitting the control information to the controlled device 300.
[0041] As described above, according to this embodiment, if control information has been received from the control calculation unit 200 within a predetermined time period retrospectively from the current time, the controlled device is controlled using that control information. On the other hand, if control information has not been received within the predetermined time period, the device generates control information and uses the generated control information to control the controlled device. In this way, it is possible to distinguish between cases where control information has been correctly received and cases where it has not. This makes it possible to continue appropriate control of the controlled device even if control information is not correctly received from the control calculation unit 200 due to Internet 400 failures or communication delays. In other words, it is possible to suppress unintended control using outdated control information.
[0042] (Second embodiment) In the first embodiment, the elapsed time since the reception time stored in the storage unit 14, for example, the difference between the current time and the reception time, was used to determine whether the control information stored in the storage unit was usable. In the second embodiment, reception identification information (hereinafter referred to as a reception flag) that identifies whether or not the control information has been received is used to determine whether or not the control information stored in the storage unit is usable.
[0043] The following explanation will focus on the differences from the first embodiment.
[0044] Figure 6 shows a control device 100A according to the second embodiment.
[0045] The control device 100A comprises a control unit 16A, a time management unit 12A, a communication unit 13A, and a storage unit 14. The control unit 16A includes a control management unit 11A and a control calculation unit 15. The functions of the control management unit 11A, the time management unit 12A, and the communication unit 13A are partially modified or expanded from those of the control management unit 11, the time management unit 12, and the communication unit 13 in the first embodiment.
[0046] The time management unit 12A manages the acquisition timing, control timing, and transmission timing of the first embodiment, as well as the reset timing for resetting the receive flag to its initial value. The reset timing is, for example, a timing at regular time intervals (regular periods), and may be the same as or different from the periods of at least one of the acquisition timing, control timing, and transmission timing.
[0047] The communication unit 13A resets the receive flag in the storage unit 14 to its initial value (turns the receive flag OFF) upon receiving a reset timing notification (reset notification of the receive flag) from the time management unit 12. The communication unit 13A includes a reset unit 20 that resets the receive flag to its initial value. The reset unit 20 may be provided in an element other than the communication unit 13A, for example, the control management unit 11A, or it may be provided as an independent element.
[0048] The receive flag represents either "not received" or "received". The initial value is a value indicating "not received". For example, the receive flag may be represented by 1 bit, such as "0" for not received and "1" for received. Alternatively, it may be represented using several bits each for not received and received. The form of the receive flag is not limited to these methods. Hereafter, setting the receive flag to a value indicating "not received" (the first value) will be referred to as turning the receive flag OFF, and setting it to a value indicating "received" (the second value) will be referred to as turning the receive flag ON.
[0049] When the communication unit 13A receives control information from the control calculation unit 200, it writes the control information to the storage unit 14 and turns on the receive flag in the storage unit 14.
[0050] The control management unit 11A, upon receiving notification of the control timing from the time management unit 12, determines whether the control information stored in the storage unit 14 can be used to control the controlled device 300. This determination is made by checking the receive flag stored in the storage unit 14. If the receive flag is ON, it is determined that the control information stored in the storage unit 14 can be used. In other words, the control management unit 11A decides to control the controlled device 300 using the control information stored in the storage unit 14. On the other hand, if the receive flag is OFF, it is determined that the control information stored in the storage unit 14 cannot be used. In other words, the control management unit 11A decides to have the control calculation unit 15 generate control information through control calculations and then control the controlled device 300 using the generated control information.
[0051] Similar to the first embodiment, the storage unit 14 includes, in addition to an area for storing state data acquired from the controlled device 300 and an area for storing control information received from the control calculation unit 200 (first storage area), an area for storing a received flag (second storage area). The storage unit 14 may also include an area for storing control information generated by the control calculation unit 15.
[0052] Figures 7(A) and 7(B) show examples of control information and receive flags stored in the memory unit 14. In the example in Figure 7(A), the control information and receive flags are written to adjacent memory addresses. In the example in Figure 7(B), the control information and receive flags are written together to the same memory address. By writing the control information and receive flags to adjacent memory addresses or the same memory address, the control management unit 11 can easily read the control information and receive flags. However, the method of writing the control information and receive flags is not limited to the examples in Figures 7(A) and 7(B). The area for storing the control information corresponds to the first memory area, and the area for storing the receive flags corresponds to the second memory area.
[0053] Figure 8 is a flowchart showing an example of the processing performed by the control device 100A.
[0054] When the time management unit 12 periodically notifies the communication unit 13 of an instruction to reset the receive flag in the storage unit 14 (reset notification), the communication unit 13 resets the receive flag in the storage unit 14 to its initial value (S700). The reset notification of the receive flag may be given at a period corresponding to the periodic control cycle given to the controlled device 300, or it may be given at a periodic interval unrelated to the control cycle.
[0055] The time management unit 12 notifies the communication unit 13 of the arrival of the transmission timing with the control calculation unit 200 (S701).
[0056] Upon receiving notification from the time management unit 12, the communication unit 13 reads the data necessary for control (for example, status data of the controlled device 300) from the storage unit 14, and the communication unit 13 transmits the status data to the control calculation unit 200 via the internet 400 (S702).
[0057] If the communication unit 13 receives control information generated by a control calculation based on the state data from the control calculation device 200 (Yes in S703), it writes the received control information to the storage unit 14 and turns on the receive flag in the storage unit 14 (S704).
[0058] If the communication unit 13 does not receive control information (No. in S703), it does not write anything. Therefore, the contents of the storage unit 14 are not updated. In other words, the control information is maintained at the content written before the last time, and the reception flag remains at the initial value (OFF) set in step S700.
[0059] The control management unit 11 detects the arrival of the control timing after a predetermined time from the transmission timing based on a notification from the time management unit 12, and reads the reception flag from the storage unit 14 (S705).
[0060] The control management unit 11 determines whether the receive flag is ON, that is, whether it has a value indicating that it has been received (S706). If the receive flag is ON (Yes), the control management unit 11 determines that the control information written in the storage unit 14 is usable, that is, that it has successfully received the control information from the control calculation unit 200 (S707). The control management unit 11 reads the control information from the storage unit 14 and controls the controlled device 300 based on the read control information (S707).
[0061] On the other hand, if the receive flag is not ON, i.e., OFF (No), the control management unit 11 determines that the control information written in the storage unit 14 is unusable, i.e., that it has not been able to properly receive control information from the control calculation device 200 (S708). The control management unit 11 decides to generate control information using the control calculation unit 15 instead of using the control information written in the storage unit 14 (same as S708). The control calculation unit 15 reads the data necessary for control calculation (such as the status data of the controlled device 300) from the storage unit 14 and generates control information by performing control calculations. The control management unit 11 controls the controlled device 300 based on the control information generated by the control calculation unit 15 (same as S708).
[0062] Next, the operation of each part of the control device 100A will be explained using the sequence diagram shown in Figure 9. Figure 9 is a sequence diagram showing the operation of each part of the control device 100A. The following explanation will focus on the differences from the first embodiment.
[0063] First, the communication unit 13A resets the receive flag in the storage unit 14 upon receiving a notification from the time management unit 12A to reset the receive flag (S700).
[0064] The communication unit 13, triggered by a notification from the time management unit 12 (see S701 in Figure 8), transmits status data of the controlled device 300 (data necessary for control calculation) to the control calculation unit 200 (S702). The communication unit 13 receives control information (here, "ABCD1") generated by the control calculation of the control calculation unit 200 based on the status data (S703). The communication unit 13 writes the control information "ABCD1" to the storage unit 14 and turns on the receive flag in the storage unit 14 (S704).
[0065] The control management unit 11, triggered by a notification from the time management unit 12, reads the reception flag from the storage unit 14 and determines whether the reception flag is ON (whether it has a value indicating "received") (see S705 and S706 in Figure 8). Since the reception flag is ON, the controlled device 300 is controlled based on "ABCD1" generated by the control calculation unit 200 (S707). For example, the control management unit 11 reads the control information written to the storage unit 14 and transmits it to the controlled device 300 (same S707).
[0066] Next, the communication unit 13A resets the receive flag in the storage unit 14 upon receiving a notification from the time management unit 12A to reset the receive flag (S700).
[0067] The communication unit 13, triggered by a notification from the time management unit 12 (see S701 in Figure 8), transmits status data of the controlled device 300 (data necessary for control calculation) to the control calculation unit 200 (S702). The communication unit 13 receives control information (in this case, "ABCD1," which happens to be the same as the previous time) generated by the control calculation of the control calculation unit 200 based on the status data (S703). The communication unit 13 writes the control information "ABCD1" to the storage unit 14 and turns on the receive flag in the storage unit 14 (S704).
[0068] The control management unit 11, triggered by a notification from the time management unit 12, reads the reception flag from the storage unit 14 and determines whether the reception flag is ON (i.e., whether it has a value indicating "received") (see S705 and S706 in Figure 8). Since the reception flag is ON, the controlled device 300 is controlled based on "ABCD1" generated by the control calculation unit 200 (S707). For example, the control management unit 11 reads the control information written to the storage unit 14 and transmits it to the controlled device 300 (same S707). Although the content has not changed from the previous control information, the control information has been updated correctly, so the controlled device 300 is controlled based on the control information written to the storage unit 14.
[0069] Next, the communication unit 13A resets the receive flag in the storage unit 14 upon receiving a notification from the time management unit 12A to reset the receive flag (S700).
[0070] The communication unit 13, triggered by a notification from the time management unit 12 (see S701 in Figure 8), transmits status data of the controlled device 300 (data necessary for control calculation) to the control calculation unit 200 (S702). In this case, the communication unit 13 does not receive the control information generated by the control calculation unit 200 in accordance with the status data (see "×" in the figure). Because control information was not received from the control calculation unit 200, no new control information is written to the storage unit 14, and the reception flag remains OFF.
[0071] Next, the control management unit 11 reads the receive flag from the storage unit 14 and determines whether the receive flag is ON (i.e., whether it is set to a value indicating "received") (see S705 and S706 in Figure 8). Since the receive flag is OFF (i.e., a value indicating "not received"), the control management unit 11 decides to use control information generated by the control calculation unit 15 instead of using the control information "ABCD1" written in the storage unit 14. The control management unit 11 outputs an instruction to the control calculation unit 15 to execute the control calculation, and the control calculation unit 15, upon receiving the instruction, reads the data necessary for control from the storage unit 14 and performs the control calculation (S708). The control calculation unit 15 obtains control information (in this case, for example, "ABCD2") as the control calculation result and passes the obtained control information to the control management unit 11 (S708). The control management unit 11 controls the controlled device 300 based on the control information generated by the control calculation unit 15 (S708).
[0072] As described above, according to this embodiment, by setting the reception flag ON when control information is received from the control calculation unit 200, and keeping the reception flag OFF when it is not received, it is possible to easily determine whether the control information stored in the memory unit is usable or not. When the reception flag is ON, the controlled device is controlled using the control information stored in the memory unit, and when the reception flag is OFF, the device generates control information and uses the generated control information to control the controlled device. In this way, by distinguishing between cases where control information has been received and cases where it has not been received, it is possible to continue appropriate control of the controlled device 300 even when control information cannot be received from the control calculation unit 200 due to network failure or communication delay.
[0073] (Third embodiment) In the first embodiment, the difference between the current time and the reception time was used to determine whether the control information in the storage unit was usable or not. If it was determined that it was unusable, the control device 100 performed a control calculation. In the first embodiment, if communication with the control calculation device 200 was then performed normally, control using the control information generated by the control calculation device 200 became possible. However, if communication did not return to normal, the control device 100 would continue to perform control calculations, increasing the load on the control device 100. Therefore, in the third embodiment, if it was determined that the control information in the storage unit was unusable, the device that performed the control calculation on the cloud was changed from the control calculation device 200 (hereinafter referred to as the first control calculation device) to another control calculation device on the cloud (the second control calculation device). The following description will focus on the differences from the first embodiment.
[0074] Figure 10 shows the overall configuration of the system according to the third embodiment. A second control arithmetic unit 500 has been added. The second control arithmetic unit 500 is connected to the control device 100B via the Internet 400. The second control arithmetic unit 500 has the same configuration and functions as the control arithmetic unit 200 (hereinafter referred to as the first control arithmetic unit 200). The second control arithmetic unit 500 is, for example, a virtual server located on the cloud. The control device 100B can selectively connect to either the first control arithmetic unit 200 or the second control arithmetic unit 500 via the Internet 400. Initially, the control device 100B is assumed to be connected to the first control arithmetic unit 200.
[0075] Figure 11 is a block diagram showing a control device 100B according to a third embodiment.
[0076] The control device 100B comprises a time management unit 12, a communication unit 13B, a storage unit 14, and a control unit 16. The control unit 16 includes a control management unit 11 and a control calculation unit 15.
[0077] The control management unit 11, time management unit 12, storage unit 14, and control calculation unit 15 are the same as in the first embodiment, so their description is omitted.
[0078] The communication unit 13B includes a change determination unit 21. The change determination unit 21 decides to change the device that performs control calculations in the cloud from the first control calculation device 200 to the second control calculation device 500 if the difference between the current time and the reception time is greater than a predetermined time. In this case, the communication unit 13B or the transmission unit 18 sends a change notification to the second control calculation device 500 indicating that the device that performs control calculations will be changed from the first control calculation device 200 to the second control calculation device 500 (the connection destination of the control device 100B will be changed to the second control calculation device 500). The change notification may include a connection request to establish a connection with the second control calculation device 500, as well as state data representing the current state of the controlled device 300, or a set of said state data and control information generated by the control calculation performed immediately before. The state data may include measurement data acquired by the sensors of the controlled device 300, as well as information indicating whether the controlled device 300 is normal or abnormal.
[0079] Figure 12 is a flowchart showing an example of the processing of the control device 100B. The difference from the first embodiment is that a step S309 is added after step S308, in which the connection destination of the control device 100B is changed to the second control calculation unit 500. The differences from the first embodiment will be explained below.
[0080] Similar to the first embodiment, if the difference between the current time and the reception time is greater than a predetermined time, the device controls the controlled device 300 using the control information generated by the device itself (S308). After this, in the third embodiment, the communication unit 13B sends a notification (change notification) to the second control calculation device 500 that the device performing the control calculations will be changed from the first control calculation device 200 to the second control calculation device 500 (S309). At this time, the first control calculation device 200, which is the original connection destination, may also be sent the same change notification, or a notification that it is no longer necessary to perform control calculations. Alternatively, the connection with the first control calculation device 200 may be disconnected.
[0081] Next, the operation of each part of the control device 100B will be explained using the sequence diagram shown in Figure 13. Figure 13 is a sequence diagram showing the operation of each part of the control device 100B. The difference from the first embodiment is that a change notification is sent to the second control calculation unit 500 at the end of the sequence (S308). The rest is the same as the first embodiment, so the explanation is omitted.
[0082] In this embodiment, the decision of whether or not to send a notification of a change in the connection destination was made based on the difference between the current time and the reception time, but a similar decision may be made based on a reception flag, as in the second embodiment.
[0083] In this embodiment, a change notification was sent even if control information was not received only once. However, a change notification may be sent only when control information is not received multiple times consecutively. Alternatively, other methods may be used, such as sending a change notification when the average number of failures exceeds a predetermined value.
[0084] According to this embodiment, even if control information cannot be received from the first control calculation device 200, the control device 100B will temporarily perform control calculations on its own, but thereafter, it will have another control calculation device, the second control calculation device 500, perform the control calculations. This makes it possible to reduce the load on the device 100B while continuing control at the same level as before it could no longer receive control information from the first control calculation device 200.
[0085] Another effect of this embodiment is to consider the case where there are multiple controlled devices 300, and the first control calculation device 200 performs control calculations related to these multiple controlled devices 300. When control information can no longer be received from the first control calculation device 200, it may be impossible for the control device 100B to perform control calculations for each of the multiple controlled devices 300. For example, it may not be possible to complete all of the control calculations for each of the multiple controlled devices 300 within a predetermined time. In this case as well, this problem can be resolved by having the second control calculation device 500 take over the control calculations from the first control calculation device 200.
[0086] (Hardware configuration) Figure 14 shows the hardware configuration of the control device according to the first to third embodiments. The control device consists of a computer device 600. The computer device 600 includes a CPU 601, an input interface 602, a display device 603, a communication device 604, a main memory 605, and an external memory device 606, which are interconnected by a bus 607.
[0087] The CPU (Central Processing Unit) 601 executes a computer program on the main memory 605. The computer program is a program that implements each of the above-described functional configurations of the control unit. The computer program may not be a single program, but rather a combination of multiple programs or scripts. Each functional configuration is realized by the CPU 601 executing the computer program.
[0088] The input interface 602 is a circuit for inputting operation signals from input devices such as keyboards, mice, and touch panels to the control device.
[0089] The display device 603 displays data output from the control device. The display device 603 is, for example, an LCD (liquid crystal display), an organic electroluminescent display, a CRT (cathode ray tube), or a PDP (plasma display), but is not limited to these. Data output from the computer device 600 can be displayed on the display device 603.
[0090] The communication device 604 is a circuit for the control device to communicate with an external device wirelessly or via a wired connection. Data can be input from the external device via the communication device 604. The data input from the external device can be stored in the main memory 605 or the external memory 606. The communication device 604 corresponds to the communication unit (transmitter and receiver) of the control device.
[0091] The main memory 605 stores computer programs, data necessary for the execution of computer programs, and data generated by the execution of computer programs. Computer programs are loaded and executed on the main memory 605. The main memory 605 is, for example, RAM, DRAM, or SRAM, but is not limited to these. The storage unit of the control device according to the first to third embodiments may be built on the main memory 605.
[0092] The external storage device 606 stores computer programs, data necessary for the execution of computer programs, and data generated by the execution of computer programs. These computer programs and data are read into the main memory 605 when the computer programs are executed. The external storage device 606 is, for example, a hard disk, an optical disk, flash memory, and magnetic tape, but is not limited to these. The storage unit of the control device according to the first to third embodiments may be built on the main memory 605.
[0093] The computer program may be pre-installed on the computer device 600, or it may be stored on a storage medium such as a CD-ROM. Furthermore, the computer program may be uploaded to the internet.
[0094] Furthermore, the control devices according to embodiments 1 to 3 may be configured as a single computer device 600, or as a system consisting of multiple interconnected computer devices 600.
[0095] The present invention is not limited to the embodiments described above, and the components can be modified and implemented in practice without departing from the spirit of the invention. Furthermore, various inventions can be formed by appropriately combining the multiple components disclosed in the embodiments described above. For example, a configuration in which some components are removed from all the components shown in each embodiment is also conceivable. Moreover, components described in different embodiments may be appropriately combined.
[0096] Furthermore, this embodiment can also be configured as follows. [Item 1] A transmission unit that transmits status data regarding the state of the controlled device to the control calculation unit via a communication network, A receiving unit that receives first control information generated by a control calculation based on the state data from the controlled device, A storage unit that stores the first control information received by the receiving unit and the reception time when the first control information was received, In accordance with the control timing for controlling the controlled device, the storage unit determines whether or not the first control information can be used based on the reception time. If the first control information is available, the controlled device is controlled based on the first control information. A control unit, which, if the first control information is unavailable, performs a control calculation based on the state data to generate second control information and controls the controlled device based on the second control information, A control device equipped with the following features. [Item 2] The control unit determines that the first control information is available if the difference between the current time and the reception time is less than or equal to a predetermined time, and that the first control information is unavailable if the difference is greater than the predetermined time. The control device described in item 1. [Item 3] The transmitting unit, when the first control information is unavailable, transmits a change notification to the other control calculation device indicating that the device performing the control calculation will be changed from the control calculation device to another control calculation device. The control device described in item 1 or 2. [Item 4] The device includes a writing unit that writes the first control information and the reception time to a predetermined area of the storage unit, The first control information and the reception time in the predetermined area are overwritten each time the first control information is received by the received first control information and reception time. A control device as described in any one of items 1 to 3. [Item 5] The writing unit writes the first control information and the reception time to adjacent memory addresses or the same memory address in the storage unit. The control unit reads the first control information and the reception time from the adjacent memory address or the same memory address. A control device as described in any one of items 1 to 4. [Item 6] A transmission unit that transmits status data regarding the state of the controlled device to the control calculation unit via a communication network, A receiving unit that receives first control information generated by a control calculation based on the state data from the controlled device, A storage unit including a first storage area for storing the first control information and a second storage area for storing reception identification information indicating whether or not the first control information has been received, A reset unit that resets the reception identification information in the second storage area of the storage unit to a first value indicating that the first control information has not been received, A writing unit, in response to the reception unit receiving the first control information, overwrites the first control information stored in the first storage area of the storage unit with the first control information received by the reception unit, and sets the reception identification information in the second storage area of the storage unit to a second value indicating that the first control information has been received. In accordance with the control timing for controlling the controlled device, the received identification information in the second storage area of the storage unit is checked. If the received identification information is the second value, the controlled device is controlled based on the first control information in the first storage area of the storage unit. A control unit, which generates second control information by performing a control calculation based on the state data when the received identification information is the first value, and controls the controlled device based on the second control information, A control device equipped with the following features. [Item 7] The reset unit resets the reception identification information before the transmission unit transmits the status data. The control device described in item 6. [Item 8] The transmitting unit, when the received identification information is the second value, transmits a change notification to the other control calculation device indicating that the device performing the control calculation will be changed from the control calculation device to another control calculation device. The control device described in item 6 or 7. [Item 9] The first memory area and the second memory area are adjacent memory addresses or the same memory address in the storage unit. The control unit reads the first control information and the received identification information from the adjacent memory address or the same memory address. A control device as described in any one of items 6 to 8. [Explanation of symbols]
[0097] 100 Control device 100A control device 100B Control Unit 11, 11A Control Management Unit 12, 12A Time management department 13, 13A, 13B Communication Department 14 Storage section 15 Control Calculation Unit 16 Control Unit 17 Writing Section 18 Transmitter 19 Receiving Unit 20 Reset section 21 Change Judgment Unit 200 Control and calculation unit (first control and calculation unit) 300 Controlled device 400 Communication Networks (Internet) 500 Another control calculation unit (second control calculation unit)
Claims
1. A transmission unit that transmits status data regarding the state of the controlled device to the control calculation unit via a communication network, A receiving unit that receives first control information generated by a control calculation based on the state data from the controlled device, A storage unit that stores the first control information received by the receiving unit and the reception time when the first control information was received, In accordance with the control timing for controlling the controlled device, the storage unit determines whether or not the first control information can be used based on the reception time. If the first control information is available, the controlled device is controlled based on the first control information. A control unit, which, if the first control information is unavailable, performs a control calculation based on the state data to generate second control information and controls the controlled device based on the second control information, A control device equipped with the following features.
2. The control unit determines that the first control information is available if the difference between the current time and the reception time is less than or equal to a predetermined time, and that the first control information is unavailable if the difference is greater than the predetermined time. The control device according to claim 1.
3. The transmitting unit, when the first control information is unavailable, transmits a change notification to the other control calculation device indicating that the device performing the control calculation will be changed from the control calculation device to another control calculation device. The control device according to claim 1.
4. The device includes a writing unit that writes the first control information and the reception time to a predetermined area of the storage unit, The first control information and the reception time in the predetermined area are overwritten each time the first control information is received by the received first control information and reception time. The control device according to claim 1.
5. The writing unit writes the first control information and the reception time to adjacent memory addresses or the same memory address in the storage unit. The control unit reads the first control information and the reception time from the adjacent memory address or the same memory address. The control device according to claim 1.
6. A transmission unit that transmits status data regarding the state of the controlled device to the control calculation unit via a communication network, A receiving unit that receives first control information generated by a control calculation based on the state data from the controlled device, A storage unit including a first storage area for storing the first control information and a second storage area for storing reception identification information indicating whether or not the first control information has been received, A reset unit that resets the reception identification information in the second storage area of the storage unit to a first value indicating that the first control information has not been received, A writing unit, in response to the reception unit receiving the first control information, overwrites the first control information stored in the first storage area of the storage unit with the first control information received by the reception unit, and sets the reception identification information in the second storage area of the storage unit to a second value indicating that the first control information has been received. In accordance with the control timing for controlling the controlled device, the received identification information in the second storage area of the storage unit is checked. If the received identification information is the second value, the controlled device is controlled based on the first control information in the first storage area of the storage unit. A control unit, which generates second control information by performing a control calculation based on the state data when the received identification information is the first value, and controls the controlled device based on the second control information, A control device equipped with the following features.
7. The reset unit resets the reception identification information before the transmission unit transmits the status data. The control device according to claim 6.
8. The transmitting unit, when the received identification information is the second value, transmits a change notification to the other control calculation device indicating that the device performing the control calculation will be changed from the control calculation device to another control calculation device. The control device according to claim 6.
9. The first memory area and the second memory area are adjacent memory addresses or the same memory address in the storage unit. The control unit reads the first control information and the received identification information from the adjacent memory address or the same memory address. The control device according to claim 6.