CN111638749A - Simulation system synchronization method, simulation device and system - Google Patents

Simulation system synchronization method, simulation device and system Download PDF

Info

Publication number
CN111638749A
CN111638749A CN202010489464.9A CN202010489464A CN111638749A CN 111638749 A CN111638749 A CN 111638749A CN 202010489464 A CN202010489464 A CN 202010489464A CN 111638749 A CN111638749 A CN 111638749A
Authority
CN
China
Prior art keywords
board card
timer board
simulation
time
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010489464.9A
Other languages
Chinese (zh)
Inventor
姜刚建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Runke General Technology Co Ltd
Original Assignee
Beijing Runke General Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Runke General Technology Co Ltd filed Critical Beijing Runke General Technology Co Ltd
Priority to CN202010489464.9A priority Critical patent/CN111638749A/en
Publication of CN111638749A publication Critical patent/CN111638749A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/12Synchronisation of different clock signals provided by a plurality of clock generators

Abstract

The invention provides a simulation system synchronization method, simulation equipment and a simulation system.A first receiving time is determined when a target timer board card receives a time synchronization request sent by a source timer board card, a first sending time is obtained from the time synchronization request, the target timer board card feeds back response information to the source timer board card, and the timing time when the response information is fed back is used as a second sending time; the target timer board card receives synchronous confirmation information sent by the source timer board card; and acquiring second receiving time from the synchronous confirmation information, determining delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, timing and calibrating the self according to the delay information, realizing clock synchronization of simulation equipment in the simulation system, ensuring simulation synchronization and improving the accuracy of a simulation result in the process that each simulation equipment utilizes the respective timer board card to simulate in the simulation system.

Description

