Method for Synchronizing a Plurality of Simulations
20190005167 ยท 2019-01-03
Inventors
Cpc classification
G05B19/41885
PHYSICS
G05B19/05
PHYSICS
International classification
Abstract
A method for synchronizing a plurality of simulations executed by respective simulation programs, an associated computer program product and an associated coordination unit, wherein a plurality of simulations executed by respective simulation programs are synchronized, and wherein the following steps are performed by a coordination unit, i.e., determination of respective status messages of the simulation programs for the completed run through a given cycle, where for each simulation an associated cycle is established by a respective sequence via the respective simulation program of logic steps to be executed, and where outputting in each case of a synchronization message to one or more of the simulation programs, if the respective status messages of the plurality of simulations are present, such that each synchronization message triggers a start of a following cycle of the respective simulation program.
Claims
1. A method for synchronizing a plurality of simulations executed by respective simulation programs, the method comprising: determining, by a coordination unit, respective status messages of the respective simulation programs for a completed run through a given cycle, for each simulation an associated cycle being established by a respective sequence via the respective simulation program of logic steps to be executed; and outputting, by the computation unit, in each case of a synchronization message to at least one of the simulation programs, if the respective status messages of the plurality of simulations are present, each synchronization message triggering a start of a following cycle of the respective simulation program.
2. The method as claimed in claim 1, wherein the respective cycles are constituted differently depending on a sequence of a given simulation program.
3. The method as claimed in claim 1, wherein output of the respective synchronization message is only possible when the status messages of all simulation programs to be synchronized have been ascertained.
4. The method as claimed in claim 2, wherein output of the respective synchronization message is only possible when the status messages of all simulation programs to be synchronized have been ascertained.
5. The method as claimed in claim 1, wherein the coordination unit exchanges data via a bidirectional communication channel with the respective simulation programs.
6. The method as claimed in claim 5, wherein the respective status messages from the respective simulation programs are received via the bidirectional communication channel by the coordination unit.
7. The method as claimed in claim 5, wherein the respective synchronization messages are sent by the coordination unit via the bidirectional communication channel to the respective simulation programs.
8. The method as claimed in claim 6, wherein the respective synchronization messages are sent by the coordination unit via the bidirectional communication channel to the respective simulation programs.
9. The method as claimed in claim 1, wherein the coordination unit ascertains respective cycle counter information for each simulation program.
10. The method as claimed in claim 1, wherein, in conjunction with the synchronization message or before processing of the synchronization message, one of (i) updated input data and (ii) a notification of updating of input data are mutually made available to the simulation programs by one of (i) the coordination unit and (ii) the simulation programs.
11. The method as claimed in claim 1, wherein a cycle is allocated for each simulation, in particular by the respective simulation program or the coordination unit.
12. The method as claimed in claim 11, wherein a cycle is allocated for each simulation by one of (i) the respective simulation program and (ii) the coordination unit.
13. A non-transitory computer program product encoded with a computer program which, when executed by program-controlled device, causes synchronization of a plurality of simulations executed by respective simulation programs comprises, the computer program comprising: program code for determining, by a coordination unit, respective status messages of the respective simulation programs for a completed run through a given cycle, for each simulation an associated cycle being established by a respective sequence via the respective simulation program of logic steps to be executed; and program code for determining, by a coordination unit, respective status messages of the respective simulation programs for a completed run through a given cycle, for each simulation an associated cycle being established by a respective sequence via the respective simulation program of logic steps to be executed.
14. A coordination unit on a computer, wherein the coordination unit is configured to: determine respective status messages of the respective simulation programs for a completed run through a given cycle, for each simulation an associated cycle being established by a respective sequence via the respective simulation program of logic steps to be executed; and output in each case of a synchronization message to at least one of the simulation programs, if the respective status messages of the plurality of simulations are present, each synchronization message triggering a start of a following cycle of the respective simulation program; wherein the coordination unit is configured to communicate with the simulation programs.
15. The coordination unit as claimed in claim 14, wherein the coordination unit on the computer is executed jointly with at least one the simulation programs.
16. The coordination unit as claimed in claim 14, wherein the plurality of simulation programs are executed on one or more separate computers.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The invention is explained in greater detail below on the basis of examples of embodiment with the aid of the figures, in which:
[0039]
[0040]
DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS
[0041] To illustrate the present invention, a process for slowing down a drive for a production machine, which is to be simulated, is taken by way of example as a basis. The drive should operate with a definable and adaptable speed for the normal operation and, after the initiation of a stopping procedure, the speed should be reduced in accordance with a selected stop mode. In the simulation of such a process, a multiplicity of processes taking place have to be simulated and coordinated with one another. The simulation of the mechanical braking process and of a user input possibly occurring and interventions in the braking process triggered by a movement control are to be considered. Three simulations result, for example, for such a scenario, i.e., one for the control, one for the drive and one for the mechanical system. Simulations mutually influencing one another are to be executed such that a synchronization occurs between them. Thus, the sub-simulations can have access to current data of other sub-simulations.
[0042]
[0043] For the determination of the simulation result of the speed setting, for example, apart from taking account of the predictable influences remaining relatively constant due to the simulation of the movement control, account must also be taken of the irregular and fluctuating input data due to the simulation of a user input process. The synchronization of the different processes should therefore precisely not be established based on the computing time actually required for a simulation and also not on the basis of a defined time to be simulated. Instead, the processing of cycles and the ending of cycles is used as a trigger for a synchronization.
[0044] Determination S1 of status messages of the simulation programs to be synchronized occurs in the present example by the evaluation of received status messages by the coordination unit. The different simulations send their status message to the coordination unit when their cycle has been run through. The status message thus contains, by way of example, the statement cycle simulation 01 calculation completed.
[0045] The coordination unit initiates the step of outputting S2 synchronization messages to all the simulation programs to be synchronized when the respective status messages of all the simulations are present. The slowest-running simulation has thus also been taken into account by the coordination unit and the start of the next cycle is performed in the various simulations synchronously coordinated with one another.
[0046] To illustrate the synchronization effect that is achieved by the present invention,
[0047] Simulations advantageously access current data of other simulations and at the same time all the simulations compute in parallel with the maximum possible speed. Times in which computing capacity is not required for the simulation in a simulation program are used by other processes. A computer with a plurality of cores is utilized in the optimum manner. Through the use of means of the operating system for the stopping of fast simulations, such as the above-described pipe, information is available to the operating system to supply the slower simulations with more computing time. It is thus not necessary to focus on a worst-case scenario in the configuration, but rather a flexible approach to the required computing capacity for each simulation can be taken.
[0048] Data from a simulation of, for example, a so-called PLC or programmable logic controller are integrated cycle-synchronized into another simulation, such as that of a controlled process, e.g., a production process.
[0049] Data transmissions also occurring in reality, such as via a hardware bus between a control and a drive, can be simulated and this simulation can be synchronized with other simulations. The control and drive communicate, for example, via various software and hardware layers. Both the hardware and also parts of the software layers are advantageously omitted in a simulation for reasons of speed and instead other communication means are used.
[0050] These other communication means form the simulation basis for the data exchange. The simulation of the data exchange can also implement a conversion of data formats, standardizations etc. and then simulate somewhat more than just the data exchange.
[0051] A manipulation of the time concept and, in general, the presence and knowledge of a time concept in different simulations is advantageously dispensed with. An advantageous effect of this is also that, for a simulation of a programmable logic controller, for example, a time which this control requires for its cycle can be assumed to be 0. If the speed of the time for the synchronization were used, this approach would fail, because the speed would be infinitely fast. The synchronization based on a time concept would therefore also fail. If, in special cases of application, a time concept of a simulation is required, for example time information of an application is to be made available as an output, a simulation can be calculated back for the time based on the separate cycle.
[0052] Although the invention has been illustrated and described more closely in detail by the examples of embodiment, the invention is not limited by the disclosed examples and other variations can be derived therefrom by the person skilled in the art without departing from the scope of protection of the invention.
[0053] Thus, while there have been shown, described and pointed out fundamental novel features of the invention as applied to a preferred embodiment thereof, it will be understood that various omissions and substitutions and changes in the form and details of the devices illustrated, and in their operation, may be made by those skilled in the art without departing from the spirit of the invention. For example, it is expressly intended that all combinations of those elements and/or method steps which perform substantially the same function in substantially the same way to achieve the same results are within the scope of the invention. Moreover, it should be recognized that structures and/or elements shown and/or described in connection with any disclosed form or embodiment of the invention may be incorporated in any other disclosed or described or suggested form or embodiment as a general matter of design choice. It is the intention, therefore, to be limited only as indicated by the scope of the claims appended hereto.