CN110855396B - High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second - Google Patents

High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second Download PDF

Info

Publication number
CN110855396B
CN110855396B CN201911181835.0A CN201911181835A CN110855396B CN 110855396 B CN110855396 B CN 110855396B CN 201911181835 A CN201911181835 A CN 201911181835A CN 110855396 B CN110855396 B CN 110855396B
Authority
CN
China
Prior art keywords
time
pulse
dual
redundancy
counter
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.)
Active
Application number
CN201911181835.0A
Other languages
Chinese (zh)
Other versions
CN110855396A (en
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 Institute of Computer Technology and Applications
Original Assignee
Beijing Institute of Computer Technology and Applications
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 Institute of Computer Technology and Applications filed Critical Beijing Institute of Computer Technology and Applications
Priority to CN201911181835.0A priority Critical patent/CN110855396B/en
Publication of CN110855396A publication Critical patent/CN110855396A/en
Application granted granted Critical
Publication of CN110855396B publication Critical patent/CN110855396B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0602Systems characterised by the synchronising information used
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/062Synchronisation of signals having the same nominal but fluctuating bit rates, e.g. using buffers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Electric Clocks (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention relates to a high-precision dual-redundancy time synchronization system based on Ethernet and pulse per second, which is characterized by comprising the following components: the system comprises a time system station, a management unit and a plurality of control units; the management unit and each control unit receive time code messages of the time system station, the output of the time system station is connected with the input received by the dual-redundancy receiving module of the management unit and is used for receiving dual-redundancy second pulse information of the time system station, the output of the dual-redundancy second pulse forwarding module in the management unit is connected with the input of the dual-redundancy second pulse receiving module in each control unit, and the second pulse information received by the management unit from the time system station is forwarded to each control unit. The invention simultaneously adopts the pulse per second and the time code information to carry out double-layer time synchronization, prevents the system time offset caused by single line faults such as pulse per second offset or time code message interruption and the like, and ensures the real-time performance of the system.

Description

High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second
Technical Field
The invention relates to the technical field of embedded systems, in particular to a safety protection framework system for an embedded system.
Background
With the rapid progress of science and technology in China, research in more and more fields realizes the importance of time unification, and particularly in the application of modern large-scale engineering systems, the time unification technology can ensure the integrity of system composition and the coordination of work. In engineering implementation, the system time synchronization is usually realized by adopting a pulse per second synchronization mode, which puts high requirements on the accuracy of pulse per second synchronization and the reliability of pulse per second reception in the system. The existing pulse per second synchronization technology needs a time system module to sample, eliminate jitter and judge an input pulse per second signal by using a digital logic device through a high-speed clock generated by a high-frequency crystal oscillator, and then synchronization can be carried out. The delay in the transmission of the pulse-per-second signal, the delay in the sampling of the digital logic device, jitter elimination, and the delay caused by logic judgment all result in the increase of the pulse-per-second synchronization error. The problem of timing system errors is difficult to thoroughly solve by the existing sampling and jitter eliminating technology. Based on the reliability requirement of pulse per second receiving and the instability of single-second pulse time synchronization, the invention provides a high-precision dual-redundancy time synchronization system based on Ethernet + second pulse, aiming at the problems of time deviation, heavy second, second skip and the like in the existing time synchronization system. And the reliability and the real-time performance of time synchronization of each unit of the system are ensured.
Disclosure of Invention
The invention aims to provide a high-precision dual-redundancy time synchronization system based on Ethernet + pulse per second, which is used for solving the problems of second skip and second repetition in the time synchronization process of the system.
The invention relates to a high-precision dual-redundancy time synchronization system based on Ethernet and pulse per second, which is characterized by comprising the following components: the system comprises a time system station, a management unit and a plurality of control units; the management unit and each control unit receive time code messages of the time system station, the output of the time system station is connected with the input received by the dual-redundancy receiving module of the management unit and is used for receiving dual-redundancy second pulse information of the time system station, the output of the dual-redundancy second pulse forwarding module in the management unit is connected with the input of the dual-redundancy second pulse receiving module in each control unit, and the second pulse information received by the management unit from the time system station is forwarded to each control unit; the management unit receives the second pulse through the dual-redundancy receiving module and then forwards the second pulse to each control unit, the management unit and the logic processing unit of each control unit simultaneously start a second surplus counter, signals of the second surplus counter are synchronized with the second pulse, effective second pulses in the dual-redundancy second pulse are judged according to the dual-redundancy second pulse input principle, the synchronized second pulse signals are accumulated and timed according to a clock provided by a high-stability crystal oscillator, and the second pulse signals are stored in a second surplus data register in real time; when the next second pulse arrives, the excess second counter is cleared and the second pulse is forwarded to each control unit, if the excess second counter counts to a threshold value, the next second pulse still does not arrive, the second pulse is considered to be disconnected, the time keeping compensation state is automatically entered, the count value error generated by waiting for the second pulse is compensated, the time keeping state is entered after the compensation is completed, and the time keeping second pulse is generated.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on the ethernet and the pulse per second, the main processor modules of the management unit and each control unit receive the time code messages through the frequency of the dual-redundancy network module once per second, the time code messages received by the main processor modules of each unit are analyzed and then stored in the cache, and after the next pulse per second or the second-rest counter is overtime, the time code information in the cache is added with 1 to be assigned to the time register and the date register.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on the Ethernet and the second pulse, in the time keeping state and the time keeping compensation state, if the logic processing unit receives a new second pulse, the logic processing unit is switched to the time service working state and continues to wait for the next valid second pulse, the surplus-second counter is accumulated timely according to the second pulse signal, the surplus-second counter is cleared when the surplus-second counter reaches 59, the fractional counter is increased by 1, and the change of the time counter information is stored in the time data register in real time when the fractional counter reaches 59.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on the ethernet and the pulse per second of the present invention, the date, month and year information is also accumulated and carried to zero in the corresponding counters according to the calendar rule.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on the Ethernet and the pulse per second, in the management unit, a main processor module is in bidirectional connection with a time system module to update time code information or access the time code information; the dual redundant network module is connected with the main processor module in a bidirectional way, so that the time code message is received and stored in a cache for the time system module to access; the output of the double redundant receiving module in the time system module is connected with the input of the logic processing unit, and the output of the logic processing unit is connected with the input of the double redundant second pulse forwarding module, so that the second pulse signal is received, processed and forwarded; the logic processing unit is bidirectionally connected with data registers such as a date data register, a time data register, a second remainder data register and the like, so that the logic processing unit can access and update the data of each data register.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on the Ethernet and the pulse per second, in the control unit, a main processor module is in bidirectional connection with a time system module to update time code information or access the time code information, and a dual-redundancy network module is in bidirectional connection with the main processor module to receive time code messages and store the time code messages into a cache for the time system module to access; the output of the dual redundant receiving module in the time system module is connected with the input of the logic processing unit, so that the second pulse signal is received and processed; the logic processing unit is in bidirectional connection with the data register to realize that the logic processing unit accesses and updates the data of the data register; the logic processing unit and the second counter; the input of the second counter is connected with the output of the crystal oscillator, so that the second counter counts time in an accumulating manner according to the clock provided by the high-stability crystal oscillator.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on the ethernet and the pulse per second, two paths of pulse per second receiving interfaces are arranged on the hardware of the dual-redundancy receiving module of the time system module and are forwarded out, the pulse per second input redundancy is realized by the time system logic processing unit, the effective state of the pulse per second is judged according to the interval between adjacent pulse per second, and when the interval is greater than 1s +0.01s, the program considers the pulse per second to be invalid.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on ethernet and pulse per second of the present invention, the two paths of pulse per second of the system station when the dual-redundancy receiving module receives the pulse per second include: the first channel of second pulse is effective, and the second channel of second pulse is effective: using the first second pulse to time; the second pulse of the first path is effective, and the second pulse of the second path is ineffective: using the first second pulse to time; the first channel of pulse per second is invalid, the second channel of pulse per second is valid: using the second path of second pulse to carry out time service; the first path of pulse per second is invalid, and the second path of pulse per second is invalid: the logic enters a time-keeping state.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on the ethernet and the pulse per second, the dual-redundancy network module comprises two independent network cards, the two network cards are added into the redundancy group through the dual-redundancy network driver, the two network cards are provided with the same MAC address and IP address, the first network card is initially set as an effective network card by default, the second network card is a backup network card, and when the connection of the effective network card fails or is disconnected, the backup network card is immediately switched to the effective network card.
According to an embodiment of the high-precision dual-redundancy time synchronization system based on ethernet and pulse per second of the present invention, the system synchronization process of the management unit and each control unit includes two parts: the second pulse synchronization comprises time service state second pulse synchronization and timekeeping state second pulse synchronization; the second pulse synchronization process: 1) time service state: the management unit receives the second pulse through the dual-redundancy receiving module and then forwards the second pulse to each control unit, the logic processing units of the management unit and each control unit simultaneously start a second surplus counter, effective second pulses in the dual-redundancy second pulses are judged according to a dual-redundancy second pulse receiving principle, signals of the second surplus counter are synchronized with the effective second pulses, the synchronized second pulse signals are accumulated and timed according to a clock provided by a high-stability crystal oscillator and stored in a second surplus data register in real time, and when the next second pulse arrives, the second surplus counter is cleared and the second pulse is forwarded to each control unit; 2) the time keeping state: if the remaining-second counter counts to 10000100, the next second pulse still does not arrive, the logic processing unit considers that the second pulse is disconnected, and automatically enters a time-keeping compensation state for compensating 100 count value errors generated by waiting for the second pulse, the logic processing unit enters the time-keeping state after compensation is completed, the time-keeping second pulse is generated according to 10000000 count value, and in the time-keeping state and the time-keeping compensation state, if the logic processing unit receives a new second pulse, the logic processing unit is switched to a time service working state, and continues to wait for the next effective second pulse; 3) time code conversion and synchronization: the second surplus counter counts time according to the second pulse signal accumulation, when the second surplus counter reaches 59, the second surplus counter is cleared, the sub-counter is added with 1, and similarly, when the sub-counter reaches 59, the time counter is added with 1, and the change of the time-minute-second information is stored in a time data register in real time; time code synchronization process: the management unit and the main processor modules of the control units receive time code messages through the frequency of the dual redundant network once per second, the time code messages received by the main processor modules of the units are analyzed and then stored in a cache, and after the next second pulse or the second rest counter is overtime, the time code information in the cache is added with 1 to be assigned to a time register and a date register.
The invention simultaneously adopts the pulse per second and the time code information to carry out double-layer time synchronization, prevents the system time offset caused by single line faults such as pulse per second offset or time code message interruption and the like, and ensures the real-time performance of the system. Meanwhile, the receiving of the second pulse and the time code message of each unit adopts a dual redundancy technology, so that the reliability of the system is further improved. The dual-redundancy time synchronization system is successfully applied to a certain equipment control system, and a large amount of applications prove that the system effectively prevents the second skip and the second repeat in the time system, and ensures the strong real-time performance and the high reliability of the time system.
Drawings
FIG. 1 is a schematic block diagram of the present dual redundant time synchronization system;
fig. 2 is a flowchart illustrating the timing synchronization operation of the management unit and each control unit.
Detailed Description
In order to make the objects, contents, and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
Fig. 1 is a schematic block diagram of the dual redundant time synchronization system, as shown in fig. 1, including: a time master station, a management unit 0, a control unit 1 to a control unit n. The management unit 0 includes a main processor module 01, a dual redundant network module 02 and a timing module 03, wherein the timing module 03 includes a logic processing unit 031, a dual redundant 422 receiving module 032, a dual redundant second pulse forwarding module 0314, a date data register 033, a time data register 034, a second remainder data register 035, a year counter 0312, a month counter 0311, a day counter 0310, a time counter 039, a minute counter 038, a second remainder counter 037, a second remainder counter 036 and a crystal oscillator 0313. The control units 1 to n have the same functions, so that the constituent modules of the units are the same, and the constituent modules of the units comprise a main processor module n1, a dual redundant network module n2 and a time system module n3, wherein the time system module comprises a logic processing unit n32, a dual redundant 422 receiving module n31, a date data register n33, a time data register n34, a second remainder data register n35, a year counter n312, a month counter n311, a day counter n310, a time counter n39, a minute counter n38, a second remainder counter n37, a second remainder counter n36 and a crystal oscillator n 313.
As shown in fig. 1, in the management unit 0, the main processor module 01 is bidirectionally connected to the timing module 03, and updates or accesses the timing information. The dual redundant network module 02 is bidirectionally connected with the main processor module 01, so as to receive the time code message and store the time code message into a cache for the time system module to access. The output of the dual-redundancy 422 receiving module 031 in the timing system module 03 is connected with the input of the logic processing unit 032, and the output of the logic processing unit 032 is connected with the input of the dual-redundancy second pulse forwarding module 0314, so as to receive, process and forward the second pulse signals; the logic processing unit 032 is connected with data registers such as a date data register 035, a time data register 034 and a second remainder data register 033 in a bidirectional manner, so that the logic processing unit can access and update data of each data register; the logic processing unit 032 is bidirectionally connected to counters such as a year counter 0312, a month counter 0311, a day counter 0310, a time counter 039, a minute counter 038, a second counter 037, and a second counter 036, so as to control the counters by the logic processing unit. The input of the second counter 036 is connected to the output of the crystal oscillator 0313, so that the second counter counts up according to the clock provided by the high-stability crystal oscillator.
As shown in fig. 1, in the control units 1-n, the main processor module n1 is bidirectionally connected to the timing module n3, so as to update or access the timing code information. The dual redundant network module n3 is bidirectionally connected with the main processor module n1, so as to receive the time code message and store the time code message into a cache for the access of the time system module. The output of a dual redundancy 422 receiving module n31 in the timing module n3 is connected with the input of a logic processing unit n32, so that the second pulse signal is received and processed; the logic processing unit n32 is bidirectionally connected with data registers such as a date data register n35, a time data register n34 and a second remainder data register n33, so that the logic processing unit can access and update the data of each data register; the logic processing unit n32 is bidirectionally connected with counters such as a year counter n312, a month counter n311, a day counter n310, a time counter n39, a minute counter n38, a second remaining counter n37 and a second remaining counter n36, so as to realize the control of each counter by the logic processing unit. The input of the aftersecond counter n36 is connected to the output of the crystal oscillator n313, so that the aftersecond counter is clocked by the clock provided by the high-stability crystal oscillator.
As shown in fig. 1, the management unit 0 and each of the control units 1 to n are bidirectionally connected to the time master station, and are configured to receive a time code packet from the time master station by each unit, and an output of the time master station is connected to an input of the dual redundancy 422 receiving module in the management unit 0 to receive 031 dual redundancy pulse-per-second information from the time master station. The output of the dual redundant second pulse forwarding module 033 in the management unit 0 is connected to the input of the dual redundant second pulse receiving module n31 in each control unit n, and the second pulse information received by the management unit 0 from the time station is forwarded to each control unit.
The dual redundancy second pulse receiving/forwarding principle is as follows:
the dual redundancy 422 receiving module hardware of the time system module is provided with two paths of second pulse receiving interfaces which are all forwarded out. The pulse per second input redundancy is realized by a time system logic processing unit, the effective state of the pulse per second is judged according to the interval between adjacent pulse per second, when the interval is more than 1s +0.01s, the program considers the pulse per second to be invalid, and the effective states of two paths of pulse per second have the following conditions:
the first channel of second pulse is effective, and the second channel of second pulse is effective: and the logic unit uses the first second pulse to carry out time service.
The second pulse of the first path is effective, and the second pulse of the second path is ineffective: and the logic unit uses the first second pulse to carry out time service.
The first channel of pulse per second is invalid, the second channel of pulse per second is valid: and the logic unit uses the second path of second pulse to carry out time service.
The first path of pulse per second is invalid, and the second path of pulse per second is invalid: the logic enters a time-keeping state.
The principle of receiving time code messages by a dual redundant network is as follows:
the dual redundant network module is physically provided with two independent network cards, the two network cards are added into a redundant group through dual redundant network driving, and the two network cards are provided with the same MAC address and IP address. And initially setting a first network card as an effective network card by default, setting a second network card as a backup network card, and immediately switching the backup network card into the effective network card when the effective network card is failed to be connected or disconnected. The reliability of receiving the time code message of the system is effectively improved by adopting the dual redundant network.
The time system synchronization working process of the management unit and each control unit comprises two parts: pulse-per-second synchronization and time code synchronization. The second pulse synchronization is divided into time service state second pulse synchronization and time keeping state second pulse synchronization.
The second pulse synchronization process:
1) time service state: the management unit immediately forwards the second pulse to each control unit after receiving the second pulse through the dual-redundancy 422 receiving module, the logic processing units of the management unit and each control unit simultaneously start a second counter, effective second pulses in the dual-redundancy second pulses are judged according to a dual-redundancy second pulse receiving principle, signals of the second counter are synchronized with the effective second pulses, and the synchronized second pulse signals are accumulated and timed according to a clock provided by a high-stability crystal oscillator and stored in a second remainder data register in real time. When the next second pulse comes, the second rest counter is cleared and the second pulse is forwarded to each control unit.
2) The time keeping state: if the second pulse does not arrive when the second rest counter counts to 10000100, the logic processing unit considers that the second pulse has been disconnected, automatically enters a time-keeping compensation state for compensating the 100 count value error generated by waiting the second pulse, enters the time-keeping state after the compensation is completed, and generates the time-keeping second pulse according to the 10000000 count value. And when the logic processing unit receives a new second pulse in the time keeping state and the time keeping compensation state, the logic processing unit is immediately switched to the time service working state and continues to wait for the next effective second pulse. The process uses a time-keeping compensation principle, and effectively prevents the phenomenon of second repetition and second skip caused by the shaking of the time-keeping station second pulse source.
3) Time code conversion and synchronization: and the second surplus counter counts time according to the second pulse signal, clears when the second surplus counter reaches 59, adds 1 to the sub-counter, and similarly, when the sub-counter reaches 59, adds 1 to the time counter, and the change of the time-minute-second information is stored in the time data register in real time. Similarly, the information of the day, the month and the year is accumulated and carried in a zero clearing way for the corresponding counter according to the calendar rule.
Time code synchronization process:
and the main processor modules of the management unit and each control unit receive the time code messages through the frequency of the dual redundant network once per second. Because the time code message does not arrive at the same time as the pulse per second, in order to avoid the conflict of the time information when no pulse per second exists, the time code message received by the main processor module of each unit is not updated to the time register and the date register of the time system module immediately. The time code message is analyzed and then stored into a cache, and after the next second pulse or the second rest counter is overtime, the time code information in the cache is added with 1 and is given to a time register and a date register.
Fig. 2 is a flowchart illustrating a timing synchronization work process of the management unit and each control unit, and as shown in fig. 2, the specific work process is as follows:
the management unit immediately forwards the second pulse to each control unit n after receiving the second pulse through the dual-redundancy 422 receiving module, the management unit 0 and the logic processing unit of each control unit n simultaneously start a second counter, synchronize signals of the second counter with the second pulse, judge effective second pulses in the dual-redundancy second pulse according to a dual-redundancy second pulse input principle, and accumulate and time the synchronized second pulse signals according to a clock provided by a high-stability crystal oscillator and store the second pulse signals into a second remainder data register in real time. When the next second pulse arrives, the excess second counter is cleared and the second pulse is forwarded to each control unit, if the excess second counter counts to 10000100, the next second pulse does not arrive, the logic processing unit considers that the second pulse is disconnected, the logic processing unit automatically enters a timekeeping compensation state to compensate 100 count value errors generated by waiting for the second pulse, the logic processing unit enters the timekeeping state after compensation is completed, and the timekeeping second pulse is generated according to a 10000000 count value. And when the logic processing unit receives a new second pulse in the time keeping state and the time keeping compensation state, the logic processing unit is immediately switched to the time service working state and continues to wait for the next effective second pulse. The second surplus counter is timely accumulated according to the second pulse signal, the sub-counter is reset when the second surplus counter reaches 59, 1 is added to the sub-counter, and similarly, when the sub-counter reaches 59, the time counter is added with 1, and the change of the time-minute-second information is stored in the time data register in real time. Similarly, the information of the day, the month and the year is accumulated and carried in a zero clearing way for the corresponding counter according to the calendar rule.
And the main processor modules of the management unit and each control unit receive the time code messages through the frequency of the dual redundant network module once per second. Because the time code message does not arrive at the same time as the pulse per second, in order to avoid the conflict of the time information when no pulse per second exists, the time code message received by the main processor module of each unit is not updated to the time register and the date register of the time system module immediately. The time code message is analyzed and then stored into a cache, and after the next second pulse or the second rest counter is overtime, the time code information in the cache is added with 1 and is given to a time register and a date register.
The invention simultaneously adopts the pulse per second and the time code information to carry out double-layer time synchronization, prevents the system time offset caused by single line faults such as pulse per second offset or time code message interruption and the like, and ensures the real-time performance of the system. Meanwhile, the receiving of the second pulse and the time code message of each unit adopts a dual redundancy technology, so that the reliability of the system is further improved. The dual-redundancy time synchronization system is successfully applied to a certain equipment control system, and a large amount of applications prove that the system effectively prevents the second skip and the second repeat in the time system, and ensures the strong real-time performance and the high reliability of the time system.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (9)