Simulation system synchronization method, simulation device and system
Technical Field
The present invention relates to the field of simulation technologies, and in particular, to a simulation system synchronization method, a simulation device, and a simulation system.
Background
In the era of rapid development of science and technology, due to practical needs, simulation systems gradually develop from single simulation equipment to multi-equipment distributed simulation. Each simulation device is provided with a simulation clock belonging to the simulation device, the simulation clock is easily influenced by the temperature change of a processor, time drift is generated, the phenomenon that a plurality of simulation devices in the multi-device distributed simulation system are asynchronous in the simulation clocks is caused, the phenomenon that the simulation clocks of the plurality of simulation devices in the multi-device distributed simulation system are asynchronous is caused, the phenomenon that the plurality of simulation devices in the multi-device distributed simulation system are asynchronous in the simulation is caused, finally, logical disorder occurs among the plurality of simulation devices, and the accuracy of a simulation result is influenced.
Therefore, how to ensure the simulation synchronization of a plurality of simulation devices in the multi-device distributed simulation system becomes a technical problem to be solved at present.
Disclosure of Invention
In view of this, the present invention provides a simulation system synchronization method, a simulation device and a simulation system, so as to ensure simulation synchronization of a plurality of simulation devices in a multi-device distributed simulation system.
In order to achieve the purpose, the invention provides the following technical scheme:
a simulation system synchronization method is provided, the simulation system comprises a plurality of simulation devices, each simulation device comprises a timer board, different simulation devices are cascaded through the timer board, the plurality of simulation devices comprise a master simulation device, the rest are slave simulation devices, and the timing time of the timer board in each simulation device is used as the time of the simulation device, and the method comprises the following steps:
when the target timer board card receives a time synchronization request sent by the source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time; the time synchronization request includes: a first sending time, which is a timing time of the source timer board card when the source timer board card sends the time synchronization request;
the target timer board card feeds back response information corresponding to the time synchronization request to the source timer board card, and the timing time of the target timer board card when the response information is fed back is used as second sending time;
the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; the synchronization confirmation information includes: second receiving time, which is the timing time of the source timer board card when the source timer board card receives the response information;
the target timer board card determines delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, wherein the delay information is line delay or time drift;
the target timer board card carries out timing calibration on the target timer board card according to the delay information;
the timer board card in the main simulation equipment is a first source timer board card, each target timer board card is subsequently used as a new source timer board card after timing calibration is completed, and the timer board card which is adjacent to the source timer board card and does not complete timing calibration is used as a target timer board card.
Optionally, the method further includes:
and the target timer board receives a simulation starting command sent by the source timer board, wherein the simulation starting command is generated by the timer board in the main simulation equipment.
Optionally, the determining, by the target timer board card, delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time, and the second sending time includes:
calculating the time difference between the first receiving time and the first sending time to obtain a first time difference;
calculating the time difference between the second receiving time and the second sending time to obtain a second time difference;
and determining delay information between the target timer board card and the source timer board card by utilizing the first time difference and the second time difference.
Optionally, the method further includes:
and the target timer board receives a simulation stop command sent by the source timer board, wherein the simulation stop command is generated by the timer board in the main simulation equipment.
Optionally, timer board cards in different simulation devices are cascaded through optical fibers; and the timer board cards in the adjacent simulation equipment are communicated with each other by using the same optical fiber.
Optionally, the simulation interrupt intervals of the simulation interrupt signals generated by the timer board cards in each simulation device are consistent.
Optionally, the simulation system further includes: an upper computer; the main simulation equipment is determined by the upper computer.
The utility model provides a simulation equipment, simulation equipment includes the timer integrated circuit board, the timer integrated circuit board includes at least: a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for executing the simulation system synchronization method provided by the invention.
A simulation system, the simulation system comprising: the simulation system comprises a plurality of simulation devices, wherein each simulation device comprises a timer board card, different simulation devices are cascaded through the timer board cards, the simulation devices comprise a master simulation device, the rest simulation devices are slave simulation devices, the timing time of the timer board card in each simulation device is used as the time of the simulation device, and each timer board card is used for:
when the target timer board card receives a time synchronization request sent by the source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time; the time synchronization request includes: a first sending time, which is a timing time of the source timer board card when the source timer board card sends the time synchronization request;
the target timer board card feeds back response information corresponding to the time synchronization request to the source timer board card, and the timing time of the target timer board card when the response information is fed back is used as second sending time;
the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; the synchronization confirmation information includes: second receiving time, which is the timing time of the source timer board card when the source timer board card receives the response information;
the target timer board card determines delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, wherein the delay information is line delay or time drift;
the target timer board card carries out timing calibration on the target timer board card according to the delay information;
the timer board card in the main simulation equipment is a first source timer board card, each target timer board card is subsequently used as a new source timer board card after timing calibration is completed, and the timer board card which is adjacent to the source timer board card and does not complete timing calibration is used as a target timer board card.
Optionally, the simulation system further includes: an upper computer; the main simulation equipment is determined by the upper computer.
According to the technical scheme, compared with the prior art, the invention provides a simulation system synchronization method, simulation equipment and a simulation system, when a target timer board card receives a time synchronization request sent by a source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time, obtains the first sending time of the source timer board card when the source timer board card sends the time synchronization request from the time synchronization request, then feeds back response information corresponding to the time synchronization request to the source timer board card, and takes the timing time of the target timer board card when the response information is fed back as second sending time; then the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; and acquiring second receiving time of the source timer board card when the source timer board card receives the response information from the synchronization confirmation information, so that the target timer board card determines delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, and finally the target timer board card performs timing calibration on the target timer board card according to the delay information, so that each target timer board card and the source timer board card adjacent to the target timer board card realize clock synchronization, and further the clock synchronization of each simulation device in the simulation system is realized, and therefore, the synchronization of simulation can be ensured in the process that each simulation device utilizes the respective timer board card to perform simulation in the simulation system, and the accuracy of a simulation result is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a simulation system synchronization method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a cascade of simulation devices according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for determining, by a target timer board card according to the first receiving time, the first sending time, the second receiving time, and the second sending time, delay information between the target timer board card and a source timer board card according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the era of rapid development of science and technology, due to practical needs, simulation systems gradually develop from single simulation equipment to multi-equipment distributed simulation. Each simulation device is provided with a simulation clock belonging to the simulation device, the simulation clock is easily influenced by the temperature change of a processor, time drift is generated, the phenomenon that a plurality of simulation devices in the multi-device distributed simulation system are asynchronous in the simulation clocks is caused, the phenomenon that the simulation clocks of the plurality of simulation devices in the multi-device distributed simulation system are asynchronous is caused, the phenomenon that the plurality of simulation devices in the multi-device distributed simulation system are asynchronous in the simulation is caused, finally, logical disorder occurs among the plurality of simulation devices, and the accuracy of a simulation result is influenced.
In order to solve the technical problems, a simulation system synchronization method based on IRIG-B, a simulation system synchronization method based on NTP (network time Protocol) and a simulation system synchronization method based on IEEE1588 are provided.
The IRIG-B-based simulation system synchronization method needs the support of an additional hardware circuit, and needs to continuously detect the level width of a synchronization signal, the bit position of the synchronization signal is narrow, errors are easy to occur in the process of detecting the synchronization signal, and the precision is low. In addition, the transmission speed of the synchronous signal transmission process of the IRIG-B simulation system synchronization method is low, the IRIG-B simulation system synchronization method is easily interfered by signals, and the stability and the precision of the whole simulation system can be reduced. Meanwhile, the synchronization method of the IRIG-B simulation system adopts a mode that one master simulation device simultaneously controls a plurality of slave simulation devices to carry out simulation, and the plurality of slave simulation devices do not have information interaction, so that the phenomenon that simulation clocks of the plurality of slave simulation devices are not synchronized due to the influence of a transmission link between the master simulation device and the slave simulation devices is caused. And the simulation operation can not be performed by taking any simulation node as a synchronous reference source, and the simulation mode is not flexible.
In the NTP-based simulation System synchronization method, a GPS (Global Positioning System) signal needs to be transmitted, the GPS signal is transmitted in a wireless transmission manner, the transmission speed is low, the transmission process is easily interfered by signals, and the stability and the accuracy of the whole simulation System are reduced. In addition, the NTP simulation system synchronization method also adopts a mode that one master simulation device simultaneously controls a plurality of slave simulation devices to perform simulation, and the simulation clocks of the plurality of slave simulation devices cannot guarantee synchronization. And the simulation operation can not be performed by taking any simulation node as a synchronous reference source, and the simulation mode is not flexible.
The simulation system synchronization based on IEEE1588 is easily influenced by system equipment, clock and communication network stability, the synchronization precision cannot be guaranteed, simultaneously, the completion is assisted by a Beidou/GPS module with high price, the cost is high, in addition, a client and a server communicate through a User Datagram Protocol (UDP), the analysis of messages exists in the UDP communication process, the complexity of the whole simulation system is improved by many times, and the algorithm difficulty is increased due to the influence of the symmetry of a physical line and the transmission and analysis of the messages. The UDP communication process needs Ethernet transmission, the transmission speed is low, the transmission process is easily interfered by signals, and the stability and the precision of the whole simulation system can be reduced. Meanwhile, the simulation can be carried out only by using the GPS time service equipment as a synchronous reference source in the whole simulation system by using the method, and a mode that one master simulation equipment controls a plurality of slave simulation equipment to carry out simulation is also adopted, so that the synchronization of a plurality of slave simulation equipment simulation clocks cannot be ensured. And the simulation operation can not be performed by taking any simulation node as a synchronous reference source, and the simulation mode is not flexible.
In order to further solve some or all of the technical problems, the invention provides a simulation system synchronization method, simulation equipment and a simulation system, wherein when a target timer board card receives a time synchronization request sent by a source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time, and obtains first sending time of the source timer board card when the source timer board card sends the time synchronization request from the time synchronization request, and then the target timer board card feeds back response information corresponding to the time synchronization request to the source timer board card, and takes the timing time of the target timer board card when the response information is fed back as second sending time; then the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; and acquiring second receiving time of the source timer board card when the source timer board card receives the response information from the synchronization confirmation information, so that the target timer board card determines delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, and finally the target timer board card performs timing calibration on the target timer board card according to the delay information, so that each target timer board card and the source timer board card adjacent to the target timer board card realize clock synchronization, and further the clock synchronization of each simulation device in the simulation system is realized, and therefore, the synchronization of simulation can be ensured in the process that each simulation device utilizes the respective timer board card to perform simulation in the simulation system, and the accuracy of a simulation result is improved.
Optionally, in the embodiment of the present invention, timer boards in different emulation devices are cascaded through an optical fiber. The invention has the advantages that the optical fiber signal transmission speed is high, the transmission process is not easily influenced, the stability and the precision of the whole simulation system are improved, the level width of a synchronous signal does not need to be detected, and the synchronization process is not easy to make mistakes.
The simulation system synchronization method provided by the embodiment of the invention is introduced below, fig. 1 is a flowchart of the simulation system synchronization method provided by the embodiment of the invention, the simulation system includes a plurality of simulation devices, each simulation device includes a timer board, different simulation devices are cascaded through the timer board, the plurality of simulation devices include a master simulation device, the rest are slave simulation devices, the timing time of the timer board in each simulation device is taken as the time of the simulation device, that is, the start-stop, simulation duration and simulation step length of simulation in each simulation device are controlled according to the interrupt signals generated on the timer board included in each simulation device as the reference, after the different simulation devices are cascaded through the timer board, a user can set any simulation device in the simulation system as the master simulation device through an upper computer, the other simulation devices are set as slave simulation devices, and the slave simulation devices simulate by using the master simulation device as a synchronization reference source, and the simulation system synchronization method provided by the embodiment of the present invention is applied to a timer board card in any slave simulation device in a simulation system, and referring to fig. 1, the simulation system synchronization method provided by the embodiment of the present invention may include:
step S100, when a target timer board card receives a time synchronization request sent by a source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time; the time synchronization request includes: and the first sending time is the timing time of the source timer board card when the source timer board card sends the time synchronization request.
The timer board card in the main simulation equipment is a first source timer board card, each target timer board card is subsequently used as a new source timer board card after timing calibration is completed, and the timer board card which is adjacent to the source timer board card and does not complete timing calibration is used as the target timer board card.
And after the target timer board card receives the time synchronization request sent by the source timer board card, extracting first sending time from the time synchronization request.
Optionally, the simulation system synchronization method provided in the embodiment of the present invention may further include:
the target timer board receives a simulation start command sent by the source timer board, wherein the simulation start command is generated by the timer board in the main simulation equipment. That is to say, the simulation system is started by the timer board in the main simulation device triggering the simulation, and the main simulation device plays a control role in the simulation system. It can be understood that: in the actual simulation, there may be other embodiments for starting the simulation, such as automatically starting the simulation at a certain time interval after completing the synchronization.
After a timer board card in the master simulation device generates a simulation start command, the simulation start command is transmitted to a timer board card in slave simulation devices adjacent to the timer board card in the master simulation device according to the information transmission direction, after the timer board card in the slave simulation devices receives the simulation start command, the simulation start command is continuously transmitted to a timer board card in the next slave simulation device adjacent to the slave simulation device, and so on until the timer board cards of all the simulation devices in the simulation system receive the simulation start command and start to execute a simulation process. It can be understood that the time synchronization request in the embodiment of the present invention may be merged into the simulation start command, so that the simulation system executes a specific simulation process after performing simulation synchronization. Of course, the time synchronization request and the simulation start command may also be sent separately, thereby performing the desired synchronization and simulation processes.
Step S110, the target timer board feeds back response information corresponding to the time synchronization request to the source timer board, and takes the time counted by the target timer board when the response information is fed back as a second sending time.
And when the target timer board card feeds back the response information corresponding to the time synchronization request to the source timer board card, recording the timing time of the target timer board card when the response information is fed back as second sending time.
Step S120, the target timer board receives synchronization confirmation information sent by the source timer board after receiving the response information, where the synchronization confirmation information includes: and the second receiving time is the timing time of the source timer board card when the source timer board card receives the response information.
And after receiving the synchronization confirmation information, the target timer board extracts second receiving time from the synchronization confirmation information.
Step S130, the target timer board determines delay information between the target timer board and the source timer board according to the first receiving time, the first sending time, the second receiving time and the second sending time.
The delay information is line delay or time drift, the line delay refers to delay generated by a communication line between the source timer board card and the target timer board card, and the time drift refers to time drift generated by asynchronous time between the source timer board card and the target timer board card.
And step S140, the target timer board carries out timing calibration on the target timer board according to the delay information.
It should be noted that, since the delay information is line delay or time drift, the target timer board performs timing calibration on itself according to the second receiving time and the delay information when the delay information is line delay, and performs timing calibration on itself according to the timing time and the delay information when the delay information is time drift.
And after the target timer board card performs timing calibration on the target timer board card according to the delay information, clock synchronization of the target timer board card and the source timer board card is ensured.
In practical applications, when the simulation devices are cascaded, a ring connection mode may be adopted, and a non-ring connection mode may also be adopted. For example, there are 4 emulation devices A, B, C, D. The annular connection mode is as follows: a is connected with B, B is connected with C, C is connected with D, and D is connected with A. The non-annular connection mode is as follows: a is connected with B, B is connected with C, and C is connected with D.
Optionally, the method of the present invention may further include: the target timer board receives a simulation stop command sent by the source timer board, wherein the simulation stop command is generated by the timer board in the main simulation equipment. That is to say, in the simulation system, the timer board in the main simulation device triggers the simulation to stop, and the main simulation device plays a control role in the simulation system. It will be appreciated that, as with the simulation start in the previous embodiment, there are other embodiments for stopping the simulation, such as automatically stopping the simulation after completing the simulation task.
The simulation stopping command in the invention is generated by a timer board card in the main simulation equipment, after the timer board card in the main simulation equipment generates the simulation stopping command, the simulation stopping command is transmitted to the timer board card in the slave simulation equipment adjacent to the main simulation equipment according to the information transmission direction, after the timer board card in the slave simulation equipment receives the simulation stopping command, the simulation stopping command is transmitted to the timer board card in the next slave simulation equipment adjacent to the slave simulation equipment, and so on, until the timer board card in the last slave simulation equipment in the simulation system receives the simulation stopping command, all the simulation equipment in the simulation system receive the simulation stopping command, and the simulation process is stopped.
As shown in the schematic diagram of simulation device cascade shown in fig. 2, the timer boards in different simulation devices (device 1, device 2, and device 3 in fig. 2) of the present invention are all provided with optical fiber interfaces (such as SFP1 and SFP2), so that the timer boards in different simulation devices are cascaded through optical fibers, the timer boards in adjacent simulation devices are in interactive communication through the same optical fiber, and the problem of different optical fiber transmission delays caused by the lengths of the optical fibers is solved by offsetting the delays between the target timer board and the source timer board corresponding to the target timer board, thereby reducing the complexity of the simulation system to a certain extent. The timer board cards of different simulation devices can transmit information in an 8b/10b coding mode, the signal transmission speed is high, the transmission process is not influenced by asymmetry of an optical fiber uplink and downlink data line, the stability and the precision of the whole simulation system are improved, the level width of a synchronous signal does not need to be detected, errors are not prone to occurring in the synchronization process, different simulation devices are cascaded through the timer board cards, information interaction exists among all slave simulation devices, and each target timer board card in the simulation system is in clock synchronization with a source timer board card. It is understood that, in practical applications, the timer boards may be cascaded in other manners, such as in a manner of using a coaxial cable.
In addition, in other embodiments, the simulation system may further include an upper computer, and the upper computer sends a corresponding setting instruction to determine the main simulation device, so that the present invention may set any simulation device in the simulation system as the main simulation device, that is, the present invention may set any simulation device in the simulation system as the synchronization reference source for simulation operation, and the simulation mode is flexible.
The embodiment of the invention provides a simulation system synchronization method, wherein when a target timer board card receives a time synchronization request sent by a source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time, and obtains first sending time of the source timer board card when the source timer board card sends the time synchronization request from the time synchronization request, and then the target timer board card feeds back response information corresponding to the time synchronization request to the source timer board card, and takes the timing time of the target timer board card when the response information is fed back as second sending time; then the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; and acquires the second receiving time of the source timer board card when the source timer board card receives the response information from the synchronization confirmation information, therefore, the target timer board card determines the delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, and finally the target timer board card performs timing calibration on the target timer board card according to the delay information, thereby, each target timer board card and the adjacent source timer board card realize clock synchronization, and further realize clock synchronization of each simulation device in the simulation system, thereby, in the process that each simulation device utilizes the respective timer board card to simulate in the simulation system, the simulation synchronization can be ensured, the time synchronization precision is as high as 0.1us magnitude, and the accuracy of the simulation result is improved.
In the invention, the simulation starting command and the simulation stopping command are generated by the timer board card in the main simulation equipment in the simulation system, and the simulation process is started after all the simulation equipment in the simulation system receives the simulation starting command.
When the master simulation device is not started, even if the slave simulation device is started, the timer board card of the slave simulation device cannot synchronize the simulation model to run simulation. Only after receiving a simulation start command generated by the master simulation equipment, the master simulation equipment and the slave simulation equipment are synchronized to run simulation according to the same simulation step length at the same time point.
Optionally, in the embodiment of the present invention, the simulation interrupt intervals of the simulation interrupt signals generated by the timer boards in each simulation device are consistent, that is, the simulation step lengths are consistent, a user may configure the simulation interrupt intervals of the simulation interrupt signals correspondingly generated by each timer board in a configuration manner, moreover, the simulation interrupt intervals of the simulation interrupt signals correspondingly generated by each timer board card can be configured to be consistent, so that each timer board card synchronously generates the simulation interrupt signals, after each timer board transmits the simulation interrupt signal to the corresponding simulation device, each simulation device can execute simulation operation by using the received simulation interrupt signal, the simulation step length of each simulation device is consistent, the synchronization of the simulation step length in the simulation system is realized, the synchronization of the simulation is further ensured, and the accuracy of the simulation result is improved.
Because each simulation device comprises a timer board card, the start-stop, simulation duration and simulation step length of simulation in each simulation device are based on the interrupt signal generated on the timer board card respectively contained in the simulation device, and the timer board card in the simulation device is a high-precision timer board card, the accurate interrupt signal can be generated, and the simulation precision of the simulation device is improved.
Optionally, the simulation system in the embodiment of the present invention further includes: an upper computer; the main simulation equipment is determined by the upper computer.
Next, a method for determining delay information between a target timer board and a source timer board according to a first receiving time, a first sending time, a second receiving time, and a second sending time, which is provided by the embodiment of the present invention, is described, where fig. 3 is a flowchart of a method for determining delay information between a target timer board and a source timer board according to a first receiving time, a first sending time, a second receiving time, and a second sending time, which is provided by the embodiment of the present invention, and with reference to fig. 3, the method for determining delay information may include:
step S200, calculating a time difference between the first receiving time and the first sending time to obtain a first time difference.
The first time difference is the first reception time-the first transmission time.
Step S210, calculating a time difference between the second receiving time and the second sending time to obtain a second time difference;
the second time difference is the second reception time-the second transmission time.
Step S220, determining delay information between the target timer board and the source timer board by using the first time difference and the second time difference.
The line delay is an average of the first time difference and the second time difference.
Assume that the first transmission time is T1, the first reception time is T2, the second transmission time is T3, and the second reception time is T4.
Line Delay ((T2-T1) + (T4-T3))/2.
Assuming that T1 is 80us, the time counted by the target timer board is assumed to be 100us, and T2 is 130 us. Let T3 ═ 134us and T4 ═ 144 us.
Delay=((T2-T1)+(T4-T3))/2=((130-80)+(144-134))/2=30us。
The time drift is half the difference between the first time difference and the second time difference. Also, assume that the first transmission time is T1, the first reception time is T2, the second transmission time is T3, and the second reception time is T4.
Then the time drift Offset is ((T2-T1) - (T4-T3))/2.
In addition, it is apparent that: the method for determining the Delay information between the target timer board and the source timer board according to the first receiving time, the first transmitting time, the second receiving time and the second transmitting time by the target timer board may also be implemented in other embodiments, where the sum of the first transmitting time T1 and the second transmitting time T3, and the sum of the first receiving time T2 and the second receiving time T4 may be respectively, so that the line Delay is ((T2+ T4) - (T1+ T3))/2. Also, if the sum of the first sending time T1 and the second receiving time T4, and the sum of the first receiving time T2 and the second sending time T3, respectively, are used, the time shift Offset is ((T2+ T3) - (T1+ T4))/2.
According to the invention, the delay information between each target timer board card and the corresponding source timer board card in the simulation system can be accurately obtained by using the above mode, so that the time of the clock can be adjusted based on the delay information, and the purpose of clock synchronization of the timer board cards in the simulation system is achieved.
In practical implementation, an FPGA (field programmable Gate Array) may be configured in the timer board according to the embodiment of the present invention, and the time synchronization algorithm in the timer board is implemented by using an FPGA digital circuit. By using the simulation system synchronization method and combining the advantages and the characteristics of the FPGA digital circuit, the precision of the calculation result can be improved, so that the synchronization precision is improved, and the synchronization precision can reach 0.1us magnitude.
Optionally, an embodiment of the present invention further provides a simulation device, where the simulation device includes a timer board, and the timer board at least includes: a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program for at least executing the simulation system synchronization method as described above.
Optionally, an embodiment of the present invention further provides a simulation system, where the simulation system includes: the simulation system comprises a plurality of simulation devices, wherein each simulation device comprises a timer board card, different simulation devices are cascaded through the timer board cards, the simulation devices comprise a master simulation device, the rest simulation devices are slave simulation devices, the timing time of the timer board card in each simulation device is used as the time of the simulation device, and each timer board card is used for:
when the target timer board card receives a time synchronization request sent by the source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time; the time synchronization request includes: a first sending time, which is a timing time of the source timer board card when the source timer board card sends the time synchronization request;
the target timer board card feeds back response information corresponding to the time synchronization request to the source timer board card, and the timing time of the target timer board card when the response information is fed back is used as second sending time;
the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; the synchronization confirmation information includes: second receiving time, which is the timing time of the source timer board card when the source timer board card receives the response information;
the target timer board card determines delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, wherein the delay information is line delay or time drift;
the target timer board card carries out timing calibration on the target timer board card according to the delay information;
the timer board card in the main simulation equipment is a first source timer board card, each target timer board card is subsequently used as a new source timer board card after timing calibration is completed, and the timer board card which is adjacent to the source timer board card and does not complete timing calibration is used as a target timer board card.
The simulation system further comprises: an upper computer; the main simulation equipment is determined by the upper computer.
Technical features described in the embodiments in the present specification may be replaced or combined with each other, each embodiment is described with a focus on differences from other embodiments, and the same and similar portions among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A simulation system synchronization method is characterized in that a simulation system comprises a plurality of simulation devices, each simulation device comprises a timer board, different simulation devices are cascaded through the timer board, the plurality of simulation devices comprise a master simulation device, the rest simulation devices are slave simulation devices, and the timing time of the timer board in each simulation device is used as the time of the simulation device, and the method comprises the following steps:
when the target timer board card receives a time synchronization request sent by the source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time; the time synchronization request includes: a first sending time, which is a timing time of the source timer board card when the source timer board card sends the time synchronization request;
the target timer board card feeds back response information corresponding to the time synchronization request to the source timer board card, and the timing time of the target timer board card when the response information is fed back is used as second sending time;
the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; the synchronization confirmation information includes: second receiving time, which is the timing time of the source timer board card when the source timer board card receives the response information;
the target timer board card determines delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, wherein the delay information is line delay or time drift;
the target timer board card carries out timing calibration on the target timer board card according to the delay information;
the timer board card in the main simulation equipment is a first source timer board card, each target timer board card is subsequently used as a new source timer board card after timing calibration is completed, and the timer board card which is adjacent to the source timer board card and does not complete timing calibration is used as a target timer board card.
2. The method of claim 1, further comprising:
and the target timer board receives a simulation starting command sent by the source timer board, wherein the simulation starting command is generated by the timer board in the main simulation equipment.
3. The method of claim 1, wherein the determining, by the target timer board, the delay information between the target timer board and the source timer board according to the first receiving time, the first sending time, the second receiving time, and the second sending time comprises:
calculating the time difference between the first receiving time and the first sending time to obtain a first time difference;
calculating the time difference between the second receiving time and the second sending time to obtain a second time difference;
and determining delay information between the target timer board card and the source timer board card by utilizing the first time difference and the second time difference.
4. The method of claim 1, further comprising:
and the target timer board receives a simulation stop command sent by the source timer board, wherein the simulation stop command is generated by the timer board in the main simulation equipment.
5. The method of claim 1, wherein timer boards in different emulation devices are cascaded through optical fibers; and the timer board cards in the adjacent simulation equipment are communicated with each other by using the same optical fiber.
6. The method of claim 1, wherein the simulated interrupt intervals of the simulated interrupt signals generated by the timer boards in each of the simulated devices are consistent.
7. The method of claim 1, wherein the simulation system further comprises: an upper computer; the main simulation equipment is determined by the upper computer.
8. The simulation device is characterized by comprising a timer board card, wherein the timer board card at least comprises: a processor and a memory;
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program at least for executing the simulation system synchronization method of any one of claims 1 to 7.
9. A simulation system, characterized in that the simulation system comprises: the simulation system comprises a plurality of simulation devices, wherein each simulation device comprises a timer board card, different simulation devices are cascaded through the timer board cards, the simulation devices comprise a master simulation device, the rest simulation devices are slave simulation devices, the timing time of the timer board card in each simulation device is used as the time of the simulation device, and each timer board card is used for:
when the target timer board card receives a time synchronization request sent by the source timer board card, the target timer board card takes the timing time of the target timer board card as first receiving time; the time synchronization request includes: a first sending time, which is a timing time of the source timer board card when the source timer board card sends the time synchronization request;
the target timer board card feeds back response information corresponding to the time synchronization request to the source timer board card, and the timing time of the target timer board card when the response information is fed back is used as second sending time;
the target timer board card receives the synchronous confirmation information sent by the source timer board card after receiving the response information; the synchronization confirmation information includes: second receiving time, which is the timing time of the source timer board card when the source timer board card receives the response information;
the target timer board card determines delay information between the target timer board card and the source timer board card according to the first receiving time, the first sending time, the second receiving time and the second sending time, wherein the delay information is line delay or time drift;
the target timer board card carries out timing calibration on the target timer board card according to the delay information;
the timer board card in the main simulation equipment is a first source timer board card, each target timer board card is subsequently used as a new source timer board card after timing calibration is completed, and the timer board card which is adjacent to the source timer board card and does not complete timing calibration is used as a target timer board card.
10. The simulation system of claim 9, further comprising: an upper computer; the main simulation equipment is determined by the upper computer.
CN202010489464.9A 2020-06-02 2020-06-02 Simulation system synchronization method, simulation device and system Pending CN111638749A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010489464.9A CN111638749A (en) 2020-06-02 2020-06-02 Simulation system synchronization method, simulation device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010489464.9A CN111638749A (en) 2020-06-02 2020-06-02 Simulation system synchronization method, simulation device and system