1. A high-precision dual-redundancy time synchronization system based on Ethernet and pulse per second, comprising: the system comprises a time system station, a management unit and a plurality of control units;
the management unit and each control unit receive time code messages of the time system station, the output of the time system station is connected with the input received by the dual-redundancy receiving module of the management unit and is used for receiving dual-redundancy second pulse information of the time system station, the output of the dual-redundancy second pulse forwarding module in the management unit is connected with the input of the dual-redundancy second pulse receiving module in each control unit, and the second pulse information received by the management unit from the time system station is forwarded to each control unit;
the management unit receives the second pulse through the dual-redundancy receiving module and then forwards the second pulse to each control unit, the management unit and the logic processing unit of each control unit simultaneously start a second surplus counter, signals of the second surplus counter are synchronized with the second pulse, effective second pulses in the dual-redundancy second pulse are judged according to the dual-redundancy second pulse input principle, the synchronized second pulse signals are accumulated and timed according to a clock provided by a high-stability crystal oscillator, and the second pulse signals are stored in a second surplus data register in real time; when the next second pulse arrives, resetting the excess second counter and forwarding the second pulse to each control unit, if the excess second counter counts to a threshold value, the next second pulse still does not arrive, considering that the second pulse is disconnected, automatically entering a time-keeping compensation state, compensating a count value error generated by waiting for the second pulse, entering the time-keeping state after the compensation is completed, and generating the time-keeping second pulse;
the time system synchronization working process of the management unit and each control unit comprises two parts: the second pulse synchronization comprises time service state second pulse synchronization and timekeeping state second pulse synchronization;
the second pulse synchronization process:
1) time service state: the management unit receives the second pulse through the dual-redundancy receiving module and then forwards the second pulse to each control unit, the logic processing units of the management unit and each control unit simultaneously start a second surplus counter, effective second pulses in the dual-redundancy second pulses are judged according to a dual-redundancy second pulse receiving principle, signals of the second surplus counter are synchronized with the effective second pulses, the synchronized second pulse signals are accumulated and timed according to a clock provided by a high-stability crystal oscillator and stored in a second surplus data register in real time, and when the next second pulse arrives, the second surplus counter is cleared and the second pulse is forwarded to each control unit;
2) the time keeping state: if the remaining-second counter counts to 10000100, the next second pulse still does not arrive, the logic processing unit considers that the second pulse is disconnected, and automatically enters a time-keeping compensation state for compensating 100 count value errors generated by waiting for the second pulse, the logic processing unit enters the time-keeping state after compensation is completed, the time-keeping second pulse is generated according to 10000000 count value, and in the time-keeping state and the time-keeping compensation state, if the logic processing unit receives a new second pulse, the logic processing unit is switched to a time service working state, and continues to wait for the next effective second pulse;
3) time code conversion and synchronization: the second surplus counter counts time according to the second pulse signal accumulation, when the second surplus counter reaches 59, the second surplus counter is cleared, the sub-counter is added with 1, and similarly, when the sub-counter reaches 59, the time counter is added with 1, and the change of the time-minute-second information is stored in a time data register in real time;
time code synchronization process: the management unit and the main processor modules of the control units receive time code messages through the frequency of the dual redundant network once per second, the time code messages received by the main processor modules of the units are analyzed and then stored in a cache, and after the next second pulse or the second rest counter is overtime, the time code information in the cache is added with 1 to be assigned to a time register and a date register.
2. The Ethernet and PPS-based high-precision dual-redundancy time synchronization system according to claim 1, wherein the main processor modules of the management unit and each control unit receive the time code messages through the frequency of the dual-redundancy network module once per second, the time code messages received by the main processor modules of each unit are analyzed and then stored in the cache, and after the next PPS or the second-rest counter is overtime, the time code information in the cache is added with 1 to be assigned to the time register and the date register.
3. The Ethernet and PPS-based high-precision dual-redundancy time synchronization system of claim 1, wherein in the time keeping state and the time keeping compensation state, if the logic processing unit receives a new PPS, the logic processing unit is switched to the time service working state and continues to wait for the next valid PPS, the remainder of the second counter is counted up according to the PPS signal, the remainder of the second counter is cleared when the remainder of the second counter is equal to 59, the sub-counter is incremented by 1, and the remainder of the second counter is incremented by 1 when the sub-counter reaches 59, and the change of the TDM-second information is stored in the time data register in real time.
4. The Ethernet and pulse-per-second based high precision dual redundant time synchronization system of claim 3, wherein day, month and year information is also carried up and cleared to the corresponding counters according to a calendar law.
5. The Ethernet and pulse-per-second based high-precision dual-redundancy time synchronization system according to claim 1, wherein in the management unit, the main processor module is bidirectionally connected with the time system module to update or access the time code information; the dual redundant network module is connected with the main processor module in a bidirectional way, so that the time code message is received and stored in a cache for the time system module to access; the output of the double redundant receiving module in the time system module is connected with the input of the logic processing unit, and the output of the logic processing unit is connected with the input of the double redundant second pulse forwarding module, so that the second pulse signal is received, processed and forwarded; the logic processing unit is bidirectionally connected with the date data register, the time data register and the second remainder data register, so that the logic processing unit can access and update the data of each data register.
6. The Ethernet and pulse-per-second based high-precision dual-redundancy time synchronization system according to claim 1, wherein in the control unit, the main processor module is bidirectionally connected with the time system module to update or access the time code information, and the dual-redundancy network module is bidirectionally connected with the main processor module to receive and store the time code message into the cache for the time system module to access; the output of the dual redundant receiving module in the time system module is connected with the input of the logic processing unit, so that the second pulse signal is received and processed; the logic processing unit is in bidirectional connection with the data register to realize that the logic processing unit accesses and updates the data of the data register; the logic processing unit and the second counter; the input of the second counter is connected with the output of the crystal oscillator, so that the second counter counts time in an accumulating manner according to the clock provided by the high-stability crystal oscillator.
7. The Ethernet and PPS-based high-precision dual-redundancy time synchronization system of claim 1, wherein the dual-redundancy receiving module hardware of the timing module is provided with two PPS receiving interfaces which are both forwarded, the PPS input redundancy is realized by the timing logic processing unit, the effective state of the PPS is judged according to the interval between adjacent PPS, and when the interval is more than 1s +0.01s, the program considers the PPS to be invalid.
8. The ethernet and pulse-per-second based high-precision dual-redundancy time synchronization system of claim 7, wherein the dual-redundancy receiving module receives two pulses-per-second of the system station comprising:
the first channel of second pulse is effective, and the second channel of second pulse is effective: using the first second pulse to time;
the second pulse of the first path is effective, and the second pulse of the second path is ineffective: using the first second pulse to time;
the first channel of pulse per second is invalid, the second channel of pulse per second is valid: using the second path of second pulse to carry out time service;
the first path of pulse per second is invalid, and the second path of pulse per second is invalid: the logic enters a time-keeping state.
9. The ethernet and pulse-per-second based high-precision dual-redundancy time synchronization system according to claim 2, wherein the dual-redundancy network module comprises two independent network cards, the two network cards are added into the redundancy group through the dual-redundancy network driver, the two network cards are set to have the same MAC address and IP address, the first network card is initially set as a valid network card by default, the second network card is a backup network card, and when the connection of the valid network card fails or is disconnected, the backup network card is immediately switched to be the valid network card.
CN201911181835.0A 2019-11-27 2019-11-27 High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second Active CN110855396B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911181835.0A CN110855396B (en) 2019-11-27 2019-11-27 High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911181835.0A CN110855396B (en) 2019-11-27 2019-11-27 High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second

Publications (2)

Publication Number Publication Date
CN110855396A CN110855396A (en) 2020-02-28
CN110855396B true CN110855396B (en) 2021-07-06

Family

ID=69605602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911181835.0A Active CN110855396B (en) 2019-11-27 2019-11-27 High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second

Country Status (1)

Country Link
CN (1) CN110855396B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538369B (en) * 2020-04-17 2021-09-24 北京中科宇航技术有限公司 Triple-modular redundancy computer clock synchronization method and system
CN115714638B (en) * 2022-11-14 2023-04-04 成都博宇利华科技有限公司 Time system information transmission method based on JESD204B
CN117879550B (en) * 2024-03-12 2024-05-10 广州三晶电气股份有限公司 Remainder processing method and device for timing generation pulse

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532692A (en) * 2013-10-18 2014-01-22 广州南方电力集团科技发展有限公司 Double-passage double-mode redundant optical fiber longitudinal difference power distribution terminal data synchronization method
CN107896134A (en) * 2017-11-15 2018-04-10 中国电子科技集团公司第三十二研究所 High-precision modularized time synchronization equipment
CN109150351A (en) * 2017-06-27 2019-01-04 许继集团有限公司 A kind of UTC time realization method and system applied to substation

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7394830B2 (en) * 2003-09-11 2008-07-01 Cisco Technology, Inc. System for synchronizing circuitry in an access network
CN102394715B (en) * 2011-06-30 2016-09-07 烟台惠通网络技术有限公司 Clock synchronizing method and device
US9395748B1 (en) * 2015-03-06 2016-07-19 Arista Networks, Inc. Method and system for time synchronization in a network device
CN106502312B (en) * 2016-10-08 2020-01-14 南京熊猫电子股份有限公司 Design method of high-precision clock synchronization equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103532692A (en) * 2013-10-18 2014-01-22 广州南方电力集团科技发展有限公司 Double-passage double-mode redundant optical fiber longitudinal difference power distribution terminal data synchronization method
CN109150351A (en) * 2017-06-27 2019-01-04 许继集团有限公司 A kind of UTC time realization method and system applied to substation
CN107896134A (en) * 2017-11-15 2018-04-10 中国电子科技集团公司第三十二研究所 High-precision modularized time synchronization equipment