Publications (1)

Publication Number Publication Date
CN111638749A true CN111638749A (en) 2020-09-08

Family

ID=72330418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010489464.9A Pending CN111638749A (en) 2020-06-02 2020-06-02 Simulation system synchronization method, simulation device and system

Country Status (1)

Country Link
CN (1) CN111638749A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114779878A (en) * 2022-04-25 2022-07-22 南方电网科学研究院有限责任公司 System and method for calculating simulation step length time of power system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011018107A (en) * 2009-07-07 2011-01-27 Fujitsu Ten Ltd Simulation system
CN102244925A (en) * 2010-05-14 2011-11-16 华为技术有限公司 Clock synchronization method, customer premises equipment and clock synchronization system
CN105490798A (en) * 2015-11-25 2016-04-13 尹璐 Synchronization method and synchronization system for standard time and fighting time of cross-platform terminals of multiple types
CN108599888A (en) * 2018-05-09 2018-09-28 西安电子科技大学 A kind of distributed network clock synchronizing system
CN109581415A (en) * 2019-01-25 2019-04-05 中国人民解放军海军航空大学 A kind of synchronous apparatus and method calculated and time service controls based on GNSS

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011018107A (en) * 2009-07-07 2011-01-27 Fujitsu Ten Ltd Simulation system
CN102244925A (en) * 2010-05-14 2011-11-16 华为技术有限公司 Clock synchronization method, customer premises equipment and clock synchronization system
CN105490798A (en) * 2015-11-25 2016-04-13 尹璐 Synchronization method and synchronization system for standard time and fighting time of cross-platform terminals of multiple types
CN108599888A (en) * 2018-05-09 2018-09-28 西安电子科技大学 A kind of distributed network clock synchronizing system
CN109581415A (en) * 2019-01-25 2019-04-05 中国人民解放军海军航空大学 A kind of synchronous apparatus and method calculated and time service controls based on GNSS

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114779878A (en) * 2022-04-25 2022-07-22 南方电网科学研究院有限责任公司 System and method for calculating simulation step length time of power system
CN114779878B (en) * 2022-04-25 2023-03-03 南方电网科学研究院有限责任公司 System and method for calculating simulation step length time of power system