Also Published As

Publication number Publication date
CN110855396A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN110855396B (en) High-precision dual-redundancy time synchronization system based on Ethernet and pulse per second
US11994896B2 (en) Maintaining the correct time when counter values are transferred between clock domains
US10169171B2 (en) Method and apparatus for enabling temporal alignment of debug information
EP2448168A1 (en) Method and system for bearing time synchronization protocol in optical transport network
US9209919B2 (en) Synchronization control system
CN102291169A (en) Onboard high-accuracy time synchronization method for satellite
Baldoni et al. Causal delivery of messages with real-time data in unreliable networks
US20150120803A1 (en) Method and Device for Relaying Time-Triggered and Event-Triggered Communications
US20050193095A1 (en) Feature implementation in a real time stamp distribution system
WO2015131626A1 (en) Time synchronization method and apparatus for network devices and time synchronization server
CN112214547A (en) Data processing method, data server, electronic device and storage medium
CN105847050A (en) Method for detecting industrial Ethernet disconnection fault and recovering clock synchronization
CN103684734A (en) Hot backup redundancy computer time synchronization system and method thereof
CN107508648A (en) Time triggered Ethernet substep time synchronized strategy based on functions of the equipments classification
US11474557B2 (en) Multichip timing synchronization circuits and methods
CN111092687B (en) Calendar clock synchronization system of FC switching network system
JP2015171014A (en) Time synchronization method, network system, cpu, relay apparatus, and user apparatus
US6760764B1 (en) Real time stamp distribution
CN111614428B (en) Method and device for improving synchronization precision among multiple clocks
CN114448547A (en) Time synchronization method and device, electronic equipment and storage medium
US20200403939A1 (en) A664 synch network design
US20140089721A1 (en) Backplane communication system
CN116707693B (en) Signal stream message processing method and device, electronic equipment and storage medium
CN117220817B (en) Method and system for time synchronization monitoring of multi-core processor
CN110492966B (en) Time synchronization method of distributed relay protection device

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
GR01 Patent grant
GR01 Patent grant