Similar Documents

Publication Publication Date Title
EP3367733B1 (en) Method, device, and system for synchronizing clocks of processors
EP3284244B1 (en) Methods, systems, and computer readable media for emulating network devices with different clocks
KR101109897B1 (en) Server time protocol messages and methods
CA2675645C (en) Facilitating synchronization of servers in a coordinated timing network
CA2675644C (en) Facilitating recovery in a coordinated timing network
KR101484871B1 (en) Master device and slave device and time synchronization method
CA2675637A1 (en) Defining a stratum-1 configuration in a coordinated timing network
CN109471588A (en) A kind of synchronous method and equipment
CN111638749A (en) Simulation system synchronization method, simulation device and system
CN107800500A (en) A kind of method, apparatus and equipment for determining time synchronized message clock time
JP4080397B2 (en) Parallel computer
US20170117980A1 (en) Time synchronization for network device
CN113055113A (en) Clock time synchronization method, device, equipment and storage medium
JP2008187235A (en) Network system and slave synchronization method
CN113259039A (en) Time synchronization method and device, computer equipment and storage medium
CN113204516A (en) Method and device for time synchronization of processors
CN103441832A (en) Clock synchronization method, system and equipment based on PTP
KR20170124213A (en) UTC Time Synchronization Method for a Device using GPS Module
WO2020132834A1 (en) Method and device for stamping processing
US20230275679A1 (en) Method and apparatus for synchronizing signals of signal measuring devices
CN112019288B (en) Time synchronization method, service single board and network equipment
EP3814868B1 (en) Precision timing between systems
CN117411582A (en) Time synchronization method and device
KR20230091357A (en) Method for synchronizing time in multiple time domains, and apparatus implementing the same method
CN115459897A (en) Step length synchronous calibration method and device in electric power real-time simulation and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination